1(function(){var e={299:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(90033);const n={ref:"container",class:"drag-container"},o={class:"drag-list"},l=["data-stage-id"],r={class:"drag-column-header"},d=["data-status"],c=["data-block-id","onMousedown","onTouchstart"],u={class:"drag-column-footer"};function m(e,t,i,m,p,h){return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("ul",o,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.stages,n=>((0,s.uX)(),(0,s.CE)("li",{key:`drag-column-${n.id}`,class:"drag-column","data-stage-id":n.id},[(0,s.Lk)("span",r,[(0,s.RG)(e.$slots,`stage-header-${n.id}`,{},()=>[(0,s.Lk)("h2",null,(0,a.v_)(n.name),1)],!0)]),t[1]||(t[1]=(0,s.Lk)("div",{class:"drag-options"},null,-1)),(0,s.Lk)("ul",{ref_for:!0,ref:"list",class:"drag-inner-list","data-status":n.id},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(h.getBlocks(n.id),o=>((0,s.uX)(),(0,s.CE)("li",{key:`drag-item-${o[i.idProp]}`,class:(0,a.C4)(["drag-item comment-text p-4",{"is-moving":p.isDragging&&p.draggedBlock&&p.draggedBlock[i.idProp]===o[i.idProp],"is-dropped":p.droppedBlockId===o[i.idProp],"is-locked":n.isLocked}]),"data-block-id":o[i.idProp],onMousedown:e=>h.onMouseDown(e,o,n),onTouchstart:e=>h.onTouchStart(e,o,n),onClickCapture:t[0]||(t[0]=(...e)=>h.onClickCapture&&h.onClickCapture(...e))},[(0,s.RG)(e.$slots,`block-${o[i.idProp]}`,{},()=>[(0,s.Lk)("strong",null,(0,a.v_)(o[i.statusProp].name),1),(0,s.Lk)("div",null,(0,a.v_)(o[i.idProp]),1)],!0)],42,c))),128))],8,d),(0,s.Lk)("div",u,[(0,s.RG)(e.$slots,`stage-footer-${n.id}`,{},void 0,!0)])],8,l))),128))]),p.isDragging&&p.ghost?((0,s.uX)(),(0,s.CE)("div",{key:0,ref:"ghost",class:"drag-ghost",style:(0,a.Tr)(h.ghostStyle)},[(0,s.RG)(e.$slots,`block-${p.draggedBlock[i.idProp]}`,{},()=>[(0,s.Lk)("strong",null,(0,a.v_)(p.draggedBlock[i.statusProp].name),1)],!0)],4)):(0,s.Q3)("",!0)],512)}i(18111),i(22489),i(7588);var p={name:"VueKanban",props:{stages:{type:Array,required:!0},blocks:{type:Array,required:!0},blankStatusId:{type:Number,default:-1},config:{type:Object,default:()=>({})},idProp:{type:String,default:"id"},statusProp:{type:String,default:"status"},sortProp:{type:String,default:"id"}},data(){return{isDragging:!1,draggedBlock:null,draggedElement:null,sourceStage:null,targetStage:null,droppedBlockId:null,ghost:null,ghostX:0,ghostY:0,ghostWidth:0,ghostHeight:0,offsetX:0,offsetY:0,startX:0,startY:0,hasMoved:!1,blockNextClick:!1}},computed:{localBlocks(){return this.blocks},ghostStyle(){return{position:"fixed",left:`${this.ghostX}px`,top:`${this.ghostY}px`,width:`${this.ghostWidth}px`,pointerEvents:"none",zIndex:9999}}},beforeUnmount(){this.cleanup()},unmounted(){this.cleanup()},methods:{getBlocks(e){let t=this;return e=Number(e),this.localBlocks.filter(function(i){return i[t.statusProp]?Number(i[t.statusProp].id)===e:e===t.blankStatusId}).sort(this.sortFunc)},sortFunc(e,t){return e[this.sortProp]>t[this.sortProp]?1:t[this.sortProp]>e[this.sortProp]?-1:0},onClickCapture(e){this.blockNextClick&&(e.stopPropagation(),e.preventDefault(),this.blockNextClick=!1)},onMouseDown(e,t,i){0===e.button&&(i.isLocked||this.startDrag(e,t,i,e.clientX,e.clientY))},onTouchStart(e,t,i){if(1!==e.touches.length)return;if(i.isLocked)return;const s=e.touches[0];this.startDrag(e,t,i,s.clientX,s.clientY)},startDrag(e,t,i,s,a){const n=e.currentTarget,o=n.getBoundingClientRect();this.draggedBlock=t,this.draggedElement=n,this.sourceStage=i,this.targetStage=i,this.offsetX=s-o.left,this.offsetY=a-o.top,this.ghostWidth=o.width,this.ghostHeight=o.height,this.ghostX=o.left,this.ghostY=o.top,this.startX=s,this.startY=a,this.hasMoved=!1,document.addEventListener("mousemove",this.onMouseMoveStart),document.addEventListener("mouseup",this.onMouseUpStart),document.addEventListener("touchmove",this.onTouchMoveStart,{passive:!1}),document.addEventListener("touchend",this.onTouchEndStart)},onMouseMoveStart(e){this.checkDragStart(e.clientX,e.clientY)},onTouchMoveStart(e){if(1!==e.touches.length)return;e.preventDefault();const t=e.touches[0];this.checkDragStart(t.clientX,t.clientY)},checkDragStart(e,t){const i=e-this.startX,s=t-this.startY,a=Math.sqrt(i*i+s*s);a>=8&&!this.isDragging&&(this.hasMoved=!0,this.activateDrag(),this.updateDrag(e,t))},activateDrag(){document.removeEventListener("mousemove",this.onMouseMoveStart),document.removeEventListener("mouseup",this.onMouseUpStart),document.removeEventListener("touchmove",this.onTouchMoveStart),document.removeEventListener("touchend",this.onTouchEndStart),this.isDragging=!0,this.ghost=!0,this.draggedElement.classList.add("is-moving"),this.$refs.list.forEach(e
1=>{e.classList.add("allowed")}),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("touchmove",this.onTouchMove,{passive:!1}),document.addEventListener("touchend",this.onTouchEnd),this.$emit("drag",this.draggedElement,this.sourceStage)},onMouseUpStart(){this.cancelDragStart()},onTouchEndStart(){this.cancelDragStart()},cancelDragStart(){document.removeEventListener("mousemove",this.onMouseMoveStart),document.removeEventListener("mouseup",this.onMouseUpStart),document.removeEventListener("touchmove",this.onTouchMoveStart),document.removeEventListener("touchend",this.onTouchEndStart),this.draggedBlock=null,this.draggedElement=null,this.sourceStage=null,this.targetStage=null},onMouseMove(e){this.updateDrag(e.clientX,e.clientY)},onTouchMove(e){if(e.preventDefault(),1!==e.touches.length)return;const t=e.touches[0];this.updateDrag(t.clientX,t.clientY)},updateDrag(e,t){if(!this.isDragging)return;this.ghostX=e-this.offsetX,this.ghostY=t-this.offsetY;const i={left:this.ghostX,right:this.ghostX+this.ghostWidth,top:this.ghostY,bottom:this.ghostY+this.ghostHeight},s=this.ghostX+this.ghostWidth/2;let a=null,n=0;this.$refs.list.forEach((e,t)=>{const o=(e.parentElement||e).getBoundingClientRect(),l=this.stages[t];if(s>=o.left&&s<=o.right){const t=this.calculateOverlap(i,o);t>n&&(n=t,a={list:e,stage:l})}}),this.$refs.list.forEach(e=>e.classList.remove("drag-over")),a&&a.stage!==this.targetStage?(a.list.classList.add("drag-over"),this.targetStage=a.stage):a&&a.list.classList.add("drag-over")},calculateOverlap(e,t){const i=Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left)),s=Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));return i*s},onMouseUp(){this.endDrag()},onTouchEnd(){this.endDrag()},endDrag(){if(!this.isDragging)return void this.cleanup();this.blockNextClick=!0,document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd);const e=this.draggedElement,t=this.draggedBlock,i=this.sourceStage,s=this.targetStage,a=i&&s&&i.id!==s.id;this.$refs.list.forEach(e=>{e.classList.remove("allowed","drag-over")}),a&&t&&(this.droppedBlockId=t[this.idProp]),this.$nextTick(()=>{const e=this.$refs.ghost;e&&e.classList.add("is-dropping")}),t&&i&&s&&this.$emit("drop",{block:t,blockId:t[this.idProp],targetStage:s,sourceStage:i}),setTimeout(()=>{e&&(e.classList.remove("is-moving"),a||(e.classList.add("is-moved"),setTimeout(()=>{e.classList.remove("is-moved")},600))),this.$emit("dragend",e),this.isDragging=!1,this.ghost=null,this.draggedBlock=null,this.draggedElement=null,this.sourceStage=null,this.targetStage=null,setTimeout(()=>{this.droppedBlockId=null},700)},300)},cleanup(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd),document.removeEventListener("mousemove",this.onMouseMoveStart),document.removeEventListener("mouseup",this.onMouseUpStart),document.removeEventListener("touchmove",this.onTouchMoveStart),document.removeEventListener("touchend",this.onTouchEndStart),this.isDragging=!1,this.ghost=null,this.draggedBlock=null,this.draggedElement=null,this.sourceStage=null,this.targetStage=null,this.hasMoved=!1}}},h=i(66262);const g=(0,h.A)(p,[["render",m],["__scopeId","data-v-c1dcb6c8"]]);var f=g},1325:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return D}});var s=i(20641),a=i(90033);const n={class:"o-mindwidth ml-3 mr-3"},o={key:0},l={class:"title mb-5"},r={class:"card p-5 mb-5 pt-0"},d={class:"has-text-weight-semibold mb-3"},c={key:0,class:"level-left"},u={class:"mr-4"},m={class:"mr-4"},p={class:"mr-4"},h={value:null},g={value:"approved"},f={value:"rejected"},b={class:"ml-4"},y={class:"icon-text"},v={class:"icon is-small"},k={key:0,class:"orgo-table-wrap"},C={class:"tag is-rounded"},L={class:"tag is-rounded is-medium"},w={key:0,class:"has-text-weight-semibold"},_={key:1,class:"has-text-weight-semibold"},E={class:"tag is-rounded"},$={class:"tag is-rounded"},F=["onClick"],T=["onClick"],S={key:1,class:"card p-5 mt-6"};function A(e,t,i,A,P,I){const M=(0,s.g2)("b-loading"),x=(0,s.g2)("b-input"),N=(0,s.g2)("b-select"),U=(0,s.g2)("font-awesome-icon"),D=(0,s.g2)("b-table-column"),X=(0,s.g2)("b-table");return(0,s.uX)(),(0,s.CE)("section",n,[(0,s.bF)(M,{modelValue:P.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>P.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),P.item?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("h2",l,(0,a.v_)(P.item.name),1),(0,s.Lk)("div",r,[(0,s.Lk)("p",d,(0,a.v_)(e.$t("Filter")),1),P.items?((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("div",u,[(0,s.bF)(x,{modelValue:P.filters.name,"onUpdate:modelValue":[t[1]||(t[1]=e=>P.filters.name=e),I.filterItemsByWord],placeholder:e.$t("name")},null,8,["modelValue","placeholder","onUpdate:modelValue"])]),(0,s.Lk)("div",m,[(0,s.bF)(x,{modelValue:P.filters.search,"onUpdate:modelValue":[t[2]||(t[2]=e=>P.filters.search=e),I.filterItemsByWord],placeholder:e.$t("Comment")},null,8,["modelValue","placeholder","onUpdate:modelValue"])]),(0,s.Lk)("div",p,[(0,s.bF)(N,{modelValue:P.filters.status,"onUpdate:modelValue":[t[3]||(t[3]=e=>P.filters.status=e),I.filterItems]},{default:(0,s.k6)(()=>[(0,s.Lk)("option",h,(0,a.v_)(e.$t("Status"))+"...",1),(0,s.Lk)("option",g,(0,a.v_)(e.$t("approved")),1),(0,s.Lk)("option",f,(0,a.v_)(e.$t("rejected")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),(0,s.Lk)("div",b,[(0,s.Lk)("button",{class:"button is-small is-primary is-outlined is-rounded",onClick:t[4]||(t[4]=(...e)=>I.loadItemsPage&&I.loadItemsPage(...e))},[(0,s.Lk)("span",y,[(0,s.Lk)("span",v,[(0,s.bF)(U,{icon:"fa-light fa-refresh"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Refresh")),1)])])])])):(0,s.Q3)("",!0)]),P.items?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.bF)(X,{data:P.items,paginated:P.isMoreThanOnePage,"pagination-rounded":"","backend-pagination":"","mobile-cards":!1,total:P.itemsTotal,"per-page":P.itemsPerPage,"current-page":P.itemsPageCurrent,scrollable:"",striped:"","backend-sorting":"","default-sort-direction":P.defaultSortOrder,"default-sort":[P.sortField,P.sortOrder],onPageChange:I.changeListPage,onSort:I.onSort},{default:(0,s.k6)(()=>[(0,s.bF)(D,{label:e.$t("Date"),sortable:"",field:"id"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",C,(0,a.v_)(e.$filters.format(t.row.dateCreated)),1)]),_:1},8,["label"]),(0,s.bF)(D,{label:e.$t("Donor")},{default:(0,s.k6)(e=>[(0,s.Lk)("span",L,[e.row.user?((0,s.uX)(),(0,s.CE)("span",w,(0,a.v_)(e.row.user.fullName),1)):(0,s.Q3)("",!0),e.row.contact?((0,s.uX)(),(0,s.CE)("span",_,(0,a.v_)(e.row.contact.name),1)):(0,s.Q3)("",!0)])]),_:1},8,["label"]),(0,s.bF)(D,{label:e.$t("Amount")},{default:(0,s.k6)(t=>[(0,s.Lk)("span",E,(0,a.v_)(e.$filters.money(t.row.amount,t.row.currency)),1)]),_:1},8,["label"]),(0,s.bF)(D,{label:e.$t("Comment")},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.commentByUser),1)]),_:1},8,["label"]),(0,s.bF)(D,{label:e.$t("Status")},{default:(0,s.k6)(e=>[(0,s.Lk)("span",$,(0,a.v_)(e.row.commentStatus),1)]),_:1},8,["label"]),(0,s.bF)(D,{label:e.$t("actions")},{default:(0,s.k6)(t=>["approved"!==t.row.commentStatus?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-rounded mr-3 is-small",onClick:e=>I.approveComment(t.row,t.index)},(0,a.v_)(e.$t("approve")),9,F)):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"button is-danger is-small is-rounded",onClick:e=>I.rejectComment(t.row,t.index)},(0,a.v_)(e.$t("delete")),9,T)]),_:1},8,["label"])]),_:1},8,["data","paginated","total","per-page","current-page","default-sort-direction","default-sort","onPageChange","onSort"])])):(0,s.Q3)("",!0),!P.isLoading&&P.items&&0===P.items.length?((0,s.uX)(),(0,s.CE)("div",S,(0,a.v_)(e.$t("No results found"))+". ",1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])}i(44114);var P=i(40834),I=i(38221),M=i.n(I),x={name:"Comments",data(){return{item:null,isLoading:!1,productUuid:this.$route.params.item,items:null,isMoreThanOnePage:!1,itemsTotal:null,itemsPageCurrent:this.$route.query.page?parseInt(this.$route.query.page):1,itemsPerPage:null,sortField:this.$route.query.sortField?this.$route.query.sortField:"id",sortOrder:this.$route.query.sortOrder?this.$route.query.sortOrder:"desc",defaultSortOrder:"desc",filters:{name:this.$route.query.name?this.$route.query.name:null,search:this.$route.query.search?this.$route.query.search:null,status:this.$route.query.status?this.$route.query.status:null}}},mounted(){this.retrieveProduct()},methods:{loadItemsPage(){this.items=null,this.isLoading=!0;let e=this.getOrderQueryString(),t=this.getFiltersQueryString();return this.$http.plain.get("/product_payments?page="+this.itemsPageCurrent+"&product.uuid="+this.productUuid+"&exists[commentByUser]=1"+e+t).then(e=>{this.items=e.data["hydra:member"],this.itemsTotal=e.data["hydra:totalItems"],this.itemsPerPage=20,this.isMoreThanOnePage=void 0!==e.data["hydra:view"]["hydra:first"]}
1).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},filterItemsByWord:M()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return!1;this.filterItems()},500),onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.filterItems()},getOrderQueryString(){let e="&order["+this.sortField+"]="+this.sortOrder;return e},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.filterItems(!1)},getFiltersQueryString(){let e="";return this.filters.name&&(e+="&user.fullName="+this.filters.name),this.filters.search&&(e+="&commentByUser="+this.filters.search),this.filters.status&&(e+="&commentStatus="+this.filters.status),e},retrieveProduct(){this.isLoading=!0,this.$http.plain.get("/products/"+this.productUuid).then(e=>(this.item=e.data,this.loadItemsPage())).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},approveComment(e,t){this.isLoading=!0,this.$http.plain.patch("product-payment/"+e.id+"/accept-comment",{}).then(e=>{this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success",duration:2e3}),this.items.splice(t,1)}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},rejectComment(e,t){this.isLoading=!0,this.$http.plain.patch("/product-payment/"+e.id+"/reject-comment",{}).then(e=>{this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success",duration:2e3}),this.items.splice(t,1)}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},filterItems(e=!1){let t={};t=this.filters.status?{status:this.filters.status}:{...t},t=this.filters.name?{name:this.filters.name,...t}:{...t},t=this.filters.search?{search:this.filters.search,...t}:{...t},t=this.sortField?{sortField:this.sortField,...t}:{...t},t=this.sortOrder?{sortOrder:this.sortOrder,...t}:{...t},t={page:e?1:this.itemsPageCurrent,...t},this.$router.push({name:"ProductComments",params:{item:this.item?this.item.uuid:0},query:{...t}}).catch(()=>{})}},computed:{...(0,P.L8)(["user","isGranted","tenant"])}},N=i(66262);const U=(0,N.A)(x,[["render",A]]);var D=U},1455:function(e,t,i){"use strict";i.d(t,{A:function(){return G}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"is-flex is-justify-content-space-between is-align-items-center mb-4"},l={class:"title is-size-4 mb-0"},r={class:"notification is-warning is-light mb-4"},d={class:"is-size-7"},c={key:0},u={class:"permission-domains"},m={class:"domain-header mb-0"},p={class:"has-text-weight-semibold"},h={class:"domain-header"},g={class:"has-text-weight-semibold"},f={class:"scope-checkboxes"},b={class:"domain-header"},y={class:"has-text-weight-semibold"},v={class:"scope-checkboxes"},k={class:"domain-header"},C={class:"has-text-weight-semibold"},L={class:"scope-checkboxes"},w={class:"domain-header"},_={class:"has-text-weight-semibold"},E={class:"scope-checkboxes"},$={class:"domain-header"},F={class:"has-text-weight-semibold"},T={class:"scope-checkboxes"},S={class:"domain-header"},A={class:"has-text-weight-semibold"},P={class:"scope-checkboxes"},I={key:0,class:"mt-4"},M={class:"is-size-7 has-text-weight-semibold mb-2"},x={class:"has-text-grey has-text-weight-normal ml-1"},N={value:null},U=["value"],D={class:"is-flex is-justify-content-flex-end mt-4"};function X(e,t,i,X,V,R){const O=(0,s.g2)("font-awesome-icon"),Q=(0,s.g2)("b-loading"),B=(0,s.g2)("b-checkbox"),G=(0,s.g2)("b-select"),W=(0,s.g2)("b-button");return(0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[V.isVisible?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"modal-overlay",onClick:t[23]||(t[23]=(...e)=>R.close&&R.close(...e))},[(0,s.Lk)("div",{class:"modal-content p-5",onClick:t[22]||(t[22]=(0,a.D$)(()=>{},["stop"]))},[(0,s.Lk)("div",o,[(0,s.Lk)("p",l,[(0,s.bF)(O,{icon:"fa-light fa-user-shield",class:"mr-2"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Permission Impersonation")),1)]),(0,s.Lk)("button",{class:"delete",onClick:t[0]||(t[0]=(...e)=>R.close&&R.close(...e))})]),(0,s.Lk)("div",r,[(0,s.Lk)("p",d,[(0,s.bF)(O,{icon:"fa-light fa-exclamation-triangle",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("This feature allows you to view the platform as a user with limited permissions. Your admin access will be temporarily restricted.")),1)])]),(0,s.bF)(Q,{"is-full-page":!1,active:V.isLoadingPermissions},null,8,["active"]),V.isLoadingPermissions?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("div",u,[(0,s.Lk)("div",{class:(0,n.C4)(["domain-section is-clickable",{"is-disabled":R.hasOtherPermissionsSelected}]),onClick:t[3]||(t[3]=(...e)=>R.toggleRegularUser&&R.toggleRegularUser(...e))},[(0,s.Lk)("div",m,[(0,s.bF)(O,{icon:"fa-light fa-user",class:"mr-2 has-text-grey"}),(0,s.Lk)("span",p,(0,n.v_)(e.$t("Regular user")),1)]),(0,s.bF)(B,{"model-value":R.isRegularUserSelected,disabled:R.hasOtherPermissionsSelected,size:"is-small",style:{margin:"0 !important"},onClick:t[1]||(t[1]=(0,a.D$)(()=>{},["stop"])),"onUpdate:modelValue":t[2]||(t[2]=e=>R.onRegularUserChange(e))},null,8,["model-value","disabled"])],2),R.hasLocalCenter?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,n.C4)(["domain-section",{"is-disabled":R.isRegularUserSelected}])},[(0,s.Lk)("div",h,[(0,s.bF)(O,{icon:"fa-light fa-shield-check",class:"mr-2 has-text-danger"}),(0,s.Lk)("span",g,(0,n.v_)(e.$t("Admin")),1)]),(0,s.Lk)("div",f,[R.hasLocalCenter&&R.hasParentLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:0,"model-value":R.isPermissionChecked("ADMIN_PARENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("ADMIN_PARENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[4]||(t[4]=e=>R.onPermissionChange("ADMIN_PARENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Regional")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0),(0,s.bF)(B,{"model-value":R.isPermissionChecked("ADMIN_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("ADMIN_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[5]||(t[5]=e=>R.onPermissionChange("ADMIN_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Local")),1)]),_:1},8,["model-value","disabled"])])],2)):(0,s.Q3)("",!0),(0,s.Lk)("div",{class:(0,n.C4)(["domain-section",{"is-disabled":R.isRegularUserSelected}])},[(0,s.Lk)("div",b,[(0,s.bF)(O,{icon:"fa-light fa-users",class:"mr-2 has-text-info"}),(0,s.Lk)("span",y,(0,n.v_)(e.$t("HR")),1)]),(0,s.Lk)("div",v,[(0,s.bF)(B,{"model-value":R.isPermissionChecked("HR_TENANT"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("HR_TENANT"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[6]||(t[6]=e=>R.onPermissionChange("HR_TENANT",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Organization")),1)]),_:1},8,["model-value","disabled"]),R.hasLocalCenter&&R.hasParentLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:0,"model-value":R.isPermissionChecked("HR_PARENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("HR_PARENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[7]||(t[7]=e=>R.onPermissionChange("HR_PARENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Regional")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0),R.hasLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:1,"model-value":R.isPermissionChecked("HR_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("HR_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[8]||(t[8]=e=>R.onPermissionChange("HR_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Local")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0)])],2),(0,s.Lk)("div",{class:(0,n.C4)(["domain-section",{"is-disabled":R.isRegularUserSelected}])},[(0,s.Lk)("div",k,[(0,s.bF)(O,{icon:"fa-light fa-user-group",class:"mr-2 has-text-info"}),(0,s.Lk)("span",C,(0,n.v_)(e.$t("HR Assistant")),1)]),(0,s.Lk)("div",L,[(0,s.bF)(B,{"model-value":R.isPermissionChecked("HR_ASSISTANT_TENANT"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("HR_ASSISTANT_TENANT"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[9]||(t[9]=e=>R.onPermissionChange("HR_ASSISTANT_TENANT",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Organization")),1)]),_:1},8,["model-value","disabled"]),R.hasLocalCenter&&R.hasParentLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:0,"model-value":R.isPermissionChecked("HR_ASSISTANT_PARENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("HR_ASSISTANT_PARENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[10]||(t[10]=e=>R.onPermissionChange("HR_ASSISTANT_PARENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Regional")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0),R.hasLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:1,"model-value":R.isPermissionChecked("HR_ASSISTANT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("HR_ASSISTANT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[11]||(t[11]=e=>R.onPermissionChange("HR_ASSISTANT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Local")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0)])],2),(0,s.Lk)("div",{class:(0,n.C4)(["domain-section",{"is-disabled":R.isRegularUserSelected}])},[(0,s.Lk)("div",w,[(0,s.bF)(O,{icon:"fa-light fa-coins",class:"mr-2 has-text-success"}),(0,s.Lk)("span",_,(0,n.v_)(e.$t("Financial")),1)]),(0,s.Lk)("div",E,[(0,s.bF)(B,{"model-value":R.isPermissionChecked("FINANCIAL_TENANT"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("FINANCIAL_TENANT"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[12]||(t[12]=e=>R.onPermissionChange("FINANCIAL_TENANT",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Organization")),1)]),_:1},8,["model-value","disabled"]),R.hasLocalCenter&&R.hasParentLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:0,"model-value":R.isPermissionChecked("FINANCIAL_PARENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("FINANCIAL_PARENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[13]||(t[13]=e=>R.onPermissionChange("FINANCIAL_PARENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Regional")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0),R.hasLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:1,"model-value":R.isPermissionChecked("FINANCIAL_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("FINANCIAL_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[14]||(t[14]=e=>R.onPermissionChange("FINANCIAL_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Local")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0)])],2),(0,s.Lk)("div",{class:(0,n.C4)(["domain-section",{"is-disabled":R.isRegularUserSelected}])},[(0,s.Lk)("div",$,[(0,s.bF)(O,{icon:"fa-light fa-calendar",class:"mr-2 has-text-warning"}),(0,s.Lk)("span",F,(0,n.v_)(e.$t("Events")),1)]),(0,s.Lk)("div",T,[(0,s.bF)(B,{"model-value":R.isPermissionChecked("EVENT_TENANT"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("EVENT_TENANT"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[15]||(t[15]=e=>R.onPermissionChange("EVENT_TENANT",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Organization")),1)]),_:1},8,["model-value","disabled"]),R.hasLocalCenter&&R.hasParentLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:0,"model-value":R.isPermissionChecked("EVENT_PARENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("EVENT_PARENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[16]||(t[16]=e=>R.onPermissionChange("EVENT_PARENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Regional")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0),R.hasLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:1,"model-value":R.isPermissionChecked("EVENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("EVENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[17]||(t[17]=e=>R.onPermissionChange("EVENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Local")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0)])],2),(0,s.Lk)("div",{class:(0,n.C4)(["domain-section",{"is-disabled":R.isRegularUserSelected}])},[(0,s.Lk)("div",S,[(0,s.bF)(O,{icon:"fa-light fa-megaphone",class:"mr-2 has-text-link"}),(0,s.Lk)("span",A,(0,n.v_)(e.$t("Communication")),1)]),(0,s.Lk)("div",P,[(0,s.bF)(B,{"model-value":R.isPermissionChecked("COMMUNICATION_TENANT"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("COMMUNICATION_TENANT"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[18]||(t[18]=e=>R.onPermissionChange("COMMUNICATION_TENANT",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Organization")),1)]),_:1},8,["model-value","disabled"]),R.hasLocalCenter&&R.hasParentLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:0,"model-value":R.isPermissionChecked("COMMUNICATION_PARENT_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("COMMUNICATION_PARENT_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[19]||(t[19]=e=>R.onPermissionChange("COMMUNICATION_PARENT_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Regional")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0),R.hasLocalCenter?((0,s.uX)(),(0,s.Wv)(B,{key:1,"model-value":R.isPermissionChecked("COMMUNICATION_LOCAL"),disabled:R.isRegularUserSelected||R.isPermissionEnforced("COMMUNICATION_LOCAL"),size:"is-small",style:{margin:"0 !important"},"onUpdate:modelValue":t[20]||(t[20]=e=>R.onPermissionChange("COMMUNICATION_LOCAL",e))},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Local")),1)]),_:1},8,["model-value","disabled"])):(0,s.Q3)("",!0)])],2)]),R.hasUserTypes&&R.availableUserTypes.length>0?((0,s.uX)(),(0,s.CE)("div",I,[(0,s.Lk)("p",M,[(0,s.bF)(O,{icon:"fa-light fa-id-badge",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("User Type"))+" ",1),(0,s.Lk)("span",x,(0,n.v_)(e.$t("(optional)")),1)]),(0,s.bF)(G,{modelValue:V.selectedUserTypeId,"onUpdate:modelValue":[t[21]||(t[21]=e=>V.selectedUserTypeId=e),R.onUserTypeChange],size:"is-small",expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("option",N,(0,n.v_)(e.$t("Keep current user type")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(R.availableUserTypes,e=>((0,s.uX)(),(0,s.CE)("option",{key:e.id,value:e.id},(0,n.v_)(e.name),9,U))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])])):(0,s.Q3)("",!0),(0,s.Lk)("div",D,[(0,s.bF)(W,{class:"is-rounded mr-2",onClick:R.close},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Cancel")),1)]),_:1},8,["onClick"]),(0,s.bF)(W,{type:"is-warning",class:"is-rounded",loading:V.isLoading,disabled:!R.canStartImpersonation,onClick:R.startImpersonation},{default:(0,s.k6)(()=>[(0,s.bF)(O,{icon:"fa-light fa-play",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Start Impersonation")),1)]),_:1},8,["loading","disabled","onClick"])])]))])])):(0,s.Q3)("",!0)])}i(44114),i(18111),i(22489),i(20116),i(61701),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const V={HR_TENANT:["HR_ASSISTANT_TENANT"],FINANCIAL_TENANT:["HR_ASSISTANT_TENANT"],HR_PARENT_LOCAL:["HR_ASSISTANT_PARENT_LOCAL"],FINANCIAL_PARENT_LOCAL:["HR_ASSISTANT_PARENT_LOCAL"],HR_LOCAL:["HR_ASSISTANT_LOCAL"],FINANCIAL_LOCAL:["HR_ASSISTANT_LOCAL"]},R=["HR_TENANT","HR_ASSISTANT_TENANT","FINANCIAL_TENANT","EVENT_TENANT","COMMUNICATION_TENANT","ADMIN_PARENT_LOCAL","HR_PARENT_LOCAL","HR_ASSISTANT_PARENT_LOCAL","FINANCIAL_PARENT_LOCAL","EVENT_PARENT_LOCAL","COMMUNICATION_PARENT_LOCAL","ADMIN_LOCAL","HR_LOCAL","HR_ASSISTANT_LOCAL","FINANCIAL_LOCAL","EVENT_LOCAL","COMMUNICATION_LOCAL","USER"];var O={name:"PermissionImpersonationSelector",data(){return{isVisible:!1,isLoading:!1,isLoadingPermissions:!1,selectedPermissions:[],availablePermissions:[],selectedUserTypeId:null,previousUserTypeId:null}},computed:{tenant(){return this.$store.state.tenant},hasLocalCenter(){return this.tenant?.settingFeatures?.localCenter?.isActive},hasParentLocalCenter(){return this.tenant?.settingFeatures?.localCenter?.hasParent},hasUserTypes(){return this.tenant?.settingFeatures?.users?.hasUserTypes},availableUserTypes(){return this.hasUserTypes&&this.tenant?.roles?this.tenant.roles.filter(e=>e.isUserType).sort((e,t)=>
1(e.position||0)-(t.position||0)):[]},selectedUserType(){return this.selectedUserTypeId?this.availableUserTypes.find(e=>e.id===this.selectedUserTypeId):null},userTypePermissions(){return this.selectedUserType&&this.selectedUserType.permissions?this.selectedUserType.permissions:[]},isRegularUserSelected(){return this.selectedPermissions.includes("USER")},hasOtherPermissionsSelected(){return this.selectedPermissions.some(e=>"USER"!==e)||this.userTypePermissions.length>0},enforcedPermissions(){const e=new Set;for(const i of this.userTypePermissions)e.add(i);const t=[...this.selectedPermissions,...this.userTypePermissions];for(const i of t){if("ADMIN_PARENT_LOCAL"===i)for(const t of R)!t.endsWith("_PARENT_LOCAL")&&!t.endsWith("_LOCAL")||t===i||t.startsWith("ADMIN")||e.add(t);else if("ADMIN_LOCAL"===i)for(const t of R)!t.endsWith("_LOCAL")||t.endsWith("_PARENT_LOCAL")||t===i||t.startsWith("ADMIN")||e.add(t);if(i.endsWith("_TENANT")){const t=i.replace("_TENANT","");this.hasParentLocalCenter&&e.add(t+"_PARENT_LOCAL"),this.hasLocalCenter&&e.add(t+"_LOCAL")}else if(i.endsWith("_PARENT_LOCAL")){const t=i.replace("_PARENT_LOCAL","");this.hasLocalCenter&&e.add(t+"_LOCAL")}if(V[i])for(const t of V[i])if(e.add(t),t.endsWith("_TENANT")){const i=t.replace("_TENANT","");this.hasParentLocalCenter&&e.add(i+"_PARENT_LOCAL"),this.hasLocalCenter&&e.add(i+"_LOCAL")}else if(t.endsWith("_PARENT_LOCAL")){const i=t.replace("_PARENT_LOCAL","");this.hasLocalCenter&&e.add(i+"_LOCAL")}}return e},effectivePermissions(){return new Set([...this.selectedPermissions,...this.enforcedPermissions])},canStartImpersonation(){return this.selectedPermissions.length>0||null!==this.selectedUserTypeId}},methods:{show(){this.isVisible=!0,this.selectedPermissions=[],this.selectedUserTypeId=null,this.previousUserTypeId=null,this.loadAvailablePermissions()},close(){this.isVisible=!1,this.$emit("close")},onRegularUserChange(e){this.selectedPermissions=e?["USER"]:this.selectedPermissions.filter(e=>"USER"!==e)},toggleRegularUser(){this.hasOtherPermissionsSelected||this.onRegularUserChange(!this.isRegularUserSelected)},onUserTypeChange(e){if(this.previousUserTypeId){const e=this.availableUserTypes.find(e=>e.id===this.previousUserTypeId);e&&e.permissions&&(this.selectedPermissions=this.selectedPermissions.filter(t=>!e.permissions.includes(t)))}if(e){const t=this.availableUserTypes.find(t=>t.id===e);if(t&&t.permissions&&t.permissions.length>0){this.selectedPermissions=this.selectedPermissions.filter(e=>"USER"!==e);for(const e of t.permissions)this.selectedPermissions.includes(e)||this.selectedPermissions.push(e)}}this.previousUserTypeId=e},isPermissionEnforced(e){return this.enforcedPermissions.has(e)},onPermissionChange(e,t){t?(this.selectedPermissions=this.selectedPermissions.filter(e=>"USER"!==e),this.selectedPermissions.includes(e)||this.selectedPermissions.push(e)):this.isPermissionEnforced(e)||(this.selectedPermissions=this.selectedPermissions.filter(t=>t!==e))},isPermissionChecked(e){return this.selectedPermissions.includes(e)||this.enforcedPermissions.has(e)},loadAvailablePermissions(){this.isLoadingPermissions=!0,this.$http.plain.get("/permission-impersonation/available-permissions").then(e=>{this.availablePermissions=e.data.map(e=>({value:e}))}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Failed to load available permissions"),type:"is-danger"})}).finally(()=>{this.isLoadingPermissions=!1})},getPermissionLabel(e){const t={HR_TENANT:"HR (Organization)",HR_PARENT_LOCAL:"HR (Regional)",HR_LOCAL:"HR (Local)",HR_ASSISTANT_TENANT:"HR Assistant (Organization)",HR_ASSISTANT_PARENT_LOCAL:"HR Assistant (Regional)",HR_ASSISTANT_LOCAL:"HR Assistant (Local)",FINANCIAL_TENANT:"Financial (Organization)",FINANCIAL_PARENT_LOCAL:"Financial (Regional)",FINANCIAL_LOCAL:"Financial (Local)",EVENT_TENANT:"Events (Organization)",EVENT_PARENT_LOCAL:"Events (Regional)",EVENT_LOCAL:"Events (Local)",COMMUNICATION_TENANT:"Communication (Organization)",COMMUNICATION_PARENT_LOCAL:"Communication (Regional)",COMMUNICATION_LOCAL:"Communication (Local)",ADMIN_LOCAL:"Admin (Local)",ADMIN_PARENT_LOCAL:"Admin (Regional)",USER:"Regular user",USER_LOCAL:"Regular user"};return t[e]||e},startImpersonation(){if(!this.canStartImpersonation)return void this.$buefy.toast.o
1pen({message:this.$t("Please select permissions or a user type with permissions"),type:"is-warning"});this.isLoading=!0;const e=[...this.effectivePermissions],t={permissions:e};this.selectedUserTypeId&&(t.userTypeId=this.selectedUserTypeId),this.$http.plain.post("/permission-impersonation/start",t).then(e=>{this.$store.commit("setPermissionImpersonation",{impersonatedPermissions:e.data.impersonatedPermissions,originalPermissions:this.$store.state.currentUser.permissions,expiresAt:e.data.expiresAt,impersonatedUserType:e.data.impersonatedUserType||null}),this.$buefy.toast.open({message:this.$t("Permission impersonation started"),type:"is-success"}),this.close(),window.location.reload()}).catch(e=>{console.error(e),this.$buefy.toast.open({message:e.response?.data?.detail||this.$t("Failed to start impersonation"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})}}},Q=i(66262);const B=(0,Q.A)(O,[["render",X],["__scopeId","data-v-3778e394"]]);var G=B},1521:function(e,t,i){"use strict";i.d(t,{A:function(){return J}});i(18111),i(22489);var s=i(20641),a=i(90033);const n={key:0},o={class:"welcome-card card"},l={class:"card-title"},r={class:"icon-text"},d={class:"icon is-small"},c={class:"has-text-weight-semibold"},u={key:0},m={key:0,class:"welcome-card card"},p={class:"card-title"},h={class:"icon-text"},g={class:"icon is-small"},f={class:"has-text-weight-semibold"},b={class:"welcome-card card"},y={class:"card-title mb-5-half"},v={class:"icon-text"},k={class:"icon is-small"},C={class:"has-text-weight-semibold"},L={class:"card-row"},w={class:"row-label"},_={key:0,class:"frequency-chips"},E=["onClick"],$={key:1,class:"has-text-grey"},F={class:"card-row"},T={class:"row-label"},S={class:"has-text-grey"},A={class:"card-row"},P={class:"row-label"},I={class:"has-text-grey"},M={class:"card-row"},x={class:"row-label"},N={class:"has-text-grey"},U={class:"card-row"},D={class:"row-label"},X={class:"has-text-grey"},V={key:0},R={key:1,class:"card-row"},O={class:"row-label"},Q={class:"has-text-grey"};function B(e,t,i,B,G,W){const j=(0,s.g2)("font-awesome-icon"),z=(0,s.g2)("b-switch");return i.item?((0,s.uX)(),(0,s.CE)("section",n,[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("span",r,[(0,s.Lk)("span",d,[(0,s.bF)(j,{icon:"fa-light fa-bolt"})]),(0,s.Lk)("span",c,(0,a.v_)(e.$t("pushNotificationSubscribed")),1)]),(0,s.bF)(z,{modelValue:i.item.isSubscribedPush,"onUpdate:modelValue":[t[0]||(t[0]=e=>i.item.isSubscribedPush=e),W.changeNotificationSubscription]},null,8,["modelValue","onUpdate:modelValue"])]),i.item.isSubscribedPush?((0,s.uX)(),(0,s.CE)("p",u,"* "+(0,a.v_)(e.$t("You need to activate push notification for Orgo also on your browser or mobile app")),1)):(0,s.Q3)("",!0)]),e.tenant.settingFeatures.newsletter.isActive?((0,s.uX)(),(0,s.CE)("div",m,[(0,s.Lk)("div",p,[(0,s.Lk)("span",h,[(0,s.Lk)("span",g,[(0,s.bF)(j,{icon:"fa-light fa-envelope"})]),(0,s.Lk)("span",f,(0,a.v_)(e.$t("Newsletter"))+" (email)",1)]),(0,s.bF)(z,{modelValue:i.item.isSubscribedNewsletter,"onUpdate:modelValue":[t[1]||(t[1]=e=>i.item.isSubscribedNewsletter=e),W.changeNotificationSubscription]},null,8,["modelValue","onUpdate:modelValue"])]),(0,s.Lk)("p",null,(0,a.v_)(e.$t("Informative messages from administrators directly sent by email without being posted as discussions"))+".",1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",b,[(0,s.Lk)("div",y,[(0,s.Lk)("span",v,[(0,s.Lk)("span",k,[(0,s.bF)(j,{icon:"fa-light fa-envelope"})]),(0,s.Lk)("span",C,(0,a.v_)(e.$t("Email notifications")),1)])]),(0,s.Lk)("div",L,[(0,s.bF)(j,{icon:"fa-light fa-comments"}),(0,s.Lk)("span",w,(0,a.v_)(e.$t("New discussion")),1),0!==i.item.isSubscribedDiscussion&&null!==i.item.isSubscribedDiscussion?((0,s.uX)(),(0,s.CE)("div",_,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(G.discussionOptions.filter(e=>e.value>0),t=>((0,s.uX)(),(0,s.CE)("button",{key:t.value,class:(0,a.C4)(["button is-small is-rounded",i.item.isSubscribedDiscussion===t.value?"is-success":"is-light"]),onClick:e=>W.setDiscussionFrequency(t.value)},(0,a.v_)(e.$t(t.label)),11,E))),128))])):((0,s.uX)(),(0,s.CE)("span",$,(0,a.v_)(e.$t("Disabled")),1)),(0,s.bF)(z,{modelValue:W.eDiscussionEnabled,"onUpdate:modelValue":[t[2]||(t[2]=e=>W.eDiscussionEnabled=e),W.toggleDiscussionNotification],class:"mr-0"},null,8,["modelValue","onUpdate:modelValue"])]),t[8]||(t[8]=(0,s.Lk)("hr",null,null,-1)),(0,s.Lk)("div",F,[(0,s.bF)(j,{icon:"fa-light fa-calendar"}),(0,s.Lk)("span",T,(0,a.v_)(e.$t("New event")),1),(0,s.Lk)("span",S,(0,a.v_)(i.item.isSubscribedEvent?e.$t("Instant"):e.$t("Disabled")),1),(0,s.bF)(z,{modelValue:i.item.isSubscribedEvent,"onUpdate:modelValue":[t[3]||(t[3]=e=>i.item.isSubscribedEvent=e),W.changeNotificationSubscription],class:"mr-0"},null,8,["modelValue","onUpdate:modelValue"])]),t[9]||(t[9]=(0,s.Lk)("hr",null,null,-1)),(0,s.Lk)("div",A,[(0,s.bF)(j,{icon:"fa-light fa-comment"}),(0,s.Lk)("span",P,(0,a.v_)(e.$t("Comment on my post")),1),(0,s.Lk)("span",I,(0,a.v_)(i.item.isSubscribedComment?e.$t("Instant"):e.$t("Disabled")),1),(0,s.bF)(z,{modelValue:i.item.isSubscribedComment,"onUpdate:modelValue":[t[4]||(t[4]=e=>i.item.isSubscribedComment=e),W.changeNotificationSubscription],class:"mr-0"},null,8,["modelValue","onUpdate:modelValue"])]),t[10]||(t[10]=(0,s.Lk)("hr",null,null,-1)),(0,s.Lk)("div",M,[(0,s.bF)(j,{icon:"fa-light fa-list-check"}),(0,s.Lk)("span",x,(0,a.v_)(e.$t("Task")),1),(0,s.Lk)("span",N,(0,a.v_)(i.item.isSubscribedIssue?e.$t("Instant"):e.$t("Disabled")),1),(0,s.bF)(z,{modelValue:i.item.isSubscribedIssue,"onUpdate:modelValue":[t[5]||(t[5]=e=>i.item.isSubscribedIssue=e),W.changeNotificationSubscription],class:"mr-0"},null,8,["modelValue","onUpdate:modelValue"])]),t[11]||(t[11]=(0,s.Lk)("hr",null,null,-1)),(0,s.Lk)("div",U,[(0,s.bF)(j,{icon:"fa-light fa-at"}),(0,s.Lk)("span",D,(0,a.v_)(e.$t("Mentions")),1),(0,s.Lk)("span",X,(0,a.v_)(i.item.isSubscribedTag?e.$t("Instant"):e.$t("Disabled")),1),(0,s.bF)(z,{modelValue:i.item.isSubscribedTag,"onUpdate:modelValue":[t[6]||(t[6]=e=>i.item.isSubscribedTag=e),W.changeNotificationSubscription],class:"mr-0"},null,8,["modelValue","onUpdate:modelValue"])]),e.tenant.settingFeatures.voting.isActive?((0,s.uX)(),(0,s.CE)("hr",V)):(0,s.Q3)("",!0),e.tenant.settingFeatures.voting.isActive?((0,s.uX)(),(0,s.CE)("div",R,[(0,s.bF)(j,{icon:"fa-light fa-ballot-check"}),(0,s.Lk)("span",O,(0,a.v_)(e.$t("Voting / Polls")),1),(0,s.Lk)("span",Q,(0,a.v_)(i.item.isSubscribedVote?e.$t("Instant"):e.$t("Disabled")),1),(0,s.bF)(z,{modelValue:i.item.isSubscribedVote,"onUpdate:modelValue":[t[7]||(t[7]=e=>i.item.isSubscribedVote=e),W.changeNotificationSubscription],class:"mr-0"},null,8,["modelValue","onUpdate:modelValue"])])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)}var G=i(40834),W=i(61273),j={props:["item","save","isOnboarding"],data(){return{discu
1ssionOptions:[{value:0,label:"Disabled"},{value:1,label:"Instant"},{value:2,label:"Daily"},{value:3,label:"Weekly"}]}},mounted(){},created(){this.initFields()},methods:{setDiscussionFrequency(e){this.item.isSubscribedDiscussion=e,this.changeNotificationSubscription()},toggleDiscussionNotification(e){this.item.isSubscribedDiscussion=e?1:0,this.changeNotificationSubscription()},initFields(){let e=!1;const t=e=>1===e||"instant"===e?1:2===e||"daily"===e?2:3===e||"weekly"===e?3:0===e||"disabled"===e||!1===e?0:!0===e?1:0,i=e=>1===e||"instant"===e||!0===e;if("OnBoardingUser"===this.$route.name){if(void 0===this.item.isSubscribedEvent||null===this.item.isSubscribedEvent){const t=this.tenant.settingFeatures.notification.defaultEmailEvent;this.item.isSubscribedEvent=i(t),e=!0}if(void 0===this.item.isSubscribedDiscussion||null===this.item.isSubscribedDiscussion){const i=this.tenant.settingFeatures.notification.defaultEmailDiscussion;this.item.isSubscribedDiscussion=t(i),e=!0}if(void 0===this.item.isSubscribedComment||null===this.item.isSubscribedComment){const t=this.tenant.settingFeatures.notification.defaultEmailComment;this.item.isSubscribedComment=i(t),e=!0}if(void 0===this.item.isSubscribedIssue||null===this.item.isSubscribedIssue){const t=this.tenant.settingFeatures.notification.defaultEmailIssue;this.item.isSubscribedIssue=i(t),e=!0}if(void 0===this.item.isSubscribedTag||null===this.item.isSubscribedTag){const t=this.tenant.settingFeatures.notification.defaultEmailTag;this.item.isSubscribedTag=i(t),e=!0}void 0!==this.item.isSubscribedPush&&null!==this.item.isSubscribedPush||(this.item.isSubscribedPush=this.tenant.settingFeatures.notification.defaultPush??!0,e=!0),void 0!==this.item.isSubscribedNewsletter&&null!==this.item.isSubscribedNewsletter||(this.item.isSubscribedNewsletter=this.tenant.settingFeatures.notification.defaultNewsletter??!0,e=!0)}e&&this.changeNotificationSubscription()},changeNotificationSubscription(){this.$http.plain.patch(this.APIPutRoute,{isSubscribedNewsletter:this.item.isSubscribedNewsletter,isSubscribedPush:this.item.isSubscribedPush,isSubscribedDiscussion:this.item.isSubscribedDiscussion,isSubscribedEvent:this.item.isSubscribedEvent,isSubscribedComment:this.item.isSubscribedComment,isSubscribedIssue:this.item.isSubscribedIssue,isSubscribedVote:this.item.isSubscribedVote,isSubscribedTag:this.item.isSubscribedTag}).then(e=>this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})).catch(e=>console.log(e))}},computed:{...(0,G.L8)(["user","tenant","isGranted"]),APIPutRoute(){return this.user.id===this.item.id?"/profile-update/"+this.item.id:"/users/"+this.item.id},eDiscussionEnabled(){return 0!==this.item.isSubscribedDiscussion&&null!==this.item.isSubscribedDiscussion}},components:{FontAwesomeIcon:W.gc}},z=i(66262);const q=(0,z.A)(j,[["render",B],["__scopeId","data-v-45848243"]]);var J=q},2321:function(e,t,i){"use strict";i.d(t,{J4:function(){return m},q6:function(){return p}});i(44114),i(18111),i(7588);var s=i(13489),a=i(94335),n=i(43464),o=i(95093),l=i.n(o);let r=[];const d=(0,s.hU)({legacy:!1,locale:n.M.state.locale,fallbackLocale:"en",missingWarn:!1,fallbackWarn:!1,messages:{}});function c(e){return d.global.locale.value=e,n.M.state.locale=e,a.A.defaults.headers.common["Accept-Language"]=e,document.querySelector("html").setAttribute("lang",e),l().locale(e),e}function u(e,t){if(n.M.state.tenant&&n.M.state.tenant.settingLabel){const i=n.M.state.tenant.settingLabel;Object.entries(i).forEach(([i,s])=>{if(!s||"object"!==typeof s)return;const a=s[e];"string"===typeof a&&""!==a.trim()&&(t[i]=a)})}return!1===n.M.state.tenant?.settingFeatures?.localCenter?.showLcPrefix&&(t["LP"]="",t["LC"]=""),t}async function m(e,t=!1){if(d.global.locale.value!==e||t){if(r.includes(e))await p(e);else try{const t=await i(63958)(`./${e}.json`);let s={...t.default};s=u(e,s),d.global.setLocaleMessage(e,s),r.push(e)}catch(s){return console.error(`Error loading ${e} translations:`,s),window.__orgoReportError&&window.__orgoReportError({type:"I18nChunkError",message:`translations ${e} failed: ${s&&s.message}`}),Promise.reject(s)}return c(e)}return await p(e),e}async function p(e=d.global.locale.value){try{const t=await i(63958)(`./${e}.json`);let s={...t.default};s=u(e,s),d.global.setLocaleMessage(e,s)}catch(t){console.error("Error refreshing translations:",t)}}t.Ay=d,m(n.M.state.locale,!0).then(()=>{}).catch(e=>console.error(e))},2594:function(e,t,i){"use strict";i.d(t,{A:function(){return v}});var s=i(20641),a=i(90033),n=i(53751);const o={style:{color:"#eee"}},l={key:0,class:"contact-initials"},r={key:0,class:"image-hint-message is-size-7"},d={class:"is-small"};function c(e,t,i,c,u,m){const p=(0,s.g2)("b-loading"),h=(0,s.g2)("font-awesome-icon"),g=(0,s.g2)("ImageUploadCropper"),f=(0,s.g2)("b-upload"),b=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["card-image-profile",{"is-tenant-slot":"tenant"===m.type,"is-square-slot":i.isTenantLogoSquare||i.isTenantLogoSquareDark,"is-small-slot":"small"===i.size}]),onMouseenter:t[7]||(t[7]=e=>u.showImageButton=!0),onMouseleave:t[8]||(t[8]=e=>u.showImageButton=!1)},[(0,s.bF)(p,{modelValue:u.isUploadingImage,"onUpdate:modelValue":t[0]||(t[0]=e=>u.isUploadingImage=e),"is-full-page":!1},null,8,["modelValue"]),"newsletter"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(u.image?"bg-photo-event-cover":"bg-photo-event-no-cover p-6"),style:(0,a.Tr)({"background-image":m.imageCSS()})},null,6)):"event"===m.type&&u.image?((0,s.uX)(),(0,s.CE)("div",{key:1,class:"bg-photo-event-cover",style:(0,a.Tr)({"background-image":m.imageCSS()})},null,4)):"event"!==m.type||u.image?"product"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:3,class:"bg-photo-product",style:(0,a.Tr)({"background-image":m.imageCSS()})},null,4)):"widget"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:4,class:"bg-photo-widget",style:(0,a.Tr)({"background-image":m.imageCSS()})},null,4)):"course"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:5,class:"bg-photo-course",style:(0,a.Tr)({"background-image":m.imageCSS()})},null,4)):"group"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:6,class:"bg-photo bg-group",style:(0,a.Tr)({"background-image":m.imageCSS()})},null,4)):"tenant"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:7,class:(0,a.C4)(["bg-group-tenant",{"bg-tenant-logo-color-light":!i.isTenantLogoDark&&!i.isTenantLogoSquareDark&&!i.isTenantAuthImage,"bg-tenant-logo-color-dark":i.isTenantLogoDark||i.isTenantLogoSquareDark,"bg-tenant-auth":i.isTenantAuthImage,"is-small":"small"===i.size}]),style:(0,a.Tr)({"background-image":m.imageCSS()})},null,6)):"contact"===m.type?((0,s.uX)(),(0,s.CE)("div",{key:8,class:"bg-photo bg-contact",style:(0,a.Tr)({"background-image":m.imageCSS(),"background-color":m.getContactBackgroun
1dColor()})},[u.image?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",l,(0,a.v_)(m.getContactInitials()),1))],4)):((0,s.uX)(),(0,s.CE)("div",{key:9,class:"bg-photo",style:(0,a.Tr)({"background-image":m.imageCSS()})},null,4)):((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,a.C4)(["event-cover-gradient","cover-gradient-"+m.eventGradientIndex])},[(0,s.Lk)("p",null,[(0,s.Lk)("span",o,[(0,s.bF)(h,{icon:"fa-light fa-calendar",style:{height:"100px"}})])])],2)),(0,s.Lk)("div",{class:(0,a.C4)(["image-edit-buttons",{"is-contact":"contact"===m.type}]),onClick:t[6]||(t[6]=(0,n.D$)(()=>{},["stop"]))},[i.hintMessage&&u.showImageButton?((0,s.uX)(),(0,s.CE)("p",r,(0,a.v_)(i.hintMessage),1)):(0,s.Q3)("",!0),"user"!==m.type||i.disableUpload?"badge"!==m.type&&"badgetype"!==m.type||i.disableUpload?"event"!==m.type||i.disableUpload?(e.isGrantedOwner(i.item)||"product"===m.type||"contact"===m.type||"widget"===m.type||"newsletter"===m.type||"group"===m.type&&e.isCurrentGroupAdmin)&&!i.disableUpload?(0,s.bo)(((0,s.uX)(),(0,s.Wv)(b,{key:4,class:"file"},{default:(0,s.k6)(()=>[(0,s.bF)(f,{modelValue:u.imageFile,"onUpdate:modelValue":[t[1]||(t[1]=e=>u.imageFile=e),m.uploadImage],accept:"image/png, image/jpeg"},{default:(0,s.k6)(()=>["contact"===m.type?((0,s.uX)(),(0,s.CE)("a",{key:0,class:(0,a.C4)(["button is-primary is-small is-rounded px-2",{"is-loading":e.$store.state.isLoadingButton}])},[(0,s.Lk)("span",d,[(0,s.bF)(h,{icon:"fa-light fa-camera"})])],2)):"newsletter"===m.type?((0,s.uX)(),(0,s.CE)("a",{key:1,class:(0,a.C4)(["button is-light is-rounded is-small",{"is-loading":e.$store.state.isLoadingButton}])},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Upload")),1)],2)):((0,s.uX)(),(0,s.CE)("a",{key:2,class:(0,a.C4)(["button is-primary is-rounded is-small",{"is-loading":e.$store.state.isLoadingButton}])},[(0,s.Lk)("span",null,(0,a.v_)(e.$t(u.image?"changeImage":"Add image")),1)],2))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1},512)),[[n.aG,u.showImageButton||!u.image]]):!e.isGrantedOwner(i.item)&&!e.isGranted("ADMIN_TENANT")&&"course"!==m.type||i.disableUpload?(0,s.Q3)("",!0):(0,s.bo)(((0,s.uX)(),(0,s.Wv)(b,{key:5,class:"file"},{default:(0,s.k6)(()=>[(0,s.bF)(f,{modelValue:u.imageFile,"onUpdate:modelValue":[t[2]||(t[2]=e=>u.imageFile=e),m.uploadImage],accept:"image/png, image/jpeg"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-primary is-rounded is-small",{"is-loading":e.$store.state.isLoadingButton}])},[(0,s.Lk)("span",null,(0,a.v_)(e.$t(u.image?"changeImage":"Upload")),1)],2)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1},512)),[[n.aG,u.showImageButton||!u.image]]):((0,s.uX)(),(0,s.Wv)(g,{key:3,"initial-image":u.image,type:m.type,"show-button":u.showImageButton||!u.image,"is-loading":e.$store.state.isLoadingButton,"border-radius":12,onUpload:m.uploadImage},null,8,["initial-image","type","show-button","is-loading","onUpload"])):((0,s.uX)(),(0,s.Wv)(g,{key:2,"initial-image":u.image,type:m.type,"show-button":u.showImageButton||!u.image,"is-loading":e.$store.state.isLoadingButton,"border-radius":9999,onUpload:m.uploadImage},null,8,["initial-image","type","show-button","is-loading","onUpload"])):((0,s.uX)(),(0,s.Wv)(g,{key:1,"initial-image":u.image,type:m.type,"show-button":u.showImageButton||!u.image,"is-loading":e.$store.state.isLoadingButton,onUpload:m.uploadImage},null,8,["initial-image","type","show-button","is-loading","onUpload"])),"product"===m.type&&u.image&&!i.disableUpload?(0,s.bo)(((0,s.uX)(),(0,s.Wv)(b,{key:6,class:"file"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-danger is-rounded is-small",{"is-loading":u.isRemovingImage}]),onClick:t[3]||(t[3]=(...e)=>m.removeProductImage&&m.removeProductImage(...e))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove image")),1)],2)]),_:1},512)),[[n.aG,u.showImageButton]]):(0,s.Q3)("",!0),"course"===m.type&&u.image&&!i.disableUpload?(0,s.bo)(((0,s.uX)(),(0,s.Wv)(b,{key:7,class:"file"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-danger is-rounded is-small",{"is-loading":u.isRemovingImage}]),onClick:t[4]||(t[4]=(...e)=>m.removeCourseImage&&m.removeCourseImage(...e))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove image")),1)],2)]),_:1},512)),[[n.aG,u.showImageButton]]):(0,s.Q3)("",!0),"widget"===m.type&&u.image&&!i.disableUpload?(0,s.bo)(((0,s.uX)(),(0,s.Wv)(b,{key:8,class:"file"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-danger is-rounded is-small",{"is-loading":u.isRemovingImage}]),onClick:t[5]||(t[5]=(...e)=>m.removeWidgetImage&&m.removeWidgetImage(...e))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove image")),1)],2)]),_:1},512)),[[n.aG,u.showImageButton]]):(0,s.Q3)("",!0)],2)],34)}var u=i(28782),m=i(40834),p=i(95256),h=i(10630),g=i(43464),f={components:{ImageUploadCropper:h.A},props:["item","emptyImage","dynamicImageFile","isTenantLogoSquare","isTenantLogoSquareDark","isTenantLogoDark","isTenantAuthImage","disableUpload","format","isMetaGraph","hintMessage","size"],data(){return{isUploadingImage:!1,showImageButton:!1,imageFile:null,image:this.item?.logo?this.item.logo:null,isRemovingImage:!1}},created(){this.initializeImage()},computed:{...(0,m.L8)(["isGranted","user","tenant","isGrantedOwner","isCurrentGroupAdmin"]),eventGradientIndex(){return(0,p.F0)(this.item?.name)},type(){return"RoleGroup"===this.item?.["@type"]?"unit":this.item?.["@type"]?this.item["@type"].toLowerCase():"user"}},watch:{dynamicImageFile:function(){this.imageFile=this.dynamicImageFile,this.uploadImage()}},methods:{stringToColour:p.ly,initializeImage(){"newsletter"===this.type&&(this.image=this.item.publicPreviewLogo),"course"===this.type&&(this.image=this.item.thumbnail),"widget"===this.type&&(this.image=this.item.heroImage),this.isTenantLogoSquare&&(this.image=this.item?.logoSquare??null),this.isTenantLogoSquareDark&&(this.image=this.item?.logoSquareDark??null),this.isTenantLogoDark&&(this.image=this.item?.logoDark??this.item?.logo??null),this.isTenantAuthImage&&(this.image=this.item?.authImage??null)},getContactInitials(){return this.item&&this.item.name?this.item.name.slice(0,2).toUpperCase():""}
1,getContactBackgroundColor(){return!this.image&&this.item&&this.item.name?this.stringToColour(this.item.name):"transparent"},getEventTypeColor(e){return e&&e.color?(0,p.eD)(e.color,"dark"===this.$store.state.theme):""},imageCSS(){if("demo"===this.image||this.image&&this.image.includes("/demo?"))return"url(https://picsum.photos/id/"+(this.item.id%1e3+1)+"/600/600.jpg)";if("demo_f"===this.image)return"url(https://randomuser.me/api/portraits/women/"+this.item.id%100+".jpg)";if("demo_m"===this.image)return"url(https://randomuser.me/api/portraits/men/"+this.item.id%100+".jpg)";if(this.image&&this.image.includes("/demo?"))return"url(https://picsum.photos/600/300?random="+this.image+")";if(this.image&&this.image.includes("demo__"))return"url("+this.image.replace("demo__","")+")";if(this.image&&this.image.includes("https"))return"url("+this.image+")";if("user"===this.type&&this.image&&this.image.includes("defaults/"))return"url("+u.ze+u.DJ+this.image+")";if("event"===this.type)return"url("+u.hd+u.DJ+"event_public/"+this.image+")";if(this.isTenantAuthImage&&!this.image)return"none";
1if("tenant"===this.type&&!this.image)return"url("+u.ze+u.DJ+"defaults/orgo-square.svg)";if("newsletter"===this.type&&this.item.publicPreviewLogo)return"url("+u.ze+u.DJ+"newsletter/"+this.item.publicPreviewLogo+")";if(this.isMetaGraph)return"url("+u.ze+u.DJ+this.type+"/"+this.item.metaGraphImage+")";if(this.image){let e=this.type;return"rolegroup"===e&&(e="unit"),"course"===e?"url("+u.ze+u.DJ+"course/"+this.image+")":"widget"===e?"url("+u.ze+u.DJ+"widget/"+this.image+")":"url("+u.ze+u.DJ+e+"/"+this.image+")"}return this.emptyImage?"url("+this.emptyImage+")":"contact"===this.type?"none":"url("+u.ze+u.DJ+"defaults/"+this.type+".png)"},uploadImage(e){if(!e)return;const t=new FormData;t.append("file",e),t.append("type",this.type),t.append("entity_id",this.item.id),this.isMetaGraph&&t.append("is_meta_graph",this.isMetaGraph),this.isTenantLogoSquare&&t.append("isTenantLogoSquare",!0),this.isTenantLogoSquareDark&&t.append("isTenantLogoSquareDark",!0),this.isTenantLogoDark&&t.append("isTenantLogoDark",!0),this.isTenantAuthImage&&t.append("isTenantAuthImage",!0),this.isUploadingImage=!0,this.$http.plain.post("/media_objects",t,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>{this.image=e.data.contentUrl;let t=this.image;if("widget"===this.type&&this.image){const e=this.image.match(/media\/widget\/([^?]+)/);e&&(t=e[1])}if("user"===this.type&&this.item.id===this.user.id){const e={...this.item,logo:this.image};g.M.commit("setCurrentUser",e),this.$emit("user-photo-uploaded")}"tenant"===this.type&&this.isTenantAuthImage?(this.image=u.ze+u.DJ+"tenant/"+e.data.contentUrl,t=this.image):"tenant"===this.type&&this.item.id===this.tenant.id&&(this.isTenantLogoSquare?this.$store.commit("setTenantLogoSquare",this.image):this.isTenantLogoSquareDark?this.$store.commit("setTenantLogoSquareDark",this.image):this.isTenantLogoDark?this.$store.commit("setTenantLogoDark",this.image):(this.tenant.logoSquare||this.$store.commit("setTenantLogoSquare",this.image),this.tenant.logoSquareDark||this.$store.commit("setTenantLogoSquareDark",this.image),this.tenant.logoDark||this.$store.commit("setTenantLogoDark",this.image),this.$store.commit("setTenantLogo",this.image))),"badge"!==this.type&&"badgetype"!==this.type||this.$buefy.toast.open({message:this.$t("imageSavedSuccessfully"),type:"is-success",duration:3e3}),this.$emit("update:modelValue",t)}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Upload failed"),type:"is-danger",duration:5e3})}).finally(()=>{this.imageFile=null,this.isUploadingImage=!1})},removeProductImage(){this.isRemovingImage=!0,this.$http.plain.patch("/products/"+this.item.uuid,{logo:null}).then(e=>{this.image=null,this.$emit("update:modelValue",this.image)}).catch(e=>{console.error(e)}).finally(()=>{this.isRemovingImage=!1})},removeCourseImage(){this.isRemovingImage=!0,this.$http.plain.patch("/courses/"+this.item.uuid,{thumbnail:null}).then(e=>{this.image=null,this.$emit("update:modelValue",this.image)}).catch(e=>{console.error(e)}).finally(()=>{this.isRemovingImage=!1})},removeWidgetImage(){this.isRemovingImage=!0,this.$http.plain.patch("/widgets/"+this.item.uuid,{heroImage:null}).then(e=>{this.image=null,this.$emit("update:modelValue",this.image)}).catch(e=>{console.error(e)}).finally(()=>{this.isRemovingImage=!1})}}},b=i(66262);const y=(0,b.A)(f,[["render",c],["__scopeId","data-v-72837188"]]);var v=y},3095:function(e,t,i){"use strict";i.d(t,{E4:function(){return a.E4},HD:function(){return l},Hv:function(){return A},I4:function(){return _},Mu:function(){return n},NI:function(){return $},O5:function(){return T},TV:function(){return I},Tl:function(){return S},_m:function(){return C},c6:function(){return a.c6},dg:function(){return U},ku:function(){return P},m3:function(){return f},nb:function(){return F},q$:function(){return a.q$},tF:function(){return o}});var s=i(50953),a=i(60253);const n="midnight",o=["default","warm","sage","lavender","rose","sand"],l=["gray","graphite","midnight","forest","amber","ruby","plum"],r=[...o,...l],d="orgo.chrome.preset",c="orgo.chrome.hue",u="orgo.chrome.tone",m="orgo.chrome.palette",p="orgo.chrome.paletteVars",h=[...r,...a.mJ];let g=null;function f(e){return g=e&&(0,a.vZ)(e)?e:null,g?localStorage.setItem(m,JSON.stringify(g)):(localStorage.removeItem(m),localStorage.removeItem(p)),g}function b(){if(g)return g;try{const e=localStorage.getItem(m),t=e?(0,a.fY)(JSON.parse(e)):null;g=t&&(0,a.vZ)(t)?t:null}catch{g=null}return g}function y(e,t){try{localStorage.setItem(p,JSON.stringify({light:(0,a.Lf)(e,{tone:t,darkMode:!1}),dark:(0,a.Lf)(e,{tone:t,darkMode:!0})}))}catch{}}function v(e){return(0,a.q$)(e)?"dark"===(0,a.gI)(e,b()):l.includes(e)}function k(e){e&&h.includes(e)?document.documentElement.setAttribute("data-chrome",e):document.documentElement.removeAttribute("data-chrome")}const C=(0,s.Kh)({tone:localStorage.getItem(u)||"light"});function L(e){C.tone="dark"===e?"dark":"light","dark"===e?document.documentElement.setAttribute("data-chrome-tone","dar
1k"):document.documentElement.removeAttribute("data-chrome-tone")}function w(e){"number"===typeof e&&e>=0&&e<=360?document.documentElement.style.setProperty("--orgo-mono-hue",String(e)):document.documentElement.style.removeProperty("--orgo-mono-hue")}function _(e){if((0,a.q$)(e)){const t=b();if(!t)return void _(n);const i=(0,a.gI)(e,t),s="dark"===i?a.c6:a.E4;return(0,a.n_)(t,i),L(i),y(t,i),localStorage.setItem(d,s),localStorage.setItem(u,i),void localStorage.removeItem(c)}const t=v(e)?"dark":"light";(0,a.Ug)(),k(e),L(t),document.documentElement.style.removeProperty("--orgo-mono-hue"),e?(localStorage.setItem(d,e),localStorage.setItem(u,t)):(localStorage.removeItem(d),localStorage.removeItem(u)),localStorage.removeItem(c)}function E(e,t){(0,a.Ug)(),k(null),L(t),w(e),localStorage.removeItem(d),"number"===typeof e?(localStorage.setItem(c,String(e)),localStorage.setItem(u,t)):(localStorage.removeItem(c),localStorage.removeItem(u))}function $(e){E(e,"light")}function F(e){E(e,"dark")}function T(){return localStorage.getItem(d)}function S(){const e=localStorage.getItem(c);return null===e?null:Number(e)}function A(){return localStorage.getItem(u)||"light"}function P(){const e=T();if((0,a.q$)(e)&&b())return void _(e);const t=S(),i=A();if(null!==t&&!Number.isNaN(t))return w(t),void L(i);e&&(k(e),L(v(e)?"dark":"light"))}function I(e){null===e||void 0===e?_(null):"number"===typeof e?$(e):_(e)}const M=769;function x(){return"undefined"!==typeof window&&window.innerWidth<M}function N({user:e,tenant:t,isMobile:i}){const s=Boolean((0,a.qC)(t)),o=e=>(0,a.q$)(e)?s:r.includes(e),l=i?e?.notificationSettings?.mobileTheme:e?.notificationSettings?.desktopTheme;if(l&&o(l))return l;const d=t?.settingFeatures?.general?.theme;return d&&o(d)?d:n}function U(e,t){f((0,a.qC)(t));const i=N({user:e,tenant:t,isMobile:x()}),s=T(),n=S();return null!==n||(s!==i||(0,a.q$)(i))&&_(i),i}},3694:function(e,t,i){"use strict";i.d(t,{A:function(){return J}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"event-ticket-selector"},l={key:0,class:"notification is-info is-light mb-4 is-rounded"},r={key:1,class:"ticket-price-list mb-4"},d=["data-price-id","onClick"],c={key:0,class:"ticket-price-checkbox"},u=["disabled","onClick"],m={class:"qty-value"},p=["disabled","onClick"],h={class:"ticket-price-info"},g={class:"ticket-header-row"},f={class:"ticket-price-name"},b={class:"ticket-price-amount"},y={class:"ticket-price-value"},v={key:0,class:"ticket-header-extras"},k={key:0,class:"ticket-badges"},C={key:0,class:"ticket-badge is-members"},L={key:1,class:"ticket-badge is-personal-match"},w={key:2,class:"ticket-badge is-already-held"},_={class:"ticket-description-content"},E={key:0,class:"ticket-description-fade"},$=["onClick"],F={key:2,class:"upcoming-tickets-section mb-4"},T={class:"has-text-weight-semibold mb-3 has-text-grey is-size-7"},S={class:"is-flex is-justify-content-space-between is-align-items-center is-flex-wrap-wrap"},A={class:"has-text-weight-semibold has-text-grey"},P={key:0,class:"ml-2 has-text-grey"},I={class:"tag is-light is-rounded is-small"},M={key:3,class:"expired-tickets-section mb-4"},x={class:"has-text-weight-semibold mb-3 has-text-grey is-size-7"},N={class:"is-flex is-justify-content-space-between is-align-items-center is-flex-wrap-wrap"},U={class:"has-text-weight-semibold has-text-grey-light line-through"},D={key:0,class:"ml-2 has-text-grey-light"},X={class:"tag is-light is-rounded is-small"};function V(e,t,i,V,R,O){const Q=(0,s.g2)("font-awesome-icon"),B=(0,s.g2)("EventCapacityIndicator");return(0,s.uX)(),(0,s.CE)("div",o,[0===i.currentTickets.length&&i.upcomingTickets.length>0?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("p",null,[(0,s.bF)(Q,{icon:"fa-light fa-calendar-clock"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Ticket sales start on"))+" ",1),(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.format(O.nextUpcomingTicket.validFrom,"longDateTime")),1)])])):(0,s.Q3)("",!0),i.currentTickets.length>0?((0,s.uX)(),(0,s.CE)("div",r,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.currentTickets,o=>((0,s.uX)(),(0,s.CE)("div",{key:o.id,class:(0,a.C4)(["ticket-price-row",{"is-selected":O.isTicketSelected(o.id),"is-selectable":!("members"===o.isRestricted&&!i.isLoggedIn)&&!O.isTicketSoldOut(o.id)&&!O.isRowLockedAsHeld(o),"is-disabled":"members"===o.isRestricted&&!i.isLoggedIn||O.isTicketSoldOut(o.id)||O.isRowLockedAsHeld(o)}]),"data-price-id":o.id,onClick:e=>
1!i.multiSelect&&O.selectTicket(o)},[i.multiSelect?((0,s.uX)(),(0,s.CE)("span",{key:1,class:"ticket-quantity-picker",onClick:t[0]||(t[0]=(0,n.D$)(()=>{},["stop"]))},[(0,s.Lk)("button",{type:"button",class:"qty-btn",disabled:0===O.getQuantity(o.id)||O.isTicketSoldOut(o.id),onClick:e=>O.decrementQuantity(o)},[(0,s.bF)(Q,{icon:"fa-light fa-minus"})],8,u),(0,s.Lk)("span",m,(0,a.v_)(O.getQuantity(o.id)),1),(0,s.Lk)("button",{type:"button",class:"qty-btn",disabled:!O.canIncrement(o),onClick:e=>O.incrementQuantity(o)},[(0,s.bF)(Q,{icon:"fa-light fa-plus"})],8,p)])):((0,s.uX)(),(0,s.CE)("span",c,[i.modelValue===o.id?((0,s.uX)(),(0,s.Wv)(Q,{key:0,icon:"fa-light fa-circle-check",class:"has-text-success"})):((0,s.uX)(),(0,s.Wv)(Q,{key:1,icon:"fa-light fa-circle",class:"ticket-price-checkbox-inactive"}))])),(0,s.Lk)("div",h,[(0,s.Lk)("div",g,[(0,s.Lk)("div",f,(0,a.v_)(o.name),1),(0,s.Lk)("div",b,[(0,s.Lk)("span",y,(0,a.v_)(e.$filters.money(o.price,o.currency)),1)])]),O.getTicketAvailabilityStatus(o.id)||"members"===o.isRestricted||O.getTimeUntilExpiry(o)?((0,s.uX)(),(0,s.CE)("div",v,[(0,s.bF)(B,{"availability-status":O.getTicketAvailabilityStatus(o.id),"availability-count":O.getTicketAvailabilityCount(o.id)},null,8,["availability-status","availability-count"]),"members"===o.isRestricted||O.getTimeUntilExpiry(o)?((0,s.uX)(),(0,s.CE)("span",k,["members"===o.isRestricted?((0,s.uX)(),(0,s.CE)("span",C,[(0,s.bF)(Q,{icon:"fa-light fa-user-check",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("members only")),1)])):(0,s.Q3)("",!0),o._isPersonalMatch?((0,s.uX)(),(0,s.CE)("span",L,[(0,s.bF)(Q,{icon:"fa-light fa-sparkles",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("just for you")),1)])):(0,s.Q3)("",!0),o._isPersonalMatch&&O.isAlreadyHeld(o.id)?((0,s.uX)(),(0,s.CE)("span",w,[(0,s.bF)(Q,{icon:"fa-light fa-check",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("you already have this")),1)])):(0,s.Q3)("",!0),O.getTimeUntilExpiry(o)?((0,s.uX)(),(0,s.CE)("span",{key:3,class:(0,a.C4)(["ticket-badge is-urgency",{"is-urgent":O.isVeryUrgent(o)}])},[(0,s.bF)(Q,{icon:"fa-light fa-clock",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(O.getTimeUntilExpiry(o)),1)],2)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),o.fullDescription?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["ticket-description-container",{"is-expanded":O.isExpanded(o.id)}])},[(0,s.Lk)("div",_,(0,a.v_)(o.fullDescription),1),O.isOverflowing(o.id)&&!O.isExpanded(o.id)?((0,s.uX)(),(0,s.CE)("div",E)):(0,s.Q3)("",!0),O.isOverflowing(o.id)?((0,s.uX)(),(0,s.CE)("button",{key:1,type:"button",class:"show-more-btn",onClick:(0,n.D$)(e=>O.toggleDescription(o.id),["stop"])},[(0,s.Lk)("span",null,(0,a.v_)(O.isExpanded(o.id)?e.$t("Show less"):e.$t("Show more")),1),(0,s.bF)(Q,{icon:"fa-light fa-chevron-down",class:(0,a.C4)(["chevron-icon",{"is-rotated":O.isExpanded(o.id)}])},null,8,["class"])],8,$)):(0,s.Q3)("",!0)],2)):(0,s.Q3)("",!0)])],10,d))),128))])):(0,s.Q3)("",!0),i.upcomingTickets.length>0?((0,s.uX)(),(0,s.CE)("div",F,[(0,s.Lk)("p",T,[(0,s.bF)(Q,{icon:"fa-light fa-calendar-clock"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Coming soon")),1)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.upcomingTickets,t=>((0,s.uX)(),(0,s.CE)("div",{key:"upcoming-"+t.id,class:"upcoming-ticket-card p-3 mb-2"},[(0,s.Lk)("div",S,[(0,s.Lk)("div",null,[(0,s.Lk)("span",A,(0,a.v_)(e.$filters.money(t.price,t.currency)),1),t.name?((0,s.uX)(),(0,s.CE)("span",P," - "+(0,a.v_)(t.name),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",I,(0,a.v_)(e.$t("Available from"))+" "+(0,a.v_)(e.$filters.format(t.validFrom,"shortDateTime")),1)])]))),128))])):(0,s.Q3)("",!0),i.expiredTickets.length>0?((0,s.uX)(),(0,s.CE)("div",M,[(0,s.Lk)("p",x,[(0,s.bF)(Q,{icon:"fa-light fa-clock-rotate-left"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Past offers")),1)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.expiredTickets,t=>((0,s.uX)(),(0,s.CE)("div",{key:"expired-"+t.id,class:"expired-ticket-card p-3 mb-2"},[(0,s.Lk)("div",N,[(0,s.Lk)("div",null,[(0,s.Lk)("span",U,(0,a.v_)(e.$filters.money(t.price,t.currency)),1),t.name?((0,s.uX)(),(0,s.CE)("span",D," - "+(0,a.v_)(t.name),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",X,(0,a.v_)(e.$t("Ended"))+" "+(0,a.v_)(e.$filters.format(t.validTo,"shortDate")),1)])]))),128))])):(0,s.Q3)("",!0)])}i(44114),i(18111),i(22489),i(20116),i(7588),i(18237),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var R=i(95256),O=i(61273);function Q(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon"),d=(0,s.g2)("b-tag");return i.availabilityStatus?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["capacity-indicator",l.urgencyClass])},["sold_out"===i.availabilityStatus?((0,s.uX)(),(0,s.Wv)(d,{key:0,t
1ype:"is-danger",rounded:"",class:"capacity-tag"},{default:(0,s.k6)(()=>[(0,s.bF)(r,{icon:"fa-light fa-circle-xmark",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Sold Out")),1)]),_:1})):"low"===i.availabilityStatus?((0,s.uX)(),(0,s.Wv)(d,{key:1,type:"is-warning",rounded:"",class:"capacity-tag is-urgent-tag"},{default:(0,s.k6)(()=>[(0,s.bF)(r,{icon:"fa-light fa-bolt",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Only {count} left!",{count:i.availabilityCount})),1)]),_:1})):"limited"===i.availabilityStatus?((0,s.uX)(),(0,s.Wv)(d,{key:2,type:"is-warning",rounded:"",class:"capacity-tag is-limited-tag"},{default:(0,s.k6)(()=>[(0,s.bF)(r,{icon:"fa-light fa-clock",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Limited availability")),1)]),_:1})):(0,s.Q3)("",!0)],2)):(0,s.Q3)("",!0)}var B={name:"EventCapacityIndicator",props:{availabilityStatus:{type:String,default:null},availabilityCount:{type:Number,default:null}},computed:{urgencyClass(){return"sold_out"===this.availabilityStatus?"is-sold-out":"low"===this.availabilityStatus?"is-urgent":"limited"===this.availabilityStatus?"is-limited":""}}},G=i(66262);const W=(0,G.A)(B,[["render",Q],["__scopeId","data-v-d9a2c8ac"]]);var j=W,z={name:"EventTicketSelector",components:{FontAwesomeIcon:O.gc,EventCapacityIndicator:j},props:{modelValue:{type:[Number,String],default:null},currentTickets:{type:Array,default:()=>[]},upcomingTickets:{type:Array,default:()=>[]},expiredTickets:{type:Array,default:()=>[]},isLoggedIn:{type:Boolean,default:!1},availability:{type:Object,default:null},multiSelect:{type:Boolean,default:!1},selections:{type:Array,default:()=>[]},myAttendances:{type:Array,default:()=>[]}},emits:["update:modelValue","update:selections"],data(){return{expandedIds:[],overflowingIds:[]}},computed:{nextUpcomingTicket(){return this.upcomingTickets[0]||null},personalMatchTicketIds(){const e=new Set;for(const t of[this.currentTickets,this.upcomingTickets,this.expiredTickets])for(const i of t||[])this.isPersonalTicket(i)&&e.add(i.id);return e},personalMatchSelectedCount(){return this.selections.reduce((e,t)=>this.personalMatchTicketIds.has(t.productPriceId)?e+(t.quantity||0):e,0)},heldProductPriceIds(){const e=new Set;for(const t of this.myAttendances||[]){const i=t?.productPrice;if(!i)continue;const s=i.id??(0,R.D8)(i["@id"]??i);null!=s&&e.add(s)}return e},personalMatchAttendCount(){let e=0;for(const t of this.heldProductPriceIds)this.personalMatchTicketIds.has(t)&&e++;return e}},watch:{currentTickets:{handler(e,t){t&&e.length===t.length||this.$nextTick(()=>{this.checkOverflows()}),this.enforcePersonalMatchCap()},deep:!1},myAttendances:{handler(){this.enforcePersonalMatchCap()},deep:!1}},mounted(){this.$nextTick(()=>{this.checkOverflows()})},methods:{isExpanded(e){return this.expandedIds.includes(e)},isOverflowing(e){return this.overflowingIds.includes(e)},checkOverflows(){if(this.overflowingIds=[],!this.$el)return;const e=this.$el.querySelectorAll(".ticket-description-content");e.forEach(e=>{const t=e.closest(".ticket-price-row")?.dataset?.priceId;t&&e.scrollHeight>e.clientHeight&&this.overflowingIds.push(parseInt(t,10))})},toggleDescription(e){const t=this.expandedIds.indexOf(e);-1===t?this.expandedIds.push(e):this.expandedIds.splice(t,1)},isAlreadyHeld(e){return this.heldProductPriceIds.has(e)},isPersonalTicket(e){return!!e&&(!0===e._isPersonalMatch||"members"===e.isRestricted)},isRowLockedAsHeld(e){return this.isPersonalTicket(e)&&this.heldProductPriceIds.has(e.id)},enforcePersonalMatchCap(){if(0===this.personalMatchAttendCount)return;const e=this.selections.filter(e=>!this.personalMatchTicketIds.has(e.productPriceId));e.length!==this.selections.length&&(this.$emit("update:selections",e),this.modelValue&&this.personalMatchTicketIds.has(this.modelValue)&&this.$emit("update:modelValue",null))},selectTicket(e){("members"!==e.isRestricted||this.isLoggedIn)&&(this.isTicketSoldOut(e.id)||this.isRowLockedAsHeld(e)||(this.$emit("update:modelValue",e.id),this.$emit("update:selections",[{productPriceId:e.id,name:e.name,price:e.price,currency:e.currency,quantity:1}])))},isTicketSelected(e){return this.multiSelect?this.getQuantity(e)>0:this.modelValue===e},getQuantity(e){const t=this.selections.find(t=>t.productPriceId===e);return t?.quantity||0},canIncrement(e){if("members"===e.isRestricted&&!this.isLoggedIn)return!1;if(this.isTicketSoldOut(e.id))return!1;const t=this.getQuantity(e.id);if(this.isPersonalTicket(e)&&this.personalMatchSelectedCount+this.personalMatchAttendCount>=1)return!1;if(null!=e.maxSeats){const i=e.availableSeats??0;if(t>=i)return!1}return!0},incrementQuantity(e){if(!this.canIncrement(e))return;const t=[...this.selections],i=t.findIndex(t=>t.productPriceId===e.id);i>=0?t[i]={...t[i],quantity:t[i].quantity+1}:t.push({productPriceId:e.id,name:e.name,price:e.price,currency:e.currency,quantity:1}),this.$emit("update:selections",t)},decrementQuantity(e){const t=this.getQuantity(e.id);if(0===t)return;const i=[...this.selections],s=i.findIndex(t=>t.productPriceId===e.id);s>=0&&(1===i[s].quantity?i.splice(s,1):i[s]={...i[s],quantity:i[s].quantity-1}),this.$emit("update:selections",i)},getTimeUntilExpiry(e){if(!e.validTo)return null;const t=new Date,i=new Date(e.validTo),s=i-t,a=Math.ceil(s/36e5),n=Math.ceil(s/864e5);return s<=0?null:a<=24?this.$t("Ends today"):2===n?this.$t("Ends tomorrow"):n<=7?this.$t("Ends in")+" "+(n-1)+" "+this.$t("days"):null},isVeryUrgent(e){if(!e.validTo)return!1;const t=new Date,i=new Date(e.validTo),s=i-t,a=Math.ceil(s/864e5);return a<=2},getTicketAvailability(e){return this.availability?.tickets?this.availability.tickets.find(t=>
1t.id===e):null},getTicketFromProps(e){return this.currentTickets.find(t=>t.id===e)},getTicketAvailabilityStatus(e){const t=this.getTicketAvailability(e);return t?.availabilityStatus??null},getTicketAvailabilityCount(e){const t=this.getTicketAvailability(e);return t?.availabilityCount??null},getTicketAvailable(e){const t=this.getTicketAvailability(e);return"low"===t?.availabilityStatus&&null!=t?.availabilityCount?t.availabilityCount:null},isTicketSoldOut(e){const t=this.getTicketAvailability(e);return"sold_out"===t?.availabilityStatus}}};const q=(0,G.A)(z,[["render",V],["__scopeId","data-v-9bc9df1c"]]);var J=q},5833:function(e,t,i){"use strict";i.d(t,{H:function(){return l},u:function(){return d}});const s=" ",a={czk:{symbol:"KÄ",prefix:!1,group:s,decimal:","},eur:{symbol:"â¬",prefix:!1,group:s,decimal:","},pln:{symbol:"zÅ",prefix:!1,group:s,decimal:","},huf:{symbol:"Ft",prefix:!1,group:s,decimal:","},sek:{symbol:"kr",prefix:!1,group:s,decimal:","},nok:{symbol:"kr",prefix:!1,group:s,decimal:","},dkk:{symbol:"kr",prefix:!1,group:".",decimal:","},ron:{symbol:"RON",prefix:!1,group:".",decimal:","},chf:{symbol:"CHF",prefix:!1,group:"'",decimal:"."}
1,uah:{symbol:"â´",prefix:!1,group:s,decimal:","},rub:{symbol:"â½",prefix:!1,group:s,decimal:","},zar:{symbol:"R",prefix:!0,group:s,decimal:"."},usd:{symbol:"$",prefix:!0,group:",",decimal:"."},cad:{symbol:"$",prefix:!0,group:",",decimal:"."},aud:{symbol:"A$",prefix:!0,group:",",decimal:"."},mxn:{symbol:"Mex$",prefix:!0,group:",",decimal:"."},gbp:{symbol:"£",prefix:!0,group:",",decimal:"."},jpy:{symbol:"Â¥",prefix:!0,group:",",decimal:"."},cny:{symbol:"Â¥",prefix:!0,group:",",decimal:"."},inr:{symbol:"â¹",prefix:!0,group:",",decimal:"."},brl:{symbol:"R$",prefix:!0,group:".",decimal:","}},n={symbol:null,prefix:!1,group:",",decimal:"."},o=e=>a[String(e||"").toLowerCase()]||n;function l(e){const t=a["string"===typeof e?e.toLowerCase():e];return t?t.symbol:e}function r(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}function d(e,t,i={}){const a="string"===typeof e?parseFloat(e.replace(",",".")):Number(e);if(null===e||void 0===e||""===e||!Number.isFinite(a))return"";const n=o(t),l=i.symbol||n.symbol||String(t||"").toUpperCase(),d=Math.round(100*Math.abs(a)),c=Math.floor(d/100),u=d%100;let m=r(String(c),n.group);(i.fixedDecimals||0!==u)&&(m+=n.decimal+String(u).padStart(2,"0"));const p=a<0&&0!==d?"-":"";return l?n.prefix?p+l+(/[a-zA-Z]/.test(l)&&l!==n.symbol?s:"")+m:p+m+s+l:p+m}},5866:function(e,t,i){"use strict";i.d(t,{A:function(){return F}});var s=i(20641),a=i(90033);const n={class:"modal is-active share-modal"},o={class:"share-header"},l={class:"share-title"},r={class:"share-link-section"},d={class:"share-link-box"},c={class:"share-link-field"},u={class:"share-link-label"},m=["value"],p={class:"share-body"},h={class:"share-body-title"},g={class:"share-body-subtitle"},f={class:"share-grid"},b=["onClick"],y={class:"share-option-name"};function v(e,t,i,v,k,C){const L=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",{class:"modal-background",onClick:t[0]||(t[0]=(...e)=>C.close&&C.close(...e))}),(0,s.Lk)("div",{class:(0,a.C4)(["share-card",{"share-card--mobile":e.$isMobile()}])},[(0,s.Lk)("div",o,[(0,s.Lk)("h2",l,(0,a.v_)(e.$t("Quick Share")),1),(0,s.Lk)("button",{class:"share-close","aria-label":"close",onClick:t[1]||(t[1]=(...e)=>C.close&&C.close(...e))},[(0,s.bF)(L,{icon:"fa-light fa-xmark"})])]),(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[(0,s.Lk)("div",c,[(0,s.Lk)("span",u,(0,a.v_)(e.$t("Your unique link")),1),(0,s.Lk)("input",{ref:"shareUrlInput",class:"share-link-input",type:"text",readonly:"",value:i.shareUrl,onClick:t[2]||(t[2]=(...e)=>C.selectText&&C.selectText(...e))},null,8,m)]),(0,s.Lk)("button",{class:(0,a.C4)(["share-copy-btn",{"share-copy-btn--copied":k.copied}]),onClick:t[3]||(t[3]=e=>C.copyLinkToClipboard(i.shareUrl))},[(0,s.bF)(L,{icon:k.copied?"fa-light fa-check":"fa-light fa-copy"},null,8,["icon"]),(0,s.eW)(" "+(0,a.v_)(k.copied?e.$t("Copied!"):e.$t("Copy link")),1)],2)])]),(0,s.Lk)("div",p,[(0,s.Lk)("h3",h,(0,a.v_)(e.$t("Reach more donors by sharing")),1),(0,s.Lk)("p",g,(0,a.v_)(e.$t("We've written tailored messages based on the fundraiser story for you to share")),1),(0,s.Lk)("div",f,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(k.socials,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.name,class:"share-option",onClick:t=>C.share(e.type)},[(0,s.Lk)("span",{class:(0,a.C4)(["share-option-icon","share-icon--"+e.type])},[(0,s.bF)(L,{icon:e.icon},null,8,["icon"])],2),(0,s.Lk)("span",y,(0,a.v_)(e.name),1)],8,b))),128))])])],2)])}var k=i(31823),C=i(40834),L=i(95256),w=i(61273),_={components:{FontAwesomeIcon:w.gc,LogoThumbnail:k.A},props:["shareUrl","title","productIRI","eventIRI"],data(){return{copied:!1,socials:[{name:"Facebook",icon:"fab fa-facebook",type:"facebook"},{name:"WhatsApp",icon:"fab fa-whatsapp",type:"whatsapp"},{name:"LinkedIn",icon:"fab fa-linkedin",type:"linkedin"}]}},computed:{...(0,C.L8)(["tenant"])},methods:{close(){this.$emit("update:modelValue",!1)},selectText(){this.$refs.shareUrlInput&&this.$refs.shareUrlInput.select()},getShareUrl(e){const t=encodeURIComponent(this.shareUrl),i=encodeURIComponent(this.$t("Please support "+this.title));switch(e){case"facebook":return`https://www.facebook.com/sharer/sharer.php?u=${t}`;case"messenger":const e=`fb-messenger://share/?link=${t}`;return this.$isMobile()?e:"https://www.facebook.com/dialog/send?link="+t+"&app_id=YOUR_APP_ID&redirect_uri="+t;case"linkedin":return`https://www.linkedin.com/sharing/share-offsite/?url=${t}`;
1case"whatsapp":const s=`https://web.whatsapp.com/send?text=${i}%20${t}`;return this.$isMobile()?`whatsapp://send?text=${i}%20${t}`:s;case"email":return`mailto:?subject=${i}&body=${i}%0A%0A${this.shareUrl}`;default:return this.shareUrl}},copyToClipboard:L.lW,copyLinkToClipboard(e){this.copyToClipboard(e),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)},share(e){const t=this.getShareUrl(e);"email"===e||"whatsapp"===e&&this.$isMobile()?window.location.href=t:window.open(t,"_blank","noopener,noreferrer"),this.close()}}},E=i(66262);const $=(0,E.A)(_,[["render",v],["__scopeId","data-v-bcc41e2a"]]);var F=$},6648:function(e,t,i){"use strict";i.d(t,{A:function(){return T}});var s=i(20641),a=i(90033);const n={class:"fee-price-selector"},o={key:0,class:"fee-price-validation"},l=["value","checked","required","onChange"],r={key:1,class:"fee-price-list"},d=["onClick"],c={key:0,class:"fee-price-row-loading"},u={class:"fee-price-checkbox"},m={class:"fee-price-info"},p={class:"fee-price-name"},h={key:0,class:"fee-price-description"},g={key:1,class:"fee-price-age-restriction"},f={class:"fee-price-amount"},b={class:"fee-price-value"},y={key:2,class:"mb-4"},v={class:"tag is-rounded is-default"},k={key:3,class:"mb-4"},C={class:"tag is-rounded is-warning"};function L(e,t,i,L,w,_){const E=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[i.isRequired&&i.prices&&i.prices.length?((0,s.uX)(),(0,s.CE)("div",o,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(_.availablePrices,e=>((0,s.uX)(),(0,s.CE)("input",{key:"radio-"+e.id,type:"radio",name:"fee-price-selector",value:e["@id"],checked:_.isSelected(e),required:i.isRequired,class:"fee-price-hidden-radio",onChange:t=>_.selectPrice(e)},null,40,l))),128))])):(0,s.Q3)("",!0),i.prices&&i.prices.length?((0,s.uX)(),(0,s.CE)("div",r,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(_.availablePrices,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:(0,a.C4)(["fee-price-row",{"is-selected":_.isSelected(e),"is-selectable":i.selectable&&!_.isSelected(e)&&!_.isPriceDisabledByAge(e),"is-disabled":!i.selectable&&!_.isSelected(e),"is-age-restricted":_.isPriceDisabledByAge(e)}]),onClick:t=>_.selectPrice(e)},[i.loading&&i.loadingPriceId===e["@id"]?((0,s.uX)(),(0,s.CE)("div",c,[(0,s.bF)(E,{icon:"fa-light fa-spinner-third",class:"fa-spin"})])):(0,s.Q3)("",!0),(0,s.Lk)("span",u,[_.isSelected(e)?((0,s.uX)(),(0,s.Wv)(E,{key:0,icon:"fa-light fa-circle-check",class:"has-text-success"})):((0,s.uX)(),(0,s.Wv)(E,{key:1,icon:"fa-light fa-circle",class:"fee-price-checkbox-inactive"}))]),(0,s.Lk)("span",m,[(0,s.Lk)("span",p,(0,a.v_)(e.name),1),e.fullDescription||e.description?((0,s.uX)(),(0,s.CE)("span",h,(0,a.v_)(e.fullDescription||e.description),1)):(0,s.Q3)("",!0),_.isAgeRestrictionEnabled&&i.showAgeRestrictions&&_.hasAgeRestriction(e)?((0,s.uX)(),(0,s.CE)("span",g,(0,a.v_)(_.getAgeRestrictionDescription(e)),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",f,[(0,s.Lk)("span",b,(0,a.v_)(_.formatCurrency(e.price,e.currency)),1)])],10,d))),128))])):i.selectedPrice&&!i.prices?((0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("span",v,(0,a.v_)(_.formatCurrency(i.selectedPrice.price,i.selectedPrice.currency))+" - "+(0,a.v_)(i.selectedPrice.name),1)])):i.showEmptyState?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.Lk)("span",C,(0,a.v_)(e.$t("No fee type selected")),1)])):(0,s.Q3)("",!0)])}i(18111),i(22489);var w=i(40834),_=i(61273),E={name:"FeePriceSelector",components:{FontAwesomeIcon:_.gc},props:{modelValue:{type:String,default:null},prices:{type:Array,default:()=>[]},selectedPrice:{type:Object,default:null},selectable:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingPriceId:{type:String,default:null},showEmptyState:{type:Boolean,default:!0},showHidden:{type:Boolean,default:!1},confirmSelection:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1},userBirthdate:{type:[String,Date],default:null},showAgeRestrictions:{type:Boolean,default:!1}},emits:["update:modelValue","select"],computed:{...(0,w.L8)(["isGranted","tenant"]),isAgeRestrictionEnabled(){return!0===this.tenant?.settingFeatures?.fees?.productPriceAgeRestriction},userAge(){if(!this.userBirthdate)return null;const e=new Date(this.userBirthdate),t=new Date;let i=t.getFullYear()-e.getFullYear();const s=t.getMonth()-e.getMonth();return s<0&&i--,i},availablePrices(){return this.prices?this.prices.filter(e=>{if(e.isArchived)return!1;if(e.isHidden&&!this.showHidden&&!this.isGranted("FINANCIAL_LOCAL"))return!1;if(this.isAgeRestrictionEnabled&&!this.showAgeRestrictions){if(this.hasAgeRestriction(e)&&null===this.userAge)return!1;if(this.isAgeRestricted(e))return!1}return!0}):[]}},methods:{formatCurrency(e,t){return this.$filters.money(e??0,t)}
1,isSelected(e){return this.modelValue?this.modelValue===e["@id"]:!!this.selectedPrice&&this.selectedPrice.id===e.id},isAgeRestricted(e){const t=e.ageUnder,i=e.ageOver;return(null!==t&&void 0!==t||null!==i&&void 0!==i)&&(null!==this.userAge&&(null!==t&&void 0!==t&&null!==i&&void 0!==i?!(this.userAge<t||this.userAge>i):null!==t&&void 0!==t?this.userAge>=t:this.userAge<=i))},selectPrice(e){!this.selectable||this.isSelected(e)||this.loading||this.isPriceDisabledByAge(e)||(this.confirmSelection||this.$emit("update:modelValue",e["@id"]),this.$emit("select",e))},hasAgeRestriction(e){return null!==e.ageUnder&&void 0!==e.ageUnder||null!==e.ageOver&&void 0!==e.ageOver},isPriceDisabledByAge(e){return!!this.isAgeRestrictionEnabled&&(!!this.showAgeRestrictions&&(!!this.hasAgeRestriction(e)&&(null===this.userAge||this.isAgeRestricted(e))))},getAgeRestrictionDescription(e){const t=e.ageUnder,i=e.ageOver;return t&&i?`${this.$t("Age restricted")}: ${this.$t("must be under")} ${t} ${this.$t("years")} ${this.$t("or over")} ${i} ${this.$t("years")}`:t?`${this.$t("Age restricted")}: ${this.$t("must be under")} ${t} ${this.$t("years")}`:i?`${this.$t("Age restricted")}: ${this.$t("must be over")} ${i} ${this.$t("years")}`:""}}},$=i(66262);const F=(0,$.A)(E,[["render",L],["__scopeId","data-v-47479f77"]]);var T=F},6650:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return G}});i(44114);var s=i(20641),a=i(90033);const n={class:"o-minwidth"},o={key:0},l={key:0,class:"mb-6 pt-4"},r={class:"product-header level mb-0"},d={class:"level-left"},c={class:"level-item"},u={key:0,class:"title"},m={key:1,class:"title"},p={key:0,class:"tag is-rounded is-success mr-3"},h={class:"tag is-rounded is-default mr-3"},g={key:1,class:"tag is-rounded is-default"},f={key:2,class:"tag is-rounded is-danger"},b={key:3,class:"tag is-warning is-rounded"},y=["onClick"],v={key:4,class:"tag is-warning is-rounded"},k={key:5},C=["onClick"],L={class:"level-right"},w={key:0,class:"level-item"},_=["onClick"],E=["disabled","onClick"],$={key:1,class:"level-item"},F={class:"icon is-small"};function T(e,t,i,T,S,A){const P=(0,s.g2)("b-loading"),I=(0,s.g2)("router-link"),M=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("section",n,[(0,s.bF)(P,{modelValue:S.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>S.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),S.availableProducts&&S.availableProducts.length>0?((0,s.uX)(),(0,s.CE)("div",o,[A.userHasProductSubscription&&A.userHasActiveSubscription?((0,s.uX)(),(0,s.CE)("section",l,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(S.availableProducts,i=>((0,s.uX)(),(0,s.CE)(s.FK,{key:i.productStripeId},[!S.userFilterApplied||S.userFilterApplied&&S.item.subscriptionProfiles[i.productStripeId]?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["card product-card",{active:A.isProductFocus(i)}])},[(0,s.Lk)("div",null,[(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[(0,s.Lk)("div",c,[(0,s.Lk)("div",null,[S.userCurrentSubscriptions[i.productStripeId]?((0,s.uX)(),(0,s.CE)("h3",m,(0,a.v_)(i.name),1)):((0,s.uX)(),(0,s.CE)("h3",u,[i.slug?((0,s.uX)(),(0,s.Wv)(I,{key:0,to:{name:"ProductPayBySlug",params:{item:i.slug},query:{recurring:1,slug:1}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(i.name),1)]),_:2},1032,["to"])):(0,s.Q3)("",!0),i.slug?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(I,{key:1,to:{name:"ProductPay",params:{item:i.uuid},query:{recurring:1,slug:0}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(i.name),1)]),_:2},1032,["to"]))])),S.userCurrentSubscriptions[i.productStripeId]?((0,s.uX)(),(0,s.CE)("div",{key:"prod_"+S.item.subscriptionProfiles[i.productStripeId]["status"],class:"mt-5"},["active"===S.item.subscriptionProfiles[i.productStripeId]["status"]&&S.item.subscriptionProfiles[i.productStripeId]&&!S.item.subscriptionProfiles[i.productStripeId]["isSubscriptionCanceled"]?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(e.$t("Active subscription")),1)):(0,s.Q3)("",!0),(0,s.Lk)("span",h,(0,a.v_)(e.$filters.money(S.item.subscriptionProfiles[i.productStripeId]["price"]?S.item.subscriptionProfiles[i.productStripeId]["price"]:S.item.subscriptionProfiles[i.productStripeId]["customPriceValue"],S.item.subscriptionProfiles[i.productStripeId]["currency"]))+" /"+(0,a.v_)(e.$t("month")),1
1),"active"===S.item.subscriptionProfiles[i.productStripeId]["status"]&&S.item.subscriptionProfiles[i.productStripeId]&&!S.item.subscriptionProfiles[i.productStripeId]["isSubscriptionCanceled"]?((0,s.uX)(),(0,s.CE)("span",g,(0,a.v_)(e.$t("Next payment on"))+" "+(0,a.v_)(e.$filters.format(S.item.subscriptionProfiles[i.productStripeId]["currentPeriodEnd"].date)),1)):(0,s.Q3)("",!0),"active"===S.item.subscriptionProfiles[i.productStripeId]["status"]&&S.item.subscriptionProfiles[i.productStripeId]["isSubscriptionCanceled"]?((0,s.uX)(),(0,s.CE)("span",f,(0,a.v_)(e.$t("Cancels on"))+" "+(0,a.v_)(e.$filters.format(S.item.subscriptionProfiles[i.productStripeId]["currentPeriodEnd"].date)),1)):(0,s.Q3)("",!0),"no_identity"===S.item.subscriptionProfiles[i.productStripeId]["status"]?((0,s.uX)(),(0,s.CE)("span",b,[(0,s.Lk)("a",{onClick:t=>e.$router.push({name:"ValidateIdentityByUserOnPayment",query:{paymentType:"subscription"},params:{payment:S.item.subscriptionProfiles[i.productStripeId].uid}})},(0,a.v_)(e.$t("You need to upload your identity")),9,y)])):"identity_pending"===S.item.subscriptionProfiles[i.productStripeId]["status"]?((0,s.uX)(),(0,s.CE)("span",v,(0,a.v_)(e.$t("Waiting for identity validation")),1)):"identity_validated"===S.item.subscriptionProfiles[i.productStripeId]["status"]?((0,s.uX)(),(0,s.CE)("span",k,[(0,s.Lk)("a",{class:"button is-small is-rounded is-primary",onClick:t=>e.$router.push({name:"PaymentSubscriptionCheckoutRedirect",params:{item:S.item.subscriptionProfiles[i.productStripeId].id}})},(0,a.v_)(e.$t("Subscribe")),9,C)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])])]),(0,s.Lk)("div",L,[S.userCurrentSubscriptions[i.productStripeId]?((0,s.uX)(),(0,s.CE)("div",w,[S.item.subscriptionProfiles[i.productStripeId]&&S.item.subscriptionProfiles[i.productStripeId]["isSubscriptionCanceled"]?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-small is-primary mr-2 is-rounded",onClick:e=>A.reactivateSubscription(S.item.subscriptionProfiles[i.productStripeId]["id"])},(0,a.v_)(e.$t("Reactivate")),9,_)):(0,s.Q3)("",!0),S.item.subscriptionProfiles[i.productStripeId]&&!S.item.subscriptionProfiles[i.productStripeId]["isSubscriptionCanceled"]?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-outlined is-small is-danger is-rounded",disabled:S.isLoading,onClick:e=>A.confirmCancelSubscription(S.item.subscriptionProfiles[i.productStripeId]["id"])},(0,a.v_)(e.$t("unsubscribe")),9,E)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),S.userCurrentSubscriptions[i.productStripeId]?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",$,[i.slug?((0,s.uX)(),(0,s.Wv)(I,{key:0,class:"button is-primary is-small is-rounded",to:{name:"ProductPayBySlug",params:{item:i.slug},query:{recurring:1,slug:1}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(i.isDonation?"Donate":"subscribe")),1)]),_:2},1032,["to"])):(0,s.Q3)("",!0),i.slug?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(I,{key:1,class:"button is-primary is-small is-rounded",to:{name:"ProductPay",params:{item:i.uuid},query:{recurring:1,slug:0}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(i.isDonation?"Donate":"subscribe")),1)]),_:2},1032,["to"])),A.isOpenedSubscriptionForm(i)?((0,s.uX)(),(0,s.CE)("span",{key:2,class:"is-clickable",onClick:t[1]||(t[1]=(...e)=>A.closeAllSubscriptionForms&&A.closeAllSubscriptionForms(...e))},[(0,s.Lk)("span",F,[(0,s.bF)(M,{icon:"fa-light fa-times"})])])):(0,s.Q3)("",!0)]))])])])],2)):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])}i(18111),i(7588),i(13579);var S=i(40834);const A={key:0,class:"timeline"},P={key:0,class:"timeline-marker is-icon is-default"},I={key:1,class:"timeline-marker is-icon is-success"},M={class:"timeline-content"},x={key:0},N={key:0,class:"is-size-7 has-text-grey-light"};function U(e,t,i,n,o,l){return i.history?((0,s.uX)(),(0,s.CE)("div",A,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.history,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.intervalId||i.periodStartLabel,class:"timeline-item"},[void 0!==i.missing?((0,s.uX)(),(0,s.CE)("div",P)):((0,s.uX)(),(0,s.CE)("div",I)),(0,s.Lk)("div",M,[(0,s.Lk)("p",null,[(0,s.Lk)("strong",null,(0,a.v_)(i.periodStartLabel)+" - "+(0,a.v_)(i.periodEndLabel),1)]),void 0!==i.amount?((0,s.uX)(),(0,s.CE)("p",x,[(0,s.eW)((0,a.v_)(e.$filters.money(i.amount,i.currency))+" "+(0,a.v_)(i.priceName)+" ",1),t[0]||(t[0]=(0,s.Lk)("br",null,null,-1)),void 0!==i.date?((0,s.uX)(),(0,s.CE)("span",N,(0,a.v_)(e.$t("feePaidOnDate"))+" "+(0,a.v_)(i.date),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])]))),128))])):(0,s.Q3)("",!0)}var D={props:["history"],data(){return{}}},X=i(66262);const V=(0,X.A)(D,[["render",U]]);var R=V,O=i(90065),Q=(i(43464),i(2321),{props:["donationProductOnly","filterUser"],data(){return{availableProducts:[],userNewSubscriptionsPrices:null,userNewSubscriptionsPricesCustom:null,userCurrentSubscriptions:null,editingSubscription:null,isInvoices:null,isHistory:null,isHistoryId:null,isInvoiceId:null,invoicesList:null,historyList:null,isLoading:!1,isAddingCardWithNewSubscription:null,userFilterApplied:null,item:null}},mounted(){this.filterUser?(this.item=this.filterUser,this.userFilterApplied=!0):(this.item=this.user,this.userFilterApplied=!1),this.initAvailableProducts()},methods:{isProductFocus(e){return this.editingSubscription===e.id||this.isHistoryId===e.id||this.isInvoiceId===e.id},initAvailableProducts(){this.isLoading=!0;let e=this.item.id===this.user.id?"/me":"/users/"+this.item.id;this.$http.plain.get(e).then(e=>(this.donationProductOnly&&this.tenant.settingFeatures.onlinePayments.donationProductUuid&&this.getDonationProduct(this.tenant.settingFeatures.onlinePayments.donationProductUuid),this.$route.query.product&&(this.editingSubscription=this.$route.query.product),this.isLoading=!0,this.$http.plain.get("/get-showcased-products").then(e=>{const t=e.data["hydra:member"];
1t.forEach(e=>{this.availableProducts.some(t=>t.id===e.id)||this.availableProducts.push(e)}),this.availableProducts.length>0&&this.initUserNewSubscriptionsPrices()}))).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)},enableCustomInput(e){this.userNewSubscriptionsPrices[e.productStripeId]=0,this.$refs["customPriceValueInput_"+e.id][0].focus(),this.clearStandardPrice(e.productStripeId)},initUserNewSubscriptionsPrices(){if((this.tenant.settingFeatures.fees.isActive||this.tenant.settingFeatures.onlinePayments.isActive)&&this.availableProducts&&this.availableProducts.length>0){this.userNewSubscriptionsPrices={},this.userNewSubscriptionsPricesCustom={},this.userCurrentSubscriptions={};for(let e of this.availableProducts){this.userCurrentSubscriptions[e.productStripeId]=this.userSubscription(e);let t=this.userPriceSubscription(e);t&&void 0!==t.priceId?this.userNewSubscriptionsPrices[e.productStripeId]=t.priceId:t&&void 0!==t.customPriceValue?(this.userNewSubscriptionsPrices[e.productStripeId]=0,this.userNewSubscriptionsPricesCustom[e.productStripeId]=t.customPriceValue):this.userNewSubscriptionsPrices[e.productStripeId]=null}}},clearStandardPrice(e){this.userNewSubscriptionsPricesCustom[e]&&this.userNewSubscriptionsPricesCustom[e].length>0&&(this.userNewSubscriptionsPrices[e]=null)},clearCustomPrice(e){this.userNewSubscriptionsPricesCustom[e]=null},updateUserSubscriptionProfiles(e){this.item["subscriptionProfiles"]=e},closeAllSubscriptionForms(){this.isHistory=null,this.isHistoryId=null,this.isInvoiceId=null,this.editingSubscription=null,this.invoicesList=null},isOpenedSubscriptionForm(e){return this.isHistoryId===e.id||(this.editingSubscription===e.id||this.isInvoiceId===e.id)},showPayForm(e){this.isHistory=null,this.isHistoryId=null,this.isInvoiceId=null,this.editingSubscription=e.id,this.invoicesList=null},showInvoices(e,t){this.isHistory=null,this.isHistoryId=null,this.editingSubscription=null,this.invoicesList=null,this.isInvoices=e,this.isInvoiceId=t.id,this.isLoading=!0,this.$http.plain.get("/connected/subscription-invoices/"+e).then(e=>{e.data&&(this.invoicesList=e.data)}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)},showHistory(e){this.isHistory=e,this.isHistoryId=e.id,this.isInvoices=null,this.isInvoiceId=null,this.editingSubscription=null,this.isLoading=!0,this.$http.plain.get("/connected/subscription-history/"+e.id+"/"+this.item.id).then(e=>{e.data&&(this.historyList=e.data)}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)},confirmCancelSubscription(e){this.$buefy.dialog.confirm({title:this.$t("unsubscribe"),message:this.$t("Are you sure you want to unsubscribe?"),confirmText:this.$t("Unsubscribe"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>this.cancelSubscription(e)})},reactivateSubscription(e){this.isLoading=!0,this.$http.plain.post("/connected/subscription-reactivate/"+e).then(e=>{e.data&&(this.updateUserSubscriptionProfiles(e.data),this.initUserNewSubscriptionsPrices(),this.$buefy.snackbar.open({message:this.$t("Reactivated")}),this.$emit("updateUser"))}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)},cancelSubscription(e){this.isLoading=!0,this.$http.plain.post("/connected/cancel-subscription/"+e).then(e=>{e.data&&(this.updateUserSubscriptionProfiles(e.data),this.initUserNewSubscriptionsPrices(),this.$buefy.snackbar.open({message:this.$t("Unsubscribed")}),this.$emit("updateUser"))}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)},saveSubscription(e){let t="/connected/change-subscription/"+this.userCurrentSubscriptions[e.productStripeId];this.isLoading=!0;let i=this.userNewSubscriptionsPrices[e.productStripeId],s=parseInt(this.userNewSubscriptionsPricesCustom[e.productStripeId]);this.$http.plain.post(t,{priceId:i||null,productId:e.id,customPriceValue:s||null}).then(e=>{e.data&&(this.updateUserSubscriptionProfiles(e.data),this.initUserNewSubscriptionsPrices(),this.editingSubscription=null,this.$buefy.snackbar.open({message:this.$t("saved")}))}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},userSubscription(e){let t=this.item.subscriptionProfiles;if(t)for(let[i,s]of Object.entries(t))if(i===e.productStripeId)return s["id"];return null},userPriceSubscription(e){let t=this.item.subscriptionProfiles;if(t)for(let[i,s]of Object.entries(t))if(i===e.productStripeId)return s["customPriceValue"]?{customPriceValue:s["customPriceValue"]}:{priceId:s["priceId"]};return null},isProductFee(e){return e.uuid===this.tenant.settingFeatures["fees"].productUuid||!(!this.item?.localCenter?.feeProduct||e.uuid!==this.item.localCenter.feeProduct.uuid)},saveSuccess(e){return this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})},getDonationProduct(e){this.isLoading=!0,this.$http.plain.get("/products/"+e).then(e=>{let t=e.data;this.availableProducts.unshift(t),this.initUserNewSubscriptionsPrices()}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})}},computed:{...(0,S.L8)(["user","isGranted","userTypeEligibleForFee","tenant","tenantSettingsFee"]),isUserFeeOnlinePaymentEligible(){return!(!this.tenant.settingFeatures.onlinePayments.allMembersFeeEligible&&!this.item.localCenter.isOnlinePaymentFeeEligible)},userHasProductSubscription(){for(let e of this.availableProducts)if(!this.isProductFee(e)&&e.hasSubscription)return!0;return!1},userHasActiveSubscription(){for(let e of this.availableProducts)if(!this.isProductFee(e)&&e.hasSubscription&&this.userCurrentSubscriptions[e.productStripeId])return!0;return!1},userHasProducts(){for(let e of this.availableProducts)if(!this.isProductFee(e)&&!this.userCurrentSubscriptions[e.productStripeId])return!0;return!1}},components:{Invoices:O.A,HistorySubscription:R}});const B=(0,X.A)(Q,[["render",T],["__scopeId","data-v-6d8fc5d4"]]);var G=B},6720:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Km}});i(44114),i(18111),i(20116);var s=i(20641),a=i(90033),n=i(53751);const o={key:1,class:"is-relative"},l={class:"is-hidden-tablet profile-image-mobile-container"},r={ref:"profileImageMobile",class:"profile-image-round mb-2"},d={class:"btn-edit-profile"},c={key:0,class:"is-flex is-flex-direction-row is-align-items-center",style:{gap:"0.5rem"}},u={class:"is-small mr-1"},m={key:1,class:"button is-light is-rounded is-small",disabled:""},p={class:"is-small mr-1"},h={class:"is-small mr-1"},g={class:"is-small mr-1"},f={class:"button is-success is-light is-rounded is-small"},b={class:"is-small mr-1"},y={class:"is-small ml-1"},v={class:"icon-text has-text-danger"},k={class:"is-small"},C={class:"button is-light is-small is-rounded"},L={class:"icon is-small"},w={class:"icon is-small"},_={class:"icon is-small"},E={class:"is-hidden-mobile"},$={class:"is-flex is-flex-wrap-wrap is-justify-content-center is-align-items-center is-hidden-tablet mb-2"}
1,F={key:0,class:"is-flex is-flex-wrap-wrap is-justify-content-center is-align-items-center"},T={class:"icon is-small ml-1"},S={class:"ml-0 mr-1"},A={key:0,class:"is-hidden-tablet is-flex is-justify-content-center mb-4"},P={key:1,class:"is-flex is-flex-wrap-wrap is-align-items-center mb-3 is-hidden-tablet is-justify-content-center",style:{gap:"0.5rem"}},I={class:"is-small mr-1"},M={key:1,class:"button is-light is-rounded is-small",disabled:""},x={class:"is-small mr-1"},N={class:"is-small mr-1"},U={class:"is-small mr-1"},D={class:"button is-success is-light is-rounded is-small"},X={class:"is-small mr-1"},V={class:"is-small ml-1"},R={class:"icon-text has-text-danger"},O={class:"is-small"},Q={class:"user-tabs-bg"},B={class:"column is-narrow is-hidden-mobile"},G={ref:"profileImageUpload",class:"profile-image"},W={class:"profile-under-photo mt-5 ml-2"},j={key:0,class:"profile-sidebar-field"},z={class:"has-text-grey is-size-7"},q={key:0},J={key:0},H={key:1,class:"profile-sidebar-field"},K={class:"has-text-grey is-size-7"},Y={class:"has-text-weight-semibold has-text-dark"},Z={key:2,class:"profile-sidebar-field"},ee={class:"has-text-grey is-size-7"},te=["href"],ie={key:3,class:"profile-sidebar-field"},se={class:"has-text-grey is-size-7"},ae={key:4,class:"profile-sidebar-field"},ne={class:"has-text-grey is-size-7"},oe={key:5,class:"profile-sidebar-field"},le={class:"has-text-grey is-size-7"},re={key:6,class:"profile-sidebar-field"},de={class:"has-text-grey is-size-7"},ce={key:7,class:"profile-sidebar-field"},ue={class:"has-text-grey is-size-7"},me={key:0,class:"has-text-weight-semibold has-text-dark mb-1"},pe={key:2,class:"tag is-small is-rounded"},he={key:8,class:"profile-sidebar-field"},ge={class:"has-text-grey is-size-7"},fe={class:"mr-1"},be={key:1,class:"mt-1"},ye={key:2,class:"mt-1"},ve={class:"columns is-mobile mb-0 is-vcentered"},ke={class:"column"},Ce={class:"user-labels"},Le={key:0,class:"icon-text mt-1"},we={class:"has-text-weight-semibold"},_e={key:1},Ee={class:"is-small"},$e={class:"is-small"},Fe={key:2,class:"is-hidden-mobile"},Te={class:"icon is-small ml-1"},Se={class:"ml-0 mr-1"},Ae={class:"profile-labels column is-narrow"},Pe={class:"socialMedia is-flex has-text-dark"},Ie={class:"icon"},Me={class:"icon"},xe=["href"],Ne={class:"icon"},Ue=["href"],De={class:"icon"},Xe=["href"],Ve={class:"icon"},Re=["href"],Oe={class:"icon"},Qe=["href"],Be={class:"icon"},Ge=["href"],We={class:"icon"},je=["href"],ze={class:"icon"},qe=["href"],Je={class:"icon"},He=["href"],Ke={class:"icon"},Ye={key:0,class:"mt-4 mb-4"},Ze={class:"has-text-weight-semibold mb-2 pl-3"},et={class:"new-profile-info fs-14 is-hidden"},tt={key:0,class:"icon-text"},it={class:"icon is-small"},st={class:"mr-1"},at={key:0},nt={key:1,class:"icon-text"},ot={class:"icon is-small"},lt={class:"mr-1"},rt={key:2,class:"icon-text"},dt={class:"icon is-small"},ct={class:"mr-1"},ut={key:0},mt={key:1},pt={key:2},ht={key:3,class:"icon-text"},gt={class:"icon is-small"},ft={class:"mr-1"},bt={key:0,class:"icon-text"},yt={class:"icon is-small"},vt={class:"mr-1"},kt={key:4,class:"icon-text"},Ct={class:"icon is-small"},Lt={class:"mr-1"},wt={key:0,class:"ml-3"},_t={key:5,class:"icon-text"},Et={class:"icon is-small"},$t={class:"mr-1"},Ft=["src","alt"],Tt={key:1,class:"is-inline-flex is-align-items-center",style:{gap:"0.5rem"}},St=["src","alt"],At={key:6,class:"icon-text"},Pt={class:"icon is-small"},It={class:"mr-1"},Mt={key:0},xt={key:1},Nt={key:7,class:"icon-text"},Ut={class:"icon is-small"},Dt={class:"mr-1"},Xt={key:8,class:"icon-text"},Vt={class:"icon is-small"},Rt={class:"mr-1"},Ot={key:9,class:"icon-text"},Qt={class:"icon is-small"},Bt={class:"mr-1"},Gt={class:"pl-2"},Wt={key:0,class:"columns mb-3 has-text-dark"},jt={key:0,class:"column"},zt={class:"has-text-grey"},qt={class:"has-text-weight-semibold"},Jt={key:0},Ht={key:1,class:"column has-text-dark"},Kt={class:"has-text-grey"},Yt={class:"has-text-weight-semibold"},Zt={key:1,class:"columns mb-3"},ei={key:0,class:"column has-text-dark"},ti={class:"has-text-grey"},ii={key:0,class:"has-text-weight-semibold"},si={key:1,class:"has-text-weight-semibold"},ai={key:2,class:"has-text-weight-semibold"},ni={key:1,class:"column has-text-dark is-hidden-mobile"},oi={class:"has-text-grey"},li={class:"has-text-weight-semibold"},ri={class:"columns mb-3"},di={key:0,class:"column has-text-dark"},ci={class:"has-text-grey"},ui={class:"has-text-weight-semibold"},mi={key:0,class:"column has-text-dark"},pi={class:"has-text-grey"},hi={class:"has-text-weight-semibold"},gi={key:0,class:"ml-3"},fi={key:2,class:"columns mb-3"},bi={class:"column has-text-dark"},yi={class:"has-text-grey"},vi={class:"has-text-weight-semibold"},ki=["src","alt"],Ci={key:1,class:"is-inline-flex is-align-items-center",style:{gap:"0.5rem"}},Li=["src","alt"],wi={key:3,class:"columns mb-3"},_i={key:0,class:"column has-text-dark"},Ei={class:"has-text-grey"},$i={class:"has-text-weight-semibold"}
1,Fi={key:1,class:"column has-text-dark"},Ti={class:"has-text-grey"},Si={class:"has-text-weight-semibold"},Ai={class:"profile-remaining-admin is-hidden-mobile mb-5 pl-2"},Pi={key:0,class:"profile-sidebar-field"},Ii={class:"has-text-grey is-size-7"},Mi={class:"has-text-weight-semibold has-text-dark"},xi={class:"has-text-grey is-size-7"},Ni={key:0},Ui={key:1},Di={key:1,class:"profile-sidebar-section"},Xi={class:"has-text-weight-bold has-text-dark is-size-6 mb-3"},Vi={key:0,class:"tag is-medium is-warning is-rounded"},Ri={key:1,class:"tag is-medium is-success is-rounded"},Oi={key:2,class:"profile-sidebar-section"},Qi={class:"has-text-weight-bold has-text-dark is-size-6 mb-3"},Bi={key:0,class:"columns mb-3"},Gi={key:0,class:"column has-text-dark"},Wi={class:"has-text-grey"},ji={class:"has-text-weight-semibold"},zi={key:1,class:"column has-text-dark"},qi={class:"has-text-grey"},Ji={class:"has-text-weight-semibold"},Hi={key:1,class:"columns mb-3"},Ki={key:0,class:"column has-text-dark"},Yi={class:"has-text-grey"},Zi={class:"has-text-weight-semibold"},es={key:1,class:"column has-text-dark"},ts={class:"has-text-grey"},is={class:"has-text-weight-semibold"},ss={key:1,class:"card p-4 mb-4"},as={class:"mb-5"},ns={class:"is-flex is-align-items-center is-justify-content-space-between mb-4"},os={class:"profile-card-title m-0"},ls={key:0},rs={key:1},ds={key:0,class:"tag is-light is-passive is-rounded has-text-weight-semibold"},cs={key:1,class:"tag is-light is-passive is-rounded ml-1 icon-text has-text-weight-semibold"},us={key:0,class:"tier-badges-container mt-5"},ms={class:"tier-badge-content"},ps={class:"tier-badge-logo"},hs={class:"tier-badge-info ml-3"},gs={class:"has-text-weight-semibold tier-badge-name"},fs={class:"is-size-7 tier-badge-points"},bs={key:0,class:"tag is-success is-light is-rounded is-small mt-2"},ys={class:"icon is-small"},vs={key:1,class:"tag is-light is-rounded is-small mt-2 tier-locked-tag"},ks={class:"icon is-small"},Cs={key:0,class:"mt-4"},Ls={key:1,class:"o-badges-wrap is-flex is-flex-wrap-wrap pb-3 mt-6"},ws={key:0,class:"o-badge"},_s={class:"has-text-centered has-text-dark o-userdetails"},Es={key:2,class:"card p-4 mb-4"},$s={class:"is-flex is-align-items-center is-justify-content-space-between mb-3"},Fs={class:"profile-card-title m-0"},Ts={class:"mt-4 has-text-dark"},Ss={key:0},As={key:1,class:"ml-1 mr-1"},Ps={key:2},Is={key:0,class:"mt-4 has-text-dark"},Ms={class:"has-text-grey"},xs={class:"has-text-weight-semibold"},Ns={key:1,class:"mt-4 has-text-dark"},Us={class:"has-text-grey"},Ds={class:"has-text-weight-semibold"},Xs={key:2,class:"mt-4 has-text-dark"},Vs={class:"has-text-grey"},Rs={class:"has-text-weight-semibold"},Os={key:3,class:"columns mt-4"},Qs={key:0,class:"column has-text-dark"},Bs={class:"has-text-grey"},Gs={key:0,class:"has-text-weight-semibold"},Ws={key:1,class:"has-text-weight-semibold"},js={key:2,class:"has-text-weight-semibold"},zs={key:1,class:"column has-text-dark"},qs={class:"has-text-grey"},Js=["href"],Hs={key:1,class:"has-text-weight-semibold"},Ks={key:2,class:"column has-text-dark"},Ys={class:"has-text-grey"},Zs={class:"has-text-weight-semibold"},ea={key:3,class:"card has-background-mycol p-4 mb-4"},ta={class:"is-flex is-align-items-center is-justify-content-space-between mb-5"},ia={class:"profile-card-title m-0"},sa={class:"mobile-hscroll p-0"},aa={key:0,class:"table is-fullwidth mb-3 is-striped is-hoverable user-roles-table"},na={key:0},oa={key:0,class:"has-text-dark"},la={key:1,class:"has-text-dark"},ra={key:1},da={key:0,class:"has-text-dark"},ca={key:1,class:"has-text-dark"},ua={class:"tag is-rounded is-light is-small"},ma={class:"has-text-dark"},pa={class:"tag is-rounded is-white is-small"},ha={key:0,class:"tag is-rounded is-white is-small"},ga={key:1,class:"tag is-rounded is-white is-small"},fa={key:4,class:"card p-4 mb-4"},ba={key:0,class:"mb-4"},ya={class:"profile-card-title mb-4"},va={key:0},ka={class:"tag is-default is-medium is-rounded mr-1"},Ca={key:0},La={key:1},wa={class:"is-size-5 mb-4 has-text-dark"},_a={key:0},Ea={class:"tag is-default is-medium is-rounded mr-1"},$a={key:0},Fa={key:1},Ta={key:5,class:"card p-4 mb-4"},Sa={class:"profile-card-title mb-3"},Aa={class:"columns"},Pa={class:"column"},Ia={class:"has-text-dark has-text-weight-semibold"},Ma={class:"column is-narrow"},xa={class:"icon-text"},Na={class:"is-size-7"},Ua={key:6,class:"card p-4 mb-4"},Da={class:"profile-card-title mb-4"},Xa={key:0},Va={key:1,class:"mt-2"},Ra={key:7,class:"card p-4 mb-4"},Oa={class:"profile-card-title mb-4"},Qa={key:0,class:"is-flex"},Ba={key:0,class:"mr-4"},Ga={class:"pt-2"},Wa={key:1,class:"mt-5"},ja={key:0},za={class:"has-text-dark"},qa={key:0},Ja={key:1},Ha={key:8,class:"card p-4 mb-4"},Ka={class:"profile-card-title"},Ya={class:"mb-1 mt-5 has-text-grey"},Za={class:"has-text-dark has-text-weight-semibold"},en={key:0},tn={class:"icon is-small"},sn={key:1},an=["onClick"],nn={class:"icon is-small mr-2"},on={key:2,class:"mt-5"},ln={key:3,class:"has-text-grey has-text-weight-normal"},rn={class:"is-hidden-tablet"},dn={key:0,class:"card p-4 mb-4"},cn={key:0,class:"mb-4"}
1,un={class:"has-text-weight-bold has-text-dark is-size-6 mb-2"},mn={key:1},pn={class:"has-text-weight-bold has-text-dark is-size-6 mb-2"},hn={key:1,class:"card p-4 mb-4"},gn={class:"has-text-weight-bold has-text-dark is-size-6 mb-2"},fn={key:2,class:"card p-4 mb-4"},bn={key:0,class:"mb-4"},yn={class:"has-text-weight-bold has-text-dark is-size-6 mb-3"},vn={class:"mr-2"},kn={key:0,href:"https://docs.orgo.space/platform/permissions",target:"_blank"},Cn={class:"icon is-small"},Ln={class:"is-flex is-flex-wrap-wrap",style:{gap:"0.5rem"}},wn={key:0,class:"tag is-warning is-rounded"},_n={key:1,class:"mb-4"},En={class:"h-stack spaced"},$n={class:"has-text-weight-bold has-text-dark is-size-6"},Fn={key:0,class:"tag is-medium is-warning is-rounded"},Tn={key:1,class:"tag is-medium is-success is-rounded"},Sn={key:2,class:"mb-4"},An={class:"h-stack spaced"},Pn={class:"has-text-weight-bold has-text-dark is-size-6"},In={key:0,class:""},Mn={key:2,class:"tag is-small is-rounded"},xn={key:3},Nn={class:"h-stack spaced"},Un={class:"has-text-weight-bold has-text-dark is-size-6"},Dn={class:"mr-1"},Xn={key:0},Vn={key:3,class:"card p-4 mb-4"},Rn={class:"is-size-6 has-text-dark has-text-weight-bold mb-3"},On={key:0,class:"mb-3 has-text-dark"},Qn={class:"has-text-grey is-size-7"},Bn={class:"has-text-weight-semibold"},Gn={key:1,class:"mb-3 has-text-dark"},Wn={class:"has-text-grey is-size-7"},jn={class:"has-text-weight-semibold"},zn={key:2,class:"mb-3 has-text-dark"},qn={class:"has-text-grey is-size-7"},Jn={class:"has-text-weight-semibold"},Hn={key:3,class:"has-text-dark"},Kn={class:"has-text-grey is-size-7"},Yn={class:"has-text-weight-semibold"},Zn={key:0,class:"connection-pending-dot"},eo={key:0,class:"mb-5"},to={class:"is-size-6 has-text-weight-semibold mb-3"},io={class:"has-text-grey has-text-weight-normal"},so={class:"connections-list"},ao=["onClick"],no={class:"connection-row-info"},oo={class:"connection-name"},lo={key:0,class:"connection-headline has-text-grey fs-13"},ro={key:1,class:"connection-location has-text-grey-light fs-12"},co={class:"icon is-small"},uo={class:"connection-row-actions"},mo=["disabled","onClick"],po={class:"is-small"},ho=["disabled","onClick"],go={class:"is-small"},fo={key:0,class:"has-text-centered mt-4"},bo={key:1,class:"mb-5"},yo={class:"is-size-6 has-text-weight-semibold mb-3"},vo={class:"has-text-grey has-text-weight-normal"},ko={class:"connections-list"},Co=["onClick"],Lo={class:"connection-row-info"},wo={class:"connection-name"},_o={key:0,class:"connection-headline has-text-grey fs-13"},Eo={key:1,class:"connection-location has-text-grey-light fs-12"},$o={class:"icon is-small"},Fo={class:"connection-row-actions"},To=["disabled","onClick"],So={class:"is-small"},Ao={key:0,class:"has-text-centered mt-4"},Po={key:2,class:"connection-filters mb-4"},Io={class:"is-size-6 has-text-weight-semibold"},Mo={key:0,class:"has-text-grey has-text-weight-normal"},xo={class:"connection-filters-right"},No={class:"button is-small is-rounded",type:"button"},Uo={class:"icon is-small"},Do={class:"is-hidden-mobile"},Xo={class:"icon-text"},Vo={class:"icon is-small"},Ro={class:"icon-text"},Oo={class:"icon is-small"},Qo={class:"icon-text"},Bo={class:"icon is-small"},Go={key:3,class:"connections-list"},Wo={class:"skeleton-avatar-wrap"},jo={class:"connection-row-info"},zo={class:"skeleton-line",style:{width:"140px"}},qo={class:"skeleton-line mt-1",style:{width:"200px"}},Jo={class:"skeleton-line mt-1",style:{width:"100px"}},Ho={class:"skeleton-date-wrap"},Ko={key:4,class:"connections-list"},Yo=["onClick"],Zo={class:"connection-row-info"},el={class:"connection-name"},tl={key:0,class:"connection-headline has-text-grey fs-13"},il={key:1,class:"connection-location has-text-grey-light fs-12"},sl={class:"icon is-small"},al=["onClick"],nl={class:"icon"},ol=["href"],ll={class:"icon"},rl=["href"],dl={class:"icon"},cl=["href"],ul={class:"icon"},ml=["href"],pl={class:"icon"},hl=["href"],gl={class:"icon"},fl=["href"],bl={class:"icon"},yl={key:1,class:"connection-row-date"},vl={class:"has-text-grey-light fs-12"},kl={key:5,class:"has-text-centered mb-4"},Cl={key:6,class:"empty-connections-state"},Ll={key:0,class:"empty-connections-header"},wl={class:"empty-connections-icon"},_l={class:"empty-connections-title"},El={class:"empty-connections-subtitle"},$l={key:1,class:"empty-connections-recommendations"},Fl={key:7,class:"has-text-grey"},Tl={key:0,class:"mb-5 has-text-weight-semibold is-size-7"},Sl={key:1,class:"mt-5 card p-5",style:{"max-width":"718px"}},Al={key:0},Pl={key:2},Il=["disabled"],Ml={key:2,class:"mb-5"},xl={key:0},Nl={key:0,class:"mb-5 mt-3 has-text-weight-semibold is-size-7"},Ul={key:0,class:"pb-3"},Dl={class:"tabs-pill mb-4"},Xl={class:"tabs"},Vl={ref:"logTabsUl"},Rl=["onClick"],Ol={key:0,class:"icon is-small"},Ql={key:0,class:"orgo-table-wrap"},Bl={key:1},Gl={class:"content"},Wl={key:1,class:"orgo-table-wrap"},jl={key:1},zl={key:1},ql={key:2},Jl={key:1,class:"logs-empty"},Hl={class:"logs-empty-icon mb-3"},Kl={class:"logs-empty-message"},Yl={class:"logs-empty-hint mt-2"},Zl={class:"mt-6"},er={key:2},tr={class:"title is-size-3"},ir={class:"mt-5"},sr={class:"file-preview-content has-text-centered"},ar=["src"],nr=["src"],or=["data"],lr={key:3,class:"p-6"},rr={class:"icon is-large mb-4"},dr={class:"is-size-5 mb-4"};function cr(e,t,i,cr,ur,mr){const pr=(0,s.g2)("b-loading"),hr=(0,s.g2)("ProfileCompletionCelebration"),gr=(0,s.g2)("LogoUpload"),fr=(0,s.g2)("ProfileCompletionBar"),br=(0,s.g2)("font-awesome-icon"),yr=(0,s.g2)("b-dropdown-item"),vr=(0,s.g2)("b-dropdown"),kr=(0,s.g2)("b-tooltip"),Cr=(0,s.g2)("router-link"),Lr=(0,s.g2)("UserTypeThumbnail"),wr=(0,s.g2)("UserTags"),_r=(0,s.g2)("ProfileCustomFieldTags"),Er=(0,s.g2)("ProfileAvailability"),$r=(0,s.g2)("BioText"),Fr=(0,s.g2)("LogoThumbnail"),Tr=(0,s.g2)("b-tab-item"),Sr=(0,s.g2)("b-button"),Ar=(0,s.g2)("b-input"),Pr=(0,s.g2)("b-skeleton"),Ir=(0,s.g2)("SystemMembers"),Mr=(0,s.g2)("FeeUserForm"),xr=(0,s.g2)("Payments"),Nr=(0,s.g2)("Contract"),Ur=(0,s.g2)("ListEvent"),Dr=(0,s.g2)("DriveList"),Xr=(0,s.g2)("ProfileReferralTab"),Vr=(0,s.g2)("ProfileCompanyTab"),Rr=(0,s.g2)("b-table-column"),Or=(0,s.g2)("PersonalIdChangeLogDetails"),Qr=(0,s.g2)("b-table"),Br=(0,s.g2)("EmailLogList"),Gr=(0,s.g2)("EntityNotes"),Wr=(0,s.g2)("ProfileTimeline"),jr=(0,s.g2)("b-tabs"),zr=(0,s.g2)("Fee"),qr=(0,s.g2)("b-modal"),Jr=(0,s.g2)("UserShowContent"),Hr=(0,s.g2)("ItemViewModal"),Kr=(0,s.g2)("SendCustomEmailModal"),Yr=(0,s.gN)("safe-html");return(0,s.uX)(),(0,s.CE)("section",{class:(0,a.C4)(["o-minwidth",{"drive-fullscreen-mobile":e.$isMobile()&&"personalDrive"===ur.activeTab}])},[(0,s.bF)(pr,{modelValue:ur.isLoadingItem,"onUpdate:modelValue":t[0]||(t[0]=e=>ur.isLoadingItem=e),"is-full-page":!1},null,8,["modelValue"]),mr.showProfileCompletionCelebration?((0,s.uX)(),(0,s.Wv)(hr,{key:0,"user-id":ur.item.id,onDismissed:mr.onCelebrationDismissed},null,8,["user-id","onDismissed"])):(0,s.Q3)("",!0),ur.item&&!mr.isCurrentUserFeeMandatoryAndExpired?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.bo)((0,s.Lk)("div",l,[(0,s.Lk)("div",r,[(0,s.bF)(gr,{item:ur.item,onClick:t[1]||(t[1]=(0,n.D$)(()=>{},["stop"])),onUserPhotoUploaded:mr.onUserPhotoUploaded},null,8,["item","onUserPhotoUploaded"])],512)],512),[[n.aG,!(e.$isMobile()&&"personalDrive"===ur.activeTab)]]),(0,s.bo)((0,s.Lk)("div",{class:(0,a.C4)(["profile-name mb-3",{"is-flex-direction-column is-align-items-center is-justify-content-center has-text-centered":e.$isMobile()}])},[(0,s.Lk)("div",{class:(0,a.C4)(e.$isMobile()?"has-text-centered":"is-flex is-align-items-center")},[(0,s.Lk)("p",{class:(0,a.C4)([{"is-size-3":!e.$isMobile(),"is-size-4":e.$isMobile()},"m-0 has-text-weight-bold"])},(0,a.v_)(mr.profileDisplayName),3),mr.showProfileCompletion&&!e.$isMobile()?((0,s.uX)(),(0,s.Wv)(fr,{key:0,percentage:ur.item.profileCompletionPercentage,"missing-fields":ur.item.profileCompletionMissingFields,"user-id":ur.item.id,onFocusField:mr.scrollToLogoField},null,8,["percentage","missing-fields","user-id","onFocusField"])):(0,s.Q3)("",!0)],2),(0,s.Lk)("div",d,[e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",c,[ur.item["@id"]!==e.user["@id"]&&e.tenant.settingFeatures.users.hasConnections?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},["none"===ur.connectionStatus?((0,s.uX)(),(0,s.CE)("a",{key:0,class:(0,a.C4)(["button is-light is-rounded is-small",{"is-loading":ur.isLoadingConnection}]),onClick:t[2]||(t[2]=(...e)=>mr.submitConnect&&mr.submitConnect(...e))},[(0,s.Lk)("span",u,[(0,s.bF)(br,{icon:"fa-light fa-user-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Connect")),1)],2)):(0,s.Q3)("",!0),"pending_sent"===ur.connectionStatus?((0,s.uX)(),(0,s.CE)("span",m,[(0,s.Lk)("span",p,[(0,s.bF)(br,{icon:"fa-light fa-clock"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Request pending")),1)])):(0,s.Q3)("",!0),"pending_received"===ur.connectionStatus?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("a",{class:(0,a.C4)(["button is-success is-rounded is-small",{"is-loading":ur.isLoadingConnection}]),onClick:t[3]||(t[3]=(...e)=>mr.acceptConnection&&mr.acceptConnection(...e))},[(0,s.Lk)("span",h,[(0,s.bF)(br,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Accept")),1)],2),(0,s.Lk)("a",{class:(0,a.C4)(["button is-light is-rounded is-small",{"is-loading":ur.isLoadingConnection}]),onClick:t[4]||(t[4]=(...e)=>mr.rejectConnection&&mr.rejectConnection(...e))},[(0,s.Lk)("span",g,[(0,s.bF)(br,{icon:"fa-light fa-times"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Decline")),1)],2)],64)):(0,s.Q3)("",!0),"connected"===ur.connectionStatus?((0,s.uX)(),(0,s.Wv)(vr,{key:3,"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("a",f,[(0,s.Lk)("span",b,[(0,s.bF)(br,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Connected")),1),(0,s.Lk)("span",y,[(0,s.bF)(br,{icon:"fa-light fa-chevron-down"})])])]),default:(0,s.k6)(()=>[(0,s.bF)(yr,{"aria-role":"listitem",onClick:mr.removeConnection},{default:(0,s.k6)(()=>[(0,s.Lk)("span",v,[(0,s.Lk)("span",k,[(0,s.bF)(br,{icon:"fa-light fa-user-minus"}
1)]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove connection")),1)])]),_:1},8,["onClick"])]),_:1})):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0),e.isGranted("ROLE_SUPER_ADMIN")&&ur.item.id!==e.user.id?((0,s.uX)(),(0,s.Wv)(kr,{key:1,label:`Impersonate as ${ur.item.fullName}`,position:"is-left"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)({"is-loading":e.$store.state.isLoadingButton}),onClick:t[5]||(t[5]=(...e)=>mr.impersonateAs&&mr.impersonateAs(...e))},[(0,s.Lk)("button",C,[(0,s.Lk)("span",L,[(0,s.bF)(br,{icon:"fa-light fa-arrows-repeat"})])])],2)]),_:1},8,["label"])):(0,s.Q3)("",!0),mr.canSendEmail?((0,s.uX)(),(0,s.Wv)(kr,{key:2,label:e.$t("Send an email"),position:"is-left"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"button is-light is-small is-rounded",onClick:t[6]||(t[6]=e=>ur.isEmailModalOpen=!0)},[(0,s.Lk)("span",w,[(0,s.bF)(br,{icon:"fa-light fa-paper-plane"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.canManageThisProfile?((0,s.uX)(),(0,s.Wv)(Cr,{key:3,to:{name:"UserUpdate",params:{item:ur.item.id}},class:"button is-light is-small is-rounded"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",_,[(0,s.bF)(br,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",E,(0,a.v_)(e.$t("Edit profile")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]))])],2),[[n.aG,!(e.$isMobile()&&"personalDrive"===ur.activeTab)]]),(0,s.Lk)("div",$,[e.tenant.settingFeatures.users.hasUserTypes?((0,s.uX)(),(0,s.CE)("span",F,[ur.item.type?((0,s.uX)(),(0,s.Wv)(Lr,{key:0,"user-type":ur.item.type,"is-small":!1},null,8,["user-type"])):(0,s.Q3)("",!0),ur.item.userRoles?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:1},(0,s.pI)(ur.item.userRoles,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.id},[t.role&&t.role.isUserType&&parseInt(t.role.id)!==parseInt(e.tenant.settingFeatures.users.guestUserTypeId)&&t.role["@id"]!==ur.item.type?.["@id"]&&(!t.dateEnded||new Date(t.dateEnded)>new Date)?((0,s.uX)(),(0,s.Wv)(Lr,{key:0,class:"mr-1","user-type":t.role,"is-small":!1},null,8,["user-type"])):(0,s.Q3)("",!0)],64))),128)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.onlinePayments.subscriptionSupportProductId&&ur.item.isSupporter?((0,s.uX)(),(0,s.CE)("span",{key:1,class:"icon-text tag supporter-tag is-rounded ml-1",onClick:t[7]||(t[7]=t=>e.$router.push({name:"ProductPay",query:{recurring:"subscription"},params:{item:e.tenant.settingFeatures.onlinePayments.subscriptionSupportProductId}}))},[(0,s.Lk)("span",T,[(0,s.bF)(br,{icon:"fa-light fa-hand-heart"})]),(0,s.Lk)("span",S,(0,a.v_)(e.$t("Supporter")),1)])):(0,s.Q3)("",!0)]),e.$isMobile()&&mr.showProfileCompletion?((0,s.uX)(),(0,s.CE)("div",A,[(0,s.bF)(fr,{percentage:ur.item.profileCompletionPercentage,"missing-fields":ur.item.profileCompletionMissingFields,"user-id":ur.item.id,onFocusField:mr.scrollToLogoField},null,8,["percentage","missing-fields","user-id","onFocusField"])])):(0,s.Q3)("",!0),ur.item["@id"]!==e.user["@id"]?((0,s.uX)(),(0,s.CE)("div",P,[e.tenant.settingFeatures.users.hasConnections?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},["none"===ur.connectionStatus?((0,s.uX)(),(0,s.CE)("a",{key:0,class:(0,a.C4)(["button is-light is-rounded is-small",{"is-loading":ur.isLoadingConnection}]),onClick:t[8]||(t[8]=(...e)=>mr.submitConnect&&mr.submitConnect(...e))},[(0,s.Lk)("span",I,[(0,s.bF)(br,{icon:"fa-light fa-user-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Connect")),1)],2)):(0,s.Q3)("",!0),"pending_sent"===ur.connectionStatus?((0,s.uX)(),(0,s.CE)("span",M,[(0,s.Lk)("span",x,[(0,s.bF)(br,{icon:"fa-light fa-clock"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Request pending")),1)])):(0,s.Q3)("",!0),"pending_received"===ur.connectionStatus?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("a",{class:(0,a.C4)(["button is-success is-rounded is-small",{"is-loading":ur.isLoadingConnection}]),onClick:t[9]||(t[9]=(...e)=>mr.acceptConnection&&mr.acceptConnection(...e))},[(0,s.Lk)("span",N,[(0,s.bF)(br,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Accept")),1)],2),(0,s.Lk)("a",{class:(0,a.C4)(["button is-light is-rounded is-small",{"is-loading":ur.isLoadingConnection}
1]),onClick:t[10]||(t[10]=(...e)=>mr.rejectConnection&&mr.rejectConnection(...e))},[(0,s.Lk)("span",U,[(0,s.bF)(br,{icon:"fa-light fa-times"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Decline")),1)],2)],64)):(0,s.Q3)("",!0),"connected"===ur.connectionStatus?((0,s.uX)(),(0,s.Wv)(vr,{key:3,"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("a",D,[(0,s.Lk)("span",X,[(0,s.bF)(br,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Connected")),1),(0,s.Lk)("span",V,[(0,s.bF)(br,{icon:"fa-light fa-chevron-down"})])])]),default:(0,s.k6)(()=>[(0,s.bF)(yr,{"aria-role":"listitem",onClick:mr.removeConnection},{default:(0,s.k6)(()=>[(0,s.Lk)("span",R,[(0,s.Lk)("span",O,[(0,s.bF)(br,{icon:"fa-light fa-user-minus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove connection")),1)])]),_:1},8,["onClick"])]),_:1})):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.Lk)("div",Q,[(0,s.bF)(jr,{ref:"profileTabs",modelValue:ur.activeTab,"onUpdate:modelValue":[t[31]||(t[31]=e=>ur.activeTab=e),mr.tabChanged],class:(0,a.C4)(["tabs-pill",{"hide-tabs-nav-mobile":e.$isMobile()&&"personalDrive"===ur.activeTab}]),animated:!1},{default:(0,s.k6)(()=>[(0,s.bF)(Tr,{label:e.$t("profile"),value:"profile"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["profile-card",e.$isMobile()?"card p-5":"columns"])},[(0,s.Lk)("div",B,[(0,s.Lk)("div",G,[(0,s.bF)(gr,{item:ur.item,onClick:t[11]||(t[11]=(0,n.D$)(()=>{},["stop"])),onUserPhotoUploaded:mr.onUserPhotoUploaded},null,8,["item","onUserPhotoUploaded"])],512),(0,s.Lk)("div",W,[ur.item.permissions&&(ur.item.permissions.length>0||e.isGranted("ROLE_ADMIN_TENANT"))&&(ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter))?((0,s.uX)(),(0,s.CE)("div",j,[(0,s.Lk)("span",z,(0,a.v_)(e.$t("Permissions")),1),(0,s.bF)(Cr,{to:{name:"UserUpdate",params:{item:ur.item.id},query:{tab:"permissions"}},class:"has-text-weight-semibold has-text-dark"},{default:(0,s.k6)(()=>[ur.item.isRoleAdminTenant?((0,s.uX)(),(0,s.CE)("span",q,(0,a.v_)(e.$t("ROLE_ADMIN_TENANT")),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.item.permissions,(t,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t},[ur.item.isRoleAdminTenant||i>0?((0,s.uX)(),(0,s.CE)("span",J,",")):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(e.$t(t)),1)],64))),128))]),_:1},8,["to"])])):(0,s.Q3)("",!0),e.isGranted("HR_TENANT")||ur.item.id===e.user.id?((0,s.uX)(),(0,s.CE)("div",H,[(0,s.Lk)("span",K,(0,a.v_)(e.$t("Orgo ID")),1),(0,s.Lk)("span",Y,(0,a.v_)(ur.item.id),1)])):(0,s.Q3)("",!0),ur.item.cardId&&e.tenant.settingFeatures.users.hasCardId?((0,s.uX)(),(0,s.CE)("div",Z,[(0,s.Lk)("span",ee,(0,a.v_)(e.$t("cardId")),1),(0,s.Lk)("a",{class:"has-text-weight-semibold",href:"https://"+e.tenant.appHost+"/api/v1/card/"+ur.item.cardId,target:"_blank"},(0,a.v_)(ur.item.cardId.toUpperCase()),9,te)])):(0,s.Q3)("",!0),e.isGranted("HR_TENANT")?((0,s.uX)(),(0,s.CE)("div",ie,[(0,s.Lk)("span",se,(0,a.v_)(e.$t("Tags")),1),(0,s.bF)(wr,{item:ur.item,"is-user":!0,compact:!0},null,8,["item"])])):(0,s.Q3)("",!0),mr.interestField?((0,s.uX)(),(0,s.CE)("div",ae,[(0,s.Lk)("span",ne,(0,a.v_)(e.$t("Interests")),1),(0,s.bF)(_r,{item:ur.item,field:mr.interestField,"add-label":e.$t("Add interest")},null,8,["item","field","add-label"])])):(0,s.Q3)("",!0),mr.skillField?((0,s.uX)(),(0,s.CE)("div",oe,[(0,s.Lk)("span",le,(0,a.v_)(e.$t("Skills")),1),(0,s.bF)(_r,{item:ur.item,field:mr.skillField,"add-label":e.$t("Add a skill")},null,8,["item","field","add-label"])])):(0,s.Q3)("",!0),mr.showAvailability?((0,s.uX)(),(0,s.CE)("div",re,[(0,s.Lk)("span",de,(0,a.v_)(e.$t("Availability")),1),(0,s.bF)(Er,{item:ur.item},null,8,["item"])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.identityValidation&&e.tenant.settingFeatures.identityValidation.isActive&&ur.item&&e.isGranted("HR_ASSISTANT_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("div",ce,[(0,s.Lk)("span",ue,(0,a.v_)(e.$t("Identity")),1),ur.item.identity?.firstName?((0,s.uX)(),(0,s.CE)("p",me,(0,a.v_)(ur.item.identity.firstName)+" "+(0,a.v_)(ur.item.identity.lastName),1)):(0,s.Q3)("",!0),ur.item.identity?((0,s.uX)(),(0,s.CE)("p",{key:1,class:(0,a.C4)(["tag is-small is-rounded",{"is-success":ur.item.identity.isValidated,"is-warning":"pending"===ur.item.identity.status}])},[(0,s.bF)(Cr,{to:{name:"ValidateIdentityAdmin",params:{item:ur.item.identity.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(ur.item.identity.status))+" â",1)]),_:1},8,["to"])],2)):((0,s.uX)(),(0,s.CE)("p",pe,[(0,s.bF)(Cr,{to:{name:"ValidateIdentityUserNoPayment",query:{userId:ur.item.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Upload identity")),1)]),_:1},8,["to"])]))])):(0,s.Q3)("",!0),e.tenant.settingFeatures.adhesion.isActive&&(e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.item.id===e.user.id)?((0,s.uX)(),(0,s.CE)("div",he,[(0,s.Lk)("span",ge,(0,a.v_)(e.$t("Adhesion")),1),ur.item.adhesion?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["tag is-small is-rounded",{"is-success":ur.item.adhesion.isSuccess,"is-danger":["canceled","rejected"].includes(ur.item.adhesion.status),"is-warning":"pending"===ur.item.adhesion.status}])},[(0,s.Lk)("span",fe,(0,a.v_)(e.$filters.format(ur.item.adhesion.updatedDate)),1),ur.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"Adhesion"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(e.adhesionStatusLabel(ur.item.adhesion.status)))+" â ",1)]),_:1})):((0,s.uX)(),(0,s.Wv)(Cr,{key:1,to:{name:"Adhesion",query:{u:ur.item.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(e.adhesionStatusLabel(ur.item.adhesion.status)))+" â ",1)]),_:1},8,["to"]))],2)):(0,s.Q3)("",!0),ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.item.adhesion?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",be," - ")),ur.item.id!==e.user.id&&!e.isGranted("HR_LOCAL",ur.item.localCenter)||!e.isGrantedAdhesion(ur.item)||ur.item.adhesion?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",ye,[ur.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"Adhesion"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Fill in the form"))+" â ",1)]),_:1})):((0,s.uX)(),(0,s.Wv)(Cr,{key:1,to:{name:"Adhesion",query:{u:ur.item.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Fill in the form"))+" â ",1)]),_:1},8,["to"]))]))])):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",{class:(0,a.C4)(["profile-info",e.$isMobile()?"":"column"])},[(0,s.Lk)("div",ve,[(0,s.Lk)("div",ke,[(0,s.Lk)("div",Ce,[ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("span",Le,[(0,s.Lk)("span",{class:(0,a.C4)("ACTIVE"===ur.item.status?"dot success":"dot danger")},null,2),(0,s.Lk)("span",we,(0,a.v_)(e.$t(ur.item.status.toLocaleLowerCase())),1)])):(0,s.Q3)("",!0),"UNAPPRO
1VED"!==ur.item.status&&"WAITING_LIST"!==ur.item.status||!e.tenant.settingFeatures.users.hasManualApprove||!1===e.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions&&!e.isGranted("HR_TENANT")?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",_e,[(0,s.bF)(kr,{label:e.$t("approve"),position:"is-top"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{onClick:t[12]||(t[12]=e=>mr.changeStatus("ACTIVE"))},[(0,s.Lk)("span",Ee,[(0,s.bF)(br,{icon:"fa-light fa-check"})])])]),_:1},8,["label"]),"UNAPPROVED"===ur.item.status?((0,s.uX)(),(0,s.Wv)(kr,{key:0,label:e.$t("addToWaitingList"),position:"is-top",class:"ml-1"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{onClick:t[13]||(t[13]=e=>mr.changeStatus("WAITING_LIST"))},[(0,s.Lk)("span",$e,[(0,s.bF)(br,{icon:"fa-light fa-clock"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0)])),e.tenant.settingFeatures.users.hasUserTypes?((0,s.uX)(),(0,s.CE)("span",Fe,[ur.item.type?((0,s.uX)(),(0,s.Wv)(Lr,{key:0,"user-type":ur.item.type,"is-small":!1},null,8,["user-type"])):(0,s.Q3)("",!0),ur.item.userRoles?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:1},(0,s.pI)(ur.item.userRoles,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.id},[t.role&&t.role.isUserType&&parseInt(t.role.id)!==parseInt(e.tenant.settingFeatures.users.guestUserTypeId)&&t.role["@id"]!==ur.item.type?.["@id"]&&(!t.dateEnded||new Date(t.dateEnded)>new Date)?((0,s.uX)(),(0,s.Wv)(Lr,{key:0,"user-type":t.role,"is-small":!1},null,8,["user-type"])):(0,s.Q3)("",!0)],64))),128)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.onlinePayments.subscriptionSupportProductId&&ur.item.isSupporter?((0,s.uX)(),(0,s.CE)("span",{key:3,class:"icon-text tag supporter-tag is-rounded is-hidden-mobile",onClick:t[14]||(t[14]=t=>e.$router.push({name:"ProductPay",query:{recurring:"subscription"},params:{item:e.tenant.settingFeatures.onlinePayments.subscriptionSupportProductId}}))},[(0,s.Lk)("span",Te,[(0,s.bF)(br,{icon:"fa-light fa-hand-heart"})]),(0,s.Lk)("span",Se,(0,a.v_)(e.$t("Supporter")),1)])):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",Ae,[(0,s.Lk)("p",Pe,[ur.item.email?((0,s.uX)(),(0,s.Wv)(kr,{key:0,label:ur.item.email,position:"is-bottom","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{onClick:t[15]||(t[15]=e=>mr.copyToClipboardAndSnackbar(ur.item.email))},[(0,s.Lk)("span",Ie,[(0,s.bF)(br,{class:"is-size-3",icon:"fa-light fa-envelope"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),ur.item.phoneNumber?((0,s.uX)(),(0,s.Wv)(kr,{key:1,label:ur.item.phoneNumber,position:"is-bottom","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{onClick:t[16]||(t[16]=e=>mr.copyToClipboardAndSnackbar(ur.item.phoneNumber))},[(0,s.Lk)("span",Me,[(0,s.bF)(br,{class:"is-size-3",icon:"fa-light fa-mobile"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),ur.item.profileWebsite&&"-"!==ur.item.profileWebsite?((0,s.uX)(),(0,s.CE)("a",{key:2,href:ur.item.profileWebsite,target:"_blank"},[(0,s.Lk)("span",Ne,[(0,s.bF)(br,{icon:"fa-light fa-globe"})])],8,xe)):(0,s.Q3)("",!0),ur.item.profileFacebook&&"-"!==ur.item.profileFacebook?((0,s.uX)(),(0,s.CE)("a",{key:3,href:ur.item.profileFacebook,target:"_blank"},[(0,s.Lk)("span",De,[(0,s.bF)(br,{icon:"fab fa-facebook"})])],8,Ue)):(0,s.Q3)("",!0),ur.item.profileLinkedin&&"-"!==ur.item.profileLinkedin?((0,s.uX)(),(0,s.CE)("a",{key:4,href:ur.item.profileLinkedin,target:"_blank"},[(0,s.Lk)("span",Ve,[(0,s.bF)(br,{icon:"fab fa-linkedin"})])],8,Xe)):(0,s.Q3)("",!0),ur.item.profileTwitter&&"-"!==ur.item.profileTwitter?((0,s.uX)(),(0,s.CE)("a",{key:5,href:ur.item.profileTwitter,target:"_blank"},[(0,s.Lk)("span",Oe,[(0,s.bF)(br,{icon:"fab fa-x-twitter"})])],8,Re)):(0,s.Q3)("",!0),ur.item.profileSignal&&"-"!==ur.item.profileSignal?((0,s.uX)(),(0,s.CE)("a",{key:6,href:"https://signal.me/#eu/"+ur.item.profileSignal,target:"_blank"},[(0,s.Lk)("span",Be,[(0,s.bF)(br,{icon:"fab fa-signal-messenger"})])],8,Qe)):(0,s.Q3)("",!0),ur.item.profileBsky&&"-"!==ur.item.profileBsky?((0,s.uX)(),(0,s.CE)("a",{key:7,href:ur.item.profileBsky,target:"_blank"},[(0,s.Lk)("span",We,[(0,s.bF)(br,{icon:"fab fa-bluesky"})])],8,Ge)):(0,s.Q3)("",!0),ur.item.profileInstagram&&"-"!==ur.item.profileInstagram?((0,s.uX)(),(0,s.CE)("a",{key:8,href:ur.item.profileInstagram,target:"_blank"},[(0,s.Lk)("span",ze,[(0,s.bF)(br,{icon:"fab fa-instagram"})])],8,je)):(0,s.Q3)("",!0),ur.item.profileTelegram&&"-"!==ur.item.profileTelegram?((0,s.uX)(),(0,s.CE)("a",{key:9,href:ur.item.profileTelegram,target:"_blank"},[(0,s.Lk)("span",Je,[(0,s.bF)(br,{icon:"fab fa-telegram"})])],8,qe)):(0,s.Q3)("",!0),ur.item.profileTiktok&&"-"!==ur.item.profileTiktok?((0,s.uX)(),(0,s.CE)("a",{key:10,href:ur.item.profileTiktok,target:"_blank"},[(0,s.Lk)("span",Ke,[(0,s.bF)(br,{icon:"fab fa-tiktok"})])],8,He)):(0,s.Q3)("",!0)])])]),ur.item.bio?((0,s.uX)(),(0,s.CE)("div",Ye,[(0,s.Lk)("p",Ze,(0,a.v_)(e.$t("Bio")),1),(0,s.bF)($r,{bio:ur.item.bio,class:"pl-3"},null,8,["bio"])])):(0,s.Q3)("",!0),t[68]||(t[68]=(0,s.Lk)("hr",{class:"mt-0 mb-4"},null,-1)),(0,s.Lk)("div",et,[ur.item.age?((0,s.uX)(),(0,s.CE)("span",tt,[(0,s.Lk)("span",it,[(0,s.bF)(br,{icon:"fa-light fa-cake-candles"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",st,(0,a.v_)(e.$t("age")),1),ur.item.dateBirth&&e.isGranted("HR_TENANT")||e.isGranted("ADMIN_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("span",at,(0,a.v_)(ur.item.age)+" ("+(0,a.v_)(mr.formatDateOnlyLong(ur.item.dateBirth))+")",1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),e.isGranted("HR_TENANT")||ur.item.id===e.user.id?((0,s.uX)(),(0,s.CE)("span",nt,[(0,s.Lk)("span",ot,[(0,s.bF)(br,{icon:"fa-light fa-id-card"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",lt,(0,a.v_)(e.$t("Orgo ID")),1),(0,s.Lk)("span",null,(0,a.v_)(ur.item.id),1)])])):(0,s.Q3)("",!0),ur.item.townCurrent?((0,s.uX)(),(0,s.CE)("span",rt,[(0,s.Lk)("span",dt,[(0,s.bF)(br,{icon:"fa-light fa-house"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",ct,(0,a.v_)(e.$t("townCurrent")),1),ur.item.townCurrent.nameWithCounty?((0,s.uX)(),(0,s.CE)("span",ut,(0,a.v_)(ur.item.townCurrent.nameWithCounty),1)):((0,s.uX)(),(0,s.CE)("span",mt,(0,a.v_)(ur.item.townCurrent.name),1)),e.tenant.isInternational?((0,s.uX)(),(0,s.CE)("span",pt,", "+(0,a.v_)(ur.item.townCurrent.country.name),1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),ur.item.townFrom?((0,s.uX)(),(0,s.CE)("span",ht,[(0,s.Lk)("span",gt,[(0,s.bF)(br,{icon:"fa-light fa-house-heart"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",ft,(0,a.v_)(e.$t("townFrom")),1),(0,s.Lk)("span",null,(0,a.v_)(ur.item.townFrom.name),1)])])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(mr.localCenterAncestorsRootFirst,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"lc-ancestor-"+t.id},[e.tenant.settingFeatures.localCenter.hasParent?((0,s.uX)(),(0,s.CE)("span",bt,[(0,s.Lk)("span",yt,[(0,s.bF)(br,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",vt,(0,a.v_)(e.$t("Parent chapter")),1),(0,s.Lk)("span",null,[(0,s.bF)(Cr,{to:{name:"LocalCenterShow",params:{item:t.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(t.name),1)]),_:2},1032,["to"])])])])):(0,s.Q3)("",!0)],64))),128)),ur.item.localCenter&&!ur.item.localCenter.isParent?((0,s.uX)(),(0,s.CE)("span",kt,[(0,s.Lk)("span",Ct,[(0,s.bF)(br,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",Lt,(0,a.v_)(e.$t((e.tenant.settingFeatures.localCenter.hasParent,"Chapter"))),1),(0,s.Lk)("span",null,[(0,s.bF)(Cr,{to:{name:"LocalCenterShow",params:{item:ur.item.localCenter.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(ur.item.localCenter.name)+" "+(0,a.v_)(e.tenant.settingFeatures.localCenter.hasNameDifferentThanTown&&ur.item.localCenter.town?ur.item.localCenter.town.name:null),1)]),_:1},8,["to"]),(e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.item.id===e.user.id)&&e.tenant.settingFeatures.localCenter.isActive?((0,s.uX)(),(0,s.CE)("span",wt)):(0,s.Q3)("",!0)])])])):(0,s.Q3)("",!0),ur.item.companyFeeStatus?.companyUuid?((0,s.uX)(),(0,s.CE)("span",_t,[(0,s.Lk)("span",Et,[(0,s.bF)(br,{icon:"fa-light fa-building"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",$t,(0,a.v_)(e.$t("Company")),1
1),mr.canOpenCompanyPage?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"CompanyShow",params:{uuid:ur.item.companyFeeStatus.companyUuid}},class:"is-inline-flex is-align-items-center",style:{gap:"0.5rem"}},{default:(0,s.k6)(()=>[mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo),alt:ur.item.companyFeeStatus.companyName,style:{height:"20px",width:"auto","border-radius":"4px"}},null,8,Ft)):(0,s.Q3)("",!0),(0,s.Lk)("span",null,(0,a.v_)(ur.item.companyFeeStatus.companyName),1)]),_:1},8,["to"])):((0,s.uX)(),(0,s.CE)("span",Tt,[mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo),alt:ur.item.companyFeeStatus.companyName,style:{height:"20px",width:"auto","border-radius":"4px"}},null,8,St)):(0,s.Q3)("",!0),(0,s.Lk)("span",null,(0,a.v_)(ur.item.companyFeeStatus.companyName),1)]))])])):(0,s.Q3)("",!0),e.isGranted("HR_TENANT")&&!ur.item.dateJoinedFullMember?((0,s.uX)(),(0,s.CE)("span",At,[(0,s.Lk)("span",Pt,[(0,s.bF)(br,{icon:"fa-light fa-pen-nib"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",It,(0,a.v_)(e.$t("Registered on")),1),(0,s.Lk)("span",null,[(0,s.eW)((0,a.v_)(mr.formatDateOnlyLong(ur.item.dateJoined))+" ",1),mr.isDateJoinedToday?((0,s.uX)(),(0,s.CE)("span",Mt,"("+(0,a.v_)(e.$filters.fromNow(ur.item.dateCreated))+")",1)):((0,s.uX)(),(0,s.CE)("span",xt,(0,a.v_)(e.$filters.fromNow(ur.item.dateJoined)),1))])])])):(0,s.Q3)("",!0),ur.item.dateJoinedFullMember?((0,s.uX)(),(0,s.CE)("span",Nt,[(0,s.Lk)("span",Ut,[(0,s.bF)(br,{icon:"fa-light fa-pen-nib"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",Dt,(0,a.v_)(e.$t("memberSince")),1),(0,s.Lk)("span",null,[(0,s.eW)((0,a.v_)(mr.formatDateOnlyLong(ur.item.dateJoinedFullMember))+" ",1),(0,s.Lk)("span",null,"("+(0,a.v_)(e.$filters.fromNow(ur.item.dateJoinedFullMember))+")",1)])])])):(0,s.Q3)("",!0),ur.item.address&&(e.isGranted("HR_TENANT")||ur.item.id===e.user.id)?((0,s.uX)(),(0,s.CE)("span",Xt,[(0,s.Lk)("span",Vt,[(0,s.bF)(br,{icon:"fa-light fa-user"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",Rt,(0,a.v_)(e.$t("Address")),1),(0,s.Lk)("span",null,(0,a.v_)(ur.item.address),1)])])):(0,s.Q3)("",!0),ur.item.postalCode&&(e.isGranted("HR_TENANT")||ur.item.id===e.user.id)?((0,s.uX)(),(0,s.CE)("span",Ot,[(0,s.Lk)("span",Qt,[(0,s.bF)(br,{icon:"fa-light fa-user"})]),(0,s.Lk)("span",null,[(0,s.Lk)("span",Bt,(0,a.v_)(e.$t("Postal code")),1),(0,s.Lk)("span",null,(0,a.v_)(ur.item.postalCode),1)])])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",Gt,[ur.item.age||ur.item.dateJoinedFullMember?((0,s.uX)(),(0,s.CE)("div",Wt,[ur.item.age?((0,s.uX)(),(0,s.CE)("div",jt,[(0,s.Lk)("span",zt,(0,a.v_)(e.$t("age")),1),t[41]||(t[41]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",qt,[(0,s.eW)((0,a.v_)(ur.item.age)+" ",1),ur.item.dateBirth&&e.isGranted("HR_TENANT")||e.isGranted("ADMIN_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("span",Jt,"("+(0,a.v_)(mr.formatDateOnlyLong(ur.item.dateBirth))+")",1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),ur.item.dateJoinedFullMember?((0,s.uX)(),(0,s.CE)("div",Ht,[(0,s.Lk)("span",Kt,(0,a.v_)(e.$t("memberSince")),1),t[42]||(t[42]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Yt,[(0,s.eW)((0,a.v_)(mr.formatDateOnlyLong(ur.item.dateJoinedFullMember))+" ",1),(0,s.Lk)("span",null,"( "+(0,a.v_)(e.$filters.fromNow(ur.item.dateJoinedFullMember))+" )",1)])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.item.townCurrent||ur.item.townFrom?((0,s.uX)(),(0,s.CE)("div",Zt,[ur.item.townCurrent?((0,s.uX)(),(0,s.CE)("div",ei,[(0,s.Lk)("span",ti,(0,a.v_)(e.$t("townCurrent")),1),t[43]||(t[43]=(0,s.Lk)("br",null,null,-1)),ur.item.townCurrent.nameWithCounty?((0,s.uX)(),(0,s.CE)("span",ii,(0,a.v_)(ur.item.townCurrent.nameWithCounty),1)):((0,s.uX)(),(0,s.CE)("span",si,(0,a.v_)(ur.item.townCurrent.name),1)),e.tenant.isInternational?((0,s.uX)(),(0,s.CE)("span",ai," , "+(0,a.v_)(ur.item.townCurrent.country.name),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.item.townFrom?((0,s.uX)(),(0,s.CE)("div",ni,[(0,s.Lk)("span",oi,(0,a.v_)(e.$t("townFrom")),1),t[44]||(t[44]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",li,(0,a.v_)(ur.item.townFrom.name),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.Lk)("div",ri,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(mr.localCenterAncestorsRootFirst,i=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"lc-ancestor-"+i.id},[e.tenant.settingFeatures.localCenter.hasParent?((0,s.uX)(),(0,s.CE)("div",di,[(0,s.Lk)("span",ci,(0,a.v_)(e.$t("Parent chapter")),1),t[45]||(t[45]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",ui,[(0,s.bF)(Cr,{class:"profile-chapter-link",to:{name:"LocalCenterShow",params:{item:i.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(i.name),1)]),_:2},1032,["to"])])])):(0,s.Q3)("",!0)],64))),128)),ur.item.localCenter&&!ur.item.localCenter.isParent?((0,s.uX)(),(0,s.CE)("div",mi,[(0,s.Lk)("span",pi,(0,a.v_)(e.$t((e.tenant.settingFeatures.localCenter.hasParent,"Chapter"))),1),t[46]||(t[46]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",hi,[(0,s.bF)(Cr,{class:"profile-chapter-link",to:{name:"LocalCenterShow",params:{item:ur.item.localCenter.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(ur.item.localCenter.name)+" "+(0,a.v_)(e.tenant.settingFeatures.localCenter.hasNameDifferentThanTown&&ur.item.localCenter.town?ur.item.localCenter.town.name:null),1)]),_:1},8,["to"]),(e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.item.id===e.user.id)&&e.tenant.settingFeatures.localCenter.isActive?((0,s.uX)(),(0,s.CE)("span",gi)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)]),ur.item.companyFeeStatus?.companyUuid?((0,s.uX)(),(0,s.CE)("div",fi,[(0,s.Lk)("div",bi,[(0,s.Lk)("span",yi,(0,a.v_)(e.$t("Company")),1
1),t[47]||(t[47]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",vi,[mr.canOpenCompanyPage?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"CompanyShow",params:{uuid:ur.item.companyFeeStatus.companyUuid}},class:"is-inline-flex is-align-items-center",style:{gap:"0.5rem"}},{default:(0,s.k6)(()=>[mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo),alt:ur.item.companyFeeStatus.companyName,style:{height:"24px",width:"auto","border-radius":"4px"}},null,8,ki)):(0,s.Q3)("",!0),(0,s.Lk)("span",null,(0,a.v_)(ur.item.companyFeeStatus.companyName),1)]),_:1},8,["to"])):((0,s.uX)(),(0,s.CE)("span",Ci,[mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:mr.companyLogoUrl(ur.item.companyFeeStatus.companyLogo),alt:ur.item.companyFeeStatus.companyName,style:{height:"24px",width:"auto","border-radius":"4px"}},null,8,Li)):(0,s.Q3)("",!0),(0,s.Lk)("span",null,(0,a.v_)(ur.item.companyFeeStatus.companyName),1)]))])])])):(0,s.Q3)("",!0),!ur.item.address&&!ur.item.postalCode||!e.isGranted("HR_TENANT")&&ur.item.id!==e.user.id?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",wi,[ur.item.address?((0,s.uX)(),(0,s.CE)("div",_i,[(0,s.Lk)("span",Ei,(0,a.v_)(e.$t("Address")),1),t[48]||(t[48]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",$i,(0,a.v_)(ur.item.address),1)])):(0,s.Q3)("",!0),ur.item.postalCode?((0,s.uX)(),(0,s.CE)("div",Fi,[(0,s.Lk)("span",Ti,(0,a.v_)(e.$t("Postal code")),1),t[49]||(t[49]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Si,(0,a.v_)(ur.item.postalCode),1)])):(0,s.Q3)("",!0)]))]),(0,s.Lk)("div",Ai,[e.isGranted("HR_TENANT")&&!ur.item.dateJoinedFullMember?((0,s.uX)(),(0,s.CE)("div",Pi,[(0,s.Lk)("span",Ii,(0,a.v_)(e.$t("Registered on")),1),(0,s.Lk)("span",Mi,[(0,s.eW)((0,a.v_)(mr.formatDateOnlyLong(ur.item.dateJoined))+" ",1),(0,s.Lk)("span",xi,[t[50]||(t[50]=(0,s.eW)(" ( ",-1)),mr.isDateJoinedToday?((0,s.uX)(),(0,s.CE)("span",Ni,(0,a.v_)(e.$filters.fromNow(ur.item.dateCreated)),1)):((0,s.uX)(),(0,s.CE)("span",Ui,(0,a.v_)(e.$filters.fromNow(ur.item.dateJoined)),1)),t[51]||(t[51]=(0,s.eW)(" ) ",-1))])])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.resignation.isActive&&(ur.item.resignPending||ur.item.resignApproved)&&(ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter))?((0,s.uX)(),(0,s.CE)("div",Di,[(0,s.Lk)("p",Xi,(0,a.v_)(e.$t("Resignation")),1),ur.item.resignPending?((0,s.uX)(),(0,s.CE)("p",Vi,[(0,s.bF)(Cr,{to:{name:"ResignationRequestShow",params:{item:ur.item.resignPending}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("pending"))+" â",1)]),_:1},8,["to"])])):ur.item.resignApproved?((0,s.uX)(),(0,s.CE)("p",Ri,[(0,s.bF)(Cr,{to:{name:"ResignationRequestShow",params:{item:ur.item.resignApproved}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("approved"))+" â",1)]),_:1},8,["to"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),mr.showCompanyDetails?((0,s.uX)(),(0,s.CE)("div",Oi,[(0,s.Lk)("p",Qi,(0,a.v_)(e.$t("Billing Details")),1),ur.item.companyIdentifier||ur.item.companyName?((0,s.uX)(),(0,s.CE)("div",Bi,[ur.item.companyIdentifier?((0,s.uX)(),(0,s.CE)("div",Gi,[(0,s.Lk)("span",Wi,(0,a.v_)(e.$t("Company identifier")),1),t[52]||(t[52]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",ji,(0,a.v_)(ur.item.companyIdentifier),1)])):(0,s.Q3)("",!0),ur.item.companyName?((0,s.uX)(),(0,s.CE)("div",zi,[(0,s.Lk)("span",qi,(0,a.v_)(e.$t("Company name")),1),t[53]||(t[53]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Ji,(0,a.v_)(ur.item.companyName),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.item.companyAddress||ur.item.companyRegNo?((0,s.uX)(),(0,s.CE)("div",Hi,[ur.item.companyAddress?((0,s.uX)(),(0,s.CE)("div",Ki,[(0,s.Lk)("span",Yi,(0,a.v_)(e.$t("Company address")),1),t[54]||(t[54]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Zi,(0,a.v_)(ur.item.companyAddress),1)])):(0,s.Q3)("",!0),ur.item.companyRegNo?((0,s.uX)(),(0,s.CE)("div",es,[(0,s.Lk)("span",ts,(0,a.v_)(e.$t("Company commerce registry number")),1),t[55]||(t[55]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",is,(0,a.v_)(ur.item.companyRegNo),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),e.tenant.settingFeatures.gamification.isActive?((0,s.uX)(),(0,s.CE)("div",ss,[(0,s.Lk)("div",as,[(0,s.Lk)("div",ns,[(0,s.Lk)("p",os,[e.tenant.settingFeatures.gamification.hasTiers?((0,s.uX)(),(0,s.CE)("span",ls,(0,a.v_)(e.$t("Membership level")),1)):((0,s.uX)(),(0,s.CE)("span",rs,(0,a.v_)(e.$t("badges")),1))]),!ur.isLoading&&e.isGranted("HR_ASSISTANT_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-small is-white is-rounded",onClick:t[17]||(t[17]=t=>e.$router.push({name:"UserUpdate",params:{item:ur.item.id},query:{tab:"badges"}}))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("edit")),1)])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:(0,a.C4)(e.$isMobile()?"v-stack-left":"h-stack")},[e.tenant.settingFeatures.gamification.hasTiers?((0,s.uX)(),(0,s.CE)("span",ds,(0,a.v_)(ur.userTotalPoints)+" "+(0,a.v_)(e.$t("Total Points")),1)):(0,s.Q3)("",!0),mr.currentTierBadge?((0,s.uX)(),(0,s.CE)("span",cs,[(0,s.Lk)("span",null,(0,a.v_)(mr.currentTierBadge.name),1)])):(0,s.Q3)("",!0)],2),e.tenant.settingFeatures.gamification.hasTiers&&mr.tierBadges.length>0?((0,s.uX)(),(0,s.CE)("div",us,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(mr.tierBadges,t=>((0,s.uX)(),(0,s.CE)("div",{key:t.id,class:(0,a.C4)(["tier-badge-card",{"tier-achieved":ur.userTotalPoints>=t.pointsRequired,"tier-locked":ur.userTotalPoints<t.pointsRequired}])},[(0,s.Lk)("div",ms,[(0,s.Lk)("div",ps,[(0,s.bF)(Fr,{item:t,"is-type":"roundMedium"},null,8,["item"])]),(0,s.Lk)("div",hs,[(0,s.Lk)("p",gs,(0,a.v_)(t.name),1),(0,s.Lk)("p",fs,(0,a.v_)(e.$t("Required Points"))+": "+(0,a.v_)(t.pointsRequired),1),ur.userTotalPoints>=t.pointsRequired?((0,s.uX)(),(0,s.CE)("span",bs,[(0,s.Lk)("span",ys,[(0,s.bF)(br,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Achieved")),1)])):((0,s.uX)(),(0,s.CE)("span",vs,[(0,s.Lk)("span",ks,[(0,s.bF)(br,{icon:"fa-light fa-lock"}
1)]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Locked")),1)]))])])],2))),128))])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",null,[!e.tenant.settingFeatures.gamification.hasTiers&&Array.isArray(ur.userBadges)&&0===ur.userBadges.length?((0,s.uX)(),(0,s.CE)("p",Cs,(0,a.v_)(e.$t("noBadgesYet")),1)):(0,s.Q3)("",!0),ur.userBadges&&ur.userBadges.length>0?((0,s.uX)(),(0,s.CE)("div",Ls,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.userBadges,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},[e?.pointsRequired?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ws,[(0,s.Lk)("article",null,[(0,s.bF)(Fr,{item:e.badge,"is-type":"roundMedium"},null,8,["item"]),(0,s.Lk)("p",_s,(0,a.v_)(e.badge.name),1)])]))],64))),128))])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.professions.isActive&&(ur.item.professionIndustry||ur.item.professionHeadline||ur.item.professionOrganisation||ur.item.professionExpertise)?((0,s.uX)(),(0,s.CE)("div",Es,[(0,s.Lk)("div",$s,[(0,s.Lk)("p",Fs,(0,a.v_)(e.$t("profession")),1),mr.hasPermissionForRoles?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"UserUpdate",params:{item:ur.item.id},query:{tab:"profession"}},class:"button is-small is-white is-rounded"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("edit")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),(0,s.Lk)("p",Ts,[ur.item.professionHeadline?((0,s.uX)(),(0,s.CE)("span",Ss,(0,a.v_)(ur.item.professionHeadline),1)):(0,s.Q3)("",!0),ur.item.professionHeadline&&ur.item.professionIndustry?((0,s.uX)(),(0,s.CE)("span",As," ⢠")):(0,s.Q3)("",!0),ur.item.professionIndustry?((0,s.uX)(),(0,s.CE)("span",Ps,[(0,s.bF)(Cr,{to:{name:"ProfessionalList",query:{industry:ur.item.professionIndustry.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(mr.getProfessionTranslation(ur.item.professionIndustry)),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0)]),ur.item.professionExpertise&&431!==ur.item.professionExpertise.id?((0,s.uX)(),(0,s.CE)("p",Is,[(0,s.Lk)("span",Ms,(0,a.v_)(e.$t("Profession expertise")),1),t[56]||(t[56]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",xs,(0,a.v_)(mr.getProfessionTranslation(ur.item.professionExpertise)),1)])):ur.item.professionExpertiseOther?((0,s.uX)(),(0,s.CE)("p",Ns,[(0,s.Lk)("span",Us,(0,a.v_)(e.$t("Profession expertise")),1),t[57]||(t[57]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Ds,(0,a.v_)(ur.item.professionExpertiseOther),1)])):(0,s.Q3)("",!0),ur.item.professionJob&&431!==ur.item.professionJob.id?((0,s.uX)(),(0,s.CE)("p",Xs,[(0,s.Lk)("span",Vs,(0,a.v_)(e.$t("Profession job")),1),t[58]||(t[58]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Rs,(0,a.v_)(mr.getProfessionTranslation(ur.item.professionJob)),1)])):(0,s.Q3)("",!0),ur.item.professionSector||ur.item.professionOrganisation||ur.item.professionOrganisationRole?((0,s.uX)(),(0,s.CE)("div",Os,[ur.item.professionSector?((0,s.uX)(),(0,s.CE)("div",Qs,[(0,s.Lk)("span",Bs,(0,a.v_)(e.$t("Profession sector")),1),t[59]||(t[59]=(0,s.Lk)("br",null,null,-1)),"private"===ur.item.professionSector?((0,s.uX)(),(0,s.CE)("span",Gs,(0,a.v_)(e.$t("Private")),1)):(0,s.Q3)("",!0),"public"===ur.item.professionSector?((0,s.uX)(),(0,s.CE)("span",Ws,(0,a.v_)(e.$t("Public")),1)):(0,s.Q3)("",!0),"ngo"===ur.item.professionSector?((0,s.uX)(),(0,s.CE)("span",js,(0,a.v_)(e.$t("Non-governmental")),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.item.professionOrganisation?((0,s.uX)(),(0,s.CE)("div",zs,[(0,s.Lk)("span",qs,(0,a.v_)(e.$t("Current Organisation/Company")),1),t[60]||(t[60]=(0,s.Lk)("br",null,null,-1)),ur.item.professionOrganisationWebsite?((0,s.uX)(),(0,s.CE)("a",{key:0,href:ur.item.professionOrganisationWebsite,target:"_blank",rel:"noopener noreferrer",class:"has-text-weight-semibold"},(0,a.v_)(ur.item.professionOrganisation),9,Js)):((0,s.uX)(),(0,s.CE)("span",Hs,(0,a.v_)(ur.item.professionOrganisation),1))])):(0,s.Q3)("",!0),ur.item.professionOrganisationRole?((0,s.uX)(),(0,s.CE)("div",Ks,[(0,s.Lk)("span",Ys,(0,a.v_)(e.$t("Current role")),1),t[61]||(t[61]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Zs,(0,a.v_)(ur.item.professionOrganisationRole),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.item.userRoles&&ur.item.userRoles.length>0&&(ur.item.id===e.user.id||e.isGranted(e.tenant.settingFeatures.users.whoCanSeeUserType))?((0,s.uX)(),(0,s.CE)("div",ea,[(0,s.Lk)("div",ta,[(0,s.Lk)("p",ia,(0,a.v_)(e.$t("roles")),1),mr.hasPermissionForRoles?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"UserUpdate",params:{item:ur.item.id},query:{tab:"roles"}},class:"button is-small is-white is-rounded"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("edit")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",sa,[ur.item.userRoles&&ur.item.userRoles.length?((0,s.uX)(),(0,s.CE)("table",aa,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.item.userRoles,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t["@id"]},[!t||!t.role||t.unit&&"Group"===t.unit["@type"]?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("tr",na,[(0,s.Lk)("td",null,[t.unit&&e.user.roleGroups&&e.user.roleGroups.includes(t.unit.id)?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"UserList",query:{unit:t.unit.id}}},{default:(0,s.k6)(()=>[t.unit.isParent?((0,s.uX)(),(0,s.CE)("span",oa,(0,a.v_)(e.$t("Parent chapter")),1)):"LocalCenter"===t.unit["@type"]?((0,s.uX)(),(0,s.CE)("span",la,(0,a.v_)(e.$t("Chapter")),1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(t.unit.name),1)]),_:2},1032,["to"])):t.unit?((0,s.uX)(),(0,s.CE)("span",ra,[t.unit.isParent?((0,s.uX)(),(0,s.CE)("span",da,(0,a.v_)(e.$t("Parent chapter")),1)):"LocalCenter"===t.unit["@type"]?((0,s.uX)(),(0,s.CE)("span",ca,(0,a.v_)(e.$t("Chapter")),1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(t.unit.name),1)])):(0,s.Q3)("",!0),t.unit?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Cr,{key:2,to:{name:"UserList",query:{isGeneralUnit:!0}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.tenant.name),1)]),_:1}))]),(0,s.Lk)("td",null,[(0,s.Lk)("span",ua,(0,a.v_)(t.role.name),1)]),(0,s.Lk)("td",ma,[(0,s.Lk)("span",pa,(0,a.v_)(e.$filters.formatDateOnly(t.dateCreated)),1)]),(0,s.Lk)("td",null,[t.dateEnded?((0,s.uX)(),(0,s.CE)("span",ga,(0,a.v_)(e.$filters.formatDateOnly(t.dateEnded)),1)):((0,s.uX)(),(0,s.CE)("span",ha,(0,a.v_)(e.$t("present")),1))])]))],64))),128))])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.events.trainingEventType&&(ur.trainings.length>0||ur.trainerTrainings.length>0)?((0,s.uX)(),(0,s.CE)("div",fa,[ur.trainings.length>0?((0,s.uX)(),(0,s.CE)("div",ba,[(0,s.Lk)("p",ya,[(0,s.eW)((0,a.v_)(e.$t("trainings"))+" ",1),ur.trainings.length>1?((0,s.uX)(),(0,s.CE)("span",va,"("+(0,a.v_)(ur.trainings.length)+")",1)):(0,s.Q3)("",!0)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.trainings,t=>((0,s.uX)(),(0,s.CE)("p",{key:t["@id"],class:"mb-4 has-text-dark"},[(0,s.Lk)("span",ka,[(0,s.eW)((0,a.v_)(e.$filters.format(t.event.dateTimeBegin))+" ",1),t.event.dateTimeBegin!=t.event.dateTimeEnd?((0,s.uX)(),(0,s.CE)("span",Ca," - "+(0,a.v_)(e.$filters.format(t.event.dateTimeEnd)),1)):(0,s.Q3)("",!0)]),(0,s.bF)(Cr,{to:{name:"EventShow",params:{item:t.event.uuid}},class:"ml-2"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(t.event.name),1)]),_:2},1032,["to"])]))),128))])):(0,s.Q3)("",!0),ur.item.isTrainer?((0,s.uX)(),(0,s.CE)("div",La,[(0,s.Lk)("p",wa,[(0,s.Lk)("strong",null,[(0,s.eW)((0,a.v_)(e.$t("Trainer"))+" ",1),ur.trainerTrainings.length>1?((0,s.uX)(),(0,s.CE)("span",_a,"("+(0,a.v_)(ur.trainerTrainings.length)+")",1)):(0,s.Q3)("",!0)])]),ur.trainerTrainings.length>0?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:0},(0,s.pI)(ur.trainerTrainings,t=>((0,s.uX)(),(0,s.CE)("p",{key:t["@id"],class:"mb-5 has-text-dark"},[(0,s.Lk)("span",Ea,[(0,s.eW)((0,a.v_)(e.$filters.format(t.event.dateTimeBegin))+" ",1),t.event.dateTimeBegin!=t.event.dateTimeEnd?((0,s.uX)(),(0,s.CE)("span",$a," - "+(0,a.v_)(e.$filters.format(t.event.dateTimeEnd)),1)):(0,s.Q3)("",!0)]),(0,s.bF)(Cr,{to:{name:"EventShow",params:{item:t.event.uuid}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(t.event.name),1)]),_:2},1032,["to"])]))),128)):((0,s.uX)(),(0,s.CE)("p",Fa,"-"))])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.events.trainingEventType&&e.tenant.settingFeatures.courses.isActive&&ur.courseEnrollments.length>
10?((0,s.uX)(),(0,s.CE)("div",Ta,[(0,s.Lk)("p",Sa,(0,a.v_)(e.$t("Courses")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.courseEnrollments,i=>((0,s.uX)(),(0,s.CE)("div",{key:i["@id"],class:"mb-0 pb-0"},[t[62]||(t[62]=(0,s.Lk)("hr",{class:"my-4"},null,-1)),(0,s.Lk)("div",Aa,[(0,s.Lk)("div",Pa,[(0,s.Lk)("p",Ia,(0,a.v_)(i.course?.title||e.$t("Unknown course")),1)]),(0,s.Lk)("div",Ma,[(0,s.Lk)("span",xa,[(0,s.Lk)("span",Na,(0,a.v_)(e.$filters.format(i.dateUpdated)),1),(0,s.Lk)("span",{class:(0,a.C4)(["tag is-rounded is-medium",{"is-warning":"in_progress"===i.status,"is-success":"completed"===i.status,"is-info":"enrolled"===i.status,"is-default":!i.status}])},(0,a.v_)(e.$t(i.status||"enrolled")),3)])])])]))),128))])):(0,s.Q3)("",!0),ur.item.importInfo&&(ur.item.importInfo.trainCardId||ur.item.importInfo.crossNumber)?((0,s.uX)(),(0,s.CE)("div",Ua,[(0,s.Lk)("p",Da,(0,a.v_)(e.$t("Imported identifiers")),1),ur.item.importInfo.trainCardId?((0,s.uX)(),(0,s.CE)("p",Xa,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("Training card"))+":",1),(0,s.eW)(" "+(0,a.v_)(ur.item.importInfo.trainCardId),1)])):(0,s.Q3)("",!0),ur.item.importInfo.crossNumber?((0,s.uX)(),(0,s.CE)("p",Va,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("Cross number"))+":",1),(0,s.eW)(" "+(0,a.v_)(ur.item.importInfo.crossNumber),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),mr.hasFamily&&ur.family.length>0&&(ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter))?((0,s.uX)(),(0,s.CE)("div",Ra,[(0,s.Lk)("p",Oa,(0,a.v_)(e.$t("family")),1),e.tenant.settingFeatures.users.hasFamilyMembers?((0,s.uX)(),(0,s.CE)("div",Qa,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.family,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},[e.user?((0,s.uX)(),(0,s.CE)("div",Ba,[(0,s.bF)(Cr,{to:{name:"UserShow",params:{item:e.user.id}}},{default:(0,s.k6)(()=>[(0,s.bF)(Fr,{item:e.user},null,8,["item"]),(0,s.Lk)("p",Ga,(0,a.v_)(e.user.firstName)+" "+(0,a.v_)(e.user.lastName),1)]),_:2},1032,["to"])])):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0),e.tenant.settingFeatures.users.hasFamilyNonMembers&&ur.family.length>0&&ur.family.find(e=>!e.user)?((0,s.uX)(),(0,s.CE)("div",Wa,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.family,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"non-member-"+e.id},[e.user?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ja,[(0,s.Lk)("p",za,[(0,s.eW)((0,a.v_)(e.name)+" ",1),e.email?((0,s.uX)(),(0,s.CE)("span",qa,"⢠"+(0,a.v_)(e.email),1)):(0,s.Q3)("",!0),e.phone?((0,s.uX)(),(0,s.CE)("span",Ja,"⢠"+(0,a.v_)(e.phone),1)):(0,s.Q3)("",!0)]),t[63]||(t[63]=(0,s.Lk)("hr",{class:"mt-3"},null,-1))]))],64))),128))])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),mr.infoCustomFields.length>0&&(!ur.item.localCenter||e.isGranted("HR_LOCAL",ur.item.localCenter))?((0,s.uX)(),(0,s.CE)("div",Ha,[(0,s.Lk)("p",Ka,(0,a.v_)(e.$t("info")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(mr.infoCustomFields,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"mt-4"},[(0,s.Lk)("p",Ya,(0,a.v_)(e.name),1),(0,s.Lk)("p",Za,["boolean"===e.fieldType&&mr.customFieldValue(ur.item,e)?((0,s.uX)(),(0,s.CE)("span",en,[(0,s.Lk)("span",tn,[(0,s.bF)(br,{icon:"fa-light fa-check is-success"})])])):"file"===e.fieldType&&mr.customFieldValue(ur.item,e)?((0,s.uX)(),(0,s.CE)("span",sn,[(0,s.Lk)("a",{href:"#",class:"is-flex is-align-items-center",onClick:(0,n.D$)(t=>mr.openFilePreview(mr.customFieldValue(ur.item,e)),["prevent"])},[(0,s.Lk)("span",nn,[(0,s.bF)(br,{icon:mr.getFileIcon(mr.customFieldValue(ur.item,e).mimeType)},null,8,["icon"])]),(0,s.eW)(" "+(0,a.v_)(mr.customFieldValue(ur.item,e).originalName),1)],8,an)])):mr.customFieldValue(ur.item,e)?(0,s.bo)(((0,s.uX)(),(0,s.CE)("span",on,null,512)),[[Yr,mr.customFieldValue(ur.item,e)]]):((0,s.uX)(),(0,s.CE)("span",ln," - "))])]))),128))])):(0,s.Q3)("",!0),(0,s.Lk)("div",rn,[mr.interestField||mr.skillField?((0,s.uX)(),(0,s.CE)("div",dn,[mr.interestField?((0,s.uX)(),(0,s.CE)("div",cn,[(0,s.Lk)("p",un,(0,a.v_)(e.$t("Interests")),1),(0,s.bF)(_r,{item:ur.item,field:mr.interestField,"add-label":e.$t("Add interest")},null,8,["item","field","add-label"])])):(0,s.Q3)("",!0),mr.skillField?((0,s.uX)(),(0,s.CE)("div",mn,[(0,s.Lk)("p",pn,(0,a.v_)(e.$t("Skills")),1),(0,s.bF)(_r,{item:ur.item,field:mr.skillField,"add-label":e.$t("Add a skill")},null,8,["item","field","add-label"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),mr.showAvailability?((0,s.uX)(),(0,s.CE)("div",hn,[(0,s.Lk)("p",gn,(0,a.v_)(e.$t("Availability")),1),(0,s.bF)(Er,{item:ur.item},null,8,["item"])])):(0,s.Q3)("",!0),mr.showPermissionIdentityAdhesion?((0,s.uX)(),(0,s.CE)("div",fn,[ur.item.permissions&&(ur.item.permissions.length>0||e.isGranted("ROLE_ADMIN_TENANT"))&&(ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter))?((0,s.uX)(),(0,s.CE)("div",bn,[(0,s.Lk)("p",yn,[(0,s.Lk)("span",vn,(0,a.v_)(e.$t("Permissions")),1),e.isGranted("HR_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("a",kn,[(0,s.Lk)("span",Cn,[(0,s.bF)(br,{icon:"fa-light fa-circle-info"})])])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",Ln,[ur.item.isRoleAdminTenant?((0,s.uX)(),(0,s.CE)("span",wn,(0,a.v_)(e.$t("ROLE_ADMIN_TENANT")),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.item.permissions,t=>((0,s.uX)(),(0,s.CE)("span",{key:t,class:"tag is-rounded is-default"},(0,a.v_)(e.$t(t)),1))),128))])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.resignation.isActive&&(ur.item.resignPending||ur.item.resignApproved)&&(ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter))?((0,s.uX)(),(0,s.CE)("div",_n,[(0,s.Lk)("div",En,[(0,s.Lk)("p",$n,(0,a.v_)(e.$t("Resignation")),1),ur.item.resignPending?((0,s.uX)(),(0,s.CE)("p",Fn,[(0,s.bF)(Cr,{to:{name:"ResignationRequestShow",params:{item:ur.item.resignPending}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("pending"))+" â",1)]),_:1},8,["to"])])):ur.item.resignApproved?((0,s.uX)(),(0,s.CE)("p",Tn,[(0,s.bF)(Cr,{to:{name:"ResignationRequestShow",params:{item:ur.item.resignApproved}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("approved"))+" â",1)]),_:1},8,["to"])])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.identityValidation&&e.tenant.settingFeatures.identityValidation.isActive&&ur.item&&e.isGranted("HR_ASSISTANT_LOCAL",ur.item.localCenter)?((0,s.uX)(),(0,s.CE)("div",Sn,[(0,s.Lk)("div",An,[(0,s.Lk)("p",Pn,(0,a.v_)(e.$t("Identity")),1),ur.item.identity?.firstName?((0,s.uX)(),(0,s.CE)("p",In,(0,a.v_)(ur.item.identity.firstName)+" "+(0,a.v_)(ur.item.identity.lastName),1)):(0,s.Q3)("",!0),ur.item.identity?((0,s.uX)(),(0,s.CE)("p",{key:1,class:(0,a.C4)(["tag is-small is-rounded",{"is-success":ur.item.identity.isValidated,"is-warning":"pending"===ur.item.identity.status}])},[(0,s.bF)(Cr,{to:{name:"ValidateIdentityAdmin",params:{item:ur.item.identity.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(ur.item.identity.status))+" â",1)]),_:1},8,["to"])],2)):((0,s.uX)(),(0,s.CE)("p",Mn,[(0,s.bF)(Cr,{to:{name:"ValidateIdentityUserNoPayment",query:{userId:ur.item.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Upload identity")),1)]),_:1},8,["to"])]))])])):(0,s.Q3)("",!0),e.tenant.settingFeatures.adhesion.isActive&&(e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.item.id===e.user.id)?((0,s.uX)(),(0,s.CE)("div",xn,[(0,s.Lk)("div",Nn,[(0,s.Lk)("p",Un,(0,a.v_)(e.$t("Adhesion")),1),(0,s.Lk)("div",null,[ur.item.adhesion?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["tag is-small is-rounded",{"is-success":ur.item.adhesion.isSuccess,"is-danger":["canceled","rejected"].includes(ur.item.adhesion.status),"is-warning":"pending"===ur.item.adhesion.status}])},[(0,s.Lk)("span",Dn,(0,a.v_)(e.$filters.format(ur.item.adhesion.updatedDate)),1),ur.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"Adhesion"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(e.adhesionStatusLabel(ur.item.adhesion.status)))+" â ",1)]),_:1})):((0,s.uX)(),(0,s.Wv)(Cr,{key:1,to:{name:"Adhesion",query:{u:ur.item.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(e.adhesionStatusLabel(ur.item.adhesion.status)))+" â ",1)]),_:1},8,["to"]))],2)):(0,s.Q3)("",!0)]),ur.item.id!==e.user.id&&!e.isGranted("HR_LOCAL",ur.item.localCenter)||!e.isGrantedAdhesion(ur.item)||ur.item.adhesion?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",Xn,[ur.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"Adhesion"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Fill in the form"))+" â ",1)]),_:1})):((0,s.uX)(),(0,s.Wv)(Cr,{key:1,to:{name:"Adhesion",query:{u:ur.item.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Fill in the form"))+" â ",1)]),_:1},8,["to"]))]))])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),mr.showCompanyDetails?((0,s.uX)(),(0,s.CE)("div",Vn,[(0,s.Lk)("p",Rn,(0,a.v_)(e.$t("Billing Details")),1),ur.item.companyIdentifier?((0,s.uX)(),(0,s.CE)("p",On,[(0,s.Lk)("span",Qn,(0,a.v_)(e.$t("Company identifier")),1),t[64]||(t[64]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Bn,(0,a.v_)(ur.item.companyIdentifier),1)])):(0,s.Q3)("",!0),ur.item.companyName?((0,s.uX)(),(0,s.CE)("p",Gn,[(0,s.Lk)("span",Wn,(0,a.v_)(e.$t("Company name")),1),t[65]||(t[65]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",jn,(0,a.v_)(ur.item.companyName),1)])):(0,s.Q3)("",!0),ur.item.companyAddress?((0,s.uX)(),(0,s.CE)("p",zn,[(0,s.Lk)("span",qn,(0,a.v_)(e.$t("Company address")),1),t[66]||(t[66]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Jn,(0,a.v_)(ur.item.companyAddress),1)])):(0,s.Q3)("",!0),ur.item.companyRegNo?((0,s.uX)(),(0,s.CE)("p",Hn,[(0,s.Lk)("span",Kn,(0,a.v_)(e.$t("Company commerce registry number")),1),t[67]||(t[67]=(0,s.Lk)("br",null,null,-1)),(0,s.Lk)("span",Yn,(0,a.v_)(ur.item.companyRegNo),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.isGranted("HR_TENANT")?((0,s.uX)(),(0,s.Wv)(wr,{key:4,item:ur.item,"is-user":!0,class:"p-5 mb-4"}
1,null,8,["item"])):(0,s.Q3)("",!0)])],2)],2)]),_:1},8,["label"]),e.tenant.settingFeatures.users.hasConnections&&ur.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Tr,{key:0,value:"connections"},{header:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("My Network"))+" ",1),ur.pendingConnectionsCount>0?((0,s.uX)(),(0,s.CE)("span",Zn)):(0,s.Q3)("",!0)]),default:(0,s.k6)(()=>[(0,s.bF)(pr,{modelValue:ur.isLoadingConnections,"onUpdate:modelValue":t[18]||(t[18]=e=>ur.isLoadingConnections=e),"is-full-page":!1},null,8,["modelValue"]),"connections"===ur.activeTab?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[ur.item.id===e.user.id&&ur.pendingConnectionsReceived.length>0?((0,s.uX)(),(0,s.CE)("div",eo,[(0,s.Lk)("h4",to,[(0,s.eW)((0,a.v_)(e.$t("Pending requests"))+" ",1),(0,s.Lk)("span",io,"("+(0,a.v_)(ur.pendingReceivedTotal)+")",1)]),(0,s.Lk)("div",so,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.pendingConnectionsReceived,e=>((0,s.uX)(),(0,s.CE)("div",{key:"received-"+e.id,class:"connection-row-card"},[(0,s.Lk)("div",{class:"connection-row-link",onClick:t=>mr.openUserModal(e.requester.id)},[(0,s.bF)(Fr,{item:e.requester,"is-type":"roundMedium"},null,8,["item"]),(0,s.Lk)("div",no,[(0,s.Lk)("strong",oo,(0,a.v_)(e.requester.fullName),1),e.requester.professionHeadline?((0,s.uX)(),(0,s.CE)("span",lo,(0,a.v_)(e.requester.professionHeadline),1)):(0,s.Q3)("",!0),e.requester.townCurrent?((0,s.uX)(),(0,s.CE)("span",ro,[(0,s.Lk)("span",co,[(0,s.bF)(br,{icon:"fa-light fa-location-dot"})]),(0,s.eW)(" "+(0,a.v_)(e.requester.townCurrent.name),1)])):(0,s.Q3)("",!0)])],8,ao),(0,s.Lk)("div",uo,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-success is-outlined is-small is-rounded",{"is-loading":ur.loadingConnectionId===e.id}]),disabled:ur.loadingConnectionId===e.id,onClick:t=>mr.acceptConnectionFromList(e)},[(0,s.Lk)("span",po,[(0,s.bF)(br,{icon:"fa-light fa-check"})])],10,mo),(0,s.Lk)("button",{class:(0,a.C4)(["button is-light is-outlined is-small is-rounded",{"is-loading":ur.loadingConnectionId===e.id}]),disabled:ur.loadingConnectionId===e.id,onClick:t=>mr.rejectConnectionFromList(e)},[(0,s.Lk)("span",go,[(0,s.bF)(br,{icon:"fa-light fa-xmark"})])],10,ho)])]))),128))]),mr.hasMorePendingReceived?((0,s.uX)(),(0,s.CE)("div",fo,[(0,s.bF)(Sr,{type:"is-primary",rounded:"",loading:ur.isLoadingMorePendingReceived,onClick:mr.loadMorePendingReceived},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Load more")),1)]),_:1},8,["loading","onClick"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.item.id===e.user.id&&ur.pendingConnectionsSent.length>0?((0,s.uX)(),(0,s.CE)("div",bo,[(0,s.Lk)("h4",yo,[(0,s.eW)((0,a.v_)(e.$t("Sent requests"))+" ",1),(0,s.Lk)("span",vo,"("+(0,a.v_)(ur.pendingSentTotal)+")",1)]),(0,s.Lk)("div",ko,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ur.pendingConnectionsSent,e=>((0,s.uX)(),(0,s.CE)("div",{key:"sent-"+e.id,class:"connection-row-card"},[(0,s.Lk)("div",{class:"connection-row-link",onClick:t=>mr.openUserModal(e.recipient.id)},[(0,s.bF)(Fr,{item:e.recipient,"is-type":"roundMedium"},null,8,["item"]),(0,s.Lk)("div",Lo,[(0,s.Lk)("strong",wo,(0,a.v_)(e.recipient.fullName),1),e.recipient.professionHeadline?((0,s.uX)(),(0,s.CE)("span",_o,(0,a.v_)(e.recipient.professionHeadline),1)):(0,s.Q3)("",!0),e.recipient.townCurrent?((0,s.uX)(),(0,s.CE)("span",Eo,[(0,s.Lk)("span",$o,[(0,s.bF)(br,{icon:"fa-light fa-location-dot"})]),(0,s.eW)(" "+(0,a.v_)(e.recipient.townCurrent.name),1)])):(0,s.Q3)("",!0)])],8,Co),(0,s.Lk)("div",Fo,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-light is-outlined is-small is-rounded",{"is-loading":ur.loadingConnectionId===e.id}]),disabled:ur.loadingConnectionId===e.id,onClick:t=>mr.cancelConnectionRequest(e)},[(0,s.Lk)("span",So,[(0,s.bF)(br,{icon:"fa-light fa-xmark"})])],10,To)])]))),128))]),mr.hasMorePendingSent?((0,s.uX)(),(0,s.CE)("div",Ao,[(0,s.bF)(Sr,{type:"is-primary",rounded:"",loading:ur.isLoadingMorePendingSent,onClick:mr.loadMorePendingSent},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Load more")),1)]),_:1},8,["loading","onClick"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ur.connections.length>0||ur.isLoadingConnections?((0,s.uX)(),(0,s.CE)("div",Po,[(0,s.Lk)("h4",Io,[(0,s.eW)((0,a.v_)(e.$t("Connections"))+" ",1),ur.connectionsTotal?((0,s.uX)(),(0,s.CE)("span",Mo," ("+(0,a.v_)(ur.connectionsTotal)+") ",1)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",xo,[ur.connections.length>0?((0,s.uX)(),(0,s.Wv)(Ar,{key:0,modelValue:ur.connectionSearchQuery,"onUpdate:modelValue":t[19]||(t[19]=e=>ur.connectionSearchQuery=e),placeholder:e.$t("Search"),type:"search",icon:"magnifying-glass","icon-pack":"fa-light",rounded:"",size:"is-small",class:"connection-search-input"},null,8,["modelValue","placeholder"])):(0,s.Q3)("",!0),ur.connections.length>0?((0,s.uX)(),(0,s.Wv)(vr,{key:1,"aria-role":"list",position:"is-bottom-left",class:"connection-sort-dropdown"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",No,[(0,s.Lk)("span",Uo,[(0,s.bF)(br,{icon:mr.connectionSortIcon},null,8,["icon"])]),(0,s.Lk)("span",Do,(0,a.v_)(mr.connectionSortLabel),1)])]),default:(0,s.k6)(()=>[(0,s.bF)(yr,{"aria-role":"listitem",class:(0,a.C4)({"is-active":"date_desc"===ur.connectionSortBy}),onClick:t[20]||(t[20]=e=>ur.connectionSortBy="date_desc")},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Xo,[(0,s.Lk)("span",Vo,[(0,s.bF)(br,{icon:"fa-light fa-arrow-down-wide-short"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Most recent")),1)])]),_:1},8,["class"]),(0,s.bF)(yr,{"aria-role":"listitem",class:(0,a.C4)({"is-active":"date_asc"===ur.connectionSortBy}),onClick:t[21]||(t[21]=e=>ur.connectionSortBy="date_asc")},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ro,[(0,s.Lk)("span",Oo,[(0,s.bF)(br,{icon:"fa-light fa-arrow-up-wide-short"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Least recent")),1)])]),_:1},8,["class"]),(0,s.bF)(yr,{"aria-role":"listitem",class:(0,a.C4)({"is-active":"name"===ur.connectionSortBy}),onClick:t[22]||(t[22]=e=>ur.connectionSortBy="name")},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Qo,[(0,s.Lk)("span",Bo,[(0,s.bF)(br,{icon:"fa-light fa-arrow-down-a-z"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Name")),1)])]),_:1},8,["class"])]),_:1})):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),ur.isLoadingConnections?((0,s.uX)(),(0,s.CE)("div",Go,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(8,e=>(0,s.Lk)("div",{key:"skeleton-"+e,class:"connection-row-card skeleton-row"},[(0,s.Lk)("span",Wo,[(0,s.bF)(Pr,{circle:"",width:"56px",height:"56px",animated:""})]),(0,s.Lk)("div",jo,[(0,s.Lk)("span",zo,[(0,s.bF)(Pr,{height:"16px",animated:""})]),(0,s.Lk)("span",qo,[(0,s.bF)(Pr,{height:"13px",animated:""})]),(0,s.Lk)("span",Jo,[(0,s.bF)(Pr,{height:"11px",animated:""})])]),(0,s.Lk)("span",Ho,[(0,s.bF)(Pr,{height:"13px",animated:""})])])),64))])):((0,s.uX)(),(0,s.CE)("div",Ko,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(mr.filteredConnections,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.id,class:"connection-row-card",onClick:e=>mr.openUserModal(mr.getConnectedUser(i).id)},[(0,s.bF)(Fr,{item:mr.getConnectedUser(i),"is-type":"roundMedium"},null,8,["item"]),(0,s.Lk)("div",Zo,[(0,s.Lk)("strong",el,(0,a.v_)(mr.getConnectedUser(i).fullName),1),mr.getConnectedUser(i).professionHeadline?((0,s.uX)(),(0,s.CE)("span",tl,(0,a.v_)(mr.getConnectedUser(i).professionHeadline),1)):(0,s.Q3)("",!0),mr.getConnectedUser(i).townCurrent?((0,s.uX)(),(0,s.CE)("span",il,[(0,s.Lk)("span",sl,[(0,s.bF)(br,{icon:"fa-light fa-location-dot"})]),(0,s.eW)(" "+(0,a.v_)(mr.getConnectedUser(i).townCurrent.name),1)])):(0,s.Q3)("",!0)]),mr.hasAnySocialLink(mr.getConnectedUser(i))?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"connection-row-social",onClick:t[23]||(t[23]=(0,n.D$)(()=>{},["stop"]))},[mr.getConnectedUser(i).email?((0,s.uX)(),(0,s.Wv)(kr,{key:0,label:mr.getConnectedUser(i).email,class:"mr-1",position:"is-top","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{onClick:e=>mr.copyToClipboardAndSnackbar(mr.getConnectedUser(i).email)},[(0,s.Lk)("span",nl,[(0,s.bF)(br,{icon:"fa-light fa-envelope"})])],8,al)]),_:2},1032,["label"])):(0,s.Q3)("",!0),mr.getConnectedUser(i).profileFacebook&&"-"!==mr.getConnectedUser(i).profileFacebook?((0,s.uX)(),(0,s.Wv)(kr,{key:1,label:mr.getConnectedUser(i).profileFacebook,position:"is-top",class:"mr-1","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:mr.getConnectedUser(i).profileFacebook,target:"_blank"},[(0,s.Lk)("span",ll,[(0,s.bF)(br,{icon:"fab fa-facebook"})])],8,ol)]),_:2},1032,["label"])):(0,s.Q3)("",!0),mr.getConnectedUser(i).profileLinkedin&&"-"!==mr.getConnectedUser(i).profileLinkedin?((0,s.uX)(),(0,s.Wv)(kr,{key:2,label:mr.getConnectedUser(i).profileLinkedin,position:"is-top",class:"mr-1","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:mr.getConnectedUser(i).profileLinkedin,target:"_blank"},[(0,s.Lk)("span",dl,[(0,s.bF)(br,{icon:"fab fa-linkedin"})])],8,rl)]),_:2},1032,["label"])):(0,s.Q3)("",!0),mr.getConnectedUser(i).profileTwitter&&"-"!==mr.getConnectedUser(i).profileTwitter?((0,s.uX)(),(0,s.Wv)(kr,{key:3,label:mr.getConnectedUser(i).profileTwitter,position:"is-top",class:"mr-1","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:mr.getConnectedUser(i).profileTwitter,target:"_blank"},[(0,s.Lk)("span",ul,[(0,s.bF)(br,{icon:"fab fa-x-twitter"})])],8,cl)]),_:2},1032,["label"])):(0,s.Q3)("",!0),mr.getConnectedUser(i).profileInstagram&&"-"!==mr.getConnectedUser(i).profileInstagram?((0,s.uX)(),(0,s.Wv)(kr,{key:4,label:mr.getConnectedUser(i).profileInstagram,position:"is-top",class:"mr-1","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:mr.getConnectedUser(i).profileInstagram,target:"_blank"},[(0,s.Lk)("span",pl,[(0,s.bF)(br,{icon:"fab fa-instagram"})])],8,ml)]),_:2},1032,["label"])):(0,s.Q3)("",!0),mr.getConnectedUser(i).profileTelegram&&"-"!==mr.getConnectedUser(i).profileTelegram?((0,s.uX)(),(0,s.Wv)(kr,{key:5,label:mr.getConnectedUser(i).profileTelegram,position:"is-top",class:"mr-1","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:mr.getConnectedUser(i).profileTelegram,target:"_blank"},[(0,s.Lk)("span",gl,[(0,s.bF)(br,{icon:"fab fa-telegram"})])],8,hl)]),_:2},1032,["label"])):(0,s.Q3)("",!0),mr.getConnectedUser(i).profileTiktok&&"-"!==mr.getConnectedUser(i).profileTiktok?((0,s.uX)(),(0,s.Wv)(kr,{key:6,label:mr.getConnectedUser(i).profileTiktok,position:"is-top",class:"mr-1","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:mr.getConnectedUser(i).profileTiktok,target:"_blank"},[(0,s.Lk)("span",bl,[(0,s.bF)(br,{icon:"fab fa-tiktok"})])],8,fl)]),_:2},1032,["label"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),i.dateAccepted?((0,s.uX)(),(0,s.CE)("div",yl,[(0,s.Lk)("span",vl,(0,a.v_)(e.$filters.format(i.dateAccepted,"date")),1)])):(0,s.Q3)("",!0)],8,Yo))),128))])),mr.hasMoreConnections&&!mr.hasActiveConnectionFilters?((0,s.uX)(),(0,s.CE)("div",kl,[(0,s.bF)(Sr,{type:"is-primary",rounded:"",onClick:t[24]||(t[24]=e=>mr.loadConnections(!0))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Load more")),1)]),_:1})])):(0,s.Q3)("",!0),ur.isLoadingConnections?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Cl,[0===ur.connections.length?((0,s.uX)(),(0,s.CE)("div",Ll,[(0,s.Lk)("div",wl,[(0,s.bF)(br,{icon:"fa-light fa-users"})]),(0,s.Lk)("p",_l,(0,a.v_)(e.$t("No connections yet")),1),(0,s.Lk)("p",El,(0,a.v_)(e.$t("Start building your network by connecting with people")),1)])):(0,s.Q3)("",!0),e.tenant?.settingFeatures?.users?.userRecommendations?((0,s.uX)(),(0,s.CE)("div",$l,[(0,s.bF)(Ir,{section:mr.recommendationsSection,device:"desktop",variant:"main",onConnectionSent:mr.onConnectionSent}
1,null,8,["section","onConnectionSent"])])):(0,s.Q3)("",!0)])),ur.connections.length>0&&0===mr.filteredConnections.length&&!ur.isLoadingConnections?((0,s.uX)(),(0,s.CE)("p",Fl,(0,a.v_)(e.$t("No connections found")),1)):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0)]),_:1})):(0,s.Q3)("",!0),mr.isTabFeeWithFixedDate?((0,s.uX)(),(0,s.Wv)(Tr,{key:1,label:e.$t("fee"),value:"fees"},{default:(0,s.k6)(()=>[ur.item?((0,s.uX)(),(0,s.Wv)(Mr,{key:0,ref:"fees","item-user":ur.item,onUpdateUser:mr.retrieve},null,8,["item-user","onUpdateUser"])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),mr.isTabFeeNoFixedDate?((0,s.uX)(),(0,s.Wv)(Tr,{key:2,label:e.$t("fee"),value:"fees"},{default:(0,s.k6)(()=>[e.isNativeAppIos&&ur.item?.id===e.user.id?((0,s.uX)(),(0,s.CE)("p",Tl,(0,a.v_)(e.$t("To make a payment, please access app in browser.")),1)):(0,s.Q3)("",!0),((0,s.uX)(),(0,s.Wv)(Mr,{ref:"fee_user_form",key:"fee_user_form_"+ur.item?.feeTenantProductPrice?.id,class:"mb-2","item-user":ur.item,onUpdateUser:mr.retrieve},null,8,["item-user","onUpdateUser"])),!0===ur.item.bundle?.bundleCoordinator?((0,s.uX)(),(0,s.CE)("div",Sl,[ur.item.bundle.bundleMember?.id?((0,s.uX)(),(0,s.CE)("p",Al,[(0,s.eW)((0,a.v_)(e.$t("Bundle member: "))+" ",1),(0,s.bF)(Cr,{to:{name:"UserShow",params:{item:ur.item.bundle.bundleMember.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(ur.item.bundle.bundleMember.fullName),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),ur.item.bundle.bundleMember?.id?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-danger is-outlined is-small is-rounded mt-3",onClick:t[25]||(t[25]=(...e)=>mr.removeMemberFromBundle&&mr.removeMemberFromBundle(...e))},(0,a.v_)(e.$t("Remove from bundle")),1)):((0,s.uX)(),(0,s.CE)("div",Pl,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("Add bundle member")),1),(0,s.bF)(Ar,{modelValue:ur.bundleMemberAddEmail,"onUpdate:modelValue":t[26]||(t[26]=e=>ur.bundleMemberAddEmail=e),type:"email",class:"mt-5",placeholder:e.$t("email"),style:{"max-width":"400px"}},null,8,["modelValue","placeholder"]),(0,s.Lk)("button",{class:"button is-primary is-small is-rounded is-outlined mt-3",disabled:!mr.isValidEmail,onClick:t[27]||
1(t[27]=e=>mr.addMemberToBundle())},(0,a.v_)(e.$t("Add to bundle")),9,Il)]))])):!0===ur.item.bundle?.bundleMember?((0,s.uX)(),(0,s.CE)("div",Ml,[(0,s.Lk)("p",null,[(0,s.eW)((0,a.v_)(e.$t("Bundle coordinator: "))+" ",1),ur.item.bundle.bundleCoordinator?.id?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"UserShow",params:{item:ur.item.bundle.bundleCoordinator.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(ur.item.bundle.bundleCoordinator.fullName),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),ur.item&&e.tenant.settingFeatures.onlinePayments.isActive&&(ur.item.id===e.user.id||e.isGranted("FINANCIAL_LOCAL",ur.item.localCenter)||e.isGranted("HR_LOCAL",ur.item.localCenter)||ur.canManageThisProfile)?((0,s.uX)(),(0,s.Wv)(Tr,{key:3,label:e.$t("payments"),value:"payments"},{default:(0,s.k6)(()=>["payments"===ur.activeTab?((0,s.uX)(),(0,s.CE)("div",xl,[e.isNativeAppIos&&ur.item?.id===e.user.id?((0,s.uX)(),(0,s.CE)("p",Nl,(0,a.v_)(e.$t("To make a payment, please access app in browser.")),1)):(0,s.Q3)("",!0),((0,s.uX)(),(0,s.Wv)(xr,{key:ur.paymentsParamKey,"filter-user":ur.item,onUpdateUser:mr.retrieve},null,8,["filter-user","onUpdateUser"]))])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),mr.isTabEDocumentsVisible?((0,s.uX)(),(0,s.Wv)(Tr,{key:4,label:e.$t("e-Documents"),value:"edocuments"},{default:(0,s.k6)(()=>["edocuments"===ur.activeTab?((0,s.uX)(),(0,s.Wv)(Nr,{key:0,item:ur.item},null,8,["item"])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),mr.isTabEvent?((0,s.uX)(),(0,s.Wv)(Tr,{key:5,label:e.$t("events"),value:"events"},{default:(0,s.k6)(()=>["events"===ur.activeTab?((0,s.uX)(),(0,s.CE)("div",Ul,[(0,s.bF)(Ur,{"is-user":ur.item&&ur.item.id},null,8,["is-user"])])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),mr.isTabPersonalDriveVisible?((0,s.uX)(),(0,s.Wv)(Tr,{key:6,label:e.$t("files"),value:"personalDrive"},{default:(0,s.k6)(()=>["personalDrive"===ur.activeTab?((0,s.uX)(),(0,s.Wv)(Dr,{key:0,"force-personal-drive":!0,"personal-drive-user":ur.item},null,8,["personal-drive-user"])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),e.tenant.settingFeatures.referral.isActive&&(ur.item.id===e.user.id||e.isGranted("HR_LOCAL",ur.item.localCenter))||e.tenant.settingFeatures.users.hasUserInvitation&&e.isGranted(e.tenant.settingFeatures.users.whoCanSendUserInvitation)?((0,s.uX)(),(0,s.Wv)(Tr,{key:7,label:e.$t("Referrals"),value:"referrals"},{default:(0,s.k6)(()=>["referrals"===ur.activeTab?((0,s.uX)(),(0,s.Wv)(Xr,{key:0,ref:"profileReferralTab","given-user":ur.item||e.user},null,8,["given-user"])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),e.tenant.settingFeatures.company?.isActive&&ur.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Tr,{key:8,label:e.$t("Company"),value:"company"},{default:(0,s.k6)(()=>["company"===ur.activeTab?((0,s.uX)(),(0,s.Wv)(Vr,{key:0,"given-user":ur.item||e.user},null,8,["given-user"])):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),e.isGranted("ADMIN_TENANT")?((0,s.uX)(),(0,s.Wv)(Tr,{key:9,label:e.$t("Logs"),value:"logs"},{default:(0,s.k6)(()=>[(0,s.bF)(pr,{modelValue:ur.isLoadingLogs,"onUpdate:modelValue":t[28]||(t[28]=e=>ur.isLoadingLogs=e),"is-full-page":!1},null,8,["modelValue"]),(0,s.Lk)("div",Dl,[(0,s.Lk)("div",Xl,[(0,s.Lk)("ul",Vl,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(mr.logTabs,e=>((0,s.uX)(),(0,s.CE)("li",{key:e.key,class:(0,a.C4)({"is-active":ur.logType===e.key}),onClick:t=>mr.switchLogType(e.key)},[(0,s.Lk)("a",null,[e.icon?((0,s.uX)(),(0,s.CE)("span",Ol,[(0,s.bF)(br,{icon:e.icon},null,8,["icon"])])):(0,s.Q3)("",!0),(0,s.Lk)("span",null,(0,a.v_)(e.label),1)])],10,Rl))),128))],512)])]),ur.userLogs?.length&&"audit"===ur.logType?((0,s.uX)(),(0,s.CE)("div",Ql,[(0,s.bF)(Qr,{"current-page":ur.userLogsCurrentPage,"onUpdate:currentPage":t[29]||(t[29]=e=>ur.userLogsCurrentPage=e),data:ur.userLogs,detailed:"","detail-key":"id","show-detail-icon":"",paginated:ur.userLogsTotal>ur.userLogsPerPage,"backend-pagination":"",total:ur.userLogsTotal,"per-page":ur.userLogsPerPage,"pagination-simple":!1,"pagination-position":"bottom","pagination-rounded":!0,"aria-next-label":"Next page","aria-previous-label":"Previous page","aria-page-label":"Page","aria-current-label":"Current page","mobile-cards":!1,onPageChange:mr.onLogsPageChange},{detail:(0,s.k6)(e=>[(0,s.Lk)("div",Gl,["personal_id_changed"===e.row.action?((0,s.uX)(),(0,s.Wv)(Or,{key:0,log:e.row,"can-reveal":mr.canRevealPersonalIdLog},null,8,["log","can-reveal"])):e.row.details?((0,s.uX)(),(0,s.CE)("div",Wl,[(0,s.bF)(Qr,{data:mr.getDetailsArray(e.row.details),narrowed:"","mobile-cards":!1},{default:(0,s.k6)(()=>[(0,s.bF)(Rr,{field:"field",label:"Field"},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.field),1)]),_:1}),(0,s.bF)(Rr,{field:"subfield",label:"Subfield"},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.subfield),1)]),_:1}),(0,s.bF)(Rr,{field:"before",label:"Value Before"},{default:(0,s.k6)(e=>[e.row.before&&e.row.before.length>ur.maxLength?((0,s.uX)(),(0,s.Wv)(kr,{key:0,label:e.row.before,multilined:""},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(mr.truncateText(e.row.before,ur.maxLength)),1)]),_:2},1032,["label"])):((0,s.uX)(),(0,s.CE)("span",jl,(0,a.v_)(e.row.before),1))]),_:1}),(0,s.bF)(Rr,{field:"after",label:"Value After"},{default:(0,s.k6)(e=>[e.row.after&&e.row.after.length>ur.maxLength?((0,s.uX)(),(0,s.Wv)(kr,{key:0,label:e.row.after,multilined:""},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(mr.truncateText(e.row.after,ur.maxLength)),1)]),_:2},1032,["label"])):((0,s.uX)(),(0,s.CE)("span",zl,(0,a.v_)(e.row.after),1))]),_:1})]),_:1},8,["data"])])):((0,s.uX)(),(0,s.CE)("pre",ql,(0,a.v_)(e.row.details),1))])]),default:(0,s.k6)(()=>[(0,s.bF)(Rr,{field:"id",label:e.$t("ID"),width:"50"},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.id),1)]),_:1},8,["label"]),(0,s.bF)(Rr,{field:"date",label:e.$t("Date")},{default:(0,s.k6)(t=>[(0,s.eW)((0,a.v_)(e.$filters.format(t.row.dateCreated,"dateTime")),1)]),_:1},8,["label"]),(0,s.bF)(Rr,{field:"action",label:e.$t("Action")},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.action),1)]),_:1},8,["label"]),(0,s.bF)(Rr,{field:"author",label:e.$t("Author")},{default:(0,s.k6)(e=>[e.row.owner?((0,s.uX)(),(0,s.Wv)(Cr,{key:0,to:{name:"UserShow",params:{item:e.row.owner.id}},class:"has-text-link"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.owner.fullName),1)]),_:2},1032,["to"])):((0,s.uX)(),(0,s.CE)("span",Bl,"-"))]),_:1},8,["label"])]),_:1},8,["current-page","data","paginated","total","per-page","onPageChange"])])):(0,s.Q3)("",!0),ur.userLogs?.length||ur.isLoadingLogs||"audit"!==ur.logType?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Jl,[(0,s.Lk)("span",Hl,[(0,s.bF)(br,{icon:"fa-light fa-clock-rotate-left"})]),(0,s.Lk)("span",Kl,(0,a.v_)(e.$t("No logs available")),1),(0,s.Lk)("span",Yl,(0,a.v_)(e.$t("Activity on this profile will appear here")),1)])),(0,s.Lk)("div",Zl,["email"===ur.logType?((0,s.uX)(),(0,s.Wv)(Br,{key:0,user:ur.item,"use-modal":!0},null,8,["user"])):(0,s.Q3)("",!0)])]),_:1},8,["label"])):(0,s.Q3)("",!0),mr.canReadProfileActivity?((0,s.uX)(),(0,s.Wv)(Tr,{key:10,label:e.$t("Activity"),value:"activity"},{default:(0,s.k6)(()=>[(0,s.bF)(Gr,{"entity-type":"user","entity-id":ur.item.id,onNoteAdded:t[30]||(t[30]=t=>e.$refs.userTimeline.reload())},null,8,["entity-id"]),(0,s.bF)(Wr,{ref:"userTimeline","entity-type":"user","entity-id":ur.item.id},null,8,["entity-id"])]),_:1},8,["label"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","class","onUpdate:modelValue"])])])):ur.item?((0,s.uX)(),(0,s.CE)("div",er,[(0,s.Lk)("div",{class:(0,a.C4)({"p-2":e.$isMobile()})},[(0,s.Lk)("p",tr,(0,a.v_)(e.$t("Welcome, %%!").replace("%%",ur.item.firstName)),1),(0,s.Lk)("p",null,(0,a.v_)(e.$t("To start enjoying all the features and benefits of the community platform, please complete your membership fee payment"))+".",1)],2),(0,s.Lk)("div",ir,[e.tenant.settingFeatures.fees.fixedStartingDateFee?((0,s.uX)(),(0,s.Wv)(zr,{key:0,ref:"fee_mandatory",item:ur.item,"auto-load":!0,onUpdateUser:mr.retrieve},null,8,["item","onUpdateUser"])):((0,s.uX)(),(0,s.Wv)(Mr,{key:"fee_user_form_"+ur.item?.feeTenantProductPrice?.i
1d,ref:"fee_user_form","item-user":ur.item,"is-onboarding":!0,onUpdateUser:mr.retrieve},null,8,["item-user","onUpdateUser"]))])])):(0,s.Q3)("",!0),(0,s.bF)(qr,{modelValue:ur.isFilePreviewModalActive,"onUpdate:modelValue":t[37]||(t[37]=e=>ur.isFilePreviewModalActive=e),"can-cancel":["escape","outside","x"],width:"application/pdf"===ur.previewFileData?.mimeType?"98vw":"90vw",class:"file-preview-modal"},{default:(0,s.k6)(()=>[ur.previewFileData?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"file-preview-container",onClick:t[36]||(t[36]=e=>ur.isFilePreviewModalActive=!1)},[(0,s.Lk)("button",{class:"modal-close is-large",onClick:t[32]||(t[32]=e=>ur.isFilePreviewModalActive=!1)}),(0,s.Lk)("div",sr,[ur.previewFileData.mimeType?.startsWith("image/")?((0,s.uX)(),(0,s.CE)("img",{key:0,src:ur.previewFileData.contentUrl,style:{"max-height":"80vh","max-width":"100%"},onClick:t[33]||(t[33]=e=>ur.isFilePreviewModalActive=!1)},null,8,ar)):ur.previewFileData.mimeType?.startsWith("video/")?((0,s.uX)(),(0,s.CE)("video",{key:1,src:ur.previewFileData.contentUrl,controls:"",style:{"max-height":"80vh","max-width":"100%"},onClick:t[34]||(t[34]=(0,n.D$)(()=>{},["stop"]))},null,8,nr)):"application/pdf"===ur.previewFileData.mimeType?((0,s.uX)(),(0,s.CE)("object",{key:2,data:ur.previewFileData.contentUrl,type:"application/pdf",style:{width:"100%",height:"90vh"},onClick:t[35]||(t[35]=(0,n.D$)(()=>{},["stop"]))},[(0,s.Lk)("p",null,(0,a.v_)(e.$t("PDF preview not supported")),1)],8,or)):((0,s.uX)(),(0,s.CE)("div",lr,[(0,s.Lk)("span",rr,[(0,s.bF)(br,{icon:mr.getFileIcon(ur.previewFileData.mimeType),size:"3x"},null,8,["icon"])]),(0,s.Lk)("h1",dr,(0,a.v_)(ur.previewFileData.originalName),1),(0,s.bF)(Sr,{type:"is-primary",class:"is-rounded",tag:"a",href:ur.previewFileData.contentUrl,target:"_blank"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Download")),1)]),_:1},8,["href"])]))])])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","width"]),(0,s.bF)(Hr,{modelValue:ur.isUserModalVisible,"onUpdate:modelValue":t[38]||(t[38]=e=>ur.isUserModalVisible=e),title:ur.selectedUser?e.$t("Profile"):"","modal-width":1100,"maximize-route":ur.selectedUserId?{name:"UserShow",params:{item:ur.selectedUserId}}:null,"scroll-container-id":"connectionUserModalBody",onClose:mr.closeUserModal},{default:(0,s.k6)(()=>[ur.selectedUserId?((0,s.uX)(),(0,s.Wv)(Jr,{key:0,ref:"modalUserShowContent","user-id":ur.selectedUserId,onLoaded:mr.handleModalUserLoaded},null,8,["user-id","onLoaded"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","title","maximize-route","onClose"]),mr.canSendEmail?((0,s.uX)(),(0,s.Wv)(Kr,{key:3,"is-open":ur.isEmailModalOpen,"recipient-type":"user",recipient:ur.item,onClose:t[39]||(t[39]=e=>ur.isEmailModalOpen=!1),onSent:t[40]||(t[40]=t=>e.$refs.userTimeline?.reload())},null,8,["is-open","recipient"])):(0,s.Q3)("",!0)],2)}i(22489),i(61701),i(18237),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var ur=i(40834),mr=i(95256),pr=i(54481);const hr={key:0,class:"card p-5",style:{"max-width":"718px"}},gr={class:"tag is-warning is-rounded"},fr={key:1,class:"card p-5",style:{"max-width":"718px"}},br={class:"tag is-warning is-rounded"},yr={class:"is-size-7 has-text-grey mt-3"},vr={key:2},kr={key:0,class:"card p-5 mb-4",style:{"max-width":"718px"}},Cr={class:"company-managed-notice"},Lr={class:"notice-content"},wr={class:"icon"},_r={class:"notice-text"},Er={class:"notice-title"},$r={class:"notice-description"},Fr={class:"icon is-small"},Tr={key:1},Sr={class:"columns is-multiline mt-4"},Ar={key:0,class:"column is-12-mobile is-6-tablet"},Pr={key:3},Ir={class:"card p-5"},Mr={class:"my-4"},xr={key:0,class:"mt-4 mb-3"},Nr={key:1,class:"mt-4"},Ur={class:"mt-6"},Dr=["disabled","innerHTML"],Xr={class:"has-text-centered mt-3"},Vr={key:4},Rr={class:"card p-5"},Or={class:"my-4"},Qr={key:0,class:"mt-4 mb-3"},Br={class:"mt-6"},Gr=["disabled"],Wr={class:"has-text-centered mt-3"},jr={class:"card p-5"},zr={class:"modal-card-head mb-5"},qr={class:"modal-card-title is-size-5"},Jr={key:0,class:"buttons"},Hr={key:1,class:"mt-5"},Kr={class:"has-text-centered mb-5"},Yr={class:"has-text-weight-semibold is-size-4 mt-3"},Zr={key:0,class:"mb-5"},ed={class:"has-text-weight-semibold mb-3"},td={class:"is-flex is-flex-direction-column",style:{gap:"0.5rem"}},id={key:0},sd={class:"has-text-grey"},ad={class:"has-text-weight-semibold ml-2"},nd={key:1},od={class:"has-text-weight-semibold ml-2"},ld={key:2},rd={class:"has-text-grey"},dd={class:"has-text-weight-semibold ml-2"},cd={class:"card p-5"},ud={class:"modal-card-head mb-5"},md={class:"modal-card-title is-size-5"},pd={key:0,class:"buttons"},hd={key:1,class:"mt-5"},gd={class:"has-text-centered mb-5"},fd={class:"has-text-weight-semibold is-size-4 mt-3"},bd={key:5,class:"mt-4 has-text-weight-semibold is-size-7"};function yd(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon"),d=(0,s.g2)("router-link"),c=(0,s.g2)("FeeSummaryCard"),u=(0,s.g2)("StripeFeePayModal"),m=(0,s.g2)("FeeCard"),p=(0,s.g2)("Contract"),h=(0,s.g2)("b-datepicker"),g=(0,s.g2)("b-switch"),f=(0,s.g2)("b-input"),b=(0,s.g2)("b-modal"),y=(0,s.g2)("b-loading"),v=(0,s.g2)("b-button");return(0,s.uX)(),(0,s.CE)("section",null,[o.item&&!e.userTypeEligibleForFee(o.item)?((0,s.uX)(),(0,s.CE)("div",hr,[(0,s.Lk)("span",gr,(0,a.v_)(e.$t("You are not eligible for paying fees")),1)])):(0,s.Q3)("",!0),o.item&&e.userTypeEligibleForFee(o.item)&&l.settings.fees.isActive&&!l.isFeeConfigured&&l.canConfigureFees?((0,s.uX)(),(0,s.CE)("div",fr,[(0,s.Lk)("span",br,(0,a.v_)(e.$t("No membership fee has been set up for this organisation yet")),1),(0,s.Lk)("p",yr,(0,a.v_)(e.$t("Create a membership fee product in the payments settings to start recording fees.")),1)])):(0,s.Q3)("",!0),o.item&&e.userTypeEligibleForFee(o.item)&&l.settings.fees.isActive&&l.isFeeConfigured?((0,s.uX)(),(0,s.CE)("div",vr,[l.isMembershipManagedByCompany?((0,s.uX)(),(0,s.CE)("div",kr,[(0,s.Lk)("div",Cr,[(0,s.Lk)("div",Lr,[(0,s.Lk)("span",wr,[(0,s.bF)(r,{icon:"fa-light fa-building"})]),(0,s.Lk)("div",_r,[(0,s.Lk)("p",Er,(0,a.v_)(e.$t("Membership managed by company")),1
1),(0,s.Lk)("p",$r,[(0,s.eW)((0,a.v_)(o.item.id===e.user.id?e.$t("Your membership is managed by"):e.$t("Membership is managed by"))+" ",1),(0,s.bF)(d,{to:{name:"CompanyShow",params:{uuid:o.item.companyFeeStatus?.companyUuid}},class:"has-text-weight-semibold"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(o.item.companyFeeStatus?.companyName),1)]),_:1},8,["to"])])])]),o.item.id===e.user.id?((0,s.uX)(),(0,s.Wv)(d,{key:0,to:{name:"MyCompany"},class:"button is-primary is-small is-rounded"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Fr,[(0,s.bF)(r,{icon:"fa-light fa-arrow-right"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("View Company")),1)]),_:1})):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),l.isMembershipManagedByCompany?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Tr,[(0,s.bF)(c,{item:o.item,"has-local-fee":l.hasLocalFee,currency:e.tenant.currency,"can-pay":l.canPay,"can-subscribe":l.canSubscribe,"has-active-subscription":!!o.subscriptionProfile&&!o.subscriptionProfile.isSubscriptionCanceled,"bank-transfer-in-progress":o.item.membershipBankTransferInProgress,"is-loading":o.isLoading,"period-label":l.tenantPeriodLabel,"is-selecting-periods":o.tenantFeeSelecting||o.localFeeSelecting,"pay-panel-open":o.inlinePay.show,onPay:l.goToCheckout,onSubscribe:l.subscriptionCheckout},null,8,["item","has-local-fee","currency","can-pay","can-subscribe","has-active-subscription","bank-transfer-in-progress","is-loading","period-label","is-selecting-periods","pay-panel-open","onPay","onSubscribe"]),o.inlinePay.show?((0,s.uX)(),(0,s.Wv)(u,{key:0,payload:o.inlinePay.payload,endpoint:o.inlinePay.endpoint,"checkout-endpoint":o.inlinePay.checkoutEndpoint,"copy-link":o.inlinePay.copyLink,amount:o.inlinePay.amount,currency:o.inlinePay.currency,"is-subscription":o.inlinePay.isSubscription,"period-label":o.inlinePay.periodLabel,"membership-name":o.inlinePay.membershipName,"vat-rate":o.inlinePay.vatRate,"vat-exempt":o.inlinePay.vatExempt,"registration-fee":o.inlinePay.registrationFee,"registration-fee-vat-rate":o.inlinePay.registrationFeeVatRate,"registration-fee-vat-exempt":o.inlinePay.registrationFeeVatExempt,title:o.inlinePay.title,settled:o.inlinePay.settled,"return-url":l.inlinePayReturnUrl,"donation-options":o.inlinePay.donationOptions,"choose-amount":o.inlinePay.chooseAmount,onLoading:t[0]||(t[0]=e=>o.isLoading=e),onPaid:l.onInlinePaid,onClose:l.onInlinePayClose},null,8,["payload","endpoint","checkout-endpoint","copy-link","amount","currency","is-subscription","period-label","membership-name","vat-rate","vat-exempt","registration-fee","registration-fee-vat-rate","registration-fee-vat-exempt","title","settled","return-url","donation-options","choose-amount","onPaid","onClose"])):(0,s.Q3)("",!0),(0,s.Lk)("div",Sr,[(0,s.Lk)("div",{class:(0,a.C4)(l.hasLocalFee?"column is-12-mobile is-6-tablet":"column is-12")},[(0,s.bF)(m,{ref:"tenantFeeCard","fee-type":"national",item:o.item,"fee-product":o.feeTenantProduct,"subscription-profile":o.subscriptionProfile,history:l.tenantFeeHistorySliced,"history-has-more":l.tenantHistoryHasMore,"total-history-count":o.feeTenantHistory.length,"show-change-plan":o.showTenantChangePlan,"available-prices":l.availableTenantPrices,"can-select-price":l.canSelectFeePrice,"is-saving":o.isSaving,"saving-price-id":o.savingPriceId,"can-pay":l.canPay,"can-subscribe":l.canSubscribe,"can-mark-as-paid":l.canMarkAsPaid,"is-loading":o.isLoading,"bank-transfer-in-progress":o.item.membershipBankTransferInProgress,"editing-fee-price":o.editingFeePrice,"subscription-updating":o.subscriptionUpdating,"hide-payment-actions":!l.hasLocalFee,"hide-status-and-plan":!l.hasLocalFee,"is-history-expanded":o.showAllTenantHistory,onToggleChangePlan:t[1]||(t[1]=e=>o.showTenantChangePlan=!o.showTenantChangePlan),onSelectPrice:l.selectTenantPrice,onPay:l.goToCheckout,onPaySelected:l.paySelectedPeriods,onSubscribe:l.subscriptionCheckout,onMarkAsPaid:t[2]||(t[2]=e=>o.showDateSelectionModal=!0),onMarkSelectedPaid:l.markSelectedPeriodsAsPaid,onCancelBankTransfer:l.cancelBankTransfer,onViewInvoice:l.goToInvoice,onCancelSubscription:l.cancelSubscription,onReactivateSubscription:t[3]||(t[3]=e=>l.reactivateSubscription(o.subscriptionProfile.id)),onShowBankTransferDetails:l.showPendingBankTransferDetails,onToggleHistory:t[4]||(t[4]=e=>o.showAllTenantHistory=!o.showAllTenantHistory),onSelectionModeChange:t[5]||
1(t[5]=e=>o.tenantFeeSelecting=e)},null,8,["item","fee-product","subscription-profile","history","history-has-more","total-history-count","show-change-plan","available-prices","can-select-price","is-saving","saving-price-id","can-pay","can-subscribe","can-mark-as-paid","is-loading","bank-transfer-in-progress","editing-fee-price","subscription-updating","hide-payment-actions","hide-status-and-plan","is-history-expanded","onSelectPrice","onPay","onPaySelected","onSubscribe","onMarkSelectedPaid","onCancelBankTransfer","onViewInvoice","onCancelSubscription","onShowBankTransferDetails"])],2),l.hasLocalFee?((0,s.uX)(),(0,s.CE)("div",Ar,[(0,s.bF)(m,{ref:"localFeeCard","fee-type":"local",item:o.item,"fee-product":l.feeLocalProduct,"subscription-profile":o.localCenterSubscriptionProfile,history:l.localFeeHistorySliced,"history-has-more":l.localHistoryHasMore,"total-history-count":o.feeLocalHistory.length,"show-change-plan":o.showLocalChangePlan,"available-prices":l.availableLocalPrices,"can-select-price":l.canSelectLocalFeePrice,"is-saving":o.isSaving,"saving-price-id":o.savingPriceId,"can-pay":l.canPayLocalFee,"can-subscribe":!1,"can-mark-as-paid":l.canMarkLocalFeeAsPaid,"is-loading":o.isLoading,"bank-transfer-in-progress":o.item.localCenterFeeTransferInProgress,"editing-fee-price":o.editingFeePrice,"subscription-updating":o.subscriptionUpdating,"is-history-expanded":o.showAllLocalHistory,onToggleChangePlan:t[6]||(t[6]=e=>o.showLocalChangePlan=!o.showLocalChangePlan),onSelectPrice:l.selectLocalPrice,onPay:l.goToLocalFeeCheckout,onPaySelected:l.paySelectedLocalPeriods,onMarkAsPaid:t[7]||(t[7]=e=>o.showLocalDateSelectionModal=!0),onMarkSelectedPaid:l.markSelectedLocalPeriodsAsPaid,onCancelSubscription:l.cancelLocalFeeSubscription,onReactivateSubscription:t[8]||(t[8]=e=>l.reactivateLocalFeeSubscription(o.localCenterSubscriptionProfile.id)),onToggleHistory:t[9]||(t[9]=e=>o.showAllLocalHistory=!o.showAllLocalHistory),onSelectionModeChange:t[10]||(t[10]=e=>o.localFeeSelecting=e)},null,8,["item","fee-product","subscription-profile","history","history-has-more","total-history-count","show-change-plan","available-prices","can-select-price","is-saving","saving-price-id","can-pay","can-mark-as-paid","is-loading","bank-transfer-in-progress","editing-fee-price","subscription-updating","is-history-expanded","onSelectPrice","onPay","onPaySelected","onMarkSelectedPaid","onCancelSubscription"])])):(0,s.Q3)("",!0)])])),o.membershipContractItem&&e.userTypeEligibleForFee(o.item)?((0,s.uX)(),(0,s.CE)("div",{key:2,class:"mt-4",style:(0,a.Tr)(l.hasLocalFee?"max-width: 718px":"")},[(0,s.Lk)("div",{class:(0,a.C4)(l.hasLocalFee?"card p-5":"")},[(0,s.bF)(p,{item:o.item,"user-contract":o.membershipContractItem,onUpdateUser:t[11]||(t[11]=t=>e.$emit("updateUser"))},null,8,["item","user-contract"])],2)],4)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.isGranted("FINANCIAL_TENANT")?((0,s.uX)(),(0,s.CE)("section",Pr,[(0,s.bF)(b,{id:"my-modal",modelValue:o.showDateSelectionModal,"onUpdate:modelValue":t[17]||(t[17]=e=>o.showDateSelectionModal=e),"has-modal-card":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Ir,[(0,s.Lk)("p",Mr,(0,a.v_)(e.$t("Please select the period you want to be marked as paid")),1),(0,s.bF)(h,{modelValue:o.periodStart,"onUpdate:modelValue":t[12]||(t[12]=e=>o.periodStart=e),placeholder:l.periodStartPlaceholder,"append-to-body":""},null,8,["modelValue","placeholder"]),o.periodStart&&o.item.feeTenantProductPrice?((0,s.uX)(),(0,s.CE)("p",xr,[(0,s.eW)((0,a.v_)(e.$t("Period"))+": ",1),(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.format(o.periodStart,"YYYY MMM D")),1),t[32]||(t[32]=(0,s.eW)(" â ",-1)),(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.format(l.markAsPaidPeriodEnd,"YYYY MMM D")),1)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.fees.fixedStartingDateFee?((0,s.uX)(),(0,s.CE)("p",Nr,[(0,s.bF)(g,{modelValue:o.isCustomAmount,"onUpdate:modelValue":t[13]||(t[13]=e=>o.isCustomAmount=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Enter different amount")),1)]),_:1},8,["modelValue"]),o.isCustomAmount?((0,s.uX)(),(0,s.Wv)(f,{key:0,modelValue:o.customAmountValue,"onUpdate:modelValue":t[14]||(t[14]=e=>o.customAmountValue=e),class:"mt-3",type:"number",required:"",style:{"max-width":"100px"},placeholder:o.suffix},null,8,["modelValue","placeholder"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.Lk)("div",Ur,[(0,s.Lk)("button",{disabled:!o.periodStart||o.isCustomAmount&&!o.customAmountValue,class:"button is-primary is-rounded is-fullwidth",onClick:t[15]||(t[15]=(...e)=>l.markAsPaid&&l.markAsPaid(...e)),innerHTML:l.confirmMarkAsPaidLabel},null,8,Dr),(0,s.Lk)("div",Xr,[(0,s.Lk)("a",{class:"is-size-7 has-text-grey",onClick:t[16]||(t[16]=e=>o.showDateSelectionModal=!1)},(0,a.v_)(e.$t("cancel")),1)])])])]),_:1}
1,8,["modelValue"])])):(0,s.Q3)("",!0),l.hasLocalFee&&e.isGranted("FINANCIAL_LOCAL",o.item.localCenter)?((0,s.uX)(),(0,s.CE)("section",Vr,[(0,s.bF)(b,{modelValue:o.showLocalDateSelectionModal,"onUpdate:modelValue":t[21]||(t[21]=e=>o.showLocalDateSelectionModal=e),"has-modal-card":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Rr,[(0,s.Lk)("p",Or,(0,a.v_)(e.$t("Please select the period you want to be marked as paid")),1),(0,s.bF)(h,{modelValue:o.localFeePeriodStart,"onUpdate:modelValue":t[18]||(t[18]=e=>o.localFeePeriodStart=e),placeholder:e.$t("Click to select..."),"append-to-body":""},null,8,["modelValue","placeholder"]),o.localFeePeriodStart&&o.item.feeLocalProductPrice?((0,s.uX)(),(0,s.CE)("p",Qr,[(0,s.eW)((0,a.v_)(e.$t("Period"))+": ",1),(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.format(o.localFeePeriodStart,"YYYY MMM D")),1),t[33]||(t[33]=(0,s.eW)(" â ",-1)),(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.format(l.markLocalAsPaidPeriodEnd,"YYYY MMM D")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",Br,[(0,s.Lk)("button",{disabled:!o.localFeePeriodStart,class:"button is-primary is-rounded is-fullwidth",onClick:t[19]||(t[19]=(...e)=>l.markLocalFeeAsPaid&&l.markLocalFeeAsPaid(...e))},(0,a.v_)(e.$t("Confirm")),9,Gr),(0,s.Lk)("div",Wr,[(0,s.Lk)("a",{class:"is-size-7 has-text-grey",onClick:t[20]||(t[20]=e=>o.showLocalDateSelectionModal=!1)},(0,a.v_)(e.$t("cancel")),1)])])])]),_:1},8,["modelValue"])])):(0,s.Q3)("",!0),(0,s.bF)(b,{id:"my-modal-1",modelValue:o.showPaymentMethodModal,"onUpdate:modelValue":t[26]||(t[26]=e=>o.showPaymentMethodModal=e),"can-cancel":!1,"has-modal-card":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",jr,[(0,s.Lk)("header",zr,[(0,s.Lk)("p",qr,(0,a.v_)(e.$t("Payment method")),1),(0,s.Lk)("button",{class:"delete","aria-label":"close",onClick:t[22]||(t[22]=e=>o.showPaymentMethodModal=!1)})]),(0,s.bF)(y,{modelValue:o.isLoading,"onUpdate:modelValue":t[23]||(t[23]=e=>o.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),o.invoiceSeriesForBankTransfer?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Jr,[(0,s.bF)(v,{class:(0,a.C4)(["is-primary is-rounded mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:o.isLoading,type:"button",size:"is-small",onClick:t[24]||(t[24]=e=>l.oneTimeCheckout(!1))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Pay now online")),1)]),_:1},8,["disabled","class"]),l.isTenantDonationMembership?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(v,{key:0,class:(0,a.C4)(["is-light is-rounded is-small mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:o.isLoading,size:"is-small",type:"button",onClick:t[25]||(t[25]=e=>l.oneTimeCheckout(!0))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Copy payment link")),1)]),_:1},8,["disabled","class"])),l.isBankTransferAvailable?((0,s.uX)(),(0,s.Wv)(v,{key:1,class:(0,a.C4)(["is-light is-rounded is-small mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:o.isLoading,type:"button",size:"is-small",onClick:l.bankTransferCheckout},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Bank transfer")),1)]),_:1},8,["disabled","class","onClick"])):(0,s.Q3)("",!0)])),o.invoiceSeriesForBankTransfer?((0,s.uX)(),(0,s.CE)("div",Hr,[(0,s.Lk)("div",Kr,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("Please include the following identifier in your bank transfer details:")),1),(0,s.Lk)("p",Yr,(0,a.v_)(o.invoiceSeriesForBankTransfer),1)]),o.bankingInfoForTransfer?((0,s.uX)(),(0,s.CE)("div",Zr,[(0,s.Lk)("p",ed,(0,a.v_)(e.$t("Bank transfer details"))+":",1),(0,s.Lk)("div",td,[o.bankingInfoForTransfer.accountHolder?((0,s.uX)(),(0,s.CE)("div",id,[(0,s.Lk)("span",sd,(0,a.v_)(e.$t("Account holder"))+":",1),(0,s.Lk)("span",ad,(0,a.v_)(o.bankingInfoForTransfer.accountHolder),1)])):(0,s.Q3)("",!0),o.bankingInfoForTransfer.iban?((0,s.uX)(),(0,s.CE)("div",nd,[t[34]||(t[34]=(0,s.Lk)("span",{class:"has-text-grey"},"IBAN:",-1)),(0,s.Lk)("span",od,(0,a.v_)(o.bankingInfoForTransfer.iban),1)])):(0,s.Q3)("",!0),o.bankTransferAmount?((0,s.uX)(),(0,s.CE)("div",ld,[(0,s.Lk)("span",rd,(0,a.v_)(e.$t("Amount"))+":",1),(0,s.Lk)("span",dd,(0,a.v_)(e.$filters.money(o.bankTransferAmount)),1)])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])]),_:1},8,["modelValue"]),(0,s.bF)(b,{modelValue:o.showLocalFeePaymentMethodModal,"onUpdate:modelValue":t[31]||(t[31]=e=>o.showLocalFeePaymentMethodModal=e),"can-cancel":!1,"has-modal-card":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",cd,[(0,s.Lk)("header",ud,[(0,s.Lk)("p",md,(0,a.v_)(e.$t("Payment method")),1),(0,s.Lk)("button",{class:"delete","aria-label":"close",onClick:t[27]||
1(t[27]=e=>o.showLocalFeePaymentMethodModal=!1)})]),(0,s.bF)(y,{modelValue:o.isLoading,"onUpdate:modelValue":t[28]||(t[28]=e=>o.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),o.localFeeInvoiceSeriesForBankTransfer?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",pd,[(0,s.bF)(v,{class:(0,a.C4)(["is-primary is-rounded mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:o.isLoading,type:"button",size:"is-small",onClick:t[29]||(t[29]=e=>l.localFeeOneTimeCheckout(!1))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Pay now online")),1)]),_:1},8,["disabled","class"]),l.isLocalDonationMembership?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(v,{key:0,class:(0,a.C4)(["is-light is-rounded is-small mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:o.isLoading,size:"is-small",type:"button",onClick:t[30]||(t[30]=e=>l.localFeeOneTimeCheckout(!0))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Copy payment link")),1)]),_:1},8,["disabled","class"])),l.isLocalFeeBankTransferAvailable?((0,s.uX)(),(0,s.Wv)(v,{key:1,class:(0,a.C4)(["is-light is-rounded is-small mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:o.isLoading,type:"button",size:"is-small",onClick:l.localFeeBankTransferCheckout},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Bank transfer")),1)]),_:1},8,["disabled","class","onClick"])):(0,s.Q3)("",!0)])),o.localFeeInvoiceSeriesForBankTransfer?((0,s.uX)(),(0,s.CE)("div",hd,[(0,s.Lk)("div",gd,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("Please include the following identifier in your bank transfer details:")),1),(0,s.Lk)("p",fd,(0,a.v_)(o.localFeeInvoiceSeriesForBankTransfer),1)])])):(0,s.Q3)("",!0)])]),_:1},8,["modelValue"]),e.isNativeAppIos&&o.item?.id===e.user.id?((0,s.uX)(),(0,s.CE)("p",bd,(0,a.v_)(e.$t("To make a payment, please access app in browser.")),1)):(0,s.Q3)("",!0)])}i(13579),i(14603),i(47566),i(98721);var vd=i(95093),kd=i.n(vd),Cd=i(61273),Ld=i(81458),wd=i(41891),_d=i(44917);const Ed={class:"card fee-summary-card"},$d={class:"fee-summary-inner"},Fd={class:"fee-summary-col"},Td={class:"fee-summary-label"},Sd={key:0,class:"is-size-7 has-text-grey mt-1"},Ad={class:"fee-summary-col fee-summary-col--amount"},Pd={class:"fee-summary-label"},Id={key:0},Md={key:0,class:"fee-summary-amount"},xd={key:1,class:"fee-summary-amount"},Nd={key:2,class:"is-size-7 has-text-grey"},Ud={key:3,class:"is-size-7 has-text-grey mt-1"},Dd={key:1},Xd={key:0,class:"fee-summary-amount"},Vd={class:"mt-1"},Rd={class:"is-size-7 is-flex is-align-items-center",style:{gap:"0.35rem"}},Od={key:0,class:"ml-1"},Qd={class:"is-size-7 is-flex is-align-items-center mt-1",style:{gap:"0.35rem"}},Bd={key:0,class:"ml-1"},Gd={key:0,class:"is-size-7 is-flex is-align-items-center mt-1",style:{gap:"0.35rem"}},Wd={class:"ml-1"},jd={key:0,class:"fee-summary-col fee-summary-col--action"},zd=["disabled"],qd={class:"icon is-small mr-1"},Jd={key:0,class:"is-size-7 has-text-grey mt-1"},Hd=["disabled"],Kd={class:"icon is-small mr-1"};function Yd(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",Ed,[(0,s.Lk)("div",$d,[(0,s.Lk)("div",Fd,[(0,s.Lk)("p",Td,(0,a.v_)(e.$t("STATUS")),1),(0,s.Lk)("span",{class:(0,a.C4)(["has-text-weight-bold fee-summary-status",i.item.isFeeActive?"has-text-success":"has-text-danger"])},(0,a.v_)(i.item.isFeeActive?e.$t("feeTenantActive"):e.$t("feeUnpaid")),3),i.item.isFeeActive&&l.validDateLabel?((0,s.uX)(),(0,s.CE)("p",Sd,(0,a.v_)(e.$t("Until"))+" "+(0,a.v_)(l.validDateLabel),
11)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",Ad,[(0,s.Lk)("p",Pd,(0,a.v_)(i.hasLocalFee?e.$t("TOTAL FEE"):e.$t("FEE")),1),i.hasLocalFee?((0,s.uX)(),(0,s.CE)("div",Dd,[l.combinedAmountLabel?((0,s.uX)(),(0,s.CE)("p",Xd,(0,a.v_)(l.combinedAmountLabel),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",Vd,[(0,s.Lk)("p",Rd,[t[3]||(t[3]=(0,s.Lk)("span",{class:"fee-dot fee-dot--national"},null,-1)),(0,s.Lk)("span",null,(0,a.v_)(e.$t("feeTenant")),1),l.tenantAmountLabel?((0,s.uX)(),(0,s.CE)("strong",Od,(0,a.v_)(l.tenantAmountLabel),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("p",Qd,[t[4]||(t[4]=(0,s.Lk)("span",{class:"fee-dot fee-dot--local"},null,-1)),(0,s.Lk)("span",null,(0,a.v_)(e.$t("feeLocal")),1),l.localAmountLabel?((0,s.uX)(),(0,s.CE)("strong",Bd,(0,a.v_)(l.localAmountLabel),1)):(0,s.Q3)("",!0)]),l.tenantFee.registrationGross>0?((0,s.uX)(),(0,s.CE)("p",Gd,[t[5]||(t[5]=(0,s.Lk)("span",{class:"fee-dot fee-dot--registration"},null,-1)),(0,s.Lk)("span",null,(0,a.v_)(l.registrationFeeLabel),1),(0,s.Lk)("strong",Wd,(0,a.v_)(l.formatCurrency(l.tenantFee.registrationGross)),1)])):(0,s.Q3)("",!0)])])):((0,s.uX)(),(0,s.CE)("div",Id,[l.tenantAmountLabel?((0,s.uX)(),(0,s.CE)("p",Md,(0,a.v_)(l.tenantAmountLabel),1)):l.chosenAmountHeadline?((0,s.uX)(),(0,s.CE)("p",xd,(0,a.v_)(l.chosenAmountHeadline),1)):(0,s.Q3)("",!0),l.planSubline?((0,s.uX)(),(0,s.CE)("p",Nd,(0,a.v_)(l.planSubline),1)):(0,s.Q3)("",!0),l.registrationFeeLine?((0,s.uX)(),(0,s.CE)("p",Ud,(0,a.v_)(l.registrationFeeLine),1)):(0,s.Q3)("",!0)]))]),l.showActions?((0,s.uX)(),(0,s.CE)("div",jd,[i.canSubscribe?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("button",{class:"button is-primary is-rounded",disabled:i.isLoading||i.payPanelOpen,onClick:t[0]||(t[0]=t=>e.$emit("subscribe"))},[(0,s.Lk)("span",qd,[(0,s.bF)(r,{icon:"fa-light fa-rotate-right"})]),(0,s.Lk)("span",null,[(0,s.eW)((0,a.v_)(e.$t("Automatic Renewal"))+" ",1),l.tenantAmountLabel?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("· "+(0,a.v_)(l.tenantAmountLabel)+" /"+(0,a.v_)(i.periodLabel),1)],64)):(0,s.Q3)("",!0)])],8,zd),l.firstPaymentTotal>l.tenantFee.gross?((0,s.uX)(),(0,s.CE)("p",Jd,(0,a.v_)(e.$t("First payment {amount} · incl. registration fee",{amount:l.formatCurrency(l.firstPaymentTotal)})),1)):(0,s.Q3)("",!0),i.canPay?((0,s.uX)(),(0,s.CE)("a",{key:1,class:(0,a.C4)(["fee-summary-pay-once is-size-6 has-text-grey-dark mt-2",{"is-disabled":i.payPanelOpen}]),onClick:t[1]||(t[1]=t=>i.payPanelOpen||e.$emit("pay"))},(0,a.v_)(l.firstPaymentLabel?e.$t("or pay {amount} once",{amount:l.firstPaymentLabel}):e.$t("or pay once")),3)):(0,s.Q3)("",!0)],64)):i.canPay?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-primary is-rounded",disabled:i.isLoading||i.payPanelOpen,onClick:t[2]||(t[2]=t=>e.$emit("pay"))},[(0,s.Lk)("span",Kd,[(0,s.bF)(r,{icon:"fa-light fa-credit-card"})]),(0,s.Lk)("span",null,[(0,s.eW)((0,a.v_)(e.$t("Pay"))+" ",1),l.firstPaymentLabel?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("· "+(0,a.v_)(l.firstPaymentLabel),1)],64)):(0,s.Q3)("",!0)])],8,Hd)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])])}var Zd={props:{item:{type:Object,required:!0},hasLocalFee:{type:Boolean,default:!1},currency:{type:String,default:""},canPay:{type:Boolean,default:!1},canSubscribe:{type:Boolean,default:!1},hasActiveSubscription:{type:Boolean,default:!1},bankTransferInProgress:{type:String,default:null},isLoading:{type:Boolean,default:!1},periodLabel:{type:String,default:""},isSelectingPeriods:{type:Boolean,default:!1},payPanelOpen:{type:Boolean,default:!1}},emits:["pay","subscribe"],methods:{formatCurrency(e,t){return this.$filters.money(e??0,t)},amountLabel(e,t){return t?.isCustomAmount?"":this.formatCurrency(e)}},computed:{...(0,ur.L8)(["tenant","isNativeAppIos"]),showActions(){return!this.isSelectingPeriods&&(!this.hasLocalFee&&(!this.hasActiveSubscription&&(!this.bankTransferInProgress&&(!this.isNativeAppIos&&(this.canPay||this.canSubscribe)))))},validDateLabel(){return this.item.feeTenantProductPrice?.isLifetime?this.$t("Lifetime"):this.item.validFeeDate?this.$filters.format(this.item.validFeeDate,"date"):null},tenantFee(){return(0,Ld.QU)(this.tenant,this.item,this.item.feeTenantProductPrice)},localFee(){return(0,Ld.QU)(this.tenant,this.item,this.item.feeLocalProductPrice)},combinedTotal(){return this.tenantFee.total+this.localFee.gross},membershipVatLabel(){const e=parseFloat(this.item.feeTenantProductPrice?.priceVatRate);return this.$t("VAT")+(Number.isFinite(e)&&e>0?" ("+(0,Ld.nU)(e)+"%)":"")}
1,combinedChosenPrice(){return[this.item.feeTenantProductPrice,this.item.feeLocalProductPrice].find(e=>e?.isCustomAmount)??null},tenantAmountLabel(){return this.amountLabel(this.tenantFee.gross,this.item.feeTenantProductPrice)},localAmountLabel(){return this.amountLabel(this.localFee.gross,this.item.feeLocalProductPrice)},combinedAmountLabel(){return this.amountLabel(this.combinedTotal,this.combinedChosenPrice)},firstPaymentLabel(){return this.amountLabel(this.firstPaymentTotal,this.item.feeTenantProductPrice)},chosenAmountHeadline(){return this.item.feeTenantProductPrice?.isCustomAmount?this.$t("Up to you"):""},planSubline(){const e=this.item.feeTenantProductPrice;if(e?.isCustomAmount){const t=[],i=parseFloat(e.customMinPrice),s=parseFloat(e.customMaxPrice);return Number.isFinite(i)&&i>0&&t.push(this.$t("Minimum")+" "+this.formatCurrency(i,e.currency)),Number.isFinite(s)&&s>0&&t.push(this.$t("Maximum")+" "+this.formatCurrency(s,e.currency)),t.join(" · ")}const t=[];return e?.name&&t.push(this.$t("Plan")+": "+e.name),this.tenantFee.vat>0&&t.push(this.formatCurrency(this.tenantFee.net)+" + "+this.membershipVatLabel),t.join(" · ")},registrationFeeLabel(){return this.tenantFee.registrationVat>0?this.$t("Registration fee (one-time, incl. VAT)"):this.$t("Registration fee (one-time)")},registrationFeeLine(){return this.tenantFee.registrationGross<=0?"":"+ "+this.formatCurrency(this.tenantFee.registrationGross)+" · "+this.registrationFeeLabel},firstPaymentTotal(){return this.tenantFee.total}}},ec=i(66262);const tc=(0,ec.A)(Zd,[["render",Yd],["__scopeId","data-v-50436018"]]);var ic=tc;const sc={class:"card fee-card"},ac={key:0,class:"fee-card-selection-toolbar"},nc={class:"is-flex is-align-items-center is-flex-wrap-wrap",style:{gap:"0.5rem"}},oc=["disabled"],lc={class:"icon is-small mr-1"},rc=["disabled"],dc={class:"icon is-small mr-1"},cc={class:"icon is-small mr-1"},uc={key:0,class:"is-size-7 has-text-grey mt-2"},mc={key:1,class:"fee-card-header"},pc={class:"is-flex is-align-items-center",style:{gap:"0.75rem"}},hc={class:"fee-card-icon-wrapper"},gc={class:"has-text-weight-bold is-size-6"},fc={key:0,class:"is-size-7 has-text-grey"},bc={key:0,class:"is-flex is-align-items-center",style:{gap:"0.4rem"}},yc={key:0,class:"tag is-rounded is-small is-info is-passive"},vc={key:2,class:"fee-card-plan"},kc={class:"fee-plan-selected"},Cc={class:"has-text-weight-semibold"},Lc={class:"has-text-weight-bold is-size-5"},wc={class:"is-size-7 has-text-grey has-text-weight-normal"},_c={key:3,class:"fee-card-change-plan"},Ec={class:"fee-change-plan-arrow"},$c={key:0,class:"mt-3"},Fc={key:4,class:"fee-card-subscription"},Tc={class:"fee-subscription-banner-icon"},Sc={class:"fee-subscription-banner-text"},Ac={class:"has-text-weight-semibold is-size-7"},Pc={class:"is-size-7 has-text-grey-dark"},Ic={class:"fee-subscription-banner-action"},Mc={key:5,class:"px-5 py-3"},xc={class:"notification is-warning is-light p-3",style:{"border-radius":"8px",border:"1px solid hsl(44, 100%, 77%)","margin-bottom":"0"}},Nc={class:"is-flex is-align-items-center is-justify-content-space-between is-flex-wrap-wrap",style:{gap:"0.5rem"}},Uc={class:"is-flex is-align-items-center",style:{gap:"0.5rem"}},Dc={class:"is-size-7 has-text-weight-semibold"},Xc={class:"is-size-7 has-text-grey-dark"},Vc={class:"is-flex",style:{gap:"0.25rem"}},Rc={key:6,class:"fee-card-history"},Oc={class:"fee-section-label"},Qc={class:"has-text-grey is-size-7 py-3"},Bc={key:7,class:"fee-card-history"},Gc={class:"fee-section-label"},Wc=["onClick"],jc={class:"is-flex is-align-items-center",style:{gap:"0.5rem"}},zc={class:"is-flex is-align-items-center",style:{gap:"0.5rem"}},qc={class:"has-text-weight-bold",style:{"min-width":"70px","text-align":"right"}},Jc={key:0,class:"fee-history-more"},Hc={key:8,class:"fee-card-footer"},Kc={class:"is-flex is-align-items-center",style:{gap:"0.75rem"}},Yc={class:"icon is-small mr-1"},Zc={key:0,class:"fee-card-footer-actions"},eu=["disabled"],tu={class:"icon is-small mr-1"},iu={key:0,class:"is-size-7 has-text-grey"},su=["disabled"],au={class:"icon is-small mr-1"};function nu(e,t,i,o,l,r){const d=(0,s.g2)("font-awesome-icon"),c=(0,s.g2)("FeePriceSelector"),u=(0,s.g2)("b-button"),m=(0,s.g2)("b-checkbox"),p=(0,s.g2)("b-tooltip");return(0,s.uX)(),(0,s.CE)("div",sc,[r.isSelectingPeriods?((0,s.uX)(),(0,s.CE)("div",ac,[(0,s.Lk)("div",nc,["pay"===l.selectingMode?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-rounded","national"===i.feeType?"is-primary":"fee-btn-local"]),disabled:0===r.selectedTotal||i.isLoading,onClick:t[0]||(t[0]=t=>e.$emit("pay-selected",r.selectedEntries))},[(0,s.Lk)("span",lc,[(0,s.bF)(d,{icon:"fa-light fa-credit-card"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Pay"))+" "+(0,a.v_)(r.selectedTotal>0?r.formatCurrency(r.selectedPayTotal):""),1)],10,oc)):(0,s.Q3)("",!0),"mark"===l.selectingMode?((0,s.uX)(),(0,s.CE)("button",{key:1,class:(0,a.C4)(["button is-small is-rounded","national"===i.feeType?"is-primary":"fee-btn-local"]),disabled:0===r.selectedTotal||i.isLoading,onClick:t[1]||(t[1]=(...e)=>r.confirmMarkAsPaid&&r.confirmMarkAsPaid(...e))},[(0,s.Lk)("span",dc,[(0,s.bF)(d,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Mark as Paid"))+" "+(0,a.v_)(r.selectedTotal>
10?r.formatCurrency(r.selectedTotal):""),1)],10,rc)):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"button is-small is-rounded is-light",onClick:t[2]||(t[2]=(...e)=>r.selectAllUnpaid&&r.selectAllUnpaid(...e))},[(0,s.Lk)("span",cc,[(0,s.bF)(d,{icon:"fa-light fa-square-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Select all intervals")),1)]),(0,s.Lk)("a",{class:"is-size-7 has-text-grey ml-2",onClick:t[3]||(t[3]=(...e)=>r.cancelSelection&&r.cancelSelection(...e))},(0,a.v_)(e.$t("cancel")),1)]),"pay"===l.selectingMode&&r.registrationFeeDue>0&&r.selectedTotal>0?((0,s.uX)(),(0,s.CE)("p",uc,(0,a.v_)(r.registrationFeeIncludedLine),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),r.isSelectingPeriods||i.hideStatusAndPlan?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",mc,[(0,s.Lk)("div",pc,[(0,s.Lk)("span",hc,[(0,s.bF)(d,{icon:"national"===i.feeType?"fa-light fa-building-columns":"fa-light fa-users",class:"fee-card-icon"},null,8,["icon"])]),(0,s.Lk)("div",null,[(0,s.Lk)("p",gc,(0,a.v_)("national"===i.feeType?e.$t("feeTenant"):e.$t("feeLocal")),1),r.activeDateRange?((0,s.uX)(),(0,s.CE)("p",fc,(0,a.v_)(r.activeDateRange),1)):(0,s.Q3)("",!0)])]),i.hideStatusAndPlan?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",bc,[(0,s.Lk)("span",{class:(0,a.C4)(["tag is-rounded is-small",r.isActive?"is-success is-passive":"is-danger is-passive"]),style:{"text-transform":"capitalize"}},(0,a.v_)(r.isActive?e.$t("feeTenantActive"):e.$t("feeUnpaid")),3),r.hasActiveSubscription?((0,s.uX)(),(0,s.CE)("span",yc,[(0,s.bF)(d,{icon:"fa-light fa-rotate-right",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Auto-renewing")),1)])):(0,s.Q3)("",!0)]))])),r.currentPrice&&!i.hideStatusAndPlan?((0,s.uX)(),(0,s.CE)("div",vc,[(0,s.Lk)("div",kc,[(0,s.Lk)("div",null,[(0,s.Lk)("span",Cc,(0,a.v_)(r.currentPrice.name),1)]),(0,s.Lk)("div",Lc,[(0,s.eW)((0,a.v_)(r.currentPriceLabel)+" ",1),(0,s.Lk)("span",wc,"/"+(0,a.v_)(r.periodLabel),1)])])])):(0,s.Q3)("",!0),i.canSelectPrice&&i.availablePrices.length>1?((0,s.uX)(),(0,s.CE)("div",_c,[(0,s.Lk)("a",{class:"is-flex is-align-items-center is-size-6-half has-text-weight-semibold",style:{gap:"0.25rem"},onClick:t[4]||(t[4]=t=>e.$emit("toggle-change-plan"))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Change plan")),1),(0,s.Lk)("span",Ec,(0,a.v_)(i.showChangePlan?"â":"â"),
11)]),i.showChangePlan?((0,s.uX)(),(0,s.CE)("div",$c,[(0,s.bF)(c,{prices:i.availablePrices,"selected-price":r.currentPrice,selectable:i.canSelectPrice,loading:i.isSaving,"loading-price-id":i.savingPriceId,"confirm-selection":!0,"show-empty-state":!1,"user-birthdate":i.item.dateBirth,onSelect:t[5]||(t[5]=t=>e.$emit("select-price",t))},null,8,["prices","selected-price","selectable","loading","loading-price-id","user-birthdate"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),i.subscriptionProfile?((0,s.uX)(),(0,s.CE)("div",Fc,[(0,s.Lk)("div",{class:(0,a.C4)(["fee-subscription-banner",i.subscriptionProfile.isSubscriptionCanceled?"is-warning":"is-success"])},[(0,s.Lk)("div",Tc,[(0,s.bF)(d,{icon:i.subscriptionProfile.isSubscriptionCanceled?"fa-light fa-clock":"fa-light fa-rotate-right"},null,8,["icon"])]),(0,s.Lk)("div",Sc,[(0,s.Lk)("p",Ac,(0,a.v_)(i.subscriptionProfile.isSubscriptionCanceled?e.$t("Auto-renewal ending"):e.$t("Auto-renewing membership")),1),(0,s.Lk)("p",Pc,[i.subscriptionProfile.isSubscriptionCanceled?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("Last day"))+": "+(0,a.v_)(e.$filters.format(i.subscriptionProfile.currentPeriodEnd)),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(e.$t("Next charge"))+" "+(0,a.v_)(r.subscriptionChargeLabel)+" · "+(0,a.v_)(e.$filters.format(i.subscriptionProfile.currentPeriodEnd)),1)],64))])]),(0,s.Lk)("div",Ic,[i.subscriptionProfile.isSubscriptionCanceled?((0,s.uX)(),(0,s.CE)("a",{key:1,class:(0,a.C4)(["is-size-7 has-text-success has-text-weight-semibold",{"is-disabled":i.subscriptionUpdating}]),onClick:t[7]||(t[7]=t=>i.subscriptionUpdating||e.$emit("reactivate-subscription"))},[i.subscriptionUpdating?((0,s.uX)(),(0,s.Wv)(d,{key:0,icon:"fa-light fa-spinner-third",spin:"",class:"mr-1"})):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(e.$t("Reactivate auto-renewal")),1)],2)):((0,s.uX)(),(0,s.CE)("a",{key:0,class:(0,a.C4)(["is-size-7 has-text-danger",{"is-disabled":i.subscriptionUpdating}]),onClick:t[6]||(t[6]=t=>i.subscriptionUpdating||e.$emit("cancel-subscription"))},[i.subscriptionUpdating?((0,s.uX)(),(0,s.Wv)(d,{key:0,icon:"fa-light fa-spinner-third",spin:"",class:"mr-1"})):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(e.$t("Cancel auto-renewal")),1)],2))])],2)])):(0,s.Q3)("",!0),i.bankTransferInProgress?((0,s.uX)(),(0,s.CE)("div",Mc,[(0,s.Lk)("div",xc,[(0,s.Lk)("div",Nc,[(0,s.Lk)("div",Uc,[(0,s.bF)(d,{icon:"fa-light fa-clock",class:"has-text-warning-dark"}),(0,s.Lk)("div",null,[(0,s.Lk)("p",Dc,(0,a.v_)(e.$t("Pending bank transfer")),1),(0,s.Lk)("p",Xc,[(0,s.eW)((0,a.v_)(e.$t("Reference"))+": ",1),(0,s.Lk)("strong",null,(0,a.v_)(i.bankTransferInProgress),1)])])]),(0,s.Lk)("div",Vc,[(0,s.bF)(u,{size:"is-small",type:"is-light",class:"is-rounded",onClick:t[8]||(t[8]=t=>e.$emit("show-bank-transfer-details"))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Details")),1)]),_:1}),r.isOwnProfile?((0,s.uX)(),(0,s.Wv)(u,{key:0,size:"is-small",type:"is-light",class:"is-rounded",onClick:t[9]||(t[9]=t=>e.$emit("cancel-bank-transfer"))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Cancel")),1)]),_:1})):(0,s.Q3)("",!0)])])])])):(0,s.Q3)("",!0),i.history&&0!==i.history.length||!i.hideStatusAndPlan?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Rc,[(0,s.Lk)("p",Oc,(0,a.v_)(e.$t("HISTORY")),1),(0,s.Lk)("p",Qc,(0,a.v_)(e.$t("noMembershipFeeHistory")),1)])),i.history&&i.history.length>0?((0,s.uX)(),(0,s.CE)("div",Bc,[(0,s.Lk)("p",Gc,(0,a.v_)(e.$t("HISTORY")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.history,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.intervalId||e.periodStartLabel,class:(0,a.C4)(["fee-history-item",r.getHistoryItemClass(e)]),onClick:t=>r.isSelectingPeriods&&r.isUnpaidEntry(e)?r.togglePeriodSelection(e):null},[(0,s.Lk)("div",jc,[r.isSelectingPeriods&&r.isUnpaidEntry(e)?((0,s.uX)(),(0,s.Wv)(m,{key:0,"model-value":r.isEntrySelected(e),"onUpdate:modelValue":t=>r.togglePeriodSelection(e),onClick:t[10]||(t[10]=(0,n.D$)(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])):((0,s.uX)(),(0,s.CE)("span",{key:1,class:(0,a.C4)(["fee-history-dot",r.getHistoryDotClass(e)])}
1,null,2)),(0,s.Lk)("span",null,(0,a.v_)(r.formatPeriodLabel(e,"start"))+" â "+(0,a.v_)(r.formatPeriodLabel(e,"end")),1)]),(0,s.Lk)("div",zc,[(0,s.Lk)("span",{class:(0,a.C4)(["tag is-rounded",r.getHistoryTagClass(e)]),style:{"font-size":"0.7rem",padding:"0.2rem 0.5rem",height:"auto"}},(0,a.v_)(r.getHistoryTagLabel(e)),3),(0,s.Lk)("span",qc,[e.paid>0&&e.unpaid>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(r.formatCurrency(e.paid))+" / "+(0,a.v_)(r.formatCurrency(e.paid+e.unpaid)),1)],64)):"short"===e.status?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(r.formatCurrency(e.paid))+" / "+(0,a.v_)(r.formatCurrency(e.minimum)),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.eW)((0,a.v_)(r.formatCurrency(e.paid||e.unpaid||0)),1)],64))])])],10,Wc))),128)),i.historyHasMore||i.isHistoryExpanded?((0,s.uX)(),(0,s.CE)("div",Jc,[(0,s.Lk)("a",{class:"is-size-7 has-text-grey",onClick:t[11]||(t[11]=t=>e.$emit("toggle-history"))},[(0,s.bF)(d,{icon:i.isHistoryExpanded?"fa-light fa-chevron-up":"fa-light fa-chevron-down",class:"mr-1"},null,8,["icon"]),i.isHistoryExpanded?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("Show less")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)("+"+(0,a.v_)(i.totalHistoryCount-i.history.length)+" "+(0,a.v_)(e.$t("older")),1)],64))])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),r.showAdminFooter||r.showPaymentFooter?((0,s.uX)(),(0,s.CE)("div",Hc,[(0,s.Lk)("div",Kc,[r.showAdminFooter?((0,s.uX)(),(0,s.Wv)(p,{key:0,label:e.$t("Only visible to admins"),position:"is-top",type:"is-dark",size:"is-small"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"button is-small is-rounded is-light",onClick:t[12]||(t[12]=(...e)=>r.handleMarkAsPaidClick&&r.handleMarkAsPaidClick(...e))},[(0,s.Lk)("span",Yc,[(0,s.bF)(d,{icon:"fa-light fa-user-shield"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Mark as Paid")),1)])]),_:1},8,["label"])):(0,s.Q3)("",!0)]),r.showPaymentFooter?((0,s.uX)(),(0,s.CE)("div",Zc,[i.canSubscribe?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("button",{class:(0,a.C4)(["button is-small is-rounded","national"===i.feeType?"is-primary":"fee-btn-local"]),disabled:i.isLoading||i.editingFeePrice,onClick:t[13]||(t[13]=t=>e.$emit("subscribe"))},[(0,s.Lk)("span",tu,[(0,s.bF)(d,{icon:"fa-light fa-rotate-right"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Automatic Renewal"))+" · "+(0,a.v_)(r.formatCurrency(r.priceBreakdown.gross))+" /"+(0,a.v_)(r.periodLabel),1)],10,eu),r.firstPaymentTotal>r.priceBreakdown.gross?((0,s.uX)(),(0,s.CE)("p",iu,(0,a.v_)(e.$t("First payment {amount} · incl. registration fee",{amount:r.formatCurrency(r.firstPaymentTotal)})),1)):(0,s.Q3)("",!0),i.canPay?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"fee-card-pay-once is-size-6 has-text-grey-dark",onClick:t[14]||(t[14]=(...e)=>r.payOnceClick&&r.payOnceClick(...e))},(0,a.v_)(e.$t("or pay {amount} once",{amount:r.formatCurrency(r.firstPaymentTotal)})),1)):(0,s.Q3)("",!0)],64)):i.canPay?((0,s.uX)(),(0,s.CE)("button",{key:1,class:(0,a.C4)(["button is-small is-rounded","national"===i.feeType?"is-primary":"fee-btn-local"]),disabled:i.isLoading||i.editingFeePrice,onClick:t[15]||(t[15]=(...e)=>r.payOnceClick&&r.payOnceClick(...e))},[(0,s.Lk)("span",au,[(0,s.bF)(d,{icon:"fa-light fa-credit-card"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Pay"))+" "+(0,a.v_)(r.formatCurrency(r.firstPaymentTotal)),1)],10,su)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])}var ou=i(6648),lu={components:{FeePriceSelector:ou.A},props:{feeType:{type:String,required:!0},item:{type:Object,required:!0},feeProduct:{type:Object,default:null},subscriptionProfile:{type:Object,default:null},subscriptionUpdating:{type:Boolean,default:!1},history:{type:Array,default:()=>[]},historyHasMore:{type:Boolean,default:!1},totalHistoryCount:{type:Number,default:0},showChangePlan:{type:Boolean,default:!1},availablePrices:{type:Array,default:()=>[]},canSelectPrice:{type:Boolean,default:!1},isSaving:{type:Boolean,default:!1},savingPriceId:{type:String,default:null},canPay:{type:Boolean,default:!1},canSubscribe:{type:Boolean,default:!1},canMarkAsPaid:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},bankTransferInProgress:{type:String,default:null},editingFeePrice:{type:Boolean,default:!1},hidePaymentActions:{type:Boolean,default:!1},hideStatusAndPlan:{type:Boolean,default:!1},isHistoryExpanded:{type:Boolean,default:!1}},emits:["toggle-change-plan","select-price","pay","pay-selected","subscribe","mark-as-paid","mark-selected-paid","cancel-subscription","reactivate-subscription","cancel-bank-transfer","view-invoice","show-bank-transfer-details","toggle-history","selection-mode-change"],data(){return{selectingMode:null,selectedIntervals:{}}},watch:{isSelectingPeriods(e){this.$emit("selection-mode-change",e)}},computed:{...(0,ur.L8)(["tenant","user","isNativeAppIos"]),isOwnProfile(){return this.item.id===this.user.id},isSelectingPeriods(){return null!==this.selectingMode},isActive(){return"national"===this.feeType?this.item.isFeeActive:!(!this.item.feeLocalProductPrice||!this.item.validLocalFeeDate)},currentPrice(){return"national"===this.feeType?this.item.feeTenantProductPrice:this.item.feeLocalProductPrice},isCustomAmountPrice(){return!!this.currentPrice?.isCustomAmount},currentPriceAmount(){const e=this.currentPrice;
1return e?this.isCustomAmountPrice?e.price??e.customMinPrice:e.price:0},subscriptionChargeLabel(){const e=this.subscriptionProfile,t=e?.customPriceValue??e?.productPrice?.price??null;return null===t||void 0===t?this.currentPriceLabel:this.formatCurrency(t,e.currency||this.currentPrice?.currency)},currentPriceLabel(){const e=this.currentPrice;return e?this.isCustomAmountPrice?this.$t("from {amount}").replace("{amount}",this.formatCurrency(e.price??e.customMinPrice,e.currency)):this.formatCurrency(e.price,e.currency):this.formatCurrency(null)},activeDateRange(){const e="national"===this.feeType?this.item.validFeeDate:this.item.validLocalFeeDate;return e?this.currentPrice?.isLifetime?this.$t("Lifetime"):this.$t("Until")+" "+this.$filters.format(e):null},periodLabel(){const e=this.currentPrice?.overwriteMonthPeriod||this.currentPrice?.monthPeriod||(this.feeProduct?this.feeProduct.monthPeriod:12);return 12===e?this.$t("year"):1===e?this.$t("month"):e+" "+this.$t("months")},hasUnpaidPeriods(){return this.history?.some(e=>e.unpaid&&e.unpaid>0)??!1},isFixedStartingDate(){return this.tenant?.settingFeatures?.fees?.fixedStartingDateFee??!1},hasActiveSubscription(){return this.subscriptionProfile&&!this.subscriptionProfile.isSubscriptionCanceled},showAdminFooter(){return!(!this.canMarkAsPaid||this.isSelectingPeriods)&&(!this.isFixedStartingDate||this.hasUnpaidPeriods)},showPaymentFooter(){return!this.hidePaymentActions&&(!this.isSelectingPeriods&&(!this.bankTransferInProgress&&(!this.isNativeAppIos&&(!this.hasActiveSubscription&&(this.canPay||this.canSubscribe)))))},selectedEntries(){const e=[];for(let t of this.history)this.selectedIntervals[t.intervalId]&&e.push(t);return e},selectedTotal(){let e=0;for(let t of this.selectedEntries)e+=t.unpaid||0;return parseFloat(e.toFixed(2))},registrationFeeDue(){return"national"===this.feeType&&this.isFixedStartingDate?(0,Ld.gt)(this.tenant,this.item,this.currentPrice):0},priceBreakdown(){return this.breakdownFor(this.currentPrice?.price,"national"===this.feeType?(0,Ld.gt)(this.tenant,this.item,this.currentPrice):0)},firstPaymentTotal(){return this.priceBreakdown.total},selectedPayTotal(){return this.breakdownFor(this.selectedTotal,this.registrationFeeDue).total},registrationFeeDueGross(){return this.breakdownFor(0,this.registrationFeeDue).registrationGross},registrationFeeIncludedLine(){const e=this.registrationFeeDueGross>this.registrationFeeDue?this.$t("Registration fee (one-time, incl. VAT)"):this.$t("Registration fee (one-time)");return this.$t("Includes")+" "+this.formatCurrency(this.registrationFeeDueGross)+" · "+e}},methods:{formatCurrency(e,t){return this.$filters.money(e??0,t)},breakdownFor(e,t){return(0,Ld.OR)({tenant:this.tenant,amount:e,vatRate:this.currentPrice?.priceVatRate??null,vatExempt:!!this.currentPrice?.priceVatExempt,registrationFee:t,registrationFeeVatRate:this.currentPrice?.registrationFeeVatRate??null,registrationFeeVatExempt:!!this.currentPrice?.registrationFeeVatExempt})},isUnpaidEntry(e){return!e.exempt&&(!!this.isFixedStartingDate&&(e.unpaid&&e.unpaid>0))},isEntrySelected(e){return!!this.selectedIntervals[e.intervalId]},togglePeriodSelection(e){this.isUnpaidEntry(e)&&(this.selectedIntervals[e.intervalId]=!this.selectedIntervals[e.intervalId])},confirmMarkAsPaid(){this.$buefy.dialog.confirm({title:this.$t("Mark as Paid"),message:this.$t("Are you sure you want to mark the selected periods as paid?"),confirmText:this.$t("Confirm"),cancelText:this.$t("Cancel"),type:"is-primary",onConfirm:()=>{this.$emit("mark-selected-paid",this.selectedEntries)}})},selectAllUnpaid(){for(let e of this.history)this.isUnpaidEntry(e)&&(this.selectedIntervals[e.intervalId]=!0)},handleMarkAsPaidClick(){this.isFixedStartingDate?this.startMarkAsPaid():this.$emit("mark-as-paid")},payOnceClick(){this.isFixedStartingDate&&this.hasUnpaidPeriods?this.startPaySelection():this.$emit("pay")},formatPeriodLabel(e,t){if(e.status){const i="start"===t?e.periodStart:e.periodEnd;return this.$filters.format(i,"date")}return"start"===t?e.periodStartLabel:e.periodEndLabel},startPaySelection(){"pay"!==this.selectingMode&&(this.selectingMode="pay",this.selectedIntervals={})},startMarkAsPaid(){"mark"!==this.selectingMode&&(this.selectingMode="mark",this.selectedIntervals={})}
1,cancelSelection(){this.selectingMode=null,this.selectedIntervals={}},getHistoryItemClass(e){return{"is-clickable":this.isSelectingPeriods,"is-selected":this.isSelectingPeriods&&this.isEntrySelected(e),"fee-history-item--refunded":"refunded"===e.status}},getHistoryDotClass(e){return e.exempt?"is-paid":"refunded"===e.status?"is-refunded":"pending"===e.status||e.isPending?"is-pending":"paid"===e.status?"is-paid":"short"===e.status||e.paid&&e.paid>0&&e.unpaid&&e.unpaid>0?"is-partial":e.unpaid&&e.unpaid>0?"is-default":"is-paid"},getHistoryTagClass(e){return e.exempt||"refunded"===e.status?"is-light":"pending"===e.status||e.isPending?"is-warning is-passive":"paid"===e.status?"is-success is-passive":"short"===e.status||e.paid&&e.paid>0&&e.unpaid&&e.unpaid>0?"is-warning is-passive":e.paid&&e.paid>0&&(!e.unpaid||0===e.unpaid)?"is-success is-passive":e.unpaid&&e.unpaid>0?"is-danger is-passive":"is-success is-passive"},getHistoryTagLabel(e){return e.exempt?this.$t("Exempt"):"refunded"===e.status?this.$t("Refunded"):"pending"===e.status||e.isPending?this.$t("Pending"):"paid"===e.status?this.$t("Paid"):"short"===e.status||e.paid&&e.paid>0&&e.unpaid&&e.unpaid>0?this.$t("Partially paid"):e.paid&&e.paid>0&&(!e.unpaid||0===e.unpaid)?this.$t("Paid"):e.unpaid&&e.unpaid>0?this.$t("feeUnpaid"):this.$t("Paid")},isCurrentPeriod(e){return!(!this.history||0===this.history.length)&&(this.history[0]===e&&this.isActive)}}};const ru=(0,ec.A)(lu,[["render",nu],["__scopeId","data-v-cd4ef6f6"]]);var du=ru,cu=i(36803);const uu="&status[]=active&status[]=canceling";var mu={props:{itemUser:{type:Object,default:null},isOnboarding:{type:Boolean,default:!1}},emits:["updateUser","update-user"],data(){return{isLoading:!1,isLoadingCheckout:!1,item:!1,isSaving:!1,savingPriceId:null,feeType:"tenant",feeLocalProductPrice:null,feeTenantProductPrice:null,feeTenantProduct:null,subscriptionProfile:null,showDateSelectionModal:!1,showLocalDateSelectionModal:!1,periodStart:null,isCustomAmount:!1,customAmountValue:null,suffix:null,showPaymentMethodModal:!1,invoiceSeriesForBankTransfer:null,bankingInfoForTransfer:null,bankTransferAmount:null,isCancellingBankTransfer:!1,membershipContractItem:null,now:new Date,inNumberOfDays:new Date,localCenterSubscriptionProfile:null,showLocalFeePaymentMethodModal:!1,localFeeInvoiceSeriesForBankTransfer:null,validLocalFeeDate:null,localFeePeriodStart:null,isLocalFeeCustomAmount:!1,localFeeCustomAmountValue:null,myCompany:null,editingFeePrice:!1,feeTenantHistory:[],feeLocalHistory:[],tenantFeeSelecting:!1,localFeeSelecting:!1,showTenantChangePlan:!1,showLocalChangePlan:!1,showAllTenantHistory:!1,showAllLocalHistory:!1,subscriptionUpdating:!1,redirectSettleStarted:!1,feeProductLoadRetrying:!1,onboardingFinishing:!1,inlinePay:{show:!1,endpoint:"/connected/stripe-payment-intent-fee",checkoutEndpoint:"/connected/stripe-checkout-fee",payload:{},copyLink:!1,amount:null,currency:"",isSubscription:!1,periodLabel:"",title:"",settled:!1}}},watch:{itemUser:function(){this.item=this.itemUser,this.maybeFinalizeRedirectPayment()}},created(){this.item=this.itemUser,this.maybeFinalizeRedirectPayment();let e=7;this.item&&this.item.feeTenantProductPrice?.monthPeriod>=2&&(e=31),this.inNumberOfDays.setDate(this.now.getDate()+e),this.feeTenantProductPrice=null,this.tenant?.settingFeatures.fees.isActive&&(this.item.feeTenantProductPrice&&(this.feeTenantProductPrice=this.item.feeTenantProductPrice["@id"]),this.feeLocalProductPrice=this.item.feeLocalProductPrice?this.item.feeLocalProductPrice["@id"]:null,this.loadFeeTenantProduct(),this.getSubscriptionProfile(),this.item.feeLocalProductPrice&&this.getLocalCenterSubscriptionProfile(),this.suffix=this.tenant.currencySymbol,this.tenant.settingFeatures.fees.requireContractForMembershipPurchase&&this.showMembershipContract())},methods:{copyToClipboard:mr.lW,fetchMyCompany(){this.tenant.settingFeatures.company?.isActive&&this.tenant.settingFeatures.company?.feesEnabled&&this.$http.plain.get("/my-company").then(e=>{this.myCompany=e.data.company||null}).catch(()=>{this.myCompany=null})},getUserAge(){if(!this.item.dateBirth)return null;const e=(0,mr.QE)(this.item.dateBirth),t=new Date;let i=t.getFullYear()-e.getFullYear();const s=t.getMonth()-e.getMonth();return s<0&&i--,i},isPriceAgeAppropriate(e){const t=e.ageUnder,i=e.ageOver;if((null===t||void 0===t)&&(null===i||void 0===i))return!0;const s=this.getUserAge();return null===s||(null!==t&&void 0!==t&&null!==i&&void 0!==i?s<t||s>i:null!==t&&void 0!==t?s<t:s>i)},findAgeAppropriatePriceIri(e){if(!e||0===e.length)return null;const t=e.find(e=>!e.isArchived&&(!e.isHidden&&this.isPriceAgeAppropriate(e)));return t?"/api/v1/product_prices/"+t.id:null},findMatchingAgeRestrictedPrice(e){const t=this.getUserAge();if(null===t||!e||0===e.length)return null;const i=e.find(e=>!e.isArchived&&(!e.isHidden&&((null!==e.ageUnder&&void 0!==e.ageUnder||null!==e.ageOver&&void 0!==e.ageOver)&&this.isPriceAgeAppropriate(e)))
1);return i?"/api/v1/product_prices/"+i.id:null},loadFeeTenantProduct(){if(this.tenant.settingFeatures.fees.productUuid)return this.isLoading=!0,this.$http.plain.get("/products/"+this.tenant.settingFeatures.fees.productUuid).then(e=>(this.feeTenantProduct=e.data,this.assignDefaultPriceIfNeeded(),this.loadFeeHistory())).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)},assignDefaultPriceIfNeeded(){if(this.item.feeTenantProductPrice)return;if(!this.tenant.settingFeatures.fees.defaultProductPriceId)return;if(!this.feeTenantProduct||!this.feeTenantProduct.productPrices)return;let e=null;const t=this.findMatchingAgeRestrictedPrice(this.feeTenantProduct.productPrices.filter(e=>!e.isDonationOption));if(t)e=t;else{const t=this.tenant.settingFeatures.fees.defaultProductPriceId,i=this.feeTenantProduct.productPrices.find(e=>e.id===t);i&&this.isPriceAgeAppropriate(i)&&(e="/api/v1/product_prices/"+t)}e&&(this.feeTenantProductPrice=e,this.saveMember(),this.$emit("updateUser"))},loadFeeHistory(){if(this.feeTenantProduct&&this.item.feeTenantProductPrice)return this.$http.plain.get("/fee-history/tenant/"+this.feeTenantProduct.id+"?uid="+this.item.id).then(e=>{if(e.data&&(this.feeTenantHistory=e.data.filter(e=>!e.notJoined)),this.feeLocalProduct&&this.item.feeLocalProductPrice)return this.$http.plain.get("/fee-history/local/"+this.feeLocalProduct.id+"?uid="+this.item.id).then(e=>{e.data&&(this.feeLocalHistory=e.data.filter(e=>!e.notJoined))})}).catch(e=>{console.error(e)})},getSubscriptionProfile(e=null,t=!1){const i=e=>{t||(this.isLoading=e)},s=this.tenant?.settingFeatures?.fees?.productUuid;if(!e&&s){i(!0);let e=kd()(new Date).utc().toISOString();return this.$http.plain.get("/subscription_profiles?member="+this.item.id+"&product.uuid="+s+"¤tPeriodEnd[after]="+e+uu).then(e=>{this.subscriptionProfile=e.data["hydra:member"][0]?e.data["hydra:member"][0]:null}).catch(e=>{console.error(e)}).finally(()=>{i(!1)})}if(e)return i(!0),this.$http.plain.get("/subscription_profiles/"+e).then(e=>{this.subscriptionProfile=e.data}).catch(e=>{console.error(e)}).finally(()=>{i(!1)})},saveMember(){this.isSaving=!0;const e=this.item.id===this.user.id?"/profile-update/":"/users/";this.$http.plain.patch(e+this.item.id,{feeLocalProductPrice:this.feeLocalProductPrice,feeTenantProductPrice:this.feeTenantProductPrice}).then(e=>{this.item.id===this.user.id&&this.$store.commit("setCurrentUser",e.data),this.item=e.data,this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}),this.loadFeeHistory()}).catch(e=>console.error(e)).finally(()=>{this.isSaving=!1,this.savingPriceId=null})},isSelectedTenantPrice(e){return this.item.feeTenantProductPrice&&this.item.feeTenantProductPrice.id===e.id},isSelectedLocalPrice(e){return this.item.feeLocalProductPrice&&this.item.feeLocalProductPrice.id===e.id},selectTenantPrice(e){!this.canSelectFeePrice||this.isSelectedTenantPrice(e)||this.isSaving||this.$buefy.dialog.confirm({title:this.$t("Change fee type"),message:this.$t("Are you sure you want to change the fee type to")+" <b>"+e.name+"</b>?",confirmText:this.$t("Confirm"),cancelText:this.$t("cancel"),type:"is-primary",onConfirm:()=>{this.savingPriceId=e["@id"],this.feeTenantProductPrice=e["@id"],this.saveMember()}})},selectLocalPrice(e){!this.canSelectLocalFeePrice||this.isSelectedLocalPrice(e)||this.isSaving||this.$buefy.dialog.confirm({title:this.$t("Change fee type"),message:this.$t("Are you sure you want to change the fee type to")+" <b>"+e.name+"</b>?",confirmText:this.$t("Confirm"),cancelText:this.$t("cancel"),type:"is-primary",onConfirm:()=>{this.savingPriceId=e["@id"],this.feeLocalProductPrice=e["@id"],this.saveMember()}})},reactivateSubscription(e){this.subscriptionUpdating=!0,this.$http.plain.post("/connected/subscription-reactivate/"+e).then(t=>{const i=t.data&&t.data.status;if("error_payment_failed"!==i&&"error_subscription_inactive"!==i)return this.$buefy.snackbar.open({message:this.$t("Reactivated")}),this.getSubscriptionProfile(e,!0);this.$buefy.toast.open({type:"is-danger",message:this.$t("Something went wrong. Please try again.")})}).catch(e=>
1{console.error(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Something went wrong. Please try again.")})}).finally(()=>this.subscriptionUpdating=!1)},goToCheckout(){if(this.tenant.settingFeatures.fees.requireContractForMembershipPurchase&&this.item.isFeeActive&&this.item["validMembershipContract"]){let e=this.item.feeTenantProductPrice.monthPeriod;if(e>this.item["membershipContractOffsetMonths"])return void this.$buefy.dialog.confirm({title:this.$t("signContract"),message:this.$t("In order to pay the membership, you need to sign the membership contract. Do you want to continue?"),confirmText:this.$t("Continue"),type:"is-primary",cancelText:this.$t("cancel"),onConfirm:()=>this.signContractInAdvance()})}if(this.tenant.settingFeatures.fees.fixedStartingDateFee&&this.feeTenantHistory.some(e=>e.unpaid&&e.unpaid>0)&&this.$refs.tenantFeeCard){const e=this.$refs.tenantFeeCard;return e.isSelectingPeriods&&e.selectedEntries.length>0?void this.paySelectedPeriods(e.selectedEntries):void e.startPaySelection()}this.item.feeTenantProductPrice?.price||this.isTenantDonationMembership?this.isBankTransferAvailable?this.showPaymentMethodModal=!0:this.oneTimeCheckout(!1):this.checkoutZeroAmountFee()},signContractInAdvance(){this.isLoading=!0,this.$http.plain.post("/sign-membership-contract-in_advance",{}).then(()=>{this.$router.push({name:"DocumentPreview",params:{contractId:this.membershipContractItem.id}})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},cancelBankTransfer(){this.$buefy.dialog.confirm({title:this.$t("Cancel bank transfer"),message:this.$t("Are you sure you want to cancel this bank transfer request?"),confirmText:this.$t("Yes, cancel"),cancelText:this.$t("no"),type:"is-warning",onConfirm:()=>{this.isCancellingBankTransfer=!0,this.$http.plain.post("/invoices/cancel-bank-transfer").then(()=>{this.$buefy.toast.open({message:this.$t("Bank transfer cancelled"),type:"is-success"}),this.$emit("updateUser")}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Failed to cancel bank transfer"),type:"is-danger"})}).finally(()=>{this.isCancellingBankTransfer=!1})}})},checkoutZeroAmountFee(){this.isLoading=!0,this.$http.plain.get("/checkout/zero-amount-fee/"+this.user.id).then(()=>{this.$emit("updateUser")}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},bankTransferCheckout(){this.isLoading=!0,this.$http.plain.post("/invoices/create-for-bank-transfer",{}).then(e=>{this.invoiceSeriesForBankTransfer=e.data.series,this.bankingInfoForTransfer=e.data.bankingInfo,this.bankTransferAmount=e.data.amount,this.$emit("updateUser")}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},showPendingBankTransferDetails(){this.invoiceSeriesForBankTransfer=this.item.membershipBankTransferInProgress,this.bankingInfoForTransfer={accountHolder:this.tenant.legalName,iban:this.tenant.bankIbanNative},this.bankTransferAmount=this.item.feeTenantProductPrice?.price,this.showPaymentMethodModal=!0},goToInvoice(){this.$router.push({name:"InvoiceShow",params:{item:this.item.membershipBankTransferInvoiceId}})},withFeeProductLoaded(e){if(this.feeProductLoadRetrying)return;const t=this.loadFeeTenantProduct();t&&"function"===typeof t.then&&(this.feeProductLoadRetrying=!0,t.then(()=>{this.feeProductLoadRetrying=!1,this.feeTenantProduct&&this.item?.feeTenantProductPrice&&e()}).catch(()=>{this.feeProductLoadRetrying=!1}))},oneTimeCheckout(e=!1){this.feeTenantProduct&&this.item?.feeTenantProductPrice?this.openInlinePay({endpoint:"/connected/stripe-checkout-session/payment",checkoutEndpoint:"/connected/stripe-checkout-session/payment",copyLink:e,amount:this.item.feeTenantProductPrice?.price??null,vatRate:this.item.feeTenantProductPrice?.priceVatRate??null,vatExempt:!!this.item.feeTenantProductPrice?.priceVatExempt,registrationFee:this.dueRegistrationFee,registrationFeeVatRate:this.item.feeTenantProductPrice?.registrationFeeVatRate??null,registrationFeeVatExempt:!!this.item.feeTenantProductPrice?.registrationFeeVatExempt,title:this.$t("Pay membership fee"),membershipName:this.item.feeTenantProductPrice?.name||this.feeTenantProduct?.name||"",donationOptions:this.resolveDonationOptions(this.feeTenantProduct),chooseAmount:this.resolveChooseAmount(this.item.feeTenantProductPrice),payload:{priceId:this.item.feeTenantProductPrice.id,productId:this.feeTenantProduct.id,productUuid:this.feeTenantProduct.uuid,currency:this.tenant.currency,product:this.feeTenantProduct.name,email:this.item.email,redirectToProfile:!0,inline:!0}}):this.withFeeProductLoaded(()=>this.oneTimeCheckout(e))},subscriptionCheckout(){this.feeTenantProduct&&this.item?.feeTenantProductPrice?this.openInlinePay({endpoint:"/connected/stripe-checkout-session/subscription",checkoutEndpoint:"/connected/stripe-checkout-session/subscription",isSubscription:!0,amount:this.item.feeTenantProductPrice?.price??null,vatRate:this.item.feeTenantProductPrice?.priceVatRate??null,vatExempt:!!this.item.feeTenantProductPrice?.priceVatExempt,registrationFee:this.dueRegistrationFee,registrationFeeVatRate:this.item.feeTenantProductPrice?.registrationFeeVatRate??null,registrationFeeVatExempt:!!this.item.feeTenantProductPrice?.registrationFeeVatExempt,periodLabel:this.tenantPerio
1dLabel,title:this.$t("Subscribe"),membershipName:this.item.feeTenantProductPrice?.name||this.feeTenantProduct?.name||"",donationOptions:this.resolveDonationOptions(this.feeTenantProduct),chooseAmount:this.resolveChooseAmount(this.item.feeTenantProductPrice),payload:{productId:this.feeTenantProduct.id,product:this.feeTenantProduct.name,priceId:this.item.feeTenantProductPrice.id,productUuid:this.feeTenantProduct.uuid,currency:this.tenant.currency,email:this.item.email,redirectToProfile:!0,inline:!0}}):this.withFeeProductLoaded(()=>this.subscriptionCheckout())},cancelSubscription(){this.subscriptionUpdating=!0;const e=this.subscriptionProfile.id;this.$http.plain.post("/connected/cancel-subscription/"+e,{}).then(()=>(this.editingFeePrice=!1,this.$buefy.toast.open({type:"is-success",message:this.$t("updatedSuccessfully")}),this.getSubscriptionProfile(e,!0))).catch(e=>{console.error(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Something went wrong. Please try again.")})}).finally(()=>{this.subscriptionUpdating=!1})},addMonths(e,t){let i=new Date(e);return i.setMonth(i.getMonth()+t),i.getDate()!==e.getDate()&&i.setDate(0),i},formatDate(e){let t=e.getFullYear(),i=("0"+(e.getMonth()+1)).slice(-2),s=("0"+e.getDate()).slice(-2);return`${t}-${i}-${s}`},markAsPaid(){if(null===this.markAsPaidPeriodEnd)return this.$buefy.toast.open({duration:6e3,message:this.$t("This member has no membership level with a billing period, so a payment cannot be recorded."),type:"is-danger"});if(this.isCustomAmount&&!this.customAmountValue)return this.$buefy.toast.open({duration:6e3,message:this.$t("Please enter a valid amount"),type:"is-danger"});let e={},t=this.formatDate(this.periodStart),i=this.markAsPaidPeriodEnd,s=this.formatDate(i),a=null;
1if(a=this.isCustomAmount&&this.customAmountValue?this.customAmountValue:this.item?.feeTenantProductPrice?.price,void 0===a||null===a)return this.$buefy.toast.open({duration:6e3,message:this.$t("Please enter a valid amount"),type:"is-danger"});e[this.itemUser.id+":"+t+"_"+s]=a,this.isLoading=!0,this.$http.plain.post("/fee_payments",{userId:this.item.id,fees:e,type:"tenant",method:"check",markAsPaid:!0,productPriceId:this.item.feeTenantProductPrice.id,periodStart:this.periodStart,productId:this.tenant.settingFeatures.fees.productUuid}).then(()=>{this.saveMember(),this.$emit("updateUser"),this.showDateSelectionModal=!1}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},showMembershipContract(){this.isLoading=!0,this.$http.plain.get("/contracts/"+this.tenant.settingFeatures.fees.membershipContractDocumentId).then(e=>{this.membershipContractItem=e.data}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},getLocalCenterSubscriptionProfile(){this.item.localCenter&&(this.isLoading=!0,this.$http.plain.get("/subscription_profiles?member="+this.item.localCenter.id+"&productPrice="+this.item.feeLocalProductPrice.id+uu).then(e=>{this.localCenterSubscriptionProfile=e.data["hydra:member"][0]?e.data["hydra:member"][0]:null}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1}))},goToLocalFeeCheckout(){if(this.tenant.settingFeatures.fees.fixedStartingDateFee&&this.feeLocalHistory.some(e=>e.unpaid&&e.unpaid>0)&&this.$refs.localFeeCard){const e=this.$refs.localFeeCard;return e.isSelectingPeriods&&e.selectedEntries.length>0?void this.paySelectedLocalPeriods(e.selectedEntries):void e.startPaySelection()}this.isLocalFeeBankTransferAvailable?this.showLocalFeePaymentMethodModal=!0:this.localFeeOneTimeCheckout()},localFeeOneTimeCheckout(e=!1){this.openInlinePay({endpoint:"/connected/stripe-checkout-session/payment",checkoutEndpoint:"/connected/stripe-checkout-session/payment",copyLink:e,amount:this.item.feeLocalProductPrice?.price??null,title:this.$t("Pay membership fee"),chooseAmount:this.resolveChooseAmount(this.item.feeLocalProductPrice),payload:{priceId:this.item.feeLocalProductPrice.id,productId:this.feeLocalProduct.id,productUuid:this.feeLocalProduct.uuid,currency:this.tenant.currency,product:this.feeLocalProduct.name,email:this.item.email,redirectToProfile:!0,isLocalFee:!0,localCenterId:this.item.localCenter.id,inline:!0}})},openInlinePay(e){this.showPaymentMethodModal=!1,this.showLocalFeePaymentMethodModal=!1,this.inlinePay={show:!0,endpoint:e.endpoint||"/connected/stripe-payment-intent-fee",checkoutEndpoint:e.checkoutEndpoint||e.endpoint||"/connected/stripe-checkout-fee",payload:e.payload||{},copyLink:!!e.copyLink,amount:e.amount??null,currency:e.currency||this.tenant.currency,isSubscription:!!e.isSubscription,periodLabel:e.periodLabel||"",membershipName:e.membershipName||"",title:e.title||"",settled:!1,donationOptions:e.donationOptions||null,chooseAmount:e.chooseAmount||null,vatRate:e.vatRate??null,vatExempt:!!e.vatExempt,registrationFee:e.registrationFee??0,registrationFeeVatRate:e.registrationFeeVatRate??null,registrationFeeVatExempt:!!e.registrationFeeVatExempt}},findMembershipDonationLevel(e){return(e?.productPrices||[]).find(e=>e.isCustomAmount&&!e.isArchived)||null},resolveChooseAmount(e,t=1){return e?.isCustomAmount?{min:e.customMinPrice??null,max:e.customMaxPrice??null,suggested:e.price??null,suggestedAmounts:Array.isArray(e.suggestedAmounts)?e.suggestedAmounts:[],periods:t,prompt:null}:null},resolveDonationOptions(e){const t=e?.settings?.checkoutDonation;if(!t||!t.enabled)return null;const i=(e.productPrices||[]).filter(e=>e.isDonationOption&&!e.isArchived).map(e=>({id:e.id,amount:e.price,name:e.name||null}));return i.length||t.allowCustom?{tiers:i,allowCustom:!!t.allowCustom,customMin:t.customMin??null,customMax:t.customMax??null,currency:this.tenant.currency,prompt:t.prompt||null}:null},onInlinePaid(){this.$refs.tenantFeeCard?.cancelSelection?.(),this.$refs.localFeeCard?.cancelSelection?.(),this.settleInlinePay({historyCount:this.feeTenantHistory.length,wasFeeActive:!!this.item.isFeeActive},8)},settleInlinePay(e,t){const i=!this.isOnboarding;this.reloadUserInPlace(i).then(()=>{const s=this.feeTenantHistory.length>e.historyCount||!e.wasFeeActive&&!!this.item.isFeeActive;s?this.reloadUserInPlace(i).then(()=>{this.inlinePay.settled=!0}):t<=0?this.inlinePay.settled=!0:setTimeout(()=>this.settleInlinePay(e,t-1),2e3)})},reloadUserInPlace(e=!0){return this.$http.plain.get("/users/"+this.item.id).then(t=>(this.item=t.data,e&&this.item.id===this.user.id&&this.$store.commit("setCurrentUser",t.data),this.loadFeeHistory())).then(()=>this.getSubscriptionProfile(null,!0)).catch(e=>console.error(e))},onInlinePayClose(){this.isOnboarding&&this.inlinePay.settled?this.finishOnboardingPayment():this.inl
1inePay.show=!1},finishOnboardingPayment(){this.onboardingFinishing||(this.onboardingFinishing=!0,this.reloadUserInPlace(!0))},maybeFinalizeRedirectPayment(){if(this.redirectSettleStarted||!this.item||!this.$route.query.fee_payment_pending)return;this.redirectSettleStarted=!0;const e=new URL(window.location.href);e.searchParams.delete("fee_payment_pending"),window.history.replaceState({},"",e.toString()),this.pollRedirectSettle(!!this.item.isFeeActive,8)},pollRedirectSettle(e,t){this.reloadUserInPlace().then(()=>{const i=!e&&!!this.item.isFeeActive;i||t<=0||setTimeout(()=>this.pollRedirectSettle(e,t-1),2e3)})},localFeeBankTransferCheckout(){this.isLoading=!0,this.$http.plain.post("/invoices/create-for-bank-transfer",{}).then(e=>{this.localFeeInvoiceSeriesForBankTransfer=e.data.series,this.$emit("updateUser")}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},markLocalFeeAsPaid(){if(null===this.markLocalAsPaidPeriodEnd)return this.$buefy.toast.open({duration:6e3,message:this.$t("This member has no membership level with a billing period, so a payment cannot be recorded."),type:"is-danger"});if(this.isLocalFeeCustomAmount&&!this.localFeeCustomAmountValue)return this.$buefy.toast.open({duration:6e3,message:this.$t("Please enter a valid amount"),type:"is-danger"});let e={},t=this.formatDate(this.localFeePeriodStart),i=this.formatDate(this.markLocalAsPaidPeriodEnd),s=null;if(s=this.isLocalFeeCustomAmount&&this.localFeeCustomAmountValue?this.localFeeCustomAmountValue:this.itemUser.feeLocalProductPrice.price,void 0===s||null===s)return this.$buefy.toast.open({duration:6e3,message:this.$t("Please enter a valid amount"),type:"is-danger"});e[this.itemUser.id+":"+t+"_"+i]=s,this.isLoading=!0,this.$http.plain.post("/fee_payments",{userId:this.item.id,fees:e,type:"local",method:"check",markAsPaid:!0,productPriceId:this.item.feeLocalProductPrice.id,periodStart:this.localFeePeriodStart,productId:this.item.localCenter.feeProduct.id,localCenterId:this.item.localCenter.id}).then(()=>{this.saveMember(),this.$emit("updateUser"),this.showLocalDateSelectionModal=!1}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},validateFeeSelection(e,t){if(!e||0===e.length)return this.$t("Please select fee period(s) for payment");if(e.length>12)return this.$t("You can pay for maximum 12 intervals at a time.");const i=this.tenant.settingFeatures.fees.minimumCyclesToPay;if(i&&i>1){const s=t.filter(e=>e.unpaid&&e.unpaid>0).length;if(e.length<i&&s>=i)return this.$t("You must select at least {count} cycles to pay",{count:i})}if(this.tenant.settingFeatures.fees.continuityMandatory){const i=new Set(e.map(e=>e.intervalId));let s=!1;for(const e of t.slice().reverse()){const t=i.has(e.intervalId),a=e.unpaid&&e.unpaid>0;if(t&&s)return this.$t("Your account has unpaid balances from previous fee periods");!t&&a&&(s=!0)}}return null},paySelectedPeriods(e){const t=this.validateFeeSelection(e,this.feeTenantHistory);if(t)return void this.$buefy.toast.open({message:t,type:"is-danger",duration:6e3});const i={};let s=0;for(const a of e)i[this.item.id+":"+a.intervalId]=a.unpaid,s+=a.unpaid||0;this.openInlinePay({endpoint:"/connected/stripe-payment-intent-fee",checkoutEndpoint:"/connected/stripe-checkout-fee",amount:s,title:this.$t("Pay membership fee"),vatRate:this.item.feeTenantProductPrice?.priceVatRate??null,vatExempt:this.item.feeTenantProductPrice?.priceVatExempt??!1,registrationFee:this.dueRegistrationFee,registrationFeeVatRate:this.item.feeTenantProductPrice?.registrationFeeVatRate??null,registrationFeeVatExempt:!!this.item.feeTenantProductPrice?.registrationFeeVatExempt,chooseAmount:this.resolveChooseAmount(this.item.feeTenantProductPrice,e.length),payload:{productId:this.feeTenantProduct.id,userId:this.item.id,fees:i,product:this.feeTenantProduct.name,currency:this.tenant.currency}})},markSelectedPeriodsAsPaid(e){if(!e||0===e.length)return;let t={};for(let i of e){const e=i.unpaid||i.amount||this.item.feeTenantProductPrice?.price;e&&(t[this.item.id+":"+i.intervalId]=e)}if(0===Object.keys(t).length)return this.$buefy.toast.open({duration:6e3,message:this.$t("Please select at least one unpaid period"),type:"is-danger"});this.isLoading=!0,this.$http.plain.post("/fee_payments",{userId:this.item.id,fees:t,type:"tenant",method:"check",markAsPaid:!0,productPriceId:this.item.feeTenantProductPrice.id,productId:this.tenant.settingFeatures.fees.productUuid}).then(()=>{this.$refs.tenantFeeCard?.cancelSelection(),this.loadFeeHistory(),this.$emit("updateUser")}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},paySelectedLocalPeriods(e){const t=this.validateFeeSelection(e,this.feeLocalHistory);
1if(t)return void this.$buefy.toast.open({message:t,type:"is-danger",duration:6e3});const i={};let s=0;for(const a of e)i[this.item.id+":"+a.intervalId]=a.unpaid,s+=a.unpaid||0;this.openInlinePay({endpoint:"/connected/stripe-payment-intent-fee",checkoutEndpoint:"/connected/stripe-checkout-fee",amount:s,title:this.$t("Pay membership fee"),vatRate:this.item.feeLocalProductPrice?.priceVatRate??null,vatExempt:this.item.feeLocalProductPrice?.priceVatExempt??!1,chooseAmount:this.resolveChooseAmount(this.item.feeLocalProductPrice,e.length),payload:{productId:this.feeLocalProduct.id,userId:this.item.id,fees:i,product:this.feeLocalProduct.name,currency:this.tenant.currency,isLocalFee:!0,localCenterId:this.item.localCenter.id}})},markSelectedLocalPeriodsAsPaid(e){if(!e||0===e.length)return;let t={};for(let i of e){const e=i.unpaid||i.amount||this.item.feeLocalProductPrice?.price;e&&(t[this.item.id+":"+i.intervalId]=e)}if(0===Object.keys(t).length)return this.$buefy.toast.open({duration:6e3,message:this.$t("Please select at least one unpaid period"),type:"is-danger"});this.isLoading=!0,this.$http.plain.post("/fee_payments",{userId:this.item.id,fees:t,type:"local",method:"check",markAsPaid:!0,productPriceId:this.item.feeLocalProductPrice.id,productId:this.item.localCenter.feeProduct.id,localCenterId:this.item.localCenter.id}).then(()=>{this.$refs.localFeeCard?.cancelSelection(),this.loadFeeHistory(),this.$emit("updateUser")}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},cancelLocalFeeSubscription(){this.isLoading=!0,this.$http.plain.post("/connected/cancel-subscription/"+this.localCenterSubscriptionProfile.id,{}).then(()=>{this.getSubscriptionProfile(this.localCenterSubscriptionProfile.id),this.editingFeePrice=!1,this.$buefy.toast.open({type:"is-success",message:this.$t("updatedSuccessfully")})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},reactivateLocalFeeSubscription(e){this.isLoading=!0,this.$http.plain.post("/connected/subscription-reactivate/"+e).then(t=>{t.data&&(this.$buefy.snackbar.open({message:this.$t("Reactivated")}),this.getSubscriptionProfile(e))}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)}},computed:{moment(){return kd()},...(0,ur.L8)(["tenant","userTypeEligibleForFee","isGranted","isNativeAppIos","user"]),dueRegistrationFee(){return(0,Ld.gt)(this.tenant,this.item,this.item?.feeTenantProductPrice)},inlinePayReturnUrl(){const e=new URL(window.location.href);return e.searchParams.set("tab","fees"),e.searchParams.set("fee_payment_pending","1"),e.toString()},hasLocalFee(){return this.tenant.settingFeatures.fees.feeLocalExists&&this.item&&this.item.feeLocalProductPrice&&this.item.localCenter&&this.item.localCenter.feeProduct},settings(){return this.tenant.settingFeatures},isFeeConfigured(){return(0,wd.Bj)(this.tenant,this.item)},canConfigureFees(){return this.isGranted("FINANCIAL_TENANT")},tenantFeeMonthPeriod(){return(0,wd.Ed)(this.item?.feeTenantProductPrice,this.feeTenantProduct)},localFeeMonthPeriod(){return(0,wd.Ed)(this.item?.feeLocalProductPrice,this.feeLocalProduct)},feeLocalProduct(){return this.item&&this.item.localCenter?this.item.localCenter.feeProduct:null},feeProduct(){return"local"===this.feeType?this.feeLocalProduct:this.feeTenantProduct},canPay(){if(this.item.id!==this.user.id)return!1;if(this.item.feeTenantProductPrice&&!(0,mr.Oh)(this.item.feeTenantProductPrice))return!1;if(this.subscriptionProfile&&!this.subscriptionProfile?.isSubscriptionCanceled)return!1;if(this.tenant.settingFeatures.fees.requireContractForMembershipPurchase&&!this.item.validMembershipContract)return!1;if(this.item.membershipBankTransferInProgress)return!1;const e=this.item.isExpiredValidFeeDate||(void 0!==this.item.canRenewFee?this.item.canRenewFee:(0,mr.QE)(this.item.validFeeDate)<this.inNumberOfDays);return!!e||!(!this.tenant.settingFeatures.fees.fixedStartingDateFee||!this.feeTenantHistory.some(e=>e.unpaid&&e.unpaid>0))},canSubscribe(){return(!this.feeTenantProduct||!1!==this.feeTenantProduct.hasSubscription)&&(!(this.item.feeTenantProductPrice&&!(0,mr.nj)(this.item.feeTenantProductPrice))&&(this.item.isExpiredValidFeeDate&&this.item.id===this.user.id&&this.item.feeTenantProductPrice&&(!this.tenant.settingFeatures.fees.requireContractForMembershipPurchase||this.item.validMembershipContract)&&!this.item.membershipBankTransferInProgress&&(!this.item.feeTenantProductPrice.overwriteMonthPeriod||this.item.feeTenantProductPrice.overwriteMonthPeriod<=12)))},canMarkAsPaid(){return this.isGranted("FINANCIAL_TENANT")&&!1!==this.tenant.settingFeatures.fees.allowMarkAsPaid&&null!==this.tenantFeeMonthPeriod&&(!this.tenant.settingFeatures.fees.requireContractForMembershipPurchase||this.item.validMembershipContract)&&!this.item.membershipBankTransferInProgress},isLocalFeeActive(){return this.hasLocalFee&&this.item.feeLocalProductPrice&&this.item.validLocalFeeDate},isLocalFeeBankTransferAvailable(){return this.tenant.settingFeatures.fees.enableMembershipPaymentsViaBankTransfer&&this.tenant.settingFeatures.invoices.isActive&&this.tenant.settingFeatures.invoices.productId},isBankTransferAvailable(){return this.tenant.settingFeatures.fees.enableMembershipPaymentsViaBankTransfer&&this.tenant.settingFeatures.invoices.isActive&&this.tenant.settingFeatures.invoices.productId}
1,canPayLocalFee(){if(!this.hasLocalFee)return!1;if(this.item.id!==this.user.id)return!1;if(this.item.feeLocalProductPrice&&!(0,mr.Oh)(this.item.feeLocalProductPrice))return!1;if(this.localCenterSubscriptionProfile)return!1;if(this.item.localCenterFeeTransferInProgress)return!1;const e=!this.isLocalFeeActive||(void 0!==this.item.canRenewLocalFee?this.item.canRenewLocalFee:(0,mr.QE)(this.item.validLocalFeeDate)<this.inNumberOfDays);return!!e||!(!this.tenant.settingFeatures.fees.fixedStartingDateFee||!this.feeLocalHistory.some(e=>e.unpaid&&e.unpaid>0))},canMarkLocalFeeAsPaid(){return this.isGranted("FINANCIAL_LOCAL",this.item.localCenter)&&!1!==this.tenant.settingFeatures.fees.allowMarkAsPaid&&this.hasLocalFee&&null!==this.localFeeMonthPeriod&&!this.item.localCenterFeeTransferInProgress},isTenantDonationMembership(){return!!this.item?.feeTenantProductPrice?.isCustomAmount},isLocalDonationMembership(){return!!this.item?.feeLocalProductPrice?.isCustomAmount},availableTenantPrices(){if(!this.feeTenantProduct||!this.feeTenantProduct.productPrices)return[];const e=this.findMembershipDonationLevel(this.feeTenantProduct);return e?[e]:this.feeTenantProduct.productPrices.filter(e=>!e.isArchived&&(!e.isDonationOption&&(!(e.isHidden&&!this.isGranted("FINANCIAL_LOCAL"))&&!e.isCompanyPrice)))},availableLocalPrices(){if(!this.feeLocalProduct||!this.feeLocalProduct.productPrices)return[];const e=this.findMembershipDonationLevel(this.feeLocalProduct);return e?[e]:this.feeLocalProduct.productPrices.filter(e=>!e.isArchived&&(!e.isDonationOption&&(!(e.isHidden&&!this.isGranted("FINANCIAL_LOCAL"))&&!e.isCompanyPrice)))},canEditMemberFeeFields(){return this.item.id===this.user.id||this.isGranted("HR_LOCAL",this.item.localCenter)},canSelectFeePrice(){return(this.item.id===this.user.id&&this.item.isExpiredValidFeeDate||this.isGranted("FINANCIAL_LOCAL",this.item.localCenter)&&this.canEditMemberFeeFields)&&!this.item.membershipBankTransferInProgress&&this.availableTenantPrices.length>1},canSelectLocalFeePrice(){return!this.isLocalDonationMembership&&!this.findMembershipDonationLevel(this.feeLocalProduct)&&((this.item.id===this.user.id||this.isGranted("FINANCIAL_LOCAL",this.item.localCenter)&&this.canEditMemberFeeFields)&&this.availableLocalPrices.length>=1)},isMembershipManagedByCompany(){return this.tenant.settingFeatures.company?.isActive&&this.tenant.settingFeatures.company?.feesEnabled&&!0===this.item.hasCompany},periodStartPlaceholder(){if(!this.item.feeTenantProductPrice)return this.$t("Click to select...");const e=this.item.feeTenantProductPrice.overwriteMonthPeriod||(this.feeTenantProduct?this.feeTenantProduct.monthPeriod:null);return e?this.$t("Select start date for the period of {x} months").replace("{x}",e):this.$t("Click to select...")},confirmMarkAsPaidLabel(){if(!this.item.feeTenantProductPrice)return this.$t("Confirm");const e=this.isCustomAmount&&this.customAmountValue?this.customAmountValue:this.item.feeTenantProductPrice.price;return this.$t("Confirm {amount} as paid",{amount:this.$filters.money(e,this.item.feeTenantProductPrice.currency)})},markAsPaidPeriodEnd(){if(!this.periodStart||null===this.tenantFeeMonthPeriod)return null;if(this.item.feeTenantProductPrice.isLifetime)return this.addMonths(this.periodStart,this.tenantFeeMonthPeriod);let e=this.addMonths(this.periodStart,this.tenantFeeMonthPeriod);const t=this.feeTenantProduct?.cycleMonth;return t&&(e=new Date(e.getFullYear(),t-1,1),e.setDate(e.getDate()-1)),e},markLocalAsPaidPeriodEnd(){return this.localFeePeriodStart&&null!==this.localFeeMonthPeriod?this.addMonths(this.localFeePeriodStart,this.localFeeMonthPeriod):null},tenantFeeHistorySliced(){return this.showAllTenantHistory?this.feeTenantHistory:this.feeTenantHistory.slice(0,7)},localFeeHistorySliced(){return this.showAllLocalHistory?this.feeLocalHistory:this.feeLocalHistory.slice(0,7)},tenantHistoryHasMore(){return!this.showAllTenantHistory&&this.feeTenantHistory.length>7},localHistoryHasMore(){return!this.showAllLocalHistory&&this.feeLocalHistory.length>7}
1,tenantPeriodLabel(){const e=this.item.feeTenantProductPrice,t=e?.overwriteMonthPeriod||e?.monthPeriod||this.feeTenantProduct?.monthPeriod||12;return 12===t?this.$t("year"):1===t?this.$t("month"):t+" "+this.$t("months")}},components:{Contract:_d.A,FontAwesomeIcon:Cd.gc,FeeSummaryCard:ic,FeeCard:du,StripeFeePayModal:cu.A}};const pu=(0,ec.A)(mu,[["render",yd],["__scopeId","data-v-27a658fb"]]);var hu=pu;const gu={class:"columns"},fu={class:"column is-5"};function bu(e,t,i,n,o,l){const r=(0,s.g2)("b-loading"),d=(0,s.g2)("FeeUserForm"),c=(0,s.g2)("HistoryFee"),u=(0,s.g2)("b-tab-item"),m=(0,s.g2)("b-tabs");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bF)(r,{modelValue:o.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>o.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),(0,s.Lk)("div",gu,[(0,s.Lk)("div",fu,[i.item?((0,s.uX)(),(0,s.Wv)(d,{key:0,ref:"fee_user_form","item-user":i.item},null,8,["item-user"])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:(0,a.C4)(["column is-7",{dontHaveLocalFee:!l.hasLocalFee}])},[o.isLoading||o.isSaving?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(m,{key:0,modelValue:o.feeType,"onUpdate:modelValue":t[1]||(t[1]=e=>o.feeType=e)},{default:(0,s.k6)(()=>[i.item.feeTenantProductPrice?((0,s.uX)(),(0,s.Wv)(u,{key:0,value:"tenant"},(0,s.eX)({default:(0,s.k6)(()=>[o.feeTenantProduct?((0,s.uX)(),(0,s.Wv)(c,{key:0,history:o.feeTenantHistory,item:i.item,"display-paid":!0,"fee-type":"tenant","fee-product":o.feeTenantProduct,"load-fee-history":l.loadFeeHistory,onLoading:l.setIsLoading,onReload:l.onReload},null,8,["history","item","fee-product","load-fee-history","onLoading","onReload"])):(0,s.Q3)("",!0)]),_:2},[l.hasLocalFee?{name:"header",fn:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("feeTenant")),1)]),key:"0"}:void 0]),1024)):(0,s.Q3)("",!0),l.hasLocalFee?((0,s.uX)(),(0,s.Wv)(u,{key:1,value:"local"},{header:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("feeLocal")),1)]),default:(0,s.k6)(()=>[l.feeLocalProduct?((0,s.uX)(),(0,s.Wv)(c,{key:0,history:o.feeLocalHistory,item:i.item,"display-paid":!0,"fee-type":"local","fee-product":l.feeLocalProduct,"load-fee-history":l.loadFeeHistory,onLoading:l.setIsLoading,onReload:l.onReload},null,8,["history","item","fee-product","load-fee-history","onLoading","onReload"])):(0,s.Q3)("",!0)]),_:1})):(0,s.Q3)("",!0)]),_:1},8,["modelValue"]))],2)])])}var yu=i(73139),vu={props:{item:{type:Object,required:!0},autoLoad:{type:Boolean,default:!1}},data(){return{isLoading:!1,isLoadingCheckout:!1,isSaving:!1,feeType:"tenant",feeLocalProductPrice:null,feeTenantProductPrice:null,feeTenantHistory:[],feeLocalHistory:[],feeTenantProduct:null}},created(){this.feeLocalProductPrice=this.item.feeLocalProductPrice?this.item.feeLocalProductPrice["@id"]:null,this.feeTenantProductPrice=this.item.feeTenantProductPrice?this.item.feeTenantProductPrice["@id"]:null,(this.autoLoad||this.$route.query.tab&&"fees"===this.$route.query.tab)&&this.loadFeeTenantProduct(),this.$route.query.payment_success&&this.$buefy.toast.open({message:this.$t("cardPaymentSuccess"),type:"is-success",duration:1e4})},methods:{copyToClipboard:mr.lW,setIsLoading(e){this.isLoadingCheckout=e},onReload(){this.loadFeeHistory(),this.$emit("update-user")},loadFeeTenantProduct(){this.tenant.settingFeatures.fees.productId&&(this.isLoading=!0,this.$http.plain.get("/products/"+this.tenant.settingFeatures.fees.productUuid).then(e=>(this.feeTenantProduct=e.data,this.loadFeeHistory())).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1))},loadFeeHistory(){if(this.feeTenantProduct&&this.item.feeTenantProductPrice)return this.isLoading=!0,this.$http.plain.get("/fee-history/tenant/"+this.feeTenantProduct.id+"?uid="+this.item.id).then(e=>{if(e.data&&(this.feeTenantHistory=e.data),this.feeLocalProduct&&this.item.feeLocalProductPrice)return this.$http.plain.get("/fee-history/local/"+this.feeLocalProduct.id+"?uid="+this.item.id).then(e=>{e.data&&(this.feeLocalHistory=e.data)})}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)}},computed:{...(0,ur.L8)(["tenant","userTypeEligibleForFee","isGranted","user"]),hasLocalFee(){return this.tenant.settingFeatures.fees.feeLocalExists&&this.item.feeLocalProductPrice&&this.item.localCenter&&this.item.localCenter.feeProduct},settings(){return this.tenant.settingFeatures},feeLocalProduct(){return this.user&&this.user.localCenter?this.user.localCenter.feeProduct:null},feeProduct(){return"local"===this.feeType?this.feeLocalProduct:this.feeTenantProduct},externalFeePayURL(){let e=this.$router.resolve({name:"FeePayByCardId",params:{card:this.item.cardId}});return"https://"+this.tenant.appHost+e.href}},components:{FeeUserForm:hu,HistoryFee:yu.A}};const ku=(0,ec.A)(vu,[["render",bu]]);var Cu=ku,Lu=i(57985),wu=i(69133),_u=i(31823),Eu=i(2594),$u=i(39162),Fu=i(21662),Tu=i(29450),Su=i(28404),Au=i(43464),Pu=i(48266);const Iu={class:"company-tab"},Mu={key:0,class:"company-card"},xu={class:"company-card-header"},Nu={class:"company-identity"},Uu={key:0,class:"company-logo"},Du=["src","alt"],Xu={key:1,class:"company-logo-placeholder"},Vu={class:"company-info"},Ru={class:"company-name"},Ou={class:"company-badges"},Qu={key:0,class:"status-badge is-active"},Bu={key:1,class:"status-badge is-inactive"},Gu={class:"header-actions"},Wu={class:"icon is-small"},ju={class:"icon is-small"},zu={class:"company-stats"},qu={class:"stat-item"},Ju={class:"stat-label"},Hu={class:"stat-value"},Ku={class:"stat-item"},Yu={class:"stat-label"},Zu={class:"stat-value"},em={key:1,class:"has-text-grey"},tm={class:"stat-item"},im={class:"stat-label"},sm={class:"stat-value"},am={key:1,class:"empty-state"},nm={class:"empty-icon"},om={class:"empty-title"},lm={class:"empty-text"},rm={class:"icon is-small"},dm={class:"modal-card"},cm={class:"modal-card-head"},um={class:"modal-card-title"},mm=["onClick"],pm={class:"modal-card-body"},hm={class:"modal-card-foot"},gm=["onClick"],fm={class:"icon is-small"};function bm(e,t,i,n,o,l){const r=(0,s.g2)("b-loading"),d=(0,s.g2)("font-awesome-icon"),c=(0,s.g2)("router-link"),u=(0,s.g2)("b-input"),m=(0,s.g2)("b-field"),p=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.CE)("section",Iu,[(0,s.bF)(r,{modelValue:o.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>o.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),o.myCompany?((0,s.uX)(),(0,s.CE)("div",Mu,[(0,s.Lk)("div",xu,[(0,s.Lk)("div",Nu,[o.myCompany.logo?((0,s.uX)(),(0,s.CE)("div",Uu,[(0,s.Lk)("img",{src:o.myCompany.logo,alt:o.myCompany.name},null,8,Du)])):((0,s.uX)(),(0,s.CE)("div",Xu,[(0,s.bF)(d,{icon:"fa-light fa-building"})])),(0,s.Lk)("div",Vu,[(0,s.Lk)("span",Ru,(0,a.v_)(o.myCompany.name),1),(0,s.Lk)("div",Ou,[(0,s.Lk)("span",{class:(0,a.C4)(["role-badge",l.getRoleBadgeClass(o.myRole)])},(0,a.v_)(l.getRoleLabel(o.myRole)),3),o.myCompany.isFeeActive?((0,s.uX)(),(0,s.CE)("span",Qu,[(0,s.bF)(d,{icon:"fa-light fa-check"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Active")),1)])):((0,s.uX)(),(0,s.CE)("span",Bu,(0,a.v_)(e.$t("Inactive")),1))])])]),(0,s.Lk)("div",Gu,[(0,s.bF)(c,{to:{name:"MyCompany"},class:"button is-primary is-small is-rounded"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Manage")),1),(0,s.Lk)("span",Wu,[(0,s.bF)(d,{icon:"fa-light fa-arrow-right"})])]),_:1}),(0,s.Lk)("button",{class:(0,a.C4)(["button is-light is-small is-rounded",{"is-loading":o.isLeaving}]),onClick:t[1]||(t[1]=(...e)=>l.confirmLeaveCompany&&l.confirmLeaveCompany(...e))},[(0,s.Lk)("span",ju,[(0,s.bF)(d,{icon:"fa-light fa-right-from-bracket"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Leave")),1)],2)])]),(0,s.Lk)("div",zu,[(0,s.Lk)("div",qu,[(0,s.Lk)("span",Ju,(0,a.v_)(e.$t("Members")),1),(0,s.Lk)("span",Hu,[0===o.myCompany.maxSlots?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(o.myCompany.usedSlots||0),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(o.myCompany.usedSlots||0)+" / "+(0,a.v_)(o.myCompany.maxSlots||"-"),1)],64))])]),(0,s.Lk)("div",Ku,[(0,s.Lk)("span",Yu,(0,a.v_)(e.$t("Valid Until")),1),(0,s.Lk)("span",Zu,[o.myCompany.validFeeDate?((0,s.uX)(),(0,s.CE)(s.FK,{key:0}
1,[(0,s.eW)((0,a.v_)(e.$filters.format(o.myCompany.validFeeDate)),1)],64)):((0,s.uX)(),(0,s.CE)("span",em," - "))])]),(0,s.Lk)("div",tm,[(0,s.Lk)("span",im,(0,a.v_)(e.$t("Status")),1),(0,s.Lk)("span",sm,[(0,s.Lk)("span",{class:(0,a.C4)(["status-indicator",l.getStatusClass(o.myCompany.status)])},(0,a.v_)(o.myCompany.status),3)])])])])):o.isLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",am,[(0,s.Lk)("div",nm,[(0,s.bF)(d,{icon:"fa-light fa-building"})]),(0,s.Lk)("p",om,(0,a.v_)(e.$t("No Company")),1),(0,s.Lk)("p",lm,(0,a.v_)(e.$t("You are not part of any company yet")),1),l.canCreateCompany?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-rounded mt-4",onClick:t[2]||(t[2]=e=>o.showCreateModal=!0)},[(0,s.Lk)("span",rm,[(0,s.bF)(d,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Create Company")),1)])):(0,s.Q3)("",!0)])),(0,s.bF)(p,{modelValue:o.showCreateModal,"onUpdate:modelValue":t[8]||(t[8]=e=>o.showCreateModal=e),"has-modal-card":"","trap-focus":"","destroy-on-hide":!1,"aria-role":"dialog","aria-modal":""},{default:(0,s.k6)(i=>[(0,s.Lk)("div",dm,[(0,s.Lk)("header",cm,[(0,s.Lk)("p",um,(0,a.v_)(e.$t("Create Company")),1),(0,s.Lk)("button",{type:"button",class:"delete",onClick:i.close},null,8,mm)]),(0,s.Lk)("section",pm,[(0,s.bF)(m,{label:e.$t("Company Name")},{default:(0,s.k6)(()=>[(0,s.bF)(u,{modelValue:o.newCompany.name,"onUpdate:modelValue":t[3]||(t[3]=e=>o.newCompany.name=e),placeholder:e.$t("Your company name"),required:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(m,{label:e.$t("Description"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(u,{modelValue:o.newCompany.description,"onUpdate:modelValue":t[4]||(t[4]=e=>o.newCompany.description=e),type:"textarea",rows:"2",placeholder:e.$t("Brief description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(m,{label:e.$t("Contact Email"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(u,{modelValue:o.newCompany.contactEmail,"onUpdate:modelValue":t[5]||(t[5]=e=>o.newCompany.contactEmail=e),type:"email",placeholder:"[email protected]"},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(m,{label:e.$t("Contact Phone"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(u,{modelValue:o.newCompany.contactPhone,"onUpdate:modelValue":t[6]||(t[6]=e=>o.newCompany.contactPhone=e),type:"tel"},null,8,["modelValue"])]),_:1},8,["label"])]),(0,s.Lk)("footer",hm,[(0,s.Lk)("button",{class:"button is-light is-rounded",onClick:i.close},(0,a.v_)(e.$t("Cancel")),9,gm),(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded",{"is-loading":o.isCreating}]),onClick:t[7]||(t[7]=(...e)=>l.createCompany&&l.createCompany(...e))},[(0,s.Lk)("span",fm,[(0,s.bF)(d,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Create")),1)],2)])])]),_:1},8,["modelValue"])])}var ym={name:"ProfileCompanyTab",props:{givenUser:{type:Object,required:!0}},data(){return{isLoading:!1,isCreating:!1,isLeaving:!1,myCompany:null,myRole:null,showCreateModal:!1,newCompany:{name:"",description:"",contactEmail:"",contactPhone:""}}},computed:{...(0,ur.L8)(["tenant","user","isGranted"]),isOwnProfile(){return this.givenUser.id===this.user.id},canCreateCompany(){return this.isGranted(this.tenant.settingFeatures.company?.whoCanCreateCompany||"USER")}},created(){this.fetchMyCompany()},methods:{fetchMyCompany(){this.isLoading=!0,this.$http.plain.get("/my-company").then(e=>{e.data&&e.data.company&&(this.myCompany=e.data.company,this.myRole=e.data.role)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},getRoleBadgeClass(e){const t={PRIMARY_CONTACT:"is-primary",FINANCIAL_REP:"is-info",VOTING_REPRESENTATIVE:"is-info",MEMBER:""};return t[e]||""},getRoleLabel(e){const t={PRIMARY_CONTACT:this.$t("Primary Contact"),FINANCIAL_REP:this.$t("Financial Rep"),VOTING_REPRESENTATIVE:this.$t("Voting Representative"),MEMBER:this.$t("Member")};return t[e]||e},getStatusClass(e){const t={ACTIVE:"is-success",INACTIVE:"is-warning",PENDING:"is-info"};return t[e]||""},createCompany(){this.newCompany.name?(this.isCreating=!0,this.$http.plain.post("/companies",this.newCompany).then(e=>
1{this.$buefy.toast.open({message:this.$t("Company created"),type:"is-success"}),this.showCreateModal=!1,this.myCompany=e.data,this.myRole="PRIMARY_CONTACT",this.resetNewCompany()}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.message||this.$t("Error creating company"),type:"is-danger"})}).finally(()=>{this.isCreating=!1})):this.$buefy.toast.open({message:this.$t("Company name is required"),type:"is-danger"})},resetNewCompany(){this.newCompany={name:"",description:"",contactEmail:"",contactPhone:""}},confirmLeaveCompany(){this.$buefy.dialog.confirm({title:this.$t("Leave Company"),message:this.$t("Are you sure you want to leave this company?"),confirmText:this.$t("Leave"),cancelText:this.$t("Cancel"),type:"is-warning",hasIcon:!0,icon:"right-from-bracket",iconPack:"fal",onConfirm:()=>this.leaveCompany(!1)})},leaveCompany(e){this.isLeaving=!0,this.$http.plain.post(`/companies/${this.myCompany.uuid}/leave`,{deleteCompany:e}).then(e=>{e.data.requiresAction&&e.data.isLastMember?this.$buefy.dialog.confirm({title:this.$t("You are the last member"),message:this.$t("Do you want to delete the company? This action cannot be undone."),confirmText:this.$t("Delete Company"),cancelText:this.$t("Cancel"),type:"is-danger",hasIcon:!0,icon:"trash",iconPack:"fal",onConfirm:()=>this.leaveCompany(!0)}):(this.$buefy.toast.open({message:e.data.companyDeleted?this.$t("Company deleted"):this.$t("You have left the company"),type:"is-success"}),this.myCompany=null,this.myRole=null)}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Error leaving company"),type:"is-danger"})}).finally(()=>{this.isLeaving=!1})}}};const vm=(0,ec.A)(ym,[["render",bm],["__scopeId","data-v-d7cc2540"]]);var km=vm,Cm=i(78048),Lm=i(18256),wm=i(22556),_m=i(59905),Em=i(60534),$m=i(44352);const Fm={class:"profile-availability"},Tm={key:0,class:"profile-availability-list"},Sm={key:1,class:"has-text-grey is-size-7 mt-1 mb-0"},Am={class:"icon is-small"},Pm={key:3,class:"has-text-grey is-size-7 mt-1"},Im={key:1,class:"mt-1"},Mm={class:"profile-availability-day is-size-7"},xm={class:"has-text-grey is-size-7 mt-2 mb-0"},Nm={class:"buttons mt-2"};function Um(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon"),d=(0,s.g2)("b-numberinput"),c=(0,s.g2)("b-button");return(0,s.uX)(),(0,s.CE)("div",Fm,[o.editing?((0,s.uX)(),(0,s.CE)("div",Im,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(l.weekdays,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.key,class:"profile-availability-row"},[(0,s.Lk)("span",Mm,(0,a.v_)(e.label),1),(0,s.bF)(d,{modelValue:o.draft[e.key],"onUpdate:modelValue":[t=>o.draft[e.key]=t,t=>l.onDayChange(e.key,t)],size:"is-small","controls-position":"compact","controls-rounded":"",min:0,max:24,step:.5,editable:!0},null,8,["modelValue","onUpdate:modelValue"])]))),128)),(0,s.Lk)("p",xm,(0,a.v_)(l.formatHours(l.draftTotal))+" "+(0,a.v_)(e.$t("hours / week")),1),(0,s.Lk)("div",Nm,[(0,s.bF)(c,{type:"is-primary is-rounded is-small",loading:o.isSaving,onClick:l.save},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"]),(0,s.bF)(c,{class:"is-rounded is-small",disabled:o.isSaving,onClick:l.cancelEdit},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])])):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[l.filledDays.length?((0,s.uX)(),(0,s.CE)("div",Tm,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(l.filledDays,t=>((0,s.uX)(),(0,s.CE)("span",{key:t.key,class:"tag is-rounded is-small mr-1 mb-1"},(0,a.v_)(t.label)+" · "+(0,a.v_)(l.formatHours(t.hours))+(0,a.v_)(e.$t("hShort")),1))),128))])):(0,s.Q3)("",!0),l.filledDays.length?((0,s.uX)(),(0,s.CE)("p",Sm,(0,a.v_)(l.formatHours(l.totalHours))+" "+(0,a.v_)(e.$t("hours / week")),1)):(0,s.Q3)("",!0),l.canEdit?((0,s.uX)(),(0,s.CE)("a",{key:2,class:(0,a.C4)(["icon-text has-text-primary is-size-7",{"mt-1":l.filledDays.length}]),onClick:t[0]||(t[0]=(...e)=>l.startEdit&&l.startEdit(...e))},[(0,s.Lk)("span",Am,[(0,s.bF)(r,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(l.filledDays.length?e.$t("Edit"):e.$t("Set availability")),1)],2)):l.filledDays.length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",Pm," - "))],64))])}const Dm=["mon","tue","wed","thu","fri","sat","sun"],Xm={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"};var Vm={name:"ProfileAvailability",components:{FontAwesomeIcon:Cd.gc},props:{item:{type:Object,required:!0}},data(){return{editing:!1,isSaving:!1,current:{},draft:{}}},computed:{...(0,ur.L8)(["user","isGranted"]),weekdays(){return Dm.map(e=>({key:e,label:this.$t(Xm[e])}))},filledDays(){return this.weekdays.map(e=>({...e,hours:this.current[e.key]||0})).filter(e=>e.hours>0)},totalHours(){return Dm.reduce((e,t)=>
1e+(this.current[t]||0),0)},draftTotal(){return Dm.reduce((e,t)=>e+(Number(this.draft[t])||0),0)},canEdit(){return this.item.id===this.user.id||this.isGranted("HR_LOCAL",this.item.localCenter)}},created(){this.loadCurrent()},methods:{loadCurrent(){const e=this.item.availability&&"object"===typeof this.item.availability?this.item.availability:{},t={};Dm.forEach(i=>{const s=Number(e[i])||0;s>0&&(t[i]=s)}),this.current=t},formatHours(e){return Number.isInteger(e),String(e)},startEdit(){const e={};Dm.forEach(t=>{e[t]=this.current[t]||0}),this.draft=e,this.editing=!0},cancelEdit(){this.editing=!1,this.draft={}},onDayChange(e,t){let i=Number(t)||0;i=Math.max(0,Math.min(24,i)),this.draft[e]=i},save(){const e={};Dm.forEach(t=>{e[t]=Number(this.draft[t])||0});const t=this.item.id===this.user.id,i=t?"/profile-update/"+this.item.id:"/users/"+this.item.id;this.isSaving=!0,this.$http.plain.patch(i,{availability:e}).then(e=>{this.item.availability=e.data.availability||null,this.loadCurrent(),this.editing=!1,this.draft={},this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})}).catch(e=>{console.log(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("An error occurred")})}).finally(()=>{this.isSaving=!1})}}};const Rm=(0,ec.A)(Vm,[["render",Um],["__scopeId","data-v-799a3bd6"]]);var Om=Rm,Qm=i(80762),Bm=i(83016),Gm=i(72554),Wm=i(65593),jm=i(60560),zm=i(85124),qm=i(28994),Jm={name:"UserShowContent",mixins:[qm.A],props:{userId:{type:[Number,String],required:!0},initialTab:{type:String,default:"profile"}},emits:["loaded","error","refresh"],data(){return{internalUserId:this.userId,item:null,isEmailModalOpen:!1,activeTab:this.initialTab,hasAppliedRouteTab:!1,connectionStatus:null,connectionObject:null,isLoadingConnection:!1,connections:[],pendingConnectionsReceived:[],pendingConnectionsSent:[],connectionsTotal:0,connectionSubTab:"connections",connectionSearchQuery:"",connectionSortBy:"date_desc",connectionsPage:1,pendingReceivedTotal:0,pendingSentTotal:0,pendingReceivedPage:1,pendingSentPage:1,isLoadingMorePendingReceived:!1,isLoadingMorePendingSent:!1,pendingConnectionsCount:0,isLoadingConnections:!1,loadingConnectionId:null,isUserModalVisible:!1,selectedUserId:null,selectedUser:null,family:[],trainings:[],trainerTrainings:[],courseEnrollments:[],visibleTags:[],hiddenTags:[],isLoading:!1,isLoadingItem:!1,customFields:null,userBadges:null,userContracts:[],userTotalPoints:0,allBadges:[],loadEventComponent:!1,contractPath:null,isDownloadingContract:null,userLogs:null,userLogsTotal:0,userLogsCurrentPage:1,userLogsPerPage:20,isLoadingLogs:!1,logType:"audit",paymentsParamKey:1,canManageThisProfile:!1,bundleMemberAddEmail:"",maxLength:30,isFilePreviewModalActive:!1,previewFileData:null,triggerProfileCompletionCelebration:!1}},watch:{userId:{immediate:!0,handler(e){e&&(this.internalUserId=e,this.retrieve())}},isCurrentUserFeeMandatoryAndExpired(e,t){t&&!e&&this.$router.push({name:"Dashboard"})}},mounted(){this.$nextTick(()=>{this.focusFieldFromQuery()})},methods:{formatDateOnlyLong(e){return(0,mr.OS)((0,mr.QE)(e),(0,pr.xy)(this.$store.state.tenant))},scrollToLogoField(e){"logo"===e&&this.focusLogo()},onUserPhotoUploaded(){const e=this.item?.profileCompletionPercentage;this.$http.plain.get("/users/"+this.item.id).then(t=>{const i=t.data.profileCompletionPercentage;this.tenant?.settingFeatures?.users?.profileCompletionEnabled&&this.item?.id===this.user?.id&&null!==e&&e<100&&100===i&&(this.triggerProfileCompletionCelebration=!0),this.item=t.data}).catch(e=>{console.error(e)})},onCelebrationDismissed(){this.triggerProfileCompletionCelebration=!1,this.item?.privacy&&(this.item.privacy.hasSeenProfileCompletionCelebration=!0)},focusLogo(){const e=this.$isMobile()?this.$refs.profileImageMobile:this.$refs.profileImageUpload;e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{e.classList.add("highlight-field"),setTimeout(()=>{e.classList.remove("highlight-field")},1e3)},500))},focusFieldFromQuery(){const e=this.$route.query.focusField;"logo"===e&&setTimeout(()=>{this.focusLogo()},500)},copyToClipboard:mr.lW,numberToMonth:mr.HZ,getProfessionTranslation(e){return(0,mr.KO)(e,this.$t,this.$i18n.locale)},truncateText(e){return e?e.length<=this.maxLength?e:e.substring(0,this.maxLength)+"...":e},changeStatus(e){const t="ACTIVE"===e?this.$t("Are you sure you want to approve this user?"):this.$t("Are you sure you want to add this user to the waiting list?");this.$buefy.dialog.confirm({title:"ACTIVE"===e?this.$t("approve"):this.$t("addToWaitingList"),message:t,confirmText:this.$t("confirm"),cancelText:this.$t("cancel"),type:"ACTIVE"===e?"is-success":"is-warning",onConfirm:()=>{this.isLoadingItem=!0,this.$http.plain.patch("/users/"+this.item.id,{status:e}).then(()=>
1{this.item.status=e,this.$buefy.toast.open({message:this.$t("saved"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Error updating status"),type:"is-danger"})}).finally(()=>{this.isLoadingItem=!1})}})},retrieve(){this.isLoadingItem=!0,this.$http.plain.get("/users/"+this.internalUserId).then(e=>{this.entityLoaded(e),this.$emit("loaded",e.data)}).catch(e=>{404===e?.response?.status?this.$buefy.toast.open({duration:4e3,message:this.$t("Profile not found"),type:"is-info"}):403===e?.response?.status&&this.$buefy.toast.open({duration:5e3,message:this.$t("You do not have permission to view this profile"),type:"is-danger"}),console.log(e),this.$emit("error",e)}).finally(()=>this.isLoadingItem=!1)},tabChanged(e){"badges"===e?this.getUserBadges():"fees"===e&&this.$refs.fees?this.$refs.fees.loadFeeTenantProduct():"logs"===e&&this.isGranted("ADMIN_TENANT")?(this.getLogs(1),this.$nextTick(()=>this.slideLogTabs())):"referrals"===e&&this.$refs.profileReferralTab?this.$refs.profileReferralTab.loadReferralData():"connections"===e&&this.loadConnections(),this.scrollActiveTabIntoView()},scrollActiveTabIntoView(){this.$isMobile()&&this.$nextTick(()=>{const e=this.$refs.profileTabs?.$el;if(!e)return;const t=e.querySelector(".tabs li.is-active");t&&t.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})},getLogs(e=1){this.isGranted("ADMIN_TENANT")&&(this.isLoadingLogs=!0,this.$http.plain.get("/logs?user="+this.item.id+"&order[dateCreated]=DESC&page="+e).then(e=>{this.userLogs=e.data["hydra:member"],this.userLogsTotal=e.data["hydra:totalItems"]||0}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingLogs=!1}))},onLogsPageChange(e){this.userLogsCurrentPage=e,this.getLogs(e)},switchLogType(e){this.logType=e,this.userLogsCurrentPage=1,"audit"===e&&this.getLogs(1),this.$nextTick(()=>{this.initAllPillIndicators(),this.slideLogTabs()})},slideLogTabs(){const e=this.$refs.logTabsUl;if(!e)return;let t=e.querySelector(".tabs-pill-indicator");t||(e.style.position="relative",t=document.createElement("div"),t.className="tabs-pill-indicator",t.style.transition="none",e.appendChild(t),e.classList.add("pill-indicator-ready"));const i=e.querySelector("li.is-active");if(!i)return void(t.style.opacity="0");const s=e.getBoundingClientRect(),a=i.getBoundingClientRect(),n=Math.round(a.left-s.left+e.scrollLeft),o=Math.round(a.width);t.dataset.left&&(t.style.transition="transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)"),t.style.opacity="1",t.style.transform="translateX("+n+"px)",t.style.width=o+"px",t.dataset.left=String(n),t.dataset.width=String(o)},getDetailsArray(e){if(!e)return[];try{const t="string"===typeof e?JSON.parse(e):e,i=[],s=(e,t,a)=>{if(null!==t&&void 0!==t||null!==a&&void 0!==a)if(Array.isArray(t)||Array.isArray(a)){const n=Math.max(Array.isArray(t)?t.length:0,Array.isArray(a)?a.length:0);for(let o=0;o<n;o++){const n=Array.isArray(t)?t[o]:void 0,l=Array.isArray(a)?a[o]:void 0;"object"===typeof n&&null!==n||"object"===typeof l&&null!==l?s(`${e}[${o}]`,n,l):i.push({field:e,subfield:"",before:this.formatSimpleValue(n),after:this.formatSimpleValue(l)})}}else if("object"===typeof t&&null!==t||"object"===typeof a&&null!==a){const n=new Set([...Object.keys(t||{}),...Object.keys(a||{})]);for(const o of n){const n=t?.[o],l=a?.[o];"object"===typeof n&&null!==n||"object"===typeof l&&null!==l?s(`${e}.${o}`,n,l):i.push({field:e,subfield:o,before:this.formatSimpleValue(n),after:this.formatSimpleValue(l)})}}else i.push({field:e,subfield:"",before:this.formatSimpleValue(t),after:this.formatSimpleValue(a)});else i.push({field:e,subfield:"",before:this.formatSimpleValue(t),after:this.formatSimpleValue(a)})};for(const[e,a]of Object.entries(t))if(Array.isArray(a)&&2===a.length){const[t,i]=a;s(e,t,i)}else s(e,void 0,a);return i}catch(t){return console.error("Error parsing details:",t),[]}},formatValue(e){return null===e||void 0===e?"null":"boolean"===typeof e?e.toString():Array.isArray(e)?e.map(e=>Array.isArray(e)?e.join(", "):e).join(" | "):"object"===typeof e?JSON.stringify(e):String(e)},formatSimpleValue(e){return null===e||void 0===e?"-":"boolean"===typeof e?e?"true":"false":"string"===typeof e?e||"-":"number"===typeof e?e.toString():Array.isArray(e)?e.filter(e=>null!==e&&void 0!==e).join(", ")||"-":"object"===typeof e?JSON.stringify(e):String(e)},calculateExpDate(e,t,i){var s=new Date(e),a=365*t,n=30*i;return s.setDate(s.getDate()+a+n),s}
1,sortUserRolesByDate(){Array.isArray(this.item.userRoles)||(this.item.userRoles=Object.values(this.item.userRoles)),this.item.userRoles.sort(function(e,t){return(null===t.dateEnded)-(null===e.dateEnded)||-(e.dateEnded>t.dateEnded)||+(e.dateEnded<t.dateEnded)})},async entityLoaded(e){this.item=e.data,this.canManageThisProfile=this.canManageProfileAsParent(this.item),this.isGranted("HR_TENANT")&&this.$http.plain.get(`/users/${this.item.id}/profile_tags`).then(e=>{this.item.tags=e.data["hydra:member"]||[]}),this.paymentsParamKey++,this.sortUserRolesByDate(),this.item.localCenter&&(this.item.localCenterId=this.item.localCenter.id);const t=this.item.localCenter&&this.item.localCenter.ancestors;if(Array.isArray(t)&&t.length?this.item.localCenter.parent=t[0]:this.item.localCenterParent&&this.item.localCenter&&this.item.localCenterParent.id!==this.item.localCenter.id&&(this.item.localCenter.parent=this.item.localCenterParent),this.$route.query.tab&&!this.hasAppliedRouteTab&&(this.activeTab=this.$route.query.tab,this.tabChanged(this.$route.query.tab)),this.hasAppliedRouteTab=!0,this.tenant.settingFeatures.gamification?.isActive&&(this.loadUserPoints(),this.loadAllBadges(),this.getUserBadges()),this.tenant.settingFeatures.events.trainingEventType){let e=this.tenant.settingFeatures.events.trainingEventType;this.$http.plain.get("/user_event_attends?event.type="+e+"&user="+this.item.id).then(e=>{this.trainings=e.data["hydra:member"]}).catch(e=>console.error(e)),this.item.isTrainer&&this.$http.plain.get("/training_trainers?&trainer="+this.item.id).then(e=>{this.trainerTrainings=e.data["hydra:member"]}).catch(e=>console.error(e))}if(this.tenant.settingFeatures.events.trainingEventType&&this.tenant.settingFeatures.courses?.isActive&&this.$http.plain.get("/course-enrollment-user?user="+this.item.id).then(e=>{this.courseEnrollments=e.data["hydra:member"]}).catch(e=>{console.error(e)}),this.hasFamily){const e=this.item.id!==this.user.id?this.item.id:null,t=e?`/my-families?userId=${e}`:"/my-families";this.$http.plain.get(t).then(e=>{const t=e.data.families||[];return t.length>0?this.$http.plain.get("/family-entities/"+t[0].id+"/members"):(this.family=[],null)}).then(e=>{e&&e.data&&(this.family=e.data.members||[])}).catch(e=>{console.error(e),this.family=[]})}this.tenant.settingFeatures.users.hasConnections&&(this.user.id!==this.item.id?this.checkConnectionStatus():this.loadConnectionsCount());const i=this.tenant?.settingForms?.profileForm?.profileCustomFields||[],s=[this.tenant?.settingFeatures?.users?.interestCustomFieldId,this.tenant?.settingFeatures?.users?.skillsCustomFieldId].filter(e=>null!==e&&void 0!==e).map(e=>parseInt(e,10));this.customFields=[...this.$store.state.tenant.customFields||[]].filter(e=>!s.includes(e.id)).sort((e,t)=>{const s=i.indexOf(e.id),a=i.indexOf(t.id);return-1===s&&-1===a?0:-1===s?1:-1===a?-1:s-a})},customFieldValue:mr.cn,companyLogoUrl:mr.WA,isCustomFieldMandatory(e){const t=this.tenant?.settingForms?.profileForm?.profileCustomFieldsMandatory||[];return t.includes(e.id)},designatedCustomField(e){return e&&this.tenant?.customFields&&this.tenant.customFields.find(t=>t.id===parseInt(e,10))||null},openFilePreview(e){this.previewFileData=e,this.isFilePreviewModalActive=!0},getFileIcon(e){return e?e.startsWith("image/")?"fa-light fa-file-image":e.startsWith("video/")?"fa-light fa-file-video":"application/pdf"===e?"fa-light fa-file-pdf":"fa-light fa-file":"fa-light fa-file"},error(e){console.error(e)},saveSuccess(e){return this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})},checkConnectionStatus(){this.connectionStatus=null,this.connectionObject=null,this.$http.plain.get("/user-connection-status/"+this.item.id).then(e=>{this.connectionStatus=e.data.status,e.data.connectionId&&(this.connectionObject={id:e.data.connectionId})}).catch(e=>{console.error(e),this.connectionStatus="none"})},submitConnect(){this.isLoadingConnection=!0,this.$http.plain.post("/user-connections",{recipient:this.item["@id"]}).then(e=>{this.connectionObject=e.data,this.connectionStatus="pending_sent",this.$buefy.toast.o
1pen({message:this.$t("Connection request sent"),type:"is-success"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error sending connection request"),type:"is-danger"})}).finally(()=>{this.isLoadingConnection=!1})},acceptConnection(){this.isLoadingConnection=!0,this.$http.plain.patch("/user_connections/"+this.connectionObject.id,{status:"accepted"}).then(e=>{this.connectionObject=e.data,this.connectionStatus="connected",this.$buefy.toast.open({message:this.$t("Connection accepted"),type:"is-success"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error accepting connection"),type:"is-danger"})}).finally(()=>{this.isLoadingConnection=!1})},rejectConnection(){this.isLoadingConnection=!0,this.$http.plain.patch("/user_connections/"+this.connectionObject.id,{status:"rejected"}).then(()=>{this.connectionObject=null,this.connectionStatus="none",this.$buefy.toast.open({message:this.$t("Connection declined"),type:"is-info"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error declining connection"),type:"is-danger"})}).finally(()=>{this.isLoadingConnection=!1})},removeConnection(){this.$buefy.dialog.confirm({title:this.$t("Remove connection"),message:this.$t("Are you sure you want to remove this connection?"),confirmText:this.$t("Remove"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>{this.isLoadingConnection=!0,this.$http.plain.delete("/user_connections/"+this.connectionObject.id).then(()=>{this.connectionObject=null,this.connectionStatus="none",this.$buefy.toast.open({message:this.$t("Connection removed"),type:"is-info"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error removing connection"),type:"is-danger"})}).finally(()=>{this.isLoadingConnection=!1})}})},loadConnections(e=!1){this.isLoadingConnections=!0;const t=e?this.connectionsPage+1:1,i=[this.$http.plain.get("/user-connections-accepted?page="+t)];e||(i.push(this.$http.plain.get("/user-connections-pending")),i.push(this.$http.plain.get("/user-connections-sent"))),Promise.all(i).then(i=>{const s=i[0];e?this.connections=[...this.connections,...s.data["hydra:member"]]:(this.connections=s.data["hydra:member"],this.pendingConnectionsReceived=i[1].data["hydra:member"],this.pendingReceivedTotal=i[1].data["hydra:totalItems"],this.pendingConnectionsCount=this.pendingReceivedTotal,this.pendingReceivedPage=1,this.pendingConnectionsSent=i[2].data["hydra:member"],this.pendingSentTotal=i[2].data["hydra:totalItems"],this.pendingSentPage=1),this.connectionsTotal=s.data["hydra:totalItems"],this.connectionsPage=t}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingConnections=!1})},loadMorePendingReceived(){!this.isLoadingMorePendingReceived&&this.hasMorePendingReceived&&(this.isLoadingMorePendingReceived=!0,this.pendingReceivedPage++,this.$http.plain.get("/user-connections-pending?page="+this.pendingReceivedPage).then(e=>{const t=e.data["hydra:member"]||[];this.pendingConnectionsReceived=[...this.pendingConnectionsReceived,...t]}).catch(e=>{console.error(e),this.pendingReceivedPage--}).finally(()=>{this.isLoadingMorePendingReceived=!1}))},loadMorePendingSent(){!this.isLoadingMorePendingSent&&this.hasMorePendingSent&&(this.isLoadingMorePendingSent=!0,this.pendingSentPage++,this.$http.plain.get("/user-connections-sent?page="+this.pendingSentPage).then(e=>{const t=e.data["hydra:member"]||[];this.pendingConnectionsSent=[...this.pendingConnectionsSent,...t]}).catch(e=>{console.error(e),this.pendingSentPage--}).finally(()=>{this.isLoadingMorePendingSent=!1}))},loadConnectionsCount(){this.tenant.settingFeatures.users.hasConnections&&(this.$http.plain.get("/user-connection-count").then(e=>{this.connectionsTotal=e.data.count}).catch(e=>{console.error(e)}),this.$http.plain.get("/user-connections-pending?itemsPerPage=1").then(e=>{this.pendingConnectionsCount=e.data["hydra:totalItems"]||0}).catch(e=>{console.error(e)}))},getConnectedUser(e){return e.requester?.id===this.user.id?e.recipient:e.requester},hasAnySocialLink(e){return!!e&&(e.email||e.profileFacebook&&"-"!==e.profileFacebook||e.profileLinkedin&&"-"!==e.profileLinkedin||e.profileTwitter&&"-"!==e.profileTwitter||e.profileInstagram&&"-"!==e.profileInstagram||e.profileTelegram&&"-"!==e.profileTelegram||e.profileTiktok&&"-"!==e.profileTiktok)},acceptConnectionFromList(e){this.loadingConnectionId=e.id,this.$http.plain.patch("/user_connections/"+e.id,{status:"accepted"}).then(()=>{this.pendingConnectionsReceived=this.pendingConnectionsReceived.filter(t=>t.id!==e.id),this.pendingReceivedTotal--,this.pendingConnectionsCount=this.pendingReceivedTotal,e.status="accepted",this.connections.push(e),this.connectionsTotal++,this.$buefy.toast.o
1pen({message:this.$t("Connection accepted"),type:"is-success"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error accepting connection"),type:"is-danger"})}).finally(()=>{this.loadingConnectionId=null})},rejectConnectionFromList(e){this.loadingConnectionId=e.id,this.$http.plain.patch("/user_connections/"+e.id,{status:"rejected"}).then(()=>{this.pendingConnectionsReceived=this.pendingConnectionsReceived.filter(t=>t.id!==e.id),this.pendingReceivedTotal--,this.pendingConnectionsCount=this.pendingReceivedTotal,this.$buefy.toast.open({message:this.$t("Connection declined"),type:"is-info"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error declining connection"),type:"is-danger"})}).finally(()=>{this.loadingConnectionId=null})},cancelConnectionRequest(e){this.loadingConnectionId=e.id,this.$http.plain.delete("/user_connections/"+e.id).then(()=>{this.pendingConnectionsSent=this.pendingConnectionsSent.filter(t=>t.id!==e.id),this.pendingSentTotal--,this.$buefy.toast.open({message:this.$t("Connection request cancelled"),type:"is-info"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error cancelling request"),type:"is-danger"})}).finally(()=>{this.loadingConnectionId=null})},onConnectionSent(e){this.pendingConnectionsSent.push(e)},openUserModal(e){this.selectedUserId=e,this.selectedUser=null,this.isUserModalVisible=!0},closeUserModal(){this.isUserModalVisible=!1,this.selectedUserId=null,this.selectedUser=null},handleModalUserLoaded(e){this.selectedUser=e},getUserBadges(){this.isLoading=!0,this.$http.plain.get("/badge_users?status=1&user="+this.item.id).then(e=>{this.userBadges=e.data["hydra:member"]}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},impersonateAs(){this.$store.state.impersonatedAs=this.item,this.$store.state.impersonator=this.user,this.isLoading=!0,this.$http.plain.get("/users/"+this.item.id).then(e=>{Au.M.commit("setCurrentUser",e.data),window.location.reload()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},copyToClipboardAndSnackbar(e){this.copyToClipboard(e),this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-info",duration:500,actionText:null})},showBundleError(e){this.$buefy.toast.open({duration:5e3,type:"is-danger",message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("An error occurred while processing your request")})},addMemberToBundle(e){return this.item.bundle?.id?this.item.bundle?.bundleMember?.id?this.$buefy.toast.open({duration:4e3,type:"is-danger",message:this.$t("Please remove the existing bundle member before adding another")}):(this.isLoading=!0,void this.$http.plain.patch("/bundle/"+this.item.bundle.id+"/add-member",{email:this.bundleMemberAddEmail}).then(e=>{this.$buefy.toast.open({type:"is-success",duration:3e3,message:this.$t("updatedSuccessfully")}),this.retrieve()}).catch(e=>{console.error(e),this.showBundleError(e)}).finally(()=>{this.isLoading=!1})):this.$buefy.toast.open({duration:4e3,type:"is-danger",message:this.$t("You are not a bundle coordinator")})},removeMemberFromBundle(){this.isLoading=!0,this.$http.plain.patch("/bundle/"+this.item.bundle?.id+"/remove-member",{}).then(e=>{this.retrieve()}).catch(e=>{console.error(e),this.showBundleError(e)}).finally(()=>{this.isLoading=!1})},loadUserPoints(){this.$http.plain.get("/badge_points_transactions?user="+this.item.id).then(e=>{const t=e.data["hydra:member"];this.userTotalPoints=t.reduce((e,t)=>e+t.points,0)}).catch(e=>{console.log(e)})},loadAllBadges(){this.$http.plain.get("/badges").then(e=>{this.allBadges=e.data["hydra:member"]}).catch(e=>{console.log(e)})}},computed:{canSendEmail(){return(0,Gm.y)(this.item,this.isGranted,this.user)},recommendationsSection(){return{type:"system_members",configuration:{}}},...(0,ur.L8)(["user","isGranted","isGrantedAdhesion","adhesionStatusLabel","tenant","isLoadingButton","tenantSettingsFee","isCustomFieldVisible","isNativeAppIos","userTypeEligibleForFee","canManageProfileAsParent"]),profileDisplayName(){if(!this.item?.middleName)return this.item?.fullName;const e=!!this.tenant?.settingFeatures?.users?.nameDisplayLastNameFirst,t=e?[this.item.lastName,this.item.firstName,this.item.middleName]:[this.item.firstName,this.item.middleName,this.item.lastName];return t.filter(Boolean).join(" ")},canRevealPersonalId(){return this.item?.id===this.user?.id||this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")},canRevealPersonalIdLog(){return this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")},canReadProfileActivity(){return!(!this.item?.id||!this.tenant?.settingFeatures?.users?.hasProfileActivity)&&(this.isGranted("HR_LOCAL",this.item.localCenter)||this.isGranted("FINANCIAL_LOCAL",this.item.localCenter))},localCenterAncestorsRootFirst(){const e=this.item?.localCenter,t=e?.ancestors;if(Array.isArray(t)&&t.length){const i=[...t].reverse();return e.isParent&&i.push({id:e.id,name:e.name}),i}return this.item?.localCenterParent?[{id:this.item.localCenterParent.id,name:this.item.localCenterParent.
1name}]:[]},infoCustomFields(){return this.customFields&&this.item?this.customFields.filter(e=>!!this.isCustomFieldVisible(e)&&(!!this.customFieldValue(this.item,e)||this.isCustomFieldMandatory(e)&&("admin"!==e.visibility||this.isGranted("HR_ASSISTANT_LOCAL",this.item.localCenter)))):[]},interestField(){return this.designatedCustomField(this.tenant?.settingFeatures?.users?.interestCustomFieldId)},skillField(){return this.tenant?.settingFeatures?.users?.hasSkills?this.designatedCustomField(this.tenant?.settingFeatures?.users?.skillsCustomFieldId):null},showAvailability(){if(!this.item)return!1;if(!this.tenant?.settingFeatures?.users?.hasAvailability)return!1;const e=this.item.availability&&Object.keys(this.item.availability).length>0,t=this.item.id===this.user.id||this.isGranted("HR_LOCAL",this.item.localCenter);return Boolean(e||t)},logTabs(){return[{key:"audit",label:this.$t("Audit Logs"),icon:"fa-light fa-user-shield"},{key:"email",label:this.$t("Email Logs"),icon:"fa-light fa-envelope"}]},showProfileCompletion(){return this.tenant?.settingFeatures?.users?.profileCompletionEnabled&&this.item?.id===this.user?.id&&void 0!==this.item?.profileCompletionPercentage&&this.item.profileCompletionPercentage<100},showProfileCompletionCelebration(){return this.triggerProfileCompletionCelebration},showPermissionIdentityAdhesion(){return!(!this.item.permissions||!(this.item.permissions.length>0||this.isGranted("ROLE_ADMIN_TENANT"))||this.item.id!==this.user.id&&!this.isGranted("HR_LOCAL",this.item.localCenter))||(!(!this.tenant.settingFeatures.resignation.isActive||!this.item.resignPending&&!this.item.resignApproved||this.item.id!==this.user.id&&!this.isGranted("HR_LOCAL",this.item.localCenter))||(!!(this.tenant.settingFeatures.identityValidation&&this.tenant.settingFeatures.identityValidation.isActive&&this.item&&this.isGranted("HR_ASSISTANT_LOCAL",this.item.localCenter))||!(!this.tenant.settingFeatures.adhesion.isActive||!this.isGranted("HR_LOCAL",this.item.localCenter)&&this.item.id!==this.user.id)))},showCompanyDetails(){return(this.isGranted("HR_LOCAL",this.item.localCenter)||this.item?.id===this.user?.id)&&(this.item.companyIdentifier||this.item.companyName||this.item.companyAddress||this.item.companyRegNo)},canOpenCompanyPage(){return this.item?.id===this.user?.id||this.isGranted("ADMIN_TENANT")},hasFamily(){return this.tenant.settingFeatures.users.hasFamilyMembers||this.tenant.settingFeatures.users.hasFamilyNonMembers},filteredConnections(){let e=this.connections;if(this.connectionSearchQuery){const t=this.connectionSearchQuery.toLowerCase();e=e.filter(e=>{const i=this.getConnectedUser(e);return i.fullName?.toLowerCase().includes(t)})}return"date_desc"===this.connectionSortBy?e=[...e].sort((e,t)=>{const i=e.dateAccepted?new Date(e.dateAccepted):new Date(0),s=t.dateAccepted?new Date(t.dateAccepted):new Date(0);return s-i}):"date_asc"===this.connectionSortBy?e=[...e].sort((e,t)=>{const i=e.dateAccepted?new Date(e.dateAccepted):new Date(0),s=t.dateAccepted?new Date(t.dateAccepted):new Date(0);return i-s}):"name"===this.connectionSortBy&&(e=[...e].sort((e,t)=>{const i=this.getConnectedUser(e).fullName?.toLowerCase()||"",s=this.getConnectedUser(t).fullName?.toLowerCase()||"";return i.localeCompare(s)})),e},connectionSortLabel(){switch(this.connectionSortBy){case"date_desc":return this.$t("Most recent");case"date_asc":return this.$t("Least recent");case"name":return this.$t("Name");default:return this.$t("Sort")}},connectionSortIcon(){switch(this.connectionSortBy){case"date_desc":return"fa-light fa-arrow-down-wide-short";case"date_asc":return"fa-light fa-arrow-up-wide-short";case"name":return"fa-light fa-arrow-down-a-z";default:return"fa-light fa-arrow-up-arrow-down"}},hasMoreConnections(){return this.connections.length<this.connectionsTotal},hasMorePendingReceived(){return this.pendingConnectionsReceived.length<this.pendingReceivedTotal},hasMorePendingSent(){return this.pendingConnectionsSent.length<this.pendingSentTotal},hasActiveConnectionFilters(){return!!this.connectionSearchQuery},isTabEvent(){return this.tenant.settingFeatures.events.isActive},isTabEDocumentsVisible(){return!!this.item&&(!!this.tenant.settingFeatures.eDocuments.isActive&&(this.item.id===this.user.id||this.isGranted("HR_LOCAL",this.item.localCenter)||this.canManageThisProfile))},isTabPersonalDriveVisible(){if(!this.item)return!1;const e=this.tenant?.settingFeatures?.drive||{};return!!e.hasUserPersonalDrive&&(this.item.id===this.user.id||(!!this.isGranted("HR_LOCAL",this.item.localCenter)||!(!this.isGranted("HR_TENANT")&&!this.isGranted("ADMIN_TENANT"))))},isTabBadge(){return this.tenant.settingFeatures.gamification.isActive},isTabFeeWithFixedDate(){return!!this.tenant.settingFeatures.fees.isActive&&(!(!this.tenant.settingFeatures.fees.fixedStartingDateFee&&"preper"!==this.tenant.slug)&&(!(!(0,wd.Bj)(this.tenant,this.item)&&!this.isGranted("FINANCIAL_TENANT"))&&(!(this.item.id===this.user.id&&!this.userTypeEligibleForFee(this.user))&&(this.item.id===this.user.id||this.user.isTrainer||this.isGranted("FINANCIAL_LOCAL",this.item.localCenter)||this.isGranted("HR_LOCAL",this.item.localCenter)||this.canManageThisProfile))))},isTabFeeNoFixedDate(){return!!this.tenant.settingFeatures.fees.isActive&&(!this.tenant.settingFeatures.fees.fixedStartingDateFee&&"preper"!==this.tenant.slug&&(!(!(0,wd.Bj)(this.tenant,this.item)&&!this.isGranted("FINANCIAL_TENANT"))&&(this.item.id===this.user.id||this.user.isTrainer||this.isGranted("FINANCIAL_LOCAL",this.item.localCenter)||this.isGranted("HR_LOCAL",this.item.localCenter)||this.canManageThisProfile)))},isDateJoinedToday(){let e=new Date,t=(0,mr.QE)(this.item.dateJoined);return this.item&&Math.abs(e-t)/864e5<1},hasPermissionForRoles(){return!!(this.isGranted("HR_TENANT")||this.tenant.settingFeatures.localCenter.isActive&&this.isGranted("HR_LOCAL",this.item.localCenterObject))&&(this.tenant.settingFeatures.users.hasRoles||this.tenant.settingFeatures.users.hasUserTypes)},isMoreThanOneLogsPage(){return!!(this.userLogsTotal>this.userLogsPerPage&&this.userLogsPerPage)},isCurrentUserFeeMandatoryAndExpired(){return this.item&&this.item.id===this.user.id&&this.tenant.settingFeatures.fees.isActive&&this.tenant.settingFeatures.fees.isMandatory&&this.user.isExpiredValidFeeDate&&!this.isGranted("HR_TENANT")&&this.userTypeEligibleForFee(this.item)},isValidEmail(){const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.test(this.bundleMemberAddEmail)},tierBadges(){return this.allBadges.filter(e=>null!==e.pointsRequired).sort((e,t)=>
1e.pointsRequired-t.pointsRequired)},currentTierBadge(){if(!this.tierBadges.length||0===this.userTotalPoints)return null;let e=null;for(const t of this.tierBadges){if(!(this.userTotalPoints>=t.pointsRequired))break;e=t}return e},nextTierBadge(){if(!this.tierBadges.length)return null;for(const e of this.tierBadges)if(this.userTotalPoints<e.pointsRequired)return e;return null}},components:{FontAwesomeIcon:Cd.gc,SendCustomEmailModal:Bm.A,UserTags:Lm.A,EntityNotes:wm.A,PersonalIdChangeLogDetails:$m.A,ProfileTimeline:_m.A,ProfileCustomFieldTags:Em.A,ProfileAvailability:Om,BDropdownItem:Cm.H_,BDropdown:Cm.UV,ProfileReferralTab:Pu.A,ProfileCompanyTab:km,LogoThumbnail:_u.A,Payments:Lu.A,LogoUpload:Eu.A,ProfileCompletionCelebration:$u.A,UserTypeThumbnail:wu.A,ListEvent:Fu.A,FeeUserForm:hu,Fee:Cu,Contract:_d.A,EmailLogList:Tu["default"],DriveList:Su.A,ProfileCompletionBar:Wm.A,BioText:jm.A,ItemViewModal:Qm.A,SystemMembers:zm.A,UserShowContent:()=>Promise.resolve().then(i.bind(i,6720))}};const Hm=(0,ec.A)(Jm,[["render",cr]]);var Km=Hm},7151:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(90033);const n={class:"event-location-icon"},o={class:"event-location-info"},l={class:"has-text-weight-semibold"},r=["href"],d={key:1},c={key:0,class:"has-text-grey-dark"};function u(e,t,i,u,m,p){const h=(0,s.g2)("font-awesome-icon");return p.shouldShow?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["event-location-row",{"is-single-line":!p.secondaryLocation}])},[(0,s.Lk)("div",n,[(0,s.bF)(h,{icon:p.icon},null,8,["icon"])]),(0,s.Lk)("div",o,[(0,s.Lk)("p",l,[p.linkUrl?((0,s.uX)(),(0,s.CE)("a",{key:0,href:p.linkUrl,target:"_blank"},(0,a.v_)(p.primaryLocation),9,r)):((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(p.primaryLocation),1))]),p.secondaryLocation?((0,s.uX)(),(0,s.CE)("p",c,(0,a.v_)(p.secondaryLocation),1)):(0,s.Q3)("",!0)]),(0,s.RG)(e.$slots,"actions",{linkUrl:p.linkUrl},void 0,!0)],2)):(0,s.Q3)("",!0)}i(18111),i(61701),i(14603),i(47566),i(98721);var m=i(95256),p={name:"EventLocationBox",props:{location:{type:String,default:null},placeLatitude:{type:[String,Number],default:null},placeLongitude:{type:[String,Number],default:null},meetUrl:{type:String,default:null},hasOnlineMeeting:{type:Boolean,default:!1},type:{type:String,default:"physical",validator:e=>["physical","online"].includes(e)}},computed:{shouldShow(){return"online"===this.type?!!this.meetUrl||this.hasOnlineMeeting:this.location&&!this.isOnlineLocation},isOnlineLocation(){if(!this.location)return!1;const e=this.location.toLowerCase();return"zoom"===e||"teams"===e||"online"===e},icon(){return"online"===this.type?"fa-light fa-video":"fa-light fa-location-dot"},parsedLocation(){if("online"===this.type||!this.location)return{primary:this.location,secondary:null};const e=this.location.split(",").map(e=>e.trim());if(e.length<=2)return{primary:this.location,secondary:null};const t=e.slice(-2).join(", "),i=e.slice(0,-2).join(", ");return{primary:i,secondary:t}},primaryLocation(){return"online"===this.type?this.$t("Online Meeting"):this.parsedLocation.primary},secondaryLocation(){return"online"===this.type?this.getPlatformName(this.meetUrl):this.parsedLocation.secondary},linkUrl(){return"online"===this.type?this.meetUrl:this.placeLatitude&&this.placeLongitude?`https://www.google.com/maps/place/${this.placeLatitude},${this.placeLongitude}`:null}},methods:{formatVideoUrl(e){return e?(0,m.fV)({meet:e}):""},getPlatformName(e){if(!e)return null;const t=e.toLowerCase();if(t.includes("zoom.us")||t.includes("zoom.com"))return"Zoom";if(t.includes("meet.google.com"))return"Google Meet";if(t.includes("teams.microsoft.com")||t.includes("teams.live.com"))return"Microsoft Teams";try{const t=new URL(e);return t.hostname}catch{return null}}}},h=i(66262);const g=(0,h.A)(p,[["render",u],["__scopeId","data-v-902cf66a"]]);var f=g},7757:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Q}});var s=i(20641),a=i(90033);const n={key:0,class:"o-minwidth"},o={key:1,class:"level-left mb-6 mt-3"},l={class:"level-item"},r={class:"title has-text-dark"},d={key:0,class:"tag is-success ml-4 is-rounded p-4 is-size-6"},c={key:1,class:"tag is-danger ml-4 is-rounded p-4 is-size-6"},u={key:2,class:"tag is-warning ml-4 is-rounded p-4 is-size-6"},m={key:3,class:"tag is-warning ml-4 is-rounded p-4 is-size-6"},p={key:4,class:"tag is-white ml-4 is-rounded p-4 is-size-6"},h={key:0,class:"card p-5 mb-5 mt-5"},g={class:"tag mr-4 is-rounded is-medium is-default"},f={key:1,class:"card p-5 mb-5"},b={class:"tag mr-4 is-rounded is-medium is-default"},y={key:2,class:"card p-5 mb-5"},v={class:"tag mr-4 is-rounded is-medium is-default"},k={key:3,class:"card p-5 mb-5"},C={class:"tag mr-4 is-rounded is-medium is-default"},L={key:0,class:"tag is-success is-rounded is-default"},w={key:1,class:"tag is-danger is-rounded is-default"},_={key:4,class:"card p-5 mb-5"},E={class:"tag mr-4 is-rounded is-medium is-default"},$={key:5,class:"mt-6"},F={class:"level-left"},T={class:"level-item"},S={class:"tag is-rounded is-small is-default"},A={class:"level-item"},P={class:"level-item"},I={class:"tag is-rounded is-default"},M={style:{"background-color":"transparent"}};function x(e,t,i,x,N,U){const D=(0,s.g2)("b-loading"),X=(0,s.g2)("b-input"),V=(0,s.g2)("b-field"),R=(0,s.g2)("b-tab-item"),O=(0,s.g2)("router-link"),Q=(0,s.g2)("b-tabs");return N.item?((0,s.uX)(),(0,s.CE)("div",n,[i.isEmbedded?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-white is-rounded mb-5",onClick:t[0]||(t[0]=t=>e.$router.go(-1))}," â "+(0,a.v_)(e.$t("back")),1)),(0,s.bF)(D,{modelValue:N.isLoading,"onUpdate:modelValue":t[1]||(t[1]=e=>N.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),i.isEmbedded?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("h2",r,(0,a.v_)(e.$t("Adhesion"))+" "+(0,a.v_)(N.item.user.fullName),1)]),(0,s.Lk)("div",null,["success"===N.item.status?((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(e.$t("Adhesion success")),1)):"rejected"===N.item.status?((0,s.uX)(),(0,s.CE)("span",c,(0,a.v_)(e.$t("Adhesion rejected")),1)):"interviewed"===N.item.status?((0,s.uX)(),(0,s.CE)("span",u,(0,a.v_)(e.$t("Interviewed")),1)):"new"!==N.item.status?((0,s.uX)(),(0,s.CE)("span",m,(0,a.v_)(e.$t(e.adhesionStatusLabel(N.item.status))),1)):"new"===N.item.status?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(e.$t("Draft")),1)):(0,s.Q3)("",!0)])])),(0,s.bF)(Q,{modelValue:N.tab,"onUpdate:modelValue":t[6]||(t[6]=e=>N.tab=e),type:e.$isMobile()?"is-toggle-rounded":null,size:e.$isMobile()?"is-small":null,position:e.$isMobile()?"is-centered":null},{default:(0,s.k6)(()=>[e.isGranted("HR_LOCAL",N.item.user.localCenter)&&!["duplicated"].includes(N.item.status)?((0,s.uX)(),(0,s.Wv)(R,{key:0,label:e.$t("Conclusions")},{default:(0,s.k6)(()=>[(0,s.bF)(V,{label:e.$t("Interview conclusion"),class:""},{default:(0,s.k6)(()=>[(0,s.bF)(X,{modelValue:N.item.interviewSummary,"onUpdate:modelValue":t[2]||(t[2]=e=>N.item.interviewSummary=e),type:"textarea",disabled:["rejected","success"].includes(N.item.status),rows:"6"},null,8,["modelValue","disabled"])]),_:1}
1,8,["label"]),(0,s.bF)(V,{label:e.$t("Background conclusion"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(X,{modelValue:N.item.backgroundSummary,"onUpdate:modelValue":t[3]||(t[3]=e=>N.item.backgroundSummary=e),type:"textarea",disabled:["rejected","success"].includes(N.item.status),rows:"6"},null,8,["modelValue","disabled"])]),_:1},8,["label"]),(0,s.bF)(V,{label:e.$t("Adhesion cancel reason"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(X,{modelValue:N.item.cancelSummary,"onUpdate:modelValue":t[4]||(t[4]=e=>N.item.cancelSummary=e),type:"textarea",disabled:["rejected","success"].includes(N.item.status),rows:"6"},null,8,["modelValue","disabled"])]),_:1},8,["label"]),["rejected","success"].includes(N.item.status)?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-rounded is-primary mt-5 is-fullwidth",onClick:t[5]||(t[5]=(...e)=>U.saveInterview&&U.saveInterview(...e))},(0,a.v_)(e.$t("save")),1))]),_:1},8,["label"])):(0,s.Q3)("",!0),(0,s.bF)(R,{label:e.$t("Logs")},{default:(0,s.k6)(()=>[N.item.sentByOtherData?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.Lk)("span",g,(0,a.v_)(e.$filters.formatDateCool(U.moment(N.item.sentDate))),1),(0,s.eW)(" "+(0,a.v_)(e.$t("Sent by"))+" ",1),(0,s.bF)(O,{to:{name:"UserShow",params:{item:N.item.sentByOtherData?N.item.sentByOtherData.id:N.item.user.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(N.item.sentByOtherData?N.item.sentByOtherData.fullName:N.item.user.fullName),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),N.item.validatedByData?((0,s.uX)(),(0,s.CE)("div",f,[(0,s.Lk)("span",b,(0,a.v_)(e.$filters.formatDateCool(U.moment(N.item.sentDate))),1),(0,s.eW)(" "+(0,a.v_)(e.$t("Validated by"))+" ",1),(0,s.bF)(O,{to:{name:"UserShow",params:{item:N.item.validatedByData.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(N.item.validatedByData.fullName),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),N.item.interviewedByData?((0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("span",v,(0,a.v_)(e.$filters.formatDateCool(U.moment(N.item.interviewDate))),1),(0,s.eW)(" "+(0,a.v_)(e.$t("Interview by"))+" ",1),(0,s.bF)(O,{to:{name:"UserShow",params:{item:N.item.interviewedByData.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(N.item.interviewedByData.fullName),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),N.item.decisionByData?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.Lk)("span",C,(0,a.v_)(e.$filters.formatDateCool(U.moment(N.item.decisionDate))),1),(0,s.eW)(" "+(0,a.v_)(e.$t("Decision by"))+" ",1),(0,s.bF)(O,{to:{name:"UserShow",params:{item:N.item.decisionByData.id}},class:"mr-4"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(N.item.decisionByData.fullName),1)]),_:1},8,["to"]),"success"===N.item.status?((0,s.uX)(),(0,s.CE)("span",L,(0,a.v_)(e.$t("success")),1)):(0,s.Q3)("",!0),"rejected"===N.item.status?((0,s.uX)(),(0,s.CE)("span",w,(0,a.v_)(e.$t("rejected")),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),N.item.updatedByData?((0,s.uX)(),(0,s.CE)("div",_,[(0,s.Lk)("span",E,(0,a.v_)(e.$filters.formatDateCool(U.moment(N.item.updatedDate))),1),(0,s.eW)(" "+(0,a.v_)(e.$t("Updated by"))+" ",1),(0,s.bF)(O,{to:{name:"UserShow",params:{item:N.item.updatedByData.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(N.item.updatedByData.fullName),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),N.logsAdhesion.length>0?((0,s.uX)(),(0,s.CE)("div",$,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("System logs")),1),t[8]||(t[8]=(0,s.Lk)("hr",null,null,-1)),t[9]||(t[9]=(0,s.Lk)("p",{class:"is-size-7 mt-5 mb-6"},'Eg: {"status":["pending","new"]}, refers that"status" changed from pending to new',-1)),N.logsAdhesion.length>0?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:0},(0,s.pI)(N.logsAdhesion,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.id,class:"card p-4 mb-4",style:{overflow:"scroll"}},[(0,s.Lk)("div",F,[(0,s.Lk)("div",T,[(0,s.Lk)("span",S,(0,a.v_)(e.$filters.formatDateCool(i.dateCreated)),1)]),(0,s.Lk)("div",A,[(0,s.bF)(O,{to:{name:"UserShow",params:{item:i.owner.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(i.owner.fullName),1)]),_:2},1032,["to"])]),(0,s.Lk)("div",P,[(0,s.Lk)("span",I,(0,a.v_)(i.action),1)])]),(0,s.Lk)("div",null,[(0,s.Lk)("pre",M,[(0,s.eW)(" "+(0,a.v_)(U.formatJson(i.details))+"\n ",1),(0,s.Lk)("p",null,"Log ID: "+(0,a.v_)(i.id),1),t[7]||
1(t[7]=(0,s.eW)("\n ",-1))])])]))),128)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),_:1},8,["label"])]),_:1},8,["modelValue","type","size","position"])])):(0,s.Q3)("",!0)}var N=i(40834),U=i(95093),D=i.n(U),X=i(95256),V={props:{adhesionId:{type:[Number,String],default:null},isEmbedded:{type:Boolean,default:!1},initialTab:{type:Number,default:null}},data(){return{item:null,logsAdhesion:[],logsIdentity:[],isLoading:!1,tab:null!==this.initialTab?this.initialTab:"logs"===this.$route.query.tab?1:0}},computed:{...(0,N.L8)(["tenant","isGranted","user","adhesionStatusLabel"]),itemIdentifier(){return this.adhesionId||this.$route.params.item}},created(){this.retrieve()},methods:{moment:D(),mediaSrc:X.F9,formatJson(e){const t=JSON.parse(e);return JSON.stringify(t,null,2)},postRetrieve(){if(this.item.user.localCenter&&!this.item.user.localCenter.parent&&this.item.user.localCenterParent&&this.item.user.localCenterParent.includes("/api/v1/local_centers/")){let e=this.item.user.localCenterParent.replace("/api/v1/local_centers/","");this.item.user.localCenter.parent={id:parseInt(e)}}},saveInterview(){return this.isLoading=!0,this.$http.plain.patch("/adhesion/"+this.itemIdentifier+"/interview",{interviewSummary:this.item.interviewSummary,backgroundSummary:this.item.backgroundSummary,cancelSummary:this.item.cancelSummary}).then(e=>(this.item=e.data,this.postRetrieve(),this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}))).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},retrieve(){return this.isLoading=!0,this.$http.plain.get("/adhesion/"+this.itemIdentifier).then(e=>(this.item=e.data,this.postRetrieve(),this.$http.plain.get("/logs?adhesion="+this.itemIdentifier).then(e=>{this.logsAdhesion=e.data["hydra:member"]}))).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})}},components:{}},R=i(66262);const O=(0,R.A)(V,[["render",x]]);var Q=O},8277:function(e,t,i){"use strict";i(18111),i(61701),i(13579);var s=i(95256);const a={CourseList:"courses.isActive",courses:"courses.isActive",ContactList:"contacts.isActive",contacts:"contacts.isActive",discussions:"discussions.isActive",events:"events.isActive",files:"drive.isActive",Voting:"voting.isActive",GazetteList:"officialGazette.isActive"};t.A={methods:{evaluateFeature:s.GU,evaluateFeaturePart:s.pc,get:s.Jt,resolveValue:s.g$,safeEvaluateFeature(e){try{return!!this.evaluateFeature(e)}catch(t){return console.warn("Failed to evaluate feature:",e,t),!1}},isGrantedMenuPermission(e){const t=e.includes("||")?e.split("||").map(e=>e.trim()):[e];return t.some(e=>this.isGranted(e))||this.safeEvaluateFeature(e)},isMenuEntryAccessible(e){const t=e.route?a[e.route]:null;if(t&&!this.safeEvaluateFeature(t))return!1;if(Array.isArray(e.permissions)&&e.permissions.length&&!e.permissions.some(e=>this.isGranted(e)))return!1;if(e.permission&&!this.isGrantedMenuPermission(e.permission))return!1;if(e.userType&&this.tenant?.settingFeatures?.users?.hasUserTypes){const t=this.$store.getters.effectiveUserType,i=Array.isArray(e.userType)?e.userType:[parseInt(e.userType)];if(t&&!i.includes(t.id))return!1}return!(e.feature&&!this.safeEvaluateFeature(e.feature))&&!(e.computed&&!this.safeEvaluateFeature(e.computed))}}}},9897:function(e,t,i){"use strict";i(18111),i(22489),i(61701);var s=i(84743),a=i.n(s),n=i(40834),o=i(95256);t.A={data(){return{selectedTimezone:null,dateTimeBegin:null,dateTimeEnd:null,showTimezonesDropdown:!1}},computed:{...(0,n.L8)(["user","tenant"]),itemTimezone(){return this.selectedTimezone?this.selectedTimezone:this.user?.timezone||this.tenant?.timezone}},methods:{eventEnded:o.zn,sameDay:o.lp,mediaSrc:o.F9,videoUrl:o.fV,initTimezone(){this.selectedTimezone=this.user?.timezone?this.user.timezone:this.tenant?.timezone},convertTimezones(e=null){const t=e||this.item;t&&(t.dateTimeBegin&&(this.dateTimeBegin=a()(t.dateTimeBegin).tz(this.itemTimezone).format("YYYY-MM-DDTHH:mm")),t.dateTimeEnd&&(this.dateTimeEnd=a()(t.dateTimeEnd).tz(this.itemTimezone).format("YYYY-MM-DDTHH:mm")),this.showTimezonesDropdown=!1)},normalizeEventDates(e){return e.dateTimeBegin&&(e.dateTimeBegin=a()(e.dateTimeBegin).utc().format("YYYY-MM-DDTHH:mm")),e.dateTimeEnd&&(e.dateTimeEnd=a()(e.dateTimeEnd).utc().format("YYYY-MM-DDTHH:mm")),e},extractEventMedia(e,t){return e?.eventMedia?e.eventMedia.filter(e=>e.media.type===t).map(e=>e.media):[]},formatCreatedDate(e){if(!e)return"";const t=new Date(e);return t.toLocaleDateString(this.$i18n.locale,{year:"numeric",month:"long",day:"numeric"})},getGoogleMapsUrl(e,t){return`https://www.google.com/maps/place/${e},${t}`}}}},9906:function(e,t,i){"use strict";i.d(t,{A:function(){return I}});var s=i(20641),a=i(90033),n=i(53751);
1const o={key:0,ref:"moreContainer",class:"list-filter-pill"},l={class:"pill-label"},r={class:"pill-dropdown-header"},d={class:"pill-dropdown-body is-more-menu"},c=["onClick"],u={class:"icon is-small mr-2"};function m(e,t,i,m,p,h){const g=(0,s.g2)("ListFilterPillCustom"),f=(0,s.g2)("ListFilterPillDate"),b=(0,s.g2)("ListFilterPillText"),y=(0,s.g2)("ListFilterPill"),v=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{ref:"bar",class:(0,a.C4)(i.stack?"filter-pill-stack":"filter-pill-bar")},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(h.shownDefinitions,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.key},["slot"===t.type?((0,s.uX)(),(0,s.Wv)(g,{key:0,ref_for:!0,ref:"pill_"+t.key,label:t.label,"has-selection":h.hasValue(t),"display-value":t.displayValue||"","filter-title":t.filterTitle,align:t.align||"left",onOpen:h.onPillOpen,onClear:e=>h.emitChange(t.key,void 0!==t.clearValue?t.clearValue:null)},{default:(0,s.k6)(({close:i})=>[(0,s.RG)(e.$slots,t.key,{definition:t,close:i})]),_:2},1032,["label","has-selection","display-value","filter-title","align","onOpen","onClear"])):"date"===t.type?((0,s.uX)(),(0,s.Wv)(f,{key:1,ref_for:!0,ref:"pill_"+t.key,label:t.label,from:i.modelValue[t.fromKey],to:i.modelValue[t.toKey],"filter-title":t.filterTitle,align:t.align||"left",onOpen:h.onPillOpen,"onUpdate:from":e=>h.emitChange(t.fromKey,e),"onUpdate:to":e=>h.emitChange(t.toKey,e)},null,8,["label","from","to","filter-title","align","onOpen","onUpdate:from","onUpdate:to"])):"text"===t.type||"autocomplete"===t.type||"toggle"===t.type?((0,s.uX)(),(0,s.Wv)(b,{key:2,ref_for:!0,ref:"pill_"+t.key,label:t.label,"model-value":i.modelValue[t.key],type:t.type,"display-value":t.displayValue,placeholder:t.placeholder||t.label,"filter-title":t.filterTitle,align:t.align||"left","initial-open":p.autoOpenKey===t.key,"search-results":t.searchResults||[],"is-searching":!!t.isSearching,onOpen:h.onPillOpen,onSearch:i=>e.$emit("search",{key:t.key,term:i}),"onUpdate:modelValue":e=>h.emitChange(t.key,e)},null,8,["label","model-value","type","display-value","placeholder","filter-title","align","initial-open","search-results","is-searching","onOpen","onSearch","onUpdate:modelValue"])):((0,s.uX)(),(0,s.Wv)(y,{key:3,ref_for:!0,ref:"pill_"+t.key,label:t.label,options:t.options||[],"model-value":i.modelValue[t.key],"filter-title":t.filterTitle,searchable:void 0!==t.searchable?t.searchable:null,multiple:!!t.multiple,"show-apply":!!t.showApply,align:t.align||"left",onOpen:h.onPillOpen,"onUpdate:modelValue":e=>h.emitChange(t.key,e)},null,8,["label","options","model-value","filter-title","searchable","multiple","show-apply","align","onOpen","onUpdate:modelValue"]))],64))),128)),h.hiddenDefinitions.length>0?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:"pill-trigger",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>h.toggleMoreMenu&&h.toggleMoreMenu(...e),["stop"]))},[(0,s.bF)(v,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",l,(0,a.v_)(e.$t("More filters")),1)]),(0,s.bo)((0,s.Lk)("div",{ref:"moreDropdown",class:(0,a.C4)(["pill-dropdown",{"is-align-right":!i.stack&&(i.alignMoreRight||p.moreMenuFlipped)}])},[(0,s.Lk)("div",r,(0,a.v_)(e.$t("Add filter")),1),(0,s.Lk)("div",d,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(h.hiddenDefinitions,t=>((0,s.uX)(),(0,s.CE)("div",{key:"more-"+t.key,class:"pill-option",onClick:(0,n.D$)(e=>h.addFilter(t),["stop"])},[(0,s.Lk)("span",u,[(0,s.bF)(v,{icon:t.icon||"fa-light fa-circle-plus"},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(e.optionLabel(t)),1)],8,c))),128))])],2),[[n.aG,p.isMoreMenuOpen]])],512)):(0,s.Q3)("",!0),i.showClear&&(h.hasAnyValue||p.addedKeys.length>0)?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"pill-clear-filters",onClick:t[1]||(t[1]=(...e)=>h.onClear&&h.onClear(...e))},(0,a.v_)(e.$t("Clear filters")),1)):(0,s.Q3)("",!0)],2)}i(44114),i(18111),i(22489),i(13579);var p=i(43432),h=i(15770),g=i(64601);const f={ref:"pillContainer",class:"list-filter-pill"},b={class:"pill-label"},y={class:"pill-value"},v={class:"pill-label"},k={class:"pill-dropdown-header"},C={class:"pill-dropdown-body is-not-scrollable pill-dropdown-input-row"};function L(e,t,i,o,l,r){const d=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",f,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":i.hasSelection}]),onClick:t[1]||(t[1]=(0,n.D$)((...e)=>r.toggleDropdown&&r.toggleDropdown(...e),["stop"]))},[i.hasSelection?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>r.clearSelection&&r.clearSelection(...e),["stop"]))},[(0,s.bF)(d,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",b,(0,a.v_)(e.displayLabel),1),t[3]||(t[3]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",y,(0,a.v_)(i.displayValue),1),(0,s.bF)(d,{icon:"fa-light fa-chevron-down",class:"pill-chevron"})],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(d,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",v,(0,a.v_)(e.displayLabel),1)],64))],2),(0,s.bo)((0,s.Lk)("div",{ref:"dropdown",class:(0,a.C4)(["pill-dropdown is-searchable is-overflow-visible",{"is-align-right":r.isAlignedRight}]),onClick:t[2]||(t[2]=(0,n.D$)(()=>{},["stop"]))},[(0,s.Lk)("div",k,(0,a.v_)(i.filterTitle||e.$t("Filter by")+": "+e.displayLabel),1),(0,s.Lk)("div",C,[(0,s.RG)(e.$slots,"default",{close:r.close})])],2),[[n.aG,l.isOpen]])],512)}
1var w=i(37440),_=i(46093),E=i(28906),$={name:"ListFilterPillCustom",mixins:[E.A],props:{label:{type:String,required:!0},hasSelection:{type:Boolean,default:!1},displayValue:{type:String,default:""},filterTitle:{type:String,default:null},align:{type:String,default:"left"}},emits:["clear","open"],data(){return{isOpen:!1,flipped:!1}},computed:{isAlignedRight(){return"right"===this.align||this.flipped}},mounted(){document.addEventListener("click",this.onClickOutside),this.unregisterPill=(0,w.f)(this.close)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside),this.unregisterPill&&this.unregisterPill()},methods:{toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&((0,w.r)(this.close),(0,_.Mj)(this),this.$emit("open"),this.$nextTick(()=>(0,_.xu)(this.$refs.dropdown)))},open(){this.isOpen||this.toggleDropdown()},close(){this.isOpen=!1},clearSelection(){this.$emit("clear"),this.isOpen=!1},onClickOutside(e){this.isOpen&&this.$refs.pillContainer&&(this.$refs.pillContainer.contains(e.target)||e.target.closest&&e.target.closest(".dropdown-content, .autocomplete")||(this.isOpen=!1))}}},F=i(66262);const T=(0,F.A)($,[["render",L]]);var S=T,A={name:"ListFilterBar",components:{ListFilterPill:p.A,ListFilterPillText:h.A,ListFilterPillDate:g.A,ListFilterPillCustom:S},mixins:[E.A],props:{definitions:{type:Array,required:!0},modelValue:{type:Object,required:!0},stack:{type:Boolean,default:!1},showClear:{type:Boolean,default:!0},alignMoreRight:{type:Boolean,default:!1},defaults:{type:Object,default:()=>({})}},emits:["update:modelValue","change","clear","search"],data(){return{isMoreMenuOpen:!1,addedKeys:[],autoOpenKey:null,moreMenuFlipped:!1}},computed:{availableDefinitions(){return this.definitions.filter(e=>!1!==e.visible)},shownDefinitions(){return this.availableDefinitions.filter(e=>e.isPrimary||this.hasValue(e)||this.addedKeys.includes(e.key))},hiddenDefinitions(){return this.availableDefinitions.filter(e=>!e.isPrimary&&!this.hasValue(e)&&!this.addedKeys.includes(e.key))},hasAnyValue(){return this.availableDefinitions.some(e=>this.hasValue(e,!0))}},mounted(){document.addEventListener("click",this.onClickOutside),this.unregisterPill=(0,w.f)(this.closeMoreMenu)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside),this.unregisterPill&&this.unregisterPill()},methods:{hasValue(e,t=!1){const i=e=>{const i=this.modelValue[e];return null!==i&&void 0!==i&&""!==i&&(Array.isArray(i)?i.length>0:!t||!Object.prototype.hasOwnProperty.call(this.defaults,e)||this.defaults[e]!==i)};return"date"===e.type?i(e.fromKey)||i(e.toKey):i(e.key)},emitChange(e,t){this.$emit("update:modelValue",{...this.modelValue,[e]:t}),this.$emit("change",{key:e,value:t})},toggleMoreMenu(){if(this.isMoreMenuOpen=!this.isMoreMenuOpen,!this.isMoreMenuOpen)return;(0,w.r)(this.closeMoreMenu);const e=()=>(0,_.jM)(this.$refs.moreContainer,this.$refs.moreDropdown);this.moreMenuFlipped=e(),this.$nextTick(()=>{this.moreMenuFlipped=e()})},closeMoreMenu(){this.isMoreMenuOpen=!1},addFilter(e){this.isMoreMenuOpen=!1,this.addedKeys.includes(e.key)||this.addedKeys.push(e.key),this.autoOpenKey=e.key,this.$nextTick(()=>{const t=this.resolvePill("pill_"+e.key);t&&"function"===typeof t.open&&t.open()})},onPillOpen(){this.isMoreMenuOpen=!1},resolvePill(e){const t=this.$refs[e];return Array.isArray(t)?t[0]:t},onClear(){this.addedKeys=[],this.autoOpenKey=null,this.$emit("clear")},onClickOutside(e){this.isMoreMenuOpen&&this.$refs.moreContainer&&!this.$refs.moreContainer.contains(e.target)&&(this.isMoreMenuOpen=!1)}}};const P=(0,F.A)(A,[["render",m]]);var I=P},10097:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"autocomplete_suggestion_container"},l={class:"industry-item"},r={class:"industry-title"},d={key:0,class:"industry-count"},c=["value"],u={key:1,class:"card py-4 pl-4 pr-1 is-size-6-half"},m={class:"mb-3"},p=["onClick"];function h(e,t,i,h,g,f){const b=(0,s.g2)("b-autocomplete"),y=(0,s.g2)("b-select"),v=(0,s.g2)("b-field"),k=(0,s.g2)("b-checkbox"),C=(0,s.g2)("b-table-column"),L=(0,s.g2)("b-table");return(0,s.bo)(((0,s.uX)(),(0,s.CE)("section",null,[(0,s.Lk)("div",o,["autocomplete"===i.type?((0,s.uX)(),(0,s.Wv)(b,{key:0,ref:"industrySearch",modelValue:g.industrySearch,"onUpdate:modelValue":t[0]||(t[0]=e=>g.industrySearch=e),placeholder:e.$t("professionIndustry"),data:f.filteredIndustries,"open-on-focus":!0,"dropdown-position":"bottom",field:"title",expanded:!0,class:(0,a.C4)(i.required?"required":""),loading:g.isLoading,required:!!i.required,size:i.isMediumSize?"":"is-small",rounded:!i.isRectangle,clearable:"",onSelect:f.change,onIconClick:f.clearSelection},{default:(0,s.k6)(e=>[(0,s.Lk)("div",l,[(0,s.Lk)("span",r,(0,a.v_)(e.option.title),1),void 0!==e.option.total?((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(e.option.total),1)):(0,s.Q3)("",!0)])]),_:1},8,["modelValue","placeholder","data","class","loading","required","size","rounded","onSelect","onIconClick"])):(0,s.Q3)("",!0)]),"select"===i.type?((0,s.uX)(),(0,s.Wv)(v,{key:0,label:e.$t("professionIndustry"),class:(0,a.C4)(i.required?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(y,{"model-value":i.modelValue,size:"is-small",rounded:"","onUpdate:modelValue":f.change},{default:(0,s.k6)(()=>[t[4]||(t[4]=(0,s.Lk)("option",{value:null},"...",-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(g.industries,e=>((0,s.uX)(),(0,s.CE)("option",{key:e["@id"],value:e["@id"]},(0,a.v_)(e.display),9,c))),128))]),_:1},8,["model-value","onUpdate:modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),i.displayAllLink&&g.industries&&("table"===i.type||"table_selector"===i.type)?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("p",m,[(0,s.Lk)("a",{onClick:t[1]||(t[1]=(...e)=>f.change&&f.change(...e))},"â "+(0,a.v_)(e.$t("All industries")),1)]),!g.industries||"table"!==i.type&&"table_selector"!==i.type?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(L,{key:0,data:g.industries,"default-sort":"total","default-sort-direction":"DESC",class:"pl-0 pt-0 pb-4 pr-2 my-table nice-scrollbar"},{default:(0,s.k6)(()=>["table_selector"===i.type?((0,s.uX)(),(0,s.Wv)(C,{key:0},{default:(0,s.k6)(i=>[(0,s.bF)(k,{modelValue:g.industriesSelected,"onUpdate:modelValue":[t[2]||(t[2]=e=>g.industriesSelected=e),t[3]||(t[3]=t=>e.$emit("update:modelValue",g.industriesSelected))],"native-value":i.row.id},null,8,["modelValue","native-value"])]),_:1})):(0,s.Q3)("",!0),(0,s.bF)(C,{label:e.$t("title"),field:"value"},{default:(0,s.k6)(e=>[(0,s.Lk)("a",{class:(0,a.C4)({"has-text-weight-bold has-text-primary":f.isSelected(e.row)}),style:{cursor:"pointer"},onClick:t=>f.change(e.row)},(0,a.v_)(e.row.display),11,p)]),_:1},8,["label"]),(0,s.bF)(C,{numeric:"",sortable:"",field:"total"},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.total),1)]),_:1})]),_:1},8,["data"]))])):(0,s.Q3)("",!0)],512)),[[n.aG,g.industries]])}i(44114),i(18111),i(22489),i(20116),i(61701);var g=i(95256),f=i(38221),b=i.n(f),y={props:["type","sortedByTotalsDesc","modelValue","initValue","displayAllLink","displayTotal","getTotal","status","localCenter","unit","required","industriesSelectedValue","isRectangle","isMediumSize","tenant"],data(){return{industriesSelected:this.industriesSelectedValue?this.industriesSelectedValue:[],industries:null,industriesCount:[],industrySearch:null,isLoading:!1,isLoadingCount:!1}},computed:{filteredIndustries(){if(!this.industries)return[];let e=this.industries.map(e=>{const t=this.getTranslatedValue(e);return{...e,title:t,display:t}}),t=e;return this.industrySearch&&(t=e.filter(e=>e.title.toString().toLowerCase().indexOf(this.industrySearch.toLowerCase())>=0)),this.sortedByTotalsDesc&&t&&(t=[...t].sort((e,t)=>
1(t.total||0)-(e.total||0))),t}},watch:{industrySearch:function(e,t){!e&&t&&this.$emit("update:modelValue",null)},modelValue:function(e){this.modelValue?this.industrySearch=this.getTranslatedValue(this.modelValue):this.industrySearch=""},localCenter:function(e){this.debouncedLoadIndustriesTotal()},unit:function(e){this.debouncedLoadIndustriesTotal()},status:function(e){this.debouncedLoadIndustriesTotal()},initValue:function(e,t){!e&&t?(this.industrySearch=null,this.$refs.industrySearch&&this.$refs.industrySearch.setSelected(null)):e&&this.industries&&this.$nextTick(()=>{if(this.$refs.industrySearch){let t=this.industries.find(t=>t.id===parseInt(e));t&&this.$refs.industrySearch.setSelected(t)}})}},created(){this.debouncedLoadIndustriesTotal=b()(this.loadIndustriesTotal,300),this.modelValue&&(this.industrySearch=this.getTranslatedValue(this.modelValue)),this.getTotal?this.loadIndustriesTotal():this.retrieveIndustries()},methods:{getTranslatedValue(e){return(0,g.KO)(e,this.$t,this.$i18n.locale)},loadIndustriesTotal(){if(this.isLoadingCount)return;this.isLoadingCount=!0;let e=void 0!==this.localCenter?this.localCenter:"0",t=void 0!==this.status?this.status:"ACTIVE",i="/users/profession-count/"+e+"/"+t;this.unit&&(i+="?unit="+this.unit),this.$http.plain.get(i).then(e=>{this.industriesCount=e.data,this.retrieveIndustries()}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingCount=!1})},retrieveIndustries(){if(this.industries&&this.industries.length>0)return;this.isLoading=!0;const e=this.tenant?.slug||this.$store.getters.tenant?.slug;this.$http.plain.get("/profession_types?tenantSlug="+e).then(e=>{let t=[];const i=e.data["hydra:member"]||e.data;for(let s of i){let e=this.getTranslatedValue(s),i=e;if(this.getTotal){let e=this.industriesCount.find(e=>parseInt(e.tid)===s.id);s.total=void 0!==e?parseInt(e.nu):0}t.push({"@id":s["@id"],id:s.id,total:s.total,title:e,display:i,name:s.name,tenant:s.tenant,translation:s.translation})}t.sort(function(e,t){return e.title&&t.title?e.title.localeCompare(t.title):0}),this.industries=t,this.initValue&&this.industries&&this.$nextTick(()=>{if(this.$refs.industrySearch){let e=this.industries.find(e=>e.id===parseInt(this.initValue));e&&this.$refs.industrySearch.setSelected(e)}})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},change(e){let t=e||null;this.$emit("update:modelValue",t)},clearSelection(){this.industrySearch=null,this.$emit("update:modelValue",null),this.$emit("clearAllFilters"),this.$refs.industrySearch&&this.$refs.industrySearch.setSelected(null)},isSelected(e){return this.initValue===e.id}}},v=i(66262);const k=(0,v.A)(y,[["render",h],["__scopeId","data-v-60527060"]]);var C=k},10630:function(e,t,i){"use strict";i.d(t,{A:function(){return _}});var s=i(20641),a=i(90033),n=i(53751);const o={key:0},l={key:1,class:"is-flex is-align-items-center"},r={class:"icon is-small mr-1"},d={key:2,class:"icon is-small"},c={key:0,class:"cropper-overlay"},u={class:"cropper-header"},m={class:"cropper-title"},p={class:"cropper-container"},h={key:1,class:"cropper-loading"},g={class:"cropper-footer"},f=["disabled"],b=["disabled"];function y(e,t,i,y,v,k){const C=(0,s.g2)("font-awesome-icon"),L=(0,s.g2)("b-upload"),w=(0,s.g2)("ImageCropper");return(0,s.bo)(((0,s.uX)(),(0,s.CE)("div",null,[(0,s.bF)(L,{ref:"uploadInput",modelValue:v.imageFile,"onUpdate:modelValue":[t[0]||(t[0]=e=>v.imageFile=e),k.onFileChange],accept:"image/png, image/jpeg"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-primary is-rounded is-small",{"is-loading":i.isLoading}])},["newsletter"===i.type?((0,s.uX)(),(0,s.CE)("span",o,(0,a.v_)(e.$t(i.initialImage?"Change social media image":"Add social media image")),1)):"event"===i.type?((0,s.uX)(),(0,s.CE)("span",l,[(0,s.Lk)("span",r,[(0,s.bF)(C,{icon:"fa-light fa-image"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t(i.initialImage?"changeImage":"Add image")),1)])):((0,s.uX)(),(0,s.CE)("span",d,[(0,s.bF)(C,{icon:"fa-light fa-camera"})]))],2)]),_:1},8,["modelValue","onUpdate:modelValue"]),((0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[v.showCropper?((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("div",{class:(0,a.C4)(["cropper-modal-card",{"is-mobile":e.$isMobile()}])},[(0,s.Lk)("div",u,[(0,s.Lk)("span",m,(0,a.v_)(e.$t("moveAndScale")),1)]),(0,s.Lk)("div",p,[v.imageData?((0,s.uX)(),(0,s.Wv)(w,{key:0,ref:"cropper",src:v.imageData,"border-radius":i.borderRadius,"crop-size":i.cropSize,"output-type":i.outputType,"output-quality":.9,onReady:k.onCropperReady},null,8,["src","border-radius","crop-size","output-type","onReady"])):(0,s.Q3)("",!0),v.isCropperReady?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",h,[...t[3]||(t[3]=[(0,s.Lk)("span",{class:"loader"},null,-1)])]))]),(0,s.Lk)("div",g,[(0,s.Lk)("button",{class:"cropper-btn cropper-btn-cancel",disabled:v.isCropping,onClick:t[1]||(t[1]=(...e)=>
1k.cancelCrop&&k.cancelCrop(...e))},(0,a.v_)(e.$t("cancel")),9,f),(0,s.Lk)("button",{class:(0,a.C4)(["cropper-btn cropper-btn-confirm",{"is-loading":v.isCropping}]),disabled:v.isCropping||!v.isCropperReady,onClick:t[2]||(t[2]=(...e)=>k.cropAndEmit&&k.cropAndEmit(...e))},(0,a.v_)(e.$t("choose")),11,b)])],2)])):(0,s.Q3)("",!0)]))],512)),[[n.aG,i.showButton||e.$isMobile()]])}var v=i(53588),k=i(61273),C={name:"ImageUploadCropper",components:{ImageCropper:v.A,FontAwesomeIcon:k.gc},props:{initialImage:{type:String,default:null},type:{type:String,default:"user"},showButton:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},borderRadius:{type:Number,default:24},cropSize:{type:Number,default:.92},outputType:{type:String,default:"image/png"}},emits:["upload"],data(){return{imageData:null,imageFile:null,showCropper:!1,isCropping:!1,isCropperReady:!1}},mounted(){document.addEventListener("keydown",this.handleKeydown)},beforeUnmount(){document.removeEventListener("keydown",this.handleKeydown)},methods:{onFileChange(e){if(!e)return;this.$store.commit("setHideMobileNavbarTabs",!0),this.isCropperReady=!1;const t=new FileReader;t.onload=e=>{this.imageData=e.target.result,this.showCropper=!0},t.onerror=()=>{console.error("Failed to read file"),this.resetState()},t.readAsDataURL(e)},onCropperReady(){this.isCropperReady=!0},cropAndEmit(){const e=this.$refs.cropper;e&&(this.isCropping=!0,e.crop().then(e=>{this.$emit("upload",e),this.closeCropper()}).catch(e=>{console.error("Error during cropping:",e)}).finally(()=>{this.isCropping=!1}))},cancelCrop(){this.closeCropper()},closeCropper(){this.showCropper=!1,this.resetState(),this.$store.commit("setHideMobileNavbarTabs",!1)},handleKeydown(e){"Escape"===e.key&&this.showCropper&&this.cancelCrop()},clearFileInput(){if(this.$refs.uploadInput?.$el){const e=this.$refs.uploadInput.$el.querySelector('input[type="file"]');e&&(e.value="")}},resetState(){this.imageFile=null,this.imageData=null,this.isCropperReady=!1,this.clearFileInput()}}},L=i(66262);const w=(0,L.A)(C,[["render",y],["__scopeId","data-v-0308772b"]]);var _=w},10858:function(e,t,i){"use strict";i.d(t,{A:function(){return ee}});var s=i(20641),a=i(53751),n=i(90033);const o={key:0,class:"ea-splash-overlay"},l={class:"ea-splash-modal"},r=["aria-label"],d={class:"ea-splash-slides-wrapper"},c={class:"ea-splash-title"},u={class:"ea-splash-subtitle"},m={class:"ea-splash-welcome-grid"},p={class:"ea-splash-welcome-card"},h={class:"ea-splash-welcome-label"},g={class:"ea-splash-welcome-card"},f={class:"ea-splash-welcome-label"},b={class:"ea-splash-welcome-card"},y={class:"ea-splash-welcome-label"},v={class:"ea-splash-welcome-card"},k={class:"ea-splash-welcome-label"},C={class:"ea-splash-hint"},L={class:"ea-splash-title"},w={class:"ea-splash-subtitle"},_={class:"ea-splash-feature-block"},E={class:"ea-splash-agenda-mock"},$={class:"ea-splash-agenda-row is-highlighted"},F={class:"ea-splash-agenda-card"},T={class:"ea-splash-agenda-pill"},S={class:"ea-splash-hint"},A={class:"ea-splash-title"},P={class:"ea-splash-subtitle"},I={class:"ea-splash-people-grid"},M={class:"ea-splash-person-btn"},x={class:"ea-splash-hint"},N={class:"ea-splash-title"},U={class:"ea-splash-subtitle"},D={class:"ea-splash-hint"},X={class:"ea-splash-title"},V={class:"ea-splash-subtitle"},R={class:"ea-splash-badge-mock"},O={class:"ea-splash-badge-card"},Q={class:"ea-splash-badge-qr"},B={class:"ea-splash-hint"},G={class:"ea-splash-footer"},W={class:"ea-splash-dots"},j=["onClick"],z={class:"is-small ml-1"};function q(e,t,i,q,J,H){const K=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.Wv)(a.eB,{name:"ea-splash-fade"},{default:(0,s.k6)(()=>[J.visible?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[J.currentSlide>0?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"ea-splash-back","aria-label":e.$t("Back"),onClick:t[0]||(t[0]=e=>H.goToSlide(J.currentSlide-1))},[(0,s.bF)(K,{icon:"fa-light fa-chevron-left"})],8,r)):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"ea-splash-skip",onClick:t[1]||(t[1]=(...e)=>H.skip&&H.skip(...e))},(0,n.v_)(H.isLastSlide?e.$t("Got it"):e.$t("Skip")),1),(0,s.Lk)("div",d,[(0,s.bF)(a.eB,{name:J.slideDirection},{default:(0,s.k6)(()=>[((0,s.uX)(),(0,s.CE)("div",{key:J.currentSlide,class:"ea-splash-slide"},[0===J.currentSlide?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[t[3]||(t[3]=(0,s.Lk)("div",{class:"ea-splash-icon-row"},[(0,s.Lk)("span",{class:"ea-splash-emoji"},"ð")],-1)),(0,s.Lk)("h2",c,(0,n.v_)(e.$t("Welcome to your event hub")),1),(0,s.Lk)("p",u,(0,n.v_)(e.$t("Everything you need for the event in one place")),1),(0,s.Lk)("div",m,[(0,s.Lk)("div",p,[(0,s.bF)(K,{icon:"fa-light fa-calendar",class:"ea-splash-welcome-icon"}),(0,s.Lk)("div",h,(0,n.v_)(e.$t("Agenda")),1)]),(0,s.Lk)("div",g,[(0,s.bF)(K,{icon:"fa-light fa-user-group",class:"ea-splash-welcome-icon"}),(0,s.Lk)("div",f,(0,n.v_)(e.$t("Networking")),1)]),(0,s.Lk)("div",b,[(0,s.bF)(K,{icon:"fa-light fa-comments",class:"ea-splash-welcome-icon"}),(0,s.Lk)("div",y,(0,n.v_)(e.$t("Feed")),1)]),(0,s.Lk)("div",v,[(0,s.bF)(K,{icon:"fa-light fa-qrcode",class:"ea-splash-welcome-icon"}),(0,s.Lk)("div",k,(0,n.v_)(e.$t("Badge")),1)])]),(0,s.Lk)("p",C,[(0,s.bF)(K,{icon:"fa-light fa-circle-info",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Take a quick tour")),1)])],64)):(0,s.Q3)("",!0),1===J.currentSlide?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[t[9]||(t[9]=(0,s.Lk)("div",{class:"ea-splash-icon-row"},[(0,s.Lk)("span",{class:"ea-splash-emoji"},"ð
")],-1)),(0,s.Lk)("h2",L,(0,n.v_)(e.$t("Your schedule, at a glance")),1),(0,s.Lk)("p",w,(0,n.v_)(e.$t("Browse sessions, save the ones you want to attend, and never miss what is next")),1),(0,s.Lk)("div",_,[(0,s.Lk)("div",E,[t[7]||(t[7]=(0,s.Lk)("div",{class:"ea-splash-agenda-row"},[(0,s.Lk)("div",{class:"ea-splash-agenda-time"},"9:00"),(0,s.Lk)("div",{class:"ea-splash-agenda-card"},[(0,s.Lk)("div",{class:"ea-splash-agenda-title-line"}),(0,s.Lk)("div",{class:"ea-splash-agenda-meta-line"})])],-1)),(0,s.Lk)("div",$,[t[6]||(t[6]=(0,s.Lk)("div",{class:"ea-splash-agenda-time"},"10:30",-1)),(0,s.Lk)("div",F,[t[4]||(t[4]=(0,s.Lk)("div",{class:"ea-splash-agenda-title-line is-strong"},null,-1)),t[5]||(t[5]=(0,s.Lk)("div",{class:"ea-splash-agenda-meta-line is-strong"},null,-1)),(0,s.Lk)("div",T,[(0,s.bF)(K,{icon:"fa-light fa-bookmark-circle"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Saved")),1)])])]),t[8]||(t[8]=(0,s.Lk)("div",{class:"ea-splash-agenda-row"},[(0,s.Lk)("div",{class:"ea-splash-agenda-time"},"14:00"),(0,s.Lk)("div",{class:"ea-splash-agenda-card"},[(0,s.Lk)("div",{class:"ea-splash-agenda-title-line"}),(0,s.Lk)("div",{class:"ea-splash-agenda-meta-line"})])],-1))])]),(0,s.Lk)("p",S,[(0,s.bF)(K,{icon:"fa-light fa-bookmark",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Tap the bookmark on any session to save it")),1)])],64)):(0,s.Q3)("",!0),2===J.currentSlide?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[t[13]||(t[13]=(0,s.Lk)("div",{class:"ea-splash-icon-row"},[(0,s.Lk)("span",{class:"ea-splash-emoji"},"ð¤")],-1)),(0,s.Lk)("h2",A,(0,n.v_)(e.$t("Meet the people you came to meet")),1),(0,s.Lk)("p",P,(0,n.v_)(e.$t("See who is attending and book a 1:1 meeting in seconds")),1),(0,s.Lk)("div",I,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(4,i=>
1(0,s.Lk)("div",{key:"p-"+i,class:"ea-splash-person-card"},[t[10]||(t[10]=(0,s.Lk)("div",{class:"ea-splash-person-avatar"},null,-1)),t[11]||(t[11]=(0,s.Lk)("div",{class:"ea-splash-person-name-line"},null,-1)),t[12]||(t[12]=(0,s.Lk)("div",{class:"ea-splash-person-meta-line"},null,-1)),(0,s.Lk)("div",M,[(0,s.bF)(K,{icon:"fa-light fa-calendar-plus"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Book")),1)])])),64))]),(0,s.Lk)("p",x,[(0,s.bF)(K,{icon:"fa-light fa-lock",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("You control what others can see â edit your profile any time")),1)])],64)):(0,s.Q3)("",!0),3===J.currentSlide?((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[t[14]||(t[14]=(0,s.Lk)("div",{class:"ea-splash-icon-row"},[(0,s.Lk)("span",{class:"ea-splash-emoji"},"ð¬")],-1)),(0,s.Lk)("h2",N,(0,n.v_)(e.$t("Stay in the loop")),1),(0,s.Lk)("p",U,(0,n.v_)(e.$t("Catch announcements, share moments, and keep up with the buzz")),1),t[15]||(t[15]=(0,s.Lk)("div",{class:"ea-splash-feed-mock"},[(0,s.Lk)("div",{class:"ea-splash-feed-post"},[(0,s.Lk)("div",{class:"ea-splash-feed-avatar"}),(0,s.Lk)("div",{class:"ea-splash-feed-body"},[(0,s.Lk)("div",{class:"ea-splash-feed-line is-long"}),(0,s.Lk)("div",{class:"ea-splash-feed-line is-medium"}),(0,s.Lk)("div",{class:"ea-splash-feed-reactions"},[(0,s.Lk)("span",{class:"ea-splash-feed-emoji"},"ð"),(0,s.Lk)("span",{class:"ea-splash-feed-emoji"},"â¤ï¸"),(0,s.Lk)("span",{class:"ea-splash-feed-count"},"12")])])]),(0,s.Lk)("div",{class:"ea-splash-feed-post"},[(0,s.Lk)("div",{class:"ea-splash-feed-avatar"}),(0,s.Lk)("div",{class:"ea-splash-feed-body"},[(0,s.Lk)("div",{class:"ea-splash-feed-line is-medium"}),(0,s.Lk)("div",{class:"ea-splash-feed-line is-short"})])])],-1)),(0,s.Lk)("p",D,[(0,s.bF)(K,{icon:"fa-light fa-circle-info",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Updates from organisers and attendees, all in one stream")),1)])],64)):(0,s.Q3)("",!0),4===J.currentSlide?((0,s.uX)(),(0,s.CE)(s.FK,{key:4},[t[19]||(t[19]=(0,s.Lk)("div",{class:"ea-splash-icon-row"},[(0,s.Lk)("span",{class:"ea-splash-emoji"},"ðªª")],-1)),(0,s.Lk)("h2",X,(0,n.v_)(e.$t("My Badge")),1),(0,s.Lk)("p",V,(0,n.v_)(e.$t("Show it at check-in and to swap contacts with other attendees")),1),(0,s.Lk)("div",R,[(0,s.Lk)("div",O,[t[16]||(t[16]=(0,s.Lk)("div",{class:"ea-splash-badge-avatar"},null,-1)),t[17]||(t[17]=(0,s.Lk)("div",{class:"ea-splash-badge-name-line"},null,-1)),t[18]||(t[18]=(0,s.Lk)("div",{class:"ea-splash-badge-role-line"},null,-1)),(0,s.Lk)("div",Q,[(0,s.bF)(K,{icon:"fa-light fa-qrcode"})])])]),(0,s.Lk)("p",B,[(0,s.bF)(K,{icon:"fa-light fa-qrcode",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Tap âMy Badgeâ at the top of any tab to open it")),1)])],64)):(0,s.Q3)("",!0)]))]),_:1},8,["name"])]),(0,s.Lk)("div",G,[(0,s.Lk)("div",W,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(H.totalSlides,e=>((0,s.uX)(),(0,s.CE)("span",{key:e,class:(0,n.C4)(["ea-splash-dot",{"is-active":J.currentSlide===e-1}]),onClick:t=>H.goToSlide(e-1)},null,10,j))),128))]),(0,s.Lk)("button",{class:"button is-primary is-rounded ea-splash-next-btn",onClick:t[2]||(t[2]=(...e)=>H.next&&H.next(...e))},[(0,s.eW)((0,n.v_)(H.isLastSlide?e.$t("Go to profile"):e.$t("Next"))+" ",1),(0,s.Lk)("span",z,[(0,s.bF)(K,{icon:H.isLastSlide?"fa-light fa-user-pen":"fa-light fa-arrow-right"},null,8,["icon"])])])])])])):(0,s.Q3)("",!0)]),_:1})}var J=i(40834),H=i(43464),K={name:"EventAppOnboardingSplash",emits:["go-to-profile"],data(){return{visible:!1,currentSlide:0,slideDirection:"ea-slide-left",isDismissing:!1}},computed:{...(0,J.L8)(["user"]),totalSlides(){return 5},isLastSlide(){return this.currentSlide===this.totalSlides-1}},mounted(){setTimeout(()=>{this.visible=!0},1500)},methods:{next(){if(this.isLastSlide)return this.dismiss(),void this.$emit("go-to-profile");this.slideDirection="ea-slide-left",this.currentSlide++},goToSlide(e){this.slideDirection=e>this.currentSlide?"ea-slide-left":"ea-slide-right",this.currentSlide=e},skip(){this.dismiss()},dismiss(){this.isDismissing||(this.isDismissing=!0,this.visible=!1,this.user&&H.M.commit("setCurrentUser",{...this.user,prefEventAppOnboardingSeen:!0}),this.$http.plain.patch("/event-app/profile-update",{prefEventAppOnboardingSeen:!0},{headers:{"Content-Type":"application/merge-patch+json"}}).catch(e=>{console.log(e)}))}}},Y=i(66262);const Z=(0,Y.A)(K,[["render",q],["__scopeId","data-v-a4f5daa4"]]);var ee=Z},10997:function(e,t,i){"use strict";i.d(t,{A:function(){return _}});var s=i(20641),a=i(90033);const n={key:0,class:"event-map-section"},o={class:"has-text-weight-semibold mb-1 has-text-grey is-size-7 is-uppercase"},l={class:"event-map-container"},r=["href"],d=["src","alt"],c={class:"static-map-overlay"},u={class:"icon"},m=["href"],p={class:"icon"},h={class:"event-map-embed"},g=["src"],f=["href"],b={class:"icon is-small"};function y(e,t,i,y,v,k){const C=(0,s.g2)("font-awesome-icon");return i.placeLatitude&&i.placeLongitude?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("p",o,(0,a.v_)(e.$t("Location")),1),t[2]||(t[2]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),(0,s.Lk)("div",l,[e.isNativeApp&&i.placesApiId&&!v.staticImageFailed?((0,s.uX)(),(0,s.CE)("a",{key:0,href:k.mapsUrl,target:"_blank",rel:"noopener noreferrer",class:"static-map-link"},[(0,s.Lk)("img",{src:k.staticMapUrl,alt:e.$t("Location"),class:"static-map-image",onError:t[0]||(t[0]=e=>v.staticImageFailed=!0)},null,40,d),(0,s.Lk)("div",c,[(0,s.Lk)("span",u,[(0,s.bF)(C,{icon:"fa-light fa-up-right-from-square"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Open in Maps")),1)])],8,r)):e.isNativeApp?((0,s.uX)(),(0,s.CE)("a",{key:1,href:k.mapsUrl,target:"_blank",rel:"noopener noreferrer",class:"open-maps-button"},[(0,s.Lk)("span",p,[(0,s.bF)(C,{icon:"fa-light fa-map-location-dot"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Open in Maps")),1)],8,m)):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("div",h,[(0,s.Lk)("iframe",{src:k.mapEmbedUrl,width:"100%",height:"200",style:{border:"0"},allowfullscreen:"",loading:"lazy",referrerpolicy:"no-referrer-when-downgrade",sandbox:"allow-scripts allow-same-origin"},null,8,g)]),t[1]||(t[1]=(0,s.Lk)("div",{class:"google-link-cover"},null,-1)),(0,s.Lk)("a",{href:k.mapsUrl,target:"_blank",rel:"noopener noreferrer",class:"view-larger-link"},[(0,s.Lk)("span",b,[(0,s.bF)(C,{icon:"fa-light fa-up-right-from-square"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("View larger map")),1)],8,f)],64))])])):(0,s.Q3)("",!0)}var v=i(40834),k=i(28782),C={name:"EventMapPreview",props:{placeLatitude:{type:[String,Number],default:null},placeLongitude:{type:[String,Number],default:null},placesApiId:{type:String,default:null}},data(){return{staticImageFailed:!1}},computed:{...(0,v.L8)(["isNativeApp"]),mapEmbedUrl(){const e=this.placeLatitude,t=this.placeLongitude;return`https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3000!2d${t}!3d${e}!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2s${e}%2C${t}!5e0!3m2!1sen!2s!4v1`},mapsUrl(){return`https://www.google.com/maps/search/?api=1&query=${this.placeLatitude},${this.placeLongitude}`},staticMapUrl(){return this.placesApiId?k.ze+k.DJ+"places_api/"+this.placesApiId+".png":""}}},L=i(66262);const w=(0,L.A)(C,[["render",y],["__scopeId","data-v-d040d1b6"]]);var _=w},12258:function(e,t,i){"use strict";i.d(t,{x:function(){return s}});const s={methods:{isTicketCurrentlyValid(e){if(e.isArchived)return!1;const t=new Date,i=e.validFrom?new Date(e.validFrom):null,s=e.validTo?new Date(e.validTo):null,a=!i||t>=i,n=!s||t<=s;return a&&n},isTicketUpcoming(e){return!e.isArchived&&(!!e.validFrom&&new Date<new Date(e.validFrom))},isTicketExpired(e){return!e.isArchived&&(!!e.validTo&&new Date>new Date(e.validTo))}}}},12409:function(e,t,i){"use strict";i.d(t,{A:function(){return g}});var s=i(20641),a=i(90033);const n={class:"avatar-with-progress"},o=["width","height","viewBox"],l=["d","stroke-width"],r=["d","stroke","stroke-width"],d={class:"progress-number"};function c(e,t,i,c,u,m){const p=(0,s.g2)("LogoThumbnail");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.bF)(p,{item:i.item,"is-type":i.isType,"empty-image":i.emptyImage,"is-inline":i.isInline},null,8,["item","is-type","empty-image","is-inline"]),m.showBadge?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["progress-badge",m.badgeSizeClass])},[((0,s.uX)(),(0,s.CE)("svg",{width:m.badgeSize,height:m.badgeSize,viewBox:`0 0 ${m.badgeSize} ${m.badgeSize}`},[(0,s.Lk)("path",{d:m.arcPath(100),fill:"none",stroke:"var(--bulma-border)","stroke-width":m.strokeWidth},null,8,l),(0,s.Lk)("path",{d:m.arcPath(i.progress),fill:"none",stroke:m.progressColor,"stroke-width":m.strokeWidth,"stroke-linecap":"round"},null,8,r)],8,o)),(0,s.Lk)("span",d,(0,a.v_)(i.progress),1)],2)):(0,s.Q3)("",!0)])}var u=i(31823),m={components:{LogoThumbnail:u.A},props:{item:{type:Object,required:!0},isType:{type:String,default:"roundMedium"},emptyImage:{type:String,default:null},isInline:{type:Boolean,default:!1},progress:{type:Number,default:0}},computed:{showBadge(){return this.progress<100},badgeSize(){const e={roundXSmall:20,roundSmaller:22,roundSmall:28,roundXMedium:34,roundMedium:44,roundLarge:56};return e[this.isType]||40},badgeSizeClass(){return"badge-"+this.isType},strokeWidth(){return this.badgeSize>=44?4:this.badgeSize>=28?3:2.5},progressColor(){return this.progress>=75?"var(--bulma-success)":this.progress>=50?"var(--bulma-warning)":"var(--bulma-primary)"}},methods:{arcPath(e){const t=(this.badgeSize-this.strokeWidth)/2,i=this.badgeSize/2,s=this.badgeSize/2;if(0===e)return"";const a=e/100*360,n=a*Math.PI/180,o=i,l=s-t;if(e>=100)return`M ${o} ${l} A ${t} ${t} 0 1 1 ${i} ${s+t} A ${t} ${t} 0 1 1 ${o} ${l}`;const r=i+t*Math.sin(n),d=s-t*Math.cos(n),c=a>180?1:0;return`M ${o} ${l} A ${t} ${t} 0 ${c} 1 ${r} ${d}`}}},p=i(66262);const h=(0,p.A)(m,[["render",c],["__scopeId","data-v-41eb5764"]]);var g=h},14470:function(e,t,i){"use strict";i.d(t,{JQ:function(){return o},Rb:function(){return d},es:function(){return l},jf:function(){return u},pV:function(){return c},pt:function(){return r}});i(14603),i(47566),i(98721);var s=i(61486);const a="orgo:website-origin",n="website",o={Login:"/login",Register:"/register",RegisterNewsletter:"/register-newsletter",Adhesion:"/adhesion"};function l(e){if("string"!==typeof e||!e.trim())return null;const t=e.trim();if(/^[/\\]{2}/.test(t))return null;if(t.startsWith("/"))return t;try{const e=new URL(t,window.location.origin);return e.origin===window.location.origin?e.pathname+e.search+e.hash:null}catch{return null}}function r(e){try{const t=e?.query?.[n];if("string"===typeof t&&t.startsWith("https://"))return void window.sessionStorage.setItem(a,t);"website"===e?.meta?.layout?window.sessionStorage.setItem(a,e.fullPath):e?.meta?.anonymous||window.sessionStorage.removeItem(a)}catch{}}function d(){try{return window.sessionStorage.getItem(a)||null}catch{return null}}function c(e,t,i=null){const s=o[t];if(!s)return null;const a=String(e||"").trim().toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,""),l=a&&a.includes(".")?`https://${a}${s}`:s;return i?`${l}?${n}=${encodeURIComponent(i)}`:l}function u(e,t=null){if("string"!==typeof e||!e.trim())return null;let i;try{i=new URL(e.trim())}catch{return null}if("https:"!==i.protocol)return null;const a=i.hostname.toLowerCase();if("undefined"!==typeof window&&a===window.location.hostname.toLowerCase())return null;const n=String(t?.websiteHost||"").trim().toLowerCase();return n&&a===n||t?.slug&&(0,s.zk)(a)===String(t.slug).toLowerCase()?i.toString():null}},14977:function(e,t,i){"use strict";i.d(t,{A:function(){return x}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"invite-section"},l={key:0},r={key:1},d={class:"mt-4"},c=["disabled"],u={class:"guest-tickets-section mt-5 pt-4"},m={class:"icon is-small"},p={key:0,class:"tag is-rounded is-small is-primary is-light ml-2"},h={key:0,class:"mt-3"},g={class:"is-size-7 has-text-grey"};function f(e,t,i,f,b,y){const v=(0,s.g2)("b-loading"),k=(0,s.g2)("PillTabs"),C=(0,s.g2)("UserSearchAutocomplete"),L=(0,s.g2)("b-input"),w=(0,s.g2)("b-field"),_=(0,s.g2)("font-awesome-icon"),E=(0,s.g2)("b-numberinput");return(0,s.uX)(),(0,s.CE)("section",o,[(0,s.bF)(v,{modelValue:b.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>b.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,s.bF)(k,{modelValue:b.inviteType,"onUpdate:modelValue":t[1]||(t[1]=e=>b.inviteType=e),tabs:y.inviteTabs,class:"mb-4"},null,8,["modelValue","tabs"]),"member"===b.inviteType?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.bF)(C,{"show-local-center-filter-option":!1,label:e.$t("Search member"),"include-minors":!0,"is-rounded":!1,"onUpdate:modelValue":t[2]||(t[2]=e=>y.inviteUser(e))},null,8,["label"])])):(0,s.Q3)("",!0),"external"===b.inviteType?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.bF)(w,{label:e.$t("name")},{default:(0,s.k6)(()=>[(0,s.bF)(L,{modelValue:b.name,"onUpdate:modelValue":t[3]||(t[3]=e=>b.name=e),type:"text",placeholder:e.$t("name")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(w,{label:"Email"},{default:(0,s.k6)(()=>[(0,s.bF)(L,{modelValue:b.email,"onUpdate:modelValue":t[4]||(t[4]=e=>b.email=e),type:"email",placeholder:"Email",required:"",onKeyup:t[5]||(t[5]=(0,a.jR
1)(e=>y.isValidEmail&&y.inviteExternal(),["enter"]))},null,8,["modelValue"])]),_:1}),(0,s.Lk)("p",d,[(0,s.Lk)("button",{disabled:b.isLoading||!y.isValidEmail,class:"button is-primary is-rounded is-fullwidth",onClick:t[6]||(t[6]=(...e)=>y.inviteExternal&&y.inviteExternal(...e))},(0,n.v_)(e.$t("send")),9,c)])])):(0,s.Q3)("",!0),(0,s.Lk)("div",u,[(0,s.Lk)("a",{class:"guest-tickets-toggle",onClick:t[7]||(t[7]=e=>b.showGuestTickets=!b.showGuestTickets)},[(0,s.Lk)("span",m,[(0,s.bF)(_,{icon:b.showGuestTickets?"fa-light fa-chevron-down":"fa-light fa-chevron-right"},null,8,["icon"])]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Guest tickets")),1),b.guestTicketQuantity>0?((0,s.uX)(),(0,s.CE)("span",p,(0,n.v_)(b.guestTicketQuantity),1)):(0,s.Q3)("",!0)]),b.showGuestTickets?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.bF)(w,null,{default:(0,s.k6)(()=>[(0,s.bF)(E,{modelValue:b.guestTicketQuantity,"onUpdate:modelValue":t[8]||(t[8]=e=>b.guestTicketQuantity=e),min:0,max:20,"controls-rounded":"",type:"is-primary"},null,8,["modelValue"])]),_:1}),(0,s.Lk)("p",g,(0,n.v_)(e.$t("Additional guest tickets sent to the invitee via email. Set to 0 for no guest tickets.")),1)])):(0,s.Q3)("",!0)])])}var b=i(95439);const y={ref:"wrapper",class:"pill-tabs-wrapper"},v={ref:"scroller",class:"pill-tabs-scroller"},k={ref:"ul"},C=["onClick"],L={key:0,class:"icon is-small pill-tab-icon"},w={key:1,class:"pill-tab-badge"},_={ref:"indicator",class:"pill-tabs-indicator"};function E(e,t,i,a,o,l){const r=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("div",v,[(0,s.Lk)("ul",k,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.tabs,e=>((0,s.uX)(),(0,s.CE)("li",{key:e.key,class:(0,n.C4)({"is-active":i.modelValue===e.key}),onClick:t=>l.onTabClick(e.key,t)},[(0,s.Lk)("a",null,[e.icon?((0,s.uX)(),(0,s.CE)("span",L,[(0,s.bF)(r,{icon:e.icon},null,8,["icon"])])):(0,s.Q3)("",!0),(0,s.Lk)("span",null,(0,n.v_)(e.label),1),e.badge?((0,s.uX)(),(0,s.CE)("span",w,(0,n.v_)(e.badge),1)):(0,s.Q3)("",!0)])],10,C))),128))],512),(0,s.Lk)("div",_,null,512)],512)],512)}const $="pillTabPositions";var F={name:"PillTabs",props:{tabs:{type:Array,required:!0},modelValue:{type:[String,Number],default:null},pillId:{type:String,default:null}},emits:["update:modelValue"],data(){return{animatingUntil:0,resizeObserver:null,initialized:!1}},watch:{modelValue(){this.$nextTick(()=>this.slide(!0))}},mounted(){this.$nextTick(()=>this.init())},beforeUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.savePosition()},methods:{onTabClick(e,t){this.$emit("update:modelValue",e);const i=t.target.closest("li"),s=this.$refs.scroller;i&&s&&this.$nextTick(()=>{const e=s.getBoundingClientRect(),t=i.getBoundingClientRect(),a=t.left+t.width/2,n=e.left+e.width/2,o=a-n;s.scrollBy({left:o,behavior:"smooth"})})},init(){const e=this.$refs.ul,t=this.$refs.indicator;if(!e||!t)return;const i=this.loadPosition();i?(t.style.transition="none",t.style.opacity="1",t.style.transform=`translateX(${i.left}px)`,t.style.width=`${i.width}px`,t.dataset.left=String(i.left),t.dataset.width=String(i.width),t.offsetHeight,this.initialized=!0,requestAnimationFrame(()=>this.slide(!0))):(this.positionImmediate(),this.initialized=!0),this.resizeObserver=new ResizeObserver(()=>{Date.now()<this.animatingUntil||this.positionImmediate()}),this.resizeObserver.observe(e)},slide(e){const t=this.$refs.ul,i=this.$refs.indicator;if(!t||!i)return;const s=t.querySelector("li.is-active");if(!s)return void(i.style.opacity="0");const a=t.getBoundingClientRect(),n=s.getBoundingClientRect(),o=Math.round(n.left-a.left+t.scrollLeft),l=Math.round(n.width);String(o)===i.dataset.left&&String(l)===i.dataset.width||(e&&void 0!==i.dataset.left&&this.initialized?(i.style.transition="transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)",this.animatingUntil=Date.now()+350):i.style.transition="none",i.style.opacity="1",i.style.transform=`translateX(${o}px)`,i.style.width=`${l}px`,i.dataset.left=String(o),i.dataset.width=String(l))},positionImmediate(){const e=this.$refs.ul,t=this.$refs.indicator;if(!e||!t)return;const i=e.querySelector("li.is-active");if(!i)return void(t.style.opacity="0");t.style.transition="none";const s=e.getBoundingClientRect(),a=i.getBoundingClientRect(),n=Math.round(a.left-s.left+e.scrollLeft),o=Math.round(a.width);t.style.opacity="1",t.style.transform=`translateX(${n}px)`,t.style.width=`${o}px`,t.dataset.left=String(n),t.dataset.width=String(o)},savePosition(){if(!this.pillId)return;const e=this.$refs.indicator;if(e&&e.dataset.left)try{const t=sessionStorage.getItem($),i=t?JSON.parse(t):{};i[this.pillId]={left:e.dataset.left,width:e.dataset.width},sessionStorage.setItem($,JSON.stringify(i))}catch(t){console.error(t)}},loadPosition(){if(!this.pillId)return null;try{const e=sessionStorage.getItem($);return e&&JSON.parse(e)[this.pillId]||null}catch(e){return console.error(e),null}}}},T=i(66262);const S=(0,T.A)(F,[["render",E],["__scopeId","data-v-52789fc4"]]);var A=S,P=i(40834),I={name:"EventUserInvite",props:["eventUuid","eventId"],data(){return{invites:[],users:[],selectedUser:null,email:"",name:"",inviteType:"member",isLoading:!1,totalInvites:null,eventIRI:null,guestTicketQuantity:0,showGuestTickets:!1}},mounted(){this.eventIRI="/api/v1/events/"+(this.eventId||this.$route.params.item)},methods:{handleInviteSuccess(e){if(e.data?.id){const t={};return this.guestTicketQuantity>0&&(t.guestTicketQuantity=this.guestTicketQuantity),this.$http.plain.post("/event_attends/"+e.data.id+"/confirm",t).then(e=>{this.$emit("submit-complete");const t=e.data?.guestTicketCount||0,i=t>0?this.$t("Attendance confirmed and ticket sent")+" + "+t+" "+this.$t("guest tickets"):this.$t("Attendance confirmed and ticket sent");this.$buefy.snackbar.open({type:"is-success",message:i})})}this.$emit("submit-complete"),this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})},inviteUser(e){e&&(this.isLoading=!0,this.$http.plain.post("/event_attends",{event:this.eventIRI,user:e["@id"],status:2,isInvited:!0,skipEmail:!0}).then(e=>this.handleInviteSuccess(e)).catch(e=>{console.error(e);const t=e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("An error occurred");
1this.$buefy.toast.open({type:"is-danger",message:t})}).finally(()=>{this.isLoading=!1}))},inviteExternal(){if(this.email&&this.eventIRI){this.isLoading=!0;let e={event:this.eventUuid,isInvited:1,status:2,email:this.email};this.$http.plain.post("/event_attend_invite_external",{entity:e,name:this.name,skipEmail:!0}).then(e=>(this.email=null,this.name=null,this.handleInviteSuccess(e))).catch(e=>{console.error(e);const t=e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("An error occurred");this.$buefy.toast.open({type:"is-danger",message:t})}).finally(()=>{this.isLoading=!1})}}},computed:{...(0,P.L8)(["isGranted","user","tenant"]),inviteTabs(){return[{key:"member",label:this.$t("member"),icon:"fa-light fa-user"},{key:"external",label:this.$t("External"),icon:"fa-light fa-envelope"}]},isValidEmail(){const e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.test(this.email)}},components:{UserSearchAutocomplete:b.A,PillTabs:A}};const M=(0,T.A)(I,[["render",f],["__scopeId","data-v-6e68eed0"]]);var x=M},15083:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});i(44114);var s=i(20641),a=i(90033);const n={key:0,class:"tag is-rounded is-success is-passive"},o={key:1,class:"tag is-rounded is-danger is-passive"},l={key:2,class:"tag is-rounded is-danger is-passive"},r={key:3,class:"tag is-rounded is-warning is-passive"},d={key:5},c={class:"tag is-warning is-passive is-rounded is-small"},u={key:0,class:"tag is-info is-passive is-rounded"};function m(e,t,i,m,p,h){const g=(0,s.g2)("font-awesome-icon"),f=(0,s.g2)("router-link");return i.payment.identity&&i.payment.identity.isValidated?((0,s.uX)(),(0,s.CE)("span",n,[(0,s.bF)(f,{to:{name:"ValidateIdentityAdmin",params:{item:i.payment.identity.id}},target:"_blank"},{default:(0,s.k6)(()=>[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("validated")),1)]),_:1},8,["to"])])):i.payment.identity&&"rejected"===i.payment.identity.status?((0,s.uX)(),(0,s.CE)("span",o,[(0,s.bF)(f,{to:{name:"ValidateIdentityAdmin",params:{item:i.payment.identity.id}},target:"_blank"},{default:(0,s.k6)(()=>[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("rejected")),1)]),_:1},8,["to"]),i.payment?.uid?((0,s.uX)(),(0,s.Wv)(f,{key:0,to:{name:"ValidateIdentityByUserOnPayment",params:{payment:i.payment.uid}},class:"ml-2",target:"_blank"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("link")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)])):i.payment.identity&&"pending"===i.payment.identity.status?((0,s.uX)(),(0,s.CE)("span",l,[(0,s.bF)(f,{to:{name:"ValidateIdentityAdmin",params:{item:i.payment.identity.id}},target:"_blank"},{default:(0,s.k6)(()=>[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("pending")),1)]),_:1},8,["to"]),i.payment?.uid?((0,s.uX)(),(0,s.Wv)(f,{key:0,to:{name:"ValidateIdentityByUserOnPayment",params:{payment:i.payment.uid}},class:"ml-2",target:"_blank"},{default:(0,s.k6)(()=>[(0,s.eW)(" | "+(0,a.v_)(e.$t("link")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)])):i.payment.identity&&"system_validated"===i.payment.identity.status?((0,s.uX)(),(0,s.CE)("span",r,[(0,s.bF)(f,{to:{name:"ValidateIdentityAdmin",params:{item:i.payment.identity.id}},target:"_blank"},{default:(0,s.k6)(()=>[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Orgo validated")),1)]),_:1},8,["to"])])):i.payment.identity&&i.payment.identity.status?((0,s.uX)(),(0,s.CE)("a",{key:4,class:"tag is-small is-primary is-passive is-rounded",target:"_blank",onClick:t[0]||(t[0]=t=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:i.payment.identity.id}}))},[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(i.payment.identity.status),1)])):i.payment.identity?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",d,[(0,s.Lk)("span",c,[h.submitUid?((0,s.uX)(),(0,s.Wv)(f,{key:0,to:{name:"ValidateIdentityByUserOnPayment",params:{payment:h.submitUid}},target:"_blank"},{default:(0,s.k6)(()=>[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("identity not submitted")),1)]),_:1},8,["to"])):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(g,{icon:"fa-light fa-user",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("identity not submitted")),1)],64))]),i.payment.identityReminderSent?((0,s.uX)(),(0,s.CE)("span",u,(0,a.v_)(i.payment.identityReminder3Sent?e.$t("reminded")+e.$t(" x3"):i.payment.identityReminder2Sent?e.$t("reminded")+e.$t(" x2"):e.$t("reminded")),1)):(0,s.Q3)("",!0)]))}var p={name:"PaymentIdentityTag",props:{payment:{type:Object,required:!0}},computed:{submitUid(){return this.payment?.uid??this.payment.subscriptionProfile?.uid??null}}},h=i(66262);const g=(0,h.A)(p,[["render",m]]);var f=g},15770:function(e,t,i){"use strict";i.d(t,{A:function(){return T}});var s=i(20641),a=i(90033),n=i(53751);const o={ref:"pillContainer",class:"list-filter-pill"},l={class:"pill-label"},r={class:"pill-label"},d={class:"pill-value"},c={class:"pill-label"},u={class:"pill-dropdown-header"},m={class:"pill-dropdown-body is-not-scrollable"},p={class:"pill-dropdown-input-row"},h=["placeholder"],g={key:0,class:"pill-autocomplete-loading"},f=["onClick"],b={class:"ml-2 is-size-7"},y={key:1,class:"pill-dropdown-empty"},v={key:1,class:"pill-dropdown-apply"};function k(e,t,i,k,C,L){const w=(0,s.g2)("font-awesome-icon"),_=(0,s.g2)("b-loading"),E=(0,s.g2)("LogoThumbnail");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":L.hasSelection}]),onClick:t[2]||(t[2]=(0,n.D$)(e=>
1"toggle"===i.type?L.toggleValue():L.toggleDropdown(),["stop"]))},[L.hasSelection&&"toggle"===i.type?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>L.clearSelection&&L.clearSelection(...e),["stop"]))},[(0,s.bF)(w,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",l,(0,a.v_)(e.displayLabel),1)],64)):L.hasSelection?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[1]||(t[1]=(0,n.D$)((...e)=>L.clearSelection&&L.clearSelection(...e),["stop"]))},[(0,s.bF)(w,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",r,(0,a.v_)(e.displayLabel),1),t[8]||(t[8]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",d,(0,a.v_)(L.selectedDisplayValue),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.bF)(w,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",c,(0,a.v_)(e.displayLabel),1)],64))],2),(0,s.bo)((0,s.Lk)("div",{ref:"dropdown",class:(0,a.C4)(["pill-dropdown",{"is-align-right":L.isAlignedRight}])},[(0,s.Lk)("div",u,(0,a.v_)(i.filterTitle||e.displayLabel),1),(0,s.Lk)("div",m,[(0,s.Lk)("div",p,[(0,s.bo)((0,s.Lk)("input",{ref:"textInput","onUpdate:modelValue":t[3]||(t[3]=e=>C.inputValue=e),class:"input is-small",placeholder:i.placeholder,onClick:t[4]||(t[4]=(0,n.D$)(()=>{},["stop"])),onKeyup:t[5]||(t[5]=(0,n.jR)((...e)=>L.applyText&&L.applyText(...e),["enter"])),onInput:t[6]||(t[6]=(...e)=>L.onInputChange&&L.onInputChange(...e))},null,40,h),[[n.Jo,C.inputValue]])]),"autocomplete"===i.type?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[i.isSearching?((0,s.uX)(),(0,s.CE)("div",g,[(0,s.bF)(_,{"is-full-page":!1,"model-value":!0})])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.searchResults,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"pill-option",onClick:(0,n.D$)(t=>L.selectResult(e),["stop"])},[(0,s.bF)(E,{item:e,"is-type":"roundXSmall"},null,8,["item"]),(0,s.Lk)("span",b,(0,a.v_)(e.fullName),1)],8,f))),128)),!i.isSearching&&C.inputValue.length>=3&&0===i.searchResults.length?((0,s.uX)(),(0,s.CE)("div",y,(0,a.v_)(e.$t("noResults")),1)):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0),"text"===i.type?((0,s.uX)(),(0,s.CE)("div",v,[(0,s.Lk)("button",{class:"button is-small is-primary is-rounded is-fullwidth",onClick:t[7]||(t[7]=(0,n.D$)((...e)=>L.applyText&&L.applyText(...e),["stop"]))},(0,a.v_)(e.$t("apply")),1)])):(0,s.Q3)("",!0)])],2),[[n.aG,C.isOpen&&"toggle"!==i.type]])],512)}var C=i(31823),L=i(37440),w=i(46093),_=i(28906),E={name:"ListFilterPillText",components:{LogoThumbnail:C.A},mixins:[_.A],props:{label:{type:String,required:!0},modelValue:{type:[String,Object],default:null},type:{type:String,default:"text"},displayValue:{type:String,default:null},filterTitle:{type:String,default:null},placeholder:{type:String,default:""},align:{type:String,default:"left"},initialOpen:{type:Boolean,default:!1},searchResults:{type:Array,default:()=>[]},isSearching:{type:Boolean,default:!1}},emits:["update:modelValue","open","search"],data(){return{isOpen:!1,inputValue:"",flipped:!1}},computed:{isAlignedRight(){return"right"===this.align||this.flipped},hasSelection(){return null!==this.modelValue&&void 0!==this.modelValue&&""!==this.modelValue},selectedDisplayValue(){return this.displayValue?this.displayValue:"string"===typeof this.modelValue?this.modelValue:this.modelValue&&this.modelValue.fullName?this.modelValue.fullName:""}},mounted(){document.addEventListener("click",this.onClickOutside),this.unregisterPill=(0,L.f)(this.close),this.initialOpen&&this.$nextTick(()=>{(0,L.r)(this.close),this.isOpen=!0,this.$emit("open"),this.$nextTick(()=>{this.$refs.textInput&&this.$refs.textInput.focus()})})},beforeUnmount(){document.removeEventListener("click",this.onClickOutside),this.unregisterPill&&this.unregisterPill()},methods:{toggleValue(){(0,L.r)(this.close),this.hasSelection?this.$emit("update:modelValue",null):this.$emit("update:modelValue",this.label)},toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&((0,L.r)(this.close),(0,w.Mj)(this),this.inputValue="string"===typeof this.modelValue?this.modelValue:"",this.$emit("open"),this.$nextTick(()=>{this.$refs.textInput&&this.$refs.textInput.focus()}))},open(){this.isOpen||"toggle"===this.type||this.toggleDropdown()},close(){this.isOpen=!1},applyText(){this.inputValue.trim()&&this.$emit("update:modelValue",this.inputValue.trim()),this.isOpen=!1},selectResult(e){this.$emit("update:modelValue",e),this.isOpen=!1},clearSelection(){this.$emit("update:modelValue",null),this.isOpen=!1},onInputChange(){"autocomplete"===this.type&&this.$emit("search",this.inputValue)},onClickOutside(e){this.isOpen&&this.$refs.pillContainer&&!this.$refs.pillContainer.contains(e.target)&&(this.isOpen=!1)}}},$=i(66262);const F=(0,$.A)(E,[["render",k]]);var T=F},16104:function(e,t,i){"use strict";i.d(t,{e:function(){return o}});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const s=new Set(["video/mp4","video/webm","video/ogg","video/quicktime"]),a=new Set(["mp4","m4v","mov","webm","ogv","ogg"]);function n(e){if("string"!==typeof e)return null;const t=e.lastIndexOf(".");return t<0||t===e.length-1?null:e.slice(t+1).toLowerCase()}function o(e,t){const i="string"===typeof e&&e.startsWith("video/"),o="string"===typeof e&&("application/octet-stream"
1===e||""===e),l=!i&&(o||null===e||void 0===e);if(i&&s.has(e.toLowerCase()))return!0;if(l||i){const e=n(t);if(e&&a.has(e))return!0}return!1}},16430:function(e,t,i){"use strict";i.d(t,{A:function(){return b}});var s=i(20641),a=i(90033);const n=["poster","preload"],o=["src"];function l(e,t,i,l,r,d){const c=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["orgo-player","orgo-player--"+i.layout])},[(0,s.Lk)("video",{ref:"videoEl",playsinline:"",poster:i.poster||void 0,preload:d.preload},[(0,s.Lk)("source",{src:i.src,type:"video/mp4"},null,8,o),(0,s.eW)(" "+(0,a.v_)(e.$t("videoNotSupported")),1)],8,n),r.flashIcon?((0,s.uX)(),(0,s.CE)("div",{key:r.flashIcon,class:(0,a.C4)(["orgo-player__flash","orgo-player__flash--"+r.flashIcon])},[(0,s.bF)(c,{icon:"fa-light fa-"+r.flashIcon},null,8,["icon"])],2)):(0,s.Q3)("",!0)],2)}var r=i(10592),d=i(37107),c=i(49456),u=i(95256);const m=1e3,p={app:["play","progress","current-time","duration","mute","volume","captions","settings","fullscreen"],embed:["play-large","progress","current-time","duration","mute","volume","captions","settings","fullscreen"]};var h={name:"DriveVideoPlayer",props:{src:{type:String,required:!0},poster:{type:String,default:null},autoplay:{type:Boolean,default:!1},brandLink:{type:Boolean,default:!1},brandLogoUrl:{type:String,default:null},brandName:{type:String,default:null},layout:{type:String,default:"app"},shareUrl:{type:String,default:null}},data(){return{player:null,flashIcon:null,hasStarted:!1}},computed:{preload(){return this.autoplay?"auto":"metadata"}},created(){this.bottomRow=null,this.volumeEl=null,this.flashTimer=null,this.copyFeedbackEl=null,this.copyFeedbackTimer=null},mounted(){this.player=new r.A(this.$refs.videoEl,{controls:p[this.layout]||p.app,settings:["speed"],speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2]},autoplay:this.autoplay,ratio:"16:9",fullscreen:{enabled:!0,fallback:!0,iosNative:!0}}),this.player.on("ready",this.setupControls),"app"===this.layout&&(this.player.on("play",this.onPlayerPlay),this.player.on("pause",this.onPlayerPause))},beforeUnmount(){clearTimeout(this.flashTimer),clearTimeout(this.copyFeedbackTimer),document.removeEventListener("click",this.onDocumentClick,!0),this.player&&(this.player.destroy(),this.player=null)},methods:{setupControls(){this.arrangeControls(),this.brandLink&&this.injectBrandLink(),"embed"===this.layout&&this.shareUrl&&this.injectCopyLink(),this.bindVolumeExpand()},arrangeControls(){const e=this.player?.elements?.controls;if(!e||e.querySelector(".plyr-orgo-row"))return;const t=t=>e.querySelector(t),i=e=>{const t=document.createElement("div");return t.className=e,t},s=(e,t)=>t&&e.appendChild(t),a=t(".plyr__progress__container"),n=t(".plyr__time--current"),o=t(".plyr__time--duration"),l=t(".plyr__volume"),r=t('[data-plyr="captions"]'),d=t(".plyr__menu"),c=t('[data-plyr="fullscreen"]');if("embed"===this.layout){const t=i("plyr-orgo-row plyr-orgo-row--top");s(t,l),s(t,r),s(t,d);const u=i("plyr-orgo-row plyr-orgo-row--meta"),m=i("plyr-orgo-time");s(m,n),s(m,o),u.appendChild(m),s(u,c);const p=i("plyr-orgo-row plyr-orgo-row--bottom");e.insertBefore(t,e.firstChild),e.appendChild(u),s(e,a),e.appendChild(p),this.bottomRow=p}else{const u=i("plyr-orgo-row plyr-orgo-row--bar"),m=i("plyr-orgo-group plyr-orgo-group--left"),p=i("plyr-orgo-group plyr-orgo-group--right");s(m,t('[data-plyr="play"]')),s(m,l),s(m,n),s(m,o),s(p,r),s(p,d),s(p,c),u.appendChild(m),u.appendChild(p),s(e,a),e.appendChild(u)}},injectBrandLink(){const e=this.player?.elements?.controls;if(!e||e.querySelector(".plyr-orgo-brand"))return;const t=!!this.brandLogoUrl,i=t?this.shareUrl:"https://orgo.space",s=t?this.brandName||"":"Orgo",a=document.createElement("a");a.className="plyr-orgo-brand"+(t?" plyr-orgo-brand--tenant":""),i&&(a.href=i,a.target="_blank",a.rel="noopener"),a.title=s;const n=document.createElement("img");n.src=t?this.brandLogoUrl:"/img/orgo-white-text.svg",n.alt=s,a.appendChild(n),(this.bottomRow||e).appendChild(a)},injectCopyLink(){const e=this.bottomRow;if(!e||e.querySelector(".plyr-orgo-copylink"))return;const t=document.createElement("button");t.type="button",t.className="plyr__control plyr-orgo-copylink",t.title=this.$t("Copy link"),t.setAttribute("aria-label",this.$t("Copy link")),t.innerHTML=(0,d.Kk)(c.CQO).html[0],t.addEventListener("click",this.copyShareLink);const i=document.createElement("span");i.className="plyr-orgo-copylink-feedback",i.textContent=this.$t("urlCopiedToClipboard"),this.copyFeedbackEl=i,e.insertBefore(t,e.firstChild),t.after(i)},copyShareLink(){(0,u.lW)(this.shareUrl);const e=this.copyFeedbackEl;e&&(e.classList.add("is-visible"),clearTimeout(this.copyFeedbackTimer),this.copyFeedbackTimer=setTimeout(()=>{e.classList.remove("is-visible")},2e3))},bindVolumeExpand(){const e=this.player?.elements?.controls?.querySelector(".plyr__volume");e&&e!==this.volumeEl&&(this.volumeEl=e,e.addEventListener("click",this.onVolumeClick,!0),document.addEventListener("click",this.onDocumentClick,!0))},onVolumeClick(e){this.volumeEl.classList.contains("plyr-orgo-volume-expanded")||e.target.closest('[data-plyr="mute"]')&&(e.preventDefault(),e.stopPropagation(),this.volumeEl.classList.add("plyr-orgo-volume-expanded"))},onDocumentClick(e){this.volumeEl&&!this.volumeEl.contains(e.target)&&this.volumeEl.classList.remove("plyr-orgo-volume-expanded")},onPlayerPlay(){!this.hasStarted&&(this.hasStarted=!0,this.autoplay)||this.show
1Flash("play")},onPlayerPause(){this.showFlash("pause")},showFlash(e){this.flashIcon=e,clearTimeout(this.flashTimer),this.flashTimer=setTimeout(()=>{this.flashIcon=null},m)}}},g=i(66262);const f=(0,g.A)(h,[["render",l]]);var b=f},17048:function(e,t,i){"use strict";i.d(t,{A:function(){return x}});var s=i(20641),a=i(90033);const n={key:0,class:"map-loading-spinner"},o={class:"icon is-small"};function l(e,t,i,l,r,d){const c=(0,s.g2)("l-tile-layer"),u=(0,s.g2)("l-marker"),m=(0,s.g2)("l-map"),p=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("section",{class:"user-map-root",style:(0,a.Tr)(i.fillHeight?"position: relative; height: 100%":"position: relative")},[i.isMapView?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["card",{"is-fill-height":i.fillHeight}]),style:(0,a.Tr)(i.fillHeight?"height: 100%; width: 100%":"height: 750px; width: 100%")},[i.loading?((0,s.uX)(),(0,s.CE)("div",n,[...t[1]||(t[1]=[(0,s.Lk)("div",{class:"spinner-small"},null,-1)])])):(0,s.Q3)("",!0),(0,s.bF)(m,{ref:"map",class:"vue2leafmap",options:d.mapOptions,onReady:d.onMapReady,onZoom:d.onZoomChange,onMoveend:d.onMapMove},{default:(0,s.k6)(()=>[(0,s.bF)(c,{url:d.tileUrl,attribution:d.attribution},null,8,["url","attribution"]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(d.displayMarkers,e=>((0,s.uX)(),(0,s.Wv)(u,{key:e.markerKey,"lat-lng":[e.lat,e.lng],icon:d.createCustomIcon(e),"z-index-offset":e.count,onClick:t=>d.onMarkerClick(e),onMouseover:t=>d.onMarkerHover(e,t),onMouseout:d.onMarkerLeave},null,8,["lat-lng","icon","z-index-offset","onClick","onMouseover","onMouseout"]))),128))]),_:1},8,["options","onReady","onZoom","onMoveend"]),e.hoverPreview&&e.$slots["hover-preview"]?((0,s.uX)(),(0,s.CE)("div",{key:1,class:"map-hover-preview",style:(0,a.Tr)(e.hoverPreviewStyle)},[(0,s.RG)(e.$slots,"hover-preview",{marker:e.hoverPreview.marker},void 0,!0)],4)):(0,s.Q3)("",!0),d.canGoBack?((0,s.uX)(),(0,s.CE)("button",{key:2,class:"map-back-button button is-small",type:"button",onClick:t[0]||(t[0]=t=>e.$emit("region-back"))},[(0,s.Lk)("span",o,[(0,s.bF)(p,{icon:"fa-light fa-chevron-left"})]),(0,s.Lk)("span",null,(0,a.v_)(i.backLabel),1)])):(0,s.Q3)("",!0)],6)):(0,s.Q3)("",!0)],4)}i(44114),i(18111),i(22489),i(7588),i(61701),i(18237),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var r=i(40834),d=i(38221),c=i.n(d),u=i(53481),m=i.n(u),p=i(18249),h=i(37024),g=i(91071),f=i(68061),b=i(28782),y=i(41183),v=i(55657),k=i(66261);const C={1:32,2:32,3:38},L=46,w={32:12,38:13,46:14},_="hsl(var(--bulma-primary-h), var(--bulma-primary-s), 58%)",E="hsl(var(--bulma-primary-h), var(--bulma-primary-s), 44%)",$=36,F=26,T=10,S=44,A=150;delete m().Icon.Default.prototype._getIconUrl,m().Icon.Default.mergeOptions({iconRetinaUrl:p,iconUrl:h,shadowUrl:g});var P={mixins:[k.A],props:{isMapView:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},selectedCluster:{type:Object,default:null},loading:{type:Boolean,default:!1},isPaginationChange:{type:Boolean,default:!1},fillHeight:{type:Boolean,default:!1},entityFolder:{type:String,default:"user"},level:{type:String,default:y.OC},regions:{type:Array,default:()=>[]},regionGeoJson:{type:Object,default:null},regionBounds:{type:Object,default:null},backLabel:{type:String,default:""}},emits:["bounds-changed","cluster-clicked","region-clicked","region-back","regions-unmatched","fitting-bounds","clear-selection","marker-hover","marker-leave"],data(){return{regionLayer:null,regionShapes:{},currentZoom:6,currentCenter:null,zoomPreventionTimeout:null,initialLoadDone:!1,userHasInteracted:!1,mapInitialized:!1}},computed:{...(0,r.L8)(["user","tenant"]),mapOptions(){return v.Yp},zoom(){return this.tenant?.country?.mapZoom||6},center(){const[e,t]=String(this.tenant?.country?.geoLatLong||"").split(",");return m().latLng(parseFloat(e)||0,parseFloat(t)||0)},clusteredMarkers(){if(!this.items||!Array.isArray(this.items))return[];const e=this.items.map(e=>({lat:e.lat,lng:e.lng,count:e.count,users:e.users||[],clusterLat:e.clusterLat,clusterLng:e.clusterLng,clusterPrecision:e.clusterPrecision,markerKey:`c-${e.clusterLat}-${e.clusterLng}`}));return e.sort((e,t)=>
1e.count-t.count)},isRegionLevel(){return(0,y.tY)(this.level)},basemap(){return(0,v.l0)(this.isRegionLevel?v.zV:v.x8)},tileUrl(){return this.basemap.url},attribution(){return this.basemap.attribution},regionMarkers(){return this.regions.filter(e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)).map(e=>({lat:e.lat,lng:e.lng,count:e.count,users:e.users||[],region:e,markerKey:`r-${this.level}-${e.id}`})).sort((e,t)=>e.count-t.count)},displayMarkers(){return this.isRegionLevel?this.regionMarkers:this.clusteredMarkers},canGoBack(){return!!this.backLabel},singlePinCount(){return this.displayMarkers.filter(e=>1===(e.count||0)).length},regionIndex(){return(0,y.yS)(this.regions)}},watch:{isMapView(e){e&&(this.initialLoadDone=!1,this.userHasInteracted=!1,this.$nextTick(()=>{this.invalidateMapSize()}))},loading(e){e?(this.zoomPreventionTimeout&&(clearTimeout(this.zoomPreventionTimeout),this.zoomPreventionTimeout=null),this.attachGlobalZoomPrevention()):this.zoomPreventionTimeout=setTimeout(()=>{this.detachGlobalZoomPrevention()},500)},regionGeoJson(){this.drawRegionLayer()},regions(){this.drawRegionLayer()},level(e){(0,y.tY)(e)||(this.clearRegionLayer(),this.releaseZoomClamp())},regionBounds(e){e&&this.fitRegionBounds(e)}},mounted(){this.currentZoom=this.zoom,this.currentCenter=this.center,this.debouncedEmitBounds=c()(()=>{this.emitBoundsChanged()},400),this.debouncedInvalidateSize=c()(()=>{this.invalidateMapSize()},200),window.addEventListener("resize",this.debouncedInvalidateSize)},beforeUnmount(){this.zoomPreventionTimeout&&clearTimeout(this.zoomPreventionTimeout),window.removeEventListener("resize",this.debouncedInvalidateSize),this.detachGlobalZoomPrevention(),this.clearRegionLayer()},methods:{attachGlobalZoomPrevention(){document.body.style.touchAction="none",document.documentElement.style.touchAction="none",document.addEventListener("wheel",this.preventAllZoom,{passive:!1,capture:!0}),document.addEventListener("gesturestart",this.preventAllZoom,{capture:!0}),document.addEventListener("gesturechange",this.preventAllZoom,{capture:!0}),document.addEventListener("gestureend",this.preventAllZoom,{capture:!0}),window.addEventListener("gesturestart",this.preventAllZoom,{capture:!0}),window.addEventListener("gesturechange",this.preventAllZoom,{capture:!0}),window.addEventListener("gestureend",this.preventAllZoom,{capture:!0})},detachGlobalZoomPrevention(){document.body.style.touchAction="",document.documentElement.style.touchAction="",document.removeEventListener("wheel",this.preventAllZoom,{capture:!0}),document.removeEventListener("gesturestart",this.preventAllZoom,{capture:!0}),document.removeEventListener("gesturechange",this.preventAllZoom,{capture:!0}),document.removeEventListener("gestureend",this.preventAllZoom,{capture:!0}),window.removeEventListener("gesturestart",this.preventAllZoom,{capture:!0}),window.removeEventListener("gesturechange",this.preventAllZoom,{capture:!0}),window.removeEventListener("gestureend",this.preventAllZoom,{capture:!0})},preventAllZoom(e){const t=this.$refs.map?.leafletObject?.getContainer();if(!(t&&e.target instanceof Node&&t.contains(e.target)))return e.ctrlKey||e.type.startsWith("gesture")?(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!1):void 0},onMapReady(){if(!this.mapInitialized&&this.$refs.map?.leafletObject){const e=this.$refs.map.leafletObject;(0,v.i0)(e,this.tenant)||e.setView(this.center,this.zoom),(0,v.c_)(e),this.mapInitialized=!0,this.$nextTick(()=>{if(this.isRegionLevel)return this.drawRegionLayer(),void(this.regionBounds&&this.fitRegionBounds(this.regionBounds));this.emitBoundsChanged()})}},invalidateMapSize(){const e=this.$refs.map?.leafletObject;e&&e.invalidateSize()},onMarkerClick(e){e.region?this.$emit("region-clicked",e.region,this.regionShapes[String(e.region.id)]||null):this.$emit("cluster-clicked",e)},onMarkerHover(e,t){1===(e.count||0)&&e.users?.length?(this.openHoverPreview(e,t,this.$refs.map?.leafletObject),this.hoverPreview&&this.$emit("marker-hover",e)):this.onMarkerLeave()},onMarkerLeave(){this.closeHoverPreview()&&this.$emit("marker-leave")},clearRegionLayer(){const e=this.$refs.map?.leafletObject;this.regionLayer&&e&&(this.regionLayer.clearLayers(),e.removeLayer(this.regionLayer)),this.regionLayer=null,this.regionShapes={}},drawRegionLayer(){const e=this.$refs.map?.leafletObject;if(!e)return;if(this.clearRegionLayer(),!this.isRegionLevel||!this.regionGeoJson)return;const t=this.regionIndex,i=this.regions.reduce((e,t)=>
1Math.max(e,t.count||0),0),s=[];this.regionLayer=m().geoJson(this.regionGeoJson,{style:e=>{const s=(0,y.ql)(e,t);return{fillColor:s?this.getRegionFill(s.count,i):"transparent",fillOpacity:s?.55:.05,weight:1,color:_,opacity:s?.5:.35,smoothFactor:0,lineJoin:"round",lineCap:"round"}},onEachFeature:(e,i)=>{const s=(0,y.ql)(e,t),a=e?.properties?.name||s?.name||"";s?(this.regionShapes[String(s.id)]=i.getBounds(),i.on({click:()=>this.$emit("region-clicked",s,i.getBounds()),mouseover:e=>{e.target.setStyle({weight:1.5,opacity:1,color:E,fillOpacity:.68}),e.target.bringToFront()},mouseout:e=>this.regionLayer?.resetStyle(e.target)}),i.bindTooltip(`<span class="map-region-tooltip-name">${a}</span>\n <span class="map-region-tooltip-count">${s.count}</span>`,{className:"map-region-tooltip",sticky:!0})):i.bindTooltip(`<span class="map-region-tooltip-name">${a}</span>`,{className:"map-region-tooltip",sticky:!0})}}),this.regionLayer.addTo(e);const a=this.regionGeoJson.features||[],n=new Set;a.forEach(e=>{const i=(0,y.ql)(e,t);i&&n.add(i.id)}),this.regions.forEach(e=>{n.has(e.id)||s.push(e)}),s.length&&this.$emit("regions-unmatched",s)},getRegionFill(e,t){const i=t>0?Math.min(1,(e||0)/t):0,s=Math.round(78-32*i);return`hsl(var(--bulma-primary-h), var(--bulma-primary-s), ${s}%)`},fitRegionBounds(e){const t=this.$refs.map?.leafletObject;if(!t||!e)return;const i=[[e.south,e.west],[e.north,e.east]];this.releaseZoomClamp(),t.invalidateSize(),(0,v.cc)(t,i,v.om);const s=t.getZoom();t.setMinZoom(Math.max(1,s-y.eY)),t.setMaxZoom(s+(0,y.AI)(this.level))},zoomForBounds(e){const t=this.$refs.map?.leafletObject;return t&&e?t.getBoundsZoom([[e.south,e.west],[e.north,e.east]]):null},releaseZoomClamp(){const e=this.$refs.map?.leafletObject;e&&(e.setMinZoom(1),e.setMaxZoom(18))},enterClusterView(e){const t=this.$refs.map?.leafletObject;if(!t)return null;if(this.releaseZoomClamp(),this.clearRegionLayer(),e&&e.isValid&&e.isValid()){const i=e.pad(.05);t.fitBounds(i,{animate:!1});const s=Math.min(t.getZoom(),T);return{bounds:{north:i.getNorth(),south:i.getSouth(),east:i.getEast(),west:i.getWest()},zoom:s}}const i=t.getBounds();return{bounds:{north:i.getNorth(),south:i.getSouth(),east:i.getEast(),west:i.getWest()},zoom:t.getZoom()}},onZoomChange(e){const t=e.target.getZoom();this.currentZoom=t,this.userHasInteracted=!0,this.debouncedEmitBounds()},onMapMove(e){if(this.onMarkerLeave(),e.target){const t=e.target.getCenter();this.currentCenter=m().latLng(t.lat,t.lng)}this.userHasInteracted=!0,this.debouncedEmitBounds()},emitBoundsChanged(){if(!this.$refs.map||!this.$refs.map.leafletObject)return;if(this.isPaginationChange)return;if(this.isRegionLevel)return;const e=this.$refs.map.leafletObject,t=e.getBounds(),i=e.getZoom();this.currentZoom=i,this.$emit("bounds-changed",{north:t.getNorth(),south:t.getSouth(),east:t.getEast(),west:t.getWest()},i)},fitBoundsToActual(e){if(!this.$refs.map||!this.$refs.map.leafletObject||!e)return;if(this.isRegionLevel)return;const t=this.$refs.map.leafletObject;if(!e.north||!e.south||!e.east||!e.west)return;const i=[[e.south,e.west],[e.north,e.east]];t.fitBounds(i,{padding:[30,30],maxZoom:9})},isClusterSelected(e){return!!this.selectedCluster&&(e.clusterLat===this.selectedCluster.clusterLat&&e.clusterLng===this.selectedCluster.clusterLng)},calculatePinSize(e){const t=String(e).length;return C[t]||L},getClusterColor(e){const t=Math.min(1,Math.log10(Math.max(1,e))/Math.log10(1e3)),i=Math.round(45-11*t),s=(.72+.16*t).toFixed(2);return`hsla(var(--bulma-primary-h), var(--bulma-primary-s), ${i}%, ${s})`},createCustomIcon(e){const t=e.count||e.users?.length||0,i=this.isClusterSelected(e),s=this.getClusterColor(t),a=1===t,n=a&&e.users?.[0]?e.users[0]:null,o=n&&n.logo&&!n.privacy?.image,l=o&&this.singlePinCount<=A;if(l){const e=this.isRegionLevel?F:$;let t=n.logo;t="demo_f"===n.logo?"https://randomuser.me/api/portraits/women/"+n.id%100+".jpg":"demo_m"===n.logo?"https://randomuser.me/api/portraits/men/"+n.id%100+".jpg":b.ze+b.DJ+this.entityFolder+"/"+t;const a=Math.max(S,e),o="user"===this.entityFolder?"":" is-contained",l=`\n <div class="map-marker-hitbox" style="width:${a}px;height:${a}px;">\n <div class="map-marker-photo${o}${i?" is-selected":""}" style="\n width:${e}px;\n height:${e}px;\n box-shadow: 0 0 0 2px ${s}, 0 2px 8px rgba(0,0,0,0.28);\n ">\n <img\n src="${t}"\n loading="lazy"\n alt=""\n onerror="this.style.display='none'" />\n </div>\n </div>\n `;return m().divIcon({html:l,className:"custom-marker-profile",iconSize:[a,a],iconAnchor:[a/2,a/2]})}const r=this.calculatePinSize(t),d=w[r],c=Math.max(S,r),u=`\n <div class="map-marker-hitbox" style="width:${c}px;height:${c}px;">\n <div class="map-marker-bubble${i?" is-selected":""}" style="\n background-color: ${s};\n width: ${r}px;\n height: ${r}px;\n font-size: ${d}px;\n ">${t}</div>\n </div>\n `;return m().divIcon({html:u,className:"custom-marker-cluster",iconSize:[c,c],iconAnchor:[c/2,c/2]})}},components:{LMap:f.Do,LTileLayer:f.a,LMarker:f.li}},I=i(66262);const M=(0,I.A)(P,[["render",l],["__scopeId","data-v-1be7bcc8"]]);var x=M},18024:function(e,t){"use strict";t.A={props:{section:{type:Object,required:!0},device:{type:String,default:"desktop"},editable:{type:Boolean,default:!1},variant:{type:String,default:"main"},mobileMode:{type:String,default:null}},data(){return{items:[],isLoading:!1,hasLoaded:!1}},computed:{configuration(){return this.section.configuration||{}},isCarousel(){return"mobile"===this.device&&"carousel"===this.mobileMode},isPlaceholder(){return!0===this.section.placeholder},isPending(){return this.isPlaceholder||this.isLoading},visibleItems(){return this.items},showsShell(){return this.visibleItems.length>0||this.editable||this.isPending},showsStub(){return!this.visibleItems.length&&(this.editable||this.isPending)}},emits:[],watch:{isPlaceholder(e){e||this.editable||this.loadOnce()}},mounted(){this.editable||this.isPlaceholder||this.loadOnce()},methods:{loadOnce(){this.hasLoaded||(this.hasLoaded=!0,this.fetch())},request(e,t){this.isLoading=!0,this.$http.plain.get(e).then(e=>{this.items=t(e.data)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},hydraMembers(e){return e["hydra:member"]||e.member||[]}}}},18256:function(e,t,i){"use strict";i.d(t,{A:function(){return F}});var s=i(20641),a=i(90033),n=i(53751);const o={key:0,class:"is-size-5 mb-4 has-text-weight-bold has-text-dark"},l={class:"user-tag-name"},r=["onClick"],d={class:"icon is-small"},c={class:"mt-2"},u={class:"tags-input-row"},m={class:"has-text-grey has-text-centered py-1 is-size-7"},p={key:0}
1,h={key:0},g={key:1},f={key:0},b={key:1},y={class:"icon is-small"};function v(e,t,i,v,k,C){const L=(0,s.g2)("font-awesome-icon"),w=(0,s.g2)("b-taginput"),_=(0,s.g2)("b-field"),E=(0,s.g2)("b-button");return i.item.id?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(i.compact?"":i.isUser?"card p-5":"pl-0")},[i.isUser&&!i.compact?((0,s.uX)(),(0,s.CE)("p",o,(0,a.v_)(e.$t("Tags")),1)):(0,s.Q3)("",!0),i.item.tags?.length>0||!k.showAdd?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["user-tags-list",i.compact?"mt-2":"mt-3"])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)((i.item.tags||[]).slice(0,k.itemsDisplayed),e=>((0,s.uX)(),(0,s.CE)("span",{key:e.id,class:"user-tag-chip"},[(0,s.Lk)("span",l,(0,a.v_)(e.tag.name),1),(0,s.Lk)("span",{class:"user-tag-remove",onClick:t=>C.removeTag(e)},[(0,s.bF)(L,{icon:"fa-light fa-xmark"})],8,r)]))),128)),i.item.tags?.length>k.itemsDisplayed?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"user-tag-chip user-tag-more",onClick:t[0]||(t[0]=e=>k.itemsDisplayed+=k.itemsDisplayedScale)},(0,a.v_)(e.$t("Show more")),1)):(0,s.Q3)("",!0),k.showAdd?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("a",{key:1,class:"icon-text has-text-primary is-size-7",onClick:t[1]||(t[1]=(...e)=>C.openSearchTags&&C.openSearchTags(...e))},[(0,s.Lk)("span",d,[(0,s.bF)(L,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Add tags")),1)]))],2)):(0,s.Q3)("",!0),(0,s.bo)((0,s.Lk)("div",c,[(0,s.Lk)("div",u,[(0,s.bF)(_,{class:"tags-input-field mb-0"},{default:(0,s.k6)(()=>[(0,s.bF)(w,{ref:"searchTag",modelValue:C.selectedTagsModel,"onUpdate:modelValue":t[2]||(t[2]=e=>C.selectedTagsModel=e),data:k.filteredTags,field:"name",autocomplete:"",size:"is-small",loading:k.isLoadingTags,placeholder:e.$t("Search tags")+"...","allow-new":C.canCreateTags,"create-tag":C.createNewTag,"open-on-focus":!1,"close-type":"is-white",onTyping:C.searchTags,onKeydown:(0,n.jR)(C.onEnterKey,["native","enter"])},{empty:(0,s.k6)(()=>[(0,s.Lk)("div",m,[k.searchQuery?((0,s.uX)(),(0,s.CE)("div",p,[C.isTagAlreadyAssigned(k.searchQuery)?((0,s.uX)(),(0,s.CE)("div",h,(0,a.v_)(e.$t("Tag already assigned")),1)):((0,s.uX)(),(0,s.CE)("div",g,[(0,s.eW)((0,a.v_)(e.$t("No tags found"))+" ",1),C.canCreateTags?((0,s.uX)(),(0,s.CE)("div",f,(0,a.v_)(e.$t("Press ENTER to create the new tag")),1)):(0,s.Q3)("",!0)]))])):((0,s.uX)(),(0,s.CE)("div",b,(0,a.v_)(e.$t("Start typing to search")),1))])]),_:1},8,["modelValue","data","loading","placeholder","allow-new","create-tag","onTyping","onKeydown"])]),_:1}),(0,s.bF)(E,{type:"is-primary is-rounded is-small",onClick:C.submitTags},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Save")),1)]),_:1},8,["onClick"]),(0,s.Lk)("a",{class:"has-text-grey is-size-7",onClick:t[3]||(t[3]=e=>{k.showAdd=!1,k.selectedTags=[]})},[(0,s.Lk)("span",y,[(0,s.bF)(L,{icon:"fa-light fa-xmark"})])])])],512),[[n.aG,k.showAdd]])],2)):(0,s.Q3)("",!0)}i(44114),i(18111),i(22489),i(7588),i(61701),i(13579);var k=i(40834),C=i(61273),L=i(38221),w=i.n(L),_={components:{FontAwesomeIcon:C.gc},props:["item","isUser","compact"],data(){return{searchQuery:"",availableTags:[],filteredTags:[],isLoadingTags:!1,selectedTags:[],showAdd:!1,itemsDisplayed:5,itemsDisplayedScale:5}},methods:{openSearchTags(){this.showAdd=!0,this.$refs.searchTag&&this.$refs.searchTag.focus()},onEnterKey(){!this.searchQuery&&this.selectedTags.length>0&&this.submitTags()},isTagAlreadyAssigned(e){return!!e&&this.item.tags?.some(t=>t.tag?.name?.toLowerCase()===e.toLowerCase())},createNewTag(e){return"object"===typeof e&&null!==e?e:this.filteredTags.length>0||this.isTagAlreadyAssigned(e)?void 0:e},searchTags:w()(function(e){this.searchQuery=e,!e||e.length<2?this.filteredTags=[]:(this.isLoadingTags=!0,this.$http.plain.get("/tags",{params:{name:e}}).then(e=>{const t=e.data["hydra:member"]||[],i=this.item.tags?.map(e=>e.tag?.["@id"])||[],s=this.selectedTags.map(e=>e["@id"]).filter(Boolean);this.filteredTags=t.filter(e=>!i.includes(e["@id"])&&!s.includes(e["@id"]))}).catch(e=>{console.error("Error searching tags:",e),this.filteredTags=[]}).finally(()=>{this.isLoadingTags=!1}))},300),removeTag(e){this.$http.plain.delete("profile_tags/"+e.id).then(t=>{const i=this.item.tags?.findIndex(t=>t.id===e.id);-1!==i&&this.item.tags?.splice(i,1),this.saveSuccess(t)}).catch(e=>console.error(e))},submitTags(){const e=(new Date).toISOString(),t=this.$refs.searchTag,i=t?.newTag?.trim();if(i){const e=this.createNewTag(i);e&&this.selectedTags.push(e),t.newTag=""}if(0===this.selectedTags.length)return void(this.showAdd=!1);const s=this.selectedTags.filter(e=>"string"===typeof e),a=this.selectedTags.filter(e=>"object"===typeof e&&null!==e),n=s.map(e=>this.$http.plain.post("/tags",{name:e}).then(e=>e.data).catch(t=>{console.error("Error creating tag:",t,e);const i=t.response?.data?.["hydra:description"]||t.response?.data?.detail;return this.$buefy.snackbar.open({type:"is-danger",message:i||`${this.$t("Error creating tag")}: ${e}`,duration:6e3,position:"is-top"}),null}));Promise.all(n).then(t=>{const i=t.filter(e=>null!==e),s=[...a,...i];if(0===s.length)return void(this.selectedTags=[]);const n=s.map(t=>({tag:t["@id"],contact:this.isUser?null:this.item["@id"],user:this.isUser?this.item["@id"]:null,createdAt:e}));let o=0;
1n.forEach((e,t)=>{const i=s[t];this.$http.plain.post("/profile_tags",e).then(e=>{const t=e.data;t.tag={"@id":i["@id"],name:i.name,id:i.id},this.item.tags||(this.item.tags=[]),this.item.tags.push(t),o++,o===n.length&&(this.saveSuccess(e),this.showAdd=!1)}).catch(e=>console.error(e))}),this.selectedTags=[]})},saveSuccess(e){this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})}},computed:{...(0,k.L8)(["user","tenant","isGranted"]),selectedTagsModel:{get(){return this.selectedTags},set(e){this.selectedTags=e.filter(e=>null!==e&&void 0!==e&&(("string"!==typeof e||!this.isTagAlreadyAssigned(e))&&("object"!==typeof e||!e["@id"]||!this.item.tags?.some(t=>t.tag?.["@id"]===e["@id"]))))}},canCreateTags(){return this.isGranted("ADMIN_TENANT")||this.isGranted("HR_TENANT")}}},E=i(66262);const $=(0,E.A)(_,[["render",v],["__scopeId","data-v-60722997"]]);var F=$},19318:function(e,t,i){"use strict";i.d(t,{A:function(){return u}});var s=i(20641),a=i(90033);const n=["viewBox","fill","stroke","stroke-width","innerHTML"];function o(e,t,i,o,l,r){return r.icon?((0,s.uX)(),(0,s.CE)("svg",{key:0,class:(0,a.C4)(["o-w-icon",{"o-w-icon--brand":!r.icon.stroke}]),viewBox:r.icon.viewBox,fill:r.icon.stroke?"none":"currentColor",stroke:r.icon.stroke?"currentColor":null,"stroke-width":r.icon.stroke?1.5:null,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",innerHTML:r.icon.body},null,10,n)):(0,s.Q3)("",!0)}const l={"arrow-right":{viewBox:"0 0 24 24",body:'<path d="M5 12h14" /> <path d="m12 5 7 7-7 7" />',stroke:!0},bars:{viewBox:"0 0 24 24",body:'<path d="M4 5h16" /> <path d="M4 12h16" /> <path d="M4 19h16" />',stroke:!0},"chevron-down":{viewBox:"0 0 24 24",body:'<path d="m6 9 6 6 6-6" />',stroke:!0},"circle-check":{viewBox:"0 0 24 24",body:'<circle cx="12" cy="12" r="10" /> <path d="m9 12 2 2 4-4" />',stroke:!0},clock:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="12" r="10" /> <path d="M12 6v6l4 2" />',stroke:!0},envelope:{viewBox:"0 0 24 24",body:'<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" /> <rect x="2" y="4" width="20" height="16" rx="2" />',stroke:!0},image:{viewBox:"0 0 24 24",body:'<rect width="18" height="18" x="3" y="3" rx="2" ry="2" /> <circle cx="9" cy="9" r="2" /> <path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />',stroke:!0},"location-dot":{viewBox:"0 0 24 24",body:'<path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" /> <circle cx="12" cy="10" r="3" />',stroke:!0},plus:{viewBox:"0 0 24 24",body:'<path d="M5 12h14" /> <path d="M12 5v14" />',stroke:!0},trash:{viewBox:"0 0 24 24",body:'<path d="M10 11v6" /> <path d="M14 11v6" /> <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" /> <path d="M3 6h18" /> <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />',stroke:!0},video:{viewBox:"0 0 24 24",body:'<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /> <rect x="2" y="6" width="14" height="12" rx="2" />',stroke:!0},xmark:{viewBox:"0 0 24 24",body:'<path d="M18 6 6 18" /> <path d="m6 6 12 12" />',stroke:!0},seedling:{viewBox:"0 0 24 24",body:'<path d="M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3" /> <path d="M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4" /> <path d="M5 21h14" />',stroke:!0},"earth-europe":{viewBox:"0 0 24 24",body:'<path d="M21.54 15H17a2 2 0 0 0-2 2v4.54" /> <path d="M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17" /> <path d="M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05" /> <circle cx="12" cy="12" r="10" />',stroke:!0},"people-group":{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /> <path d="M16 3.128a4 4 0 0 1 0 7.744" /> <path d="M22 21v-2a4 4 0 0 0-3-3.87" /> <circle cx="9" cy="7" r="4" />',stroke:!0},"hand-holding-heart":{viewBox:"0 0 24 24",body:'<path d="M11 14h2a2 2 0 0 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16" /> <path d="m14.45 13.39 5.05-4.694C20.196 8 21 6.85 21 5.75a2.75 2.75 0 0 0-4.797-1.837.276.276 0 0 1-.406 0A2.75 2.75 0 0 0 11 5.75c0 1.2.802 2.248 1.5 2.946L16 11.95" /> <path d="m2 15 6 6" /> <path d="m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a1 1 0 0 0-2.75-2.91" />',stroke:!0},heart:{viewBox:"0 0 24 24",body:'<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" />',stroke:!0},"graduation-cap":{viewBox:"0 0 24 24",body:'<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /> <path d="M22 10v6" /> <path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" />',stroke:!0},"book-open":{viewBox:"0 0 24 24",body:'<path d="M12 5v16" /> <path d="M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z" />',stroke:!0},lightbulb:{viewBox:"0 0 24 24",body:'<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" /> <path d="M9 18h6" /> <path d="M10 22h4" />',stroke:!0},"scale-balanced":{viewBox:"0 0 24 24",body:'<path d="M12 3v18" /> <path d="m19 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1" /> <path d="m5 8 3 8a5 5 0 0 1-6 0zV7" /> <path d="M7 21h10" />',stroke:!0},landmark:{viewBox:"0 0 24 24",body:'<path d="M10 18v-7" /> <path d="M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z" /> <path d="M14 18v-7" /> <path d="M18 18v-7" /> <path d="M3 22h18" /> <path d="M6 18v-7" />',stroke:!0},bullhorn:{viewBox:"0 0 24 24",body:'<path d="M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z" /> <path d="M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14" /> <path d="M8 6v8" />',stroke:!0},handshake:{viewBox:"0 0 24 24",body:'<path d="m11 17 2 2a1 1 0 1 0 3-3" /> <path d="m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4" /> <path d="m21 3 1 11h-2" /> <path d="M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3" /> <path d="M3 4h8" />',stroke:!0},"shield-check":{viewBox:"0 0 24 24",body:'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" /> <path d="m9 12 2 2 4-4" />',stroke:!0},leaf:{viewBox:"0 0 24 24",body:'<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z" /> <path d="M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12" />',stroke:!0},recycle:{viewBox:"0 0 24 24",body:'<path d="M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5" /> <path d="M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12" /> <path d="m14 16-3 3 3 3" /> <path d="M8.293 13.596 7.196 9.5 3.1 10.598" /> <path d="m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843" /> <path d="m13.378 9.633 4.096 1.098 1.097-4.096" />',stroke:!0},tree:{viewBox:"0 0 24 24",body:'<path d="M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z" /> <path d="M7 16v6" /> <path d="M13 19v3" /> <path d="M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5" />',stroke:!0},users:{viewBox:"0 0 24 24",body:'<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /> <path d="M16 3.128a4 4 0 0 1 0 7.744" /> <path d="M22 21v-2a4 4 0 0 0-3-3.87" /> <circle cx="9" cy="7" r="4" />',stroke:!0},"user-group":{viewBox:"0 0 24 24",body:'<path d="M18 21a8 8 0 0 0-16 0" /> <circle cx="10" cy="8" r="5" /> <path d="M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3" />',stroke:!0},"calendar-days":{viewBox:"0 0 24 24",body:'<path d="M8 2v3" /> <path d="M16 2v3" /> <rect x="3" y="3" width="18" height="18" rx="2" /> <path d="M3 9h18" /> <path d="M8 13h.01" /> <path d="M12 13h.01" /> <path d="M16 13h.01" /> <path d="M8 17h.01" /> <path d="M12 17h.01" /> <path d="M16 17h.01" />',stroke:!0},"map-location-dot":{viewBox:"0 0 24 24",body:'<path d="M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0" /> <circle cx="12" cy="8" r="2" /> <path d="M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712" />',stroke:!0},briefcase:{viewBox:"0 0 24 24",body:'<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" /> <rect width="20" height="14" x="2" y="6" rx="2" />',stroke:!0},"chart-line":{viewBox:"0 0 24 24",body:'<path d="M3 3v16a2 2 0 0 0 2 2h16" /> <path d="m19 9-5 5-4-4-3 3" />',stroke:!0},globe:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="12" r="10" /> <path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /> <path d="M2 12h20" />',stroke:!0},star:{viewBox:"0 0 24 24",body:'<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />',stroke:!0},compass:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="12" r="10" /> <path d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" />',stroke:!0},flag:{viewBox:"0 0 24 24",body:'<path d="M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-
15-2-8-2a6 6 0 0 0-4 1.528" />',stroke:!0},"life-ring":{viewBox:"0 0 24 24",body:'<circle cx="12" cy="12" r="10" /> <path d="m4.93 4.93 4.24 4.24" /> <path d="m14.83 9.17 4.24-4.24" /> <path d="m14.83 14.83 4.24 4.24" /> <path d="m9.17 14.83-4.24 4.24" /> <circle cx="12" cy="12" r="4" />',stroke:!0},sun:{viewBox:"0 0 24 24",body:'<circle cx="12" cy="12" r="4" /> <path d="M12 2v2" /> <path d="M12 20v2" /> <path d="m4.93 4.93 1.41 1.41" /> <path d="m17.66 17.66 1.41 1.41" /> <path d="M2 12h2" /> <path d="M20 12h2" /> <path d="m6.34 17.66-1.41 1.41" /> <path d="m19.07 4.93-1.41 1.41" />',stroke:!0},ticket:{viewBox:"0 0 24 24",body:'<path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" /> <path d="M13 5v2" /> <path d="M13 17v2" /> <path d="M13 11v2" />',stroke:!0},"masks-theater":{viewBox:"0 0 24 24",body:'<path d="M10 11h.01" /> <path d="M14 6h.01" /> <path d="M18 6h.01" /> <path d="M6.5 13.1h.01" /> <path d="M22 5c0 9-4 12-6 12s-6-3-6-12c0-2 2-3 6-3s6 1 6 3" /> <path d="M17.4 9.9c-.8.8-2 .8-2.8 0" /> <path d="M10.1 7.1C9 7.2 7.7 7.7 6 8.6c-3.5 2-4.7 3.9-3.7 5.6 4.5 7.8 9.5 8.4 11.2 7.4.9-.5 1.9-2.1 1.9-4.7" /> <path d="M9.1 16.5c.3-1.1 1.4-1.7 2.4-1.4" />',stroke:!0},"building-columns":{viewBox:"0 0 24 24",body:'<path d="M14 21v-3a2 2 0 0 0-4 0v3" /> <path d="M18 12h.01" /> <path d="M18 16h.01" /> <path d="M22 7a1 1 0 0 0-1-1h-2a2 2 0 0 1-1.143-.359L13.143 2.36a2 2 0 0 0-2.286-.001L6.143 5.64A2 2 0 0 1 5 6H3a1 1 0 0 0-1 1v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2z" /> <path d="M6 12h.01" /> <path d="M6 16h.01" /> <circle cx="12" cy="10" r="2" />',stroke:!0},microphone:{viewBox:"0 0 24 24",body:'<path d="M12 19v3" /> <path d="M19 10v2a7 7 0 0 1-14 0v-2" /> <rect x="9" y="2" width="6" height="13" rx="3" />',stroke:!0},"child-reaching":{viewBox:"0 0 24 24",body:'<circle cx="12" cy="5" r="1" /> <path d="m9 20 3-6 3 6" /> <path d="m6 8 6 2 6-2" /> <path d="M12 10v4" />',stroke:!0},facebook:{viewBox:"0 0 24 24",body:'<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"/>',stroke:!1},instagram:{viewBox:"0 0 24 24",body:'<path d="M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"/>',stroke:!1},linkedin:{viewBox:"0 0 448 512",body:'<path d="M416 32L31.9 32C14.3 32 0 46.5 0 64.3L0 447.7C0 465.5 14.3 480 31.9 480L416 480c17.6 0 32-14.5 32-32.3l0-383.4C448 46.5 433.6 32 416 32zM135.4 416l-66.4 0 0-213.8 66.5 0 0 213.8-.1 0zM102.2 96a38.5 38.5 0 1 1 0 77 38.5 38.5 0 1 1 0-77zM384.3 416l-66.4 0 0-104c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9l0 105.8-66.4 0 0-213.8 63.7 0 0 29.2 .9 0c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9l0 117.2z" />',stroke:!1},youtube:{viewBox:"0 0 24 24",body:'<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>',stroke:!1},tiktok:{viewBox:"0 0 24 24",body:'<path d="M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08
1-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"/>',stroke:!1},"x-twitter":{viewBox:"0 0 24 24",body:'<path d="M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"/>',stroke:!1}};var r={name:"WebsiteIcon",props:{name:{type:String,required:!0}},computed:{icon(){return l[this.name]||null}}},d=i(66262);const c=(0,d.A)(r,[["render",o]]);var u=c},19328:function(e,t,i){"use strict";i.d(t,{A:function(){return E}});var s=i(20641),a=i(90033);const n={class:"discuss-create-bar"},o={key:0,class:"o-discuss-controls card-discuss mt-1 is-flex is-align-items-center"},l={class:"o-create-input-text"},r={class:"o-add-icons"},d={class:"icon is-medium"},c={class:"icon is-medium"},u={class:"icon is-medium"},m={key:1,class:"discuss-sort-bar"},p={class:"discuss-sort-bar-controls"},h=["onClick"],g={class:"icon is-small"},f={class:"discuss-sort-label"},b=["title"],y={class:"icon is-small"};function v(e,t,i,v,k,C){const L=(0,s.g2)("LogoThumbnail"),w=(0,s.g2)("font-awesome-icon"),_=(0,s.g2)("b-dropdown-item"),E=(0,s.g2)("b-dropdown");return(0,s.uX)(),(0,s.CE)("div",n,[i.showComposer?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.bF)(L,{item:e.user,"is-type":"roundMedium"},null,8,["item"]),(0,s.Lk)("div",{class:"o-create-input is-clickable",onClick:t[0]||(t[0]=t=>e.$emit("open-create-modal","text"))},[(0,s.Lk)("span",l,(0,a.v_)(e.$t("Start a post")),1)]),(0,s.Lk)("div",r,[(0,s.Lk)("span",{class:"o-control-file is-clickable",onClick:t[1]||(t[1]=t=>e.$emit("open-create-modal","photos"))},[(0,s.Lk)("span",d,[(0,s.bF)(w,{icon:"fa-light fa-image"})])]),(0,s.Lk)("span",{class:"o-control-file is-clickable",onClick:t[2]||(t[2]=t=>e.$emit("open-create-modal","videos"))},[(0,s.Lk)("span",c,[(0,s.bF)(w,{icon:"fa-light fa-video"})])]),e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",{key:0,class:"o-control-file is-clickable",onClick:t[3]||(t[3]=t=>e.$emit("open-create-modal","files"))},[(0,s.Lk)("span",u,[(0,s.bF)(w,{icon:"fa-light fa-folder"})])]))])])):(0,s.Q3)("",!0),i.showSortBar?((0,s.uX)(),(0,s.CE)("div",m,[t[7]||(t[7]=(0,s.Lk)("div",{class:"discuss-sort-bar-line"},null,-1)),(0,s.Lk)("div",p,[(0,s.bF)(E,{"model-value":i.orderBy,"aria-role":"list",hoverable:"","close-on-click":"",position:"is-bottom-left","onUpdate:modelValue":t[4]||(t[4]=t=>e.$emit("order-change",t))},{trigger:(0,s.k6)(({active:t,toggle:n})=>[(0,s.Lk)("button",{class:"discuss-sort-btn is-clickable",onClick:n},[(0,s.Lk)("span",g,[(0,s.bF)(w,{icon:"fa-light fa-arrow-down-short-wide"})]),(0,s.Lk)("span",f,(0,a.v_)("new"===i.orderBy?e.$t("newest"):"")+" "+(0,a.v_)("old"===i.orderBy?e.$t("oldest"):"")+" "+(0,a.v_)("maxComments"===i.orderBy?e.$t("mostCommented"):"")+" "+(0,a.v_)("minComments"===i.orderBy?e.$t("leastCommented"):""),1)],8,h)]),default:(0,s.k6)(()=>[(0,s.bF)(_,{value:"new"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("newest")),1)]),_:1}),(0,s.bF)(_,{value:"old"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("oldest")),1)]),_:1}),(0,s.bF)(_,{value:"maxComments"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("mostCommented")),1)]),_:1}),(0,s.bF)(_,{value:"minComments"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(e.$t("leastCommented")),1)]),_:1})]),_:1},8,["model-value"]),t[6]||(t[6]=(0,s.Lk)("span",{class:"discuss-sort-separator"},"·",-1)),(0,s.Lk)("button",{class:"discuss-sort-btn is-clickable",title:"comfortable"===i.viewMode?e.$t("Compact"):e.$t("Card"),onClick:t[5]||(t[5]=t=>e.$emit("view-mode-change"))},[(0,s.Lk)("span",y,[(0,s.bF)(w,{icon:"comfortable"===i.viewMode?"fa-light fa-table-cells-large":"fa-light fa-list"},null,8,["icon"])])],8,b)])])):(0,s.Q3)("",!0)])}var k=i(40834),C=i(31823),L={name:"DiscussCreateBar",components:{LogoThumbnail:C.A},props:{orderBy:{type:String,default:"new"},viewMode:{type:String,default:"comfortable"},showSortBar:{type:Boolean,default:!0},showComposer:{type:Boolean,default:!0}},emits:["open-create-modal","order-change","view-mode-change"],computed:{...(0,k.L8)(["user"])}},w=i(66262);const _=(0,w.A)(L,[["render",v],["__scopeId","data-v-4b77384a"]]);var E=_},19378:function(e,t,i){"use strict";i.d(t,{A:function(){return m}});var s=i(20641),a=i(90033);const n=["value"];function o(e,t,i,o,l,r){const d=(0,s.g2)("b-field"),c=(0,s.g2)("b-select");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bF)(d,{label:e.$t("birthDay"),
1class:(0,a.C4)(i.isRequired?"required":"")},null,8,["label","class"]),(0,s.bF)(d,{grouped:"",class:"birthday-selects"},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(r.parts,o=>((0,s.uX)(),(0,s.Wv)(c,{key:o.key,"model-value":e.$data[o.key],placeholder:e.$t(o.placeholder),class:(0,a.C4)(o.className),required:i.isRequired,size:i.isSmall?"is-small":"","onUpdate:modelValue":e=>r.setPart(o.key,e)},{default:(0,s.k6)(()=>[t[0]||(t[0]=(0,s.Lk)("option",{value:null},"...",-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.options,e=>((0,s.uX)(),(0,s.CE)("option",{key:e,value:e},(0,a.v_)(e),9,n))),128))]),_:2},1032,["model-value","placeholder","class","required","size","onUpdate:modelValue"]))),128))]),_:1})])}var l=i(95256),r=i(54481),d={components:{},props:["user","isRequired","isSmall"],data(){const e=new Date,t=l.y1(e.getFullYear()-120,e.getFullYear()).reverse(),i=l.QE(this.user?.dateBirth);return{bdayYears:t,bdayDay:i?i.getDate():null,bdayMonth:i?i.getMonth()+1:null,bdayYear:i?i.getFullYear():null}},computed:{isUsTenant(){return(0,r.xy)(this.$store?.state?.tenant)},parts(){const e={key:"bdayDay",placeholder:"DD",className:"birthday-day",options:31},t={key:"bdayMonth",placeholder:"MM",className:"birthday-month",options:12},i={key:"bdayYear",placeholder:"YYYY",className:"birthday-year",options:this.bdayYears};return this.isUsTenant?[t,e,i]:[e,t,i]}},mounted(){this.change()},methods:{setPart(e,t){this[e]=t,this.change()},change(){if(!this.bdayYear||!this.bdayMonth||!this.bdayDay)return this.$emit("update:modelValue",null);this.$emit("update:modelValue",this.bdayYear+"/"+this.bdayMonth+"/"+this.bdayDay)}}},c=i(66262);const u=(0,c.A)(d,[["render",o],["__scopeId","data-v-487024b1"]]);var m=u},20499:function(e,t,i){"use strict";i.d(t,{A:function(){return L}});var s=i(20641),a=i(90033);const n={key:0,class:"event-media-gallery"},o={key:0,class:"event-videos-section"},l={controls:""},r=["src"],d=["onClick"],c={class:"icon is-small"},u={key:1,class:"event-photos-section"},m=["onClick"],p=["onClick"],h={class:"icon is-small"},g={key:0,class:"mb-6"};function f(e,t,i,f,b,y){const v=(0,s.g2)("font-awesome-icon"),k=(0,s.g2)("Gallery");return y.hasMedia?((0,s.uX)(),(0,s.CE)("div",n,[i.videos.length?((0,s.uX)(),(0,s.CE)("section",o,[(0,s.Lk)("div",{class:(0,a.C4)(i.videos.length>1?"video-grid":"video-single")},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.videos,(a,n)=>((0,s.uX)(),(0,s.CE)("figure",{key:a.id,class:"o-gallery-item"},[(0,s.Lk)("video",l,[(0,s.Lk)("source",{src:y.getMediaSrc(a),type:"video/mp4"},null,8,r),t[2]||(t[2]=(0,s.eW)(" Your browser does not support the video tag. ",-1))]),i.editable?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"circle-trash",onClick:t=>e.$emit("delete-video",a,n)},[(0,s.Lk)("span",c,[(0,s.bF)(v,{icon:"fa-light fa-trash"})])],8,d)):(0,s.Q3)("",!0)]))),128))],2)])):(0,s.Q3)("",!0),y.photoUrls.length?((0,s.uX)(),(0,s.CE)("section",u,[(0,s.Lk)("div",{class:(0,a.C4)([y.photoUrls.length>12?"o-photo-grid":"o-photo-grid-simple","my-5",b.allMediaVisible?"expanded":""])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(y.photoUrls,(t,n)=>((0,s.uX)(),(0,s.CE)("div",{key:n,class:(0,a.C4)([n<13?"under-5":"over-5","o-event-photo-wrap"])},[(0,s.Lk)("div",{class:"o-event-photo",style:(0,a.Tr)({backgroundImage:"url("+t+")",backgroundPosition:"center",backgroundSize:"cover"}),onClick:e=>b.galleryIndex=n},null,12,m),i.editable?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button o-ghost-button is-small is-rounded is-icon-only",onClick:t=>e.$emit("delete-photo",i.photos[n],n)},[(0,s.Lk)("span",h,[(0,s.bF)(v,{icon:"fa-light fa-xmark-large"})])],8,p)):(0,s.Q3)("",!0)],2))),128))],2),y.photoUrls.length>13?((0,s.uX)(),(0,s.CE)("div",g,[(0,s.Lk)("button",{class:"button is-default is-small is-rounded",onClick:t[0]||(t[0]=e=>b.allMediaVisible=!b.allMediaVisible)},(0,a.v_)(b.allMediaVisible?e.$t("Show less"):e.$t("Show more")),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.bF)(k,{images:y.photoUrls,index:b.galleryIndex,onClose:t[1]||(t[1]=e=>b.galleryIndex=null)},null,8,["images","index"])])):(0,s.Q3)("",!0)}i(18111),i(61701);var b=i(76675),y=i(95256),v={name:"EventMediaGallery",components:{Gallery:b.A},props:{photos:{type:Array,default:()=>[]},videos:{type:Array,default:()=>[]},editable:{type:Boolean,default:!1}},emits:["delete-photo","delete-video"],data(){return{galleryIndex:null,allMediaVisible:!1}},computed:{hasMedia(){return this.photos.length>0||this.videos.length>0},photoUrls(){return this.photos.map(e=>(0,y.F9)(e))}},methods:{getMediaSrc(e){return(0,y.F9)(e)}}},k=i(66262);const C=(0,k.A)(v,[["render",f],["__scopeId","data-v-415f70ff"]]);var L=C},20537:function(e,t,i){"use strict";i.d(t,{A:function(){return S}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"date-block"},l={class:"date-block-month"},r={class:"date-block-day"},d={class:"date-block-weekday"},c={class:"ev-info"},u={class:"ev-title"},m={key:0,class:"ev-details"},p={key:0,class:"ev-meta"},h={key:0,class:"ev-localtime-pill"},g={key:1,class:"ev-meta"},f={key:2,class:"ev-meta"},b={key:1,class:"ev-meta-list"},y={key:2,class:"ev-badges"},v={class:"ev-cover"},k=["src","alt"];function C(e,t,i,C,L,w){const _=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{class:"ev-card card is-clickable",role:"link",tabindex:"0",onClick:t[0]||(t[0]=t=>
1e.$emit("click",i.event)),onKeydown:t[1]||(t[1]=(0,a.jR)(t=>e.$emit("click",i.event),["enter"]))},[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,(0,n.v_)(w.formatMonthAbbr(i.event.dateTimeBegin)),1),(0,s.Lk)("div",r,(0,n.v_)(w.formatDayNumber(i.event.dateTimeBegin)),1),(0,s.Lk)("div",d,(0,n.v_)(w.formatWeekday(i.event.dateTimeBegin)),1)]),(0,s.Lk)("div",c,[(0,s.Lk)("div",u,(0,n.v_)(i.event.name),1),w.hasMeta?((0,s.uX)(),(0,s.CE)("div",m,[i.event.dateTimeBegin?((0,s.uX)(),(0,s.CE)("span",p,[(0,s.bF)(_,{icon:"fa-light fa-clock",class:"ev-meta-icon"}),(0,s.eW)(" "+(0,n.v_)(e.$filters.formatTime(i.event.dateTimeBegin))+" ",1),i.event.location&&i.event.timezone?((0,s.uX)(),(0,s.CE)("span",h,(0,n.v_)(e.$t("LOCAL TIME")),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),w.hasPhysicalLocation?((0,s.uX)(),(0,s.CE)("span",g,[(0,s.bF)(_,{icon:"fa-light fa-location-dot",class:"ev-meta-icon"}),(0,s.eW)(" "+(0,n.v_)(i.event.location),1)])):(0,s.Q3)("",!0),i.event.meet&&!i.event.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",f,[(0,s.bF)(_,{icon:"fa-light fa-video",class:"ev-meta-icon"}),(0,s.eW)(" "+(0,n.v_)(w.videoUrl(i.event)),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.$slots["meta-list"]?((0,s.uX)(),(0,s.CE)("div",b,[(0,s.RG)(e.$slots,"meta-list",{},void 0,!0)])):(0,s.Q3)("",!0),e.$slots.badges?((0,s.uX)(),(0,s.CE)("div",y,[(0,s.RG)(e.$slots,"badges",{},void 0,!0)])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",v,[w.coverUrl?((0,s.uX)(),(0,s.CE)("img",{key:0,src:w.coverUrl,alt:i.event.name,class:"ev-cover-img"},null,8,k)):((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,n.C4)(["cover-placeholder","cover-gradient-"+w.gradientIndex])},[(0,s.bF)(_,{icon:"fa-light fa-calendar",class:"cover-placeholder-icon"})],2))])],32)}var L=i(95093),w=i.n(L),_=i(28782),E=i(95256),$={name:"EventListCard",props:{event:{type:Object,required:!0},coverMediaPath:{type:String,default:"event"}},emits:["click"],computed:{hasMeta(){return!!(this.event.dateTimeBegin||this.hasPhysicalLocation||this.event.meet&&!this.event.hasEventTicketing)},hasPhysicalLocation(){const e=this.event.location;return!!e&&("Zoom"!==e&&"Teams"!==e&&"online"!==e.toLocaleLowerCase())},coverUrl(){const e=this.event;return e?e.logo&&e.logo.includes("/demo?")?"https://picsum.photos/600/300?random="+e.id:e.logo&&e.logo.includes("demo__")?e.logo.replace("demo__",""):e.logo?e.logo.includes("https")?e.logo:_.ze+_.DJ+this.coverMediaPath+"/"+e.logo:e.logoFromAlbum?e.logoFromAlbum.includes("https")?e.logoFromAlbum:_.ze+_.DJ+"eventimage/"+e.logoFromAlbum:null:null},gradientIndex(){return(0,E.F0)(this.event.name||"")}},methods:{videoUrl:E.fV,formatMonthAbbr(e){return e?w()(e).format("MMM").toUpperCase():""},formatDayNumber(e){return e?w()(e).format("D"):""},formatWeekday(e){return e?w()(e).format("ddd"):""}}},F=i(66262);const T=(0,F.A)($,[["render",C],["__scopeId","data-v-5dba2cf1"]]);var S=T},20875:function(e,t,i){"use strict";i(18111),i(20116);t.A={data(){return{hoveredRecord:null,hoveredKey:null,hoverRecordCache:{}}},methods:{resolveHoveredRecord({key:e,items:t,matches:i,placeholder:s,fetchOne:a}){if(null===e||void 0===e)return void this.clearHoveredRecord();this.hoveredKey=e;const n=(t||[]).find(i)||this.hoverRecordCache[e];n?this.hoveredRecord=n:(this.hoveredRecord=s,this.fetchHoveredRecord(e,a))},fetchHoveredRecord(e,t){return t(e).then(t=>{t&&(this.hoverRecordCache[e]=t,this.hoveredKey===e&&(this.hoveredRecord=t))}).catch(e=>{console.log(e)})},clearHoveredRecord(){this.hoveredRecord=null,this.hoveredKey=null}}}},21152:function(e,t,i){"use strict";i.d(t,{A:function(){return kt}});var s=i(20641),a=i(53751),n=i(90033);const o={key:0,class:"vfq-title-card"},l={class:"vfq-title-label"},r={key:1,class:"vfq-title-add-row"},d={class:"icon is-small"},c={class:"vote-datetime-timeline"},u={key:0,class:"datetime-row"},m={class:"timeline-indicator"},p={key:0,class:"connector"},h={class:"datetime-label"},g={class:"datetime-inputs"},f=["value"],b={class:"timezone-display is-clickable"},y={class:"icon is-small"},v={class:"timezone-info"},k={class:"timezone-offset"},C={class:"timezone-city"},L={class:"timezone-dropdown-content"},w={class:"timezone-list"},_={class:"timezone-list-header"},E={class:"timezone-option"},$={class:"has-text-grey"},F={class:"timezone-list-header mt-3"},T={class:"timezone-option"},S={class:"has-text-grey"},A={key:1,class:"add-datetime-row"},P={class:"icon is-small"},I={class:"has-text-grey-light ml-3 is-size-7"},M={key:2,class:"datetime-row"},x={class:"datetime-label"},N={class:"datetime-inputs"},U=["value"],D={key:3,class:"add-datetime-row"},X={class:"icon is-small"},V={class:"has-text-grey-light ml-3 is-size-7"},R={class:"vote-audience-section mt-5 mb-5"},O={class:"has-text-weight-semibold mb-4"},Q={class:"vote-audience-options"},B={key:0,class:"vote-audience-card is-selected"},G={class:"audience-icon"},W={class:"audience-content"},j={class:"audience-title"},z={class:"audience-description"},q={key:0,class:"has-text-weight-semibold mt-2"}
1,J={class:"audience-check"},H={class:"audience-icon"},K={class:"audience-content"},Y={class:"audience-title"},Z={class:"audience-description"},ee={key:0,class:"audience-check"},te={class:"audience-icon"},ie={class:"audience-content"},se={class:"audience-title"},ae={class:"audience-description"},ne={key:0,class:"audience-check"},oe={key:0,class:"vote-group-selector mt-4"},le={class:"vote-settings-section mt-5"},re={class:"has-text-weight-semibold mb-4"},de={class:"setting-icon"},ce={class:"setting-content"},ue={class:"setting-title"},me={class:"setting-description"},pe={class:"setting-icon"},he={class:"setting-content"},ge={class:"setting-title"},fe={class:"setting-description"},be={class:"setting-icon"},ye={class:"setting-content"},ve={class:"setting-title"},ke={class:"setting-description"},Ce={key:2,class:"vote-privacy-notice mt-5"},Le={class:"privacy-icon"},we={class:"privacy-text"},_e={key:3,class:"vote-privacy-notice vote-privacy-notice--warning mt-5"},Ee={class:"privacy-icon"},$e={class:"privacy-text"},Fe={key:4,class:"vote-locked-notice mt-5"},Te={class:"locked-icon"},Se={class:"locked-text"},Ae={class:"vote-form-actions mt-6"},Pe=["disabled"],Ie=["disabled"],Me={class:"icon"},xe=["disabled"];function Ne(e,t,i,Ne,Ue,De){const Xe=(0,s.g2)("b-loading"),Ve=(0,s.g2)("b-input"),Re=(0,s.g2)("font-awesome-icon"),Oe=(0,s.g2)("VoteFormQuestions"),Qe=(0,s.g2)("b-datepicker"),Be=(0,s.g2)("b-select"),Ge=(0,s.g2)("b-dropdown-item"),We=(0,s.g2)("b-dropdown"),je=(0,s.g2)("PostingInSelector"),ze=(0,s.g2)("b-switch");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bF)(Xe,{modelValue:Ue.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>Ue.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,s.Lk)("form",{onSubmit:t[32]||(t[32]=(0,a.D$)((...e)=>De.save&&De.save(...e),["prevent"]))},[(i.item.votes||[]).length>1||Ue.showUmbrellaInput?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("p",l,(0,n.v_)(e.$t("Vote title")),1),(0,s.bF)(Ve,{ref:"voteTitleInput",modelValue:i.item.name,"onUpdate:modelValue":t[1]||(t[1]=e=>i.item.name=e),placeholder:e.$t("e.g. General Assembly 2026"),onInput:De.onUmbrellaTitleInput},null,8,["modelValue","placeholder","onInput"]),1===(i.item.votes||[]).length?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"vfq-title-toggle is-size-7",onClick:t[2]||(t[2]=(...e)=>De.collapseUmbrellaTitle&&De.collapseUmbrellaTitle(...e))},(0,n.v_)(e.$t("Set title is same as question")),1)):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("a",{class:"vfq-title-add-link",onClick:t[3]||(t[3]=(...e)=>De.expandUmbrellaTitle&&De.expandUmbrellaTitle(...e))},[(0,s.Lk)("span",d,[(0,s.bF)(Re,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Add vote title")),1)])])),(0,s.bF)(Oe,{modelValue:i.item.votes,"onUpdate:modelValue":t[4]||(t[4]=e=>i.item.votes=e),mode:De.questionsMode,"vote-collection-id":i.item.id,"is-editable":!1!==i.item.isEditable,onFirstEdit:De.onFirstEdit,onQuestionTitleChanged:De.onQuestionTitleChanged},null,8,["modelValue","mode","vote-collection-id","is-editable","onFirstEdit","onQuestionTitleChanged"]),(0,s.Lk)("div",c,[Ue.hasStartDate?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("div",m,[t[33]||(t[33]=(0,s.Lk)("span",{class:"bullet filled"},null,-1)),Ue.hasEndDate?((0,s.uX)(),(0,s.CE)("span",p)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",h,(0,n.v_)(e.$t("Start")),1),(0,s.Lk)("div",g,[(0,s.bF)(Qe,{modelValue:i.item.dateStart,"onUpdate:modelValue":t[5]||(t[5]=e=>i.item.dateStart=e),placeholder:e.$t("Select date"),editable:"","append-to-body":"",class:"datetime-date-picker","date-formatter":De.formatDateLong,"date-parser":De.parseDateLong},null,8,["modelValue","placeholder","date-formatter","date-parser"]),(0,s.bF)(Be,{modelValue:i.item.timeStart,"onUpdate:modelValue":t[6]||(t[6]=e=>i.item.timeStart=e),class:"datetime-time-select"},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ue.timeOptions,e=>((0,s.uX)(),(0,s.CE)("option",{key:e,value:e},(0,n.v_)(e),9,f))),128))]),_:1},8,["modelValue"]),(0,s.Lk)("a",{class:"remove-datetime-link",onClick:t[7]||(t[7]=(...e)=>De.removeStartDate&&De.removeStartDate(...e))},(0,n.v_)(e.$t("Remove start date")),1)]),(0,s.bF)(We,{ref:"timezoneDropdown",position:"is-bottom-left",class:"timezone-dropdown",onActiveChange:De.onTimezoneDropdownChange},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",b,[(0,s.Lk)("span",y,[(0,s.bF)(Re,{icon:"fa-light fa-globe"})]),(0,s.Lk)("div",v,[(0,s.Lk)("span",k,(0,n.v_)(De.formattedTimezoneOffset),1),(0,s.Lk)("span",C,(0,n.v_)(De.formattedTimezoneCity),1)])])]),default:(0,s.k6)(()=>[(0,s.Lk)("div",L,[(0,s.bF)(Ve,{ref:"timezoneSearchInput",modelValue:Ue.timezoneSearch,"onUpdate:modelValue":t[8]||(t[8]=e=>Ue.timezoneSearch=e),placeholder:e.$t("Search for a timezone"),icon:"magnifying-glass",class:"timezone-search-input"},null,8,["modelValue","placeholder"]),(0,s.Lk)("div",w,[(0,s.Lk)("p",_,(0,n.v_)(e.$t("Popular Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(De.filteredPopularTimezones,e=>((0,s.uX)(),(0,s.Wv)(Ge,{key:e.value,onClick:t=>De.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",E,[(0,s.Lk)("span",null,(0,n.v_)(e.label),1),(0,s.Lk)("span",$,(0,n.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128)),(0,s.Lk)("p",F,(0,n.v_)(e.$t("All Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(De.filteredAllTimezones,e=>((0,s.uX)(),(0,s.Wv)(Ge,{key:e.value,onClick:t=>De.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",T,[(0,s.Lk)("span",null,(0,n.v_)(e.label),1),(0,s.Lk)("span",S,(0,n.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128))])])]),_:1},8,["onActiveChange"])])):(0,s.Q3)("",!0),Ue.hasStartDate?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",A,[(0,s.Lk)("a",{class:"add-datetime-link",onClick:t[9]||(t[9]=(...e)=>De.addStartDate&&De.addStartDate(...e))},[(0,s.Lk)("span",P,[(0,s.bF)(Re,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Add start date")),1)]),(0,s.Lk)("span",I,(0,n.v_)(e.$t("Voting starts immediately when published")),1)])),Ue.hasEndDate?((0,s.uX)(),(0,s.CE)("div",M,[t[34]||(t[34]=(0,s.Lk)("div",{class:"timeline-indicator"},[(0,s.Lk)("span",{class:"bullet empty"})],-1)),(0,s.Lk)("div",x,(0,n.v_)(e.$t("End")),1),(0,s.Lk)("div",N,[(0,s.bF)(Qe,{modelValue:i.item.dateEnd,"onUpdate:modelValue":t[10]||(t[10]=e=>i.item.dateEnd=e),placeholder:e.$t("Select date"),editable:"",required:"","append-to-body":"",class:"datetime-date-picker","date-formatter":De.formatDateLong,"date-parser":De.parseDateLong},null,8,["modelValue","placeholder","date-formatter","date-parser"]),(0,s.bF)(Be,{modelValue:i.item.timeEnd,"onUpdate:modelValue":t[11]||(t[11]=e=>i.item.timeEnd=e),class:"datetime-time-select"},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ue.timeOptions,e=>((0,s.uX)(),(0,s.CE)("option",{key:e,value:e},(0,n.v_)(e),9,U))),128))]),_:1},8,["modelValue"]),(0,s.Lk)("a",{class:"remove-datetime-link",onClick:t[12]||(t[12]=(...e)=>De.removeEndDate&&De.removeEndDate(...e))},(0,n.v_)(e.$t("Remove end date")),1)])])):(0,s.Q3)("",!0),Ue.hasEndDate?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",D,[(0,s.Lk)("a",{class:"add-datetime-link",onClick:t[13]||(t[13]=(...e)=>De.addEndDate&&De.addEndDate(...e))},[(0,s.Lk)("span",X,[(0,s.bF)(Re,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Add end date")),1)]),(0,s.Lk)("span",V,(0,n.v_)(e.$t("Voting is open until all voters vote or administrator closes it manually")),1)]))]),(0,s.Lk)("div",R,[(0,s.Lk)("p",O,(0,n.v_)(e.$t("Who is voting?")),1),(0,s.Lk)("div",Q,[De.hasEvent?((0,s.uX)(),(0,s.CE)("div",B,[(0,s.Lk)("div",G,[(0,s.bF)(Re,{icon:"fa-light fa-calendar-check"})]),(0,s.Lk)("div",W,[(0,s.Lk)("p",j,(0,n.v_)(e.$t("Event attendees")),1),(0,s.Lk)("p",z,(0,n.v_)(e.$t("Only participants of the event can vote")),1),De.eventDisplayName?((0,s.uX)(),(0,s.CE)("p",q,(0,n.v_)(De.eventDisplayName),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",J,[(0,s.bF)(Re,{icon:"fa-light fa-check-circle"})])])):(0,s.Q3)("",!0),De.hasEvent?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("div",{class:(0,n.C4)(["vote-audience-card",{"is-selected":i.item.isGeneral}]),onClick:t[14]||(t[14]=e=>De.onAudienceChange(!0))},[(0,s.Lk)("div",H,[(0,s.bF)(Re,{icon:"fa-light fa-users"})]),(0,s.Lk)("div",K,[(0,s.Lk)("p",Y,(0,n.v_)(e.$t("Group vote")),1),(0,s.Lk)("p",Z,(0,n.v_)(e.$t("All members from a selected group can vote")),1)]),i.item.isGeneral?((0,s.uX)(),(0,s.CE)("span",ee,[(0,s.bF)(Re,{icon:"fa-light fa-check-circle"})])):(0,s.Q3)("",!0)],2),(0,s.Lk)("div",{class:(0,n.C4)(["vote-audience-card",{"is-selected":!i.item.isGeneral}]),onClick:t[15]||(t[15]=e=>De.onAudienceChange(!1))},[(0,s.Lk)("div",te,[(0,s.bF)(Re,{icon:"fa-light fa-user-check"})]),(0,s.Lk)("div",ie,[(0,s.Lk)("p",se,(0,n.v_)(e.$t("Private vote")),1),(0,s.Lk)("p",ae,(0,n.v_)(e.$t("Select specific voters after creating")),1)]),i.item.isGeneral?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",ne,[(0,s.bF)(Re,{icon:"fa-light fa-check-circle"})]))],2)],64))]),i.item.isGeneral&&!De.hasEvent?((0,s.uX)(),(0,s.CE)("div",oe,[(0,s.bF)(je,{modelValue:i.item.unit,"onUpdate:modelValue":[t[16]||(t[16]=e=>i.item.unit=e),De.onUnitChange],item:i.item,namespace:"vote","trigger-label":e.$t("Group"),"trigger-icon":"fa-light fa-users"},null,8,["modelValue","item","trigger-label","onUpdate:modelValue"])])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",le,[(0,s.Lk)("p",re,(0,n.v_)(e.$t("Settings")),1),(0,s.Lk)("div",{class:"vote-setting-item",onClick:t[20]||(t[20]=e=>De.toggleSetting("hasPreliminaryResults"))},[(0,s.Lk)("div",de,[(0,s.bF)(Re,{icon:"fa-light fa-chart-line"})]),(0,s.Lk)("div",ce,[(0,s.Lk)("p",ue,(0,n.v_)(e.$t("Real-time results")),1),(0,s.Lk)("p",me,(0,n.v_)(e.$t("Voters can see results before voting ends")),1)]),(0,s.bF)(ze,{modelValue:i.item.hasPreliminaryResults,"onUpdate:modelValue":[t[17]||(t[17]=e=>i.item.hasPreliminaryResults=e),t[19]||(t[19]=e=>De.onSettingChanged("hasPreliminaryResults"))],class:"setting-switch",onClick:t[18]||(t[18]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue"])]),(0,s.Lk)("div",{class:"vote-setting-item mt-2",onClick:t[24]||(t[24]=e=>De.toggleSetting("hideVotersList"))},[(0,s.Lk)("div",pe,[(0,s.bF)(Re,{icon:"fa-light fa-eye-slash"})]),(0,s.Lk)("div",he,[(0,s.Lk)("p",ge,(0,n.v_)(e.$t("Hide voters list")),1),(0,s.Lk)("p",fe,(0,n.v_)(e.$t("Only administrators can see who voted")),1)]),(0,s.bF)(ze,{modelValue:i.item.hideVotersList,"onUpdate:modelValue":[t[21]||(t[21]=e=>i.item.hideVotersList=e),t[23]||(t[23]=e=>De.onSettingChanged("hideVotersList"))],class:"setting-switch",onClick:t[22]||(t[22]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue"])]),(0,s.Lk)("div",{class:(0,n.C4)(["vote-setting-item mt-2",{"is-disabled":!De.isAnonymityEditable}]),onClick:t[28]||(t[28]=(...e)=>De.toggleAnonymity&&De.toggleAnonymity(...e))},[(0,s.Lk)("div",be,[(0,s.bF)(Re,{icon:"fa-light fa-user-secret"})]),(0,s.Lk)("div",ye,[(0,s.Lk)("p",ve,(0,n.v_)(e.$t("Anonymous voting")),1),(0,s.Lk)("p",ke,(0,n.v_)(e.$t("Nobody can see how each person voted")),1)]),(0,s.bF)(ze,{modelValue:De.isAnonymousModel,"onUpdate:modelValue":[t[25]||(t[25]=e=>De.isAnonymousModel=e),t[27]||(t[27]=e=>De.onSettingChanged("isAnonymous"))],class:"setting-switch",disabled:!De.isAnonymityEditable,onClick:t[26]||(t[26]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","disabled"])],2)]),De.isAnonymousModel?((0,s.uX)(),(0,s.CE)("div",Ce,[(0,s.Lk)("span",Le,[(0,s.bF)(Re,{icon:"fa-light fa-shield-check"})]),(0,s.Lk)("span",we,(0,n.v_)(e.$t("All votes cast by voters are encrypted and anonymous ")),1)])):((0,s.uX)(),(0,s.CE)("div",_e,[(0,s.Lk)("span",Ee,[(0,s.bF)(Re,{icon:"fa-light fa-triangle-exclamation"})]),(0,s.Lk)("span",$e,(0,n.v_)(e.$t("This vote is not anonymous. Administrators will be able to see how each person voted, and voters will be told this before they vote.")),1)])),!1===i.item.isEditable?((0,s.uX)(),(0,s.CE)("div",Fe,[(0,s.Lk)("span",Te,[(0,s.bF)(Re,{icon:"fa-light fa-lock"})]),(0,s.Lk)("span",Se,(0,n.v_)(e.$t("Voting is locked, and it cannot be modified")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",Ae,[(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["button is-rounded",{"is-loading":Ue.isBootstrapping}]),disabled:Ue.isBootstrapping||!1===i.item.isEditable,onClick:t[29]||(t[29]=(...e)=>De.saveDraftAndClose&&De.saveDraftAndClose(...e))},[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Save draft")),1)],10,Pe),(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["button is-primary is-rounded",{"is-loading":Ue.isPublishing||Ue.isBootstrapping}]),disabled:Ue.isBootstrapping||Ue.isPublishing||!1===i.item.isEditable||!De.canSubmit,onClick:t[30]||(t[30]=(...e)=>De.publishAndClose&&De.publishAndClose(...e))},[(0,s.Lk)("span",Me,[(0,s.bF)(Re,{icon:"fa-light fa-square-check"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Publish")),1)],10,Ie),"update"===i.operation?((0,s.uX)(),(0,s.CE)("button",{key:0,t
1ype:"button",class:"button is-danger is-outlined is-rounded",disabled:!1===i.item.isEditable,onClick:t[31]||(t[31]=t=>e.$emit("delete"))},(0,n.v_)(e.$t("delete")),9,xe)):(0,s.Q3)("",!0)])],32)])}i(44114),i(18111),i(81148),i(22489),i(20116),i(30531),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var Ue=i(65284),De=i(95991);const Xe={class:"vote-form-questions"},Ve=["onDragstart","onDragover","onDrop"],Re={key:0,class:"vfq-card-head"},Oe={class:"vfq-grip","aria-hidden":"true"},Qe={class:"vfq-num"},Be={class:"vfq-tag"},Ge=["aria-label","onClick"],We=["onUpdate:modelValue","placeholder","disabled","onInput","onBlur","onKeydown"],je=["aria-label"],ze=["disabled","onClick"],qe={class:"icon is-small"},Je=["disabled","onClick"],He={class:"icon is-small"},Ke={class:"vfq-opts"},Ye=["onDragstart","onDragover","onDrop"],Ze=["onUpdate:modelValue","placeholder","disabled","onInput","onBlur","onKeydown"],et=["aria-label","onClick"],tt=["onClick"];function it(e,t,i,o,l,r){const d=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",Xe,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.modelValue,(o,c)=>((0,s.uX)(),(0,s.CE)("div",{key:o.localKey||o.id,class:(0,n.C4)(["vfq-card",{"is-multi":r.showCardChrome,"is-dragging":l.dragSourceIndex===c}]),draggable:"true",onDragstart:e=>r.onDragStart(e,c),onDragover:(0,a.D$)(e=>r.onDragOver(c),["prevent"]),onDragend:t[1]||(t[1]=(...e)=>r.onDragEnd&&r.onDragEnd(...e)),onDrop:(0,a.D$)(e=>r.onDrop(c),["prevent"])},[r.showCardChrome?((0,s.uX)(),(0,s.CE)("div",Re,[(0,s.Lk)("span",Oe,[(0,s.bF)(d,{icon:"fa-light fa-grip-vertical"})]),(0,s.Lk)("span",Qe,(0,n.v_)(c+1),1),(0,s.Lk)("span",Be,(0,n.v_)(e.$t("Question")),1),i.modelValue.length>1&&i.isEditable?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"vfq-del",tabindex:"-1","aria-label":e.$t("delete"),onClick:e=>r.onDeleteQuestion(o,c)},[(0,s.bF)(d,{icon:"fa-light fa-trash"})],8,Ge)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.bo)((0,s.Lk)("input",{ref_for:!0,ref:e=>r.setQuestionRef(e,o),"onUpdate:modelValue":e=>o.title=e,type:"text",class:"vfq-q-input",placeholder:e.$t("Write the question")+"â¦",disabled:!i.isEditable,onInput:e=>r.onQuestionInput(o,c),onBlur:e=>r.onQuestionBlur(o,c),onKeydown:(0,a.jR)((0,a.D$)(e=>r.focusFirstOption(o),["prevent"]),["enter"])},null,40,We),[[a.Jo,o.title]]),(0,s.Lk)("div",{class:"vfq-type-tog",role:"radiogroup","aria-label":e.$t("Answer type")},[(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["vfq-type-btn",{"is-on":"single"===(o.type||"single")}]),disabled:!i.isEditable,onClick:e=>r.onTypeChange(o,"single")},[(0,s.Lk)("span",qe,[(0,s.bF)(d,{icon:"fa-light fa-circle-dot"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Single answer")),1)],10,ze),(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["vfq-type-btn",{"is-on":"multiple"===o.type}]),disabled:!i.isEditable,onClick:e=>r.onTypeChange(o,"multiple")},[(0,s.Lk)("span",He,[(0,s.bF)(d,{icon:"fa-light fa-square-check"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Multiple answers")),1)],10,Je)],8,je),(0,s.Lk)("div",Ke,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.voteOptions,(l,u)=>((0,s.uX)(),(0,s.CE)("div",{key:l.localKey||l.id,class:"vfq-opt-row",draggable:"true",onDragstart:(0,a.D$)(e=>r.onOptionDragStart(e,c,u),["stop"]),onDragover:(0,a.D$)(e=>r.onOptionDragOver(c,u),["prevent","stop"]),onDragend:t[0]||(t[0]=(0,a.D$)((...e)=>r.onOptionDragEnd&&r.onOptionDragEnd(...e),["stop"])),onDrop:(0,a.D$)(e=>r.onOptionDrop(c,u),["prevent","stop"])},[(0,s.Lk)("span",{class:(0,n.C4)(["vfq-opt-mark",{"is-square":"multiple"===o.type}]),"aria-hidden":"true"},null,2),(0,s.bo)((0,s.Lk)("input",{ref_for:!0,ref:e=>r.setOptionRef(e,l),"onUpdate:modelValue":e=>l.title=e,type:"text",class:"vfq-opt-input",placeholder:r.optionPlaceholder(u),disabled:!i.isEditable,onInput:e=>r.onOptionInput(o,c,l,u),onBlur:e=>r.onOptionBlur(o,c,l,u),onKeydown:(0,a.jR)((0,a.D$)(e=>r.addOptionAfter(o,c,u),["prevent"]),["enter"])},null,40,Ze),[[a.Jo,l.title]]),o.voteOptions.length>1&&i.isEditable?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"vfq-opt-x",tabindex:"-1","aria-label":e.$t("delete"),onClick:e=>r.onDeleteOption(o,c,l,u)},[(0,s.bF)(d,{icon:"fa-light fa-xmark"})],8,et)):(0,s.Q3)("",!0)],40,Ye))),128)),i.isEditable?((0,s.uX)(),(0,s.CE)("button",{key:0,t
1ype:"button",class:"vfq-add-opt",onClick:e=>r.onAddOption(o,c)},[(0,s.bF)(d,{icon:"fa-light fa-plus"}),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Add option")),1)],8,tt)):(0,s.Q3)("",!0)])],42,Ve))),128)),i.isEditable?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"vfq-add-q",onClick:t[2]||(t[2]=(...e)=>r.onAddQuestion&&r.onAddQuestion(...e))},[(0,s.bF)(d,{icon:"fa-light fa-plus"}),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Add another question")),1)])):(0,s.Q3)("",!0)])}const st=new Set(["Question..","Question..."]),at=new Set(["Option 1","Option 2"]);let nt=1;function ot(e){return nt+=1,`${e}_${Date.now()}_${nt}`}var lt={name:"VoteFormQuestions",props:{modelValue:{type:Array,required:!0},mode:{type:String,default:"live",validator:e=>["live","local"].includes(e)},voteCollectionId:{type:[Number,String],default:null},isEditable:{type:Boolean,default:!0}},emits:["update:modelValue","first-edit","question-title-changed","questions-reordered","options-reordered"],data(){return{originalTitles:{},questionRefs:{},optionRefs:{},dragSourceIndex:null,dragOverIndex:null,optionDragSource:null,optionDragOver:null}},computed:{showCardChrome(){return this.modelValue.length>1}},mounted(){this.$nextTick(()=>this.focusFirstQuestion())},beforeUnmount(){},methods:{setQuestionRef(e,t){e&&(this.questionRefs[t.localKey||t.id]=e)},setOptionRef(e,t){e&&(this.optionRefs[t.localKey||t.id]=e)},focusFirstQuestion(){const e=this.modelValue[0];if(!e)return;const t=this.questionRefs[e.localKey||e.id];if(t&&document.activeElement!==t){t.focus();const e=t.value.length;t.setSelectionRange(e,e)}},focusFirstOption(e){const t=e.voteOptions?.[0];t&&this.$nextTick(()=>{const e=this.optionRefs[t.localKey||t.id];e&&e.focus()})},displayQuestionTitle(e){return st.has(e.title)?"":e.title||""},optionPlaceholder(e){return 0===e?this.$t("Option 1 (ex: Yes)"):1===e?this.$t("Option 2 (ex: No)"):this.$t("Option")+" "+(e+1)},normalizeQuestionTitleForSave(e){const t=(e||"").trim();return!t||st.has(t)?null:t},normalizeOptionTitleForSave(e){const t=(e||"").trim();return!t||at.has(t)?null:t},onQuestionInput(e,t){this.$emit("update:modelValue",this.modelValue),0===t&&1===this.modelValue.length&&this.$emit("question-title-changed",{vote:e,voteIndex:t,title:e.title})},onQuestionBlur(e,t){if(0!==t)return;const i=(e.title||"").trim();i&&this.$emit("first-edit",{kind:"question-blur",vote:e,voteIndex:t})},onTypeChange(e,t){e.type!==t&&(e.type=t,this.$emit("update:modelValue",this.modelValue))},onAddQuestion(){this.isEditable&&(this.modelValue.push(this.makeLocalQuestion()),this.$emit("update:modelValue",this.modelValue),this.$nextTick(()=>this.focusLastQuestion()))},focusLastQuestion(){const e=this.modelValue[this.modelValue.length-1];if(!e)return;const t=this.questionRefs[e.localKey||e.id];t&&t.focus()},onDeleteQuestion(e,t){!this.isEditable||this.modelValue.length<=1||this.$buefy.dialog.confirm({message:this.$t("Delete this question?"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>{this.modelValue.splice(t,1),this.$emit("update:modelValue",this.modelValue)}})},onOptionInput(e,t,i,s){this.$emit("update:modelValue",this.modelValue)},onOptionBlur(e,t,i,s){},onAddOption(e,t){this.isEditable&&this.addOptionAfter(e,t,e.voteOptions.length-1)},addOptionAfter(e,t,i){if(!this.isEditable)return;const s=this.makeLocalOption();e.voteOptions.splice(i+1,0,s),this.$emit("update:modelValue",this.modelValue),this.$nextTick(()=>{const e=this.optionRefs[s.localKey];e&&e.focus()})},onDeleteOption(e,t,i,s){!this.isEditable||e.voteOptions.length<=1||(e.voteOptions.splice(s,1),this.$emit("update:modelValue",this.modelValue))},onDragStart(e,t){!this.isEditable||this.modelValue.length<2?e.preventDefault():(this.dragSourceIndex=t,e.dataTransfer.effectAllowed="move")},onDragOver(e){this.dragOverIndex=e},onDragEnd(){this.dragSourceIndex=null,this.dragOverIndex=null},onDrop(e){if(null===this.dragSourceIndex||this.dragSourceIndex===e)return this.dragSourceIndex=null,void(this.dragOverIndex=null);const t=this.modelValue.splice(this.dragSourceIndex,1)[0];this.modelValue.splice(e,0,t),this.$emit("update:modelValue",this.modelValue),this.dragSourceIndex=null,this.dragOverIndex=null},onOptionDragStart(e,t,i){this.isEditable?(this.optionDragSource={voteIndex:t,optionIndex:i},e.dataTransfer.effectAllowed="move"):e.preventDefault()},onOptionDragOver(e,t){this.optionDragOver={voteIndex:e,optionIndex:t}},onOptionDragEnd(){this.optionDragSource=null,this.optionDragOver=null},onOptionDrop(e,t){if(!this.optionDragSource||this.optionDragSource.voteIndex!==e)return this.optionDragSource=null,void(this.optionDragOver=null);const i=this.modelValue[e],s=this.optionDragSource.optionIndex;if(s===t)return this.optionDragSource=null,void(this.optionDragOver=null);const a=i.voteOptions.splice(s,1)[0];i.voteOptions.splice(t,0,a),this.$emit("update:modelValue",this.modelValue),this.optionDragSource=null,this.optionDragOver=null},makeLocalQuestion(){return{localKey:ot("q"),title:"",type:"single",voteOptions:[this.makeLocalOption(),this.makeLocalOption()]}},makeLocalOption(){return{localKey:ot("opt"),title:""}}}},rt=i(66262);const dt=(0,rt.A)(lt,[["render",it],["__scopeId","data-v-2f4944dc"]]);var ct=dt,ut=i(40834),mt=i(84743),pt=i.n(mt),ht=i(95256),gt=i(5448
11);new Set(["Question..","Question..."]),new Set(["Option 1","Option 2"]);let ft=1;function bt(e){return ft+=1,`${e}_${Date.now()}_${ft}`}var yt={components:{MyGroupsSelect:Ue.A,PostingInSelector:De.A,VoteFormQuestions:ct},props:["item","operation"],emits:["saved","delete","published","close","state-change"],data(){return{isLoading:!1,isBootstrapping:!1,isPublishing:!1,originalState:{name:"",votes:[]},bootstrapPromise:null,eventUuid:this.$route.query.eventUuid?this.$route.query.eventUuid:null,timeOptions:[],hasStartDate:!!this.item.dateStart,hasEndDate:!!this.item.dateEnd,timezoneSearch:"",umbrellaTitleManuallyEdited:!1,showUmbrellaInput:!1,popularTimezones:[{value:"America/Los_Angeles",label:"Pacific Time - Los Angeles"},{value:"America/Chicago",label:"Central Time - Chicago"},{value:"America/Toronto",label:"Eastern Time - Toronto"},{value:"America/New_York",label:"Eastern Time - New York"},{value:"America/Sao_Paulo",label:"Brasilia Standard Time - São Paulo"},{value:"Europe/London",label:"United Kingdom Time - London"},{value:"Europe/Madrid",label:"Central European Time - Madrid"},{value:"Europe/Paris",label:"Central European Time - Paris"},{value:"Europe/Bucharest",label:"Eastern European Time - Bucharest"},{value:"Asia/Dubai",label:"Gulf Standard Time - Dubai"},{value:"Asia/Kolkata",label:"India Standard Time - Kolkata"},{value:"Asia/Singapore",label:"Singapore Standard Time - Singapore"},{value:"Asia/Tokyo",label:"Japan Standard Time - Tokyo"}]}},watch:{"item.votes.length"(e){e>1&&(this.showUmbrellaInput=!0)},canSubmit:{immediate:!0,handler(){this.emitFormState()}},isPublishing:{handler(){this.emitFormState()}},isBootstrapping:{handler(){this.emitFormState()}}},created(){const e=Array.from({length:24},(e,t)=>t<=9?"0"+t:t.toString()),t=["00","15","30","45"];if(this.timeOptions=e.flatMap(e=>t.map(t=>`${e}:${t}`)),"create"!==this.operation||this.item.votes||(this.item.votes=[this.makeLocalQuestion()]),"update"===this.operation&&this.item.votes&&this.item.votes.length>0){const e=(this.item.votes[0].title||"").trim(),t=(this.item.name||"").trim();t&&t!==e&&(this.umbrellaTitleManuallyEdited=!0,this.showUmbrellaInput=!0),this.snapshotState()}},mounted(){this.item.timezone=this.item.timezone?this.item.timezone:this.user.timezone?this.user.timezone:this.tenant.timezone,this.item.dateStart?this.item.timeStart=pt()(this.item.dateStart).tz(this.item.timezone).format("HH:mm"):this.item.timeStart="00:00",this.item.dateEnd?this.item.timeEnd=pt()(this.item.dateEnd).tz(this.item.timezone).format("HH:mm"):this.item.timeEnd="23:59"},beforeUnmount(){},computed:{...(0,ut.L8)(["user","tenant","isGranted"]),isBootstrapped(){return!!this.item.id},questionsMode(){return this.isBootstrapped?"live":"local"},canSubmit(){const e=this.item.votes||[];if(0===e.length)return!1;const t=e.every(e=>(e.title||"").trim().length>0);return!!t&&(!(e.length>1)||!!(this.item.name||"").trim())},saveButtonLabel(){return"create"===this.operation?this.$t("Save draft"):this.$t("save")},hasEvent(){return!!this.eventUuid||!!this.item.event},isAnonymousModel:{get(){return!1!==this.item.isAnonymous},set(e){this.item.isAnonymous=e}},isAnonymityEditable(){return!1!==this.item.isEditable&&!1!==this.item.isDraft},eventDisplayName(){return this.$route.query.eventTitle?this.$route.query.eventTitle:this.item.event&&this.item.event.name?this.item.event.name:null},formattedTimezoneOffset(){if(!this.item.timezone)return"";const e=pt().tz(this.item.timezone).format("Z");return`GMT${e}`},formattedTimezoneCity(){if(!this.item.timezone)return"";const e=this.item.timezone.split("/");return e[e.length-1].replace(/_/g," ")},filteredPopularTimezones(){const e=this.timezoneSearch.toLowerCase();return this.popularTimezones.map(e=>({...e,offset:`GMT${pt().tz(e.value).format("Z")}`})).filter(t=>!e||t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},allTimezones(){return pt().tz.names().map(e=>{const t=e.split("/"),i=t[t.length-1].replace(/_/g," "),s=t.length>1?t[0].replace(/_/g," "):"";return{value:e,label:`${s?s+" - ":""}${i}`,offset:`GMT${pt().tz(e).format("Z")}`}})},filteredAllTimezones(){const e=this.timezoneSearch.toLowerCase();return e?this.allTimezones.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e)).slice(0,30):this.allTimezones.slice(0,20)}},methods:{emitFormState(){this.$emit("state-change",{canSubmit:this.canSubmit,isPublishing:this.isPublishing,isBootstrapping:this.isBootstrapping,isEditable:!1!==this.item.isEditable})},makeLocalQuestion(){return{localKey:bt("q"),title:"",type:"single",voteOptions:[{localKey:bt("opt"),title:""},{localKey:bt("opt"),title:""}]}},onFirstEdit(e){if("create"!==this.operation||this.isBootstrapped||this.isBootstrapping)return;const t=(this.item.votes?.[0]?.title||"").trim();(t||"question-title"!==e.kind)&&t&&this.bootstrap()},onQuestionTitleChanged({title:e}){this.item.votes&&1===this.item.votes.length&&(this.showUmbrellaInput||(this.item.name=e))},onUmbrellaTitleInput(){this.umbrellaTitleManuallyEdited=!0},expandUmbrellaTitle(){this.showUmbrellaInput=!0,this.umbrellaTitleManuallyEdited=!0,this.$nextTick(()=>
1{if(this.$refs.voteTitleInput){const e=this.$refs.voteTitleInput.$el?.querySelector("input");e&&e.focus()}})},collapseUmbrellaTitle(){this.showUmbrellaInput=!1,this.umbrellaTitleManuallyEdited=!1;const e=(this.item.votes?.[0]?.title||"").trim();this.item.name=e},bootstrap(){if(this.bootstrapPromise)return this.bootstrapPromise;if(this.isBootstrapped)return Promise.resolve();this.isBootstrapping=!0;const e=this.buildCollectionCreatePayload();return this.bootstrapPromise=this.$http.plain.post("/vote_collections",e).then(e=>{this.applyBackendCollection(e.data),this.snapshotState(e.data)}).catch(e=>{throw console.log(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Error saving")}),e}).finally(()=>{this.isBootstrapping=!1,this.bootstrapPromise=null}),this.bootstrapPromise},buildCollectionCreatePayload(){const e={isGeneral:this.item.isGeneral,hasPreliminaryResults:!!this.item.hasPreliminaryResults,hideVotersList:!!this.item.hideVotersList,isAnonymous:!1!==this.item.isAnonymous,timezone:this.item.timezone,name:(this.item.votes?.[0]?.title||"").trim()};if(this.hasStartDate&&this.item.dateStart){const[t,i]=(this.item.timeStart||"00:00").split(":");e.dateStart=pt()(this.item.dateStart).hour(t).minute(i).tz(this.item.timezone,!0).utc().toDate()}if(this.hasEndDate&&this.item.dateEnd){const[t,i]=(this.item.timeEnd||"23:59").split(":");e.dateEnd=pt()(this.item.dateEnd).hour(t).minute(i).tz(this.item.timezone,!0).utc().toDate()}return this.eventUuid?e.event="/api/v1/events/"+this.eventUuid:this.item.event&&"object"===typeof this.item.event&&this.item.event["@id"]&&(e.event=this.item.event["@id"]),this.item.unit&&(e.unit="object"===typeof this.item.unit?this.item.unit["@id"]:this.item.unit),e},applyBackendCollection(e){this.item.id=e.id,this.item.name=e.name,this.item.isEditable=!1!==e.isEditable,e.dateStart&&(this.item.dateStart=pt()(e.dateStart).tz(this.item.timezone||"UTC").toDate()),e.dateEnd&&(this.item.dateEnd=pt()(e.dateEnd).tz(this.item.timezone||"UTC").toDate());const t=this.item.votes||[],i=e.votes||[];if(i.length>0&&t.length>0){const e=t[0],s=i[0];e.id=s.id;const a=e.voteOptions||[],n=s.voteOptions||[];for(let t=0;t<Math.min(a.length,n.length);t++)a[t].id=n[t].id}},snapshotState(e){const t=e||this.item;this.originalState={name:t.name||"",hasPreliminaryResults:!!t.hasPreliminaryResults,hideVotersList:!!t.hideVotersList,isAnonymous:!1!==t.isAnonymous,isGeneral:!!t.isGeneral,unitId:t.unit?"object"===typeof t.unit?t.unit["@id"]:t.unit:null,votes:(t.votes||[]).filter(e=>e&&e.id).map(e=>({id:e.id,title:e.title,type:e.type,voteOptions:(e.voteOptions||[]).filter(e=>e&&e.id).map(e=>({id:e.id,title:e.title}))}))}},syncDiff(){if(!this.item.id)return Promise.resolve();const e=this.originalState,t=this.item.votes||[],i=[],s={};(this.item.name||"")!==(e.name||"")&&(s.name=this.item.name||""),!!this.item.hasPreliminaryResults!==e.hasPreliminaryResults&&(s.hasPreliminaryResults=!!this.item.hasPreliminaryResults),!!this.item.hideVotersList!==e.hideVotersList&&(s.hideVotersList=!!this.item.hideVotersList),!1!==this.item.isAnonymous!==e.isAnonymous&&(s.isAnonymous=!1!==this.item.isAnonymous),!!this.item.isGeneral!==e.isGeneral&&(s.isGeneral=!!this.item.isGeneral);const a=this.item.unit?"object"===typeof this.item.unit?this.item.unit["@id"]:this.item.unit:null;a!==e.unitId&&(s.unit=a),Object.keys(s).length>0&&i.push(this.$http.plain.patch("/vote_collections/"+this.item.id,s));const n=new Set(t.filter(e=>e.id).map(e=>e.id));for(const o of e.votes)n.has(o.id)||i.push(this.$http.plain.delete("/votes/"+o.id));for(const o of t)o.id?i.push(this.syncExistingQuestion(o,e.votes.find(e=>e.id===o.id))):i.push(this.syncNewQuestion(o));return Promise.all(i).then(()=>this.snapshotState())},syncExistingQuestion(e,t){if(!t)return Promise.resolve();const i=[],s=(e.title||"").trim();s&&s!==(t.title||"")&&i.push(this.$http.plain.patch("/votes/"+e.id,{title:s}));const a=e.type||"single";return a!==(t.type||"single")&&i.push(this.$http.plain.patch("/votes/"+e.id,{type:a})),i.push(this.syncOptionsForVote(e,t)),Promise.all(i)},syncNewQuestion(e){return this.$http.plain.post("/votes",{voteCollection:"/api/v1/vote_collections/"+this.item.id}).then(t=>{const i=t.data;e.id=i.id;const s=[],a=(e.title||"").trim();a&&a!==i.title&&s.push(this.$http.plain.patch("/votes/"+i.id,{title:a})),(e.type||"single")!==(i.type||"single")&&s.push(this.$http.plain.patch("/votes/"+i.id,{type:e.type}));const n=e.voteOptions||[],o=i.voteOptions||[],l=n.filter(e=>(e.title||"").trim().length>0),r=l.length>0?l:n;for(let e=0;e<r.length;e++){const t=r[e];if(e<o.length){t.id=o[e].id;const i=(t.title||"").trim();i&&i!==o[e].title&&s.push(this.$http.plain.patch("/vote_options/"+o[e].id,{title:i}))}else{const a=(t.title||"").trim()||"Option "+(e+1);s.push(this.$http.plain.post("/vote_options",{title:a,vote:"/api/v1/votes/"+i.id}).then(e=>{t.id=e.data.id}))}}for(let e=r.length;e<o.length;
1e++)s.push(this.$http.plain.delete("/vote_options/"+o[e].id));return l.length>0&&l.length!==n.length&&e.voteOptions.splice(0,e.voteOptions.length,...l),Promise.all(s)})},syncOptionsForVote(e,t){const i=[],s=e.voteOptions||[],a=t.voteOptions||[],n=new Set(s.filter(e=>e.id).map(e=>e.id));for(const o of a)n.has(o.id)||i.push(this.$http.plain.delete("/vote_options/"+o.id));for(const o of s)if(o.id){const e=a.find(e=>e.id===o.id),t=(o.title||"").trim();e&&t&&t!==(e.title||"")&&i.push(this.$http.plain.patch("/vote_options/"+o.id,{title:t}))}else{const t=(o.title||"").trim()||"Option";i.push(this.$http.plain.post("/vote_options",{title:t,vote:"/api/v1/votes/"+e.id}).then(e=>{o.id=e.data.id}))}return Promise.all(i)},onSettingChanged(){},toggleSetting(e){this.item[e]=!this.item[e]},toggleAnonymity(){this.isAnonymityEditable&&(this.isAnonymousModel=!this.isAnonymousModel,this.onSettingChanged("isAnonymous"))},onAudienceChange(e){this.item.isGeneral=e},onUnitChange(e){this.item.unit=e},setDateTimeEnd(){let e=this.item.dateStart?pt()(this.item.dateStart).tz(this.item.timezone):pt()().tz(this.item.timezone);this.item.dateEnd=e.add(1,"day").toDate(),this.item.timeEnd=pt()(this.item.dateEnd).tz(this.item.timezone).format("HH:mm")},addStartDate(){this.hasStartDate=!0;let e=pt()(new Date).seconds(0);e.minutes()>=30?this.item.dateStart=e.add(1,"hours").minutes(0).toDate():this.item.dateStart=e.minutes(30).toDate(),this.item.timeStart=pt()(this.item.dateStart).tz(this.item.timezone).format("HH:mm")},removeStartDate(){this.hasStartDate=!1,this.item.dateStart=null,this.item.timeStart=null},addEndDate(){this.hasEndDate=!0,this.setDateTimeEnd()},removeEndDate(){this.hasEndDate=!1,this.item.dateEnd=null,this.item.timeEnd=null},selectTimezone(e){this.item.timezone=e,this.timezoneSearch="",this.$refs.timezoneDropdown&&(this.$refs.timezoneDropdown.isActive=!1)},onTimezoneDropdownChange(e){e&&this.$nextTick(()=>{this.$refs.timezoneSearchInput&&this.$refs.timezoneSearchInput.focus()})},formatDateLong(e){return(0,ht.OS)(e,(0,gt.xy)(this.$store.state.tenant))},parseDateLong:ht.WZ,save(){this.saveDraftAndClose()},ensurePersisted(){if("create"===this.operation){if(this.bootstrapPromise)return this.bootstrapPromise;if(this.isBootstrapped)return this.patchCollectionDates();const e=(this.item.votes?.[0]?.title||"").trim();return e?this.bootstrap().then(()=>this.patchCollectionDates()):Promise.resolve()}return this.patchCollectionDates()},patchCollectionDates(){if(!this.item.id)return Promise.resolve();const e={timezone:this.item.timezone};if(this.hasStartDate&&this.item.dateStart){const[t,i]=(this.item.timeStart||"00:00").split(":");e.dateStart=pt()(this.item.dateStart).hour(t).minute(i).tz(this.item.timezone,!0).utc().toDate()}else e.dateStart=null;if(this.hasEndDate&&this.item.dateEnd){const[t,i]=(this.item.timeEnd||"23:59").split(":");e.dateEnd=pt()(this.item.dateEnd).hour(t).minute(i).tz(this.item.timezone,!0).utc().toDate()}else e.dateEnd=null;return this.$http.plain.patch("/vote_collections/"+this.item.id,e)},saveDraftAndClose(){this.ensurePersisted().then(()=>this.syncDiff()).then(()=>{this.item.id&&(this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}),this.$emit("saved",this.item.id)),this.$emit("close")}).catch(e=>{console.error(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Error saving")})})},publishAndClose(){this.isPublishing||this.isBootstrapping||(this.isPublishing=!0,this.ensurePersisted().then(()=>this.syncDiff()).then(()=>this.item.id?this.$http.plain.patch("/vote_collections/"+this.item.id+"/publish",{}):(this.$buefy.toast.open({type:"is-danger",message:this.$t("You must answer each question")}),null)).then(e=>{e&&(this.$buefy.snackbar.open({type:"is-success",message:this.$t("Published")}),this.$emit("published",this.item.id),this.$emit("close"))}).catch(e=>{console.error(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Error saving")})}).finally(()=>{this.isPublishing=!1}))}}};const vt=(0,rt.A)(yt,[["render",Ne],["__scopeId","data-v-80053f60"]]);var kt=vt},21662:function(e,t,i){"use strict";i.d(t,{A:function(){return Ct}});var s=i(20641),a=i(90033);const n={class:"icon is-small"},o={style:{margin:"auto","max-width":"1350px"}},l={key:0},r={key:0,class:"vd-hero skel-hero"},d={class:"vd-hero-content"},c={class:"date-block"},u={class:"ev-info"},m={class:"ev-details mt-2"},p={class:"ev-badges mt-2"},h={key:1},g={class:"vd-hero-content"},f={class:"vd-hero-date"},b={class:"vd-hero-date-main"},y={class:"vd-hero-date-weekday"},v={class:"vd-hero-title"},k={class:"vd-hero-meta"},C={class:"vd-hero-meta-line"},L={key:0,class:"ev-localtime-pill"},w={key:0,class:"vd-hero-meta-line"},_={key:1,class:"vd-hero-meta-line vd-hero-meta-list"},E={key:0},$={key:1},F={key:2},T={class:"vd-hero-rsvp"},S={class:"vd-hero-cover"},A=["src","alt"],P={class:"month-label"},I={key:0,class:"has-text-danger"},M={key:1},x={key:2},N={key:3},U={key:4},D={key:2,class:"has-text-centered mt-5 mb-5"},X={key:3,class:"card p-5 mb-6 has-text-centered has-text-weight-semibold has-text-dark is-vcentered no-event-card"},V={class:"is-size-6"},R={key:0},O={key:1,class:"no-events-upcoming"},Q={class:"no-events-icon mb-3"},B={class:"no-events-message"},G={class:"no-events-actions mt-5"},W={key:2},j={key:3},z={key:4},q={key:5},J=["href"],H={key:0,class:"mt-5 mb-6"},K={class:"icon is-small"},Y={key:0},Z={class:"is-hidden-touch ml-1"},ee={class:"icon is-small"},te={class:"is-hidden-touch"},ie={class:"icon is-small"},se={class:"is-hidden-mobile"},ae={key:0,class:"card is-flat event-tabs mb-3"},ne=["onClick"],oe={key:1,class:"mb-3 is-hidden-mobile is-flex is-align-items-center",style:{gap:"0.5rem"}},le={class:"icon is-small"},re={class:"icon is-small"},de={key:0,class:"indicator-dot"},ce={key:2,class:"card is-flat event-tabs event-tabs-mobile mb-2"}
1,ue=["onClick"],me={key:3,class:"mobile-controls-row is-hidden-tablet mb-3"},pe={class:"timezone-display-inline is-clickable is-size-7"},he={class:"icon is-small"},ge={class:"timezone-offset-inline"},fe={class:"timezone-dropdown-content"},be={class:"timezone-list"},ye={class:"timezone-list-header"},ve={class:"timezone-option"},ke={class:"has-text-grey"},Ce={class:"timezone-list-header mt-3"},Le={class:"timezone-option"},we={class:"has-text-grey"},_e={class:"mobile-filter-buttons"},Ee={class:"icon is-small"},$e={key:0,class:"indicator-dot"},Fe={key:4},Te={class:"filtersWrapper"},Se={class:"cell"},Ae={value:null},Pe=["value"],Ie={value:null},Me=["value"],xe={value:null},Ne={value:"draft"},Ue={value:"published"},De={key:3,class:"cell"},Xe={value:null},Ve=["value"],Re={class:"cell my-2"},Oe={key:0,class:"is-flex is-align-items-center is-justify-content-space-between mx-1"},Qe={class:"mr-2 has-text-weight-semibold"},Be=["aria-label"],Ge={key:6,class:"timezone-section is-hidden-mobile"},We={class:"timezone-display-inline is-clickable"},je={class:"icon is-small"},ze={class:"timezone-offset-inline"},qe={class:"timezone-dropdown-content"},Je={class:"timezone-list"},He={class:"timezone-list-header"},Ke={class:"timezone-option"},Ye={class:"has-text-grey"},Ze={class:"timezone-list-header mt-3"},et={class:"timezone-option"},tt={class:"has-text-grey"};function it(e,t,i,it,st,at){const nt=(0,s.g2)("font-awesome-icon"),ot=(0,s.g2)("GroupHeader"),lt=(0,s.g2)("OrgoLogo"),rt=(0,s.g2)("b-skeleton"),dt=(0,s.g2)("EventListCard"),ct=(0,s.g2)("b-button"),ut=(0,s.g2)("router-link"),mt=(0,s.g2)("ShowContent"),pt=(0,s.g2)("ItemViewModal"),ht=(0,s.g2)("EventForm"),gt=(0,s.g2)("b-input"),ft=(0,s.g2)("b-dropdown-item"),bt=(0,s.g2)("b-dropdown"),yt=(0,s.g2)("b-field"),vt=(0,s.g2)("b-select"),kt=(0,s.g2)("b-checkbox"),Ct=(0,s.g2)("b-datepicker");return(0,s.uX)(),(0,s.CE)("section",null,[i.isUser||st.isPublic?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(ot,{key:0,tab:"events","is-past-events":st.isPastEventsTab},{"mobile-action":(0,s.k6)(()=>[at.isCreateEventButtonVisible?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-small is-rounded",onClick:t[0]||(t[0]=(...e)=>at.openCreateEventModal&&at.openCreateEventModal(...e))},[(0,s.Lk)("span",n,[(0,s.bF)(nt,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Create")),1)])):(0,s.Q3)("",!0)]),_:1},8,["is-past-events"])),e.tenant?.logo&&!st.isIframe&&st.isPublic?((0,s.uX)(),(0,s.Wv)(lt,{key:1,"no-link":!0})):(0,s.Q3)("",!0),(0,s.Lk)("div",o,[(0,s.Lk)("div",{class:(0,a.C4)(["columns",e.$isMobile()?"is-flex is-flex-direction-column-reverse":""])},[(0,s.Lk)("div",{class:(0,a.C4)(["column",{"pt-0":st.isPublic}])},[!st.isLoading||st.items&&0!==st.items.length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",l,[st.isPastEventsTab||i.contact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("div",d,[(0,s.bF)(rt,{width:"100px",height:"30px",animated:""}),(0,s.bF)(rt,{width:"70px",height:"12px",class:"mt-2",animated:""}),(0,s.bF)(rt,{width:"75%",height:"28px",class:"mt-4",animated:""}),(0,s.bF)(rt,{width:"55%",height:"14px",class:"mt-2",animated:""}),(0,s.bF)(rt,{width:"90px",height:"38px",class:"mt-4",animated:"",rounded:!0})]),t[19]||(t[19]=(0,s.Lk)("div",{class:"vd-hero-cover skel-hero-cover"},null,-1))])),(0,s.bF)(rt,{width:"110px",height:"13px",class:"skel-month",animated:""}),((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(5,e=>(0,s.Lk)("div",{key:"ev-skel-"+e,class:"skel-ev-card"},[(0,s.Lk)("div",c,[(0,s.bF)(rt,{width:"28px",height:"11px",animated:""}),(0,s.bF)(rt,{width:"36px",height:"28px",class:"mt-1",animated:""})]),(0,s.Lk)("div",u,[(0,s.bF)(rt,{width:55+e%3*15+"%",height:"20px",animated:""},null,8,["width"]),(0,s.Lk)("div",m,[(0,s.bF)(rt,{width:"70px",height:"13px",animated:""}),(0,s.bF)(rt,{width:80+e%2*20+"px",height:"13px",animated:""},null,8,["width"])]),(0,s.Lk)("div",p,[(0,s.bF)(rt,{width:"50px",height:"18px",animated:"",rounded:!0}),(0,s.bF)(rt,{width:"70px",height:"18px",animated:"",rounded:!0})])]),t[20]||(t[20]=(0,s.Lk)("div",{class:"skel-ev-cover"},null,-1))])),64))])),st.items&&st.items.length>0?((0,s.uX)(),(0,s.CE)("div",h,[!st.isPastEventsTab&&at.firstUpcomingEvent?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["vd-hero is-clickable",{"is-public-aligned":st.isPublic}]),onClick:t[1]||(t[1]=e=>at.openEventShow(at.firstUpcomingEvent))},[(0,s.Lk)("div",g,[(0,s.Lk)("div",f,[(0,s.Lk)("span",b,(0,a.v_)(e.$filters.format(at.firstUpcomingEvent.dateTimeBegin,"shortDate")),1),(0,s.Lk)("span",y,(0,a.v_)(e.$filters.format(at.firstUpcomingEvent.dateTimeBegin,"dddd")),1)]),(0,s.Lk)("div",v,(0,a.v_)(at.firstUpcomingEvent.name),1),(0,s.Lk)("div",k,[(0,s.Lk)("div",C,[(0,s.bF)(nt,{icon:"fa-light fa-clock",class:"vd-hero-meta-icon"}),(0,s.Lk)("span",null,(0,a.v_)(e.$filters.formatTime(at.firstUpcomingEvent.dateTimeBegin)),1),at.firstUpcomingEvent.location&&at.firstUpcomingEvent.timezone?((0,s.uX)(),(0,s.CE)("span",L,(0,a.v_)(e.$t("LOCAL TIME")),1)):(0,s.Q3)("",!0)]),at.firstUpcomingEvent.location?((0,s.uX)(),(0,s.CE)("div",w,[(0,s.bF)(nt,{icon:"fa-light fa-location-dot",class:"vd-hero-meta-icon"}),(0,s.Lk)("span",null,(0,a.v_)(at.firstUpcomingEvent.location),1)])):(0,s.Q3)("",!0),at.firstUpcomingEvent.type&&at.firstUpcomingEvent.type.name||null!==at.firstUpcomingEvent.hasEventTicketing?((0,s.uX)(),(0,s.CE)("div",_,[at.firstUpcomingEvent.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",E,(0,a.v_)(e.$t("Ticket")),1)):!1===at.firstUpcomingEvent.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",$,(0,a.v_)(e.$t("Free")),1)):(0,s.Q3)("",!0),at.firstUpcomingEvent.type&&at.firstUpcomingEvent.type.name?((0,s.uX)(),(0,s.CE)("span",F,(0,a.v_)(at.firstUpcomingEvent.type.name),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),(0,s.Lk)("button",T,(0,a.v_)(at.firstUpcomingEvent.hasEventTicketing?e.$t("Get tickets"):e.$t("Register")),1)]),(0,s.Lk)("div",S,[at.eventCover(at.firstUpcomingEvent)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:at.eventCover(at.firstUpcomingEvent),alt:at.firstUpcomingEvent.name},null,8,A)):((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["cover-placeholder","cover-gradient-"+at.getGradientIndex(at.firstUpcomingEvent)])},[(0,s.bF)(nt,{icon:"fa-light fa-calendar-star",class:"cover-placeholder-icon cover-placeholder-icon--large"})],2))])],2)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.monthGroupedItems,(t,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"group-"+i},[(0,s.Lk)("div",P,(0,a.v_)(t.label),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.events,t=>((0,s.uX)(),(0,s.Wv)(dt,{key:t.id,event:t,onClick:e=>at.openEventShow(t)},{"meta-list":(0,s.k6)(()=>[!0===t.canEditEvent&&"draft"===t.status?((0,s.uX)(),(0,s.CE)("span",I,(0,a.v_)(e.$t("Draft")),1)):(0,s.Q3)("",!0),t.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",M,
1(0,a.v_)(e.$t("Ticket")),1)):!1===t.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",x,(0,a.v_)(e.$t("Free")),1)):(0,s.Q3)("",!0),t.type&&t.type.name?((0,s.uX)(),(0,s.CE)("span",N,(0,a.v_)(t.type.name),1)):(0,s.Q3)("",!0),st.unitId||st.isGeneralUnit||st.isPublic||!t.unit?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",U,[(0,s.bF)(nt,{icon:"fa-light fa-users",class:"ev-meta-list-icon"}),(0,s.eW)(" "+(0,a.v_)(t.unit.name),1)]))]),badges:(0,s.k6)(()=>[t.customStatus?((0,s.uX)(),(0,s.CE)("span",{key:0,style:(0,a.Tr)(at.getEventTypeStyle(t.customStatus)),class:"tag is-rounded is-small"},(0,a.v_)(t.customStatus.name),5)):(0,s.Q3)("",!0)]),_:2},1032,["event","onClick"]))),128))],64))),128))])):(0,s.Q3)("",!0),at.hasMorePages?((0,s.uX)(),(0,s.CE)("div",D,[(0,s.bF)(ct,{loading:st.isLoadingMore,class:"is-rounded mt-5",onClick:at.loadMoreItems},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Load more")),1)]),_:1},8,["loading","onClick"])])):(0,s.Q3)("",!0),st.items&&0===st.items.length&&at.filtersNumber>0&&!st.isLoading?((0,s.uX)(),(0,s.CE)("div",X,[(0,s.Lk)("p",V,(0,a.v_)(e.$t("noEventListByCriteria")),1)])):(0,s.Q3)("",!0),st.isLoading||(!st.items||0!==st.items.length||0!==at.filtersNumber)&&st.items?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:4,class:(0,a.C4)(i.contact?"":"card p-5 mb-6 has-text-centered has-text-weight-semibold has-text-dark is-vcentered no-event-card")},[(0,s.Lk)("p",{class:(0,a.C4)(i.contact?"has-text-grey-light":"is-size-5")},[i.contact?((0,s.uX)(),(0,s.CE)("span",R,(0,a.v_)(e.$t("No events for this profile")),1)):st.isPastEventsTab||st.isPublic?!st.isPastEventsTab&&st.isPublic?((0,s.uX)(),(0,s.CE)("span",W,(0,a.v_)(e.$t("No future events at this moment")),1)):i.isUser?i.isUser?((0,s.uX)(),(0,s.CE)("span",z,(0,a.v_)(e.$t("No events for this profile")),1)):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",j,(0,a.v_)(e.$t("noEventListYet")),1)):((0,s.uX)(),(0,s.CE)("span",O,[(0,s.Lk)("span",Q,[(0,s.bF)(nt,{icon:"fa-light fa-calendar-xmark"})]),(0,s.Lk)("span",B,(0,a.v_)(e.$t("No future events at this moment")),1),(0,s.Lk)("span",G,[(0,s.Lk)("a",{class:"no-events-link",onClick:t[2]||(t[2]=e=>at.togglePeriod("past"))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("View past events")),1)])])]))],2)],2)),!st.isIframe&&st.isPublic?((0,s.uX)(),(0,s.CE)("div",q,[(0,s.Lk)("p",{class:(0,a.C4)(["small-note-links is-size-7 ml-1 has-text-centered mb-6 has-text-dark mt-6",{"mt-6":!e.$isMobile()}])},[(0,s.eW)((0,a.v_)(e.$t("Membership and events platform built with"))+" ",1),(0,s.Lk)("a",{href:`https://orgo.space?utm_source=app&utm_medium=referral&utm_campaign=powered_by&utm_content=event_list&utm_term=${encodeURIComponent(e.tenant?.slug||"")}`,target:"_blank"}," Orgo.space ",8,J)],2),e.$isMobile()?((0,s.uX)(),(0,s.CE)("p",H," Â ")):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)],2),(0,s.bF)(pt,{modelValue:st.isItemModalVisible,"onUpdate:modelValue":t[3]||(t[3]=e=>st.isItemModalVisible=e),title:null,"maximize-route":st.selectedItemUuid?{name:"EventShow",params:{item:st.selectedItemUuid}}:null,onClose:at.closeItemModal},{actions:(0,s.k6)(()=>[st.selectedItem&&st.selectedItemUuid&&e.isGrantedOwner(st.selectedItem)?((0,s.uX)(),(0,s.Wv)(ut,{key:0,class:"button is-small is-light is-rounded",to:{name:"EventAttend",params:{item:st.selectedItemUuid}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",K,[(0,s.bF)(nt,{icon:"fa-light fa-users"})]),null!==st.selectedItemAttendersCount?((0,s.uX)(),(0,s.CE)("span",Y,(0,a.v_)(st.selectedItemAttendersCount),1)):(0,s.Q3)("",!0),(0,s.Lk)("span",Z,(0,a.v_)(e.$t("attenders")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0),st.selectedItem&&st.selectedItemUuid&&e.isGrantedOwner(st.selectedItem)?((0,s.uX)(),(0,s.Wv)(ut,{key:1,class:"button is-small is-light is-rounded",to:{name:"EventUpdate",params:{item:st.selectedItemUuid}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ee,[(0,s.bF)(nt,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",te,(0,a.v_)(e.$t("modify")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),default:(0,s.k6)(()=>[st.selectedItemUuid?((0,s.uX)(),(0,s.Wv)(mt,{key:0,ref:"showContent","event-uuid":st.selectedItemUuid,onLoaded:at.handleEventLoaded,onRefresh:at.handleEventRefresh,onDeleted:at.handleEventDeleted,onAttendersCountLoaded:at.handleAttendersCountLoaded},null,8,["event-uuid","onLoaded","onRefresh","onDeleted","onAttendersCountLoaded"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","maximize-route","onClose"]),(0,s.bF)(pt,{modelValue:st.isCreateEventModalVisible,"onUpdate:modelValue":t[5]||(t[5]=e=>st.isCreateEventModalVisible=e),title:e.$t("create")+" "+e.$t("event"),onClose:at.closeCreateEventModal},{"left-actions":(0,s.k6)(()=>[st.createEventTemplates.length>0?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-small is-primary is-rounded",onClick:t[4]||(t[4]=(...e)=>at.openCreateEventTemplatePicker&&at.openCreateEventTemplatePicker(...e))},[(0,s.Lk)("span",ie,[(0,s.bF)(nt,{icon:"fa-light fa-copy"})]),(0,s.Lk)("span",se,(0,a.v_)(st.createEventSelectedTemplate||e.$t("Start from template")),1)])):(0,s.Q3)("",!0)]),default:(0,s.k6)(()=>[st.createEventItem?((0,s.uX)(),(0,s.Wv)(ht,{key:0,ref:"createEventForm",item:st.createEventItem,operation:"create","save-success":at.handleCreateEventSuccess,onHasTemplates:at.onCreateEventHasTemplates,onTemplateSelected:at.onCreateEventTemplateSelected},null,8,["item","save-success","onHasTemplates","onTemplateSelected"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","title","onClose"]),(0,s.Lk)("div",{class:(0,a.C4)([e.$isMobile()?"is-fullwidth pb-0":"is-narrow",st.isPublic?"p-0":"",i.isUser?"":"column"])},[(0,s.Lk)("div",{class:"sticky-calendar",style:(0,a.Tr)({"max-width":e.$isMobile()?null:"300px",top:(st.isPublic,"20px")})},[i.isUser||e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ae,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(["upcoming","past"],t=>(0,s.Lk)("a",{key:t,class:(0,a.C4)(["button is-rounded is-small",{"is-active":at.isActivePeriod(t)&&!at.isDateSelected,"is-default":!at.isActivePeriod(t)||at.
1isDateSelected}]),onClick:e=>at.togglePeriod(t)},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("upcoming"===t?"Upcoming":"Past")),1)],10,ne)),64))])),i.isUser||st.isPublic?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",oe,[at.isCreateEventButtonVisible?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-small is-rounded is-fullwidth",onClick:t[6]||(t[6]=(...e)=>at.openCreateEventModal&&at.openCreateEventModal(...e))},[(0,s.Lk)("span",le,[(0,s.bF)(nt,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Create an event")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("button",{key:"filterListFilterDesktop",class:(0,a.C4)(["button is-small is-rounded has-indicator",st.isFilter?"is-light":"is-white"]),onClick:t[7]||(t[7]=e=>st.isFilter=!st.isFilter)},[(0,s.Lk)("span",re,[(0,s.bF)(nt,{icon:"fa-light fa-sliders"}),at.hasActiveFilters||st.filters.search?((0,s.uX)(),(0,s.CE)("span",de)):(0,s.Q3)("",!0)])],2)])),!i.isUser&&e.$isMobile()?((0,s.uX)(),(0,s.CE)("div",ce,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(["upcoming","past"],t=>(0,s.Lk)("a",{key:t,class:(0,a.C4)(["button is-rounded is-small",{"is-active":at.isActivePeriod(t)&&!at.isDateSelected,"is-default":!at.isActivePeriod(t)||at.isDateSelected}]),onClick:e=>at.togglePeriod(t)},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("upcoming"===t?"Upcoming":"Past")),1)],10,ue)),64))])):(0,s.Q3)("",!0),i.isUser||st.isPublic?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",me,[st.selectedTimezone?((0,s.uX)(),(0,s.Wv)(bt,{key:0,ref:"timezoneDropdownMobile",position:"is-bottom-right",class:"timezone-dropdown-inline ml-1",onActiveChange:at.onTimezoneDropdownChange},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",pe,[(0,s.Lk)("span",he,[(0,s.bF)(nt,{icon:"fa-light fa-globe"})]),(0,s.Lk)("span",ge,(0,a.v_)(at.formattedTimezoneOffset)+" "+(0,a.v_)(at.formattedTimezoneCity),1)])]),default:(0,s.k6)(()=>[(0,s.Lk)("div",fe,[(0,s.bF)(gt,{ref:"timezoneSearchInputMobile",modelValue:st.timezoneSearch,"onUpdate:modelValue":t[8]||(t[8]=e=>st.timezoneSearch=e),placeholder:e.$t("Search for a timezone"),icon:"magnifying-glass",class:"timezone-search-input"},null,8,["modelValue","placeholder"]),(0,s.Lk)("div",be,[(0,s.Lk)("p",ye,(0,a.v_)(e.$t("Popular Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.filteredPopularTimezones,e=>((0,s.uX)(),(0,s.Wv)(ft,{key:"m-"+e.value,onClick:t=>at.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",ve,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",ke,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128)),(0,s.Lk)("p",Ce,(0,a.v_)(e.$t("All Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.filteredAllTimezones,e=>((0,s.uX)(),(0,s.Wv)(ft,{key:"m-"+e.value,onClick:t=>at.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Le,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",we,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128))])])]),_:1},8,["onActiveChange"])):(0,s.Q3)("",!0),(0,s.Lk)("div",_e,[(0,s.Lk)("button",{key:"filterListFilterMobile",class:(0,a.C4)(["button is-small is-rounded has-indicator",st.isFilter?"is-light":"is-white"]),onClick:t[9]||(t[9]=e=>st.isFilter=!st.isFilter)},[(0,s.Lk)("span",Ee,[(0,s.bF)(nt,{icon:"fa-light fa-sliders"}),at.hasActiveFilters||st.filters.search?((0,s.uX)(),(0,s.CE)("span",$e)):(0,s.Q3)("",!0)])],2)])])),st.isFilter&&!i.isUser?((0,s.uX)(),(0,s.CE)("div",Fe,[(0,s.Lk)("div",Te,[(0,s.Lk)("div",{class:(0,a.C4)(["event-filters w-100",e.$isMobile()?"is-flex-direction-row":""])},[(0,s.Lk)("div",Se,[(0,s.bF)(yt,null,{default:(0,s.k6)(()=>[(0,s.bF)(gt,{modelValue:st.filters.search,"onUpdate:modelValue":t[10]||(t[10]=e=>st.filters.search=e),placeholder:e.$t("Title or description"),size:"is-small",rounded:"",expanded:"","icon-right":st.filters.search?"close-circle":"","icon-right-clickable":!!st.filters.search,onIconRightClick:at.clearSearch,onKeyup:at.filterItemsByWord},null,8,["modelValue","placeholder","icon-right","icon-right-clickable","onIconRightClick","onKeyup"])]),_:1})]),st.isPublic||i.isUser||!e.tenant.settingFeatures.events.hasCustomStatuses?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["cell",{"cell-half":e.$isMobile()}])}
1,[(0,s.bF)(yt,null,{default:(0,s.k6)(()=>[(0,s.bF)(vt,{modelValue:st.filters.customStatus,"onUpdate:modelValue":[t[11]||(t[11]=e=>st.filters.customStatus=e),at.filterItems],size:"is-small",rounded:"",expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("option",Ae,(0,a.v_)(e.$t("All statuses")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(st.eventStatuses,e=>((0,s.uX)(),(0,s.CE)("option",{key:"estatus_"+e.id,value:e["@id"]},(0,a.v_)(e.name),9,Pe))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})],2)),st.isPublic||i.isUser?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["cell",{"cell-half":e.$isMobile()}])},[(0,s.bF)(yt,null,{default:(0,s.k6)(()=>[(0,s.bF)(vt,{modelValue:st.filters.type,"onUpdate:modelValue":[t[12]||(t[12]=e=>st.filters.type=e),at.filterItems],size:"is-small",rounded:"",expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("option",Ie,(0,a.v_)(e.$t("All event types")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(st.eventTypes,e=>((0,s.uX)(),(0,s.CE)("option",{key:"etype_"+e.id,value:e["@id"]},(0,a.v_)(e.name),9,Me))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})],2)),st.isPublic||i.isUser?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,a.C4)(["cell",{"cell-half":e.$isMobile()}])},[(0,s.bF)(yt,null,{default:(0,s.k6)(()=>[(0,s.bF)(vt,{modelValue:st.filters.status,"onUpdate:modelValue":[t[13]||(t[13]=e=>st.filters.status=e),at.filterItems],size:"is-small",rounded:"",expanded:"","aria-label":e.$t("Status")},{default:(0,s.k6)(()=>[(0,s.Lk)("option",xe,(0,a.v_)(e.$t("Draft and published")),1),(0,s.Lk)("option",Ne,(0,a.v_)(e.$t("Draft")),1),(0,s.Lk)("option",Ue,(0,a.v_)(e.$t("Published")),1)]),_:1},8,["modelValue","aria-label","onUpdate:modelValue"])]),_:1})],2)),st.isPublic||i.isUser||!e.tenant.settingFeatures.events.hasSDG?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",De,[(0,s.bF)(yt,null,{default:(0,s.k6)(()=>[(0,s.bF)(vt,{modelValue:st.filters.sdg,"onUpdate:modelValue":[t[14]||(t[14]=e=>st.filters.sdg=e),at.filterItems],placeholder:e.$t("SDG"),size:"is-small",rounded:"",expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("option",Xe,(0,a.v_)(e.$t("all")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.sdgGoals,e=>((0,s.uX)(),(0,s.CE)("option",{key:"sdg_"+e.id,value:e.id},(0,a.v_)(e.name),9,Ve))),128))]),_:1},8,["modelValue","placeholder","onUpdate:modelValue"])]),_:1})])),(0,s.Lk)("div",Re,[(0,s.bF)(yt,{grouped:""},{default:(0,s.k6)(()=>[(0,s.bF)(kt,{modelValue:st.isMyEventsChecked,"onUpdate:modelValue":[t[15]||(t[15]=e=>st.isMyEventsChecked=e),at.filterItems],class:"nowrap",size:"is-small"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("myEvents")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})])],2)])])):(0,s.Q3)("",!0),e.$isMobile()||i.isUser?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Ct,{key:5,ref:"datepicker",modelValue:st.filters.selectedDate,"onUpdate:modelValue":[t[17]||(t[17]=e=>st.filters.selectedDate=e),at.filterItems],inline:"",class:(0,a.C4)(["datepicker-card mb-3",{"has-date-selected":at.isDateSelected}]),events:at.datepickerEvents,"unselectable-dates":at.unselectableDates,"min-date":st.calendarMinDate,"max-date":st.calendarMaxDate,"show-week-number":!1,onChangeMonth:at.onCalendarMonthChange,onChangeYear:at.onCalendarYearChange},{default:(0,s.k6)(()=>[st.filters.selectedDate?((0,s.uX)(),(0,s.CE)("div",Oe,[(0,s.Lk)("span",Qe,(0,a.v_)(e.$filters.format(st.filters.selectedDate,"monthDay")),1),(0,s.Lk)("button",{class:"date-clear-btn","aria-label":e.$t("Clear"),onClick:t[16]||(t[16]=(...e)=>at.clearDateFilter&&at.clearDateFilter(...e))},[(0,s.bF)(nt,{icon:"fa-light fa-xmark"})],8,Be)])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","class","events","unselectable-dates","min-date","max-date","onUpdate:modelValue","onChangeMonth","onChangeYear"])),st.selectedTimezone&&!i.isUser?((0,s.uX)(),(0,s.CE)("div",Ge,[(0,s.bF)(bt,{ref:"timezoneDropdown",position:"is-bottom-left",class:"timezone-dropdown-inline",onActiveChange:at.onTimezoneDropdownChange},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",We,[(0,s.Lk)("span",je,[(0,s.bF)(nt,{icon:"fa-light fa-globe"})]),(0,s.Lk)("span",ze,(0,a.v_)(at.formattedTimezoneOffset)+" "+(0,a.v_)(at.formattedTimezoneCity),1)])]),default:(0,s.k6)(()=>[(0,s.Lk)("div",qe,[(0,s.bF)(gt,{ref:"timezoneSearchInput",modelValue:st.timezoneSearch,"onUpdate:modelValue":t[18]||(t[18]=e=>
1st.timezoneSearch=e),placeholder:e.$t("Search for a timezone"),icon:"magnifying-glass",class:"timezone-search-input"},null,8,["modelValue","placeholder"]),(0,s.Lk)("div",Je,[(0,s.Lk)("p",He,(0,a.v_)(e.$t("Popular Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.filteredPopularTimezones,e=>((0,s.uX)(),(0,s.Wv)(ft,{key:e.value,onClick:t=>at.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Ke,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",Ye,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128)),(0,s.Lk)("p",Ze,(0,a.v_)(e.$t("All Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.filteredAllTimezones,e=>((0,s.uX)(),(0,s.Wv)(ft,{key:e.value,onClick:t=>at.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",et,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",tt,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128))])])]),_:1},8,["onActiveChange"])])):(0,s.Q3)("",!0)],4)],2)],2)])])}i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(18237),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var st=i(38221),at=i.n(st),nt=i(28782),ot=i(93231),lt=i(40834),rt=i(84743),dt=i.n(rt),ct=i(95256),ut=i(90957),mt=i(61273),pt=i(71537),ht=i(80762),gt=i(97891),ft=i(51300),bt=i(20537),yt={props:["isUser","contact"],data(){return{items:null,isPublic:"PublicEventsList"===this.$route.name,unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,isGeneralUnit:this.$route.query.generalUnit,eventTypes:null,eventStatuses:null,filters:{time:null,type:null,sdg:null,search:null,customStatus:null,status:null,isAnnualReport:!1,calendarDateBegin:null,calendarDateEnd:null,selectedDate:null},createLinkQuery:{},filteredColumns:[],isFilter:!1,itemsTotal:null,itemsPerPage:30,isLoading:!1,isLoadingMore:!1,itemsPageCurrent:this.$store.state.listValues.event.itemsPageCurrent,isMyEventsChecked:this.$store.state.listValues.event.isMyEventsChecked,sortField:this.$store.state.listValues.event.sortField,sortOrder:this.$store.state.listValues.event.sortOrder,defaultSortOrder:"asc",selectedTimezone:null,timezoneSearch:"",popularTimezones:[{value:"America/Los_Angeles",label:"Pacific Time - Los Angeles"},{value:"America/Chicago",label:"Central Time - Chicago"},{value:"America/Toronto",label:"Eastern Time - Toronto"},{value:"America/New_York",label:"Eastern Time - New York"},{value:"America/Sao_Paulo",label:"Brasilia Standard Time - São Paulo"},{value:"Europe/London",label:"United Kingdom Time - London"},{value:"Europe/Madrid",label:"Central European Time - Madrid"},{value:"Europe/Paris",label:"Central European Time - Paris"},{value:"Europe/Bucharest",label:"Eastern European Time - Bucharest"},{value:"Asia/Dubai",label:"Gulf Standard Time - Dubai"},{value:"Asia/Kolkata",label:"India Standard Time - Kolkata"},{value:"Asia/Singapore",label:"Singapore Standard Time - Singapore"},{value:"Asia/Tokyo",label:"Japan Standard Time - Tokyo"}],noResults:!1,isPastEventsTab:this.$route.query.past||"past"===this.$store.state.listValues.event.period,isPastEventsWithNoFuture:this.$route.query.pastNoFuture,onlyAdminsCanCreateEvents:!1,isIframe:!1,dateTime:null,allEventDates:[],isLoadingCalendarEvents:!1,calendarMinDate:null,calendarMaxDate:null,currentCalendarMonth:(new Date).getMonth(),currentCalendarYear:(new Date).getFullYear(),cachedMonths:{},isItemModalVisible:!1,selectedItemUuid:null,selectedItem:null,isCreateEventModalVisible:!1,createEventItem:null,createEventTemplates:[],createEventSelectedTemplate:null,selectedItemAttendersCount:null}},watch:{tenant(){this.selectedTimezone=this.user&&this.user.timezone?this.user.timezone:this.tenant?.timezone,this.convertTimezones()}},mounted(){setTimeout(()=>{const e=this.$el.querySelector(".sticky-calendar"),t=e.querySelector(".datepicker-header .pagination");if(t&&!t.querySelector(".today-button")){const i=document.createElement("button");i.className="button is-small is-rounded mx-1 today-button",i.innerHTML='<b-tooltip label="Current month"></b-tooltip>',i.addEventListener("click",()=>{const t=new Date,i=t.getMonth(),s=t.getFullYear(),a=e.querySelectorAll(".datepicker-header select");if(a.length>=2){const e=a[0],t=a[1];e.value=i.toString(),t.value=s.toString();const n=new Event("change",{bubbles:!0});e.dispatchEvent(n),t.dispatchEvent(n)}}),t.appendChild(i)}},500)},created(){this.filters.selectedDate=null,this.selectedTimezone=this.user?.timezone||this.tenant?.t
1imezone,this.$route.query.query&&(this.filters.search=this.$route.query.query,this.isFilter=!0),this.dateTime=new Date,this.isIframe=this.$route.query.iframe??!1;let e=this.$store.state.currentGroup;if(this.$store.state.currentGroupTab="events",this.onlyAdminsCanCreateEvents=e?.onlyAdminsCanCreateEvents,!this.isUser)if(this.unitId)this.createLinkQuery={unit:this.unitId};else{if(e&&e.id&&!["support","generalUnit"].includes(e)&&!this.isGeneralUnit)return this.$router.push({name:this.isPublic?"PublicEventsList":"EventList",query:{unit:e.id}});if("generalUnit"===e&&!this.isGeneralUnit)return this.$router.push({name:this.isPublic?"PublicEventsList":"EventList",query:{generalUnit:1}});this.isGeneralUnit&&(this.createLinkQuery={generalUnit:1})}this.isPublic||this.isUser||(this.$http.plain.get("/event_types?tenantSlug="+this.tenant.slug).then(e=>{this.eventTypes=e.data["hydra:member"]}).catch(e=>console.error(e)),this.tenant.settingFeatures.events.hasCustomStatuses&&this.$http.plain.get("/event_statuses").then(e=>{this.eventStatuses=e.data["hydra:member"]}).catch(e=>
1console.error(e))),this.isUser?(this.filters.isAnnualReport=!1,this.filterItems()):(this.loadItemsPage(),this.loadAllEventsForCalendar())},computed:{...(0,lt.L8)(["isGranted","isGrantedOwner","user","tenant","hasGroupToPost","sdgGoals","isCurrentGroupAdmin"]),timezoneAbbreviation(){if(!this.selectedTimezone)return"";const e=this.selectedTimezone.split("/"),t=e[e.length-1];return t.replace(/_/g," ")},formattedTimezoneOffset(){if(!this.selectedTimezone)return"";const e=dt().tz(this.selectedTimezone).format("Z");return`GMT${e}`},formattedTimezoneCity(){if(!this.selectedTimezone)return"";const e=this.selectedTimezone.split("/");return e[e.length-1].replace(/_/g," ")},filteredPopularTimezones(){const e=this.timezoneSearch.toLowerCase();return this.popularTimezones.map(e=>({...e,offset:`GMT${dt().tz(e.value).format("Z")}`})).filter(t=>!e||t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},allTimezones(){return dt().tz.names().map(e=>{const t=e.split("/"),i=t[t.length-1].replace(/_/g," "),s=t.length>1?t[0].replace(/_/g," "):"";return{value:e,label:`${s?s+" - ":""}${i}`,offset:`GMT${dt().tz(e).format("Z")}`}})},filteredAllTimezones(){const e=this.timezoneSearch.toLowerCase();return e?this.allTimezones.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e)).slice(0,30):this.allTimezones.slice(0,20)},datepickerEvents(){return this.allEventDates&&Array.isArray(this.allEventDates)?this.allEventDates.map(e=>{const t=new Date(e+"T00:00:00");return{date:t,type:"is-primary"}}):[]},unselectableDates(){if(!this.allEventDates||!Array.isArray(this.allEventDates))return null;const e=new Set(this.allEventDates);return t=>{const i=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),n=`${i}-${s}-${a}`;return!e.has(n)}},filtersNumber(){let e=0;return this.filters.type&&e++,this.filters.sdg&&e++,this.filters.search&&e++,this.filters.customStatus&&e++,this.filters.status&&e++,!0===this.isMyEventsChecked&&e++,!0===this.filters.isA
1nnualReport&&e++,e},isMoreThanOnePage(){return!!(this.itemsTotal>this.itemsPerPage&&this.itemsPerPage)},hasActiveFilters(){return this.filters.type||this.filters.sdg||this.filters.isAnnualReport||this.isMyEventsChecked||this.filters.customStatus||this.filters.status},isDateSelected(){return!!this.filters.selectedDate},hasMorePages(){if(!this.itemsTotal||!this.itemsPerPage)return!1;const e=Math.ceil(this.itemsTotal/this.itemsPerPage);return this.itemsPageCurrent<e},firstUpcomingEvent(){const e=(this.items||[]).filter(e=>"draft"!==e.status);return e.length?e.reduce((e,t)=>new Date(t.dateTimeBegin)<new Date(e.dateTimeBegin)?t:e):null},monthGroupedItems(){if(!this.items||!this.items.length)return[];const e=this.isPastEventsTab?null:this.firstUpcomingEvent,t=e?this.items.filter(t=>t.id!==e.id):this.items;if(!t.length)return[];const i=this.isPastEventsTab?-1:1,s=[...t].sort((e,t)=>i*(new Date(e.dateTimeBegin)-new Date(t.dateTimeBegin))),a=[];let n=null,o=null;return s.forEach(e=>{const t=dt()(e.dateTimeBegin),i=t.format("YYYY-MM");i!==n&&(o={monthKey:i,label:t.format("MMMM YYYY").toUpperCase(),events:[]},a.push(o),n=i),o.events.push(e)}),a},isCreateEventButtonVisible(){if(this.isUser||this.isPublic)return!1;const e=this.$store.state.currentGroup;if(!e)return this.isGranted(this.tenant.settingFeatures.events.whoCanPostPublic);if(this.isGeneralUnit){if(!this.isGranted(this.tenant.settingFeatures.events.whoCanPostPublic))return!1}else{if("LocalCenter"===e?.["@type"])return this.isGranted("EVENT_LOCAL",e);if(!this.isGeneralUnit)return this.onlyAdminsCanCreateEvents&&(this.isGranted("EVENT_TENANT")||this.isCurrentGroupAdmin)||!this.onlyAdminsCanCreateEvents}return!0}},methods:{moment:dt(),getGradientIndex(e){return(0,ct.F0)(e.name)},getEventTypeColor(e){return e&&e.color?(0,ct.eD)(e.color,"dark"===this.$store.state.theme):""},getEventTypeStyle(e){return e&&e.color?(0,ct.x3)(e.color,"dark"===this.$store.state.theme):{}},togglePeriod(e){this.isPastEventsTab="past"===e,this.isPastEventsWithNoFuture=!1,this.filters.selectedDate=null,this.$store.state.listValues.event.period=e,this.itemsPageCurrent=1,this.$store.state.listValues.event.itemsPageCurrent=1,this.loadItemsPage(),this.loadAllEventsForCalendar()},handleDateClick:function(e){let t={...this.createLinkQuery};t.dateBegin=e.dateStr,this.$router.push({name:"EventCreate",query:t})},calendarRefetch(e){this.calendarDateBegin=e.start,this.calendarDateEnd=e.end,this.loadItemsPage()},parseCalendarEvents(){let e=[];
1if(null!=this.items)for(let t of this.items){let i={};i.title=t.name,i.id=t.id,i.start=t.dateTimeBegin,i.end=t.dateTimeEnd,e.push(i)}return{id:"yyy",events:e}},openEventShow(e){return"undefined"===typeof e["@id"]&&e.event&&(e=this.items.find(t=>t.id===parseInt(e.event.id))),this.isPublic?this.$router.push({name:"EventPublicPage",params:{item:e.uuid}}):this.$isMobile()&&e.location&&e.currentEventAttend&&(e.hasAgenda||e.requiresRegistrationForm)?this.$router.push({name:"EventAppAgenda",params:{item:e.uuid}}):this.isGrantedOwner(e)?this.$router.push({name:"EventShow",params:{item:e.uuid}}):(this.selectedItemUuid=e.uuid,this.selectedItem=e,void(this.isItemModalVisible=!0))},closeItemModal(){this.isItemModalVisible=!1,this.selectedItemUuid=null,this.selectedItem=null,this.selectedItemAttendersCount=null},handleEventLoaded(e){this.selectedItem=e},handleAttendersCountLoaded(e){this.selectedItemAttendersCount=e},handleEventRefresh(){this.loadItemsPage()},handleEventDeleted(){this.closeItemModal(),this.loadItemsPage()},handleEventCreated(){this.loadItemsPage(),this.loadAllEventsForCalendar()},openCreateEventModal(){if(this.createEventItem={settings:{tenantLogo:!0,heroRadius:null,showTitle:!0,colorSelection:null,colorButton:null,disableSubscribe:!1,disableRegister:!1,lightThemeOnly:!1,isThankYouSingular:!1},isPublic:!0,sdg:[],hasEventTicketing:!1,timezone:this.user?.timezone||this.tenant?.timezone},this.unitId){const e=this.$store.state.spaces[this.tenant.slug]?.myGroups||[],t=e.find(e=>e.id===this.unitId);this.createEventItem.unit=t?t["@id"]:"/api/v1/units/"+this.unitId}else this.isGeneralUnit&&(this.createEventItem.unit=null);this.isCreateEventModalVisible=!0},closeCreateEventModal(){this.isCreateEventModalVisible=!1,this.createEventItem=null,this.createEventTemplates=[],this.createEventSelectedTemplate=null},onCreateEventHasTemplates(){this.$refs.createEventForm&&(this.createEventTemplates=this.$refs.createEventForm.eventTemplates)},onCreateEventTemplateSelected(e){this.createEventSelectedTemplate=e},openCreateEventTemplatePicker(){this.$refs.createEventForm&&(this.$refs.createEventForm.showTemplatePickerModal=!0)},handleCreateEventSuccess(e){this.$buefy.snackbar.open({message:this.$t("createdSuccessfully")}),this.closeCreateEventModal(),this.handleEventCreated(),this.$router.push({name:"EventShow",params:{item:e.data.uuid}})},navigateToEventShow(){this.selectedItemUuid&&this.$router.push({name:"EventShow",params:{item:this.selectedItemUuid}})},eventCover(e){return e.logo&&e.logo.includes("/demo?")?"https://picsum.photos/600/300?random="+e.id:e.logo&&e.logo.includes("demo__")?e.logo.replace("demo__",""):e.logo?e.logo.includes("https")?e.logo:nt.ze+nt.DJ+"event/"+e.logo:e.logoFromAlbum?e.logoFromAlbum.includes("https")?e.logoFromAlbum:nt.ze+nt.DJ+"eventimage/"+e.logoFromAlbum:null},filterItemsByWord:at()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return!1;this.filterItems()},400),clearSearch(){this.filters.search=null},filterItems(){this.itemsPageCurrent=1,this.$store.state.listValues.event.itemsPageCurrent=1,this.$store.state.listValues.event.isMyEventsChecked=this.isMyEventsChecked,this.loadItemsPage()},getFiltersQueryString(){let e="";if(this.isUser&&!this.contact&&(e+="&user="+this.isUser,this.isPastEventsTab=!0),this.contact&&(e+="&external="+this.contact,this.isPastEventsTab=!0),this.isUser||this.filters&&this.filters.selectedDate||(e+=this.isPastEventsTab||this.isPastEventsWithNoFuture?"&past=1":"&upcoming=1"),this.isPublic||(this.unitId&&(e+="&unit="+this.unitId),this.isGeneralUnit&&(e+="&exists[unit]=false")),this.filters.type&&(e+="&type="+this.filters.type),this.filters.customStatus&&(e+="&customStatus="+this.filters.customStatus),!this.filters.status||this.isPublic||this.isUser||(e+="&status="+this.filters.status),this.filters.sdg&&(e+="&sdg="+this.filters.sdg),this.filters.isA
1nnualReport&&(e+="&isAnnualReport=1"),this.isMyEventsChecked&&(e+="&owner="+this.user.id),this.filters.search&&(e+="&name="+this.filters.search),this.filters.selectedDate){const t=dt()(this.filters.selectedDate),i=t.clone().startOf("day"),s=t.clone().endOf("day");e+="&dateTimeBegin[after]="+i.format("YYYY-MM-DD")+"T00:00:00",e+="&dateTimeBegin[before]="+s.format("YYYY-MM-DD")+"T23:59:59"}return e},getOrderQueryString(){const e=this.isPastEventsTab?"desc":"asc";return"&order["+this.sortField+"]="+e},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.$store.state.listValues.event.itemsPageCurrent=e,this.loadItemsPage()},loadMoreItems(){this.itemsPageCurrent++,this.$store.state.listValues.event.itemsPageCurrent=this.itemsPageCurrent,this.loadItemsPage(!0)},loadAllEventsForCalendar(e=null,t=null){if(this.isLoadingCalendarEvents)return;const i=null!==e?e:this.currentCalendarMonth,s=null!==t?t:this.currentCalendarYear,a=dt()({year:s,month:i}
1).subtract(1,"month"),n=dt()({year:s,month:i}).add(1,"month"),o=dt()({year:s,month:i}).format("YYYY-MM"),l=[a.format("YYYY-MM"),o,n.format("YYYY-MM")];if(this.cachedMonths[o])return;this.isLoadingCalendarEvents=!0;const r=a.clone().startOf("month").format("YYYY-MM-DD"),d=n.clone().endOf("month").format("YYYY-MM-DD");let c="";this.isPublic||(this.unitId&&(c+="&unit="+this.unitId),this.isGeneralUnit&&(c+="&generalUnit=1")),c+="&dateStart="+r+"&dateEnd="+d,this.tenant&&this.tenant.dateCreated?this.calendarMinDate=new Date(this.tenant.dateCreated):this.calendarMinDate=dt()().subtract(2,"years").toDate(),this.calendarMaxDate=dt()().add(1,"year").toDate();let u=this.isPublic?"public_event_dates":"event_dates";if(this.isPublic){let e=this.$route.query.workspace?this.$route.query.workspace:this.tenant?.slug;c="tenant="+e+c}c&&(c="?"+c),this.$http.plain.get(`/${u}`+c).then(e=>{const t=e.data.dates||[],i=new Set(this.allEventDates);t.forEach(e=>i.add(e)),this.allEventDates=Array.from(i),l.forEach(e=>{this.cachedMonths[e]=!0}),this.isLoadingCalendarEvents=!1}).catch(e=>{console.error("Error loading event dates:",e),this.isLoadingCalendarEvents=!1})},onCalendarMonthChange(e){let t=this.currentCalendarYear;11===this.currentCalendarMonth&&0===e?t+=1:0===this.currentCalendarMonth&&11===e&&(t-=1),this.currentCalendarMonth=e,this.currentCalendarYear=t,this.loadAllEventsForCalendar(e,t)},onCalendarYearChange(e){this.currentCalendarYear=e,this.loadAllEventsForCalendar(this.currentCalendarMonth,e)},loadItemsPage(e=!1){e?this.isLoadingMore=!0:(this.isLoading=!0,this.items=null,this.itemsTotal=0),this.noResults=!1;let t=this.getOrderQueryString(),i=this.getFiltersQueryString();this.unitId!==this.$store.state.listValues.event.unitId&&(this.$store.commit("resetListValuesEvent"),this.$store.state.listValues.event.unitId=this.unitId,this.$store.state.listValues.event.isMyDiscussionsChecked=!1,this.itemsPageCurrent=1);let s=this.isUser?"event_attends":"events",a="";if(this.isPublic){let e=this.$route.query.workspace?this.$route.query.workspace:this.tenant?.slug;s="public_events",a="tenant="+e+"&"}this.$http.plain.get(`/${s}?`+a+"&page="+this.itemsPageCurrent+t+i).then(t=>{const i=this.isUser?t.data["hydra:member"].map(e=>e.event):t.data["hydra:member"];if(this.items=e?[...this.items,...i]:i,this.itemsTotal=t.data["hydra:totalItems"],!this.isUser&&!this.isPublic&&!e&&(this.$route.query.upcoming||!this.isPastEventsTab&&!this.isPastEventsWithNoFuture)&&0===this.itemsTotal){let e={...this.createLinkQuery};return this.$router.push({name:"EventList",query:e})}this.items.length||(this.noResults=!0),this.selectedTimezone=this.user&&this.user.timezone?this.user.timezone:this.tenant?.timezone,this.convertTimezones()}).catch(e=>console.error(e)).finally(()=>{e?this.isLoadingMore=!1:this.isLoading=!1})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.$store.state.listValues.event.sortField=e,this.$store.state.listValues.event.sortOrder=t,this.$store.state.listValues.event.itemsPageCurrent=1,this.loadItemsPage()},convertTimezones(){this.items&&this.items.forEach(e=>{const t=e.location&&e.timezone?e.timezone:this.selectedTimezone;e.dateTimeBegin&&(e.dateTimeBegin=dt()(e.dateTimeBegin).utc().format("YYYY-MM-DDTHH:mm"),t&&(e.dateTimeBegin=dt()(e.dateTimeBegin).tz(t).format("YYYY-MM-DDTHH:mm"))),e.dateTimeEnd&&(e.dateTimeEnd=dt()(e.dateTimeEnd).utc().format("YYYY-MM-DDTHH:mm"),t&&(e.dateTimeEnd=dt()(e.dateTimeEnd).tz(t).format("YYYY-MM-DDTHH:mm")))})},selectTimezone(e){this.selectedTimezone=e,this.timezoneSearch="",this.convertTimezones(),this.$refs.timezoneDropdown&&(this.$refs.timezoneDropdown.isActive=!1),this.$refs.timezoneDropdownMobile&&(this.$refs.timezoneDropdownMobile.isActive=!1)},onTimezoneDropdownChange(e){e&&this.$nextTick(()=>{this.$refs.timezoneSearchInput&&this.$refs.timezoneSearchInput.focus(),this.$refs.timezoneSearchInputMobile&&this.$refs.timezoneSearchInputMobile.focus()})},isActivePeriod(e){return"upcoming"===e?!this.isPastEventsTab&&!this.isPastEventsWithNoFuture:this.isPastEventsTab||this.isPastEventsWithNoFuture},clearDateFilter(){this.filters.selectedDate=null,this.dateTime=new Date,this.filterItems()}},components:{FontAwesomeIcon:mt.gc,TimezoneSelect:ut.A,GroupHeader:ot.A,OrgoLogo:pt.A,ItemViewModal:ht.A,ShowContent:gt.A,EventForm:ft.A,EventListCard:bt.A}},vt=i(66262);const kt=(0,vt.A)(yt,[["render",it],["__scopeId","data-v-cf4bccd8"]]);var Ct=kt},22536:function(e,t,i){"use strict";i.d(t,{A:function(){return q}});var s=i(20641),a=i(90033),n=i(53751);const o=["data-session-uuid"],l={class:"agenda-time-rail"},r={class:"agenda-time-start"},d={class:"agenda-time-end"},c={class:"agenda-se-layout"},u={class:"agenda-se-top"},m={class:"agenda-se-content-top"},p={class:"agenda-se-title-row"},h={class:"agenda-readonly-title"},g=["title"],f={class:"agenda-se-meta"},b={key:0,class:"agenda-se-meta-item agenda-se-location"},y=["title"],v=["src","alt"],k={class:"agenda-se-content-bottom"},C={key:0,class:"agenda-se-map-line"},L=["href"],w={class:"agenda-se-map-line-name"},_={key:0,class:"agenda-se-speakers-row"},E=["title","onClick"],$={class:"agenda-se-speaker-name"},F={class:"agenda-readonly-desc"},T={key:0,class:"agenda-se-map-preview"},S={class:"agenda-se-map-preview-name"},A=["href","title"],P=["src","alt"],I=["src"],M={class:"agenda-se-actions-row"},x=["aria-expanded"],N={class:"is-small"},U=["title"];function D(e,t,i,D,X,V){const R=(0,s.g2)("font-awesome-icon"),O=(0,s.g2)("b-tag"),Q=(0,s.g2)("LogoThumbnail"),B=(0,s.gN)("safe-html");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["agenda-row",{"is-highlighted":i.isHighlighted}]),"data-session-uuid":i.subEvent.uuid,style:(0,a.Tr)(i.stageColor?{"--stage-color":i.stageColor}:null)},[(0,s.Lk)("div",l,[(0,s.Lk)("span",r,(0,a.v_)(V.formatRowTime(i.subEvent.dateTimeBegin)),1),(0,s.Lk)("span",d,(0,a.v_)(V.formatRowTime(i.subEvent.dateTimeEnd)),1)]),(0,s.Lk)("div",{class:(0,a.C4)(["agenda-readonly-item agenda-se-card mr-2",{"is-clickable":i.isExpandable}]),onClick:t[7]||(t[7]=(...e)=>V.onCardClick&&V.onCardClick(...e))},[(0,s.Lk)("div",c,[(0,s.Lk)("div",u,[(0,s.Lk)("div",m,[(0,s.Lk)("div",p,[(0,s.Lk)("span",h,(0,a.v_)(i.subEvent.name),1),i.showShare&&!i.subEvent.logo?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"agenda-se-share-btn",title:e.$t("Share session"),onClick:t[0]||(t[0]=(0,n.D$)(t=>e.$emit("share",i.subEvent),["stop"]))},[(0,s.bF)(R,{icon:"fa-light fa-share-nodes",size:"xs"})],8,g)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.subEvent.tags||[],(e,t)=>((0,s.uX)(),(0,s.Wv)(O,{key:t,"is-rounded":"",size:"is-small"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e),1)]),_:2}
1,1024))),128)),(0,s.RG)(e.$slots,"title-actions",{item:i.subEvent},void 0,!0)]),(0,s.Lk)("div",f,[i.subEvent.location?((0,s.uX)(),(0,s.CE)("span",b,[(0,s.bF)(R,{icon:"fa-light fa-microphone-lines"}),(0,s.eW)(" "+(0,a.v_)(i.subEvent.location),1)])):(0,s.Q3)("",!0),(0,s.RG)(e.$slots,"meta-actions",{item:i.subEvent},void 0,!0)])]),i.showShare&&i.subEvent.logo?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["agenda-se-share-btn agenda-se-share-btn--cover",e.$isMobile()?"mt-3":""]),title:e.$t("Share session"),onClick:t[1]||(t[1]=(0,n.D$)(t=>e.$emit("share",i.subEvent),["stop"]))},[(0,s.bF)(R,{icon:"fa-light fa-share-nodes",size:"xs"})],10,y)):(0,s.Q3)("",!0),i.subEvent.logo?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["agenda-se-cover",e.$isMobile()?"mt-2 mr-2":"mt-1"])},[(0,s.Lk)("img",{src:V.logoSrc,alt:i.subEvent.name,class:"agenda-se-cover-img"},null,8,v)],2)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",k,[(0,s.bF)(n.eB,{name:"agenda-fade"},{default:(0,s.k6)(()=>[V.hasMapLocation&&!X.localExpanded?((0,s.uX)(),(0,s.CE)("div",C,[(0,s.Lk)("a",{href:V.mapsUrl,target:"_blank",rel:"noopener noreferrer",onClick:t[2]||(t[2]=(0,n.D$)(()=>{},["stop"]))},[(0,s.bF)(R,{icon:"fa-light fa-map-location-dot"}),(0,s.Lk)("span",w,(0,a.v_)(i.subEvent.subEventPlaceName||e.$t("Map location")),1)],8,L)])):(0,s.Q3)("",!0)]),_:1}),i.subEvent.speakers&&i.subEvent.speakers.length?((0,s.uX)(),(0,s.CE)("div",_,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.subEvent.speakers,t=>((0,s.uX)(),(0,s.CE)("button",{key:t.id,type:"button",class:"agenda-se-speaker-chip",title:t.speakerName,onClick:(0,n.D$)(s=>e.$emit("speaker-click",{item:i.subEvent,speaker:t}),["stop"])},[(0,s.bF)(Q,{item:V.getSpeakerThumbnailItem(t),"is-type":"roundSmall","is-inline":""},null,8,["item"]),(0,s.Lk)("span",$,(0,a.v_)(t.speakerName),1)],8,E))),128))])):(0,s.Q3)("",!0),V.hasDescription?((0,s.uX)(),(0,s.CE)("div",{key:1,ref:"descContent",class:(0,a.C4)(["agenda-readonly-desc-wrap",{"is-expanded":X.localExpanded,"is-collapsed":!X.localExpanded&&X.shouldTruncate}]),style:(0,a.Tr)(X.localExpanded&&X.descMaxHeight?{maxHeight:X.descMaxHeight}:null)},[(0,s.bo)((0,s.Lk)("div",F,null,512),[[B,i.subEvent.description]])],6)):(0,s.Q3)("",!0),(0,s.bF)(n.eB,{name:"agenda-fade"},{default:(0,s.k6)(()=>[V.hasMapLocation&&X.localExpanded?((0,s.uX)(),(0,s.CE)("div",T,[(0,s.Lk)("div",S,[(0,s.bF)(R,{icon:"fa-light fa-map-location-dot"}),(0,s.Lk)("span",null,(0,a.v_)(i.subEvent.subEventPlaceName||e.$t("Map location")),1)]),(0,s.Lk)("a",{href:V.mapsUrl,target:"_blank",rel:"noopener noreferrer",class:"agenda-se-map-preview-media",title:e.$t("Open in Maps"),onClick:t[4]||(t[4]=(0,n.D$)(()=>{},["stop"]))},[V.staticMapUrl&&!X.staticMapFailed?((0,s.uX)(),(0,s.CE)("img",{key:0,src:V.staticMapUrl,alt:i.subEvent.subEventPlaceName||e.$t("Map location"),class:"agenda-se-map-preview-img",loading:"lazy",onError:t[3]||(t[3]=e=>X.staticMapFailed=!0)},null,40,P)):((0,s.uX)(),(0,s.CE)("iframe",{key:1,src:V.mapEmbedUrl,class:"agenda-se-map-preview-iframe",loading:"lazy",referrerpolicy:"no-referrer-when-downgrade",sandbox:"allow-scripts allow-same-origin"},null,8,I))],8,A)])):(0,s.Q3)("",!0)]),_:1}),(0,s.Lk)("div",M,[(0,s.RG)(e.$slots,"content-actions",{item:i.subEvent},void 0,!0),V.canExpand?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"agenda-se-desc-toggle is-size-7 has-text-weight-semibold ml-1","aria-expanded":X.localExpanded,onClick:t[5]||(t[5]=(0,n.D$)((...e)=>V.toggleExpand&&V.toggleExpand(...e),["stop"]))},[(0,s.Lk)("span",null,(0,a.v_)(X.localExpanded?e.$t("Show less"):e.$t("Show more")),1),(0,s.Lk)("span",N,[(0,s.bF)(R,{icon:"fa-light fa-chevron-down",class:(0,a.C4)({"is-flipped":X.localExpanded})},null,8,["class"])])],8,x)):(0,s.Q3)("",!0),i.showShare?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"agenda-se-share-btn agenda-se-share-btn--inline",title:e.$t("Share session"),onClick:t[6]||(t[6]=(0,n.D$)(t=>e.$emit("share",i.subEvent),["stop"]))},[(0,s.bF)(R,{icon:"fa-light fa-share-nodes",size:"xs"})],8,U)):(0,s.Q3)("",!0)])])])],2)],14,o)}var X=i(84743),V=i.n(X),R=i(31823),O=i(95256),Q=i(28782);const B=4.5,G=2;var W={name:"AgendaRow",components:{LogoThumbnail:R.A},props:{subEvent:{type:Object,required:!0},isExpandable:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},isHighlighted:{type:Boolean,default:!1},stageColor:{type:String,default:null},showShare:{type:Boolean,default:!0},coverMediaPath:{type:String,default:"event"},timezone:{type:String,default:null}}
1,emits:["click","share","speaker-click"],data(){return{localExpanded:!1,shouldTruncate:!1,staticMapFailed:!1,descMaxHeight:null}},computed:{logoSrc(){const e=this.subEvent.logo;return e?e.startsWith("http")?e:(0,O.F9)(e,this.coverMediaPath):null},hasDescription(){const e=this.subEvent.description;return!!e&&e.replace(/<[^>]*>/g,"").replace(/ /g," ").trim().length>0},hasMapLocation(){return null!=this.subEvent.placeLatitude&&null!=this.subEvent.placeLongitude},mapsUrl(){return this.hasMapLocation?`https://www.google.com/maps/search/?api=1&query=${this.subEvent.placeLatitude},${this.subEvent.placeLongitude}`:null},staticMapUrl(){return this.subEvent.placesApiId?Q.ze+Q.DJ+"places_api/"+this.subEvent.placesApiId+".png":null},mapEmbedUrl(){if(!this.hasMapLocation)return"";const e=this.subEvent.placeLatitude,t=this.subEvent.placeLongitude;return`https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3000!2d${t}!3d${e}!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2s${e}%2C${t}!5e0!3m2!1sen!2s!4v1`},canExpand(){return this.hasDescription&&this.shouldTruncate||this.hasMapLocation}},watch:{"subEvent.description"(){this.$nextTick(this.checkTruncation)}},mounted(){this.checkTruncation(),window.addEventListener("resize",this.checkTruncation)},beforeUnmount(){window.removeEventListener("resize",this.checkTruncation)},methods:{formatRowTime(e){if(!e)return"";const t=V().utc(e);return this.timezone?t.tz(this.timezone).format("HH:mm"):t.local().format("HH:mm")},checkTruncation(){const e=this.$refs.descContent;if(!e||!this.hasDescription)return void(this.shouldTruncate=!1);const t=parseFloat(getComputedStyle(e).fontSize),i=t*B;this.shouldTruncate=e.scrollHeight>i+G},onCardClick(){this.$emit("click",this.subEvent)},toggleExpand(){if(!this.localExpanded){const e=this.$refs.descContent;e&&(this.descMaxHeight=e.scrollHeight+"px")}this.localExpanded=!this.localExpanded},getSpeakerThumbnailItem(e){const t=e.speakerName||"",i=t.trim().split(/\s+/),s=e.user||e.contact;let a=e.id;if(s&&"object"===typeof s)a=s.id||e.id;else if(s&&"string"===typeof s){const e=s.match(/\/(\d+)$/);e&&(a=parseInt(e[1],10))}return{id:a,logo:e.speakerLogo||null,name:t,firstName:i[0]||"",lastName:i.slice(1).join(" ")||"",fullName:t,"@type":e.user?"User":"Contact"}}}},j=i(66262);const z=(0,j.A)(W,[["render",D],["__scopeId","data-v-f31cd45a"]]);var q=z},22539:function(e,t,i){"use strict";i.d(t,{Ce:function(){return r},bd:function(){return l}});i(18111),i(7588);var s=i(32148);const a={sans:{heading:"inter",body:"inter"},serif:{heading:"source-serif",body:"source-serif"},mixed:{heading:"playfair",body:"inter"}};function n(e){const t=e?.typography;if("string"===typeof t){const e=a[t]||a.sans;return{...e,scale:"normal"}}return{heading:t?.heading||"inter",body:t?.body||"inter",scale:t?.scale||"normal"}}function o(e,t){return!0===e?.header?.overHero&&(("hero"===t?.type||"banner"===t?.type)&&!!(t.image||t.videoBackground||t.layout?.backgroundImage))}function l(e,t=null){const i=n(e);return[o(e,t)?"o-w-over-hero":null,`o-w-theme--${e?.theme||"business"}`,`o-w-heading--${i.heading}`,`o-w-body--${i.body}`,`o-w-scale--${i.scale}`,`o-w-radius--${e?.radius||"soft"}`,`o-w-nav--${e?.header?.menuHover||"background"}`,`o-w-header--${e?.header?.layout||"logoLeft"}`,`o-w-footer--${e?.footer?.layout||"simple"}`,`o-w-article--${e?.articles?.layout||"standard"}`].filter(Boolean)}function r(e){const t=e?.colors||{},i={},a={primary:"--orgo-color-primary",secondary:"--orgo-w-accent",accent:"--orgo-w-accent",surface:"--orgo-app-bg",surfaceAlt:"--orgo-card-bg",text:"--orgo-body-text",headerBg:"--orgo-w-header-bg",footerBg:"--orgo-w-footer-bg"};return Object.entries(a).forEach(([e,s])=>{t[e]&&(i[s]=t[e])}),t.primary&&(i["--orgo-w-on-primary"]=(0,s.B_)(t.primary,"#ffffff","#1a1a1a")),i}},22556:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033);const n={class:"card p-4 mb-4"},o={class:"is-flex is-justify-content-space-between is-align-items-center mb-4"},l={class:"title is-size-6 mb-0"},r={class:"icon-text"},d={class:"icon is-small"},c={class:"mb-4"},u={value:"called"},m={value:"emailed"},p={class:"is-flex is-justify-content-flex-end mt-2"},h=["disabled"],g={class:"icon is-small"};function f(e,t,i,f,b,y){const v=(0,s.g2)("font-awesome-icon"),k=(0,s.g2)("b-input"),C=(0,s.g2)("b-select"),L=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",o,[(0,s.Lk)("h3",l,[(0,s.Lk)("span",r,[(0,s.Lk)("span",d,[(0,s.bF)(v,{icon:"fa-light fa-note-sticky"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Notes")),1)])])]),(0,s.Lk)("div",c,[(0,s.bF)(k,{modelValue:b.newNoteText,"onUpdate:modelValue":t[0]||(t[0]=e=>b.newNoteText=e),type:"textarea",maxlength:"512",rows:"2",placeholder:e.$t(y.config.placeholder)},null,8,["modelValue","placeholder"]),(0,s.bF)(L,{label:e.$t("Action"),class:"mt-2"},{default:(0,s.k6)(()=>[(0,s.bF)(C,{modelValue:b.newNoteAction,"onUpdate:modelValue":t[1]||(t[1]=e=>b.newNoteAction=e),expanded:""},{default:(0,s.k6)(()=>[t[3]||(t[3]=(0,s.Lk)("option",{value:null},"â",-1)),(0,s.Lk)("option",u,(0,a.v_)(e.$t("Called")),1),(0,s.Lk)("option",m,(0,a.v_)(e.$t("Emailed")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),(0,s.Lk)("div",p,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-small is-rounded",{"is-loading":b.isAdding}]),"data-test":"add-note",disabled:!b.newNoteText.trim()||b.isAdding,onClick:t[2]||(t[2]=(...e)=>y.addNote&&y.addNote(...e))},[(0,s.Lk)("span",g,[(0,s.bF)(v,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Add note")),1)],10,h)])])])}const b={contact:{collection:"/contact_notes",subjectIri:"/api/v1/contacts/",subjectParam:"contact",placeholder:"Add a note about this contact"},user:{collection:"/user_notes",subjectIri:"/api/v1/users/",subjectParam:"user",placeholder:"Add a note about this user"}};var y={name:"EntityNotes",props:{entityType:{type:String,required:!0,validator:e=>Object.keys(b).includes(e)},entityId:{type:[Number,String],required:!0}},emits:["note-added"],data(){return{newNoteText:"",newNoteAction:null,isAdding:!1}},computed:{config(){return b[this.entityType]}},methods:{addNote(){const e=this.newNoteText.trim();e&&(this.isAdding=!0,this.$http.plain.post(this.config.collection,{[this.config.subjectParam]:this.config.subjectIri+this.entity
1Id,text:e,action:this.newNoteAction}).then(()=>{this.newNoteText="",this.newNoteAction=null,this.$buefy.toast.open({type:"is-success",message:this.$t("Note added"),duration:2e3}),this.$emit("note-added")}).catch(e=>{console.log(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Failed to add note"),duration:3e3})}).finally(()=>{this.isAdding=!1}))}}},v=i(66262);const k=(0,v.A)(y,[["render",f]]);var C=k},25889:function(e,t,i){"use strict";i.d(t,{A:function(){return k}});var s=i(20641),a=i(90033);const n={class:"event-date-box"},o={class:"event-date-month"},l={class:"event-date-day"},r={class:"event-date-info"},d={class:"has-text-weight-semibold event-date-line"},c={class:"event-time-range is-flex is-align-items-center"},u={class:"event-time-range-core"},m={key:0,class:"event-time-tz-abbr"};function p(e,t,i,p,h,g){const f=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["event-datetime-row",{"hide-tz-mobile":i.hideTimezoneAbbrOnMobile}])},[(0,s.Lk)("div",n,[(0,s.Lk)("span",o,(0,a.v_)(g.formattedMonthAbbr),1),(0,s.Lk)("span",l,(0,a.v_)(g.formattedDay),1)]),(0,s.Lk)("div",r,[(0,s.Lk)("p",d,(0,a.v_)(g.formattedDateLine),1),(0,s.Lk)("p",c,[(0,s.Lk)("span",u,(0,a.v_)(g.formattedTimeRangeCore),1),g.timezoneAbbr?((0,s.uX)(),(0,s.CE)("span",m," Â "+(0,a.v_)(g.timezoneAbbr),1)):(0,s.Q3)("",!0),i.showTimezoneToggle?((0,s.uX)(),(0,s.CE)("span",{key:1,class:"icon is-small is-clickable ml-2",onClick:t[0]||(t[0]=t=>e.$emit("toggle-timezone"))},[(0,s.bF)(f,{icon:"fa-light fa-globe"})])):(0,s.Q3)("",!0)])]),(0,s.RG)(e.$slots,"actions",{},void 0,!0)],2)}var h=i(84743),g=i.n(h),f=i(95256),b={name:"EventDateTimeBox",props:{dateTimeBegin:{type:String,default:null},dateTimeEnd:{type:String,default:null},timezone:{type:String,default:null},showTimezoneToggle:{type:Boolean,default:!0},hideTimezoneAbbrOnMobile:{type:Boolean,default:!1}},emits:["toggle-timezone"],computed:{formattedMonthAbbr(){return this.dateTimeBegin?g()(this.dateTimeBegin).format("MMM").toUpperCase():""},formattedDay(){return this.dateTimeBegin?g()(this.dateTimeBegin).format("D"):""},formattedDateLine(){if(!this.dateTimeBegin)return"";const e=g()(this.dateTimeBegin),t=g()().year(),i=e.year();return i===t?e.format(this.$filters.datePattern("weekdayLong")):e.format(this.$filters.datePattern("weekdayLongYear"))},timezoneAbbr(){return this.timezone&&this.dateTimeBegin?g().tz(this.dateTimeBegin,this.timezone).format("z"):""},formattedTimeRangeCore(){if(!this.dateTimeBegin)return"";const e=g()(this.dateTimeBegin).format("HH:mm");if(!this.dateTimeEnd||this.dateTimeEnd===this.dateTimeBegin)return e;const t=g()(this.dateTimeEnd).format("HH:mm");if((0,f.lp)(this.dateTimeEnd,this.dateTimeBegin))return`${e} - ${t}`;const i=g()(this.dateTimeEnd);return`${e} - ${i.format(this.$filters.datePattern("shortDate"))} ${t}`}}},y=i(66262);const v=(0,y.A)(b,[["render",p],["__scopeId","data-v-2c65c42c"]]);var k=v},27089:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return R}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"modal-card",style:{"max-width":"520px",margin:"0 auto"}},l={class:"modal-card-head is-flex is-justify-content-space-between is-align-items-flex-start pb-3 px-5 pt-5"},r={class:"modal-card-title mb-0"},d={key:0,class:"is-size-6-half has-text-grey mt-2 is-flex is-align-items-center",style:{gap:"4px"}},c={class:"modal-card-body p-5"},u={key:0,class:"my-0 mt-2"},m={key:1,class:"manage-cat-list"},p={class:"manage-cat-name"},h={class:"manage-cat-actions"},g=["title","onClick"],f={class:"icon is-small"},b=["onClick"],y={class:"icon is-small"},v=["onClick"],k={class:"icon is-small"},C={class:"manage-cat-name manage-cat-name-editing"},L=["onKeyup"],w={class:"manage-cat-actions"},_=["onClick"],E={class:"icon is-small"},$={class:"icon is-small"},F={key:2,class:"has-text-centered has-text-grey py-5"},T={class:"icon is-medium mb-2"},S={class:"is-size-6-half"},A={class:"manage-cat-create"},P={class:"control has-icons-left"},I=["placeholder"],M={class:"icon is-left is-small"};function x(e,t,i,x,N,U){const D=(0,s.g2)("font-awesome-icon"),X=(0,s.g2)("b-loading");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("header",l,[(0,s.Lk)("div",null,[(0,s.Lk)("p",r,(0,a.v_)(e.$t("Discussion categories")),1),U.currentGroupName?((0,s.uX)(),(0,s.CE)("p",d,[(0,s.bF)(D,{icon:U.currentGroupIcon},null,8,["icon"]),(0,s.eW)(" "+(0,a.v_)(U.currentGroupName),1)])):(0,s.Q3)("",!0)]),(0,s.Lk)("button",{type:"button",class:"delete ml-4",style:{"flex-shrink":"0"},onClick:t[0]||(t[0]=t=>e.$emit("close"))})]),(0,s.Lk)("section",c,[(0,s.bF)(X,{modelValue:N.isLoading,"onUpdate:modelValue":t[1]||(t[1]=e=>N.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),N.items&&N.items.length>0?((0,s.uX)(),(0,s.CE)("hr",u)):(0,s.Q3)("",!0),N.items&&N.items.length>0?((0,s.uX)(),(0,s.CE)("div",m,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(N.items,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.id,class:"manage-cat-item"},[N.editingId!==i.id?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("div",p,(0,a.v_)(i.name),1),(0,s.Lk)("div",h,[(0,s.Lk)("button",{class:(0,a.C4)(["manage-cat-btn is-clickable",{"is-public":i.hasPublicPosting}]),title:i.hasPublicPosting?e.$t("Anyone can post"):e.$t("Only admins and moderators can post"),onClick:e=>U.togglePermission(i)},[(0,s.Lk)("span",f,[(0,s.bF)(D,{icon:i.hasPublicPosting?"fa-light fa-users":"fa-light fa-lock"},null,8,["icon"])])],10,g),(0,s.Lk)("button",{class:"manage-cat-btn is-clickable",onClick:e=>U.startEdit(i)},[(0,s.Lk)("span",y,[(0,s.bF)(D,{icon:"fa-light fa-pencil"})])],8,b),(0,s.Lk)("button",{class:"manage-cat-btn is-clickable manage-cat-btn-danger",onClick:e=>U.confirmDelete(i)},[(0,s.Lk)("span",k,[(0,s.bF)(D,{icon:"fa-light fa-trash"})])],8,v)])],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("div",C,[(0,s.bo)((0,s.Lk)("input",{ref_for:!0,ref:"editInput_"+i.id,"onUpdate:modelValue":t[2]||(t[2]=e=>N.editingName=e),class:"manage-cat-input",onKeyup:[(0,n.jR)(e=>U.saveEdit(i),["enter"]),t[3]||(t[3]=(0,n.jR)(e=>U.cancelEdit(),["escape"]))]},null,40,L),[[n.Jo,N.editingName]])]),(0,s.Lk)("div",w,[(0,s.Lk)("button",{class:"manage-cat-btn manage-cat-btn-save is-clickable",onClick:e=>U.saveEdit(i)},[(0,s.Lk)("span",E,[(0,s.bF)(D,{icon:"fa-light fa-check"})])],8,_),(0,s.Lk)("button",{class:"manage-cat-btn is-clickable",onClick:t[4]||(t[4]=e=>U.cancelEdit())},[(0,s.Lk)("span",$,[(0,s.bF)(D,{icon:"fa-light fa-xmark"})])])])],64))]))),128))])):N.items&&0===N.items.length&&!N.isLoading?((0,s.uX)(),(0,s.CE)("div",F,[(0,s.Lk)("span",T,[(0,s.bF)(D,{icon:"fa-light fa-folder-open",size:"lg"}
1)]),(0,s.Lk)("p",S,(0,a.v_)(e.$t("No records found")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",A,[(0,s.Lk)("div",P,[(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":t[5]||(t[5]=e=>N.newCategoryName=e),class:"input is-rounded",type:"text",placeholder:e.$t("New category..."),onKeyup:t[6]||(t[6]=(0,n.jR)(e=>U.createCategory(),["enter"]))},null,40,I),[[n.Jo,N.newCategoryName]]),(0,s.Lk)("span",M,[(0,s.bF)(D,{icon:"fa-light fa-plus"})])])])])])}var N=i(40834),U=i(61273),D={data(){return{items:null,filterUnit:this.$route.query.unit?this.$route.query.unit:null,isLoading:!1,editingId:null,editingName:"",newCategoryName:""}},computed:{...(0,N.L8)(["isGranted","user","tenant"]),filterUnitId(){let e=null;return this.filterUnit&&(e=this.filterUnit,e.includes("/api/v1")&&(e=e.split("/").pop())),e},currentGroupName(){const e=this.$store.state.currentGroup;return e?"generalUnit"===e?this.tenant.name:e.name||null:null},currentGroupIcon(){const e=this.$store.state.currentGroup;return e&&"generalUnit"!==e?e.isJoinable?"fa-light fa-hashtag":"fa-light fa-lock":"fa-light fa-hashtag"}},created(){this.loadItemsPage()},methods:{loadItemsPage(){this.isLoading=!0;let e="";e=this.filterUnit?"&unit="+this.filterUnitId:"&exists[unit]=false",this.$http.plain.get("/discussion_namespaces?tenant="+this.tenant.id+e).then(e=>{this.items=e.data["hydra:member"]}).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})},createCategory(){if(!this.newCategoryName.trim())return;let e={name:this.newCategoryName.trim(),hasPublicPosting:!0};this.filterUnit&&(e.unit="/api/v1/units/"+this.filterUnitId),this.$http.plain.post("/discussion_namespaces",e).then(()=>{this.newCategoryName="",this.loadItemsPage(),this.$emit("save"),this.$buefy.toast.open(this.$t("createdSuccessfully"))}).catch(e=>console.log(e))},startEdit(e){this.editingId=e.id,this.editingName=e.name,this.$nextTick(()=>{const t=this.$refs["editInput_"+e.id];if(t){const e=Array.isArray(t)?t[0]:t;e.focus(),e.select()}})},saveEdit(e){this.editingName.trim()&&this.$http.plain.patch("/discussion_namespaces/"+e.id,{name:this.editingName.trim()}).then(()=>{this.editingId=null,this.editingName="",this.loadItemsPage(),this.$emit("save"),this.$buefy.toast.open(this.$t("updatedSuccessfully"))}).catch(e=>console.log(e))},cancelEdit(){this.editingId=null,this.editingName=""},togglePermission(e){this.$http.plain.patch("/discussion_namespaces/"+e.id,{hasPublicPosting:!e.hasPublicPosting}).then(()=>{this.loadItemsPage()}).catch(e=>console.log(e))},confirmDelete(e){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+e.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deleteItem(e)})},deleteItem(e){this.$http.plain.delete("/discussion_namespaces/"+e.id).then(()=>{this.loadItemsPage(),this.$emit("save"),this.$buefy.toast.open(this.$t("deleted"))}).catch(e=>console.log(e))}},components:{FontAwesomeIcon:U.gc}},X=i(66262);const V=(0,X.A)(D,[["render",x],["__scopeId","data-v-d709c8d0"]]);var R=V},28404:function(e,t,i){"use strict";i.d(t,{A:function(){return Qa}});i(18111),i(22489);var s=i(20641),a=i(90033),n=i(53751);const o={class:"columns is-gapless"},l={class:"column is-one-third"},r=["onClick"],d={class:"is-flex is-align-items-center is-justify-content-space-between"},c={class:"is-flex is-align-items-center"},u={class:"icon is-small mr-2"},m={class:"has-text-weight-bold group-card-name"},p={key:0},h={key:1},g={key:2},f={class:"is-flex is-justify-content-space-between mt-4"},b={class:"has-text-grey"},y={class:"icon-text"},v={class:"icon is-small"},k={class:"has-text-grey"},C={class:"icon-text"},L={class:"icon is-small"},w={class:"column"},_={class:"is-flex is-flex-direction-row is-align-items-center mb-2"},E={key:0,class:"has-text-dark has-text-weight-semibold mr-4"},$={key:1,class:"has-text-dark has-text-weight-semibold mr-4 is-flex is-align-items-center is-justify-content-space-between"},F={key:0},T={key:1,class:"has-text-centered py-6"},S={class:"icon is-large has-text-grey-light"},A={class:"has-text-grey mt-4 is-size-5"},P={key:2,class:"is-fullwidth drive-table"},I={class:"icon-text"},M=["onClick"],x=["title"],N={class:"file-info-mobile"},U={key:0},D=["onClick"],X=["title"],V={class:"file-info-mobile"},R={key:0},O=["onClick"],Q=["title"],B={class:"file-info-mobile"},G=["onClick"],W=["title"],j={class:"file-info-mobile"},z=["title"],q=["title"],J={key:0,class:"is-flex is-align-items-center"},H={class:"ml-2 nowrap is-trim"},K={class:"nowrap"},Y={key:0,class:"nowrap"},Z={key:1,class:"nowrap"},ee=["onClick"],te={class:"icon is-small"},ie={class:"icon-text"},se={class:"icon is-small"},ae={class:"icon-text"},ne={class:"icon is-small"},oe={class:"icon-text"},le={class:"icon is-small"},re={class:"icon-text"},de={class:"icon is-small"},ce={class:"icon-text"},ue={class:"icon is-small"},me={class:"icon-text"},pe={class:"icon is-small"},he={key:"unit-view"},ge={class:"button is-small is-primary is-rounded"},fe={class:"icon is-small"},be={class:"p-3"},ye={class:"icon is-small"},ve={class:"icon is-small"},ke={class:"icon is-small"},Ce={class:"icon is-small"},Le=["aria-label"],we={class:"icon is-small"},_e={class:"icon-text"},Ee={class:"icon is-small"},$e={class:"icon-text"},Fe={class:"icon is-small"},Te={class:"icon-text"},Se={class:"icon is-small"},Ae={class:"icon-text"},Pe={class:"icon is-small"},Ie={class:"icon-text"},Me={class:"icon is-small"},xe={class:"icon-text has-text-danger"},Ne={class:"icon is-small"}
1,Ue={class:"page-list-controls mb-4"},De={class:"controls-left"},Xe={key:0,class:"is-flex is-align-items-center drive-breadcrumb"},Ve={key:0},Re={key:1},Oe={class:"icon is-small mx-1 has-text-grey-light"},Qe={class:"icon-text"},Be={class:"icon is-small"},Ge={class:"icon is-small mx-1 has-text-grey-light"},We=["onClick"],je={class:"breadcrumb-text"},ze={class:"icon is-small mx-1 has-text-grey-light"},qe={class:"button is-white is-rounded breadcrumb-button"},Je={class:"breadcrumb-text"},He={key:1,class:"is-hidden-mobile is-flex"},Ke={class:"icon is-small"},Ye=["aria-label"],Ze={class:"icon is-small"},et={class:"icon-text"},tt={class:"icon is-small"},it={class:"icon-text"},st={class:"icon is-small"},at={class:"icon-text"},nt={class:"icon is-small"},ot={class:"icon-text"},lt={class:"icon is-small"},rt={class:"icon-text has-text-danger"},dt={class:"icon is-small"},ct={class:"controls-right"},ut={class:"drive-add-item-desktop is-hidden-mobile"},mt={class:"icon is-small"},pt={class:"icon is-small"},ht={class:"icon is-small"},gt={class:"icon is-small"},ft={class:"drive-drop-cloud"},bt={class:"drive-drop-pill"},yt={class:"drive-drop-pill-text"},vt={class:"icon-text drive-drop-pill-target"},kt={class:"icon is-small"},Ct={key:1,class:"dropzone-message"},Lt={class:"icon is-large"},wt={class:"mt-3"},_t={key:"table-view"},Et={class:"is-selected"},$t={class:"icon-text pl-1"},Ft=["onClick"],Tt=["title"],St={class:"file-info-mobile"},At={key:0},Pt=["onClick"],It=["title"],Mt={class:"file-info-mobile"},xt={key:0},Nt=["onClick"],Ut=["title"],Dt={class:"file-info-mobile"},Xt=["onClick"],Vt=["title"],Rt={class:"file-info-mobile"},Ot=["title"],Qt=["title"],Bt={key:0,class:"is-flex is-align-items-center"},Gt={class:"ml-2 nowrap is-trim"},Wt={class:"nowrap"},jt={key:0,class:"nowrap"},zt={key:1,class:"nowrap"},qt=["onClick"],Jt={class:"icon is-small"},Ht={class:"icon-text"},Kt={class:"icon is-small"},Yt={class:"icon-text"},Zt={class:"icon is-small"},ei={class:"icon-text"},ti={class:"icon is-small"},ii={class:"icon-text"},si={class:"icon is-small"},ai={class:"icon-text"},ni={class:"icon is-small"},oi={class:"icon-text"},li={class:"icon is-small"},ri={key:"gallery-view",class:"py-4"},di={key:0,class:"o-gallery"},ci=["onDragstart","onDragover","onDrop"],ui={key:1},mi={class:"is-flex is-justify-content-center"},pi={class:"modal-card-head p-4"},hi={class:"modal-card-title"},gi={class:"icon-text is-size-5"},fi={key:0,class:"icon-text is-size-5"},bi={class:"modal-card-body p-4"},yi={class:"folder-navigation"},vi={class:"has-text-weight-semibold mb-3"},ki={class:"breadcrumb mb-3 pl-0","aria-label":"breadcrumbs"},Ci={class:"icon is-small"},Li=["onClick"],wi={class:"folder-list card p-4",style:{"max-height":"400px","overflow-y":"auto"}},_i={key:0,class:"has-text-centered p-5"},Ei={key:1,class:"has-text-centered p-5 has-text-grey"},$i={class:"icon is-large"},Fi={key:2},Ti=["onClick","onDblclick"],Si={class:"is-flex is-align-items-center is-justify-content-space-between"},Ai={class:"icon-text"},Pi={class:"icon is-small"},Ii={key:0,class:"tag is-warning ml-2"},Mi=["onClick"],xi={class:"icon is-small is-white has-text-grey-light"},Ni={class:"modal-card-foot p-4"},Ui={class:"icon-text"},Di={class:"mb-4"},Xi={class:"is-size-5 has-text-weight-semibold"},Vi={class:"icon-text"},Ri={class:"icon is-small"},Oi={class:"mb-4"},Qi={class:"mb-3"},Bi={class:"buttons"},Gi={class:"icon-text"},Wi={class:"icon is-small"},ji={class:"icon-text"},zi={class:"icon is-small"},qi={class:"is-flex is-justify-content-space-between is-align-items-flex-start mb-4"},Ji={class:"is-size-5 has-text-weight-semibold"},Hi={class:"icon-text"},Ki={class:"icon is-small"},Yi={class:"has-text-grey is-size-6-half mt-3"},Zi=["title"],es={class:"icon is-small"},ts={class:"is-flex is-align-items-center mb-1"},is={class:"icon is-small mr-2"},ss={class:"has-text-weight-semibold"},as={class:"is-size-7 has-text-grey mb-3"},ns={class:"control"},os=["disabled"],ls={class:"icon-text"},rs={class:"icon is-small"},ds={class:"share-scope-section mb-2"},cs={class:"is-flex is-align-items-center mb-1"},us={class:"icon is-small mr-2"},ms={class:"has-text-weight-semibold"},ps={class:"is-size-7 has-text-grey mb-3"},hs={class:"control"},gs=["disabled"],fs={class:"icon-text"},bs={class:"icon is-small"},ys={class:"is-size-7 has-text-grey mb-1 mt-3"},vs={class:"icon-text"},ks={class:"icon is-small"},Cs={class:"control"},Ls=["disabled"],ws={class:"icon-text"},_s={class:"icon is-small"},Es={key:1,class:"has-text-warning is-size-7 mb-2"},$s={class:"icon-text"},Fs={class:"icon is-small"},Ts={class:"icon-text"},Ss={class:"icon is-small"},As={key:1,class:"globe-slash-stack"},Ps=["disabled"],Is={class:"icon-text"},Ms={class:"icon is-small"},xs={key:"no-items-message",class:"is-flex is-align-items-center is-justify-content-center mt-6"},Ns={class:"icon is-small mr-3"},Us={class:"drag-preview-card"},Ds={class:"icon is-small mr-2"};function Xs(e,t,i,Xs,Vs,Rs){const Os=(0,s.g2)("GroupHeader"),Qs=(0,s.g2)("b-loading"),Bs=(0,s.g2)("font-awesome-icon"),Gs=(0,s.g2)("b-input"),Ws=(0,s.g2)("b-field"),js=(0,s.g2)("b-skeleton"),zs=(0,s.g2)("b-table-column"),qs=(0,s.g2)("LogoThumbnail"),Js=(0,s.g2)("router-link"),Hs=(0,s.g2)("b-dropdown-item"),Ks=(0,s.g2)("b-dropdown"),Ys=(0,s.g2)("b-table"),Zs=(0,s.g2)("MobileViewHeader"),ea=(0,s.g2)("b-tooltip"),ta=(0,s.g2)("view-toggle"),ia=(0,s.g2)("vue-dropzone"),sa=(0,s.g2)("DriveGalleryTile"),aa=(0,s.g2)("b-pagination"),na=(0,s.g2)("b-modal"),oa=(0,s.g2)("b-button"),la=(0,s.g2)("DriveLightbox"),ra=(0,s.g2)("DriveUploadPanel"),da=(0,s.g2)("DragLayer");return(0,s.uX)(),(0,s.CE)(s.FK,null,[(0,s.Lk)("section",{class:(0,a.C4)([{"is-drag-active":Vs.isDragDropActive},"o-maxwidth"]),onDragenter:t[52]||(t[52]=(0,n.D$)((...e)=>Rs.handleSectionDragEnter&&Rs.handleSectionDragEnter(...e),["prevent"])),onDragover:t[53]||(t[53]=(0,n.D$)((...e)=>Rs.handleSectionDragOver&&Rs.handleSectionDragOver(...e),["prevent"])),onDragend:t[54]||(t[54]=(...e)=>Rs.handleSectionDragEnd&&Rs.handleSectionDragEnd(...e)),onDrop:t[55]||(t[55]=(0,n.D$)((...e)=>Rs.handleSectionDrop&&Rs.handleSectionDrop(...e),["prevent"]))},[e.$route.meta.hideGroupHeader&&(e.$isMobile()||e.isPortrait)||i.forcePersonalDrive?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Os,{key:0,modelValue:Vs.unitItem,"onUpdate:modelValue":t[0]||(t[0]=e=>Vs.unitItem=e),tab:"files"},null,8,["modelValue"])),(0,s.bF)(Qs,{modelValue:Vs.isLoading,"onUpdate:modelValue":t[1]||(t[1]=e=>Vs.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,s.bF)(Qs,{modelValue:Vs.isLoadingLatest,"onUpdate:modelValue":t[2]||(t[2]=e=>Vs.isLoadingLatest=e),"is-full-page":!1},null,8,["modelValue"]),Vs.unitId||Vs.isGeneralUnit||Vs.isPersonalDrive?Vs.unitId||Vs.isGeneralUnit||Vs.isPersonalDrive?((0,s.uX)(),(0,s.CE)("div",he,[(0,s.bF)(Zs,{title:Rs.mobileHeaderTitle,"emit-only":!0,onBack:Rs.handleMobileBack},{actions:(0,s.k6)(()=>[Rs.isUpdateActionsVisible?((0,s.uX)(),(0,s.Wv)(Ks,{key:0,position:"is-bottom-left","aria-role":"menu","append-to-body":"",class:"drive-add-item mr-2","trap-focus":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",ge,[(0,s.Lk)("span",fe,[(0,s.bF)(Bs,{icon:"fa-light fa-plus"})])])]),default:(0,s.k6)(()=>[(0,s.bF)(Hs,{"aria-role":"menu-item",focusable:!1,custom:"",paddingless:""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",be,[(0,s.Lk)("a",{class:"button is-light is-rounded is-fullwidth mb-2",onClick:t[4]||(t[4]=t=>e.$refs.dropzone.$el.click())},[(0,s.Lk)("span",ye,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-up"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("uploadFile")),1)]),(0,s.Lk)("a",{class:"button is-light is-rounded is-fullwidth mb-2",onClick:t[5]||(t[5]=(...e)=>Rs.createDocument&&Rs.createDocument(...e))},[(0,s.Lk)("span",ve,[(0,s.bF)(Bs,{icon:"fa-light fa-file-circle-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Document")),1)]),(0,s.Lk)("a",{class:"button is-light is-rounded is-fullwidth",onClick:t[6]||(t[6]=(...e)=>Rs.createFolder&&Rs.createFolder(...e))},[(0,s.Lk)("span",ke,[(0,s.bF)(Bs,{icon:"fa-light fa-folder-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Folder")),1)]),Rs.isEmbedMediaEnabled?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"button is-light is-rounded is-fullwidth mt-2",onClick:t[7]||(t[7]=(...e)=>Rs.openEmbedModal&&Rs.openEmbedModal(...e))},[(0,s.Lk)("span",Ce,[(0,s.bF)(Bs,{icon:"fa-light fa-album-collection-circle-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Embed media")),1)])):(0,s.Q3)("",!0)])]),_:1})]),_:1})):(0,s.Q3)("",!0),Vs.currentFolderObject?((0,s.uX)(),(0,s.Wv)(Ks,{key:1,"aria-role":"list","append-to-body":"",position:"is-bottom-left"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"button is-small is-white is-rounded","aria-label":e.$t("Actions")},[(0,s.Lk)("span",we,[(0,s.bF)(Bs,{icon:"fa-light fa-ellipsis-vertical"})])],8,Le)]),default:(0,s.k6)(()=>[Vs.isGeneralUnit&&Vs.filter.folder&&Vs.filter.folder[0]||Vs.unitId&&Vs.filter.folder[Vs.unitId]?((0,s.uX)(),(0,s.Wv)(Hs,{key:0,"aria-role":"listitem",onClick:t[8]||(t[8]=e=>Rs.copyDriveToClipboard(Vs.filter.folder[Vs.unitId]||Vs.filter.folder[0]))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",_e,[(0,s.Lk)("span",Ee,[(0,s.bF)(Bs,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy link to folder")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canShareDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:1,"aria-role":"listitem",onClick:t[9]||(t[9]=e=>Rs.openShareModal(Vs.currentFolderObject))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",$e,[(0,s.Lk)("span",Fe,[(0,s.bF)(Bs,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),_:1})):(0,s.Q3)("",!0),Vs.unitId&&Vs.filter.folder[Vs.unitId]||Vs.isGeneralUnit&&Vs.filter.folder&&Vs.filter.folder[0]?((0,s.uX)(),(0,s.Wv)(Hs,{key:2,"aria-role":"listitem",onClick:t[10
1]||(t[10]=e=>Rs.downloadFolderAsZip(Vs.filter.folder[Vs.unitId]||Vs.filter.folder[0]))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Te,[(0,s.Lk)("span",Se,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Download folder as archive")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canEditDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:3,"aria-role":"listitem",onClick:t[11]||(t[11]=e=>Rs.renameDrive(Vs.currentFolderObject))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ae,[(0,s.Lk)("span",Pe,[(0,s.bF)(Bs,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Rename")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canEditDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:4,"aria-role":"listitem",onClick:t[12]||(t[12]=e=>Rs.openMoveModal(Vs.currentFolderObject))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ie,[(0,s.Lk)("span",Me,[(0,s.bF)(Bs,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canEditDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:5,"aria-role":"listitem",onClick:t[13]||(t[13]=e=>Rs.confirmDelete(Vs.currentFolderObject,null))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",xe,[(0,s.Lk)("span",Ne,[(0,s.bF)(Bs,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove")),1)])]),_:1})):(0,s.Q3)("",!0)]),_:1})):(0,s.Q3)("",!0)]),_:1},8,["title","onBack"]),(0,s.Lk)("div",Ue,[(0,s.Lk)("div",De,[(0,s.Lk)("div",{class:(0,a.C4)(["breadcrumbs is-hidden-mobile",{"breadcrumbs-mobile":e.$isMobile()}])},[e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Xe,[(0,s.Lk)("button",{class:"button is-white is-rounded breadcrumb-button",onClick:t[14]||(t[14]=e=>Rs.filterFolder(null))},[Vs.isPersonalDrive&&Rs.effectivePersonalDriveUser?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.bF)(Bs,{icon:"fa-light fa-user",style:{"font-size":"0.85rem","margin-right":"4px"}}),(0,s.Lk)("span",null,(0,a.v_)(Rs.effectivePersonalDriveUser.firstName),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[t[56]||(t[56]=(0,s.Lk)("span",{class:"mr-1"},"#",-1)),Vs.unitId&&Vs.unitItem?((0,s.uX)(),(0,s.CE)("span",Ve,(0,a.v_)(Vs.unitItem.name),1)):Vs.isGeneralUnit&&e.tenant&&!Vs.unitId?((0,s.uX)(),(0,s.CE)("span",Re,(0,a.v_)(e.tenant.shortName),1)):(0,s.Q3)("",!0)],64))]),Vs.currentFolderObject?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",Oe,[(0,s.bF)(Bs,{icon:"fa-light fa-chevron-right"})]),Rs.buildPath(Vs.currentFolderObject).length>2?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.bF)(Ks,{"aria-role":"list",position:"is-bottom-right"},{trigger:(0,s.k6)(()=>[...t[57]||(t[57]=[(0,s.Lk)("button",{class:"button is-white is-rounded breadcrumb-button"},"...",-1)])]),default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Rs.buildPath(Vs.currentFolderObject).slice(0,Rs.buildPath(Vs.currentFolderObject).length-2),e=>((0,s.uX)(),(0,s.Wv)(Hs,{key:"collapse-"+e.id,"aria-role":"listitem",onClick:t=>Rs.filterFolder(e)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Qe,[(0,s.Lk)("span",Be,[(0,s.bF)(Bs,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(e.title),1)])]),_:2},1032,["onClick"]))),128))]),_:1}),(0,s.Lk)("span",Ge,[(0,s.bF)(Bs,{icon:"fa-light fa-chevron-right"})])],64)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Rs.buildPath(Vs.currentFolderObject).length>2?Rs.buildPath(Vs.currentFolderObject).slice(-2,-1):Rs.buildPath(Vs.currentFolderObject).slice(0,-1),e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},[(0,s.Lk)("button",{class:"button is-white is-rounded breadcrumb-button",onClick:t=>Rs.filterFolder(e)},[(0,s.Lk)("span",je,(0,a.v_)(e.title),1)],8,We),(0,s.Lk)("span",ze,[(0,s.bF)(Bs,{icon:"fa-light fa-chevron-right"})])],64))),128)),(0,s.Lk)("button",qe,[(0,s.Lk)("span",Je,(0,a.v_)(Vs.currentFolderObject.title),1)])],64)):(0,s.Q3)("",!0)])),Vs.currentFolderObject?((0,s.uX)(),(0,s.CE)("div",He,[Vs.isGeneralUnit&&Vs.filter.folder&&Vs.filter.folder[0]||Vs.unitId&&Vs.filter.folder[Vs.unitId]?((0,s.uX)(),(0,s.Wv)(ea,{key:0,label:e.$t("Copy link to folder"),position:"is-bottom"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[15]||(t[15]=e=>Rs.copyDriveToClipboard(Vs.filter.folder[Vs.unitId]||Vs.filter.folder[0]))},[(0,s.Lk)("span",Ke,[(0,s.bF)(Bs,{icon:"fa-light fa-link"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),Vs.currentFolderObject?((0,s.uX)(),(0,s.Wv)(Ks,{key:1,"aria-role":"list","append-to-body":"",position:"is-bottom-left",triggers:["click"]},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"button is-small is-white is-rounded","aria-label":e.$t("Actions")},[(0,s.Lk)("span",Ze,[(0,s.bF)(Bs,{icon:"fa-light fa-ellipsis-vertical"})])],8,Ye)]),default:(0,s.k6)(()=>[Rs.canShareDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:0,"aria-role":"listitem",onClick:t[16]||(t[16]=e=>Rs.openShareModal(Vs.currentFolderObject))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",et,[(0,s.Lk)("span",tt,[(0,s.bF)(Bs,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),_:1})):(0,s.Q3)("",!0),Vs.unitId&&Vs.filter.folder[Vs.unitId]||Vs.isGeneralUnit&&Vs.filter.folder&&Vs.filter.folder[0]?((0,s.uX)(),(0,s.Wv)(Hs,{key:1,"aria-role":"listitem",onClick:t[17]||(t[17]=e=>Rs.downloadFolderAsZip(Vs.filter.folder[Vs.unitId]||Vs.filter.folder[0]))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",it,[(0,s.Lk)("span",st,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Download folder as archive")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canEditDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:2,"aria-role":"listitem",onClick:t[18]||(t[18]=e=>Rs.renameDrive(Vs.currentFolderObject))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",at,[(0,s.Lk)("span",nt,[(0,s.bF)(Bs,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Rename")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canEditDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:3,"aria-role":"listitem",onClick:t[19]||(t[19]=e=>
1Rs.openMoveModal(Vs.currentFolderObject))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ot,[(0,s.Lk)("span",lt,[(0,s.bF)(Bs,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1)])]),_:1})):(0,s.Q3)("",!0),Rs.canEditDriveItem(Vs.currentFolderObject)?((0,s.uX)(),(0,s.Wv)(Hs,{key:4,"aria-role":"listitem",onClick:t[20]||(t[20]=e=>Rs.confirmDelete(Vs.currentFolderObject,null))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",rt,[(0,s.Lk)("span",dt,[(0,s.bF)(Bs,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove")),1)])]),_:1})):(0,s.Q3)("",!0)]),_:1})):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)],2)]),(0,s.Lk)("div",ct,[(0,s.Lk)("div",ut,[Rs.isUpdateActionsVisible?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"button is-light is-rounded is-small",onClick:t[21]||(t[21]=t=>e.$refs.dropzone.$el.click())},[(0,s.Lk)("span",mt,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-up"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("uploadFile")),1)])):(0,s.Q3)("",!0),Rs.isUpdateActionsVisible?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"button is-light is-rounded is-small",onClick:t[22]||(t[22]=(...e)=>Rs.createDocument&&Rs.createDocument(...e))},[(0,s.Lk)("span",pt,[(0,s.bF)(Bs,{icon:"fa-light fa-file-circle-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Document")),1)])):(0,s.Q3)("",!0),Rs.isUpdateActionsVisible?((0,s.uX)(),(0,s.CE)("a",{key:2,class:"button is-light is-rounded is-small",onClick:t[23]||(t[23]=(...e)=>Rs.createFolder&&Rs.createFolder(...e))},[(0,s.Lk)("span",ht,[(0,s.bF)(Bs,{icon:"fa-light fa-folder-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Folder")),1)])):(0,s.Q3)("",!0),Rs.isUpdateActionsVisible&&Rs.isEmbedMediaEnabled?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"button is-light is-rounded is-small",onClick:t[24]||(t[24]=(...e)=>Rs.openEmbedModal&&Rs.openEmbedModal(...e))},[(0,s.Lk)("span",gt,[(0,s.bF)(Bs,{icon:"fa-light fa-album-collection-circle-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Embed media")),1)])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:(0,a.C4)(["drive-search-field",{"is-focused":Vs.isSearchFocused}])},[Vs.items?((0,s.uX)(),(0,s.Wv)(Gs,{key:0,modelValue:Vs.filter.search,"onUpdate:modelValue":t[25]||(t[25]=e=>Vs.filter.search=e),placeholder:e.$t("search"),size:"is-small",rounded:"",icon:"magnifying-glass","icon-right":Vs.filter.search?"close-circle":"","icon-right-clickable":"",magnifying:"",onIconRightClick:Rs.clearIconClick,onKeyup:Rs.filterByText,onFocus:t[26]||(t[26]=e=>Vs.isSearchFocused=!0),onBlur:t[27]||(t[27]=e=>Vs.isSearchFocused=!1)},null,8,["modelValue","placeholder","icon-right","onIconRightClick","onKeyup"])):(0,s.Q3)("",!0)],2),(0,s.bF)(ta,{"is-gallery":Vs.isGallery,class:"",onToggle:Rs.toggleIsGallery},null,8,["is-gallery","onToggle"])])]),(0,s.Lk)("div",{ref:"dropArea",class:(0,a.C4)(["drive-drop-area",{"is-drag-active":Vs.isDragDropActive}]),style:(0,a.Tr)(Vs.isDragDropActive?{minHeight:Vs.dropAreaMinHeight}:null)},[Vs.onlyAdminsCanUploadFiles&&e.isGranted("HR_TENANT")||!Vs.onlyAdminsCanUploadFiles?(0,s.bo)(((0,s.uX)(),(0,s.Wv)(ia,{key:0,id:"dropzone",ref:"dropzone","duplicate-check":!0,class:(0,a.C4)(["global-dropzone",{"is-active":Vs.isDragDropActive}]),options:Vs.dropzoneOptions,onVdropzoneDrop:Rs.dropzoneDrop,onVdropzoneFileAdded:Rs.dropzoneAddedFile,onVdropzoneThumbnail:Rs.dropzoneThumbnail,onVdropzoneUploadProgress:Rs.dropzoneUploadProgress,onVdropzoneRemovedFile:Rs.dropzoneRemovedFile,onVdropzoneSending:Rs.dropzoneSending,onVdropzoneSuccess:Rs.dropzoneSuccess,onVdropzoneError:Rs.dropzoneError,onVdropzoneComplete:Rs.dropzoneComplete},null,8,["class","options","onVdropzoneDrop","onVdropzoneFileAdded","onVdropzoneThumbnail","onVdropzoneUploadProgress","onVdropzoneRemovedFile","onVdropzoneSending","onVdropzoneSuccess","onVdropzoneError","onVdropzoneComplete"])),[[n.aG,Vs.isDragDropActive]]):(0,s.Q3)("",!0),Vs.isDragDropActive&&Rs.isUpdateActionsVisible?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["drive-drop-overlay",{"is-centered":!Vs.items||0===Vs.items.length}])},[Vs.items&&Vs.items.length>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",ft,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-up",size:"lg"})]),(0,s.Lk)("div",bt,[(0,s.Lk)("span",yt,(0,a.v_)(e.$t("Drop files to upload them to")),1),(0,s.Lk)("span",vt,[(0,s.Lk)("span",kt,[(0,s.bF)(Bs,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(Rs.dropTargetLabel),1)])])],64)):((0,s.uX)(),(0,s.CE)("div",Ct,[(0,s.Lk)("span",Lt,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-up",size:"2x"})]),(0,s.Lk)("p",wt,(0,a.v_)(e.$t("Drop files here")),1)]))],2)):(0,s.Q3)("",!0),Vs.isGallery?((0,s.uX)(),(0,s.CE)("div",ri,[Vs.items?((0,s.uX)(),(0,s.CE)("div",di,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Vs.items,(e,i)=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:(0,a.C4)(["gallery-cell",{"is-grabbing":Vs.draggedItem?.
1id===e.id}]),style:(0,a.Tr)(Rs.cellStyle(e)),draggable:"true",onDragstart:t=>Rs.handleCardDragStart(t,e),onDragend:t[30]||(t[30]=(...e)=>Rs.handleCardDragEnd&&Rs.handleCardDragEnd(...e)),onDragover:t=>Rs.handleCardDragOver(t,e),onDragleave:t[31]||(t[31]=(...e)=>Rs.handleCardDragLeave&&Rs.handleCardDragLeave(...e)),onDrop:t=>Rs.handleCardDrop(t,e)},[(0,s.bF)(sa,{row:e,kind:Rs.tileKind(e),"media-src":e.media?Rs.driveMediaSrc(e):null,"thumbnail-src":Rs.driveThumbnailSrc(e),"icon-config":Rs.getFileIconConfig(e.media,e.type),"share-badge":Rs.shareBadge(e),"can-edit":Rs.canEditDriveItem(e),"can-share":Rs.canShareDriveItem(e),"open-menu-id":Vs.openTileMenuId,onOpen:t=>Rs.handleTileOpen(e),onAspect:Rs.onTileAspect,onMenuOpen:t[29]||(t[29]=e=>Vs.openTileMenuId=e),onAction:e=>Rs.onTileAction(e,i)},null,8,["row","kind","media-src","thumbnail-src","icon-config","share-badge","can-edit","can-share","open-menu-id","onOpen","onAspect","onAction"])],46,ci))),128)),t[58]||(t[58]=(0,s.Lk)("i",{class:"o-gallery-filler","aria-hidden":"true"},null,-1))])):(0,s.Q3)("",!0),Vs.items&&Vs.isGallery?((0,s.uX)(),(0,s.CE)("div",ui,[Rs.isMoreThanOnePage?((0,s.uX)(),(0,s.Wv)(aa,{key:0,modelValue:Vs.itemsPageCurrent,"onUpdate:modelValue":t[32]||(t[32]=e=>Vs.itemsPageCurrent=e),total:Vs.itemsTotal,"per-page":Vs.itemsPerPage,onChange:Rs.changeListPage},null,8,["modelValue","total","per-page","onChange"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("div",_t,[Vs.items&&Vs.items.length>0?((0,s.uX)(),(0,s.Wv)(Ys,{key:0,"current-page":Vs.itemsPageCurrent,"onUpdate:currentPage":t[28]||(t[28]=e=>Vs.itemsPageCurrent=e),data:Vs.items,hoverable:!0,paginated:Rs.isMoreThanOnePage,"backend-pagination":"","mobile-cards":!1,total:Vs.itemsTotal,"per-page":Vs.itemsPerPage,"backend-sorting":"","default-sort-direction":Vs.defaultSortOrder,"default-sort":[Vs.sortField,Vs.sortOrder],"icon-pack":"fa-light",class:"filesTable fs-14","row-class":(e,t)=>Vs.draggedRowIndex===t?"is-grabbing-row":"",draggable:"",onPageChange:Rs.changeListPage,onSort:Rs.onSort,onDragstart:Rs.handleTableDragStart,onDrop:Rs.handleTableDrop,onDragover:Rs.handleTableDragOver,onDragleave:Rs.handleTableDragLeave,onDragend:Rs.handleTableDragEnd},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Et,[(0,s.bF)(zs,{label:e.$t("name"),field:"title",sortable:"","cell-class":"is-full-width"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",$t,[(0,s.Lk)("span",{class:(0,a.C4)(["icon",e.$isMobile()?"":"is-small"])},[(0,s.bF)(Bs,{icon:Rs.driveLeadingIcon(t.row),class:"fileTitleIcon",style:(0,a.Tr)(Rs.driveLeadingIconStyle(t.row))},null,8,["icon","style"])],2),t.row.media?((0,s.uX)(),(0,s.CE)("span",{key:"f_media_"+t.row.id,class:"fileTitle",onClick:(0,n.D$)(e=>Rs.handleFileClick(t.row),["prevent"])},[(0,s.Lk)("a",{target:"_blank",title:t.row.title},(0,a.v_)(t.row.title),9,Tt),(0,s.Lk)("span",St,[(0,s.eW)((0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated))+" ",1),t.row.media?((0,s.uX)(),(0,s.CE)("span",At,"⢠"+(0,a.v_)(e.$filters.formatBytes(t.row.media.size)),1)):(0,s.Q3)("",!0)])],8,Ft)):"doc"===t.row.type?((0,s.uX)(),(0,s.CE)("span",{key:"f_doc_"+t.row.id,class:"fileTitle",onClick:e=>Rs.openDocument(t.row)},[(0,s.Lk)("a",{title:t.row.title},(0,a.v_)(t.row.title),9,It),(0,s.Lk)("span",Mt,[(0,s.eW)((0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated))+" ",1),t.row.media?((0,s.uX)(),(0,s.CE)("span",xt,"⢠"+(0,a.v_)(e.$filters.formatBytes(t.row.media.size)),1)):(0,s.Q3)("",!0)])],8,Pt)):"embed"===t.row.type?((0,s.uX)(),(0,s.CE)("span",{key:"f_embed_"+t.row.id,class:"fileTitle",onClick:e=>Rs.openImageGallery(t.row)},[(0,s.Lk)("a",{title:t.row.title},(0,a.v_)(t.row.title),9,Ut),(0,s.Lk)("span",Dt,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)],8,Nt)):((0,s.uX)(),(0,s.CE)("span",{key:"f_folder_"+t.row.id,class:"fileTitle",onClick:e=>Rs.filterFolder(t.row)},[(0,s.Lk)("a",{title:t.row.title},(0,a.v_)(t.row.title),9,Vt),(0,s.Lk)("span",Rt,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)],8,Xt)),t.row.slugGo&&"publishing"!==t.row.shareState&&"unpublishing"!==t.row.shareState?((0,s.uX)(),(0,s.CE)("span",{key:4,class:"icon is-small ml-1",title:e.$t("Shared publicly")},[(0,s.bF)(Bs,{icon:"fa-light fa-globe",style:{color:"var(--bulma-text-weak)"}})],8,Ot)):"publishing"===t.row.shareState||"unpublishing"===t.row.shareState?((0,s.uX)(),(0,s.CE)("span",{key:5,class:"icon is-small ml-1",title:e.$t("Publishingâ¦")},[(0,s.bF)(Bs,{icon:"fa-light fa-circle-notch",class:"fa-spin"})],8,Qt)):(0,s.Q3)("",!0)])]),_:1},8,["label"]),(0,s.bF)(zs,{width:"20%",label:e.$t("Owner"),field:"owner",sortable:"","cell-class":"is-s
1hrink-to-fit",visible:Rs.showPriority4},{default:(0,s.k6)(e=>[e.row.owner?((0,s.uX)(),(0,s.CE)("div",Bt,[((0,s.uX)(),(0,s.Wv)(qs,{key:e.row.owner.id,item:e.row.owner,"is-type":"roundXSmall"},null,8,["item"])),(0,s.Lk)("span",Gt,[(0,s.bF)(Js,{to:{name:"UserShow",params:{item:e.row.owner.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.owner.fullName),1)]),_:2},1032,["to"])])])):(0,s.Q3)("",!0)]),_:1},8,["label","visible"]),(0,s.bF)(zs,{width:"120px",label:e.$t("date"),field:"dateCreated",visible:Rs.showPriority3,sortable:"","cell-class":"is-shrink-to-fit"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",Wt,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)]),_:1},8,["label","visible"]),(0,s.bF)(zs,{width:"80px",label:e.$t("size"),field:"media.size",visible:Rs.showPriority2,sortable:"","cell-class":"is-shrink-to-fit"},{default:(0,s.k6)(t=>["doc"===t.row.type&&null!==t.row.wordCount?((0,s.uX)(),(0,s.CE)("span",jt,(0,a.v_)(t.row.wordCount)+" "+(0,a.v_)(e.$t("words")),1)):t.row.media?((0,s.uX)(),(0,s.CE)("span",zt,(0,a.v_)(e.$filters.formatBytes(t.row.media.size)),1)):(0,s.Q3)("",!0)]),_:1},8,["label","visible"]),(0,s.bF)(zs,{width:"48px","header-class":"is-clipped",centered:""},{default:(0,s.k6)(t=>[(0,s.bF)(Ks,{"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,s.k6)(({active:e,toggle:t})=>[(0,s.Lk)("button",{class:"button is-white is-small",onClick:t},[(0,s.Lk)("span",Jt,[(0,s.bF)(Bs,{icon:"fa-light fa-ellipsis-v"})])],8,qt)]),default:(0,s.k6)(()=>[Rs.canShareDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:0,onClick:e=>Rs.copyShareableLink(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ht,[(0,s.Lk)("span",Kt,[(0,s.bF)(Bs,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy link")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canShareDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:1,onClick:e=>Rs.openShareModal(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Yt,[(0,s.Lk)("span",Zt,[(0,s.bF)(Bs,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),t.row.media?((0,s.uX)(),(0,s.Wv)(Hs,{key:2,onClick:e=>Rs.downloadFile(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ei,[(0,s.Lk)("span",ti,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("download")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canEditDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:3,onClick:e=>Rs.confirmDelete(t.row,t.index)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ii,[(0,s.Lk)("span",si,[(0,s.bF)(Bs,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("remove")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canEditDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:4,onClick:e=>Rs.openMoveModal(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ai,[(0,s.Lk)("span",ni,[(0,s.bF)(Bs,{icon:"fa-light fa-folders"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canEditDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:5,onClick:e=>Rs.renameDrive(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",oi,[(0,s.Lk)("span",li,[(0,s.bF)(Bs,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Rename")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0)]),_:2},1024)]),_:1})])]),_:1},8,["current-page","data","paginated","total","per-page","default-sort-direction","default-sort","row-class","onPageChange","onSort","onDragstart","onDrop","onDragover","onDragleave","onDragend"])):(0,s.Q3)("",!0)]))],6)])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:"groups-view",class:(0,a.C4)({"groups-view-mobile-safe":e.isNativeApp})},[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Vs.myGroups,(t,i)=>((0,s.uX)(),(0,s.CE)("div",{key:"group_"+t.id,class:(0,a.C4)(e.$isMobile()?"pr-0":"pr-5")},[(0,s.Lk)("div",{class:"card p-4 group-card is-clickable mb-3",onClick:e=>"personal"===t.id?Rs.openPersonalDrive():Rs.changeCurrentGroup(t)},[(0,s.Lk)("div",d,[(0,s.Lk)("div",c,[(0,s.Lk)("span",u,[(0,s.bF)(Bs,{icon:"personal"===t.id?"fa-light fa-user":"fa-light fa-folder-open",style:{color:"#003aff"}},null,8,["icon"])]),(0,s.Lk)("span",m,["personal"===t.id?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(e.$t("Personal Drive")),1)):"Tenant"===t["@type"]?((0,s.uX)(),(0,s.CE)("span",h,(0,a.v_)(e.tenant.shortName),1)):((0,s.uX)(),(0,s.CE)("span",g,(0,a.v_)(t.name),1))])])]),(0,s.Lk)("div",f,[(0,s.Lk)("div",b,[(0,s.Lk)("span",y,[(0,s.Lk)("span",v,[(0,s.bF)(Bs,{icon:"fa-light fa-file"})]),(0,s.Lk)("span",null,(0,a.v_)(Rs.groupTotal("personal"===t.id?"personal":"Tenant"===t["@type"]?null:t.id)||0)+" "+(0,a.v_)(e.$t("files")),1)])]),(0,s.Lk)("div",k,[(0,s.Lk)("span",C,[(0,s.Lk)("span",L,[(0,s.bF)(Bs,{icon:"fa-light fa-database"})]),(0,s.Lk)("span",null,(0,a.v_)(Rs.groupSize("personal"===t.id?"personal":"Tenant"===t["@type"]?null:t.id)||"0 B"),1)])])])],8,r)],2))),128))]),(0,s.Lk)("div",w,[(0,s.Lk)("div",_,[!Vs.searchResults&&Vs.documents&&Vs.documents.length>0?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Latest files")),1)])):Vs.searchResults?((0,s.uX)(),(0,s.CE)("div",$,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Search results"))+" ("+(0,a.v_)(Vs.searchResults.length)+")",1)])):(0,s.Q3)("",!0),(0,s.bF)(Ws,{class:"mb-0"},{default:(0,s.k6)(()=>[(0,s.bF)(Gs,{modelValue:Vs.searchQuery,"onUpdate:modelValue":t[3]||(t[3]=e=>Vs.searchQuery=e),placeholder:e.$t("Search"),type:"search",icon:"magnifying-glass",size:"is-small",rounded:"",loading:Vs.isSearching,onInput:Rs.onSearchInput,onKeyup:(0,n.jR)(Rs.clearSearch,["escape"])},null,8,["modelValue","placeholder","loading","onInput","onKeyup"])]),_:1})]),Vs.isLoadingLatest&&!Vs.searchResults?((0,s.uX)(),(0,s.CE)("div",F,[(0,s.bF)(js,{width:"20%",animated:""}),(0,s.bF)(js,{width:"40%",animated:""}),(0,s.bF)(js,{width:"80%",animated:""}),(0,s.bF)(js,{animated:""})])):(0,s.Q3)("",!0),Vs.searchResults&&0===Vs.searchResults.length?((0,s.uX)(),(0,s.CE)("div",T,[(0,s.Lk)("span",S,[(0,s.bF)(Bs,{icon:"fa-light fa-folder-magnifying-glass",size:"3x"})]),(0,s.Lk)("p",A,(0,a.v_)(e.$t("No results found")),1)])):(0,s.Q3)("",!0),!Vs.isLoadingLatest&&Vs.documents?.length>0||Vs.searchResults&&Vs.searchResults.length>0?((0,s.uX)(),(0,s.CE)("div",P,[Rs.groupsViewTableData&&Rs.groupsViewTableData.length>0?((0,s.uX)(),(0,s.Wv)(Ys,{key:0,data:Rs.groupsViewTableData,hoverable:!0,paginated:!1,"mobile-cards":!1,scrollable:!1,"icon-pack":"fa-light",class:"filesTable fs-14"},{default:(0,s.k6)(()=>[(0,s.bF)(zs,{label:e.$t("name"),field:"title","cell-class":"is-full-width"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",I,[(0,s.Lk)("span",{class:(0,a.C4)(["icon",e.$isMobile()?"":"is-small"])},[(0,s.bF)(Bs,{icon:Rs.driveLeadingIcon(t.row),class:"fileTitleIcon",style:(0,a.Tr)(Rs.driveLeadingIconStyle(t.row))},null,8,["icon","style"])],2),t.row.media?((0,s.uX)(),(0,s.CE)("span",{key:"f_media_"+t.row.id,class:"fileTitle",onClick:(0,n.D$)(e=>Rs.handleFileClick(t.row),["prevent"])},[(0,s.Lk)("a",{target:"_blank",title:t.row.title},(0,a.v_)(t.row.title),9,x),(0,s.Lk)("span",N,[(0,s.eW)((0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated))+" ",1),t.row.media?((0,s.uX)(),(0,s.CE)("span",U,"⢠"+(0,a.v_)(e.$filters.formatBytes(t.row.media.size)),1)):(0,s.Q3)("",!0)])],8,M)):"doc"===t.row.t
1ype?((0,s.uX)(),(0,s.CE)("span",{key:"f_doc_"+t.row.id,class:"fileTitle",onClick:e=>Rs.openDocument(t.row)},[(0,s.Lk)("a",{title:t.row.title},(0,a.v_)(t.row.title),9,X),(0,s.Lk)("span",V,[(0,s.eW)((0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated))+" ",1),t.row.media?((0,s.uX)(),(0,s.CE)("span",R,"⢠"+(0,a.v_)(e.$filters.formatBytes(t.row.media.size)),1)):(0,s.Q3)("",!0)])],8,D)):"embed"===t.row.type?((0,s.uX)(),(0,s.CE)("span",{key:"f_embed_"+t.row.id,class:"fileTitle",onClick:e=>Rs.openImageGallery(t.row)},[(0,s.Lk)("a",{title:t.row.title},(0,a.v_)(t.row.title),9,Q),(0,s.Lk)("span",B,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)],8,O)):((0,s.uX)(),(0,s.CE)("span",{key:"f_folder_"+t.row.id,class:"fileTitle",onClick:e=>Rs.filterFolder(t.row)},[(0,s.Lk)("a",{title:t.row.title},(0,a.v_)(t.row.title),9,W),(0,s.Lk)("span",j,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)],8,G)),t.row.slugGo&&"publishing"!==t.row.shareState&&"unpublishing"!==t.row.shareState?((0,s.uX)(),(0,s.CE)("span",{key:4,class:"icon is-small ml-1",title:e.$t("Shared publicly")},[(0,s.bF)(Bs,{icon:"fa-light fa-globe",style:{color:"var(--bulma-text-weak)"}})],8,z)):"publishing"===t.row.shareState||"unpublishing"===t.row.shareState?((0,s.uX)(),(0,s.CE)("span",{key:5,class:"icon is-small ml-1",title:e.$t("Publishingâ¦")},[(0,s.bF)(Bs,{icon:"fa-light fa-circle-notch",class:"fa-spin"})],8,q)):(0,s.Q3)("",!0)])]),_:1},8,["label"]),(0,s.bF)(zs,{width:"20%",label:e.$t("Owner"),field:"owner","cell-class":"is-shrink-to-fit",visible:Rs.showPriority4},{default:(0,s.k6)(e=>[e.row.owner?((0,s.uX)(),(0,s.CE)("div",J,[((0,s.uX)(),(0,s.Wv)(qs,{key:e.row.owner.id,item:e.row.owner,"is-type":"roundXSmall"},null,8,["item"])),(0,s.Lk)("span",H,[(0,s.bF)(Js,{to:{name:"UserShow",params:{item:e.row.owner.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.owner.fullName),1)]),_:2},1032,["to"])])])):(0,s.Q3)("",!0)]),_:1},8,["label","visible"]),(0,s.bF)(zs,{width:"120px",label:e.$t("date"),field:"dateCreated",visible:Rs.showPriority3,"cell-class":"is-shrink-to-fit"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",K,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)]),_:1},8,["label","visible"]),(0,s.bF)(zs,{width:"80px",label:e.$t("size"),field:"media.size",visible:Rs.showPriority2,"cell-class":"is-shrink-to-fit"},{default:(0,s.k6)(t=>["doc"===t.row.type&&null!==t.row.wordCount?((0,s.uX)(),(0,s.CE)("span",Y,(0,a.v_)(t.row.wordCount)+" "+(0,a.v_)(e.$t("words")),1)):t.row.media?((0,s.uX)(),(0,s.CE)("span",Z,(0,a.v_)(e.$filters.formatBytes(t.row.media.size)),1)):(0,s.Q3)("",!0)]),_:1},8,["label","visible"]),(0,s.bF)(zs,{width:"40px","header-class":"is-clipped",centered:""},{default:(0,s.k6)(t=>[(0,s.bF)(Ks,{"aria-role":"list",position:Vs.rowDropdownPosition,"append-to-body":""},{trigger:(0,s.k6)(({active:e,toggle:t})=>[(0,s.Lk)("button",{class:"button is-white is-small",onClick:e=>Rs.onRowDropdownToggle(e,t)},[(0,s.Lk)("span",te,[(0,s.bF)(Bs,{icon:"fa-light fa-ellipsis-vertical"})])],8,ee)]),default:(0,s.k6)(()=>[Rs.canShareDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:0,onClick:e=>Rs.copyShareableLink(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ie,[(0,s.Lk)("span",se,[(0,s.bF)(Bs,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy link")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canShareDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:1,onClick:e=>Rs.openShareModal(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ae,[(0,s.Lk)("span",ne,[(0,s.bF)(Bs,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),t.row.media?((0,s.uX)(),(0,s.Wv)(Hs,{key:2,onClick:e=>Rs.downloadFile(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",oe,[(0,s.Lk)("span",le,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("download")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canEditDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:3,onClick:e=>Rs.confirmDelete(t.row,t.index)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",re,[(0,s.Lk)("span",de,[(0,s.bF)(Bs,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("remove")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canEditDriveItem(t.row)&&(Vs.unitId||Vs.isGeneralUnit||Vs.isPersonalDrive)?((0,s.uX)(),(0,s.Wv)(Hs,{key:4,onClick:e=>
1Rs.openMoveModal(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ce,[(0,s.Lk)("span",ue,[(0,s.bF)(Bs,{icon:"fa-light fa-folders"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),Rs.canEditDriveItem(t.row)?((0,s.uX)(),(0,s.Wv)(Hs,{key:5,onClick:e=>Rs.renameDrive(t.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",me,[(0,s.Lk)("span",pe,[(0,s.bF)(Bs,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Rename")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0)]),_:2},1032,["position"])]),_:1})]),_:1},8,["data"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])])],2)),(0,s.bF)(na,{modelValue:Vs.isModalActive,"onUpdate:modelValue":t[36]||(t[36]=e=>Vs.isModalActive=e)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",mi,[Vs.isModalActive?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"card p-5 drive-name-modal",style:(0,a.Tr)([{"text-align":"left"},e.$isMobile()?"width: 90%":""])},[(0,s.Lk)("form",{onSubmit:t[35]||(t[35]=(0,n.D$)((...e)=>Rs.saveEditModal&&Rs.saveEditModal(...e),["prevent"]))},[(0,s.bF)(Ws,{label:Vs.editingSharingDrive?e.$t("fileName"):e.$t("newFolderName")},{default:(0,s.k6)(()=>[(0,s.bF)(Gs,{ref:"title",modelValue:Vs.editingSharingDriveTitle,"onUpdate:modelValue":t[33]||(t[33]=e=>Vs.editingSharingDriveTitle=e),required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded",{"is-small":e.$isMobile(),"is-loading":e.$store.state.isLoadingButton}]),style:{"margin-right":"10px"},type:"submit"},(0,a.v_)(e.$t("save")),3),(0,s.Lk)("button",{class:(0,a.C4)(["button is-rounded",{"is-small":e.$isMobile()}]),onClick:t[34]||(t[34]=(...e)=>Rs.cancelEditModal&&Rs.cancelEditModal(...e))},(0,a.v_)(e.$t("cancel")),3)],32)],4)):(0,s.Q3)("",!0)])]),_:1},8,["modelValue"]),(0,s.bF)(na,{modelValue:Vs.openMoveItemModal,"onUpdate:modelValue":t[38]||(t[38]=e=>Vs.openMoveItemModal=e)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["card p-4",e.$isMobile()?"mx-5":""])},[(0,s.Lk)("header",pi,[(0,s.Lk)("p",hi,[(0,s.Lk)("span",gi,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1),Vs.selectedItem?((0,s.uX)(),(0,s.CE)("span",fi,[(0,s.Lk)("span",null,'"'+(0,a.v_)(Vs.selectedItem.title)+'"',1)])):(0,s.Q3)("",!0)])])]),(0,s.Lk)("section",bi,[(0,s.Lk)("div",yi,[(0,s.Lk)("p",vi,(0,a.v_)(e.$t("Select destination folder"))+":",1),(0,s.Lk)("nav",ki,[(0,s.Lk)("ul",null,[(0,s.Lk)("li",{class:(0,a.C4)({"is-active":!Vs.modalCurrentFolder})},[(0,s.Lk)("a",{onClick:t[37]||(t[37]=e=>Rs.navigateToModalFolder(null))},[(0,s.Lk)("span",Ci,[(0,s.bF)(Bs,{icon:"fa-light fa-home"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Root")),1)])],2),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Vs.modalBreadcrumb,(e,t)=>((0,s.uX)(),(0,s.CE)("li",{key:e.id},[(0,s.Lk)("a",{onClick:t=>Rs.navigateToModalFolder(e)},(0,a.v_)(e.title),9,Li)]))),128))])]),(0,s.Lk)("div",wi,[Vs.isLoadingModalFolders?((0,s.uX)(),(0,s.CE)("div",_i,[(0,s.bF)(Qs,{active:!0,"is-full-page":!1})])):0===Vs.modalFolders.length?((0,s.uX)(),(0,s.CE)("div",Ei,[(0,s.Lk)("span",$i,[(0,s.bF)(Bs,{icon:"fa-light fa-folder-open",size:"2x"})]),(0,s.Lk)("p",null,(0,a.v_)(e.$t("No folders here"))+".",1)])):((0,s.uX)(),(0,s.CE)("div",Fi,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Vs.modalFolders,t=>((0,s.uX)(),(0,s.CE)("div",{key:t.id,class:(0,a.C4)(["folder-item p-3 is-clickable",{"is-selected":Vs.modalSelectedFolder&&Vs.modalSelectedFolder.id===t.id,"is-disabled":Vs.selectedItem&&Vs.selectedItem.id===t.id}]),onClick:e=>Rs.selectModalFolder(t),onDblclick:e=>Rs.navigateToModalFolder(t)},[(0,s.Lk)("div",Si,[(0,s.Lk)("div",Ai,[(0,s.Lk)("span",Pi,[(0,s.bF)(Bs,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(t.title),1),Vs.selectedItem&&Vs.selectedItem.id===t.id?((0,s.uX)(),(0,s.CE)("span",Ii,(0,a.v_)(e.$t("This folder")),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",{class:"is-clickable",onClick:e=>Rs.navigateToModalFolder(t)},[(0,s.Lk)("span",xi,[(0,s.bF)(Bs,{icon:"fa-light fa-chevron-right"})])],8,Mi)])],42,Ti))),128))]))])])]),(0,s.Lk)("footer",Ni,[(0,s.bF)(oa,{class:(0,a.C4)(["button is-rounded is-primary mr-2",{"is-loading":Vs.isMovingItem}]),disabled:!Rs.canMoveToSelected(),onClick:Rs.confirmMoveToFolder},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ui,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1)])]),_:1},8,["disabled","class","onClick"]),(0,s.bF)(oa,{class:"button is-rounded",onClick:Rs.closeMoveModal},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("cancel")),1)]),_:1},8,["onClick"])])],2)]),_:1}
1,8,["modelValue"]),(0,s.bF)(na,{modelValue:Vs.isOfficeFileModalActive,"onUpdate:modelValue":t[42]||(t[42]=e=>Vs.isOfficeFileModalActive=e)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["card p-5",e.$isMobile()?"mx-3":""])},[(0,s.Lk)("header",Di,[(0,s.Lk)("p",Xi,[(0,s.Lk)("span",Vi,[(0,s.Lk)("span",Ri,[(0,s.bF)(Bs,{icon:Vs.selectedOfficeFile?"fa-light "+Rs.getFileIconConfig(Vs.selectedOfficeFile.media).icon:"fa-light fa-file"},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(Vs.selectedOfficeFile?.title),1)])])]),(0,s.Lk)("section",Oi,[(0,s.Lk)("p",Qi,(0,a.v_)(e.$t("How would you like to open this file?")),1),(0,s.Lk)("div",Bi,[(0,s.Lk)("button",{class:"button is-primary is-rounded is-fullwidth mb-2",onClick:t[39]||(t[39]=(...e)=>Rs.viewOfficeFileInBrowser&&Rs.viewOfficeFileInBrowser(...e))},[(0,s.Lk)("span",Gi,[(0,s.Lk)("span",Wi,[(0,s.bF)(Bs,{icon:"fa-light fa-eye"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("View in browser"))+" (Microsoft Online Viewer)",1)])]),(0,s.Lk)("button",{class:"button is-outlined is-primary is-rounded is-fullwidth",onClick:t[40]||(t[40]=(...e)=>Rs.downloadOfficeFile&&Rs.downloadOfficeFile(...e))},[(0,s.Lk)("span",ji,[(0,s.Lk)("span",zi,[(0,s.bF)(Bs,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("download")),1)])])])]),(0,s.Lk)("footer",null,[(0,s.Lk)("button",{class:"button is-rounded is-fullwidth",onClick:t[41]||(t[41]=e=>Vs.isOfficeFileModalActive=!1)},(0,a.v_)(e.$t("cancel")),1)])],2)]),_:1},8,["modelValue"]),(0,s.bF)(na,{modelValue:Vs.isShareModalActive,"onUpdate:modelValue":t[49]||(t[49]=e=>Vs.isShareModalActive=e),width:480,onClose:Rs.closeShareModal},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["card p-5",e.$isMobile()?"mx-3":""])},[(0,s.Lk)("header",qi,[(0,s.Lk)("div",null,[(0,s.Lk)("p",Ji,[(0,s.Lk)("span",Hi,[(0,s.Lk)("span",Ki,[(0,s.bF)(Bs,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),(0,s.Lk)("p",Yi,(0,a.v_)(Vs.shareModalItem?.title),1)]),(0,s.Lk)("button",{class:"button is-white is-small",title:e.$t("Close"),onClick:t[43]||(t[43]=(...e)=>Rs.closeShareModal&&Rs.closeShareModal(...e))},[(0,s.Lk)("span",es,[(0,s.bF)(Bs,{icon:"fa-light fa-xmark"})])],8,Zi)]),(0,s.Lk)("section",{class:(0,a.C4)(["share-scope-section mb-3",{"is-deemphasized":Vs.shareModalItem?.slugGo}])},[(0,s.Lk)("div",ts,[(0,s.Lk)("span",is,[(0,s.bF)(Bs,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",ss,(0,a.v_)(e.$t("Only in the community")),1)]),(0,s.Lk)("p",as,(0,a.v_)(e.$t("Anyone in this workspace with the link can access. Link expires in 7 days.")),1),Vs.shareModalItem?.slugGo?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Ws,{key:0},{default:(0,s.k6)(()=>[(0,s.bF)(Gs,{"model-value":Vs.communityShareUrl||e.$t("Generatingâ¦"),readonly:"",expanded:""},null,8,["model-value"]),(0,s.Lk)("p",ns,[(0,s.Lk)("button",{class:"button is-primary is-rounded",disabled:!Vs.communityShareUrl||Vs.isFetchingCommunityLink,onClick:t[44]||(t[44]=(...e)=>Rs.copyCommunityShareLink&&Rs.copyCommunityShareLink(...e))},[(0,s.Lk)("span",ls,[(0,s.Lk)("span",rs,[(0,s.bF)(Bs,{icon:"fa-light fa-copy"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy")),1)])],8,os)])]),_:1}))],2),(0,s.Lk)("section",ds,[(0,s.Lk)("div",cs,[(0,s.Lk)("span",us,[(0,s.bF)(Bs,{icon:"fa-light fa-globe"})]),(0,s.Lk)("span",ms,(0,a.v_)(e.$t("Anyone with the link")),1)]),(0,s.Lk)("p",ps,(0,a.v_)(e.$t("Anyone on the internet with the link can view the file. The link remains accessible indefinitely.")),1),Vs.shareModalItem?.slugGo?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.bF)(Ws,null,{default:(0,s.k6)(()=>[(0,s.bF)(Gs,{"model-value":"https://go.orgo.space/d/"+Vs.shareModalItem.slugGo,readonly:"",expanded:""},null,8,["model-value"]),(0,s.Lk)("p",hs,[(0,s.Lk)("button",{class:"button is-primary is-rounded",disabled:"publishing"===Vs.shareModalItem.shareState,onClick:t[45]||(t[45]=(...e)=>Rs.copyShareLink&&Rs.copyShareLink(...e))},[(0,s.Lk)("span",fs,[(0,s.Lk)("span",bs,[(0,s.bF)(Bs,{icon:"fa-light fa-copy"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy")),1)])],8,gs)])]),_:1}),"folder"!==Vs.shareModalItem.type&&Rs.isWebPlayable(Vs.shareModalItem.media)?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("p",ys,[(0,s.Lk)("span",vs,[(0,s.Lk)("span",ks,[(0,s.bF)(Bs,{icon:"fa-light fa-code"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Embed")),1)])]),(0,s.bF)(Ws,null,{default:(0,s.k6)(()=>[(0,s.bF)(Gs,{"model-value":Rs.shareModalEmbedCode,readonly:"",expanded:""},null,8,["model-value"]),(0,s.Lk)("p",Cs,[(0,s.Lk)("button",{class:"button is-primary is-rounded",disabled:"publishing"===Vs.shareModalItem.shareState,onClick:t[46]||(t[46]=(...e)=>Rs.copyEmbedFromModal&&Rs.copyEmbedFromModal(...e))},[(0,s.Lk)("span",ws,[(0,s.Lk)("span",_s,[(0,s.bF)(Bs,{icon:"fa-light fa-copy"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy")),1)])],8,Ls)])]),_:1})],64)):(0,s.Q3)("",!0),"publishing"===Vs.shareModalItem.shareState?((0,s.uX)(),(0,s.CE)("p",Es,[(0,s.Lk)("span",$s,[(0,s.Lk)("span",Fs,[(0,s.bF)(Bs,{icon:"fa-light fa-circle-notch",class:"fa-spin"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Publishing⦠the link will be ready shortly.")),1)])])):(0,s.Q3)("",!0),(0,s.Lk)("a",{class:(0,a.C4)(["share-scope-revoke-action is-size-7 has-text-danger",{"is-loading-action":Vs.isRevokingShare}]),onClick:t[47]||(t[47]=(0,n.D$)((...e)=>Rs.revokeShareLink&&Rs.revokeShareLink(...e),["prevent","stop"]))},[(0,s.Lk)("span",Ts,[(0,s.Lk)("span",Ss,[Vs.isRevokingShare?((0,s.uX)(),(0,s.Wv)(Bs,{key:0,icon:"fa-light fa-circle-notch",class:"fa-spin"})):((0,s.uX)(),(0,s.CE)("span",As,[(0,s.bF)(Bs,{icon:"fa-light fa-globe"}),(0,s.bF)(Bs,{icon:"fa-light fa-slash",class:"globe-slash-overlay"})]))]),(0,s.Lk)("span",null,(0,a.v_)(Vs.isRevokingShare?e.$t("Revokingâ¦"):e.$t("Revoke public link")),1)])],2)],64)):((0,s.uX)(),(0,s.CE)("button",{key:1,class:(0,a.C4)(["button is-primary is-rounded is-fullwidth",{"is-loading":Vs.isGeneratingShare}]),disabled:Vs.isGeneratingShare,onClick:t[48]||(t[48]=(...e)=>Rs.generateShareLink&&Rs.generateShareLink(...e))},[(0,s.Lk)("span",Is,[(0,s.Lk)("span",Ms,[(0,s.bF)(Bs,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Generate public link")),1)])],10,Ps))])],2)]),_:1},8,["modelValue","onClose"]),!Vs.items||0!==Vs.items?.length||Vs.isDragDropActive||Vs.isLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",xs,[(0,s.Lk)("span",Ns,[(0,s.bF)(Bs,{icon:"fa-light fa-folder-open"})]),(0,s.eW)(" "+(0,a.v_)(e.$t("noFilesToList")),1)])),(0,s.bF)(la,{active:Vs.isImageGalleryActive,"onUpdate:active":t[50]||(t[50]=e=>Vs.isImageGalleryActive=e),index:Vs.currentImageIndex,"onUpdate:index":t[51]||(t[51]=e=>Vs.currentImageIndex=e),items:Vs.imageItems,"can-edit":Rs.canEditDriveItem,"can-share":Rs.canShareDriveItem,"src-resolver":Rs.driveMediaSrc,onAction:Rs.handleLightboxAction},null,8,["active","index","items","can-edit","can-share","src-resolver","onAction"]),Vs.uploadQueue.length>0?((0,s.uX)(),(0,s.Wv)(ra,{key:4,entries:Vs.uploadQueue,onClose:Rs.closeUploadPanel,onCancelAll:Rs.cancelAllUploads},null,8,["entries","onClose","onCancelAll"])):(0,s.Q3)("",!0)],34),Vs.dragPreview&&!Vs.dropHandled?((0,s.uX)(),(0,s.Wv)(s.Im,{key:0,to:"#drag-layer"},[(0,s.Lk)("div",{class:"drag-preview-content",style:(0,a.Tr)({position:"absolute",left:"0",top:"0",pointerEvents:"none",zIndex:1e4,opacity:.9,transform:Vs.dragPreviewStyle.transform,willChange:"transform"})},[(0,s.Lk)("div",Us,[(0,s.Lk)("span",Ds,[(0,s.bF)(Bs,{icon:"fa-light "+Vs.dragPreview.icon,style:(0,a.Tr)({color:Vs.dragPreview.color})},null,8,["icon","style"])]),(0,s.Lk)("span",null,(0,a.v_)(Vs.dragPreview.name),1)])],4)])):(0,s.Q3)("",!0),(0,s.bF)(da)],64)}i(44114),i(20116),i(7588),i(61701),i(13579),i(14603),i(47566),i(98721);var Vs=i(93231),Rs=i(31823);const Os={id:"drag-layer",class:"drag-layer"};function Qs(e,t,i,a,n,o){return(0,s.uX)(),(0,s.CE)("div",Os)}var Bs={name:"DragLayer",data(){return{draggedElement:null,position:{x:0,y:0}}},mounted(){document.addEventListener("dragstart",this.handleDragStart),document.addEventListener("dragend",this.handleDragEnd),document.addEventListener("dragover",this.updatePosition)},beforeUnmount(){document.removeEventListener("dragstart",this.handleDragStart),document.removeEventListener("dragend",this.handleDragEnd),document.removeEventListener("dragover",this.updatePosition)},methods:{handleDragStart(e){this.draggedElement=e.target},handleDragEnd(){this.draggedElement=null},updatePosition(e){this.position={x:e.clientX,y:e.clientY}}}},Gs=i(66262);const Ws=(0,Gs.A)(Bs,[["render",Qs],["__scopeId","data-v-3119f136"]]);var js=Ws,zs=i(57320),qs=i(81084),Js=i(16430),Hs=i(80121),Ks=i(66288);const Ys={class:"modal-card drive-embed-modal"},Zs={class:"modal-card-head"},ea={class:"modal-card-title"},ta=["aria-label"],ia={class:"modal-card-body"},sa={class:"modal-card-foot is-justify-content-flex-start pb-5"};function aa(e,t,i,n,o,l){const r=(0,s.g2)("b-input"),d=(0,s.g2)("b-field"),c=(0,s.g2)("b-button");return(0,s.uX)(),(0,s.CE)("div",Ys,[(0,s.Lk)("header",Zs,[(0,s.Lk)("p",ea,(0,a.v_)(e.$t("Add media")),1),(0,s.Lk)("button",{type:"button",class:"delete","aria-label":e.$t("Close"),onClick:t[0]||(t[0]=t=>e.$emit("close"))},null,8,ta)]),(0,s.Lk)("section",ia,[(0,s.bF)(d,{class:"drive-embed-modal__field",label:e.$t("Media link"),type:o.error?"is-danger":"",message:o.error?o.error:e.$t("Paste a public YouTube or Spotify link")},{default:(0,s.k6)(()=>[(0,s.bF)(r,{ref:"urlInput",modelValue:o.url,"onUpdate:modelValue":[t[1]||(t[1]=e=>o.url=e),t[2]||(t[2]=e=>o.error=null)],type:"url",placeholder:"https://"},null,8,["modelValue"])]),_:1},8,["label","type","message"]),(0,s.bF)(d,{label:e.$t("Title (optional)")},{default:(0,s.k6)(()=>[(0,s.bF)(r,{modelValue:o.title,"onUpdate:modelValue":t[3]||(t[3]=e=>o.title=e),placeholder:e.$t("Leave empty to use the media title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),(0,s.Lk)("footer",sa,[(0,s.bF)(c,{class:"is-primary is-rounded",loading:o.isSaving,disabled:!o.url.trim(),onClick:l.submit},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Add media")),1)]),_:1},8,["loading","disabled","onClick"])])])}var na={name:"DriveEmbedModal",props:{parentId:{type:[Number,String],default:null},personalUserId:{type:[Number,String],default:null},unitId:{type:[Number,String],default:null}},emits:["close","created"],data(){return{url:"",title:"",error:null,isSaving:!1}},mounted(){this.$nextTick(()=>{setTimeout(()=>this.$refs.urlInput?.focus(),50)})},methods:{submit(){const e=this.url.trim();if(!e)return;this.isSaving=!0,this.error=null;const t={url:e};return this.title.trim()&&(t.title=this.title.trim()),this.parentId&&(t.parentId=this.parentId),this.personalUserId&&(t.personalUserId=this.personalUserId),this.unitId&&(t.unitId=this.unitId),this.$http.plain.post("/drives/embed",t).then(e=>{this.$emit("created",e.data),this.$emit("close")}).catch(e=>{this.error=e?.response?.data?.["hydra:description"]||e?.response?.data?.detail||this.$t("This media link is not supported")}).finally(()=>{this.isSaving=!1})}}};const oa=(0,Gs.A)(na,[["render",aa],["__scopeId","data-v-336a65ac"]]);var la=oa;const ra={class:"card drive-upload-panel"},da={class:"dup-header"},ca={class:"dup-title"},ua={class:"dup-header-actions"},ma=["aria-label"],pa={class:"icon is-small"},ha=["aria-label"],ga={class:"icon is-small"},fa={key:0,class:"dup-subbar"},ba={class:"dup-eta"},ya={key:1,class:"dup-rows"},va={class:"dup-thumb"},ka=["src"],Ca={class:"dup-body"},La=["title"],wa={key:0,class:"dup-progress"},_a={class:"dup-status"};function Ea(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",ra,[(0,s.Lk)("header",da,[(0,s.Lk)("span",ca,(0,a.v_)(l.headerTitle),1),(0,s.Lk)("div",ua,[(0,s.Lk)("button",{class:"dup-icon-btn dup-collapse",type:"button","aria-label":e.$t("Collapse"),onClick:t[0]||(t[0]=e=>o.isCollapsed=!o.isCollapsed)},[(0,s.Lk)("span",pa,[(0,s.bF)(r,{icon:o.isCollapsed?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])],8,ma),(0,s.Lk)("button",{class:"dup-icon-btn dup-close",type:"button","aria-label":e.$t("Close"),onClick:t[1]||(t[1]=t=>e.$emit("close"))},[(0,s.Lk)("span",ga,[(0,s.bF)(r,{icon:"fa-light fa-xmark"})])],8,ha)])]),l.hasActiveUploads?((0,s.uX)(),(0,s.CE)("div",fa,[(0,s.Lk)("span",ba,(0,a.v_)(l.etaLabel),1),(0,s.Lk)("a",{class:"dup-cancel",onClick:t[2]||(t[2]=t=>e.$emit("cancel-all"))},(0,a.v_)(e.$t("cancel")),1)])):(0,s.Q3)("",!0),o.isCollapsed?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ya,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.entries,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.uid,class:"dup-row"},[(0,s.Lk)("span",va,[l.thumbSrc(e)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:l.thumbSrc(e),alt:""},null,8,ka)):((0,s.uX)(),(0,s.Wv)(r,{key:1,icon:"fa-light "+l.iconFor(e).icon,style:(0,a.Tr)({color:l.iconFor(e).color})},null,8,["icon","style"]))]),(0,s.Lk)("span",Ca,[(0,s.Lk)("span",{class:"dup-name",title:e.errorMessage||e.name},(0,a.v_)(e.name),9,La),l.isActive(e)?((0,s.uX)(),(0,s.CE)("span",wa,[(0,s.Lk)("span",{class:"dup-progress-fill",style:(0,a.Tr)({width:Math.min(e.progress,
1100)+"%"})},null,4)])):(0,s.Q3)("",!0)]),(0,s.Lk)("span",_a,["done"===e.status?((0,s.uX)(),(0,s.Wv)(r,{key:0,class:"dup-check",icon:"fa-light fa-circle-check"})):"error"===e.status?((0,s.uX)(),(0,s.Wv)(r,{key:1,class:"dup-error",icon:"fa-light fa-circle-exclamation"})):"uploading"===e.status||"saving"===e.status?((0,s.uX)(),(0,s.Wv)(r,{key:2,class:"dup-spinner fa-spin",icon:"fa-light fa-circle-notch"})):((0,s.uX)(),(0,s.Wv)(r,{key:3,class:"dup-pending",icon:"fa-light fa-circle"}))])]))),128))]))])}i(18237);var $a=i(56178),Fa=i(95256);const Ta=["pending","uploading","saving"];var Sa={name:"DriveUploadPanel",props:{entries:{type:Array,required:!0}},emits:["close","cancel-all"],data(){return{isCollapsed:!1,startedAt:Date.now(),now:Date.now(),etaTimer:null}},computed:{activeEntries(){return this.entries.filter(e=>Ta.includes(e.status))},hasActiveUploads(){return this.activeEntries.length>0},doneCount(){return this.entries.filter(e=>"done"===e.status).length},headerTitle(){return this.hasActiveUploads?1===this.entries.length?this.$t("Uploading 1 item"):this.$t("Uploading {count} items",{count:this.entries.length}):1===this.doneCount?this.$t("1 upload complete"):this.$t("{count} uploads complete",{count:this.doneCount})},etaLabel(){const e=this.entries.filter(e=>"error"!==e.status),t=e.reduce((e,t)=>e+(t.size||0),0),i=e.reduce((e,t)=>e+(t.size||0)*Math.min(t.progress,100)/100,0),s=this.now-this.startedAt;if(i<=0||s<1e3)return this.$t("Less than a minute left");const a=(t-i)*s/i/1e3;return a<60?this.$t("Less than a minute left"):this.$t("{minutes} minutes left",{minutes:Math.ceil(a/60)})}},created(){this.etaTimer=setInterval(()=>{this.now=Date.now()},1e3)},beforeUnmount(){clearInterval(this.etaTimer)},methods:{isActive(e){return Ta.includes(e.status)},thumbSrc(e){return e.row&&(0,Fa.l0)(e.row)||e.dataUrl||null},iconFor(e){return(0,$a.Yg)({mimeType:e.mimeType})}}};const Aa=(0,Gs.A)(Sa,[["render",Ea],["__scopeId","data-v-5f05bb3a"]]);var Pa=Aa,Ia=i(16104),Ma=i(40834),xa=i(28782),Na=i(69133),Ua=i(18108),Da=(i(59213),i(71710)),Xa=i.n(Da),Va=i(78048),Ra={props:{forcePersonalDrive:{type:Boolean,default:!1},personalDriveUser:{type:Object,default:null}},data(){return{isPersonalDrive:!1,windowWidth:window.innerWidth,dropzoneOptions:{url:xa.ze+"/",method:"post",autoQueue:!0,maxFiles:100,parallelUploads:1,autoProcessQueue:!1,thumbnailWidth:120,timeout:99999999,maxFilesize:5e3,addRemoveLinks:!0,dictDefaultMessage:this.$t("Drop files here"),dictFileTooBig:this.$t("errorMaxFileSize"),dictCancelUploadConfirmation:this.$t("cancelUploadConfirmation"),dictRemoveFile:' <span class="icon is-small"><font-awesome-icon icon="fa-light fa-times"></font-awesome-icon></span>',dictCancelUpload:' <span class="icon is-small"><font-awesome-icon icon="fa-light fa-times"></font-awesome-icon></span>'},unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,unitItem:null,isGeneralUnit:this.$route.query.generalUnit,isGallery:this.$store.state.listValues.drive.isGallery,filter:{myDrive:this.$store.state.listValues.drive.myDrive,search:this.$store.state.listValues.drive.search,folder:this.$store.state.driveCurrentFolder},currentFolderObject:null,file:null,items:null,itemsHasFolders:!1,itemsHasFiles:!1,itemsTotal:null,itemsPerPage:100,documents:[],searchQuery:"",searchResults:null,isSearching:!1,searchDebounceTimer:null,itemsPageCurrent:1,defaultSortOrder:"desc",sortField:"dateCreated",sortOrder:"desc",isLoading:!1,isLoadingLatest:!1,myGroups:[],myGroupsStats:[],editingSharingIndex:null,editingSharingDriveTitle:null,editingSharingDrive:null,editingSharingDriveUnit:null,editingSharingIsTenantFeatured:null,isModalActive:!1,isDragDropActive:!1,dropAreaMinHeight:"60vh",uploadQueue:[],noResults:!1,filesProcessing:[],onlyAdminsCanUploadFiles:!1,isImageGalleryActive:!1,imageItems:[],currentImageIndex:0,aspectRatios:{},openTileMenuId:null,draggedItem:null,dragOverItem:null,selectedItem:null,dragPreview:null,dragPreviewStyle:{transform:"translate(0px, 0px)",transition:"none",willChange:"transform"},dragPreviewOffset:{x:0,y:0},animationFrameId:null,offsetAnimationFrame:null,dropHandled:!1,dragActive:!1,draggedRowIndex:null,lastMousePosition:{x:0,y:0},openMoveItemModal:!1,modalCurrentFolder:null,modalFolders:[],modalSelectedFolder:null,modalBreadcrumb:[],isLoadingModalFolders:!1,isMovingItem:!1,isOfficeFileMod
1alActive:!1,selectedOfficeFile:null,isSearchFocused:!1,isShareModalActive:!1,shareModalItem:null,isGeneratingShare:!1,isRevokingShare:!1,rowDropdownPosition:"is-bottom-left",shareStatePollingInterval:null,embedPollingInterval:null,listSharePollingInterval:null,thumbnailPollingInterval:null,communityShareUrl:null,isFetchingCommunityLink:!1}},created(){if(window.addEventListener("resize",this.updateWindowWidth),document.addEventListener("dragenter",this.handleDocumentDragEnter),document.addEventListener("dragover",this.handleDocumentDragOver),document.addEventListener("dragleave",this.handleDocumentDragLeave),document.addEventListener("drop",this.handleDocumentDrop),this.$store.state.currentGroupTab="drive",this.onlyAdminsCanUploadFiles=this.$store.state.currentGroup?.onlyAdminsCanUploadFiles,this.initIsGallery(),this.forcePersonalDrive)return this.isPersonalDrive=!0,this.isGeneralUnit=!1,this.unitId=null,this.filter.folder=null,this.currentFolderObject=null,void this.loadItems();"true"===this.$route.query.personalDrive&&(this.isPersonalDrive=!0),this.$route.query.pid&&this.$route.query.ptitle?this.$http.plain.get("/drives/"+this.$route.query.pid).then(e=>{this.currentFolderObject=e.data,this.preFilterFolder(e.data),this.loadItems()}).catch(()=>{const e={id:this.$route.query.pid,title:this.$route.query.ptitle,parent:this.$route.query.pparent};this.currentFolderObject=e,this.preFilterFolder(e),this.loadItems()}):(this.currentFolderObject=null,this.preFilterFolder(null),(this.unitId||this.isGeneralUnit||this.isPersonalDrive)&&this.loadItems()),this.getLatestDrive(),this.unitId||this.isGeneralUnit||this.getMyGroups()},beforeUnmount(){window.removeEventListener("resize",this.updateWindowWidth),document.removeEventListener("dragenter",this.handleDocumentDragEnter),document.removeEventListener("dragover",this.handleDocumentDragOver),document.removeEventListener("dragleave",this.handleDocumentDragLeave),document.removeEventListener("drop",this.handleDocumentDrop),document.removeEventListener("dragover",this.updateDragPreviewPosition),this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.stopShareStatePolling(),this.stopListSharePolling(),this.stopEmbedPolling(),this.stopThumbnailPolling()},computed:{effectivePersonalDriveUser(){return this.personalDriveUser||this.user},dropTargetLabel(){return this.currentFolderObject?this.currentFolderObject.title:this.isPersonalDrive?this.effectivePersonalDriveUser?.firstName||this.$t("Personal Drive"):this.unitId&&this.unitItem?this.unitItem.name:this.tenant?.shortName||""},shareModalEmbedCode(){return this.shareModalItem?.slugGo?(0,Fa.ko)(this.shareModalItem.slugGo,this.shareModalItem.title):""},groupsViewTableData(){return this.searchResults||this.documents},showPriority1(){return!0},showPriority2(){return this.windowWidth>=576},showPriority3(){return this.windowWidth>=768},showPriority4(){return this.windowWidth>=992},isMoreThanOnePage(){return!!(this.itemsTotal>this.itemsPerPage&&this.itemsPerPage)},canManagePersonalDrive(){const e=this.tenant?.settingFeatures?.drive?.whoCanManagePersonal||"USER";return this.isGranted(e,this.effectivePersonalDriveUser?.localCenter)},isUpdateActionsVisible(){if(this.isPersonalDrive)return this.canManagePersonalDrive;if(this.isGeneralUnit&&this.isGranted(this.tenant.settingFeatures.drive.whoCanPostPublic))return!0;if(this.unitId){if(this.onlyAdminsCanUploadFiles&&(this.isGranted("HR_TENANT")||this.isCurrentGroupAdmin)||!this.onlyAdminsCanUploadFiles)return!0;if(!this.onlyAdminsCanUploadFiles&&(this.unitItem&&"Group"===this.unitItem["@type"]||this.isCurrentGroupAdmin))return!0}return!1},isEmbedMediaEnabled(){return!!this.tenant?.settingFeatures?.drive?.embedMedia},...(0,Ma.L8)(["user","tenant","isGranted","isCurrentGroupAdmin","isNativeApp"]),rowHeight(){return this.windowWidth<=768?120:this.windowWidth<=1024?150:200},mobileHeaderTitle(){return this.currentFolderObject?this.currentFolderObject.title:this.isPersonalDrive?this.personalDriveUser&&this.personalDriveUser.fullName?this.personalDriveUser.fullName:this.$t("Personal Drive"):this.unitId&&this.unitItem?this.unitItem.name:this.isGeneralUnit&&this.tenant?this.tenant.shortName:this.$t("Drive")}},methods:{onSearchInput(){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this.performSearch()},400)},performSearch(){const e=this.searchQuery.trim();e.length<2?this.searchResults=null:(this.isSearching=!0,this.$http.plain.get("/drive/search",{params:{search:e}}).then(e=>{this.searchResults=e.data["hydra:member"]}).catch(e=>{console.error(e),this.searchResults=null}).finally(()=>{this.isSearching=!1,this.syncTransitionalShares()}))},clearSearch(){this.searchQuery="",this.searchResults=null,this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer)},handleMobileBack(){this.currentFolderObject?this.navigateToParentFolder():this.$router.go(-1)},canEditDriveItem(e){return"boolean"===typeof e.canEdit?e.canEdit:e.owner?.id===this.user.id},canShareDriveItem(e){return"boolean"===typeof e.canShare?e.canShare:(!!e.media||"folder"===e.type)&&this.canEditDriveItem(e)},apiErrorMessage(e,t){const i=e?.response?.data;return i?.detail||i?.["hydra:description"]||this.$t(t)},openShareModal(e){this.shareModalItem=e,this.isShareModalActive=!0,this.communityShareUrl=null,e?.slugGo||this.fetchCommunityShareLink(),"publishing"!==e?.shareState&&"unpublishing"!==e?.shareState||this.startShareStatePolling()},closeShareModal(){this.isShareModalActive=!1,this.shareModalItem=null,this.communityShareUrl=null,this.isFetchingCommunityLink=!1,this.stopShareStatePolling(),this.syncTransitionalShares()},copyShareableLink(e){e?.media&&this.$http.plain.get("/drives/"+e.id+"/community-share-link").then(e=>{const t=e.data?.communityShareUrl;
1t&&(this.copyToClipboard(t),this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-success",duration:1500}))}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Could not generate share link"),type:"is-danger"})})},fetchCommunityShareLink(){this.shareModalItem&&(this.isFetchingCommunityLink=!0,this.$http.plain.get("/drives/"+this.shareModalItem.id+"/community-share-link").then(e=>{this.communityShareUrl=e.data?.communityShareUrl??null}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Could not generate share link"),type:"is-danger"})}).finally(()=>{this.isFetchingCommunityLink=!1}))},copyCommunityShareLink(){if(this.communityShareUrl)return this.copyToClipboard(this.communityShareUrl),void this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-success",duration:500});this.shareModalItem&&(this.isFetchingCommunityLink=!0,this.$http.plain.get("/drives/"+this.shareModalItem.id+"/community-share-link").then(e=>{const t=e.data?.communityShareUrl;t&&(this.communityShareUrl=t,this.copyToClipboard(t),this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-success",duration:500}))}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Could not generate share link"),type:"is-danger"})}).finally(()=>{this.isFetchingCommunityLink=!1}))},generateShareLink(){if(!this.shareModalItem||this.isGeneratingShare)return;this.isGeneratingShare=!0;const e="folder"===this.shareModalItem.type,t=e?"/drives/"+this.shareModalItem.id+"/share-folder":"/drives/"+this.shareModalItem.id+"/share";this.$http.plain.patch(t,{},{headers:{"Content-Type":"application/merge-patch+json"}}).then(t=>{this.applyShareResponse(t.data),t.data.slugGo&&(this.communityShareUrl=null),"publishing"===t.data.shareState&&this.startShareStatePolling(),e&&this.loadItems(!0)}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Could not generate share link"),type:"is-danger"})}).finally(()=>{this.isGeneratingShare=!1})},revokeShareLink(){if(!this.shareModalItem||this.isRevokingShare)return;this.isRevokingShare=!0;const e="folder"===this.shareModalItem.type,t=e?"/drives/"+this.shareModalItem.id+"/revoke-folder-share":"/drives/"+this.shareModalItem.id+"/revoke-share";this.$http.plain.patch(t,{},{headers:{"Content-Type":"application/merge-patch+json"}}).then(t=>{this.applyShareResponse(t.data),"unpublishing"===t.data.shareState?this.startShareStatePolling():t.data.slugGo||(this.selectedShareScope="community",this.fetchCommunityShareLink()),e&&this.loadItems(!0)}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Could not revoke share link"),type:"is-danger"})}).finally(()=>{this.isRevokingShare=!1})},copyShareLink(){this.shareModalItem?.slugGo&&"publishing"!==this.shareModalItem.shareState&&(this.copyToClipboard("https://go.orgo.space/d/"+this.shareModalItem.slugGo),this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-success",duration:500}))},copyEmbedFromModal(){this.shareModalEmbedCode&&"publishing"!==this.shareModalItem.shareState&&(this.copyToClipboard(this.shareModalEmbedCode),this.$buefy.toast.open({message:this.$t("Embed code copied to clipboard"),type:"is-success",duration:1500}))},copyEmbedCode(e){"folder"!==e.type&&this.isWebPlayable(e.media)&&(e.slugGo&&"publishing"!==e.shareState?this.deliverEmbedCode(e):(this.$buefy.toast.open({message:this.$t("Publishing⦠the embed code will be copied when ready."),type:"is-info"}),this.$http.plain.patch("/drives/"+e.id+"/share",{},{headers:{"Content-Type":"application/merge-patch+json"}}).then(t=>{this.applyShareStateToLists(e.id,t.data),t.data.slugGo&&"publishing"!==t.data.shareState?this.deliverEmbedCode({...e,slugGo:t.data.slugGo}):this.pollForEmbedCode(e)}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Could not generate share link"),type:"is-danger"})})))},deliverEmbedCode(e){(0,Fa.bm)((0,Fa.ko)(e.slugGo,e.title)).then(t=>{t?this.$buefy.toast.open({message:this.$t("Embed code copied to clipboard"),type:"is-success",duration:1500}):(this.isImageGalleryActive=!1,this.openShareModal(e))})},pollForEmbedCode(e){this.stopEmbedPolling();const t=Date.now(),i=3e3,s=3e5;this.embedPollingInterval=setInterval(()=>{if(Date.now()-t>
1s)return this.stopEmbedPolling(),void this.$buefy.toast.open({message:this.$t("Share link is taking longer than expected"),type:"is-warning"});this.$http.plain.get("/drives/"+e.id).then(t=>{this.applyShareStateToLists(e.id,t.data),"idle"===t.data.shareState&&(this.stopEmbedPolling(),t.data.slugGo&&this.deliverEmbedCode({...e,slugGo:t.data.slugGo}))}).catch(e=>{console.log(e),this.stopEmbedPolling()})},i)},stopEmbedPolling(){this.embedPollingInterval&&(clearInterval(this.embedPollingInterval),this.embedPollingInterval=null)},applyShareResponse(e){if(!this.shareModalItem)return;this.shareModalItem.slugGo=e.slugGo??null,this.shareModalItem.shareState=e.shareState??"idle";const t=e=>{e.slugGo=this.shareModalItem.slugGo,e.shareState=this.shareModalItem.shareState},i=this.items?.find(e=>e.id===this.shareModalItem.id);i&&t(i);const s=this.documents?.find(e=>e.id===this.shareModalItem.id);s&&t(s)},startShareStatePolling(){this.stopShareStatePolling();const e=Date.now(),t=3e3,i=3e5;this.shareStatePollingInterval=setInterval(()=>{if(this.shareModalItem)return Date.now()-e>i?(this.stopShareStatePolling(),void this.$buefy.toast.open({message:this.$t("Share link is taking longer than expected"),type:"is-warning"})):void this.$http.plain.get("/drives/"+this.shareModalItem.id).then(e=>{this.applyShareResponse(e.data),"idle"===e.data.shareState&&(this.stopShareStatePolling(),e.data.slugGo||(this.selectedShareScope="community",this.fetchCommunityShareLink()))}).catch(e=>{console.log(e),this.stopShareStatePolling()});this.stopShareStatePolling()},t)},stopShareStatePolling(){this.shareStatePollingInterval&&(clearInterval(this.shareStatePollingInterval),this.shareStatePollingInterval=null)},applyShareStateToLists(e,t){const i=i=>{i&&i.id===e&&(i.slugGo=t.slugGo??null,i.shareState=t.shareState??"idle")};this.items?.forEach(i),this.documents?.forEach(i),this.searchResults?.forEach(i)},syncTransitionalShares(){(0,$a.mW)(this.items,this.documents,this.searchResults).length>0&&this.startListSharePolling()},startListSharePolling(){if(this.listSharePollingInterval)return;const e=Date.now(),t=3e3,i=3e5;this.listSharePollingInterval=setInterval(()=>{const t=(0,$a.mW)(this.items,this.documents,this.searchResults);0===t.length||Date.now()-e>i?this.stopListSharePolling():t.forEach(e=>{this.$http.plain.get("/drives/"+e).then(t=>{this.applyShareStateToLists(e,t.data)}).catch(e=>{console.log(e)})})},t)},stopListSharePolling(){this.listSharePollingInterval&&(clearInterval(this.listSharePollingInterval),this.listSharePollingInterval=null)},applyThumbnailToLists(e,t){const i=t&&t.media;if(!i)return;const s=t=>{t&&t.id===e&&t.media&&(t.media.thumbnailStatus=i.thumbnailStatus??null,t.media.thumbnailUrl=i.thumbnailUrl??null,t.media.thumbnailWidth=i.thumbnailWidth??null,t.media.thumbnailHeight=i.thumbnailHeight??null)};this.items?.forEach(s),this.documents?.forEach(s),this.searchResults?.forEach(s)},syncPendingThumbnails(){(0,$a.KX)(this.items,this.documents,this.searchResults).length>0&&this.startThumbnailPolling()},startThumbnailPolling(){if(this.thumbnailPollingInterval)return;const e=Date.now(),t=4e3,i=3e5;this.thumbnailPollingInterval=setInterval(()=>{const t=(0,$a.KX)(this.items,this.documents,this.searchResults);0===t.length||Date.now()-e>i?this.stopThumbnailPolling():t.forEach(e=>{this.$http.plain.get("/drives/"+e).then(t=>{this.applyThumbnailToLists(e,t.data)}).catch(e=>{console.log(e)})})},t)},stopThumbnailPolling(){this.thumbnailPollingInterval&&(clearInterval(this.thumbnailPollingInterval),this.thumbnailPollingInterval=null)},updateWindowWidth(){this.windowWidth=window.innerWidth},openPersonalDrive(){this.isPersonalDrive=!0,this.isGeneralUnit=!1,this.unitId=null,this.filter.folder=null,this.currentFolderObject=null,this.$router.push({path:"/drive",query:{personalDrive:"true"}}),this.loadItems()},...(0,Ma.L8)([]),mediaSrc:Fa.F9,driveThumbnailSrc:Fa.l0,handleSectionDragEnter(e){!this.draggedItem&&e.dataTransfer.types.includes("Files")&&this.activateFileDrag()},handleSectionDragOver(e){this.dragPreview&&this.updateDragPreviewPosition(e),!this.draggedItem&&e.dataTransfer.types.includes("Files")&&this.activateFileDrag()},handleDocumentDragEnter(e){!this.draggedItem&&e.dataTransfer?.types?.includes("Files")&&this.activateFileDrag()},handleDocumentDragOver(e){this.isDragDropActive&&e.preventDefault()},handleDocumentDragLeave(e){this.isDragDropActive&&!e.relatedTarget&&(this.isDragDropActive=!1)},handleDocumentDrop(e){this.isDragDropActive&&(e.preventDefault(),this.isDragDropActive=!1)},activateFileDrag(){(this.unitId||this.isGeneralUnit||this.isPersonalDrive)&&this.isUpdateActionsVisible&&(this.isDragDropActive||(this.isDragDropActive=!0,this.$nextTick(this.updateDropAreaHeight)))},updateDropAreaHeight(){const e=this.$refs.dropArea;if(!e)return;const t=e.getBoundingClientRect().top;this.dropAreaMinHeight=Math.max(window.innerHeight-t-16,240)+"px"},handleSectionDragEnd(){this.isDragDropActive=!1},handleSectionDrop(){this.isDragDropActive=!1,this.dragActive=!1,this.dropHandled=!0,this.dragPreview=null,this.dragPreviewOffset={x:0,y:0},this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.offsetAnimationFrame&&(cancelAnimationFrame(this.offsetAnimationFrame),this.offsetAnimationFrame=null)},handleTableDragStart(e){const{row:t,index:i,event:s}=e;if(s){s.stopPropagation(),s.dataTransfer.effectAllowed="move",this.dropHandled=!1,this.dragActive=!0,this.draggedRowIndex=i;const e=this.getFileIconConfig(t.media);this.dragPreview={name:t.title||"File",icon:e.icon,color:e.color};let a=null;if(s.target&&"function"===typeof s.target.closest&&(a=s.target.closest("tr")),!a){const e=document.querySelectorAll(".filesTable tbody tr");e&&e[i]&&(a=e[i])}const n=a?a.getBoundingClientRect():{left:s.clientX,top:s.clientY};this.dragPreviewOffset={x:n.left-s.clientX,y:n.top-s.clientY},this.lastMousePosition={x:s.clientX,y:s.clientY},this.dragPreviewStyle.transform=`translate(${s.clientX+this.dragPreviewOffset.x}px, ${s.clientY+this.dragPreviewOffset.y}px)`;const o=document.createElement("div");o.style.width="1px",o.style.height="1px",o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o),s.dataTransfer.setDragImage(o,0,0),setTimeout(()=>document.body.removeChild(o),0),document.addEventListener("dragover",this.updateDragPreviewPosition),document.addEventListener("mouseup",this.handleQuickDrop);const l=Date.now(),r=800,d={x:n.left-s.clientX,y:n.top-s.clientY},c=()=>
1{if(!this.dragActive||!this.dragPreview)return void(this.offsetAnimationFrame=null);const e=Date.now()-l,t=Math.min(e/r,1),i=1-Math.pow(1-t,3);this.dragPreviewOffset={x:d.x*(1-i),y:d.y*(1-i)},t<1&&this.dragActive?this.offsetAnimationFrame=requestAnimationFrame(c):this.offsetAnimationFrame=null};this.$nextTick(()=>{this.offsetAnimationFrame=requestAnimationFrame(c)})}this.draggedItem=t},handleQuickDrop(){this.dragPreview&&(this.dragPreview=null,this.dragActive=!1,this.dragPreviewOffset={x:0,y:0},this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.offsetAnimationFrame&&(cancelAnimationFrame(this.offsetAnimationFrame),this.offsetAnimationFrame=null)),document.removeEventListener("mouseup",this.handleQuickDrop)},updateDragPreviewPosition(e){this.dragPreview&&(this.lastMousePosition.x=e.clientX,this.lastMousePosition.y=e.clientY,this.animationFrameId&&cancelAnimationFrame(this.animationFrameId),this.animationFrameId=requestAnimationFrame(()=>{if(this.dragPreview){const e=this.lastMousePosition.x+this.dragPreviewOffset.x,t=this.lastMousePosition.y+this.dragPreviewOffset.y;this.dragPreviewStyle.transform=`translate(${e}px, ${t}px)`}}))},handleTableDrop(e){const{row:t,index:i,event:s}=e;if(s){s.stopPropagation(),s.preventDefault();let e=null;s.target&&"function"===typeof s.target.closest&&(e=s.target.closest("tr")),e&&e.classList.remove("drag-over")}this.draggedItem&&t&&"folder"===t.type&&this.moveItemToFolder(this.draggedItem,t),this.dropHandled=!0},handleTableDragOver(e){const{row:t,index:i,event:s}=e;if(this.dragPreview&&s&&this.updateDragPreviewPosition(s),s&&t&&"folder"===t.type){s.stopPropagation(),s.preventDefault(),s.dataTransfer.dropEffect="move",this.dragOverItem=t;let e=null;s.target&&"function"===typeof s.target.closest&&(e=s.target.closest("tr")),e&&e.classList.add("drag-over")}},handleTableDragLeave(e){const{row:t,index:i,event:s}=e;if(s){s.stopPropagation(),this.dragOverItem=null;let e=null;s.target&&"function"===typeof s.target.closest&&(e=s.target.closest("tr")),e&&e.classList.remove("drag-over")}},handleTableDragEnd(){this.dragPreview=null,this.dragPreviewOffset={x:0,y:0},this.draggedItem=null,this.draggedRowIndex=null,this.dragActive=!1,this.dropHandled=!1,this.isDragDropActive=!1,this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.offsetAnimationFrame&&(cancelAnimationFrame(this.offsetAnimationFrame),this.offsetAnimationFrame=null),document.removeEventListener("dragover",this.updateDragPreviewPosition,!0),document.removeEventListener("mouseup",this.handleQuickDrop)},handleCardDragStart(e,t){e.stopPropagation(),this.dropHandled=!1,this.dragActive=!0,this.draggedItem=t,e.dataTransfer.effectAllowed="move";const i=this.getFileIconConfig(t.media);this.dragPreview={name:t.title||"File",icon:i.icon,color:i.color};const s=e.currentTarget.getBoundingClientRect();this.dragPreviewOffset={x:s.left-e.clientX,y:s.top-e.clientY},this.lastMousePosition={x:e.clientX,y:e.clientY},this.dragPreviewStyle.transform=`translate(${e.clientX+this.dragPreviewOffset.x}px, ${e.clientY+this.dragPreviewOffset.y}px)`;const a=document.createElement("div");a.style.width="1px",a.style.height="1px",a.style.position="absolute",a.style.left="-9999px",document.body.appendChild(a),e.dataTransfer.setDragImage(a,0,0),setTimeout(()=>document.body.removeChild(a),0),document.addEventListener("dragover",this.updateDragPreviewPosition),document.body.classList.add("is-dragging-active");const n=Date.now(),o=800,l={x:s.left-e.clientX,y:s.top-e.clientY},r=()=>{if(!this.dragActive||!this.dragPreview)return void(this.offsetAnimationFrame=null);const e=Date.now()-n,t=Math.min(e/o,1),i=1-Math.pow(1-t,3);this.dragPreviewOffset={x:l.x*(1-i),y:l.y*(1-i)},t<1&&this.dragActive?this.offsetAnimationFrame=requestAnimationFrame(r):this.offsetAnimationFrame=null};this.$nextTick(()=>{this.offsetAnimationFrame=requestAnimationFrame(r)})},handleCardDragEnd(e){this.dropHandled||(this.dragPreview=null,this.dragPreviewOffset={x:0,y:0},this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.offsetAnimationFrame&&(cancelAnimationFrame(this.offsetAnimationFrame),this.offsetAnimationFrame=null)),this.draggedItem=null,this.dragActive=!1,this.dropHandled=!1,this.isDragDropActive=!1,document.removeEventListener("dragover",this.updateDragPreviewPosition,!0),document.body.classList.remove("is-dragging-active")},handleCardDragOver(e,t){this.dragPreview&&this.updateDragPreviewPosition(e),"folder"===t.type&&this.draggedItem&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",e.currentTarget.classList.add("drag-over"))},handleCardDragLeave(e){e.currentTarget.classList.remove("drag-over")},handleCardDrop(e,t){e.preventDefault(),e.stopPropagation(),e.currentTarget.classList.remove("drag-over");const i=this.draggedItem,s=document.getElementById("drag-layer");if(s){const e=s.querySelector(".drag-preview-content");e&&(e.style.display="none")}this.dragActive=!1,this.dropHandled=!0,this.draggedItem=null,this.dragPreview=null,this.dragPreviewOffset={x:0,y:0},this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.offsetAnimationFrame&&(cancelAnimationFrame(this.offsetAnimationFrame),this.offsetAnimationFrame=null),i&&t&&!t.media&&this.moveItemToFolder(i,t)},moveItemToFolder(e,t){null==t||e["@id"]!==t["@id"]?null==t||"folder"===t.type?this.$http.plain.patch("/drives/"+e.id,{parent:t?t["@id"]:null}).then(e=>
1{this.$buefy.toast.open({message:this.$t("Item moved successfully"),type:"is-success"}),this.loadItems()}).catch(e=>{console.error("Failed to move item:",e),this.$buefy.toast.open({message:this.$t("Failed to move item"),type:"is-danger"})}):this.$buefy.toast.open({message:this.$t("Can only move items into folders"),type:"is-warning"}):this.$buefy.toast.open({message:this.$t("Can't move a folder into itself"),type:"is-warning"})},buildPath(e){const t=[];let i=e;while(i)t.unshift(i),i=i.parent?i.parent:null;return t},openMoveModal(e){this.selectedItem=e;let t=e.parent;this.modalBreadcrumb=[],t?(this.modalBreadcrumb=this.buildPath(t),this.modalCurrentFolder=t,this.modalSelectedFolder=t):(this.modalCurrentFolder=null,this.modalSelectedFolder=null),this.openMoveItemModal=!0,this.loadModalFolders(this.modalCurrentFolder)},closeMoveModal(){this.openMoveItemModal=!1,this.selectedItem=null,this.modalCurrentFolder=null,this.modalSelectedFolder=null,this.modalBreadcrumb=[],this.modalFolders=[]},loadModalFolders(e=null){this.isLoadingModalFolders=!0;let t,i=this.getOrderQueryString(),s="&exists[parent]=false";e&&(s="&parent="+e.id),t=this.isPersonalDrive?"&personalUser="+this.effectivePersonalDriveUser.id:this.isGeneralUnit?"&exists[unit]=false":this.unitId?"&unit="+this.unitId:"&exists[unit]=false",this.$http.plain.get("/drives?"+t+s+i).then(e=>{this.modalFolders=e.data["hydra:member"].filter(e=>"folder"===e.type),this.isLoadingModalFolders=!1}).catch(e=>{console.error("Failed to load folders:",e),this.isLoadingModalFolders=!1,this.$buefy.toast.open({message:this.$t("Failed to load folders"),type:"is-danger"})})},navigateToModalFolder(e){if(e!==this.modalCurrentFolder){if(this.modalCurrentFolder=e,this.modalSelectedFolder=e,e){const t=this.modalBreadcrumb.findIndex(t=>t.id===e.id);t>=0?this.modalBreadcrumb=this.modalBreadcrumb.slice(0,t+1):this.modalBreadcrumb.push(e)}else this.modalBreadcrumb=[];this.loadModalFolders(e)}else this.modalSelectedFolder=e},selectModalFolder(e){this.selectedItem&&this.selectedItem.id===e.id||(this.modalSelectedFolder=e)},canMoveToSelected(){return!!this.selectedItem&&(!(!this.modalSelectedFolder&&!this.selectedItem.parent)&&((!this.modalSelectedFolder||!this.selectedItem.parent||this.modalSelectedFolder.id!==this.selectedItem.parent.id)&&!(this.modalSelectedFolder&&this.selectedItem&&this.modalSelectedFolder.id===this.selectedItem.id)))},confirmMoveToFolder(){this.canMoveToSelected()&&(this.moveItemToFolder(this.selectedItem,this.modalSelectedFolder),this.closeMoveModal())},copyToClipboard:Fa.lW,formatBytes:Fa.z3,getFileIconConfig(e,t=null){return(0,$a.Yg)(e,t)},toggleIsGallery(){this.isGallery=!this.isGallery,this.$store.state.listValues.drive.isGallery=this.isGallery},initIsGallery(){null!==this.$store.state.listValues.drive.isGallery&&(this.isGallery=this.$store.state.listValues.drive.isGallery),this.$store.state.listValues.drive.isGallery=this.isGallery},getLatestDrive(){return this.isLoadingLatest=!0,this.$http.plain.get("/drive/latest?exists[unit]=false&order[dateCreated]=desc").then(e=>{this.documents=e.data["hydra:member"]}).catch(e=>{console.error(e.message)}).finally(()=>{this.isLoadingLatest=!1,this.syncTransitionalShares()})},changeCurrentGroup(e){e&&"Tenant"===e["@type"]?this.$store.state.currentGroup="generalUnit":this.$store.state.currentGroup=e;let t={};"Tenant"===e["@type"]?t.generalUnit=!0:t.unit=e.id,this.$router.push({name:"DriveList",query:{...t}})},copyDriveToClipboard(e){if("string"===typeof e||e instanceof String)this.copyToClipboard(e);else if("object"===typeof e){let t="https://"+location.hostname+"/drive?";this.unitId?t+="unit="+this.unitId:this.isGeneralUnit&&(t+="generalUnit=true"),t+="&pid="+e.id+"&ptitle="+encodeURIComponent(e.title),e=t}this.copyToClipboard(e),this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-success",duration:500,actionText:null})},mime(e){return(0,$a.xX)(e)},isOfficeFile(e){return(0,$a.H7)(e)},isWebPlayable(e){if(!e)return!1;const t=e.mime||e.mimeType||null,i=e.contentUrl||e.fileName||null;return(0,Ia.e)(t,i)},handleFileClick(e){this.isOfficeFile(e.media)?(this.selectedOfficeFile=e,this.isOfficeFileMod
1alActive=!0):this.openImageGallery(e)},viewOfficeFileInBrowser(){this.selectedOfficeFile&&(this.$router.push({name:"DriveDoc",params:{id:this.selectedOfficeFile.id}}),this.isOfficeFileModalActive=!1)},downloadOfficeFile(){this.selectedOfficeFile&&(this.downloadFile(this.selectedOfficeFile),this.isOfficeFileModalActive=!1)},groupTotal(e){let t=this.myGroupsStats.find(t=>t.id===e);return t&&0!==t["total"]?t["total"]:null},groupSize(e){let t=this.myGroupsStats.find(t=>t.id===e);return t&&t["size"]?this.formatBytes(t["size"]):null},dropzoneDrop(){this.isDragDropActive=!1},dropzoneAddedFile(e){this.isDragDropActive=!1;const t=e.type||"application/octet-stream";this.queueUploadFile(e),this.confirmWebPlayableOrCancel(e,t).then(i=>{if(!i)return void this.$refs.dropzone?.removeFile?.(e);const s=this.findUploadEntry(e);s&&"error"===s.status||this.$http.plain.get("/s3-upload?fileType="+t+"&fileName="+e.name+"&type=drive").then(t=>{e.additionalData=t.data.additionalData,e.upload.filename=t.data.newFileName,this.allQueueHasAdditionalData()&&this.$refs.dropzone.processQueue()})})},queueUploadFile(e){this.uploadQueue.push({uid:e.upload?.uuid||e.name+":"+e.size,name:e.name,size:e.size,mimeType:e.type||"application/octet-stream",progress:0,status:"pending",dataUrl:null,row:null,errorMessage:null})},findUploadEntry(e){const t=e.upload?.uuid;if(t){const e=this.uploadQueue.find(e=>e.uid===t);if(e)return e}return this.uploadQueue.find(t=>t.name===e.name&&t.size===e.size)},dropzoneThumbnail(e,t){const i=this.findUploadEntry(e);i&&(i.dataUrl=t)},dropzoneUploadProgress(e,t){const i=this.findUploadEntry(e);i&&"done"!==i.status&&"error"!==i.status&&(i.progress=t,i.status="uploading")},dropzoneRemovedFile(e){const t=this.findUploadEntry(e);t&&"done"!==t.status&&"error"!==t.status&&(this.uploadQueue=this.uploadQueue.filter(e=>e!==t))},cancelAllUploads(){this.$refs.dropzone?.removeAllFiles?.(!0)},closeUploadPanel(){const e=this.uploadQueue.some(e=>["pending","uploading","saving"].includes(e.status));e?this.$buefy.dialog.confirm({message:this.$t("cancelUploadConfirmation"),onConfirm:()=>{this.cancelAllUploads(),this.uploadQueue=[]}}):this.uploadQueue=[]},confirmWebPlayableOrCancel(e,t){return new Promise(i=>{t.startsWith("video/")?(0,Ia.e)(t,e.name)?i(!0):this.$buefy.dialog.confirm({title:this.$t("Video format not supported by browsers"),message:this.$t("This video format cannot be played in the browser. Download to play."),confirmText:this.$t("Upload as download-only"),cancelText:this.$t("Cancel and convert"),type:"is-warning",onConfirm:()=>i(!0),onCancel:()=>i(!1)}):i(!0)})},dropzoneSending(e,t,i){for(let s in e.additionalData)i.append(s,e.additionalData[s]);i.append("Content-Type",e.type||"application/octet-stream"),i.append("acl","public-read"),this.filesProcessing.push(e)},dropzoneComplete(){let e=this.$refs.dropzone;0===e.getQueuedFiles().length&&0===e.getUploadingFiles().length&&(this.isDragDropActive=!1)},dropzoneError(e,t,i){if("Upload canceled."===t)return;const s=this.findUploadEntry(e);if(s)return s.status="error",void(s.errorMessage="string"===typeof t?t:this.$t("Upload failed"));this.$buefy.toast.open({duration:5e3,message:e.name+": "+t,type:"is-danger"})},dropzoneSuccess(e){if(e.name!==this.filesProcessing[0].name)return;const t=this.findUploadEntry(e);t&&(t.status="saving",t.progress=100);let i=null,s={title:e.name,fileName:e.upload.filename,fileSize:e.size,mediaType:e.type};this.isPersonalDrive?(s.personalUser="/api/v1/users/"+this.effectivePersonalDriveUser.id,this.filter.folder&&this.filter.folder.id&&(s.parent="/api/v1/drives/"+this.filter.folder.id)):(this.unitId&&this.filter.folder[this.unitId]&&(i="/api/v1/drives/"+this.filter.folder[this.unitId].id),this.isGeneralUnit&&this.filter&&this.filter.folder[0]&&(i="/api/v1/drives/"+this.filter.folder[0].id),s.unit=this.unitItem?this.unitItem["@id"]:null,s.parent=i),this.$http.plain.post("/drives",s).then(e=>{this.items.unshift(e.data),this.noResults=!1,t&&(t.row=e.data,t.status="done",t.progress=100),this.syncPendingThumbnails()}).catch(e=>{console.error(e),t&&(t.status="error",t.errorMessage=this.$t("Upload failed"))}).finally(()=>{this.filesProcessing.shift(),this.filesProcessing.length>0&&this.dropzoneSuccess(this.filesProcessing[0])})},allQueueHasAdditionalData(){let e=this.$refs.dropzone.getQueuedFiles();for(let t of e)if(void 0===t.additionalData)return!1;return!0},preFilterFolder(e){this.itemsPageCurrent=1,this.currentFolderObject=e,this.isPersonalDrive?this.filter.folder=e:this.unitId?(this.filter.folder[this.unitId]=e,this.$store.state.driveCurrentFolder[this.unitId]=e):this.isGeneralUnit&&(this.filter.folder[0]=e,this.$store.state.driveCurrentFolder[0]=e)},navigateToParentFolder(){if(!this.currentFolderObject)return;const e=this.buildPath(this.currentFolderObject),t=e.length>1?e[e.length-2]:null;this.filterFolder(t)},filterFolder(e){if(this.filter.search=null,this.$store.state.listValues.drive.search=null,this.currentFolderObject=e,this.isPersonalDrive)return this.preFilterFolder(e),void this.loadItems();let t={};e&&e.parent&&e.parent.id&&(t.pparent=e.parent.id),this.unitId?e?this.$router.push({name:"DriveList",query:{unit:this.unitId,pid:e.id,ptitle:e.title,...t}}):this.$router.push({name:"DriveList",query:{unit:this.unitId}}):this.isGeneralUnit?e?this.$router.push({name:"DriveList",query:{generalUnit:!0,pid:e.id,ptitle:e.title,...t}}):this.$router.push({name:"DriveList",query:{generalUnit:!0}}):e&&(e.unit?this.$router.push({name:"DriveList",query:{unit:e.unit.id,pid:e.id,ptitle:e.title,...t}}):this.$router.push({name:"DriveList",query:{generalUnit:!0,pid:e.id,ptitle:e.title,...t}}))},getMyGroups(){this.myGroups.unshift(this.tenant),this.$http.plain.get("/stats/drive-my-groups").then(e=>{this.myGroupsStats=e.data;for(let i of this.$store.state.spaces[this.$store.state.tenant.slug].myGroups)if("Group"!==i["@type"]||i.hasFiles){let e=this.myGroupsStats.find(e=>e.id===i.id);e&&this.myGroups.push(i)}let t=this.myGroupsStats.find(e=>"personal"===e.id);t&&this.myGroups.push({id:"personal",name:"Personal Drive"})}).catch(e=>console.error(e))},getOrderQueryString(){return"&order["+this.sortField+"]="+this.sortOrder},filterItems(){this.itemsPageCurrent=1,this.$store.state.listValues.drive.myDrive=this.filter.myDrive,this.$store.state.listValues.drive.search=this.filter.search,this.loadItems()},filterByText(){this.filter.search.length<=3&&0!==this.filter.search.length||this.filterItems()},clearIconClick(){this.filter.search="",this.$store.state.listValues.drive.search="",this.filterItems()},getFiltersQueryString(){let e="";return this.filter.myDrive&&(e+="&owner="+this.$store.state.currentUser.id),this.filter.search&&this.filter.search.length>=3&&(e+="&title="+this.filter.search),this.unitId?e+="&unit="+this.unitId:this.isGeneralUnit&&(e+="&exists[unit]=false"),this.filter.myDrive||this.filter.search&&this.filter.search.length>=3?this.preFilterFolder(null):this.unitId?this.filter.folder[this.unitId]?e+="&parent="+this.filter.folder[this.unitId].id:e+="&exists[parent]=false":this.isGeneralUnit&&(this.filter.folder&&this.filter.folder[0]?e+="&parent="+this.filter.folder[0].id:e+="&exists[parent]=false"),e},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.loadItems()},loadItems(e=!1){let t;if(e||(this.isLoading=!0),this.noResults=!1,this.isPersonalDrive)t=`/users/${this.effectivePersonalDriveUser.id}/personal-drive`,this.filter.folder&&this.filter.folder.id&&(t+="?parent="+this.filter.folder.id);else{let e=this.getOrderQueryString(),i=this.getFiltersQueryString();t="/drives?"+i+e}this.$http.plain.get(t).then(e=>{if(this.isPersonalDrive){const t=Array.isArray(e.data)?e.data:e.data["hydra:member"]||[];this.items=this.sortByFolderFirst(t),1===this.itemsPageCurrent&&(this.itemsTotal=t.length,this.itemsPerPage=t.length)}else this.items=this.sortByFolderFirst(e.data["hydra:member"]),1===this.itemsPageCurrent&&(this.itemsTotal=e.data["hydra:totalItems"],this.itemsPerPage=this.items.length);this.items.length||(this.noResults=!0)}).catch(e=>console.error(e)).finally(()=>{for(let e of this.$store.state.spaces[this.tenant.slug].myGroups)e.id===this.unitId&&(this.unitItem=e);this.isLoading=!1,this.syncTransitionalShares(),this.syncPendingThumbnails()})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.loadItems()},confirmDelete(e,t){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" <b>"+e.title+"</b>? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>this.delete(e.id,t)}
1)},setEditingSharingIsTenantFeatured(){this.editingSharingIsTenantFeatured&&(this.editingSharingDriveUnit=null)},delete(e,t){this.isLoading=!0,this.$http.plain.delete("/drives/"+e).then(i=>this.deleteSuccess(e,t)).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.apiErrorMessage(e,"Failed to delete"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},deleteSuccess(e,t){if(this.items&&this.items[t]&&this.items.splice(t,1),this.documents){const t=this.documents.findIndex(t=>t.id===e);-1!==t&&this.documents.splice(t,1)}if(this.searchResults){const t=this.searchResults.findIndex(t=>t.id===e);-1!==t&&this.searchResults.splice(t,1)}if(this.$buefy.toast.open(this.$t("deleted")),this.currentFolderObject&&this.currentFolderObject.id===e){const e=this.currentFolderObject.parent;this.filterFolder(e&&e.id?e:null)}},renameDrive(e){document.activeElement?.blur(),this.isModalActive=!0,this.editingSharingDrive=e,this.editingSharingDriveTitle=e.title,this.editingSharingDriveUnit=e.unit,this.editingSharingIsTenantFeatured=e.isTenantFeatured,this.focusModalTitle()},createFolder(){this.isModalActive=!0,this.focusModalTitle()},openEmbedModal(){let e=null,t=null,i=null;this.isPersonalDrive?(i=this.effectivePersonalDriveUser?this.effectivePersonalDriveUser.id:null,this.filter.folder&&this.filter.folder.id&&(e=this.filter.folder.id)):(this.unitId&&this.filter.folder[this.unitId]&&(e=this.filter.folder[this.unitId].id),this.isGeneralUnit&&this.filter.folder&&this.filter.folder[0]&&(e=this.filter.folder[0].id),this.unitId&&(t=this.unitId)),this.$buefy.modal.open({component:la,hasModalCard:!0,trapFocus:!0,width:520,props:{parentId:e,unitId:t,personalUserId:i},events:{created:this.onEmbedCreated}})},onEmbedCreated(){this.$buefy.toast.open({message:this.$t("Media added")}),this.loadItems()},driveLeadingIcon(e){return"embed"===e.type?e.metadata&&"spotify"===e.metadata.provider?"fa-brands fa-spotify":"fa-brands fa-youtube":"fa-light "+this.getFileIconConfig(e.media,e.type).icon},driveLeadingIconStyle(e){return"embed"===e.type?{}:{color:this.getFileIconConfig(e.media,e.type).color}},focusModalTitle(){this.$nextTick(()=>{setTimeout(()=>this.$refs.title?.focus(),50)})},createDocument(){let e=null;const t={title:"Untitled Document",type:"doc",docContent:"<p></p>"};this.isPersonalDrive?(t.personalUser="/api/v1/users/"+this.effectivePersonalDriveUser.id,this.filter.folder&&this.filter.folder.id&&(e="/api/v1/drives/"+this.filter.folder.id)):(this.unitId&&this.filter.folder[this.unitId]&&(e="/api/v1/drives/"+this.filter.folder[this.unitId]["id"]),this.isGeneralUnit&&this.filter.folder&&this.filter.folder[0]&&(e="/api/v1/drives/"+this.filter.folder[0]["id"]),this.unitId&&(t.unit="/api/v1/units/"+this.unitId)),t.parent=e,this.$router.push({name:"DriveDoc",params:{id:"new"},state:{newDocument:t}})},openDocument(e){this.$router.push({name:"DriveDoc",params:{id:e.id}})},cancelEditModal(){this.isModalActive=!1,this.editingSharingDrive=null,this.editingSharingDriveTitle=null,this.editingSharingDriveUnit=null,this.editingSharingIsTenantFeatured=null},saveEditModal(){null!=this.editingSharingDrive?this.$http.plain.patch("/drives/"+this.editingSharingDrive.id,{title:this.editingSharingDriveTitle}).then(e=>{if(this.documents){const e=this.documents.findIndex(e=>e.id===this.editingSharingDrive.id);-1!==e&&(this.documents[e].title=this.editingSharingDriveTitle)}if(this.searchResults){const e=this.searchResults.findIndex(e=>e.id===this.editingSharingDrive.id);-1!==e&&(this.searchResults[e].title=this.editingSharingDriveTitle)}this.cancelEditModal(),this.saveSuccess(e),this.loadItems()}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.apiErrorMessage(e,"Failed to save"),type:"is-danger"})}):this.createFolderSave()},sortByFolderFirst(e){let t=[],i=[];for(let s of e)s.media?i.push(s):t.push(s);return this.itemsHasFolders=t.length>0,this.itemsHasFiles=i.length>0,t.concat(i)},createFolderSave(){let e={title:this.editingSharingDriveTitle,isTenantFeatured:this.editingSharingIsTenantFeatured};this.isPersonalDrive?(e.personalUser="/api/v1/users/"+this.effectivePersonalDriveUser.id,this.filter.folder&&this.filter.folder.id&&(e.parent="/api/v1/drives/"+this.filter.folder.id)):(this.unitId&&this.filter.folder[this.unitId]&&(e.parent="/api/v1/drives/"+this.filter.folder[this.unitId]["id"]),this.isGeneralUnit&&this.filter.folder&&this.filter.folder[0]&&(e.parent="/api/v1/drives/"+this.filter.folder[0]["id"]),this.unitId&&(e.unit="/api/v1/units/"+this.unitId)),this.$http.plain.post("/drives",e).then(e=>{this.cancelEditModal(),this.saveSuccess(e),this.loadItems()}).catch(e=>console.error(e))}
1,saveSuccess(e){return this.$buefy.toast.open({message:this.$t("uploadSuccess")})},error(e){console.error(e)},openImageGallery(e){const t=this.items||this.documents||[];this.imageItems=t.filter(e=>e.media||"embed"===e.type),this.currentImageIndex=this.imageItems.findIndex(t=>t.id===e.id),this.isImageGalleryActive=!0},tileKind(e){if(!e.media)return"icon";const t=this.mime(e.media);return"image"===t?"image":"video"===t?"video":"icon"},shareBadge(e){return e.slugGo&&"publishing"!==e.shareState&&"unpublishing"!==e.shareState?"public":"publishing"===e.shareState||"unpublishing"===e.shareState?e.shareState:null},defaultRatio(e){if(!e.media)return 1.3;const t=this.mime(e.media);return"image"===t||"video"===t?1:1.3},cellStyle(e){const t=this.aspectRatios[e.id]||this.defaultRatio(e);return{flexGrow:t,flexBasis:t*this.rowHeight+"px"}},onTileAspect({id:e,ratio:t}){t&&isFinite(t)&&(this.aspectRatios[e]=Math.min(2,Math.max(1,t)))},handleTileOpen(e){e.media?this.handleFileClick(e):"embed"===e.type?this.openImageGallery(e):"doc"===e.type?this.openDocument(e):this.filterFolder(e)},onTileAction({type:e,row:t},i){this.runDriveAction(e,t,i)},onRowDropdownToggle(e,t){const i=e.currentTarget.getBoundingClientRect(),s=window.innerHeight-i.bottom;this.rowDropdownPosition=s<240?"is-top-left":"is-bottom-left",t()},handleLightboxAction({type:e,row:t}){const i=this.items?this.items.findIndex(e=>e.id===t.id):-1;"download"!==e&&"embed"!==e&&(this.isImageGalleryActive=!1),this.runDriveAction(e,t,i)},runDriveAction(e,t,i){switch(e){case"copy-link":t.media?this.copyShareableLink(t):this.copyDriveToClipboard(t);break;case"share":this.openShareModal(t);break;case"embed":this.copyEmbedCode(t);break;case"download":this.downloadFile(t);break;case"remove":this.confirmDelete(t,i);break;case"move":this.openMoveModal(t);break;case"rename":this.renameDrive(t);break}},downloadFolderAsZip(e){if(!e)return;this.isLoading=!0;const t=new(Xa()),i=this.items.filter(e=>e.media);if(0===i.length)return this.$buefy.toast.open({message:this.$t("noFilesToDownload"),type:"is-warning",duration:3e3}),void(this.isLoading=!1);const s=new Map,a=e=>{const t=e.lastIndexOf("."),i=-1!==t?e.slice(0,t):e,a=-1!==t?e.slice(t):"";let n=s.get(e)||0,o=e;while(n>0){if(o=`${i} (${n+1})${a}`,!s.has(o))break;n++}return s.set(o,n+1),o},n=i.map(e=>fetch(this.mediaSrc(e.media)).then(e=>e.blob()).then(i=>{const s=a(e.title);t.file(s,i)}));Promise.all(n).then(()=>t.generateAsync({type:"blob"})).then(t=>{const i=document.createElement("a");i.href=URL.createObjectURL(t),i.download=`${e.title}.zip`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(i.href),this.$buefy.toast.open({message:this.$t("folderDownloadStarted")||"Folder download started",type:"is-success",duration:3e3})}).catch(e=>{console.error("Error creating zip:",e),this.$buefy.toast.open({message:this.$t("errorDownloadingFolder")||"Error downloading folder",type:"is-danger",duration:5e3})}).finally(()=>{this.isLoading=!1})},driveMediaSrc(e){return e?.media?e.slugGo&&e.media.contentUrl?"string"===typeof e.media.contentUrl&&(e.media.contentUrl.includes("https://")||e.media.contentUrl.includes("http://"))?this.mediaSrc(e.media):xa.ze+"/media/drive/"+e.media.contentUrl:this.mediaSrc(e.media,"drive"):null},downloadFile(e){e.media&&(this.isLoading=!0,fetch(this.driveMediaSrc(e)).then(e=>e.blob()).then(t=>{const i=window.URL.createObjectURL(t),s=document.createElement("a");s.href=i,s.setAttribute("download",e.title),document.body.appendChild(s),s.click(),window.URL.revokeObjectURL(i),this.$buefy.toast.open({message:this.$t("Downloading..."),type:"is-info",duration:3e3})}).catch(e=>{console.error("Error downloading file:",e),this.$buefy.toast.open({message:this.$t("Error downloading file"),type:"is-danger",duration:5e3})}).finally(()=>{this.isLoading=!1}))}},watch:{isGallery(e){this.$store.state.listValues.drive.isGallery=e}},components:{BButton:Va.PF,UserTypeThumbnail:Na.A,GroupHeader:Vs.A,LogoThumbnail:Rs.A,DragLayer:js,VueDropzone:Ua.A,ViewToggle:zs.A,MobileViewHeader:qs.A,DriveVideoPlayer:Js.A,DriveGalleryTile:Hs.A,DriveLightbox:Ks.A,DriveUploadPanel:Pa}};const Oa=(0,Gs.A)(Ra,[["render",Xs],["__scopeId","data-v-1b68af06"]]);var Qa=Oa},28782:function(e,t,i){"use strict";i.d(t,{Ar:function(){return d},DJ:function(){return l},DP:function(){return h},H$:function(){return a},Km:function(){return r},Nd:function(){return g},QU:function(){return s},f4:function(){return m},hd:function(){return o},uW:function(){return c},v0:function(){return p},w3:function(){return u},ze:function(){return n}});const s="",a="/api/v1",n="https://orgostatic.s3.eu-central-1.amazonaws.com",o="https://d20rr3locxzp1i.cloudfront.net",l="/media/",r="prod",d=!1,c=!0,u=1073741824,m="AIzaSyAgEa2n-qdnz_uou6itzZEeFA05YbowKQI",p="cb1_2p9g_1_2886af2d73cb9d84ef803e03",h="pk_test_51HagNjJXGalRBQbsNuE97A978SUFFY6rLQXnndwbSRJ3FEXSZcHHcQT52QoXCWpoh7rRZaZTVnIqtKl8QF3GkqFF00KldcRPaz",g={apiKey:"AIzaSyDWem1ml5DW6CTyt2ZjMo06dzReQbprrHA",authDomain:"orgo-39d1b.firebaseapp.com",databaseURL:"https://orgo-39d1b.firebaseio.com",projectId:"orgo-39d1b",storageBucket:"orgo-39d1b.appspot.com",messagingSenderId:"709196101048",appId:"1:709196101048:web:ced2c5b8e245b9d39c8b4d",measurementId:"G-WHL2SJCRBL"}},28906:function(e,t,i){"use strict";var s=i(95256);t.A={computed:{displayLabel(){return(0,s.ND)(this.label)}},methods:{optionLabel(e){return(0,s.ND)(e.label)}}}},28994:function(e,t,i){"use strict";i(44114),i(18111),i(22489),i(7588);const s="pillTabPositions";function a(e){if(e.id)return e.id;if(e.dataset.pillId)return e.dataset.pillId;const t=Array.from(e.classList).filter(e=>"pill-indicator-ready"!==e).sort().join(".");return t||null}function n(e){return!!e&&Number(e.width)>0}function o(e){if(!e)return null;try{const t=sessionStorage.getItem(s);if(!t)return null;const i=JSON.parse(t),a=i[e];return n(a)?a:null}catch(t){return console.error(t),null}}function l(e,t,i){if(e&&n({width:i}))try{const a=sessionStorage.getItem(s),n=a?JSON.parse(a):{};n[e]={left:t,width:i},sessionStorage.setItem(s,JSON.stringify(n))}catch(a){console.error(a)}}t.A={data(){return{pillInstances:[],pillInitTimer:null,pillAnimatingUntil:0}},mounted(){this.$nextTick(()=>this.initAllPillIndicators()),this.pillInitTimer=setInterval(()=>{this.initAllPillIndicators(),this.pillInstances.length>0&&(clearInterval(this.pillInitTimer),this.pillInitTimer=null)},200)},watch:{$route(){this.$nextTick(()=>{this.slidePills()})}},updated(){this.initAllPillIndicators(),this.slidePills()},beforeUnmount(){this.pillInitTimer&&clearInterval(this.pillInitTimer),this.pillInstances.forEac
1h(e=>{e.resizeObserver&&e.resizeObserver.disconnect(),e.clickHandler&&e.ul.removeEventListener("click",e.clickHandler),e.pillId&&e.ind.dataset.left&&l(e.pillId,e.ind.dataset.left,e.ind.dataset.width)})},methods:{slidePills(){this.pillInstances=this.pillInstances.filter(e=>e.ul.isConnected),this.pillInstances.forEach(e=>{this.syncPillPosition(e,!0)})},initAllPillIndicators(){if(!this.$el||!this.$el.querySelectorAll)return;const e=Array.from(this.$el.querySelectorAll(".tabs-pill"));this.$el.classList&&this.$el.classList.contains("tabs-pill")&&e.unshift(this.$el),e.forEach(e=>{const t=e.querySelector(".tabs");if(!t)return;const i=t.querySelector("ul");if(!i)return;if(i.querySelector(".tabs-pill-indicator"))return;const s=i.querySelector("li.is-active");if(!s)return;i.style.position="relative";const n=document.createElement("div");n.className="tabs-pill-indicator",n.style.transition="none",i.appendChild(n);const l=a(i),r=o(l);r?(i.classList.add("pill-indicator-ready"),n.style.opacity="1",n.style.transform=`translateX(${r.left}px)`,n.style.width=`${r.width}px`,n.dataset.left=String(r.left),n.dataset.width=String(r.width),n.offsetHeight):this.setPillTransform(i,n,s)&&(n.offsetHeight,i.classList.add("pill-indicator-ready"));const d=t,c=(e,t)=>{if(!e||!d)return;const i=d.getBoundingClientRect(),s=e.getBoundingClientRect(),a=s.left+s.width/2-(i.left+i.width/2);Math.abs(a)<1||d.scrollBy({left:a,behavior:t?"smooth":"auto"})},u=e=>{const t=e.target.closest("li");t&&this.$nextTick(()=>c(t,!0))};i.addEventListener("click",u),s&&c(s,!1);const m={ul:i,ind:n,pillId:l,scroller:d,scrollToLi:c,clickHandler:u,resizeObserver:null};m.resizeObserver=new ResizeObserver(()=>{if(Date.now()<this.pillAnimatingUntil)return;const e=i.querySelector("li.is-active");e&&(n.style.transition="none",this.setPillTransform(i,n,e))}),m.resizeObserver.observe(i),this.pillInstances.push(m),r&&requestAnimationFrame(()=>{this.syncPillPosition(m,!0)})})},syncPillPosition(e,t){const{ul:i,ind:s}=e;if(!i.isConnected)return;const a=i.querySelector("li.is-active");if(!a)return void(s.style.opacity="0");const n=i.getBoundingClientRect(),o=a.getBoundingClientRect(),r=Math.round(o.left-n.left+i.scrollLeft),d=Math.round(o.width);if(!(d<=0)){if(String(r)===s.dataset.left&&String(d)===s.dataset.width)return s.style.opacity="1",void i.classList.add("pill-indicator-ready");t&&void 0!==s.dataset.left?(s.style.transition="transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1)",this.pillAnimatingUntil=Date.now()+350):s.style.transition="none",s.style.opacity="1",s.style.transform=`translateX(${r}px)`,s.style.width=`${d}px`,s.dataset.left=String(r),s.dataset.width=String(d),i.classList.add("pill-indicator-ready"),e.pillId&&l(e.pillId,r,d),"function"===typeof e.scrollToLi&&e.scrollToLi(a,!!t)}},setPillTransform(e,t,i){const s=e.getBoundingClientRect(),a=i.getBoundingClientRect(),n=Math.round(a.left-s.left+e.scrollLeft),o=Math.round(a.width);return!(o<=0)&&(t.style.opacity="1",t.style.transform=`translateX(${n}px)`,t.style.width=`${o}px`,t.dataset.left=String(n),t.dataset.width=String(o),!0)}}}},29025:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033);const n={class:"local-center-select"},o={key:0},l={key:1},r={key:0},d={key:1},c={key:0,value:null},u=["value"],m={key:0},p={key:1},h={key:3,class:"is-size-7 mt-2"};function g(e,t,i,g,f,b){const y=(0,s.g2)("b-taginput"),v=(0,s.g2)("b-field"),k=(0,s.g2)("b-autocomplete"),C=(0,s.g2)("b-select");return(0,s.uX)(),(0,s.CE)("div",n,[i.multiple?((0,s.uX)(),(0,s.Wv)(v,{key:0,label:i.label,class:(0,a.C4)({required:i.isRequired})},{default:(0,s.k6)(()=>[(0,s.bF)(y,{"model-value":b.selectedCenters,data:b.availableCenters,autocomplete:"",field:"displayName","open-on-focus":!0,disabled:i.disabled,placeholder:i.placeholder||e.$t("Type to search..."),expanded:"",onTyping:b.onMultipleTyping,"onUpdate:modelValue":b.onMultipleChange},{default:(0,s.k6)(({option:t})=>[e.tenant.settingFeatures.localCenter.hasParent&&0===b.lcDepth(t)?((0,s.uX)(),(0,s.CE)("span",o,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("LP")),1)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.localCenter.hasParent&&b.lcDepth(t)>0?((0,s.uX)(),(0,s.CE)("span",l,(0,a.v_)(b.lcIndent(t," "))+"â "+(0,a.v_)(e.$t("LC")),1
1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(b.localCenterNameSelector(t,e.tenant)),1)]),empty:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("No results found")),1)]),_:1},8,["model-value","data","disabled","placeholder","onTyping","onUpdate:modelValue"])]),_:1},8,["label","class"])):i.useAutocomplete?((0,s.uX)(),(0,s.Wv)(v,{key:1,label:i.label,class:(0,a.C4)({required:i.isRequired})},{default:(0,s.k6)(()=>[(0,s.bF)(k,{modelValue:f.searchText,"onUpdate:modelValue":t[0]||(t[0]=e=>f.searchText=e),data:b.filteredCenters,placeholder:i.placeholder||e.$t("Type to search..."),field:"displayName",disabled:i.disabled,clearable:i.clearable,"open-on-focus":!0,"keep-first":!0,"append-to-body":i.appendToBody,expanded:"",onSelect:b.onAutocompleteSelect},{default:(0,s.k6)(({option:t})=>[b.selectorTenant.settingFeatures.localCenter.hasParent&&0===b.lcDepth(t)?((0,s.uX)(),(0,s.CE)("span",r,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("LP")),1)])):(0,s.Q3)("",!0),b.selectorTenant.settingFeatures.localCenter.hasParent&&b.lcDepth(t)>0?((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(b.lcIndent(t,"Â "))+"â "+(0,a.v_)(e.$t("LC")),1
1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(b.localCenterNameSelector(t,b.selectorTenant)),1)]),empty:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("No results found")),1)]),_:1},8,["modelValue","data","placeholder","disabled","clearable","append-to-body","onSelect"])]),_:1},8,["label","class"])):((0,s.uX)(),(0,s.Wv)(v,{key:2,label:i.label,class:(0,a.C4)({required:i.isRequired})},{default:(0,s.k6)(()=>[(0,s.bF)(C,{"model-value":i.modelValue,disabled:i.disabled||0===b.centers.length&&!i.canSelectAll,required:i.isRequired,"onUpdate:modelValue":b.onSelectChange},{default:(0,s.k6)(()=>[i.allowNone?((0,s.uX)(),(0,s.CE)("option",c,(0,a.v_)(b.centers.length?"...":e.$t("Local groups not set yet")),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(b.filteredCenters,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t["@id"]},[!i.filterByPermission||b.canSelectCenter(t)?((0,s.uX)(),(0,s.CE)("option",{key:0,value:t["@id"]},[b.selectorTenant.settingFeatures.localCenter.hasParent&&0===b.lcDepth(t)?((0,s.uX)(),(0,s.CE)("span",m,(0,a.v_)(e.$t("LP")),1)):(0,s.Q3)("",!0),b.selectorTenant.settingFeatures.localCenter.hasParent&&b.lcDepth(t)>0?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(b.lcIndent(t,"Â Â "))+"â "+(0,a.v_)(e.$t("LC")),1
1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(b.localCenterNameSelector(t,b.selectorTenant)),1)],8,u)):(0,s.Q3)("",!0)],64))),128))]),_:1},8,["model-value","disabled","required","onUpdate:modelValue"])]),_:1},8,["label","class"])),i.showHint&&b.selectorTenant.settingFeatures.localCenter.hasParent&&i.isRequired?((0,s.uX)(),(0,s.CE)("p",h)):(0,s.Q3)("",!0)])}i(18111),i(22489),i(20116),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var f=i(40834),b=i(95256),y={name:"LocalCenterSelect",props:{modelValue:{type:[String,Array],default:null},multiple:{type:Boolean,default:!1},label:{type:String,default:null},placeholder:{type:String,default:null},isRequired:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},useAutocomplete:{type:Boolean,default:!1},showHint:{type:Boolean,default:!1},filterByPermission:{type:Boolean,default:!1},permissionToCheck:{type:String,default:"HR_PARENT_LOCAL"},localCenters:{type:Array,default:()=>[]},tenantOverride:{type:Object,default:null},parentsOnly:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},autoLoad:{type:Boolean,default:!1},canSelectAll:{type:Boolean,default:!1},allowNone:{type:Boolean,default:!0}},emits:["update:modelValue","select","loaded"],data(){return{searchText:"",internalLocalCenters:[],isLoading:!1}},computed:{...(0,f.L8)(["tenant","isGranted"]),selectorTenant(){const e=this.tenantOverride||this.tenant||{},t=e.settingFeatures?.localCenter||{};return{...e,settingFeatures:{...e.settingFeatures||{},localCenter:{...t,hasParent:t.hasParent??!1,selectorNameFormat:t.selectorNameFormat??"%town% - %name%"}}}},centers(){const e=this.autoLoad?this.internalLocalCenters:this.localCenters;return e||[]},filteredCenters(){let e=this.centers;this.parentsOnly&&(e=e.filter(e=>Boolean(e.isParent)));let t=e.map(e=>({...e,displayName:this.getDisplayName(e)}));if(this.filterByPermission&&(t=t.filter(e=>this.canSelectCenter(e))),(this.useAutocomplete||this.multiple)&&this.searchText){const e=this.searchText.toLowerCase();t=t.filter(t=>{const i=this.localCenterNameSelector(t,this.selectorTenant).toLowerCase();return i.includes(e)})}return t},selectedCenters(){if(!this.multiple)return[];const e=Array.isArray(this.modelValue)?this.modelValue:[];return e.map(e=>this.centers.find(t=>t["@id"]===e)).filter(Boolean).map(e=>({...e,displayName:this.getDisplayName(e)}))},availableCenters(){const e=new Set(Array.isArray(this.modelValue)?this.modelValue:[]);return this.filteredCenters.filter(t=>!e.has(t["@id"]))}},watch:{modelValue:{immediate:!0,handler(e){if(this.useAutocomplete&&e&&this.centers.length){const t=this.centers.find(t=>t["@id"]===e);t&&(this.searchText=this.getDisplayName(t))}}},centers:{handler(e){if(this.useAutocomplete&&this.modelValue&&e.length){const t=e.find(e=>e["@id"]===this.modelValue);t&&(this.searchText=this.getDisplayName(t))}}}},created(){this.autoLoad&&this.loadLocalCenters()},methods:{localCenterNameSelector:b.Hc,sortLocalCenters:b.KN,lcDepth(e){return Array.isArray(e.ancestors)?e.ancestors.length:e.parent?1:0},lcIndent(e,t){return t.replaceAll(" ","Â ").repeat(this.lcDepth(e))},getDisplayName(e){if(!e)return"";let t="";if(this.selectorTenant.settingFeatures.localCenter.hasParent){const i=this.lcDepth(e);t=i>0?"Â Â ".repeat(i)+"â "+this.$t("LC")+" ":this.$t("LP")+" "}return t+this.localCenterNameSelector(e,this.selectorTenant)},canSelectCenter(e){return!this.filterByPermission||this.isGranted(this.permissionToCheck,e)},onAutocompleteSelect(e){if(e){const t=e["@id"];this.$emit("update:modelValue",t),this.$emit("select",e),this.searchText=this.getDisplayName(e)}else this.allowNone&&(this.$emit("update:modelValue",null),this.$emit("select",null),this.searchText="")},onSelectChange(e){this.$emit("update:modelValue",e);const t=this.centers.find(t=>t["@id"]===e);this.$emit("select",t||null)},onMultipleTyping(e){this.searchText=e},onMultipleChange(e){this.searchText="";const t=(e||[]).map(e=>e["@id"]).filter(Boolean);this.$emit("update:modelValue",t),this.$emit("select",e||[])},loadLocalCenters(){this.isLoading=!0,this.$http.plain.get("/local-centers-public?isActive=1&tenantSlug="+this.selectorTenant.slug).then(e=>{this.internalLocalCenters=(0,b.KN)(e.data["hydra:member"],this.selectorTenant),this.$emit("loaded",this.internalLocalCenters)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})}}},v=i(66262);const k=(0,v.A)(y,[["render",g],["__scopeId","data-v-52688991"]]);var C=k},29341:function(e,t,i){"use strict";i.d(t,{A:function(){return A}});var s=i(20641);function a(e,t,i,a,n,o){const l=(0,s.g2)("ContactShowContent"),r=(0,s.g2)("ContactMentionCard"),d=(0,s.g2)("ItemViewModal");return(0,s.uX)(),(0,s.Wv)(d,{"model-value":i.modelValue,title:e.$t("Profile"),"modal-width":o.canViewFull?1100:480,"maximize-route":o.canViewFull&&i.contactId?{name:"ContactShow",params:{item:i.contactId}}:null,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update:modelValue",t)),onClose:t[1]||(t[1]=t=>e.$emit("close"))},{default:(0,s.k6)(()=>[i.contactId&&o.canViewFull?((0,s.uX)(),(0,s.Wv)(l,{key:0,"contact-id":i.contactId},null,8,["contact-id"])):i.contactId?((0,s.uX)(),(0,s.Wv)(r,{key:1,"contact-id":i.contactId},null,8,["contact-id"])):(0,s.Q3)("",!0)]),_:1}
1,8,["model-value","title","modal-width","maximize-route"])}var n=i(40834),o=i(95256),l=i(80762),r=i(52959),d=i(90033);const c={class:"contact-mention-card p-5"},u={class:"is-flex is-align-items-center"},m={class:"title is-5 mb-1"},p={key:0,class:"subtitle is-6 has-text-grey mb-0"},h={key:0,class:"mt-4 mb-0"},g={key:1,class:"contact-card-details mt-4"},f={class:"icon is-small mr-2 has-text-grey"},b=["href","target","rel"],y={key:1},v={key:2,class:"social-links mt-4"},k=["href","title"],C={key:1,class:"has-text-grey"};function L(e,t,i,a,n,o){const l=(0,s.g2)("b-loading"),r=(0,s.g2)("LogoThumbnail"),L=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("section",c,[(0,s.bF)(l,{"is-full-page":!1,"model-value":n.isLoading},null,8,["model-value"]),!n.isLoading&&n.contact?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("div",u,[(0,s.bF)(r,{item:{...n.contact,"@type":"contact"},"is-type":"roundMedium",class:"mr-4"},null,8,["item"]),(0,s.Lk)("div",null,[(0,s.Lk)("p",m,(0,d.v_)(n.contact.name),1),n.contact.role||n.contact.organisation?((0,s.uX)(),(0,s.CE)("p",p,(0,d.v_)([n.contact.role,n.contact.organisation].filter(Boolean).join(" · ")),1)):(0,s.Q3)("",!0)])]),n.contact.bio?((0,s.uX)(),(0,s.CE)("p",h,(0,d.v_)(n.contact.bio),1)):(0,s.Q3)("",!0),o.detailRows.length?((0,s.uX)(),(0,s.CE)("div",g,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.detailRows,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.icon,class:"is-flex is-align-items-center contact-card-detail"},[(0,s.Lk)("span",f,[(0,s.bF)(L,{icon:e.icon},null,8,["icon"])]),e.href?((0,s.uX)(),(0,s.CE)("a",{key:0,href:e.href,target:e.external?"_blank":null,rel:e.external?"noopener noreferrer":null},(0,d.v_)(e.text),9,b)):((0,s.uX)(),(0,s.CE)("span",y,(0,d.v_)(e.text),1))]))),128))])):(0,s.Q3)("",!0),o.socialLinks.length?((0,s.uX)(),(0,s.CE)("div",v,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.socialLinks,e=>((0,s.uX)(),(0,s.CE)("a",{key:e.icon,href:e.url,target:"_blank",class:"social-link-icon",rel:"noopener noreferrer",title:e.url},[(0,s.bF)(L,{icon:e.icon},null,8,["icon"])],8,k))),128))])):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0),n.isLoading||n.contact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",C,(0,d.v_)(e.$t("Profile not available")),1))])}i(44114);var w=i(31823),_={name:"ContactMentionCard",props:{contactId:{type:Number,default:null}},data(){return{contact:null,isLoading:!1}},created(){this.fetchContact()},watch:{contactId(){this.fetchContact()}},computed:{detailRows(){if(!this.contact)return[];const e=this.contact,t=[];e.email&&t.push({icon:"fa-light fa-envelope",text:e.email,href:"mailto:"+e.email}),e.phone&&t.push({icon:"fa-light fa-phone",text:e.phone,href:"tel:"+e.phone});const i=[e.town,e.country].filter(Boolean).join(", ");return i&&t.push({icon:"fa-light fa-location-dot",text:i}),e.companyName&&t.push({icon:"fa-light fa-building",text:e.companyName}),e.professionOrganisationRole&&t.push({icon:"fa-light fa-briefcase",text:e.professionOrganisationRole}),t},socialLinks(){const e=this.contact;return e?[{icon:"fab fa-linkedin",url:(0,o.sX)(e.linkedin)},{icon:"fab fa-x-twitter",url:(0,o.sX)(e.twitter)},{icon:"fab fa-instagram",url:(0,o.sX)(e.instagram)}].filter(e=>e.url):[]}},methods:{fetchContact(){this.contactId?(this.isLoading=!0,this.$http.plain.get("/contact-mention-card/"+this.contactId).then(e=>{this.contact=e.data}).catch(e=>{console.log(e),this.contact=null}).finally(()=>{this.isLoading=!1})):this.contact=null}},components:{LogoThumbnail:w.A}},E=i(66262);const $=(0,E.A)(_,[["render",L],["__scopeId","data-v-221afdad"]]);var F=$,T={name:"ContactMentionProfileModal",props:{modelValue:{type:Boolean,default:!1},contactId:{type:Number,default:null}},emits:["update:modelValue","close"],computed:{...(0,n.L8)(["isGranted"]),canViewFull(){return(0,o.U4)(this.isGranted)}},components:{ItemViewModal:l.A,ContactShowContent:r["default"],ContactMentionCard:F}};const S=(0,E.A)(T,[["render",a]]);var A=S},29450:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return ze}});var s=i(20641),a=i(90033);const n={class:"o-fullwidth"},o={key:0},l={class:"level"},r={class:"level-left"},d={class:"level-item"},c={class:"level-right"},u={class:"level-item"},m={style:{width:"100%","border-collapse":"collapse"}},p={style:{padding:"10px 16px"}},h={style:{padding:"10px 16px"}},g={style:{padding:"10px 16px"}},f={style:{padding:"10px 16px"}},b={style:{padding:"10px 16px"}},y={style:{padding:"12px 16px"}},v={style:{padding:"12px 16px"}},k={style:{padding:"12px 16px"}},C={style:{padding:"12px 16px"}},L={style:{padding:"12px 16px"}},w={key:1},_={key:0,class:"level"},E={class:"level-left"},$={class:"level-item"},F={class:"title"},T={class:"level-right"},S={class:"level-item"},A=["disabled"],P={class:"icon-text"},I={class:"icon is-small"},M={class:"level-item"},x={class:"icon-text"},N={class:"icon is-small"},U={class:"level-item"},D={class:"icon-text"},X={class:"icon is-small"},V={key:0,class:"is-flex mb-4"},R={key:0,class:"mt-1 ml-1 is-flex"},O={class:"tag is-rounded is-medium is-default"},Q={class:"icon-text"},B={class:"icon is-small"},G={key:1,class:"orgo-table-wrap"},W=["onClick"],j={class:"tag is-default is-rounded"},z={key:0},q={key:1},J={key:2},H={key:0,class:"is-block is-size-7 has-text-grey"},K={key:3},Y={key:0,class:"is-block is-size-7 has-text-grey"},Z={key:4,class:"has-text-grey-light"},ee={key:0,class:"tag is-rounded is-success"},te={key:1,class:"tag is-rounded is-info"},ie={key:2,class:"tag is-rounded is-default"},se={key:3,class:"tag is-rounded is-warning"},ae={key:4,class:"tag is-rounded is-danger"},ne={key:5,class:"tag is-rounded is-success"},oe={key:6,class:"tag is-rounded is-danger"},le={key:7,class:"tag is-rounded is-default"},re={key:8,class:"tag is-rounded is-info"},de={key:9,class:"tag is-rounded is-info"},ce={key:2},ue={key:0},me={key:0},pe={class:"columns"},he={class:"column is-half"},ge={class:"card p-5 mb-3"},fe={class:"column is-half"},be={class:"card p-5 mb-3"},ye={key:1},ve={class:"columns"},ke={class:"column is-half"},Ce={class:"card p-5 mb-3"},Le={class:"subtitle is-6 has-text-weight-semibold"},we={key:3},_e={key:4,class:"has-text-grey-light"},Ee={key:5,class:"is-block is-size-7 has-text-grey"},$e={class:"card p-5 mb-3"},Fe={class:"subtitle is-6 has-text-weight-semibold"},Te={class:"column is-half"},Se={class:"card p-5 mb-3"},Ae={class:"subtitle is-6 has-text-weight-semibold"},Pe={class:"tag is-rounded is-small is-default"},Ie={key:0,class:"card p-5 mb-3"},Me={class:"subtitle is-6 has-text-weight-semibold"},xe={class:"mt-5"},Ne={class:"title is-5"},Ue={key:0,class:"card email-preview-card"},De=["srcdoc","title"],Xe={key:1,class:"card email-preview-empty"},Ve={class:"email-preview-empty-icon mb-3"},Re={class:"email-preview-empty-message"};function Oe(e,t,i,Oe,Qe,Be){const Ge=(0,s.g2)("b-skeleton"),We=(0,s.g2)("font-awesome-icon"),je=(0,s.g2)("router-link"),ze=(0,s.g2)("SearchBarAutocomplete"),qe=(0,s.g2)("b-table-column"),Je=(0,s.g2)("b-table"),He=(0,s.g2)("ItemViewModal");return(0,s.uX)(),(0,s.CE)("section",n,[!Qe.items&&Qe.isLoading?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[(0,s.bF)(Ge,{width:"140px",height:"28px",animated:""})])]),(0,s.Lk)("div",c,[(0,s.Lk)("div",u,[(0,s.bF)(Ge,{width:"100px",height:"32px",animated:"",rounded:!0})])])]),(0,s.bF)(Ge,{width:"300px",height:"36px",class:"ml-2 mb-4",animated:""}),(0,s.Lk)("table",m,[(0,s.Lk)("thead",null,[(0,s.Lk)("tr",null,[(0,s.Lk)("th",p,[(0,s.bF)(Ge,{width:"25px",height:"12px",animated:""})]),(0,s.Lk)("th",h,[(0,s.bF)(Ge,{width:"65px",height:"12px",animated:""})]),(0,s.Lk)("th",g,[(0,s.bF)(Ge,{width:"60px",height:"12px",animated:""})]),(0,s.Lk)("th",f,[(0,s.bF)(Ge,{width:"55px",height:"12px",animated:""})]),(0,s.Lk)("th",b,[(0,s.bF)(Ge,{width:"40px",height:"12px",animated:""})])])]),(0,s.Lk)("tbody",null,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(8,e=>(0,s.Lk)("tr",{key:"skel-row-"+e},[(0,s.Lk)("td",y,[(0,s.bF)(Ge,{width:"40px",height:"14px",animated:""})]),(0,s.Lk)("td",v,[(0,s.bF)(Ge,{width:"90px",height:"22px",animated:"",rounded:!0})]),(0,s.Lk)("td",k,[(0,s.bF)(Ge,{width:50+e%4*10+"%",height:"14px",animated:""},null,8,["width"])]),(0,s.Lk)("td",C,[(0,s.bF)(Ge,{width:40+e%3*15+"%",height:"14px",animated:""},null,8,["width"])]),(0,s.Lk)("td",L,[(0,s.bF)(Ge,{width:"90px",height:"22px",animated:"",rounded:!0})])])),64))])])])):(0,s.Q3)("",!0),Qe.items?((0,s.uX)(),(0,s.CE)("div",w,[i.user||i.contact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",_,[(0,s.Lk)("div",E,[(0,s.Lk)("div",$,[(0,s.Lk)("h2",F,(0,a.v_)(e.$t("Email logs")),1)])]),(0,s.Lk)("div",T,[(0,s.Lk)("div",S,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-outlined is-small is-rounded",{"is-loading":Qe.isLoadingCSV}]),disabled:!Qe.itemsTotal,onClick:t[0]||(t[0]=(...e)=>Be.csvExportPrompt&&Be.csvExportPrompt(...e))},[(0,s.Lk)("span",P,[(0,s.Lk)("span",I,[(0,s.bF)(We,{icon:"fa-light fa-file-csv"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Export")),1)])],10,A)]),(0,s.Lk)("div",M,[(0,s.bF)(je,{class:"button is-primary is-outlined is-small is-rounded",to:{name:"EmailTemplates"}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",x,[(0,s.Lk)("span",N,[(0,s.bF)(We,{icon:"fa-light fa-file-lines"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Email templates")),1)])]),_:1})]),(0,s.Lk)("div",U,[Qe.items?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"button is-primary is-outlined is-small is-rounded",onClick:t[1]||(t[1]=(...e)=>Be.retrieve&&Be.retrieve(...e))},[(0,s.Lk)("span",D,[(0,s.Lk)("span",X,[(0,s.bF)(We,{icon:"fa-light fa-refresh"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Refresh")),1)])])):(0,s.Q3)("",!0)])])])),Qe.userId||Qe.contactId?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(ze,{key:1,"do-not-redirect":!0,"only-members-and-contacts":!0,placeholder:e.$t("Search by recipient"),class:"ml-2 mb-4","onUpdate:modelValue":Be.filterByRecipient},null,8,["placeholder","onUpdate:modelValue"])),(0,s.Lk)("div",{class:(0,a.C4)((i.contact,""))},[i.user||i.contact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",V,[Qe.userId||Qe.contactId?((0,s.uX)(),(0,s.CE)("div",R,[(0,s.Lk)("span",O,[(0,s.Lk)("p",null,(0,a.v_)(Qe.memberName),1)]),(0,s.bF)(je,{class:"button ml-3 is-small is-primary is-outlined is-rounded",to:{name:"EmailLogList"}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Q,[(0,s.Lk)("span",B,[(0,s.bF)(We,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("removeFilters")),1)])]),_:1})])):(0,s.Q3)("",!0)])),Qe.items&&Qe.items.length>0?((0,s.uX)(),(0,s.CE)("div",G,[(0,s.bF)(Je,{"current-page":Qe.itemsPageCurrent,"onUpdate:currentPage":t[2]||(t[2]=e=>Qe.itemsPageCurrent=e),data:Qe.items,striped:"",paginated:Qe.isMoreThanOnePage,"pagination-rounded":"","backend-pagination":"","mobile-cards":!1,scrollable:"","backend-sorting":"","default-sort-direction":Qe.defaultSortOrder,"default-sort":[Qe.sortField,Qe.sortOrder],total:Qe.itemsTotal,"per-page":Qe.itemsPerPage,onSort:Be.onSort,onPageChange:Be.changeListPage},{default:(0,s.k6)(()=>[(0,s.bF)(qe,{sortable:"",numeric:"",field:"id",label:e.$t("ID")},{default:(0,s.k6)(e=>[i.useModal?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"has-text-link",onClick:t=>Be.openLog(e.row)},(0,a.v_)(e.row.id),9,W)):((0,s.uX)(),(0,s.Wv)(je,{key:1,to:{name:"EmailLogShow",params:{item:e.row.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.id),1)]),_:2},1032,["to"]))]),_:1},8,["label"]),(0,s.bF)(qe,{sortable:"",field:"dateCreated",label:e.$t("Sent date")},{default:(0,s.k6)(t=>[(0,s.Lk)("span",j,(0,a.v_)(e.$filters.format(t.row.dateCreated)),1)]),_:1},8,["label"]),i.user||i.contact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(qe,{key:0,label:e.$t("member")},{default:(0,s.k6)(e=>[e.row.user?((0,s.uX)(),(0,s.CE)("span",z,[(0,s.bF)(je,{to:{name:"UserShow",params:{item:e.row.user.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.user.fullName),1)]),_:2},1032,["to"])])):e.row.contact?((0,s.uX)(),(0,s.CE)("span",q,[(0,s.bF)(je,{to:{name:"ContactShow",params:{item:e.row.contact.
1id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.contact.name),1)]),_:2},1032,["to"])])):e.row.company?((0,s.uX)(),(0,s.CE)("span",J,[(0,s.bF)(je,{to:{name:"CompanyShow",params:{uuid:e.row.company.uuid}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.row.company.name),1)]),_:2},1032,["to"]),e.row.recipientEmail?((0,s.uX)(),(0,s.CE)("span",H,(0,a.v_)(e.row.recipientEmail),1)):(0,s.Q3)("",!0)])):e.row.recipientName||e.row.recipientEmail?((0,s.uX)(),(0,s.CE)("span",K,[(0,s.eW)((0,a.v_)(e.row.recipientName||e.row.recipientEmail)+" ",1),e.row.recipientName&&e.row.recipientEmail?((0,s.uX)(),(0,s.CE)("span",Y,(0,a.v_)(e.row.recipientEmail),1)):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("span",Z," - "))]),_:1},8,["label"])),(0,s.bF)(qe,{label:e.$t("subject")},{default:(0,s.k6)(e=>[(0,s.eW)((0,a.v_)(e.row.subject),1)]),_:1},8,["label"]),(0,s.bF)(qe,{sortable:"",field:"status",label:e.$t("type")},{default:(0,s.k6)(t=>["welcome"===t.row.type?((0,s.uX)(),(0,s.CE)("span",ee,(0,a.v_)(e.$t("Welcome message")),1)):"fee_reminder_1_month"===t.row.type?((0,s.uX)(),(0,s.CE)("span",te,(0,a.v_)(e.$t("Reminder 1 month")),1)):"fee_reminder_7_days"===t.row.type?((0,s.uX)(),(0,s.CE)("span",ie,(0,a.v_)(e.$t("Reminder 7 days")),1)):"fee_reminder_today"===t.row.type?((0,s.uX)(),(0,s.CE)("span",se,(0,a.v_)(e.$t("Reminder on lapse day")),1)):"fee_reminder_due"===t.row.type?((0,s.uX)(),(0,s.CE)("span",ae,(0,a.v_)(e.$t("Reminder membership due")),1)):"subscription_renew_success"===t.row.type?((0,s.uX)(),(0,s.CE)("span",ne,(0,a.v_)(e.$t("Subscription renewal successful")),1)):"subscription_renew_failed"===t.row.type?((0,s.uX)(),(0,s.CE)("span",oe,(0,a.v_)(e.$t("Subscription renewal failed")),1)):"transactional_email"===t.row.t
1ype?((0,s.uX)(),(0,s.CE)("span",le,(0,a.v_)(e.$t("Transactional email")),1)):"newsletter"===t.row.type?((0,s.uX)(),(0,s.CE)("span",re,(0,a.v_)(e.$t("Newsletter")),1)):"admin_notification"===t.row.type?((0,s.uX)(),(0,s.CE)("span",de,(0,a.v_)(e.$t("Admin notification")),1)):(0,s.Q3)("",!0)]),_:1},8,["label"])]),_:1},8,["current-page","data","paginated","default-sort-direction","default-sort","total","per-page","onSort","onPageChange"])])):(0,s.Q3)("",!0),Qe.items?.length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ce,[(0,s.Lk)("p",{class:(0,a.C4)(i.contact?"has-text-grey-light":"")},[i.contact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",ue,"*")),(0,s.eW)(" "+(0,a.v_)(e.$t("No email logs at this time")),1)],2)]))],2)])):(0,s.Q3)("",!0),i.useModal?((0,s.uX)(),(0,s.Wv)(He,{key:2,modelValue:Qe.isLogModalOpen,"onUpdate:modelValue":t[4]||(t[4]=e=>Qe.isLogModalOpen=e),title:e.$t("Email Log")+(Qe.selectedLog?" #"+Qe.selectedLog.id:""),"modal-width":900,onClose:t[5]||(t[5]=e=>Qe.selectedLog=null)},{default:(0,s.k6)(()=>[Qe.isLoadingLog?((0,s.uX)(),(0,s.CE)("div",me,[(0,s.bF)(Ge,{width:"200px",height:"24px",class:"mb-5",animated:""}),(0,s.Lk)("div",pe,[(0,s.Lk)("div",he,[(0,s.Lk)("div",ge,[(0,s.bF)(Ge,{width:"80px",height:"14px",class:"mb-3",animated:""}),(0,s.bF)(Ge,{width:"140px",height:"14px",animated:""})])]),(0,s.Lk)("div",fe,[(0,s.Lk)("div",be,[(0,s.bF)(Ge,{width:"75px",height:"14px",class:"mb-3",animated:""}),(0,s.bF)(Ge,{width:"100px",height:"22px",animated:"",rounded:!0})])])])])):Qe.selectedLog?((0,s.uX)(),(0,s.CE)("div",ye,[(0,s.Lk)("div",ve,[(0,s.Lk)("div",ke,[(0,s.Lk)("div",Ce,[(0,s.Lk)("h4",Le,(0,a.v_)(e.$t("Recipient")),1),(0,s.Lk)("p",null,[Qe.selectedLog.user?((0,s.uX)(),(0,s.Wv)(je,{key:0,to:{name:"UserShow",params:{item:Qe.selectedLog.user.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Qe.selectedLog.user.fullName),1)]),_:1},8,["to"])):Qe.selectedLog.contact?((0,s.uX)(),(0,s.Wv)(je,{key:1,to:{name:"ContactShow",params:{item:Qe.selectedLog.contact.
1id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Qe.selectedLog.contact.name),1)]),_:1},8,["to"])):Qe.selectedLog.company?((0,s.uX)(),(0,s.Wv)(je,{key:2,to:{name:"CompanyShow",params:{uuid:Qe.selectedLog.company.uuid}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Qe.selectedLog.company.name),1)]),_:1},8,["to"])):Qe.selectedLog.recipientName?((0,s.uX)(),(0,s.CE)("span",we,(0,a.v_)(Qe.selectedLog.recipientName),1)):Qe.selectedLog.recipientEmail?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",_e," - ")),Qe.selectedLog.recipientEmail?((0,s.uX)(),(0,s.CE)("span",Ee,(0,a.v_)(Qe.selectedLog.recipientEmail),1)):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",$e,[(0,s.Lk)("h4",Fe,(0,a.v_)(e.$t("Subject")),1),(0,s.Lk)("p",null,(0,a.v_)(Qe.selectedLog.subject),1)])]),(0,s.Lk)("div",Te,[(0,s.Lk)("div",Se,[(0,s.Lk)("h4",Ae,(0,a.v_)(e.$t("Sent date")),1),(0,s.Lk)("span",Pe,(0,a.v_)(e.$filters.format(Qe.selectedLog.dateSent??Qe.selectedLog.dateCreated)),1)]),Be.emailTypeMeta(Qe.selectedLog.type)?((0,s.uX)(),(0,s.CE)("div",Ie,[(0,s.Lk)("h4",Me,(0,a.v_)(e.$t("Type")),1),(0,s.Lk)("span",{class:(0,a.C4)(["tag is-rounded",Be.emailTypeMeta(Qe.selectedLog.type).variant])},(0,a.v_)(Be.emailTypeMeta(Qe.selectedLog.type).label),3)])):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",xe,[(0,s.Lk)("h3",Ne,(0,a.v_)(e.$t("Email Preview")),1),Qe.selectedLog.body?((0,s.uX)(),(0,s.CE)("div",Ue,[(0,s.Lk)("iframe",{ref:"emailModalFrame",srcdoc:Qe.selectedLog.body,class:"email-preview-frame",sandbox:"allow-same-origin",title:e.$t("Email Preview"),onLoad:t[3]||(t[3]=(...e)=>Be.resizeModalFrame&&Be.resizeModalFrame(...e))},null,40,De)])):((0,s.uX)(),(0,s.CE)("div",Xe,[(0,s.Lk)("span",Ve,[(0,s.bF)(We,{icon:"fa-light fa-envelope-open-text"})]),(0,s.Lk)("span",Re,(0,a.v_)(Qe.selectedLog.newsletter?e.$t("Newsletter emails are not stored per recipient"):e.$t("No preview is stored for this email")),1),Qe.selectedLog.newsletter?((0,s.uX)(),(0,s.Wv)(je,{key:0,to:{name:"NewsletterShow",params:{item:Qe.selectedLog.newsletter.uuid}},class:"button is-rounded is-light mt-4"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("View newsletter")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]))])])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","title"])):(0,s.Q3)("",!0)])}i(44114),i(14603),i(47566),i(98721);var Qe=i(37557),Be=i(80762),Ge={name:"EmailLog",components:{SearchBarAutocomplete:Qe.A,SearchBar:Qe.A,ItemViewModal:Be.A},props:{user:{type:Object,default:null},contact:{type:Object,default:null},useModal:{type:Boolean,default:!1}},data(){return{sortField:"id",sortOrder:"desc",defaultSortOrder:"desc",isMoreThanOnePage:!1,isLoading:!1,items:null,itemsPerPage:20,itemsTotal:null,itemsPageCurrent:1,userId:this.user?this.user.id:this.$route.query.userId??null,contactId:this.contact?this.contact.id:this.$route.query.contactId??null,memberName:this.user?this.user.fullName:this.contact?this.contact.name:this.$route.query.memberName??null,isLogModalOpen:!1,isLoadingLog:!1,selectedLog:null,logFrameResizeObserver:null,itemsPerPageCSV:1e4,isLoadingCSV:!1}},beforeUnmount(){this.logFrameResizeObserver&&(this.logFrameResizeObserver.disconnect(),this.logFrameResizeObserver=null)},mounted(){this.user&&(this.userId=this.user.id,this.memberName=this.user.fullName),this.contact&&(this.contactId=this.contact.id,this.memberName=this.contact.name),this.retrieve()},methods:{retrieve(){this.isLoading=!0;let e=this.getOrderQueryString(),t=this.filterItems();this.$http.plain.get("/email_logs?page="+this.itemsPageCurrent+e+t).then(e=>{this.items=e.data["hydra:member"],this.itemsTotal=e.data["hydra:totalItems"],this.itemsPerPage=20,this.isMoreThanOnePage=void 0!==e.data["hydra:view"]["hydra:first"]}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.retrieve()},filterItems(){let e="";return this.userId?e+="&user="+this.userId:this.contactId&&(e+="&contact="+this.contactId),e},csvExportPrompt(){const e=this.$t("Export"),t=this.$t("Are you sure you want to download this list?");if(this.itemsTotal<=this.itemsPerPageCSV)this.$buefy.dialog.confirm({title:e,message:t,confirmText:this.$t("Export"),type:"is-primary",onConfirm:()=>{this.csvExport()}});else{const i=Math.ceil(this.itemsTotal/this.itemsPerPageCSV);this.$buefy.dialog.prompt({title:e,message:t,inputAttrs:{type:"number",placeholder:this.itemsTotal+" "+this.$t("emails")+", "+i+" "+this.$t("pages. Type the page number."),min:1,max:i},trapFocus:!0,confirmText:this.$t("Export"),type:"is-primary",onConfirm:e=>{this.csvExport(e)}})}},csvExport(e=null){this.isLoadingCSV=!0;const t=e?"&page="+e:"";return this.$http.plain.get("/email-logs-csv?"+this.filterItems()+t,{responseType:"blob",headers:{Accept:"text/csv"}}).then(t=>{const i=window.URL.createObjectURL(new Blob([t.data])),s=document.createElement("a");s.href=i,s.style.display="none",s.setAttribute("download","email-log"+(e>1?"-page-"+e:"")+".csv"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(i)},100)}).catch(e=>
1{console.error(e),this.$buefy.toast.open({message:this.$t("Something went wrong"),type:"is-danger"})}).finally(()=>{this.isLoadingCSV=!1})},getOrderQueryString(){let e="&order["+this.sortField+"]="+this.sortOrder;return e},changeListPage(e){this.itemsPageCurrent=e,this.retrieve()},filterByRecipient(e){e&&e["@type"]&&("User"===e["@type"]?this.$router.push({name:"EmailLogList",query:{userId:e.id,memberName:e.firstName+" "+e.lastName}}):"Contact"===e["@type"]&&this.$router.push({name:"EmailLogList",query:{contactId:e.id,memberName:e.name}}))},openLog(e){this.selectedLog=null,this.isLogModalOpen=!0,this.isLoadingLog=!0,this.$http.plain.get(`/email_logs/${e.id}`).then(e=>{this.selectedLog=e.data}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingLog=!1})},emailTypeMeta(e){const t={welcome:{label:this.$t("Welcome message"),variant:"is-success"},fee_reminder_1_month:{label:this.$t("Reminder 1 month"),variant:"is-info"},fee_reminder_7_days:{label:this.$t("Reminder 7 days"),variant:"is-default"},fee_reminder_today:{label:this.$t("Reminder on lapse day"),variant:"is-warning"},fee_reminder_due:{label:this.$t("Reminder membership due"),variant:"is-danger"},subscription_renew_success:{label:this.$t("Subscription renewal successful"),variant:"is-success"},subscription_renew_failed:{label:this.$t("Subscription renewal failed"),variant:"is-danger"},transactional_email:{label:this.$t("Transactional email"),variant:"is-default"},newsletter:{label:this.$t("Newsletter"),variant:"is-info"},admin_notification:{label:this.$t("Admin notification"),variant:"is-info"}};return t[e]??null},resizeModalFrame(){const e=this.$refs.emailModalFrame;if(!e||!e.contentDocument)return;const t=e.contentDocument.documentElement,i=()=>{e.style.height=`${t.scrollHeight}px`};i(),this.logFrameResizeObserver&&this.logFrameResizeObserver.disconnect(),"undefined"!==typeof ResizeObserver&&(this.logFrameResizeObserver=new ResizeObserver(i),this.logFrameResizeObserver.observe(t))}}},We=i(66262);const je=(0,We.A)(Ge,[["render",Oe],["__scopeId","data-v-f2a590f2"]]);var ze=je},31137:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"mobile-filter-header"},l={class:"mobile-filter-title"},r={class:"mobile-filter-actions"},d={class:"mobile-filter-content"};function c(e,t,i,c,u,m){return(0,s.uX)(),(0,s.Wv)(a.eB,{name:"slide-up"},{default:(0,s.k6)(()=>[i.modelValue?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"mobile-filter-overlay",onClick:t[3]||(t[3]=(...e)=>m.close&&m.close(...e))},[(0,s.Lk)("div",{class:"mobile-filter-sheet",onClick:t[2]||(t[2]=(0,a.D$)(()=>{},["stop"]))},[(0,s.Lk)("div",o,[(0,s.Lk)("h3",l,(0,n.v_)(i.title),1),(0,s.Lk)("div",r,[i.showReset?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-text is-small",onClick:t[0]||(t[0]=t=>e.$emit("reset"))},(0,n.v_)(e.$t("Reset")),1)):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"button is-primary is-small is-rounded",onClick:t[1]||(t[1]=(...e)=>m.close&&m.close(...e))},(0,n.v_)(e.$t("Done")),1)])]),(0,s.Lk)("div",d,[(0,s.RG)(e.$slots,"default",{},void 0,!0)])])])):(0,s.Q3)("",!0)]),_:3})}var u={name:"MobileFilterSheet",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:"Filters"},showReset:{type:Boolean,default:!0}},emits:["update:modelValue","reset","close"],methods:{close(){this.$emit("update:modelValue",!1),this.$emit("close")}}},m=i(66262);const p=(0,m.A)(u,[["render",c],["__scopeId","data-v-5817b8f5"]]);var h=p},31666:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(90033);const n={class:"payment-loading"},o={class:"payment-loading-animation"},l={class:"loading-card"},r={class:"loading-card-icon"},d={class:"loading-lock"},c={class:"payment-loading-title"},u={class:"payment-loading-sub"};function m(e,t,i,m,p,h){const g=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[t[0]||(t[0]=(0,s.Lk)("div",{class:"loading-card-shine"},null,-1)),(0,s.Lk)("div",r,[(0,s.bF)(g,{icon:"fa-light fa-credit-card"})])]),t[1]||(t[1]=(0,s.Lk)("div",{class:"loading-dots"},[(0,s.Lk)("span",{class:"dot"}),(0,s.Lk)("span",{class:"dot"}),(0,s.Lk)("span",{class:"dot"})],-1)),(0,s.Lk)("div",d,[(0,s.bF)(g,{icon:"fa-light fa-lock"})])]),(0,s.Lk)("p",c,(0,a.v_)(h.titleText),1),(0,s.Lk)("p",u,(0,a.v_)(h.subText),
11)])}var p={name:"PaymentLoadingAnimation",props:{title:{type:String,default:""},subtitle:{type:String,default:""}},computed:{titleText(){return this.title||this.$t("Preparing secure payment")+"..."},subText(){return this.subtitle||this.$t("This will only take a moment")}}},h=i(66262);const g=(0,h.A)(p,[["render",m],["__scopeId","data-v-2245b3c0"]]);var f=g},31823:function(e,t,i){"use strict";i.d(t,{A:function(){return p}});var s=i(20641),a=i(90033);const n={key:0,class:"logo-thumbnail"},o={key:1};function l(e,t,i,l,r,d){const c=(0,s.g2)("font-awesome-icon");return"unassigned"===i.item?.id?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",{class:(0,a.C4)(`o-userimg-sm${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.bF)(c,{icon:"fa-light fa-user"})],6)])):((0,s.uX)(),(0,s.CE)("div",{key:i.item.id?"g_"+i.item.id:"t_logo",class:"logo-thumbnail"},["roundXSmall"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(`o-userimg-xs${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},["company"!==d.type||d.image?((0,s.uX)(),(0,s.CE)("span",o,(0,a.v_)(d.itemFirstLetter),1)):((0,s.uX)(),(0,s.Wv)(c,{key:0,icon:"fa-light fa-building"}))],6)):(0,s.Q3)("",!0),"roundSmaller"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(`o-userimg-smaller${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"roundSmall"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,a.C4)(`o-userimg-sm${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):"roundMedium"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:3,class:(0,a.C4)(`o-userimg-md${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):"roundXMedium"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:4,class:(0,a.C4)(`o-userimg-xm${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"roundLarge"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:5,class:(0,a.C4)(`o-userimg-lg${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"cardCover"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:6,class:(0,a.C4)(`o-userimg-cover${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"eventListThumb"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:7,class:(0,a.C4)(`o-event-list-thumb${r.extraCSS}`),style:(0,a.Tr)({"background-image":d.imageCss(),"background-color":d.backgroundColor(),color:d.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(d.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"groupListThumb"===r.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:8,class:(0,a.C4)(["o-group-list-thumb",{"bg-primary-tinted":!1}]),style:(0,a.Tr)({"background-image":d.imageCss()})},null,4)):(0,s.Q3)("",!0)]))}var r=i(28782),d=i(95256),c={components:{},props:["item","isType","emptyImage","isInline"],data(){return{cssClass:this.isType?this.isType:"roundMedium",extraCSS:this.isInline?" inline-class":""}},computed:{type(){return this.item?.["@type"]?this.item["@type"].toLowerCase():"user"},itemFirstLetter(){if(!this.image&&!this.emptyImage)if("user"===this.type&&this.item){if(this.item.firstName&&this.item.lastName)return this.item.firstName.slice(0,1).toUpperCase()+this.item.lastName.slice(0,1).toUpperCase();if(this.item.fullName){const e=this.item.fullName.trim().split(/\s+/);return e.length>=2?e[0].slice(0,1).toUpperCase()+e[1].slice(0,1).toUpperCase():this.item.fullName.slice(0,2).toUpperCase()}}else{if("contact"===this.type&&this.item&&this.item.name)return this.item.name.slice(0,2).toUpperCase();if("company"===this.type)return null;if(this.item&&["group","unit","rolegroup","localcenter","tenant"].includes(this.type))return"tenant"===this.type&&this.item.logoSquare?null:this.item.name.slice(0,1).toUpperCase()}return null},image(){return this.item.logo?this.item.logo:null},userTypeColors(){if("user"!==this.type)return null;const e=this.item?.type?.options;return e&&e.bgcolor?{background:e.bgcolor,font:e.color||"#fff"}:null}},created(){},methods:{stringToColour:d.ly,imageCss(){if("demo"===this.image)return"url
1(https://picsum.photos/id/"+(this.item.id%1e3+1)+"/600/600.jpg)";if("demo_f"===this.image)return"url(https://randomuser.me/api/portraits/women/"+this.item.id%100+".jpg)";if("demo_m"===this.image)return"url(https://randomuser.me/api/portraits/men/"+this.item.id%100+".jpg)";if("tenant"===this.type)return this.item.logoSquare?"url("+r.hd+r.DJ+"tenant/"+this.item.logoSquare+")":this.item.logoSquareDark?"url("+r.hd+r.DJ+"tenant/"+this.item.logoSquareDark+")":"none";if(this.image){if(this.image.includes("demo__"))return"url("+this.image.replace("demo__","")+")";if(this.image.startsWith("http://")||this.image.startsWith("https://"))return"url("+this.image+")";let e=this.type;return"rolegroup"===e&&(e="unit"),"url("+r.ze+r.DJ+e+"/"+this.image+")"}return this.emptyImage?"url("+this.emptyImage+")":["user","group","rolegroup","unit","localcenter","contact"].includes(this.type)?"none":"url("+r.ze+r.DJ+"defaults/"+this.type+".png)"},backgroundColor(){if("tenant"===this.type)return this.item&&this.item.name?this.stringToColour(this.item.name):"lightgrey";if(this.image)return"transparent";if(this.userTypeColors)return this.userTypeColors.background;if(["group","rolegroup","unit","localcenter","tenant"].includes(this.type)&&this.item&&this.item.name)return this.stringToColour(this.item.name);if("user"===this.type&&this.item){if(this.item.lastName)return this.stringToColour(this.item.lastName);if(this.item.fullName)return this.stringToColour(this.item.fullName)}else{if("company"===this.type&&this.item&&this.item.name)return this.stringToColour(this.item.name);if("contact"===this.type&&this.item&&this.item.name)return this.stringToColour(this.item.name)}return"lightgrey"},fontColor(){return!this.image&&this.userTypeColors?this.userTypeColors.font:"user"===this.type&&this.item&&(this.item.lastName||this.item.fullName)||"company"===this.type&&this.item&&this.item.name||"contact"===this.type&&this.item&&this.item.name||["group","rolegroup","unit","localcenter","tenant"].includes(this.type)&&this.item&&this.item.name?"#fff":"#111"}}},u=i(66262);const m=(0,u.A)(c,[["render",l]]);var p=m},31830:function(e,t,i){"use strict";i.d(t,{A:function(){return M}});var s=i(20641),a=i(90033);const n={key:0,class:"contact-logo-section mb-5"},o={class:"has-text-weight-semibold mb-3"},l={class:"is-flex is-align-items-center"},r={key:0,class:"contact-initials"},d={class:"ml-4"},c={class:"button is-primary is-small is-rounded"},u={class:"icon is-small"},m={key:0,class:"is-size-7 has-text-grey mt-1"},p={class:"has-text-weight-semibold"},h={key:4,class:"mt-4"},g={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mt-6 mb-2"},f={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mt-6 mb-2"},b={class:"control"},y={class:"icon-text"},v={class:"icon"},k={class:"text"},C={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mt-5 mb-2"},L={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mt-5 mb-2"};function w(e,t,i,w,_,E){const $=(0,s.g2)("b-loading"),F=(0,s.g2)("font-awesome-icon"),T=(0,s.g2)("b-upload"),S=(0,s.g2)("b-field"),A=(0,s.g2)("b-input"),P=(0,s.g2)("PersonalIdField"),I=(0,s.g2)("TownAutocomplete"),M=(0,s.g2)("LocalCenterSelect"),x=(0,s.g2)("b-radio"),N=(0,s.g2)("BirthdaySelect"),U=(0,s.g2)("b-button"),D=(0,s.g2)("CustomFieldWidget");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bF)($,{modelValue:_.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>_.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),i.item.id?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("p",o,(0,a.v_)(e.$t("Photo")),1),(0,s.Lk)("div",l,[(0,s.Lk)("div",{class:"contact-logo-preview",style:(0,a.Tr)(E.logoPreviewStyle)},[!_.logoPreview&&i.item.name?((0,s.uX)(),(0,s.CE)("span",r,(0,a.v_)(E.getInitials()),1)):(0,s.Q3)("",!0)],4),(0,s.Lk)("div",d,[(0,s.bF)(S,{class:"file"},{default:(0,s.k6)(()=>[(0,s.bF)(T,{modelValue:_.pendingLogoFile,"onUpdate:modelValue":[t[1]||(t[1]=e=>_.pendingLogoFile=e),E.handleLogoSelect],accept:"image/png, image/jpeg"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",c,[(0,s.Lk)("span",u,[(0,s.bF)(F,{icon:"fa-light fa-camera"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t(_.logoPreview||i.item.logo?"Change photo":"Add photo")),1)])]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1}),_.pendingLogoFile?((0,s.uX)(),(0,s.CE)("p",m,(0,a.v_)(_.pendingLogoFile.name),1)):(0,s.Q3)("",!0)])])])),(0,s.bF)(S,{label:e.$t("name")},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.name,"onUpdate:modelValue":t[2]||(t[2]=e=>i.item.name=e),required:""},null,8,["modelValue"])]),_:1},8,["label"]),E.showMiddleName?((0,s.uX)(),(0,s.Wv)(S,{key:1,label:e.$t("Middle name"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.middleName,"onUpdate:modelValue":t[3]||(t[3]=e=>i.item.middleName=e),autocomplete:"additional-name"},null,8,["modelValue"])]),_:1},8,["label"])):(0,s.Q3)("",!0),(0,s.bF)(S,{label:e.$t("Email"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.email,"onUpdate:modelValue":t[4]||(t[4]=e=>i.item.email=e),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{label:e.$t("phone"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.phone,"onUpdate:modelValue":t[5]||(t[5]=e=>i.item.phone=e)},null,8,["modelValue"])]),_:1},8,["label"]),E.showPersonalId?((0,s.uX)(),(0,s.Wv)(P,{key:2,modelValue:i.item.personalIdNumber,"onUpdate:modelValue":t[6]||(t[6]=e=>i.item.personalIdNumber=e),"subject-type":"contact","subject-id":i.item.id,"has-value":!!i.item.hasPersonalIdNumber,"can-reveal":E.canRevealPersonalId,label:e.$t("Personal identification number"),hint:e.$t("Stored encrypted. Leave empty to keep the current value."),class:"mt-4"},null,8,["modelValue","subject-id","has-value","can-reveal","label","hint"])):(0,s.Q3)("",!0),(0,s.bF)(S,{label:e.$t("town"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(I,{modelValue:i.item.town,"onUpdate:modelValue":[t[7]||(t[7]=e=>i.item.town=e),t[8]||(t[8]=e=>i.item.town=e)],town:i.item.town,"is-result-object":!0},null,8,["modelValue","town"])]),_:1},8,["label"]),i.item.country?((0,s.uX)(),(0,s.Wv)(S,{key:3,class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.Lk)("p",p,(0,a.v_)(e.$t("country"))+" : "+(0,a.v_)(i.item.country.name),1)]),_:1})):(0,s.Q3)("",!0),e.contactChaptersEnabled?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.bF)(M,{"model-value":i.item.localCenter?i.item.localCenter["@id"]||"/api/v1/local_centers/"+i.item.localCenter.id:null,label:e.$t("Chapter"),"auto-load":!0,"use-autocomplete":!0,clearable:!0,onSelect:E.onLocalCenterSelect}
1,null,8,["model-value","label","onSelect"])])):(0,s.Q3)("",!0),(0,s.bF)(S,{grouped:"",label:e.$t("gender"),class:"mt-4 mb-4",style:{padding:"12px 0"}},{default:(0,s.k6)(()=>[(0,s.bF)(x,{modelValue:i.item.gender,"onUpdate:modelValue":t[9]||(t[9]=e=>i.item.gender=e),"native-value":"f",name:"gender",class:"mt-2"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("female")),1)]),_:1},8,["modelValue"]),(0,s.bF)(x,{modelValue:i.item.gender,"onUpdate:modelValue":t[10]||(t[10]=e=>i.item.gender=e),"native-value":"m",name:"gender",class:"mt-2 ml-3"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("male")),1)]),_:1},8,["modelValue"]),(0,s.bF)(x,{modelValue:i.item.gender,"onUpdate:modelValue":t[11]||(t[11]=e=>i.item.gender=e),"native-value":"n",name:"gender",class:"mt-2 ml-3"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Other gender")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(N,{modelValue:i.item.dateBirth,"onUpdate:modelValue":t[12]||(t[12]=e=>i.item.dateBirth=e),user:i.item,"is-required":!1},null,8,["modelValue","user"])]),_:1}),(0,s.bF)(S,{label:e.$t("Bio"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.bio,"onUpdate:modelValue":t[13]||(t[13]=e=>i.item.bio=e),type:"textarea",placeholder:e.$t("A short biography or description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.Lk)("p",g,(0,a.v_)(e.$t("Professional Info")),1),t[25]||(t[25]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),(0,s.bF)(S,{label:e.$t("Current Organisation/Company"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.organisation,"onUpdate:modelValue":t[14]||(t[14]=e=>i.item.organisation=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{label:e.$t("Current role"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.role,"onUpdate:modelValue":t[15]||(t[15]=e=>i.item.role=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.Lk)("p",f,(0,a.v_)(e.$t("Billing Details")),1),t[26]||(t[26]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),(0,s.bF)(S,{label:e.$t("Company identifier"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.companyIdentifier,"onUpdate:modelValue":t[16]||(t[16]=e=>i.item.companyIdentifier=e)},null,8,["modelValue"]),(0,s.Lk)("p",b,[(0,s.bF)(U,{disabled:_.isLoading,type:"is-primary",outlined:"",onClick:E.getCompanyDetails},{default:(0,s.k6)(()=>[(0,s.Lk)("span",y,[(0,s.Lk)("span",v,[(0,s.bF)(F,{icon:"fal fa-magnifying-glass"})]),(0,s.Lk)("span",k,(0,a.v_)(e.$t("search")),1)])]),_:1},8,["disabled","onClick"])])]),_:1},8,["label"]),(0,s.bF)(S,{class:"mt-4",label:e.$t("Company name")},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.companyName,"onUpdate:modelValue":t[17]||(t[17]=e=>i.item.companyName=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{class:"mt-4",label:e.$t("Company address")},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.companyAddress,"onUpdate:modelValue":t[18]||(t[18]=e=>i.item.companyAddress=e)},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{class:"mt-4",label:e.$t("Company commerce registry number")},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.companyRegNo,"onUpdate:modelValue":t[19]||(t[19]=e=>i.item.companyRegNo=e)},null,8,["modelValue"])]),_:1},8,["label"]),E.customFields&&E.customFields.length>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:5},[(0,s.Lk)("p",C,(0,a.v_)(e.$t("Additional information")),1),t[24]||(t[24]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(E.customFields,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id},[(0,s.bF)(D,{ref_for:!0,ref:`customField_${e.id}`,modelValue:_.customFieldValues[e.id],"onUpdate:modelValue":[t=>_.customFieldValues[e.id]=t,t=>_.customFieldValues[e.id]=t],class:"mb-5","is-required":!1,"is-admin":"admin"===e.visibility,disabled:!1,"custom-field-values":i.item.customFieldValues||[],field:e,onPendingUpload:E.handlePendingUpload},null,8,["modelValue","onUpdate:modelValue","is-admin","custom-field-values","field","onPendingUpload"])]))),128))],64)):(0,s.Q3)("",!0),(0,s.Lk)("p",L,(0,a.v_)(e.$t("Social profiles")),1),t[27]||(t[27]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),(0,s.bF)(S,{label:e.$t("LinkedIn URL")},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.linkedin,"onUpdate:modelValue":t[20]||(t[20]=e=>i.item.linkedin=e),type:"url",placeholder:"https://www.linkedin.com/in/username"},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{label:e.$t("Twitter URL"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.twitter,"onUpdate:modelValue":t[21]||(t[21]=e=>i.item.twitter=e),type:"url",placeholder:"https://twitter.com/username"},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{label:e.$t("Instagram URL"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.instagram,"onUpdate:modelValue":t[22]||(t[22]=e=>i.item.instagram=e),type:"url",placeholder:"https://www.instagram.com/username"},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(S,{label:e.$t("Bluesky"),class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(A,{modelValue:i.item.bsky,"onUpdate:modelValue":t[23]||(t[23]=e=>i.item.bsky=e),type:"text",placeholder:"handle.bsky.social"},null,8,["modelValue"])]),_:1},8,["label"])])}i(44114),i(18111),i(22489),i(14603),i(47566),i(98721);var _=i(40834),E=i(53369),$=i(19378),F=i(48431),T=i(29025),S=i(99914),A={props:["item"],data(){return{isLoading:!1,customFieldValues:{},pendingUploads:[],pendingLogoFile:null,logoPreview:null}},methods:{onLocalCenterSelect(e){this.item.localCenter=e||null},getCompanyDetails(){this.item.companyIdentifier?(this.isLoading=!0,this.$http.plain.get(`/company-detail
1s-get/${this.item.companyIdentifier}`).then(e=>{this.item.companyName=e.data.companyName,this.item.companyIdentifier=e.data.companyIdentifier,this.item.companyAddress=e.data.companyAddress,this.item.companyRegNo=e.data.companyRegNo}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})):this.$buefy.toast.open({message:this.$t("Company identifier is required")})},handlePendingUpload(e){this.pendingUploads=this.pendingUploads.filter(t=>t.fieldId!==e.fieldId),this.pendingUploads.push(e)},getCustomFieldValues(){return this.customFieldValues},getPendingUploads(){return this.pendingUploads},clearPendingUploads(){this.pendingUploads=[]},handleLogoSelect(e){e&&(this.logoPreview=URL.createObjectURL(e))},getPendingLogo(){return this.pendingLogoFile},clearPendingLogo(){this.pendingLogoFile=null,this.logoPreview=null},getInitials(){return this.item&&this.item.name?this.item.name.slice(0,2).toUpperCase():""},stringToColour(e){if(!e)return"#6366f1";let t=0;for(let s=0;s<e.length;s++)t=e.charCodeAt(s)+((t<<5)-t);let i="#";for(let s=0;s<3;s++){const e=t>>8*s&255;i+=("00"+e.toString(16)).substr(-2)}return i}},computed:{...(0,_.L8)(["tenant","contactChaptersEnabled","isGranted"]),showMiddleName(){return!!this.tenant?.settingFeatures?.onlinePayments?.checkoutRequireMiddleName||!!this.item?.middleName},showPersonalId(){return!!this.item?.id&&(!!this.canRevealPersonalId&&(!!this.tenant?.settingFeatures?.onlinePayments?.checkoutRequirePersonalId||!!this.item?.hasPersonalIdNumber))},canRevealPersonalId(){return this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")},customFields(){const e=this.tenant?.settingForms?.profileForm?.profileCustomFields||[];return(this.tenant?.customFields||[]).filter(t=>"profile"===t.discriminator&&e.includes(t.id))},logoPreviewStyle(){return this.logoPreview?{backgroundImage:`url(${this.logoPreview})`,backgroundColor:"transparent"}:{backgroundColor:this.stringToColour(this.item?.name)}}},components:{TownAutocomplete:E.A,BirthdaySelect:$.A,CustomFieldWidget:F.A,LocalCenterSelect:T.A,PersonalIdField:S.A}},P=i(66262);const I=(0,P.A)(A,[["render",w],["__scopeId","data-v-57a1613e"]]);var M=I},32148:function(e,t,i){"use strict";i.d(t,{B_:function(){return a},HS:function(){return r},MI:function(){return p},SZ:function(){return l},Sf:function(){return u},Tv:function(){return d},kg:function(){return o},o5:function(){return c},oW:function(){return h},yN:function(){return m}});i(18111),i(7588),i(61701);function s(e){let t;if(e.startsWith("#")){const i=e.replace("#","");t={r:parseInt(i.substr(0,2),16)/255,g:parseInt(i.substr(2,2),16)/255,b:parseInt(i.substr(4,2),16)/255}}else{if(!e.startsWith("rgb"))return 1;{const i=e.match(/\d+/g);t={r:parseInt(i[0])/255,g:parseInt(i[1])/255,b:parseInt(i[2])/255}}}const i=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),s=i(t.r),a=i(t.g),n=i(t.b);return.2126*s+.7152*a+.0722*n}function a(e,t="#ffffff",i="#363636"){const a=s(e);return a>.5?i:t}function n(e='.tag[style*="background-color"]'){const t=document.querySelectorAll(e);t.forEach(e=>{const t=e.style.backgroundColor;if(t){const i=a(t);e.style.color=i,"#363636"===i?e.classList.add("is-light-bg"):e.classList.remove("is-light-bg")}})}function o(e='.tag[style*="background-color"]'){n(e);const t=new MutationObserver(t=>{t.forEach(t=>{"childList"===t.type?t.addedNodes.forEach(t=>{if(1===t.nodeType){t.matches&&t.matches(e)&&n(e);const i=t.querySelectorAll?t.querySelectorAll(e):[];i.length>0&&n(e)}}):"attributes"===t.type&&"style"===t.attributeName&&t.target.matches&&t.target.matches(e)&&n(e)})});return t.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}),t}function l(e,t){return t<60?{h:0,s:0,l:100}:{h:e,s:30,l:18}}function r(e,t,i){const s=(e-40+360)%360,a=Math.min(Math.max(t+35,40),90),n=Math.min(Math.max(i+55,70),85);return{h:Math.round(s),s:Math.round(a),l:Math.round(n)}}function d(e){let t=String(e??"").trim().replace(/^#/,"");
1return 3===t.length&&(t=t.split("").map(e=>e+e).join("")),/^[0-9a-fA-F]{6}$/.test(t)?"#"+t.toLowerCase():null}function c(e){const t=d(e)||"#000000",i=parseInt(t.substring(1,3),16)/255,s=parseInt(t.substring(3,5),16)/255,a=parseInt(t.substring(5,7),16)/255,n=Math.max(i,s,a),o=Math.min(i,s,a),l=n-o,r=(n+o)/2,c=0===l?0:l/(1-Math.abs(2*r-1));let u=0;return 0!==l&&(u=n===i?(s-a)/l%6*60:n===s?60*((a-i)/l+2):60*((i-s)/l+4)),u<0&&(u+=360),{h:u,s:100*c,l:100*r}}function u(e,t,i){const s=(e%360+360)%360,a=Math.min(100,Math.max(0,t))/100,n=Math.min(100,Math.max(0,i))/100,o=(1-Math.abs(2*n-1))*a,l=o*(1-Math.abs(s/60%2-1)),r=n-o/2;let d;return d=s<60?[o,l,0]:s<120?[l,o,0]:s<180?[0,o,l]:s<240?[0,l,o]:s<300?[l,0,o]:[o,0,l],"#"+d.map(e=>Math.round(255*(e+r)).toString(16).padStart(2,"0")).join("")}function m(e,t){const i=s(e),a=s(t);return(Math.max(i,a)+.05)/(Math.min(i,a)+.05)}function p(e,t){const{h:i,s:s,l:a}=c(e);return u(i,s,a+t)}function h(e){e=e.replace("#","");const t=parseInt(e.substring(0,2),16)/255,i=parseInt(e.substring(2,4),16)/255,s=parseInt(e.substring(4,6),16)/255,a=Math.max(t,i,s),n=Math.min(t,i,s),o=a-n,l=(a+n)/2;let r=0,d=0;if(0!==o)switch(d=l>.5?o/(2-a-n):o/(a+n),a){case t:r=((i-s)/o+(i<s?6:0))/6;break;case i:r=((s-t)/o+2)/6;break;case s:r=((t-i)/o+4)/6;break}return{h:Math.round(360*r),s:Math.round(100*d)+"%",l:Math.round(100*l)+"%"}}},33444:function(e,t,i){"use strict";i.d(t,{A:function(){return M}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"card mb-3 card-discuss card-discuss-compact"},l={class:"is-flex compact-card-inner"},r=["src"],d={key:1,class:"compact-card-thumb-img"},c=["src"],u={key:2,class:"compact-card-thumb-empty"},m={class:"icon"},p={key:3,class:"compact-card-thumb-count"},h={class:"icon is-small"},g={key:4,class:"compact-card-thumb-count"},f={class:"icon is-small"},b={class:"is-flex is-align-items-center compact-card-meta"},y={class:"is-size-7 has-text-weight-semibold compact-card-author ml-2"},v={key:1,class:"is-size-7 has-text-grey ml-2 compact-card-date"},k={key:0,class:"has-text-weight-semibold compact-card-title"},C={key:1,class:"is-size-7 has-text-grey compact-card-title"},L={class:"is-flex is-align-items-center compact-card-stats"},w={key:0,class:"is-size-7 has-text-grey icon-text"},_={class:"icon is-small"},E={key:1,class:"is-size-7 has-text-grey icon-text"},$={class:"icon is-small"};function F(e,t,i,F,T,S){const A=(0,s.g2)("font-awesome-icon"),P=(0,s.g2)("LogoThumbnail");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("div",{class:"compact-card-thumb",onClick:t[0]||(t[0]=(0,a.D$)(t=>e.$emit("open-discussion",S.emitPayload),["stop"]))},[S.hasImage?((0,s.uX)(),(0,s.CE)("img",{key:0,src:S.mediaSrc(S.displayPost.medias[0]),class:"compact-card-thumb-img"},null,8,r)):S.hasVideo?((0,s.uX)(),(0,s.CE)("video",d,[(0,s.Lk)("source",{src:S.mediaSrc(S.displayPost.medias[0]),type:"video/mp4"},null,8,c)])):((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("span",m,[(0,s.bF)(A,{icon:"fa-light fa-align-left"})])])),S.displayPost&&S.displayPost.medias&&S.displayPost.medias.length>1?((0,s.uX)(),(0,s.CE)("span",p,[(0,s.Lk)("span",h,[(0,s.bF)(A,{icon:"fa-light fa-images"})]),(0,s.eW)(" "+(0,n.v_)(S.displayPost.medias.length),1)])):S.hasVideo?((0,s.uX)(),(0,s.CE)("span",g,[(0,s.Lk)("span",f,[(0,s.bF)(A,{icon:"fa-light fa-play"})])])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:"is-flex-grow-1 compact-card-content is-clickable",onClick:t[1]||(t[1]=t=>e.$emit("open-discussion",S.emitPayload))},[(0,s.Lk)("div",b,[S.displayOwner?((0,s.uX)(),(0,s.Wv)(P,{key:0,item:S.displayOwner,"is-type":"roundXSmall"},null,8,["item"])):(0,s.Q3)("",!0),(0,s.Lk)("span",y,(0,n.v_)(S.displayOwnerName),1),S.displayPost&&S.displayPost.dateCreated?((0,s.uX)(),(0,s.CE)("span",v,(0,n.v_)(e.$filters.formatDateCool(S.displayPost.dateCreated)),1)):(0,s.Q3)("",!0)]),S.displayTitle?((0,s.uX)(),(0,s.CE)("div",k,(0,n.v_)(S.displayTitle),1)):S.displayPost&&S.displayPost.content?((0,s.uX)(),(0,s.CE)("div",C,(0,n.v_)(S.postContent(S.displayPost.content).substring(0,100)),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",L,[S.displayReactionsCount>0?((0,s.uX)(),(0,s.CE)("span",w,[(0,s.Lk)("span",_,[(0,s.bF)(A,{icon:"fa-light fa-thumbs-up"})]),(0,s.Lk)("span",null,(0,n.v_)(S.displayReactionsCount),1)])):(0,s.Q3)("",!0),S.displayPostsCount>0?((0,s.uX)(),(0,s.CE)("span",E,[(0,s.Lk)("span",$,[(0,s.bF)(A,{icon:"fa-light fa-comment-lines"})]),(0,s.Lk)("span",null,(0,n.v_)(S.displayPostsCount),1)])):(0,s.Q3)("",!0)])])])])}i(18111),i(18237);var T=i(95256),S=i(31823),A={name:"DiscussionCardCompact",components:{LogoThumbnail:S.A},props:{row:{type:Object,default:null},post:{type:Object,default:null},title:{type:String,default:null},reactionsCount:{type:Number,default:null},postsCount:{type:Number,default:null}},emits:["open-discussion"],computed:{displayPost(){return this.post||this.row&&this.row.mainPost||null},displayTitle(){return null!==this.title&&void 0!==this.title?this.title:this.row&&this.row.title||null},displayOwner(){const e=this.displayPost;return e&&(e.owner||e.ownerContact)||null},displayOwnerName(){const e=this.displayOwner;
1return e?e.fullName?e.fullName:[e.firstName,e.lastName].filter(Boolean).join(" "):""},displayReactionsCount(){if(null!==this.reactionsCount&&void 0!==this.reactionsCount)return this.reactionsCount;if(this.row&&"number"===typeof this.row.reactionsCount)return this.row.reactionsCount;const e=this.displayPost&&this.displayPost.reactionData;return e?Object.values(e).reduce((e,t)=>e+(parseInt(t,10)||0),0):0},displayPostsCount(){return null!==this.postsCount&&void 0!==this.postsCount?this.postsCount:this.row&&"number"===typeof this.row.postsCount?this.row.postsCount:this.displayPost&&this.displayPost.childrenCount||0},emitPayload(){return this.row||this.displayPost},hasImage(){const e=this.displayPost;return!!(e&&e.medias&&e.medias.length>0&&"postimage"===e.medias[0].type)},hasVideo(){const e=this.displayPost;return!!(e&&e.medias&&e.medias.length>0&&"postvideo"===e.medias[0].type)}},methods:{mediaSrc:T.F9,postContent(e){return e?e.replace(/(https?:\/\/[^\s]+)/g,""):""}}},P=i(66262);const I=(0,P.A)(A,[["render",F]]);var M=I},34217:function(e,t,i){"use strict";i.d(t,{X:function(){return l}});i(44114),i(18111),i(7588);var s=i(37107),a=i(37875),n=i(49456);function o(){if(!s.Yv.definitions||!s.Yv.definitions.fal)return[];const e=s.Yv.definitions.fal,t=new Map,i=[];return Object.keys(e).forEach(s=>{const a=e[s],n=JSON.stringify(a[4]);t.has(n)||(t.set(n,s),i.push(s))}),i.sort()}s.Yv.add(a.VL8),s.Yv.add(a.QEP),s.Yv.add(n.YHM),s.Yv.add(n.DJx),s.Yv.add(n.YSf),s.Yv.add(n.iRu),s.Yv.add(n.IPD),s.Yv.add(n.v3E),s.Yv.add(n.aGl),s.Yv.add(n.O0T),s.Yv.add(n.pt),s.Yv.add(n.Cpz),s.Yv.add(n.ViY),s.Yv.add(a.NLt),s.Yv.add(a.$5D),s.Yv.add(a.zd6),s.Yv.add(a.zCh),s.Yv.add(a.FjH),s.Yv.add(a.aUl),s.Yv.add(a.IAJ),s.Yv.add(a.EYA),s.Yv.add(a.QV6),s.Yv.add(a.AIX),s.Yv.add(a.NFJ),s.Yv.add(a.HQ1),s.Yv.add(a.B4m),s.Yv.add(a.LA0),s.Yv.add(a.aaw),s.Yv.add(a.uu9),s.Yv.add(a.pw7),s.Yv.add(a.j2),s.Yv.add(n.vgq),s.Yv.add(n.u4),s.Yv.add(n.pNp),s.Yv.add(n.r55),s.Yv.add(n.gSF),s.Yv.add(n.mCl),s.Yv.add(n.APe),s.Yv.add(n.Eze),s.Yv.add(n.Bep),s.Yv.add(n.APi),s.Yv.add(n.jwR),s.Yv.add(n.$$g),s.Yv.add(n.k1j),s.Yv.add(n.sOt),s.Yv.add(n.s6x),s.Yv.add(n.pej),s.Yv.add(n.kNw),s.Yv.add(n.WRR),s.Yv.add(n.JHe),s.Yv.add(n.QEm),s.Yv.add(n.km$),s.Yv.add(n.ElQ),s.Yv.add(n.bMg),s.Yv.add(n.QtJ),s.Yv.add(n.e4L),s.Yv.add(n.vJC),s.Yv.add(n.WHk),s.Yv.add(n.Dwc),s.Yv.add(n.PKn),s.Yv.add(n.WfV),s.Yv.add(n.XYS),s.Yv.add(n.THi),s.Yv.add(n.Rbk),s.Yv.add(n.L1I),s.Yv.add(n.CI$),s.Yv.add(n.pr6),s.Yv.add(n.npb),s.Yv.add(n.HiB),s.Yv.add(n.Yec),s.Yv.add(n.cz4),s.Yv.add(n.Tov),s.Yv.add(n.rLo),s.Yv.add(n.ld_),s.Yv.add(n.bB2),s.Yv.add(n.k02),s.Yv.add(n.skf),s.Yv.add(n.C8j),s.Yv.add(n.s67),s.Yv.add(n.vNk),s.Yv.add(n.FsV),s.Yv.add(n.oYg),s.Yv.add(n.Q9Y),s.Yv.add(n.EvL),s.Yv.add(n.T4U),s.Yv.add(n.$UM),s.Yv.add(n.Mf0),s.Yv.add(n.Yop),s.Yv.add(n.vYn),s.Yv.add(n.Yj9),s.Yv.add(n.y5z),s.Yv.add(n.Bwz),s.Yv.add(n.LJS),s.Yv.add(n.LX6),s.Yv.add(n.ub2),s.Yv.add(n.IJv),s.Yv.add(n.bG5),s.Yv.add(n.Ju_),s.Yv.add(n.E5r),s.Yv.add(n.NMo),s.Yv.add(n.OXM),s.Yv.add(n.IxC),s.Yv.add(n.GZ1),s.Yv.add(n.URI),s.Yv.add(n.xfT),s.Yv.add(n.AoR),s.Yv.add(n.kwR),s.Yv.add(n._X3),s.Yv.add(n.IBP),s.Yv.add(n.giY),s.Yv.add(n.yvG),s.Yv.add(n.uts),s.Yv.add(n.yYn),s.Yv.add(n.npb),s.Yv.add(n.THO),s.Yv.add(n.$Dv),s.Yv.add(n.HiB),s.Yv.add(n.URI),s.Yv.add(n.kwR),s.Yv.add(n._X3),s.Yv.add(n.giY),s.Yv.add(n.V4x),s.Yv.add(n.yvG),s.Yv.add(n.uts),s.Yv.add(n.p7g),s.Yv.add(n.DX_),s.Yv.add(n.F3L),s.Yv.add(n.s5m),s.Yv.add(n.TmA),s.Yv.add(n.O4P),s.Yv.add(n.qon),s.Yv.add(n.GHC),s.Yv.add(n.zKK),s.Yv.add(n.EX9),s.Yv.add(n.wLd),s.Yv.add(n.pvD),s.Yv.add(n._$s),s.Yv.add(n.wQq),s.Yv.add(n.mRM),s.Yv.add(n.ZVP),s.Yv.add(n.MT7),s.Yv.add(n.iHh),s.Yv.add(n.LPI),s.Yv.add(n.vmR),s.Yv.add(n.ejs),s.Yv.add(n.xS3),s.Yv.add(n.bkH),s.Yv.add(n.woZ),s.Yv.add(n.Qi5),s.Yv.add(n.y5z),s.Yv.add(n.rtb),s.Yv.add(n.W2$),s.Yv.add(n.JmD),s.Yv.add(n.B9w),s.Yv.add(n._Xl),s.Yv.add(n.gDf),s.Yv.add(n.X59),s.Yv.add(n.jBL),s.Yv.add(n.z23),s.Yv.add(n.tGE),s.Yv.add(n.Xe),s.Yv.add(n.oAI),s.Yv.add(n.y99),s.Yv.add(n.kcz),s.Yv.add(n.qIE),s.Yv.add(n.euE),s.Yv.add(n.Wkq),s.Yv.add(n.yzd),s.Yv.add(n._L7),s.Yv.add(n.sqy),s.Yv.add(n.sUV),s.Yv.add(n.Ff7),s.Yv.add(n.fq7),s.Yv.add(n.jxg),s.Yv.add(n.nET),s.Yv.add(n.ROs),s.Yv.add(n.SUf),s.Yv.add(n.isI),s.Yv.add(n.hSh),s.Yv.add(n.rk5),s.Yv.add(n.br3),s.Yv.add(n.OR8),s.Yv.add(n.vlp),s.Yv.add(n.qtl),s.Yv.add(n.cbP),s.Yv.add(n.ekg),s.Yv.add(n.ZPt),s.Yv.add(n.IMq),s.Yv.add(n.a8v),s.Yv.add(n.S9g),s.Yv.add(n.br3),s.Yv.add(n.cCs),s.Yv.add(n.qtl),s.Yv.add(n.zpE),s.Yv.add(n.cbP),s.Yv.add(n.ekg),s.Yv.add(n.jrc
1),s.Yv.add(n.uQF),s.Yv.add(n.ibI),s.Yv.add(n._JS),s.Yv.add(n.wM0),s.Yv.add(n.I9y),s.Yv.add(n.TuH),s.Yv.add(n.jPR),s.Yv.add(n.lRx),s.Yv.add(n.pch),s.Yv.add(n.Tsj),s.Yv.add(n.WVH),s.Yv.add(n.FC0),s.Yv.add(n.oE6),s.Yv.add(n.yek),s.Yv.add(n.IP$),s.Yv.add(n.$6A),s.Yv.add(n.$7g),s.Yv.add(n.uQL),s.Yv.add(n.K1h),s.Yv.add(n.Dn6),s.Yv.add(n.ecg),s.Yv.add(n._ur),s.Yv.add(n.jbh),s.Yv.add(n.Tip),s.Yv.add(n.U23),s.Yv.add(n.l5I),s.Yv.add(n.chs),s.Yv.add(n.SIw),s.Yv.add(n.jTw),s.Yv.add(n.ruc),s.Yv.add(n.sqS),s.Yv.add(n.GF6),s.Yv.add(n.a$),s.Yv.add(n.KMJ),s.Yv.add(n.uOc),s.Yv.add(n.U6Q),s.Yv.add(n.Wxp),s.Yv.add(n.fGk),s.Yv.add(n.V3T),s.Yv.add(n.USd),s.Yv.add(n.PJS),s.Yv.add(n.Q_u),s.Yv.add(n.Qpm),s.Yv.add(n.o_8),s.Yv.add(n.oMq),s.Yv.add(n.jyc),s.Yv.add(n.KtJ),s.Yv.add(n.ycA),s.Yv.add(n.$tm),s.Yv.add(n.Wyq),s.Yv.add(n.zm_),s.Yv.add(n.sAM),s.Yv.add(n.eST),s.Yv.add(n._Up),s.Yv.add(n.dYn),s.Yv.add(n.y80),s.Yv.add(n.NLI),s.Yv.add(n.wq_),s.Yv.add(n.BA1),s.Yv.add(n.qAe),s.Yv.add(n.tx8),s.Yv.add(n.uUT),s.Yv.add(n.fyG),s.Yv.add(n.XaT),s.Yv.add(n.Qte),s.Yv.add(n.yOA),s.Yv.add(n.Dnq),s.Yv.add(n.nx5),s.Yv.add(n.cJ5),s.Yv.add(n.hem),s.Yv.add(n.iFU),s.Yv.add(n.S3S),s.Yv.add(n.Iae),s.Yv.add(n.lEd),s.Yv.add(n.k6j),s.Yv.add(n.Vpu),s.Yv.add(n.tjd),s.Yv.add(n.BeE),s.Yv.add(n.gKm),s.Yv.add(n.RUA),s.Yv.add(n.aXh),s.Yv.add(n.rC2),s.Yv.add(n.h8M),s.Yv.add(n.XVz),s.Yv.add(n.BEE),s.Yv.add(n.GxD),s.Yv.add(n.yy),s.Yv.add(n.$UM),s.Yv.add(n.cNj),s.Yv.add(n.fU5),s.Yv.add(n.fmP),s.Yv.add(n.q9p),s.Yv.add(n.dpu),s.Yv.add(n.I$7),s.Yv.add(n.w97),s.Yv.add(n.ckx),s.Yv.add(n.o97),s.Yv.add(n.MNJ),s.Yv.add(n.jC5),s.Yv.add(n.o97),s.Yv.add(n.Nby),s.Yv.add(n.SY_),s.Yv.add(n.i7d),s.Yv.add(n.qcK),s.Yv.add(n.ITF),s.Yv.add(n.wRm),s.Yv.add(n.mNf),s.Yv.add(n.gdJ),s.Yv.add(n.$T_),s.Yv.add(n.rBd),s.Yv.add(n.ao0),s.Yv.add(n.$Bp),s.Yv.add(n.X46),s.Yv.add(n.nWR),s.Yv.add(n.LkM),s.Yv.add(n.zkx),s.Yv.add(n.Y9e),s.Yv.add(n.Dfk),s.Yv.add(n.VH5),s.Yv.add(n.O26),s.Yv.add(n.Uj9),s.Yv.add(n.A8r),s.Yv.add(n.I9X),s.Yv.add(n.C5p),s.Yv.add(n.JAe),s.Yv.add(n.QRE),s.Yv.add(n.vBH),s.Yv.add(n.e5w),s.Yv.add(n.Cyq),s.Yv.add(n.n2W),s.Yv.add(n.kWV),s.Yv.add(n.tjk),s.Yv.add(n.SGM),s.Yv.add(n.sqM),s.Yv.add(n.fmL),s.Yv.add(n.ivC),s.Yv.add(n.dzk),s.Yv.add(n.K5S),s.Yv.add(n.HKD),s.Yv.add(n.w2A),s.Yv.add(n.Jt$),s.Yv.add(n.NmG),s.Yv.add(n.LFj),s.Yv.add(n.Ke8),s.Yv.add(n.uZo),s.Yv.add(n.Oqy),s.Yv.add(n.oMV),s.Yv.add(n.W1P),s.Yv.add(n.qe6),s.Yv.add(n.n$V),s.Yv.add(n.imB),s.Yv.add(n.R1H),s.Yv.add(n.wWr),s.Yv.add(n.oHY),s.Yv.add(n.UD_),s.Yv.add(n.W1p),s.Yv.add(n.gK3),s.Yv.add(n.dmS),s.Yv.add(n.xdS),s.Yv.add(n.pS3),s.Yv.add(n.hpd),s.Yv.add(n.KKr),s.Yv.add(n.yLS),s.Yv.add(n.CeG),s.Yv.add(n.O_q),s.Yv.add(n.fny),s.Yv.add(n.bLf),s.Yv.add(n.jkA),s.Yv.add(n.gr3),s.Yv.add(n.oZK),s.Yv.add(n.z1G),s.Yv.add(n.tUE),s.Yv.add(n.JxU),s.Yv.add(n._2z),s.Yv.add(n.DN2),s.Yv.add(n.y_8),s.Yv.add(n.OgW),s.Yv.add(n.v_t),s.Yv.add(n.x0T),s.Yv.add(n.WMI),s.Yv.add(n.iW_),s.Yv.add(n.FK2),s.Yv.add(n.hhY),s.Yv.add(n.iy8),s.Yv.add(n.EZy),s.Yv.add(n.BH7),s.Yv.add(n.dB),s.Yv.add(n.ekB),s.Yv.add(n.R70),s.Yv.add(n.eGi),s.Yv.add(n.muz),s.Yv.add(n.DW4),s.Yv.add(n.Z8x),s.Yv.add(n.GEE),s.Yv.add(n.s4k),s.Yv.add(n.lLb),s.Yv.add(n.JmV),s.Yv.add(n.h0u),s.Yv.add(n.k0E),s.Yv.add(n.azE),s.Yv.add(n.tdl),s.Yv.add(n.Uec),s.Yv.add(n.vmR),s.Yv.add(n.vHW),s.Yv.add(n.vaG),s.Yv.add(n.vGi),s.Yv.add(n.DDU),s.Yv.add(n.$O8),s.Yv.add(n.Vlg),s.Yv.add(n.$tZ),s.Yv.add(n.Ezy),s.Yv.add(n.z$e),s.Yv.add(n.pHs),s.Yv.add(n.S2b),s.Yv.add(n.A4h),s.Yv.add(n.IJd),s.Yv.add(n.B0C),s.Yv.add(n.Dvs),s.Yv.add(n.Ync),s.Yv.add(n.CQO),s.Yv.add(n.MjD),s.Yv.add(n.INu),s.Yv.add(n.UNK),s.Yv.add(n.AgW),s.Yv.add(n.VFr),s.Yv.add(n.$3n),s.Yv.add(n.nmc),s.Yv.add(n.qFF),s.Yv.add(n.KCv),s.Yv.add(n.QLR),s.Yv.add(n.Up0),s.Yv.add(n.vMs),s.Yv.add(n.Jyw),s.Yv.add(n.GRI),s.Yv.add(n.ZQp),s.Yv.add(n.iN5),s.Yv.add(n.Wzs),s.Yv.add(n.XkK),s.Yv.add(n.OtC),s.Yv.add(n.z1G),s.Yv.add(n.gZf),s.Yv.add(n.CYF),s.Yv.add(n.Hzw),s.Yv.add(n.zqi),s.Yv.add(n.okg),s.Yv.add(n.LBj),s.Yv.add(n.G06),s.Yv.add(n.e68),s.Yv.add(n.rQb),s.Yv.add(n.n0g),s.Yv.add(n.pCJ),s.Yv.add(n.mEO),s.Yv.add(n.jd5),s.Yv.add(n.B$L),s.Yv.add(n.Bwz),s.Yv.add(n.ReK),s.Yv.add(n.isQ),s.Yv.add(n.l6G),s.Yv.add(n.bnw),s.Yv.add(n.ppD),s.Yv.add(n.s0Q),s.Yv.add(n.Wcv),s.Yv.add(n.lS9),s.Yv.add(n.p4e),s.Yv.add(n.DO5),s.Yv.add(n.ubP),s.Yv.add(n.mGF),s.Yv.add(n.WFP),s.Yv.add(n.cKG),s.Yv.add(n.QUA),s.Yv.add(n.OIP),s.Yv.add(n.Dxs),s.Yv.add(n.us_),s.Yv.add(n.g$o),s.Yv.add(n.GrJ),s.Yv.add(n.ArK),s.Yv.add(n.w7B),s.Yv.add(n.c7y),s.Yv.add(n.Ewi),s.Yv.add(n.eFC),s.Yv.add(n.VnB),s.Yv.add(n.CN3),s.Yv.add(n.hod),s.Yv.add(n.rhK),s.Yv.add(n.$MS),s.Yv.add(n.rwq),s.Yv.add(n.Nfw),s.Yv.add(n.HND),s.Yv.add(n.ijD),s.Yv.add(n.G1Y),s.Yv.add(n.O0t),s.Yv.add(n.u4D),s.Yv.add(n.Qyz),s.Yv.add(n.mh),s.Yv.add(n.Y$q),s.Yv.add(n.FFg),s.Yv.add(n.mxU),s.Yv.add(n.mWq),s.Yv.add(n.aEb),s.Yv.add(n.$qH),s.Yv.add(n._vK),s.Yv.add(n.iNx),s.Yv.add(n.PeH),s.Yv.add(n.zQm),s.Yv.add(n.eZD),s.Yv.add(n.c3e),s.Yv.add(n.Int),s.Yv.add(n.PIP),s.Yv.add(n.SyQ),s.Yv.add(n.Ubc),s.Yv.add(n.MNM),s.Yv.add(n.$Fj);const l=o()},35358:function(e,t,i){var s={"./af":25177,"./af.js":25177,"./ar":61509,"./ar-dz":41488,"./ar-dz.js":41488,"./ar-kw":58676,"./ar-kw.js":58676,"./ar-ly":42353,"./ar-ly.js":42353,"./ar-ma":24496,"./ar-ma.js":24496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":82682,"./ar-sa.js":82682,"./ar-tn":89756,"./ar-tn.js":89756,"./ar.js":61509,"./az":95533,"./az.js":95533,"./be":28959,"./be.js":28959,"./bg":47777,"./bg.js":47777,"./bm":54903,"./bm.js":54903,"./bn":61290,"./bn-bd":17357,"./bn-bd.js":17357,"./bn.js":61290,"./bo":31545,"./bo.js":31545,"./br":11470,"./br.js":11470,"./bs":44429,"./bs.js":44429,"./ca":7306,"./ca.js":7306,"./cs":56464,"./cs.js":56464,"./cv":73635,"./cv.js":73635,"./cy":64226,"./cy.js":64226,"./da":93601,"./da.js":93601,"./de":77853,"./de-at":26111,"./de-at.js":26111,"./de-ch":54697,"./de-ch.js":54697,"./de.js":77853,"./dv":60708,"./dv.js":60708,"./el":54691,"./el.js":54691,"./en-au":53872,"./en-au.js":53872,"./en-ca":28298,"./en-ca.js":28298,"./en-gb":56195,"./en-gb.js":56195,"./en-ie":66584,"./en-ie.js":66584,"./en-il":65543,"./en-il.js":65543,"./en-in":9033,"./en-in.js":9033,"./en-nz":79402,"./en-nz.js":79402,"./en-sg":43004,"./en-sg.js":43004,"./eo":32934,"./eo.js":32934,"./es":97650,"./es-do":20838,"./es-do.js":20838,"./es-mx":17730,"./es-mx.js":17730,"./es-us":56575,"./es-us.js":56575,"./es.js":97650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":90527,"./fi.js":90527,"./fil":95995,"./fil.js":95995,"./fo":52477,"./fo.js":52477,"./fr":85498,"./fr-ca":26435,"./fr-ca.js":26435,"./fr-ch":37892,"./fr-ch.js":37892,"./fr.js":85498,"./fy":37071,"./fy.js":37071,"./ga":41734,"./ga.js":41734,"./gd":70217,"./gd.js":70217,"./gl":77329,"./gl.js":77329,"./gom-deva":32124,"./gom-deva.js":32124,"./gom-latn":93383,"./gom-latn.js":93383,"./gu":95050,"./gu.js":95050,"./he":11713,"./he.js":11713,"./hi":43861,"./hi.js":43861,"./hr":26308,"./hr.js":26308,"./hu":90609,"./hu.js":90609,"./hy-am":17160,"./hy-am.js":17160,"./id":74063,"./id.js":74063,"./is":89374,"./is.js":89374,"./it":88383,"./it-ch":21827,"./it-ch.js":21827,"./it.js":88383,"./ja":23827,"./ja.js":23827,"./jv":89722,"./jv.js":89722,"./ka":41794,"./ka.js":41794,"./kk":27088,"./kk.js":27088,"./km":96870,"./km.js":96870,"./kn":84451,"./kn.js":84451,"./ko":63164,"./ko.js":63164,"./ku":98174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":98174,"./ky":78474,"./ky.js":78474,"./lb":79680,"./lb.js":79680,"./lo":15867,"./lo.js":15867,"./lt":45766,"./lt.js":45766,"./lv":69532,"./lv.js":69532,"./me":58076,"./me.js":58076,"./mi":41848,"./mi.js":41848,"./mk":30306,"./mk.js":30306,"./ml":73739,"./ml.js":73739,"./mn":99053,"./mn.js":99053,"./mr":86169,"./mr.js":86169,"./ms":73386,"./ms-my":92297,"./ms-my.js":92297,"./ms.js":73386,"./mt":77075,"./mt.js":77075,"./my":72264,"./my.js":72264,"./nb":22274,"./nb.js":22274,"./ne":8235,"./ne.js":8235,"./nl":92572,"./nl-be":43784,"./nl-be.js":43784,"./nl.js":92572,"./nn":54566,"./nn.js":54566,"./oc-lnc":69330,"./oc-lnc.js":69330,"./pa-in":29849,"./pa-in.js":29849,"./pl":94418,"./pl.js":94418,"./pt":79834,"./pt-br":48303,"./pt-br.js":48303,"./pt.js":79834,"./ro":24457,"./ro.js":24457,"./ru":82271,"./ru.js":82271,"./sd":1221,"./sd.js":1221,"./se":33478,"./se.js":33478,"./si":17538,"./si.js":17538,"./sk":5784,"./sk.js":5784,"./sl":46637,"./sl.js":46637,"./sq":86794,"./sq.js":86794,"./sr":45719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":45719,"./ss":56e3,"./ss.js":56e3,"./sv":41011,"./sv.js":41011,"./sw":40748,"./sw.js":40748,"./ta":11025,"./ta.js":11025,"./te":11885,"./te.js":11885,"./tet":28861,"./tet.js":28861,"./tg":86571,"./tg.js":86571,"./th":55802,"./th.js":55802,"./tk":59527,"./tk.js":59527,"./tl-ph":29231,"./tl-ph.js":29231,"./tlh":31052,"./tlh.js":31052,"./tr":85096,"./tr.js":85096,"./tzl":79846,"./tzl.js":79846,"./tzm":81765,"./tzm-latn":97711,"./tzm-latn.js":97711,"./tzm.js":81765,"./ug-cn":48414,"./ug-cn.js":48414,"./uk":16618,"./uk.js":16618,"./ur":57777,"./ur.js":57777,"./uz":57609,"./uz-latn":72475,"./uz-latn.js":72475,"./uz.js":57609,"./vi":21135,"./vi.js":21135,"./x-pseudo":64051,"./x-pseudo.js":64051,"./yo":82218,"./yo.js":82218,"./zh-cn":52648,"./zh-cn.js":52648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":31541,"./zh-mo.js":31541,"./zh-tw":50304,"./zh-tw.js":50304};function a(e){var t=n(e);return i(t)}function n(e){if(!i.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}a.keys=function(){return Object.keys(s)},a.resolve=n,e.exports=a,a.id=35358},35824:function(e,t,i){"use strict";i.d(t,{A:function(){return E}});var s=i(20641),a=i(90033);const n={class:"o-website-footer"},o={class:"o-website-container o-website-footer__grid"},l={class:"o-website-footer__brand"},r=["src","alt"],d={key:1,class:"o-website-footer__tagline"}
1,c={key:2,class:"o-website-footer__social"},u=["href","aria-label"],m={key:0,class:"o-website-footer__title"},p={class:"o-website-footer__bottom o-website-container"},h={class:"o-website-footer__legal"},g=["title"];function f(e,t,i,f,b,y){const v=(0,s.g2)("WebsiteIcon"),k=(0,s.g2)("WebsiteMenuLink"),C=(0,s.g2)("router-link");return(0,s.uX)(),(0,s.CE)("footer",n,[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[y.logoUrl?((0,s.uX)(),(0,s.CE)("img",{key:0,src:y.logoUrl,alt:y.tenantName,loading:"lazy",decoding:"async",class:"o-website-footer__logo"},null,8,r)):(0,s.Q3)("",!0),y.tagline?((0,s.uX)(),(0,s.CE)("p",d,(0,a.v_)(y.tagline),1)):(0,s.Q3)("",!0),y.socialLinks.length?((0,s.uX)(),(0,s.CE)("div",c,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(y.socialLinks,e=>((0,s.uX)(),(0,s.CE)("a",{key:e.network,class:"o-website-footer__social-link",href:e.url,"aria-label":e.label,target:"_blank",rel:"noopener noreferrer"},[(0,s.bF)(v,{name:e.icon},null,8,["name"])],8,u))),128))])):(0,s.Q3)("",!0)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(y.footerColumns,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.key,class:"o-website-footer__col"},[e.title?((0,s.uX)(),(0,s.CE)("h4",m,(0,a.v_)(e.title),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.links,e=>((0,s.uX)(),(0,s.Wv)(k,{key:e.uuid,item:e,"link-class":"o-website-footer__link"},null,8,["item"]))),128))]))),128))]),(0,s.Lk)("div",p,[(0,s.Lk)("div",h,[(0,s.Lk)("span",null,"© "+(0,a.v_)(y.currentYear)+" "+(0,a.v_)(y.tenantName),1),y.privacyPage?((0,s.uX)(),(0,s.Wv)(C,{key:0,class:"o-website-footer__legal-link",to:y.privacyRoute},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(y.privacyPage.title),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),(0,s.Lk)("a",{class:"o-website-footer__powered",href:"https://orgo.space",title:e.$t("Membership platform")},(0,a.v_)(e.$t("Made with Orgo")),9,g)])])}i(44114),i(18111),i(22489),i(20116),i(7588),i(61701);var b=i(86489),y=i(19318),v=i(28782),k=i(93811),C=i(91495),L={name:"WebsiteFooter",components:{WebsiteMenuLink:b.A,WebsiteIcon:y.A},props:{site:{type:Object,default:null},tenant:{type:Object,default:null},year:{type:Number,default:null}},computed:{settings(){return this.site?.website||null},tenantName(){return this.site?.tenant?.name||this.tenant?.name||"Orgo"},logoUrl(){const e=this.site?.tenant?.logo||this.tenant?.logo;return e?v.hd+v.DJ+"tenant/"+e:null},tagline(){return this.settings?.footer?.tagline||null},currentYear(){return this.year||(new Date).getFullYear()},socialLinks(){const e=this.settings?.social||{};return k._.filter(t=>!!e[t.network]).map(t=>({...t,url:e[t.network]}))},footerColumns(){const e=this.site?.menus?.footer||[],t=[],i=[];return e.forEach(e=>{e.children.length?t.push({key:e.uuid,title:e.label,links:e.children}):i.push(e)}),i.length&&t.unshift({key:"loose",title:this.$t("Explore"),links:i}),t},privacyPage(){return(this.site?.pages||[]).find(e=>"privacy"===e.slug)||null},privacyRoute(){return(0,C.K7)(this.site,this.privacyPage?.slug)}}},w=i(66262);const _=(0,w.A)(L,[["render",f]]);var E=_},36049:function(e,t,i){"use strict";i.d(t,{HA:function(){return m},Xo:function(){return d},_p:function(){return l},aE:function(){return p},bK:function(){return b},dN:function(){return f},q2:function(){return c},ut:function(){return h}});i(14603),i(47566),i(98721);var s=i(84743),a=i.n(s);const n="1",o="orgo.eventPreviewToken.";function l(e,t,{preview:i=!1}={}){const s={workspace:t?.slug,lang:t?.language};return i&&(s.preview=n),{name:"EventPublicPage",params:{item:e},query:s}}function r(e){if(!e)return null;try{return window.sessionStorage.getItem(o+e)||null}catch{return null}}function d(e,t){if(e&&t)try{window.sessionStorage.setItem(o+e,t)}catch{}}function c(e){if(e)try{window.sessionStorage.removeItem(o+e)}catch{}}function u(e,t,i){return{mode:"token",url:`/public/event-preview/${e}?token=${encodeURIComponent(t)}`,token:t,tokenFromQuery:i}}function m(e,t,i){const s="string"===typeof t?.preview?t.preview:"";if(s===n&&i)return{mode:"member",url:`/events/${e}/preview`,token:null,tokenFromQuery:!1};if(s&&s!==n)return u(e,s,!0);if(!s){const t=r(e);if(t)return u(e,t,!1)}return p(e)}function p(e){return{mode:"public",url:`/get_public_event_anonymous/${e}`,token:null,tokenFromQuery:!1}}function h(e=window.location){const t=/^\/public\/event\/([^/]+)\/?$/.exec(e?.pathname||"");return!!t&&(!!new URLSearchParams(e.search||"").get("preview")||!!r(g(t[1])))}function g(e){try{return decodeURIComponent(e)}catch{return e}}function f(e,t,i){const[s,n]=t?t.split(":"):[0,0];return a()(e).hour(s).minute(n).clone().tz(i,!0)}function b({dateTimeBegin:e,timeBegin:t,dateTimeEnd:i,timeEnd:s,timezone:n},o=new Date){if(!e||!n)return!1;const l=i?f(i,s||t,n):f(e,t,n);return l.isBefore(a()(o))}},36401:function(e,t,i){"use strict";i.d(t,{A:function(){return p}});var s=i(20641),a=i(90033);const n={key:0,class:"region-option-count"};function o(e,t,i,o,l,r){const d=(0,s.g2)("b-autocomplete"),c=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.Wv)(c,{label:i.label,class:(0,a.C4)(i.isRequired?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(d,{modelValue:l.countryName,"onUpdate:modelValue":t[0]||(t[0]=e=>l.countryName=e),data:r.filteredCountries,placeholder:i.placeholder?i.placeholder:null,field:"name",disabled:i.isDisabled,clearable:!i.isDisabled,required:!!i.isRequired,size:i.isFilter?"is-small":"",rounded:i.isFilter,expanded:i.isFilter,"open-on-focus":"",onSelect:r.change},{default:(0,s.k6)(e=>[(0,s.Lk)("span",{class:(0,a.C4)(["region-option",{"region-option-empty":e.option.isEmpty}])},[(0,s.Lk)("span",null,(0,a.v_)(e.option.name),1),void 0!==e.option.memberCount?((0,s.uX)(),(0,s.CE)("span",n,(0,a.v_)(e.option.memberCount),1)):(0,s.Q3)("",!0)],2)]),_:1},8,["modelValue","data","placeholder","disabled","clearable","required","size","rounded","expanded","onSelect"])]),_:1},8,["label","class"])}i(44114),i(18111),i(22489),i(61701);var l=i(95256),r=i(41183);const d=l.Xr.map(e=>({id:e.v,name:e.n,code:e.c,phoneNumberPrefix:e.p,phoneNumberSample:e.s,"@id":"/api/v1/countries/"+e.v}));var c={props:["country","label","placeholder","isResultObject","isRequired","isDisabled","isFilter","counts"],data(){return{countryName:null}},computed:{countryOptions(){const e=(0,r.F2)(d,this.counts);return this.counts?e.filter(e=>!e.isEmpty):e},filteredCountries(){const e=(this.countryName||"").trim().toLowerCase();if(!e)return this.countryOptions;const t=[],i=[];for(const s of this.countryOptions){const a=s.name.toLowerCase();a.startsWith(e)?t.push(s):a.includes(e)&&i.push(s)}return[...t,...i]}},watch:{country:function(e){this.setCountryName(e)}},created(){this.setCountryName(this.country)},methods:{setCountryName(e){this.countryName=e?e.name:null},change(e){if(e&&e.isEmpty)return void(this.countryName=null);let t=null;t=this.isResultObject?e||null:e?e["@id"]:null,this.$emit("update:modelValue",t)}}},u=i(66262);const m=(0,u.A)(c,[["render",o]]);var p=m},36803:function(e,t,i){"use strict";i.d(t,{A:function(){return Ne}});var s=i(20641),a=i(53751),n=i(90033);const o={key:1,ref:"panel",class:"card fee-pay-panel"},l={class:"fee-pay-panel-body"},r={key:"amount",class:"fee-donation"},d={class:"fee-donation-title"},c={class:"fee-donation-sub"},u={key:0,class:"fee-amount-grid"},m=["onClick"],p={key:1,class:"fee-amount-field"},h={class:"fee-amount-currency"},g=["min","max","aria-label"],f={class:"fee-donation-sub"},b={key:2,class:"help is-danger"},y={class:"fee-donation-summary"},v={class:"fee-donation-row fee-donation-total"},k={class:"fee-summary-amount"},C={class:"fee-donation-actions"},L={key:"donation",class:"fee-donation"},w={class:"fee-donation-title"},_={class:"fee-donation-sub"},E={class:"fee-donation-list"},$=["onClick"],F={class:"fee-donation-name"},T={class:"fee-donation-value"},S={class:"fee-donation-name"},A={class:"fee-donation-value"},P={class:"fee-donation-currency"},I={class:"fee-donation-summary"},M={class:"fee-summary-heading"},x={class:"fee-donation-row"},N={class:"fee-summary-label"},U={class:"fee-summary-amount"},D={key:0,class:"fee-donation-row"},X={class:"fee-summary-label"},V={class:"fee-summary-amount"},R={key:1,class:"fee-donation-row"},O={class:"fee-summary-label"},Q={class:"fee-summary-amount"},B={key:2,class:"fee-donation-row"},G={class:"fee-summary-label"},W={class:"fee-summary-amount"},j={class:"fee-summary-label"},z={class:"fee-summary-amount"},q={class:"fee-donation-row fee-donation-total"},J={class:"fee-summary-amount"},H={class:"fee-donation-actions"},K={key:"payment"},Y={key:0,class:"fee-donation-summary fee-pay-summary"},Z={class:"fee-summary-heading"},ee={class:"fee-donation-row"},te={class:"fee-summary-label"},ie={class:"fee-summary-amount"},se={key:0,class:"fee-donation-row"},ae={class:"fee-summary-label"},ne={class:"fee-summary-amount"},oe={key:1,class:"fee-donation-row"},le={class:"fee-summary-label"},re={class:"fee-summary-amount"},de={key:2,class:"fee-donation-row"},ce={class:"fee-summary-label"},ue={class:"fee-summary-amount"},me={class:"fee-summary-label"},pe={class:"fee-summary-amount"},he={class:"fee-donation-row fee-donation-total"},ge={class:"fee-summary-amount"},fe={key:1,class:"notification is-danger is-light mt-4"},be={key:"success",class:"fee-pay-state has-text-centered"},ye={class:"fee-pay-state-title"},ve={class:"fee-pay-state-sub"},ke={key:"error",class:"fee-pay-state has-text-centered"},Ce={class:"fee-pay-state-title"},Le={class:"fee-pay-state-sub"},we={class:"buttons is-centered mt-4"},_e={key:0,class:"fee-pay-panel-foot"},Ee={class:"fee-pay-secure"},$e={class:"fee-pay-foot-actions"};function Fe(e,t,i,Fe,Te,Se){const Ae=(0,s.g2)("b-loading"),Pe=(0,s.g2)("PaymentLoadingAnimation"),Ie=(0,s.g2)("b-button"),Me=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("section",null,[i.copyLink?((0,s.uX)(),(0,s.Wv)(Ae,{key:0,modelValue:Te.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>Te.isLoading=e),"is-full-page":!0},null,8,["modelValue"])):((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[(0,s.bF)(a.eB,{name:"fade",mode:"out-in"},{default:(0,s.k6)(()=>["loading"===Te.step?((0,s.uX)(),(0,s.Wv)(Pe,{key:"loading"})):"processing"===Te.step?((0,s.uX)(),(0,s.Wv)(Pe,{key:"processing",title:e.$t("Processing your payment")+"...",subtitle:e.$t("This will only take a moment")},null,8,["title","subtitle"])):"amount"===Te.step?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("p",d,(0,n.v_)(i.chooseAmount.prompt||e.$t("Choose your amount")),1),(0,s.Lk)("p",c,(0,n.v_)(e.$t("Your membership is active for as long as this covers, whatever you decide to give.")),1),Se.suggestedAmounts.length?((0,s.uX)(),(0,s.CE)("div",u,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Se.suggestedAmounts,e=>((0,s.uX)(),(0,s.CE)("button",{key:e,type:"button",class:(0,n.C4)(["fee-amount-chip",{active:Se.isSuggestedAmountSelected(e)}]),onClick:t=>Se.pickSuggestedAmount(e)},(0,n.v_)(Se.formatMoney(e)),11,m))),128)),(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["fee-amount-chip",{active:Te.isOtherAmount}]),onClick:t[1]||(t[1]=(...e)=>Se.pickOtherAmount&&Se.pickOtherAmount(...e))},(0,n.v_)(e.$t("Other amount")),3)])):(0,s.Q3)("",!0),!Se.suggestedAmounts.length||Te.isOtherAmount?((0,s.uX)(),(0,s.CE)("label",p,[(0,s.Lk)("span",h,(0,n.v_)(Se.donationCurrencySymbol),1),(0,s.bo)((0,s.Lk)("input",{ref:"chosenAmountInput","onUpdate:modelValue":t[2]||(t[2]=e=>Te.chosenAmount=e),type:"number",step:"1",min:Se.amountMin,max:Se.amountMax,class:"fee-amount-input","aria-label":e.$t("Amount")},null,8,g),[[a.Jo,Te.chosenAmount]])])):(0,s.Q3)("",!0),(0,s.Lk)("p",f,[(0,s.eW)((0,n.v_)(e.$t("Minimum"))+": "+(0,n.v_)(Se.formatMoney(Se.amountMin))+" ",1),Se.amountMax?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)(" · "+(0,n.v_)(e.$t("Maximum"))+": "+(0,n.v_)(Se.formatMoney(Se.amountMax)),1)],64)):(0,s.Q3)("",!0),Se.chosenAmountPeriods>1?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)(" · "+(0,n.v_)(e.$t("per period"))+" à "+(0,n.v_)(Se.chosenAmountPeriods),1)],64)):(0,s.Q3)("",!0)]),Se.chosenAmountError?((0,s.uX)(),(0,s.CE)("p",b,(0,n.v_)(Se.chosenAmountError),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",y,[(0,s.Lk)("div",v,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Total")),1),(0,s.Lk)("span",k,(0,n.v_)(Se.formatMoney(Se.baseAmount)),1)])]),(0,s.Lk)("div",C,[(0,s.bF)(Ie,{class:"is-primary is-rounded fee-pay-btn",disabled:!!Se.chosenAmountError,onClick:Se.continueFromAmount},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Continue to payment")),1)]),_:1},8,["disabled","onClick"])])])):"donation"===Te.step?((0,s.uX)(),(0,s.CE)("div",L,[(0,s.Lk)("p",w,(0,n.v_)(i.donationOptions.prompt||e.$t("Add a donation?")),1),(0,s.Lk)("p",_,(0,n.v_)(e.$t("An optional gift to supp
1ort our work. You can skip this.")),1),(0,s.Lk)("div",E,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.donationOptions.tiers||[],t=>((0,s.uX)(),(0,s.CE)("button",{key:t.id,type:"button",class:(0,n.C4)(["fee-donation-option",{active:Te.selectedDonationPriceIds.includes(t.id)}]),onClick:e=>Se.toggleDonationTier(t)},[(0,s.bF)(Me,{class:"fee-donation-mark",icon:Te.selectedDonationPriceIds.includes(t.id)?["fal","square-check"]:["fal","square"]},null,8,["icon"]),(0,s.Lk)("span",F,(0,n.v_)(t.name||e.$t("Donation")),1),(0,s.Lk)("span",T,(0,n.v_)(Se.formatMoney(t.amount)),1)],10,$))),128)),i.donationOptions.allowCustom?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,n.C4)(["fee-donation-option",{active:Se.isCustomDonation}]),onClick:t[5]||(t[5]=(...e)=>Se.focusCustomDonation&&Se.focusCustomDonation(...e))},[(0,s.bF)(Me,{class:"fee-donation-mark",icon:Se.isCustomDonation?["fal","square-check"]:["fal","square"]},null,8,["icon"]),(0,s.Lk)("span",S,(0,n.v_)(e.$t("Other amount")),1),(0,s.Lk)("span",A,[(0,s.Lk)("span",P,(0,n.v_)(Se.donationCurrencySymbol),1),(0,s.bo)((0,s.Lk)("input",{ref:"customDonationInput","onUpdate:modelValue":t[3]||(t[3]=e=>Te.customDonationAmount=e),type:"number",min:"0",step:"1",class:"fee-donation-input",placeholder:"0",onClick:t[4]||(t[4]=(0,a.D$)(()=>{},["stop"]))},null,512),[[a.Jo,Te.customDonationAmount]])])],2)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",I,[(0,s.Lk)("p",M,(0,n.v_)(e.$t("Summary")),1),(0,s.Lk)("div",x,[(0,s.Lk)("span",N,(0,n.v_)(Se.membershipLabel),1),(0,s.Lk)("span",U,(0,n.v_)(Se.membershipDisplay),1)]),Se.vatAmount>0?((0,s.uX)(),(0,s.CE)("div",D,[(0,s.Lk)("span",X,(0,n.v_)(Se.vatLabel),1),(0,s.Lk)("span",V,(0,n.v_)(Se.formatMoney(Se.vatAmount)),1)])):(0,s.Q3)("",!0),Se.registrationFeeAmount>0?((0,s.uX)(),(0,s.CE)("div",R,[(0,s.Lk)("span",O,(0,n.v_)(e.$t("Registration fee")),1),(0,s.Lk)("span",Q,(0,n.v_)(Se.formatMoney(Se.registrationFeeAmount)),1)])):(0,s.Q3)("",!0),Se.registrationFeeVat>0?((0,s.uX)(),(0,s.CE)("div",B,[(0,s.Lk)("span",G,(0,n.v_)(Se.registrationFeeVatLabel),1),(0,s.Lk)("span",W,(0,n.v_)(Se.formatMoney(Se.registrationFeeVat)),1)])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Se.donationBreakdown,(e,t)=>((0,s.uX)(),(0,s.CE)("div",{key:t,class:"fee-donation-row"},[(0,s.Lk)("span",j,(0,n.v_)(e.label),1),(0,s.Lk)("span",z,(0,n.v_)(Se.formatMoney(e.amount)),1)]))),128)),(0,s.Lk)("div",q,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Total")),1),(0,s.Lk)("span",J,(0,n.v_)(Se.formatMoney(Se.donationTotal)),1)])]),(0,s.Lk)("div",H,[(0,s.bF)(Ie,{class:"is-primary is-rounded fee-pay-btn",onClick:Se.continueToPayment},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Continue to payment")),1)]),_:1},8,["onClick"])])])):"payment"===Te.step?((0,s.uX)(),(0,s.CE)("div",K,[Se.donationAmount>0||Se.vatAmount>0||Se.registrationFeeAmount>0?((0,s.uX)(),(0,s.CE)("div",Y,[(0,s.Lk)("p",Z,(0,n.v_)(e.$t("Summary")),1),(0,s.Lk)("div",ee,[(0,s.Lk)("span",te,(0,n.v_)(Se.membershipLabel),1),(0,s.Lk)("span",ie,(0,n.v_)(Se.membershipDisplay),1)]),Se.vatAmount>0?((0,s.uX)(),(0,s.CE)("div",se,[(0,s.Lk)("span",ae,(0,n.v_)(Se.vatLabel),1),(0,s.Lk)("span",ne,(0,n.v_)(Se.formatMoney(Se.vatAmount)),1)])):(0,s.Q3)("",!0),Se.registrationFeeAmount>0?((0,s.uX)(),(0,s.CE)("div",oe,[(0,s.Lk)("span",le,(0,n.v_)(e.$t("Registration fee")),1),(0,s.Lk)("span",re,(0,n.v_)(Se.formatMoney(Se.registrationFeeAmount)),1)])):(0,s.Q3)("",!0),Se.registrationFeeVat>0?((0,s.uX)(),(0,s.CE)("div",de,[(0,s.Lk)("span",ce,(0,n.v_)(Se.registrationFeeVatLabel),1),(0,s.Lk)("span",ue,(0,n.v_)(Se.formatMoney(Se.registrationFeeVat)),1)])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Se.donationBreakdown,(e,t)=>((0,s.uX)(),(0,s.CE)("div",{key:t,class:"fee-donation-row"},[(0,s.Lk)("span",me,(0,n.v_)(e.label),1),(0,s.Lk)("span",pe,(0,n.v_)(Se.formatMoney(e.amount)),1)]))),128)),(0,s.Lk)("div",he,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Total")),1),(0,s.Lk)("span",ge,(0,n.v_)(Se.formatMoney(Se.donationTotal)),1)])])):(0,s.Q3)("",!0),t[7]||(t[7]=(0,s.Lk)("div",{id:"fee-payment-element",class:"fee-pay-element"},null,-1)),Te.paymentErrorMessage?((0,s.uX)(),(0,s.CE)("div",fe,[(0,s.Lk)("button",{type:"button",class:"delete",onClick:t[6]||(t[6]=e=>Te.paymentErrorMessage=null)}),(0,s.eW)(" "+(0,n.v_)(Te.paymentErrorMessage),1)])):(0,s.Q3)("",!0)])):"success"===Te.step?((0,s.uX)(),(0,s.CE)("div",be,[(0,s.bF)(Me,{icon:"fa-light fa-circle-check",class:"fee-pay-state-icon has-text-success"}),(0,s.Lk)("p",ye,(0,n.v_)(e.$t("Payment successful")),1),(0,s.Lk)("p",ve,(0,n.v_)(Se.successMessage),1),(0,s.bF)(Ie,{class:"is-primary is-rounded mt-4",onClick:Se.handleClose},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("OK")),1)]),_:1},8,["onClick"])])):"error"===Te.step?((0,s.uX)(),(0,s.CE)("div",ke,[(0,s.bF)(Me,{icon:"fa-light fa-circle-exclamation",class:"fee-pay-state-icon has-text-danger"}),(0,s.Lk)("p",Ce,(0,n.v_)(e.$t("Payment failed")),1),(0,s.Lk)("p",Le,(0,n.v_)(Te.paymentErrorMessage||e.$t("Something went wrong. Please try again.")),1),(0,s.Lk)("div",we,[Te.clientSecret?((0,s.uX)(),(0,s.Wv)(Ie,{key:0,class:"is-primary is-rounded",onClick:Se.retryPayment},{default:(0,s.k6)(()=>
1[(0,s.eW)((0,n.v_)(e.$t("Try again")),1)]),_:1},8,["onClick"])):(0,s.Q3)("",!0),(0,s.bF)(Ie,{class:"is-rounded",onClick:Se.handleClose},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("cancel")),1)]),_:1},8,["onClick"])])])):(0,s.Q3)("",!0)]),_:1})]),"payment"===Te.step?((0,s.uX)(),(0,s.CE)("footer",_e,[(0,s.Lk)("p",Ee,[(0,s.bF)(Me,{icon:"fa-light fa-shield-check"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Payment secured by"))+" ",1),t[8]||(t[8]=(0,s.Lk)("strong",null,"Orgo",-1)),t[9]||(t[9]=(0,s.eW)(" & ",-1)),t[10]||(t[10]=(0,s.Lk)("strong",null,"Stripe",-1))]),(0,s.Lk)("div",$e,[(0,s.bF)(Ie,{class:"is-rounded",disabled:Te.isPaymentProcessing,onClick:Se.handleClose},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("cancel")),1)]),_:1},8,["disabled","onClick"]),(0,s.bF)(Ie,{class:"is-primary is-rounded fee-pay-btn",loading:Te.isPaymentProcessing,disabled:Te.isPaymentProcessing||!Te.isPaymentElementReady||!Te.isPaymentElementComplete,onClick:Se.confirmPayment},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(Se.payButtonLabel),1)]),_:1},8,["loading","disabled","onClick"])])])):(0,s.Q3)("",!0)],512))])}i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(18237),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var Te=i(40834),Se=i(95256),Ae=i(81458),Pe=i(31666),Ie={name:"StripeFeePayModal",components:{PaymentLoadingAnimation:Pe.A},props:{payload:{type:Object,required:!0},endpoint:{type:String,default:"/connected/stripe-payment-intent-fee"},checkoutEndpoint:{type:String,default:"/connected/stripe-checkout-fee"},copyLink:{type:Boolean,default:!1},title:{type:String,default:""},amount:{type:[Number,String],default:null},currency:{type:String,default:""},isSubscription:{type:Boolean,default:!1},periodLabel:{type:String,default:""},membershipName:{type:String,default:""},settled:{type:Boolean,default:!1},returnUrl:{type:String,default:""},donationOptions:{type:Object,default:null},chooseAmount:{type:Object,default:null},vatRate:{type:[Number,String],default:null},vatExempt:{type:Boolean,default:!1},registrationFee:{type:[Number,String],default:0},registrationFeeVatRate:{type:[Number,String],default:null},registrationFeeVatExempt:{type:Boolean,default:!1}},emits:["loading","paid","close"],data(){return{isLoading:!1,step:"loading",stripe:null,stripeElements:null,stripePaymentElement:null,clientSecret:null,paymentIntentId:null,isPaymentElementReady:!1,isPaymentElementComplete:!1,isPaymentProcessing:!1,paymentErrorMessage:null,selectedDonationPriceIds:[],customDonationAmount:null,chosenAmount:null,isOtherAmount:!1}},computed:{...(0,Te.L8)(["tenant"]),breakdown(){return(0,Ae.OR)({tenant:this.tenant,amount:this.effectiveMembershipAmount,vatRate:this.vatRate,vatExempt:this.vatExempt,registrationFee:this.registrationFee,registrationFeeVatRate:this.registrationFeeVatRate,registrationFeeVatExempt:this.registrationFeeVatExempt,donation:this.donationAmount})},hasDonationStep(){return!this.copyLink&&!!this.donationOptions&&((this.donationOptions.tiers||[]).length>0||!!this.donationOptions.allowCustom)},hasAmountStep(){return!this.copyLink&&!!this.chooseAmount},chosenAmountPeriods(){const e=parseInt(this.chooseAmount?.periods);return Number.isFinite(e)&&e>0?e:1},amountMin(){const e=parseFloat(this.chooseAmount?.min);return Number.isFinite(e)?Math.max(1,Math.ceil(e)):1},amountMax(){const e=parseFloat(this.chooseAmount?.max);return Number.isFinite(e)&&e>0?Math.floor(e):null},suggestedAmounts(){const e=Array.isArray(this.chooseAmount?.suggestedAmounts)?this.chooseAmount.suggestedAmounts:[],t=e.map(e=>parseFloat(e)).filter(e=>Number.isInteger(e)&&e>=this.amountMin&&(null===this.amountMax||e<=this.amountMax));return[...new Set(t)].sort((e,t)=>e-t)},chosenAmountError(){if(!this.hasAmountStep)return null;const e=parseFloat(this.chosenAmount);return!Number.isFinite(e)||e<=0?this.$t("Please enter a valid amount"):Number.isInteger(e)?e<this.amountMin?this.$t("Minimum amount")+": "+this.formatMoney(this.amountMin):null!==this.amountMax&&e>this.amountMax?this.$t("Maximum amount")+": "+this.formatMoney(this.amountMax):null:this.$t("Please enter a whole amount")},baseAmount(){return this.breakdown.net},effectiveMembershipAmount(){if(this.hasAmountStep){const e=parseFloat(this.chosenAmount);return Number.isFinite(e)&&e>0?e*this.chosenAmountPeriods:0}const e=parseFloat(this.amount);return Number.isFinite(e)?e:0},donationAmount(){const e=this.donationOptions?.tiers||[],t=this.selectedDonationPriceIds.reduce((t,i)=>{const s=e.find(e=>e.id===i);return t+(s?Number(s.amount):0)},0),i=parseFloat(this.customDonationAmount);return t+(Number.isFinite(i)&&i>0?i:0)}
1,vatAmount(){return this.breakdown.vat},grossAmount(){return this.breakdown.gross},vatLabel(){const e=parseFloat(this.vatRate);return this.$t("VAT")+(Number.isFinite(e)&&e>0?" ("+(0,Ae.nU)(e)+"%)":"")},registrationFeeAmount(){return this.breakdown.registration},registrationFeeVat(){return this.breakdown.registrationVat},registrationFeeVatLabel(){const e=parseFloat(this.registrationFeeVatRate);return this.$t("VAT")+(Number.isFinite(e)&&e>0?" ("+(0,Ae.nU)(e)+"%)":"")},donationTotal(){return this.breakdown.total},membershipDisplay(){const e=this.formatMoney(this.baseAmount);return this.isSubscription&&this.periodLabel?e+"/"+this.periodLabel:e},membershipLabel(){return this.membershipName||this.$t("Membership")},donationBreakdown(){const e=this.donationOptions?.tiers||[],t=this.selectedDonationPriceIds.map(t=>e.find(e=>e.id===t)).filter(Boolean).map(e=>({label:e.name||this.$t("Donation"),amount:Number(e.amount)})),i=parseFloat(this.customDonationAmount);return Number.isFinite(i)&&i>0&&t.push({label:this.$t("Other amount"),amount:i}),t},isCustomDonation(){return parseFloat(this.customDonationAmount)>0},moneyCurrency(){return this.donationOptions?.currency||this.currency||this.tenant.currency},donationCurrencySymbol(){return(0,Se.S1)(this.moneyCurrency)},effectivePayload(){let e=this.payload;if(this.hasAmountStep){const t=parseFloat(this.chosenAmount);if(e={...e,customPriceValue:t},e.fees&&"object"===typeof e.fees){const i={};Object.keys(e.fees).forEach(e=>{i[e]=t}),e={...e,fees:i}}}if(this.donationAmount>0){const t=parseFloat(this.customDonationAmount);return{...e,donationPriceIds:[...this.selectedDonationPriceIds],donationAmount:Number.isFinite(t)&&t>0?t:0}}return e},displayAmount(){return null!==this.amount&&""!==this.amount?this.amount:null},displayCurrency(){return this.currency||this.tenant.currency},payButtonLabel(){if(null===this.displayAmount)return this.$t("Pay");const e=this.donationTotal;let t=this.$t("Pay")+" "+this.$filters.money(e,this.displayCurrency);return this.isSubscription&&this.periodLabel&&0===this.donationAmount&&0===this.registrationFeeAmount&&(t+="/"+this.periodLabel),t},successMessage(){return this.isSubscription?this.$t("Your membership subscription is now active."):this.$t("Your membership fee payment has been received.")}},watch:{settled(e){e&&"processing"===this.step&&(this.step="success")}},created(){if(this.chooseAmount&&this.seedChosenAmount(),!this.tenant.stripeAccount)return this.$buefy.toast.open({message:this.$t("youNeedToActivateYourStripeAccount")}),void this.$router.replace({name:"TenantSettingsPayments"});this.copyLink?this.createStripeCheckoutSession():this.initInlinePayment()},mounted(){this.copyLink||this.$nextTick(()=>{this.$refs.panel?.scrollIntoView({behavior:"smooth",block:"center"})})},methods:{createStripeCheckoutSession(){this.$emit("loading",!0),this.isLoading=!0;const e={...this.payload};delete e.inline,this.$http.plain.post(this.checkoutEndpoint,e).then(e=>{try{(0,Se.lW)(e.data.url),this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-info",duration:3e3,actionText:null})}catch(t){console.log(t)}}).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1,this.$emit("loading",!1),this.$emit("close")})},initInlinePayment(){this.step="loading",this.$emit("loading",!0),this.loadStripeScript().then(()=>{this.$emit("loading",!1),this.hasAmountStep?this.step="amount":this.hasDonationStep?this.step="donation":this.proceedToPayment()}).catch(e=>{console.log(e),this.paymentErrorMessage=e.message||this.$t("Failed to initialize payment"),this.step="error",this.$emit("loading",!1)})},proceedToPayment(){this.step="loading",this.$emit("loading",!0),this.createPaymentIntent().then(e=>{e||this.setupStripeElements()}).catch(e=>{console.log(e),this.paymentErrorMessage=e.message||this.$t("Failed to initialize payment"),this.step="error"}).finally(()=>{this.$emit("loading",!1)})},toggleDonationTier(e){const t=this.selectedDonationPriceIds.indexOf(e.id);-1===t?this.selectedDonationPriceIds.push(e.id):this.selectedDonationPriceIds.splice(t,1)},focusCustomDonation(){this.$refs.customDonationInput?.focus()},continueToPayment(){this.proceedToPayment()},continueFromAmount(){this.chosenAmountError||(this.hasDonationStep?this.step="donation":this.proceedToPayment())}
1,seedChosenAmount(){const e=parseFloat(this.chooseAmount?.suggested),t=Math.round(e),i=Number.isFinite(e)&&t>=this.amountMin&&(null===this.amountMax||t<=this.amountMax);return this.suggestedAmounts.length?i?(this.isOtherAmount=!this.suggestedAmounts.includes(t),void(this.chosenAmount=t)):(this.isOtherAmount=!1,void(this.chosenAmount=this.suggestedAmounts[0])):(this.isOtherAmount=!1,void(this.chosenAmount=i?t:this.amountMin))},isSuggestedAmountSelected(e){return!this.isOtherAmount&&parseFloat(this.chosenAmount)===e},pickSuggestedAmount(e){this.isOtherAmount=!1,this.chosenAmount=e},pickOtherAmount(){this.isOtherAmount=!0,this.$nextTick(()=>{this.$refs.chosenAmountInput?.focus(),this.$refs.chosenAmountInput?.select()})},formatMoney(e){return this.$filters.money(e,this.moneyCurrency)},loadStripeScript(){return new Promise((e,t)=>{if(window.Stripe)return void e();const i=document.createElement("script");i.src="https://js.stripe.com/v3/",i.async=!0,i.onload=e,i.onerror=()=>t(new Error(this.$t("Failed to load payment system"))),document.head.appendChild(i)})},createPaymentIntent(){return new Promise((e,t)=>{this.$http.plain.post(this.endpoint,this.effectivePayload).then(i=>{const s=i.data||{};if(s.requiresRedirect&&s.url)return location.href=s.url,void e(!0);s.clientSecret?(this.clientSecret=s.clientSecret,this.paymentIntentId=s.paymentIntentId||null,this.stripe=window.Stripe(s.publishableKey,{stripeAccount:s.stripeAccount}),e(!1)):t(new Error(s.error||this.$t("Failed to initialize payment")))}).catch(e=>{console.log(e);const i=e.response?.data?.error||e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Failed to initialize payment");t(new Error(i))})})},setupStripeElements(){const e=this.$i18n?.locale||"en";this.stripeElements=this.stripe.elements({clientSecret:this.clientSecret,locale:e,appearance:{theme:"stripe",variables:{borderRadius:"8px",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}}}),this.stripePaymentElement=this.stripeElements.create("payment",{layout:"tabs",wallets:{applePay:"auto",googlePay:"auto"}}),this.stripePaymentElement.on("ready",()=>{this.isPaymentElementReady=!0}),this.stripePaymentElement.on("change",e=>{this.isPaymentElementComplete=e.complete}),this.stripePaymentElement.on("loaderror",e=>{this.paymentErrorMessage=e?.error?.message||this.$t("Failed to load payment form"),this.step="error"}),this.step="payment",this.mountPaymentElement(0)},mountPaymentElement(e){this.$nextTick(()=>{const t=document.getElementById("fee-payment-element");t?this.stripePaymentElement.mount("#fee-payment-element"):e<40?setTimeout(()=>this.mountPaymentElement(e+1),50):(this.paymentErrorMessage=this.$t("Failed to load payment form"),this.step="error")})},confirmPayment(){!this.isPaymentProcessing&&this.isPaymentElementReady&&this.isPaymentElementComplete&&(this.isPaymentProcessing=!0,this.paymentErrorMessage=null,this.stripe.confirmPayment({elements:this.stripeElements,confirmParams:{return_url:this.returnUrl||window.location.href},redirect:"if_required"}).then(e=>{e.error?this.handlePaymentError(e.error):this.handlePaymentSuccess(e)}).catch(e=>{console.log(e),this.handlePaymentError(e)}))},handlePaymentSuccess(e){const t=e.paymentIntent?.status;"succeeded"===t||"processing"===t?(this.isPaymentProcessing=!1,this.step="processing",this.$emit("paid")):"requires_payment_method"===t?this.handlePaymentError({message:this.$t("Payment failed. Please try a different payment method.")}):this.handlePaymentError({message:this.$t("Unexpected payment status")+": "+t})},handlePaymentError(e){this.isPaymentProcessing=!1,this.paymentErrorMessage=e.message||this.$t("Payment failed")},retryPayment(){this.paymentErrorMessage=null,this.destroyStripePaymentElement(),this.stripe&&this.clientSecret?this.setupStripeElements():this.initInlinePayment()},destroyStripePaymentElement(){try{this.stripePaymentElement?.destroy()}catch(e){console.log(e)}this.stripeElements=null,this.stripePaymentElement=null,this.isPaymentElementReady=!1,this.isPaymentElementComplete=!1,this.isPaymentProcessing=!1},handleClose(){this.$emit("close")}}},Me=i(66262);const xe=(0,Me.A)(Ie,[["render",Fe],["__scopeId","data-v-1f24bd5d"]]);var Ne=xe},37440:function(e,t,i){"use strict";i.d(t,{f:function(){return a}
1,r:function(){return n}});i(18111),i(7588),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const s=new Set;function a(e){return s.add(e),()=>s.delete(e)}function n(e){s.forEach(t=>{t!==e&&t()})}},37557:function(e,t,i){"use strict";i.d(t,{A:function(){return A}});var s=i(20641),a=i(90033),n=i(53751);const o={autocomplete:"off"},l=["data-active"],r={key:0,class:"search-hint"},d={key:1,class:"search-hint"},c={key:0},u={key:0,class:"is-flex is-align-items-center"},m={class:"is-flex-grow-1 search-result-text"},p={key:0,class:"ml-1"},h={key:1,class:"is-flex is-align-items-center"},g={class:"is-flex-grow-1 search-result-text"},f={key:2,class:"is-flex is-align-items-center"},b={class:"is-flex-grow-1 search-result-text"},y={key:1},v={key:2},k={class:"pagination-wrapper",style:{display:"flex","align-items":"center","justify-content":"center","max-width":"400px"}};function C(e,t,i,C,L,w){const _=(0,s.g2)("LogoThumbnail"),E=(0,s.g2)("b-tag"),$=(0,s.g2)("b-pagination"),F=(0,s.g2)("b-autocomplete"),T=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.Lk)("form",o,[(0,s.bF)(T,{label:i.label},{default:(0,s.k6)(()=>[(0,s.bF)(F,{ref:"searchbox",modelValue:L.searchText,"onUpdate:modelValue":t[6]||(t[6]=e=>L.searchText=e),class:(0,a.C4)(["searchbox",{searchfocus:w.isFocused,"is-fullwidth":i.isFullwidth}]),"dropdown-position":"bottom",rounded:"",data:L.data,placeholder:e.$t(i.placeholder?i.placeholder:"search"),loading:L.isFetching,icon:"fa-magnifying-glass",autocomplete:"off",clearable:"","open-on-focus":!i.onlyMembersAndContacts,"keep-open":L.keepDropdownOpen,onKeyup:w.getAsyncData,onFocus:w.onSearchFocus,onBlur:w.onSearchBlur,onSelect:w.change},(0,s.eX)({default:(0,s.k6)(t=>["users_contacts"===L.searchType?((0,s.uX)(),(0,s.CE)("div",c,["User"===t.option.entityType?((0,s.uX)(),(0,s.CE)("span",u,[(0,s.bF)(_,{item:t.option,"is-type":"roundXSmall",class:"mr-2"},null,8,["item"]),(0,s.Lk)("span",m,[(0,s.eW)((0,a.v_)(t.option.firstName)+" "+(0,a.v_)(t.option.lastName)+" ",1),"ACTIVE"!==t.option.status?((0,s.uX)(),(0,s.CE)("span",p," ("+(0,a.v_)(e.$t(t.option.status.toLowerCase()))+") ",1)):(0,s.Q3)("",!0)]),(0,s.bF)(E,{rounded:"",size:"is-small",class:"ml-2"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("member")),1)]),_:1})])):"Company"===t.option.entityType?((0,s.uX)(),(0,s.CE)("span",h,[(0,s.bF)(_,{item:{...t.option,"@type":"Company"},"is-type":"roundXSmall",class:"mr-2"},null,8,["item"]),(0,s.Lk)("span",g,(0,a.v_)(t.option.name),1),(0,s.bF)(E,{rounded:"",size:"is-small",type:"is-info",class:"ml-2"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Company")),1)]),_:1})])):((0,s.uX)(),(0,s.CE)("span",f,[(0,s.bF)(_,{item:{...t.option,"@type":"contact"},"is-type":"roundXSmall",class:"mr-2"},null,8,["item"]),(0,s.Lk)("span",b,(0,a.v_)(t.option.name||t.option.fullName),1),(0,s.bF)(E,{rounded:"",size:"is-small",type:"is-warning",class:"ml-2"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Contact")),1)]),_:1})]))])):(0,s.Q3)("",!0),"discussions"===L.searchType?((0,s.uX)(),(0,s.CE)("div",y,(0,a.v_)(t.option.title),1)):(0,s.Q3)("",!0),"events"===L.searchType?((0,s.uX)(),(0,s.CE)("div",v,(0,a.v_)(t.option.name),1)):(0,s.Q3)("",!0)]),footer:(0,s.k6)(()=>["users_contacts"===L.searchType&&L.totalPages>1&&L.data.length>0?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"p-3",onMousedown:t[4]||(t[4]=(0,n.D$)(()=>{},["prevent"])),onClick:t[5]||(t[5]=(0,n.D$)(()=>{},["stop"]))},[(0,s.Lk)("div",k,[(0,s.bF)($,{modelValue:L.currentPage,"onUpdate:modelValue":t[3]||(t[3]=e=>L.currentPage=e),total:L.totalItems,"per-page":L.itemsPerPage,simple:!0,order:"is-centered",size:"is-small",rounded:!0,onChange:w.handlePageChange},null,8,["modelValue","total","per-page","onChange"])])],32)):(0,s.Q3)("",!0)]),_:2},[i.onlyMembersAndContacts?void 0:{name:"header",fn:(0,s.k6)(()=>[(0,s.Lk)("div",{ref:"searchTabs",class:"search-tabs","data-active":L.searchType,style:(0,a.Tr)(w.tabStyles)},[(0,s.Lk)("a",{ref:"tabUsersContacts",class:(0,a.C4)(["button is-rounded is-small",{"is-active":"users_contacts"===L.searchType,"is-default":"users_contacts"!==L.searchType}]),onClick:t[0]||(t[0]=e=>w.changeSearchType("users_contacts"))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("members"))+" & "+(0,a.v_)(e.$t("Contacts")),1)],2),e.tenant?.settingFeatures?.discussions?.isActive&&!i.onlyMembersAndContacts?((0,s.uX)(),(0,s.CE)("a",{key:0,ref:"tabDiscussions",class:(0,a.C4)(["button is-rounded is-small",{"is-active":"discussions"===L.searchType,"is-default":"discussions"!==L.searchType}]),onClick:t[1]||(t[1]=e=>w.changeSearchType("discussions"))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("discussions")),1)],2)):(0,s.Q3)("",!0),e.tenant?.settingFeatures?.events?.isActive&&!i.onlyMembersAndContacts?((0,s.uX)(),(0,s.CE)("a",{key:1,ref:"tabEvents",class:(0,a.C4)(["button is-rounded is-small",{"is-active":"events"===L.searchType,"is-default":"events"!==L.searchType}]),onClick:t[2]||(t[2]=e=>w.changeSearchType("events"))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("events")),1)],2)):(0,s.Q3)("",!0)],12,l),w.hasSearchableQuery?w.showsNoResults?((0,s.uX)(),(0,s.CE)("p",d,(0,a.v_)(e.$t("No results")),1)):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",r,(0,a.v_)(w.searchHint),1))]),key:"0"}]),1032,["modelValue","class","data","placeholder","loading","open-on-focus","keep-open","onKeyup","onFocus","onBlur","onSelect"])]),_:1},8,["label"])])])}i(44114);var L=i(38221),w=i.n(L),_=i(40834),E=i(31823);const $={users_contacts:"Type name, email...",discussions:"Type topic",events:"Type event name"};var F={components:{LogoThumbnail:E.A},props:["text","label","placeholder","onlyMembersAndContacts","doNotRedirect","includeCompanies","isFullwidth"],emits:["update:modelValue","active-change"],data(){return{searchText:this.text?this.text:null,data:[],isFetching:!1,searchType:"users_contacts",currentPage:1,totalItems:0,totalPages:0,itemsPerPage:15,keepDropdownOpen:!1,searchedText:null,isSearchInputFocused:!1,searchBlurTimeout:null,tabMeasurements:{},measurementsReady:!1}},computed:{...(0,_.L8)(["tenant","user","isGranted"]),isFocused(){return this.searchText&&this.searchText.length>0},searchHint(){return this.$t($[this.searchType]||"search")},minSearchLength(){return this.canSearchByIdOrEmail&&this.isIdSearch&&"users_contacts"===this.searchType?1:3},hasSearchableQuery(){return(this.searchText||"").length>=this.minSearchLength},showsNoResults(){return!this.data.length&&!this.isFetching&&this.hasSearchableQuery&&this.searchedText===this.searchText},canSearchByIdOrEmail(){return this.isGranted("HR_LOCAL")||this.isGranted("HR_TENANT")},isIdSearch(){return this.searchText&&/^\d+$/.test(this.searchText)},visibleTabCount(){let e=1;return this.tenant?.settingFeatures?.discussions?.isActive&&!this.onlyMembersAndContacts&&e++,this.tenant?.settingFeatures?.events?.isActive&&!this.onlyMembersAndContacts&&e++,e},tabStyles(){const e=this.tabMeasurements[this.searchType],t=this.measurementsReady?"1":"0";if(e&&e.width>0)return{"--tab-width":`${e.width}px`,"--tab-height":`${e.height}px`,"--tab-offset":`${e.offset}px`,"--tab-opacity":t};const i={users_contacts:{width:150,height:32,offset:2},discussions:{width:100,height:32,offset:152},events:{width:80,height:32,offset:252}},s=i[this.searchType]||{width:100,height:32,offset:2};return{"--tab-width":`${s.width}px`,"--tab-height":`${s.height}px`,"--tab-offset":`${s.offset}px`,"--tab-opacity":t}}},watch:{"$i18n.locale"(){this.$nextTick(()=>{this.measureTabs()})},"tenant.settingFeatures"(){this.$nextTick(()=>{this.measureTabs()})}},mounted(){this.change(this.text),this.$nextTick(()=>{this.measureTabs()}),this.resizeHandler=()=>{this.$nextTick(()=>{this.measureTabs()})},window.addEventListener("resize",this.resizeHandler)},beforeUnmount(){this.resizeHandler&&window.removeEventListener("resize",this.resizeHandler),clearTimeout(this.searchBlurTimeout)},methods:{measureTabs(){setTimeout(()=>{const e={},t=this.$refs.searchTabs;if(!t)return;const i=window.getComputedStyle(t),s=parseFloat(i.paddingLeft)||2,a=this.$refs.tabUsersContacts;if(a){const i=a.getBoundingClientRect(),n=t.getBoundingClientRect(),o=i.width,l=i.height,r=i.left-n.left-s+2;o>0&&l>0&&(e.users_contacts={width:o,height:l,offset:r})}const n=this.$refs.tabDiscussions;
1if(n){const i=n.getBoundingClientRect(),a=t.getBoundingClientRect(),o=i.width,l=i.height,r=i.left-a.left-s+2;o>0&&l>0&&(e.discussions={width:o,height:l,offset:r})}const o=this.$refs.tabEvents;if(o){const i=o.getBoundingClientRect(),a=t.getBoundingClientRect(),n=i.width,l=i.height,r=i.left-a.left-s+2;n>0&&l>0&&(e.events={width:n,height:l,offset:r})}Object.keys(e).length>0&&(this.tabMeasurements=e,this.measurementsReady||this.$nextTick(()=>{this.measurementsReady=!0}))},100)},isCursorEnd(){const e=this.$refs.searchbox,t=e.selectionStart;return t===this.inputText.length},focusInput(){this.$el.querySelector("input")?.focus()},onSearchFocus(){this.isSearchInputFocused=!0,this.$emit("active-change",!0),this.$nextTick(()=>{this.measureTabs()})},onSearchBlur(){this.isSearchInputFocused=!1,clearTimeout(this.searchBlurTimeout),this.searchBlurTimeout=setTimeout(()=>{this.searchBlurTimeout=null,this.isSearchInputFocused||this.$emit("active-change",!1)},200)},getAsyncData:w()(function(e){if(!["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"].includes(e.key)){if("Enter"===e.key&&"users_contacts"!==this.searchType&&this.searchText&&this.searchText.length>2)"discussions"===this.searchType?this.$router.replace("/discuss?query="+this.searchText):"events"===this.searchType&&this.$router.replace("/events?query="+this.searchText);else if("Enter"===e.key&&"users_contacts"===this.searchType)return;if(this.searchText&&this.searchText.length<this.minSearchLength)return this.data=[],this.isFetching=!1,void(this.searchedText=null);this.isFetching=!0,this.data=[],this.currentPage=1,this.totalItems=0,this.totalPages=0,this.getItems()}},300),changeSearchType(e){this.searchType=e,this.resetAndSearch()},resetAndSearch(){this.currentPage=1,this.totalItems=0,this.totalPages=0,this.data=[],this.getItems()},getItems(e=null){if(this.searchText&&this.searchText.length<this.minSearchLength||""===this.searchText)return this.data=[],this.isFetching=!1,this.totalItems=0,this.totalPages=0,void(this.searchedText=null);const t=this.searchText,i=e||this.currentPage;let s="";"users_contacts"===this.searchType?(s=`/profiles/unified-search?page=${i}&itemsPerPage=${this.itemsPerPage}&search=`+encodeURIComponent(this.searchText),this.includeCompanies&&(s+="&includeCompanies=true")):"discussions"===this.searchType?s="/discussions?page=1&exists[isSupport]=false&exists[isIssue]=false&exists[isArchived]=false&&order[mainPost.dateCreated]=DESC&title="+this.searchText:"events"===this.searchType&&(s="/events?page=1&order[dateTimeBegin]=desc&name="+this.searchText),this.isFetching=!0,this.$http.plain.get(s).then(e=>{this.data=e.data["hydra:member"],"users_contacts"===this.searchType&&(this.totalItems=e.data["hydra:totalItems"]||0,this.totalPages=Math.ceil(this.totalItems/this.itemsPerPage),this.currentPage=i,this.keepDropdownOpen&&this.$refs.searchbox&&(this.$refs.searchbox.isActive=!0)),this.$nextTick(()=>{this.measureTabs()})}).catch(e=>{throw this.data=[],this.totalItems=0,this.totalPages=0,e}).finally(()=>{this.isFetching=!1,this.searchedText=t})},handlePageChange(e){this.keepDropdownOpen=!0,this.getItems(e),this.$nextTick(()=>{setTimeout(()=>{this.keepDropdownOpen=!1,this.$refs.searchbox&&(this.$refs.searchbox.isActive=!0)},100)})},change(e){if(this.doNotRedirect)return void this.$emit("update:modelValue",e);let t=e?e["id"]:null;this.$emit("update:modelValue",t),e&&("users_contacts"===this.searchType?"User"===e.entityType?this.$router.push("/user/"+e.id):this.$router.push("/contacts/show/"+e.id):"discussions"===this.searchType?this.$router.push("/discuss/"+e.id):"events"===this.searchType&&this.$router.push("/event/"+e.uuid))}}},T=i(66262);const S=(0,T.A)(F,[["render",C],["__scopeId","data-v-0a642f09"]]);var A=S},39004:function(e,t,i){"use strict";i.d(t,{A:function(){return R}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"vote-row-status-col"},l={key:0,class:"tag is-danger is-rounded is-small live-badge"},r={class:"icon is-small mr-1"},d={key:1,class:"tag is-info is-rounded is-small"},c={key:2,class:"tag is-success is-rounded is-small"},u={key:3,class:"tag is-warning is-rounded is-small"},m={key:4,class:"tag is-light is-rounded is-small"},p={key:5,class:"tag is-dark is-rounded is-small"},h={class:"vote-row-content"},g={class:"vote-row-header"},f={class:"vote-row-title"},b={key:0,class:"vote-row-description"},y={class:"vote-row-meta"},v={key:0,class:"meta-item"},k={key:1,class:"meta-item"},C={key:2,class:"meta-item"},L={key:3,class:"tag is-rounded is-info is-light is-small meta-tag"},w={class:"meta-item"},_={key:2,class:"meta-item has-text-grey"},E={class:"icon is-small"},$={key:1,class:"participation-display"},F={class:"participation-header"},T={class:"participation-label"},S={class:"participation-text"},A={class:"participation-numbers"},P={class:"participation-percent"},I={class:"participation-bar"};function M(e,t,i,M,x,N){const U=(0,s.g2)("font-awesome-icon"),D=(0,s.g2)("b-tooltip");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["card vote-row",{"is-clickable":i.clickable}]),onClick:t[2]||(t[2]=(...e)=>N.onClick&&N.onClick(...e))},[(0,s.Lk)("div",o,["live"===i.row.status?((0,s.uX)(),(0,s.CE)("span",l,[(0,s.Lk)("span",r,[(0,s.bF)(U,{icon:"fa-light fa-circle-dot"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Live")),1)])):"upcoming"===i.row.status?((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(e.$t("upcoming")),1)):"closed"===i.row.status?((0,s.uX)(),(0,s.CE)("span",c,(0,a.v_)(e.$t("Finished")),1)):"draft"===i.row.status?((0,s.uX)(),(0,s.CE)("span",u,(0,a.v_)(e.$t("Draft")),1)):((0,s.uX)(),(0,s.CE)("span",m,(0,a.v_)(e.$t("empty")),1)),i.row.isArchived?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(e.$t("Archived")),1)):(0,s.Q3)("",!0),(0,s.RG)(e.$slots,"tags-extra")]),t[5]||(t[5]=(0,s.Lk)("div",{class:"vote-row-separator"},null,-1)),(0,s.Lk)("div",h,[(0,s.Lk)("div",g,[(0,s.Lk)("span",f,(0,a.v_)(i.row.name),1)]),i.row.description?((0,s.uX)(),(0,s.CE)("p",b,(0,a.v_)(i.row.description),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",y,["live"===i.row.status&&i.row.dateEnd?((0,s.uX)(),(0,s.CE)("span",v,[(0,s.bF)(U,{icon:"fa-light fa-clock",class:"meta-icon"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Closes in"))+" "+(0,a.v_)(N.closeRelative)+" · "+(0,a.v_)(e.$filters.format(i.row.dateEnd,"shortDate")),1)])):"closed"===i.row.status&&i.row.dateEnd?((0,s.uX)(),(0,s.CE)("span",k,[(0,s.bF)(U,{icon:"fa-light fa-clock",class:"meta-icon"}),(0,s.eW)(" "+(0,a.v_)(e.$filters.format(i.row.dateEnd,"date")),1)])):i.row.dateStart?((0,s.uX)(),(0,s.CE)("span",C,[(0,s.bF)(U,{icon:"fa-light fa-calendar",class:"meta-icon"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Start"))+" "+(0,a.v_)(e.$filters.format(i.row.dateStart,"date")),1)])):(0,s.Q3)("",!0),i.row.questionsCount>1?((0,s.uX)(),(0,s.CE)("span",L,(0,a.v_)(i.row.questionsCount)+" "+(0,a.v_)(e.$t("questions")),1)):(0,s.Q3)("",!0),i.showVisibility?((0,s.uX)(),(0,s.CE)(s.FK,{key:4},[i.row.event?((0,s.uX)(),(0,s.Wv)(D,{key:0,label:i.row.event.name,active:(i.row.event.name||"").length>20,position:"is-bottom",type:"is-dark"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",{class:"meta-item has-text-link event-chip",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>N.onEventClick&&N.onEventClick(...e),["stop"]))},[(0,s.bF)(U,{icon:"fa-light fa-users",class:"meta-icon"}),(0,s.eW)(" "+(0,a.v_)(N.truncateAudienceName(i.row.event.name))+" ",1),i.row.totalEligible>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("· "+(0,a.v_)(i.row.totalEligible)+" "+(0,a.v_)(e.$t("eligible")),1)],64)):(0,s.Q3)("",!0)])]),_:1},8,["label","active"])):i.row.isGeneral?((0,s.uX)(),(0,s.Wv)(D,{key:1,label:i.row.unit?i.row.unit.name:e.tenant&&e.tenant.shortName||"",active:((i.row.unit?i.row.unit.name:e.tenant&&e.tenant.shortName)||"").length>20,position:"is-bottom",type:"is-dark"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",w,[(0,s.bF)(U,{icon:"fa-light fa-users",class:"meta-icon"}),(0,s.eW)(" "+(0,a.v_)(N.truncateAudienceName(i.row.unit?i.row.unit.name:e.tenant&&e.tenant.shortName))+" ",1),i.row.totalEligible>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("· "+(0,a.v_)(i.row.totalEligible)+" "+(0,a.v_)(e.$t("eligible")),1)],64)):(0,s.Q3)("",!0)])]),_:1},8,["label","active"])):((0,s.uX)(),(0,s.CE)("span",_,[(0,s.bF)(U,{icon:"fa-light fa-lock",class:"meta-icon"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Private"))+" ",1),i.row.totalEligible>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("· "+(0,a.v_)(i.row.totalEligible)+" "+(0,a.v_)(e.$t("eligible")),1)],64)):(0,s.Q3)("",!0)]))],64)):(0,s.Q3)("",!0),(0,s.RG)(e.$slots,"meta-extra")])]),(0,s.Lk)("div",{class:(0,a.C4)(["vote-row-stats",{"is-draft-action":N.showEditAction}])},[(0,s.RG)(e.$slots,"trailing",{},()=>
1[N.showEditAction?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"button is-info is-light is-rounded is-small continue-edit-btn",onClick:t[1]||(t[1]=(0,n.D$)((...e)=>N.onEdit&&N.onEdit(...e),["stop"]))},[(0,s.Lk)("span",E,[(0,s.bF)(U,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Continue editing")),1)])):((0,s.uX)(),(0,s.CE)("div",$,[(0,s.Lk)("div",F,[(0,s.Lk)("span",T,(0,a.v_)(e.$t("Participation")),1),(0,s.Lk)("span",S,[(0,s.Lk)("span",A,[(0,s.eW)((0,a.v_)(i.row.totalVoted)+" ",1),t[3]||(t[3]=(0,s.Lk)("span",{class:"participation-slash"},"/",-1)),(0,s.eW)(" "+(0,a.v_)(i.row.totalEligible),1)]),t[4]||(t[4]=(0,s.Lk)("span",{class:"participation-separator"},"·",-1)),(0,s.Lk)("span",P,(0,a.v_)(i.row.participationPercentage||0)+"%",1)])]),(0,s.Lk)("div",I,[(0,s.Lk)("div",{class:"participation-fill",style:(0,a.Tr)({width:(i.row.participationPercentage||0)+"%"})},null,4)])]))])],2)],2)}var x=i(40834),N=i(95093),U=i.n(N),D={name:"VoteCollectionCard",props:{row:{type:Object,required:!0},clickable:{type:Boolean,default:!0},showVisibility:{type:Boolean,default:!0}},emits:["click","event-click","edit"],computed:{...(0,x.L8)(["tenant"]),closeRelative(){return this.row.dateEnd?U().utc(this.row.dateEnd).local().fromNow(!0):null},showEditAction(){return"draft"===this.row.status&&this.row.isEditable}},methods:{truncateAudienceName(e){return e?e.length>20?e.slice(0,20)+"...":e:""},onClick(){this.clickable&&this.$emit("click",this.row)},onEventClick(){this.$emit("event-click",this.row.event)},onEdit(){this.$emit("edit",this.row)}}},X=i(66262);const V=(0,X.A)(D,[["render",M]]);var R=V},39128:function(e,t,i){"use strict";i(18111),i(61701);var s=i(53751),a=i(78048),n=i(95093),o=i.n(n),l=i(54481),r=i(22088),d=(i(99280),i(61273)),c=(i(34217),i(2321)),u=i(43464),m=i(5833);const p=()=>(0,l.xy)(u.M.state.tenant),h=()=>(0,l.Wq)("long",p()),g=()=>(0,l.Wq)("shortDate",p()),f=e=>(0,l.Wq)(e,p()),b=/^\d{4}-\d{2}-\d{2}(?:T00:00:00(?:\.000)?(?:Z|\+00:00))?$/,y=e=>"string"===typeof e&&b.test(e);var v={install(e){e.config.globalProperties.$filters={trans(e,t=!1){if(!e.translation)return e.name;let i=JSON.parse(e.translation);return i=i[c.Ay.global.locale.value],i=i.split("|"),i=t?i[1]:i[0],i||e.name},money(e,t=null,i={}){const s=u.M.state.tenant||{},a=t||s.currency,n=!t||String(t).toLowerCase()===String(s.currency||"").toLowerCase();return(0,m.u)(e,a,{symbol:n?s.currencySymbol:void 0,...i})},formatBytes(e,t=0){if(0===e)return"0 Bytes";const i=1024,s=t<0?0:t,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(i));return parseFloat((e/Math.pow(i,n)).toFixed(s))+" "+a[n]},format(e,t){const i=y(e)?o().utc(e):o().utc(e).local();return i.format(t?f(t):h())},datePattern(e){return f(e)},formatDateOnly(e,t){return o().utc(e).format(t?f(t):h())},formatDateCool(e,t=!1){let i=new Date,s=new Date(e);return e&&i.toDateString()===s.toDateString()?o().utc(e).local().format("HH:mm"):e&&i.getFullYear()===s.getFullYear()?o().utc(e).local().format(g()+" HH:mm"):o().utc(e).local().format(h()+(t?", HH:mm":""))},formatTime(e){return o().utc(e).local().format("HH:mm")},fromNow(e){return o().utc(e).local().fromNow()},dayOfMonth(e,t="default"){if(!e)return"";const i=new Date(e);return i.getDate()},monthShort(e,t="default"){if(!e)return"";const i=new Date(e);return i.toLocaleString(t,{month:"short"}).toUpperCase()},dayOfWeek(e,t="default"){if(!e)return"";const i=new Date(e),s=i.toLocaleDateString(t,{weekday:"long"});return s.charAt(0).toUpperCase()+s.slice(1)}}}},k=i(20641);function C(e,t,i,s,a,n){const o=(0,k.g2)("BootSplash"),l=(0,k.g2)("CookieConsent");return(0,k.uX)(),(0,k.CE)("div",null,[n.isBooting?((0,k.uX)(),(0,k.Wv)(o,{key:0})):((0,k.uX)(),(0,k.CE)(k.FK,{key:1},[((0,k.uX)(),(0,k.Wv)((0,k.$y)(n.layout),{"layout-size":n.layoutSize},null,8,["layout-size"])),n.isIframe?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(l,{key:0}))],64))])}i(44114),i(20116),i(13579),i(14603),i(47566),i(98721);var L=i(40834),w=i(28782),_=i(95256),E=i(90033);const $={class:"icon is-small"},F={key:1,href:"https://orgo.space/privacy",target:"_blank"};function T(e,t,i,s,a,n){const o=(0,k.g2)("font-awesome-icon"),l=(0,k.g2)("router-link"),r=(0,k.g2)("vue-cookie-accept-decline");return n.shouldShowCookieConsent?((0,k.uX)(),(0,k.Wv)(r,{key:0,ref:"myPanel1","element-id":"myPanel1",debug:!1,position:"bottom-left",type:"floating","disable-decline":!1,"transition-name":"slideFromBottom","show-postpone-button":!0,onClickedAccept:n.handleAccept},{postponeContent:(0,k.k6)(()=>[(0,k.Lk)("span",$,[(0,k.bF)(o,{icon:"fa-light fa-xmark"})])]),message:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("gdprMessage"))+" ",1),n.isWebsiteRoute?((0,k.uX)(),(0,k.Wv)(l,{key:0,to:{name:"WebsitePage",params:{slug:"privacy"}}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("gdprLink")),1)]),_:1})):((0,k.uX)(),(0,k.CE)("a",F,(0,E.v_)(e.$t("gdprLink")),1))]),acceptContent:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("gdprDismiss")),1)]),declineContent:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Reject optional")),1)]),_:1},8,["onClickedAccept"])):(0,k.Q3)("",!0)}var S=i(91982),A=i(55318),P={computed:{...(0,L.L8)(["tenant"]),cookieService(){return A.Ay},isEuTimezone(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return e&&e.startsWith("Europe/")}catch(e){return!0}},isWebsiteRoute(){return"website"===this.$route.meta?.layout},shouldShowCookieConsent(){return!this.$route.query.iframe&&(("undefined"===typeof navigator||!navigator.userAgent||!navigator.userAgent.includes("orgo-app"))&&(!!this.isEuTimezone&&(0,A.K9)()))}},methods:{handleAccept(){this.cookieService.execute()}},components:{VueCookieAcceptDecline:S.A}},I=i(66262);const M=(0,I.A)(P,[["render",T]]);var x=M;const N={class:"o-boot-splash"},U={key:0,class:"o-boot-spinner"};function D(e,t,i,s,a,n){return(0,k.uX)(),(0,k.CE)("div",N,[a.showSpinner?((0,k.uX)(),(0,k.CE)("div",U)):(0,k.Q3)("",!0)])}const X=400;var V={name:"BootSplash",data(){return{showSpinner:!1,spinnerTimer:null}},created(){this.spinnerTimer=setTimeout(()=>{this.showSpinner=!0},X)},beforeUnmount(){clearTimeout(this.spinnerTimer)}};const R=(0,I.A)(V,[["render",D],["__scopeId","data-v-ba4fa52a"]]);var O=R,Q=i(61486),B=i(59333),G=i(3095);function W({unitId:e,groups:t,localCenterId:i,openAccess:s,isGranted:a}){return!(!Array.isArray(t)||!t.some(t=>t.id===e))||(!!a("HR_TENANT")||(!!s||!(!i||!a("HR_LOCAL",i))))}var j=i(48108);function z({user:e,tenant:t,isGranted:i,isUserTypeEligibleForFee:s}
1){if(!e?.id||"contact"===e.kind)return!1;const a=t?.settingFeatures?.fees;if(!a?.isActive)return!1;const n=t?.settingFeatures?.company?.isActive&&a.companyFeeIsMandatory;return(!n||!e.hasCompany)&&(!!a.isMandatory&&(!i("HR_TENANT")&&!i("FINANCIAL_TENANT")&&(!!e.isExpiredValidFeeDate&&!!s(e))))}function q({user:e,tenant:t,isGranted:i}){return!(!e?.id||"contact"===e.kind)&&(!!t?.settingFeatures?.company?.isActive&&(!!t?.settingFeatures?.fees?.companyFeeIsMandatory&&(!(!e.hasCompany||!e.companyFeeStatus)&&(!e.type?.isNotEligibleForFee&&(!i("ADMIN_TENANT")&&!e.companyFeeStatus.isFeeActive)))))}function J(e){return z(e)||q(e)}const H="app",K=1e4;var Y={components:{CookieConsent:x,BootSplash:O},data(){return{unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,requiredContracts:!1,bootResolved:!1,bootWatchdog:null,bootPending:0}},computed:{...(0,L.L8)(["tenant","user","billing","isBillingFreePlan","isGranted","isPrivacyUnset","isGrantedAdhesion","checkMandatoryProfileFields","isNativeApp","userTypeEligibleForFee"]),isIframe(){let e=!1;try{e=window.self!==window.top}catch(t){e=!0}return e||!!this.$route.query.iframe},layoutSize(){return"simple"===this.$route.meta.layout?this.$route.meta.layoutSize?this.$route.meta.layoutSize:"small":null},isBooting(){return(0,B.RF)({bootResolved:this.bootResolved,routeMeta:this.$route.meta,user:this.user})},layout(){let e=this.$route.meta.layout||H;return"StartTenant"===this.$route.name||"StartDemoTenant"===this.$route.name||"start"===e?e="start":this.isIframe&&(e="iframe"),e+"-layout"},cookieService(){return A.Ay},themeContextKey(){return this.user?.id&&this.tenant?.settingFeatures?this.tenant.id+":"+this.user.id:null}},watch:{tenant:function(){this.cookieService.execute()},themeContextKey(e){e&&(0,G.dg)(this.user,this.tenant)},"$store.state.spaces":{handler(){this.$route.query.unit&&this.checkCurrentGroup()},deep:!0}},created(){this.bootWatchdog=setTimeout(()=>{this.isBooting?this.holdBootUntil(this.$router.replace({name:"Login"})):this.resolveBoot()},K);const e=window.location.hostname;if(e.endsWith(".orgo.space")){const e=document.createElement("meta");e.name="robots",e.content="noindex, nofollow",document.head.appendChild(e)}this.$router.isReady().then(()=>{if(this.$router.currentRoute.value.meta.noScroll&&document.getElementById("app")?.classList.add("noScrollApp"),this.$store.state.isMobileAppSidebarMenuOpen=!1,this.$store.state.isMobileSettingsSidebarOpen=!1,w.Ar)return this.$router.push({name:"Maintenance"});if(this.checkRouteAccess(this.$route),this.checkCurrentGroup(),this.checkMandatoryAdhesion({name:null}),this.checkOnboarding(),this.checkMandatoryCourse(),this.checkFeeMandatoryAndExpiredFeeDate(),this.checkCompanyFeeMandatory(),this.$router.beforeEach((e,t,i)=>{if(this.$store.state.isMobileAppSidebarMenuOpen=!1,this.$store.state.isMobileSettingsSidebarMenuOpen=!1,this.$store.state.prevRoute=t?t.name:null,this.$store.state.isLoadingButton=!1,this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.$store.state.sidebarCollapsed=!1,this.$store.state.error=null,this.$store.commit("resetEventSource"),this.checkRouteAccess(e),this.checkMandatoryAdhesion(e),this.checkOnboarding(e),this.checkMandatoryCourse(e),this.checkFeeMandatoryAndExpiredFeeDate(e),this.checkCompanyFeeMandatory(e),e.query.unit&&this.user?.id&&"contact"!==this.user.kind){const t=parseInt(e.query.unit),s=e.query.localCenter?parseInt(e.query.localCenter):null,a=this.$store.state.spaces[this.tenant?.slug]?.myGroups;if(!a||!Array.isArray(a))return void this.$http.plain.get("/my-groups").then(e=>{const a=e.data["hydra:member"],n=W({unitId:t,groups:a,localCenterId:s,openAccess:this.tenant?.settingFeatures?.localCenter?.openAccess,isGranted:this.isGranted});n?i():(this.$buefy.toast.open({message:this.$t("You do not have permission to access this group"),type:"is-danger",duration:5e3}),i({name:"Dashboard"}))}).catch(()=>{});const n=W({unitId:t,groups:a,localCenterId:s,openAccess:this.tenant?.settingFeatures?.localCenter?.openAccess,isGranted:this.isGranted});if(!n)return this.$buefy.toast.open({message:this.$t("You do not have permission to access this group"),type:"is-danger",duration:5e3}),i({name:"Dashboard"})}if(B._1.includes(e.name)&&this.tenant?.settingFeatures?.users?.customHomepage){const e=this.tenant.settingFeatures.users.customHomepage;if(e.startsWith("/")){const t=this.$router.resolve(e);if(t.matched.length&&!B._1.includes(t.name))return i({name:t.name,query:t.query})}else if(!B._1.includes(e)){const t=this.$router.resolve({name:e});if(t.matched.length)return i({name:e})}}i()}),u.M.commit("setENV",w.Km),this.$route.params.with)if("reset"===this.$route.params.with)this.$store.state.demoTenant.name=null;else{let e=this.$route.params.with.split("-");this.$store.state.demoTenant.name=e.join(""),this.$store.state.demoTenant.logo=this.$route.params.with+".png",this.$store.state.demoTenant.logoSquare=this.$route.params.with+"-square.png",this.$store.state.demoTenant.logoSquareDark=this.$route.params.with+"-square.png",this.$route.params.lang&&(this.$store.state.demoTenant.language=this.$route.params.lang)}if(this.checkWorkspace(),this.user&&this.user.id&&!this.$route.meta.anonymous&&"contact"!==this.user.kind){let e=this.$store.state.impersonatedAs?"/users/"+this.$store.state.impersonatedAs.id:"/me";this.$http.plain.get(e).then(e=>{if(e.data.notificationSettings?.resetImpersonationHeader)return e.data.notificationSettings.resetImpersonationHeader=!1,void this.$http.plain.patch(`/users/${e.data.id}`,{notificationSettings:e.data.notificationSettings}).then(()=>{u.M.state.impersonatedAs=null,u.M.state.impersonator=null,window.location.reload()}).catch(e=>console.log(e));u.M.commit("setCurrentUser",e.data),e.data.notificationSettings?.prefTheme&&u.M.commit("switchTheme",e.data.notificationSettings.prefTheme),(0,G.dg)(e.data,this.tenant),void 0!==u.M.state.spaces[this.tenant.slug]&&(u.M.state.spaces[this.tenant.slug].user=e.data),this.checkMandatoryCourse()}),this.$http.plain.get("/permission-impersonation/status").then(e=>{e.data.isImpersonating?u.M.commit("setPermissionImpersonation",{impersonatedPermissions:e.data.impersonatedPermissions,originalPermissions:e.data.originalPermissions,expiresAt:e.data.expiresAt,impersonatedUserType:e.data.impersonatedUserType||null}):u.M.commit("clearPermissionImpersonation")}
1).catch(e=>{console.error(e)}),this.initNotificationSubscription()}this.cookieService.execute()})},mounted(){this.user?.notificationSettings?.prefTheme?this.$store.commit("switchTheme",this.user.notificationSettings.prefTheme):this.$store.commit("switchTheme","light"),window.addEventListener("resize",this.syncOrientation,{passive:!0}),window.addEventListener("orientationchange",this.syncOrientation,{passive:!0}),this.syncOrientation()},beforeUnmount(){clearTimeout(this.bootWatchdog),window.removeEventListener("resize",this.syncOrientation),window.removeEventListener("orientationchange",this.syncOrientation)},methods:{syncOrientation(){this.$store.dispatch("syncOrientation")},resolveBoot(){clearTimeout(this.bootWatchdog),this.bootWatchdog=null,this.bootResolved=!0},holdBootUntil(e){return e?(this.bootPending+=1,Promise.resolve(e).catch(()=>{}).finally(()=>{this.bootPending-=1,0===this.bootPending&&this.resolveBoot()})):(0===this.bootPending&&this.resolveBoot(),Promise.resolve())},initNotificationSubscription(){this.user?.id&&this.tenant?.slug&&!1!==this.tenant.settingFeatures?.realtime?.isActive&&this.$http.plain.get("/mercure-token/notification_"+this.user.id).then(e=>{this.$store.commit("initNotificationEventSource",{userId:this.user.id,token:e.data.token,hubUrl:e.data.hubUrl,onNotification:e=>{this.$store.commit("incrementUnseenNotifications",this.tenant.slug),this.$buefy.toast.open({message:e.body||e.title||this.$t("New notification"),type:"is-info",duration:5e3,queue:!1})}})}).catch(e=>{console.error("Failed to initialize notification subscription:",e)})},openProfileFeeTab(){return this.tenant?.settingFeatures?.fees?.fixedStartingDateFee||"preper"===this.tenant?.slug?this.$router.push({name:"UserShowMyProfile",query:{tab:"fees"}}):this.$router.push({name:"UserShowMyProfile",query:{tab:"payments",subtab:"fees"}})},checkMandatoryAdhesion(e){if("contact"!==this.user?.kind&&!this.isEventAppRoute(e??this.$route))return this.user&&this.user.id&&this.tenant?.settingFeatures?.adhesion?.isMandatory&&(!this.user.adhesion||"success"!==this.user.adhesion.status)&&!this.isGranted("ADMIN_LOCAL")&&"AdhesionForm"!==e.name&&"Adhesion"!==e.name&&this.$store.getters.effectiveUserType?.id!==parseInt(this.tenant.settingFeatures.adhesion.successDefaultUserTypeId)&&this.isGrantedAdhesion(this.user)?this.$router.push({name:"Adhesion"}):void 0},checkOnboarding(e=null){if(!this.user||!this.user.id||"contact"===this.user.kind)return;if(this.isEventAppRoute(e??this.$route))return;const t=e??this.$route;if("Adhesion"!==t.name&&"Login"!==t.name&&"OnBoardingUser"!==t.name&&"DocumentPreview"!==t.name&&"DocumentPreviewUser"!==t.name&&"AdhesionForm"!==t.name){let e=this.checkMandatoryProfileFields();if(this.isPrivacyUnset||!this.user.notificationSettings||!this.user.notificationSettings.pNotificationRead||!this.user.notificationSettings.pTimezoneRead||!this.user.notificationSettings.pGroups||e.fields.length>0||e.customFields.length>0||this.user.hasUnsignedRequiredDocuments)return this.$router.push({name:"OnBoardingUser"})}},checkMandatoryCourse(e=null){if(!this.user||!this.user.id||"contact"===this.user.kind)return;if(this.isEventAppRoute(e??this.$route))return;if(!this.tenant?.settingFeatures?.courses?.isActive||!this.tenant?.settingFeatures?.courses?.hasEnforcingOnboarding)return;if(e&&("CourseEnforced"===e.name||"CourseLearn"===e.name||"CourseShow"===e.name||"Login"===e.name||"OnBoardingUser"===e.name||"Adhesion"===e.name||"AdhesionForm"===e.name||"DocumentPreview"===e.name||"DocumentPreviewUser"===e.name))return;if(this.isGranted("HR_TENANT"))return;if(this.hasOutstandingMandatoryFee())return;const t=this.user.incompleteMandatoryCourses;return t&&t.length>0?(this.$store.state.incompleteMandatoryCourses=t,this.$store.state.incompleteCourseId=t[0].id,1===t.length?this.$router.push({name:"CourseEnforced",params:{id:t[0].id}}):this.$router.push({name:"CourseEnforced",params:{id:""}})):void 0},checkFeeMandatoryAndExpiredFeeDate(e=null){this.isEventAppRoute(e??this.$route)||this.owesIndividualMandatoryFee()&&(!e||"UserShowMyProfile"!==e.name||"payments"!==e.query.tab&&"fees"!==e.query.tab)&&(e&&["UserProducts","ProductPay","OnBoardingUser","DocumentPreview","DocumentPreviewUser","PresidentDonatePage","DonatePage","PaymentThankYou","UserShowMyProfile"].includes(e.name)||this.openProfileFeeTab(
1))},checkCompanyFeeMandatory(e=null){if(this.isEventAppRoute(e??this.$route))return;if(!this.owesCompanyMandatoryFee())return;const t=["Login","Maintenance","OnBoardingUser","Adhesion","AdhesionForm","DocumentPreview","DocumentPreviewUser","MyCompany","MyCompanyUpdate","CompanyShow","CompanyUpdate","CompanyFeeRequired","CompanyFeePayment","PaymentThankYou"];if(e&&t.includes(e.name))return;const i=this.user.companyFeeStatus.role,s="PRIMARY_CONTACT"===i||"FINANCIAL_REP"===i;s?e&&"CompanyFeePayment"===e.name||this.$router.push({name:"CompanyFeePayment"}):e&&"CompanyFeeRequired"===e.name||this.$router.push({name:"CompanyFeeRequired"})},feeEnforcementContext(){return{user:this.user,tenant:this.tenant,isGranted:e=>this.isGranted(e),isUserTypeEligibleForFee:e=>this.userTypeEligibleForFee(e)}},owesIndividualMandatoryFee(){return z(this.feeEnforcementContext())},owesCompanyMandatoryFee(){return q(this.feeEnforcementContext())},hasOutstandingMandatoryFee(){return J(this.feeEnforcementContext())},checkCurrentGroup(){const e=this.$route.query.unit?parseInt(this.$route.query.unit):null;if(e){const t=this.$store.state.spaces[this.tenant?.slug]?.myGroups;if(!t||!Array.isArray(t))return;if(!this.$store.state.currentGroup||e!==this.$store.state.currentGroup.id){const i=t.find(t=>t.id===e),s=this.$route.query.localCenter?parseInt(this.$route.query.localCenter):null;if(!W({unitId:e,groups:t,localCenterId:s,openAccess:this.tenant?.settingFeatures?.localCenter?.openAccess,isGranted:this.isGranted}))return this.$buefy.toast.open({message:this.$t("You do not have permission to access this group"),type:"is-danger",duration:5e3}),void this.$router.push({name:"Dashboard"});this.$store.state.currentGroup=i}}},isEventAppRoute(e){const t=e?.name||"",i=e?.fullPath||e?.path||"";return t.startsWith("EventApp")||i.startsWith("/event-app/")},hasStoredContactHash(){try{if(sessionStorage.getItem("eventApp.contactHash"))return!0}catch(t){}const e=new URLSearchParams(window.location.search).get("h");return!(!e||!e.trim())},hasStoredEventAppOtpSession(){try{return!!sessionStorage.getItem("eventApp.tenantSlug")}catch(e){return!1}},checkRouteAccess(e){if(e.meta.anonymous)return!0;if(!this.user.id&&this.isEventAppRoute(e)&&(this.hasStoredContactHash()||this.hasStoredEventAppOtpSession()))return!0;if(!this.user.id&&"Dashboard"!==e.name){u.M.state.unauthorizedPage=e.fullPath;const t="admin.orgo.space"===window.location.hostname?"AdminLogin":"Login";return this.holdBootUntil(this.$router.push({name:t}))}if(this.user?.id&&"contact"===this.user.kind&&!this.isEventAppRoute(e))return this.$router.replace({name:"EventAppMyEvents"});const t=e.meta?.roles||(e.meta?.role?[e.meta.role]:[]);if(t.length){const i=t.some(e=>u.M.getters.isGranted(e))||e.meta.allowUnitAdmin&&(0,j.T)(this.user);if(!i){u.M.state.unauthorizedPage=e.fullPath;const t="admin.orgo.space"===window.location.hostname?"AdminLogin":"Login";return this.$router.push({name:t})}}return!this.tenant||this.isBillingFreePlan||this.billing.stripeSubscriptionId||"manual"===this.billing.subscriptionType||"BillingDue"===this.$route.name?null:this.isGranted("ADMIN_TENANT")?this.$router.push({name:"Billing"}):this.$router.push({name:"BillingDue"})},initTenant(e,t){let i=window.location.hostname;this.$store.state?.tenant?.appHost===i||["localhost","app.orgo.space"].includes(i)||(this.$store.commit("setTenant",null),delete this.$store.state.spaces[this.$store.state.tenant?.slug]);let s=null;return this.$http.plain.get("/tenants?"+t+"="+e).then(i=>{let a=[];if(i.data?.id?a.push(i.data):a=i.data["hydra:member"],a.length>0){let e=a[0];if(this.$store.state.demoTenant.name&&(e.name=this.$store.state.demoTenant.name,e.logo=this.$store.state.demoTenant.logo,e.logoSquare=this.$store.state.demoTenant.logoSquare,e.logoSquareDark=this.$store.state.demoTenant.logoSquareDark,e.language=this.$store.state.demoTenant.language),this.$store.state.tenant&&this.$store.state.tenant.id!==e.id)this.$store.state.tenant&&this.$store.state.tenant.id!==e.id&&(this.$store.commit("setTenant",e),window.document.title=e.shortName||e.name,this.loadLanguage(e.language));else{if(this.$store.commit("setTenant",e),window.document.title=e.shortName||e.name,this.loadLanguage(e.language),!this.user.id&&[...B._1,"Workspace"].includes(this.$route.name))s=this.$router.replace((0,B.IP)(e,window.location.hostname));else if(this.user.id&&(B._1.includes(this.$route.name)||"/"===this.$route.path)&&e.settingFeatures?.users?.customHomepage){const t=e.settingFeatures.users.customHomepage;if(t.startsWith("/")){const e=this.$router.resolve(t);e.matched.length&&!B._1.includes(e.name)&&this.$router.replace({name:e.name,query:e.query})}else if(!B._1.includes(t)){const e=this.$router.resolve({name:t});e.matched.length&&this.$router.replace({name:t})}}this.user.id&&"contact"!==this.user.kind&&this.$http.plain.get("/my-groups").then(e=>{this.$store.commit("setTenantGroups",{slug:this.tenant.slug,groups:e.data["hydra:member"]})}).catch(()=>{}),void 0===this.$store.state.spaces[e.slug]&&(this.$store.state.spaces[e.slug]={}),this.$store.state.spaces[e.slug].tenant=e}}else this.tenant||("slug"===t&&this.$store.state.spaces[e]&&delete this.$store.state.spaces[e],s=this.$router.push({name:"Login"}));return this.holdBootUntil(s)}).catch(()=>
1{if(this.isBooting)return this.holdBootUntil(this.$router.replace({name:"Login"}));this.resolveBoot()})},loadLanguage(e){const t=Object.keys(_.eo);e||(e="en"),this.user&&this.user.id&&this.user.language&&(e=this.user.language),!this.tenant?.settingFeatures?.language?.isActive&&this.tenant?.language&&this.tenant.language!==e&&(e=this.tenant.language),this.$route.query.lang&&t.includes(this.$route.query.lang)&&(e=this.$route.query.lang),t.includes(e)||(e="en"),(0,c.J4)(e)},checkWorkspace(){let e=window.location.hostname;const t=(0,Q.zk)(e);if(t)return this.initTenant(t,"slug"),void this.initTenantRefreshInterval();if("admin.orgo.space"===e){const e=["AdminLogin","ForgotPassword","ResetPassword"],t=[...e,"Stats","StatsPlatformUsage","TenantList"];return this.user?.id||e.includes(this.$route.name)?(t.includes(this.$route.name)||this.$router.push({name:"StatsPlatformUsage"}),void this.holdBootUntil(null)):(u.M.state.unauthorizedPage=this.$route.fullPath,void this.holdBootUntil(this.$router.push({name:"AdminLogin"})))}if(["app.orgo.space","stage.orgo.space","test.orgo.space","localhost"].includes(e)||e.includes("ngrok")){let e=this.$route.query.workspace;e?(this.initTenant(e,"slug"),this.initTenantRefreshInterval()):u.M.state.tenant?(this.initTenant(u.M.state.tenant.slug,"slug"),this.initTenantRefreshInterval()):this.isEventAppRoute(this.$route)&&(this.hasStoredContactHash()||this.hasStoredEventAppOtpSession())||this.$route.meta.anonymous||["StartTenant","StartDemoTenant","WorkspaceEmpty","Workspace","DonatePage","PresidentDonatePage","ProductPay","PublicDocumentPreview","ConfirmEmailChange","PaymentInvoiceCheckoutRedirect","PaymentMembershipCheckoutRedirect","AdminLogin"].includes(this.$route.name)?this.holdBootUntil(null):this.holdBootUntil(this.$router.push({name:"Login"}))}else if("prod"===w.Km){const t=this.$route.query.exchange_token;if(t)return void this.$http.plain.post("/api/v1/auth/redeem-exchange-token",{exchangeToken:t}).then(()=>{const e=new URL(window.location.href);e.searchParams.delete("exchange_token"),window.location.href=e.toString()}).catch(()=>{this.initTenant(e,"appHost"),this.initTenantRefreshInterval()});this.initTenant(e,"appHost"),this.initTenantRefreshInterval()}else this.holdBootUntil(null)},initTenantRefreshInterval(){this.$store.state.tenantIntervalCheck&&clearInterval(this.$store.state.tenantIntervalCheck)}}};const Z=(0,I.A)(Y,[["render",C]]);var ee=Z,te=i(59772),ie=i(258),se=i.n(ie),ae=i(94335),ne=i(84743),oe=i.n(ne);let le=w.QU+w.H$,re={};const de="EVENT_APP_BEARER_",ce="BEARER_eventapp_",ue=()=>navigator.userAgent.includes("orgo-app"),me=["/login-check","/verify-mfa-otp","/verify-login-otp","/event-app/verify-otp","/event-app/login-otp"],pe=e=>ue()&&e?localStorage.getItem(e):null,he=(e,t)=>{ue()&&e&&t&&localStorage.setItem(e,t)},ge=()=>{if(ue())try{const e=[];for(let t=0;t<localStorage.length;t++){const i=localStorage.key(t);i&&i.startsWith(de)&&e.push(i.substring(de.length))}e.forEach(e=>{const t=ce+e;if(localStorage.getItem(t))return;const i=localStorage.getItem(de+e);i&&localStorage.setItem(t,i)})}catch(e){}};ge();const fe=ae.A.create({baseURL:le,withCredentials:!0,headers:{...re,"Content-Type":"application/json",Accept:"application/ld+json"}});fe.interceptors.request.use(e=>{"get"!==e.method&&(u.M.state.isLoadingButton=!0),"get"===e.method&&u.M.state.tenant&&!("X-Tenant-ID"in e.headers)&&(e.headers={...e.headers,"X-Tenant-ID":u.M.state.tenant?.id}),"patch"===e.method&&(e.headers["Content-Type"]="application/merge-patch+json");let t=oe().tz.guess();t&&(e.headers={...e.headers,"user-timezone":t});let i=new URLSearchParams(window.location.search).get("workspace");(u.M.state.tenant||i)&&("User-Tenant"in e.headers||(e.headers={...e.headers,"User-Tenant":i||u.M.state.tenant.slug})),u.M.state.impersonatedAs&&("X-Logged-In-As"in e.headers||(e.headers={...e.headers,"X-Logged-In-As":u.M.state.impersonatedAs.username}));let s=!1,a=null;try{const t=u.M.state.currentUser||{},i=!!t.id&&"contact"!==t.kind,n="contact"===t.kind,o=u.M.state.tenant?.slug||null,l=new URLSearchParams(window.location.search),r=l.get("w")||l.get("workspace");a=r||sessionStorage.getItem("eventApp.tenantSlug"),!a&&n&&o&&(a=o),s=!!a&&(!i||a!==o),s&&!("X-Event-App-Tenant"in e.headers)&&(e.headers={...e.headers,"X-Event-App-Tenant":a})}catch(n){}if(ue()&&!("Authorization"in e.headers)){let t=null;s&&a?t=pe(ce+a)||pe(de+a):u.M.state.tenant&&(t=pe("BEARER_"+u.M.state.tenant.slug)),t&&(e.headers={...e.headers,Authorization:"Bearer "+t})}try{const t=u.M.state.currentUser||{},i="contact"===t.kind,s=!!t.id&&!i,a=sessionStorage.getItem("eventApp.contactHash"),n=(!s||i)&&!!a;n&&!("X-Contact-Hash"in e.headers)&&(e.headers={...e.headers,"X-Contact-Hash":a})}catch(n){}return e}),fe.interceptors.response.use(e=>{if(u.M.state.isLoadingButton=!1,ue()&&e.data?.nativeTokens)for(const[t,i]of Object.entries(e.data.nativeTokens))he("BEARER_"+t,i);if(ue()&&e.data?.eventAppNativeTokens)for(const[t,i]of Object.entries(e.data.eventAppNativeTokens))he(ce+t,i),he(de+t,i);return e},e=>{if(u.M.state.isLoadingButton=!1,e.response&&e.response.config&&401===e.response.status&&!te.A.currentRoute?._value?.meta?.anonymous&&!location.href.includes("login")){if(!(e.response.request.responseURL.includes("unseen-notifications")||e.response.request.responseURL.includes("push-token-add")||e.response.request.responseURL.includes("group-notification-counts")))return ue()&&u.M.state.tenant&&(localStorage.removeItem("BEARER_"+u.M.state.tenant.slug),localStorage.removeItem(ce+u.M.state.tenant.slug),localStorage.removeItem(de+u.M.state.tenant.slug)),u.M.commit("unsetCurrentUser"),u.M.state.unauthorizedPage=te.A.currentRoute.fullPath,te.A.push({name:"Login"});u.M.state.notificationChecker=null}else{if(e.response&&401===e.response.status&&te.A.currentRoute?._value?.meta?.anonymous){const t=e.config?.url||e.response.config?.url||"";return me.some(e=>t.includes(e))||"Oauth"===te.A.currentRoute?._value?.name?Promise.reject(e):"EventAppMyEvents"===te.A.currentRoute?._value?.name?(u.M.state.user&&u.M.state.user.id&&u.M.commit("unsetCurrentUser"),u.M.state.unauthorizedPage=te.A.currentRoute._value.fullPath,te.A.push({name:"Login"})):(u.M.state.user&&u.M.state.user.id&&u.M.commit("unsetCurrentUser"),Promise.resolve())}(e.response&&[400,403,413,422].includes(e.response.status)||e.response&&[500,502,503,504].includes(e.response.status))&&u.M.commit("setError",e)}return Promise.reject(e)});const be={install(e){e.config.globalProperties.$http={plain:fe}}},ye={class:"add-ws"},ve={width:"0",height:"0",style:{position:"absolute"}},ke={key:0,class:"o-workspaces is-hidden-touch"},Ce={class:"b-tooltips o-ws-vert"},Le=["onClick"],we=["aria-label"],_e={key:1,class:"o-badge"},Ee={class:"icon is-small"},$e={key:1,class:"o-wrap"},Fe={key:0,class:"pl-5 pr-5 pt-3 pb-3 is-flex is-align-items-center fs-14"},Te={class:"icon has-text-danger mr-2"},Se={class:"has-text-danger"},Ae={key:1,class:"permission-impersonation-banner pl-5 pr-5 pt-3 pb-3 is-flex is-align-items-center is-flex-wrap-wrap fs-14"},Pe={class:"icon has-text-warning mr-2"},Ie={class:"has-text-warning-dark mr-2"},Me={class:"is-size-7 mr-2"},xe={class:"has-text-warning-dark is-clickable"},Ne={key:0,class:"tag is-warning is-light is-rounded mr-2"},Ue=["loading"];function De(e,t,i,a,n,o){const l=(0,k.g2)("LogoThumbnail"),r=(0,k.g2)("font-awesome-icon"),d=(0,k.g2)("b-tooltip"),c=(0,k.g2)("InstallAppBanner"),u=(0,k.g2)("AppHeader"),m=(0,k.g2)("b-loading"),p=(0,k.g2)("AppSidebar"),h=(0,k.g2)("SettingsMenuTenant"),g=(0,k.g2)("AppSidebarMenu"),f=(0,k.g2)("router-view"),b=(0,k.g2)("AppTabNavbar"),y=(0,k.g2)("NotificationSidebar"),v=(0,k.g2)("ThemeSidebar"),C=(0,k.g2)("AdminSearchModal"),L=(0,k.g2)("IntercomMessenger");return(0,k.uX)(),(0,k.CE)("section",ye,[((0,k.uX)(),(0,k.CE)("svg",ve,[...t[8]||(t[8]=[(0,k.Lk)("defs",null,[(0,k.Lk)("linearGradient",{id:"orgo-sparkles-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%"},[(0,k.Lk)("stop",{offset:"0%","stop-color":"#f97316"}),(0,k.Lk)("stop",{offset:"50%","stop-color":"#ec4899"}),(0,k.Lk)("stop",{offset:"100%","stop-color":"#a855f7"})])],-1)])])),o.hasWorkspaces?((0,k.uX)(),(0,k.CE)("div",ke,[(0,k.Lk)("ul",Ce,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(Object.entries(e.$store.state.spaces),([t,i])=>((0,k.uX)(),(0,k.CE)("li",{key:t,class:(0,E.C4)({"o-has-badge":e.$store.state.spaces[t].unseenNotificationsCount>0,"active-tenant":e.tenant?.slug===t,"o-ws-contact":"contact"===i.eventAppKind}),onClick:e=>o.switchTenant(t)},[(0,k.bF)(d,{label:i.tenant.name+("contact"===i.eventAppKind?" · "+e.$t("Attendee"):""),position:"is-right",type:"is-dark"},{default:(0,k.k6)(()=>[(0,k.bF)(l,{item:e.$store.state.spaces[t].tenant,"is-type":"roundSmall"},null,8,["item"]),"contact"===i.eventAppKind?((0,k.uX)(),(0,k.CE)("span",{key:0,class:"o-ws-contact-marker","aria-label":e.$t("Attendee")},[(0,k.bF)(r,{icon:"fa-light fa-user-tag"})],8,we)):(0,k.Q3)("",!0),e.$store.state.spaces[t].unseenNotificationsCount>0?((0,k.uX)(),(0,k.CE)("span",_e,(0,E.v_)(e.$store.state.spaces[t].unseenNotificationsCount),1)):(0,k.Q3)("",!0)]),_:2},1032,["label"])],10,Le))),128))]),(0,k.Lk)("button",{class:"button is-text","aria-haspopup":"true","aria-controls":"ws-menu",onClick:t[0]||(t[0]=t=>e.$router.push({name:"StartTenant"}))},[(0,k.Lk)("span",Ee,[(0,k.bF)(r,{icon:"fa-light fa-plus","aria-hidden":"true"})])])])):(0,k.Q3)("",!0),e.tenant?((0,k.uX)(),(0,k.CE)("div",$e,[e.$store.state.impersonatedAs&&e.$store.state.impersonator?((0,k.uX)(),(0,k.CE)("div",Fe,[(0,k.Lk)("span",Te,[(0,k.bF)(r,{icon:"fa-light fa-user-shield"})]),(0,k.Lk)("span",Se,"Impersonated as "+(0,E.v_)(e.$store.state.impersonatedAs.fullName),1),(0,k.Lk)("button",{class:"button is-rounded is-small is-danger ml-2",onClick:t[1]||(t[1]=e=>o.exitImpersonate())}," Exit â ")])):(0,k.Q3)("",!0),e.$store.state.permissionImpersonation.isActive?((0,k.uX)(),(0,k.CE)("div",Ae,[(0,k.Lk)("span",Pe,[(0,k.bF)(r,{icon:"fa-light fa-user-shield"})]),(0,k.Lk)("span",Ie,(0,E.v_)(e.$t("Permission Impersonation Active"))+":",1),(0,k.Lk)("span",Me,[(0,k.eW)((0,E.v_)(o.displayedImpersonatedPermissions)+" ",1),o.remainingImpersonatedPermissions.length>0?((0,k.uX)(),(0,k.Wv)(d,{key:0,label:o.remainingImpersonatedPermissions.join(", "),type:"is-dark",position:"is-bottom",multilined:""},{default:(0,k.k6)(()=>[(0,k.Lk)("span",xe,"+"+(0,E.v_)(o.remainingImpersonatedPermissions.length),1)]),_:1},8,["label"])):(0,k.Q3)("",!0)]),e.$store.state.permissionImpersonation.impersonatedUserType?((0,k.uX)(),(0,k.CE)("span",Ne,[(0,k.bF)(r,{icon:"fa-light fa-id-badge",class:"mr-1"}),(0,k.eW)(" "+(0,E.v_)(e.$store.state.permissionImpersonation.impersonatedUserType.name),1)])):(0,k.Q3)("",!0),(0,k.Lk)("button",{class:"button is-rounded is-small is-warning ml-2",loading:n.isExitingPermissionImpersonation,onClick:t[2]||(t[2]=e=>o.exitPermissionImpersonation())},(0,E.v_)(e.$t("Exit"))+" â ",9,Ue)])):(0,k.Q3)("",!0),(0,k.bF)(c),"OnBoardingUser"===e.$route.name||e.$store.state.isIframe||e.$route.query.onboarding||e.$route.meta.hideMobileHeaderNavbar&&(e.$isMobile()||e.isPortrait)?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(u,{key:2,onToggleNotifications:t[3]||(t[3]=e=>n.showNotificationSidebar=!0)})),(0,k.Lk)("div",{class:(0,E.C4)(["o-page",o.tenantSettings?"admin-container":""])},[(0,k.bF)(m,{modelValue:e.$store.state.isLoadingGeneral,"onUpdate:modelValue":t[4]||(t[4]=t=>e.$store.state.isLoadingGeneral=t),"is-full-page":!1}
1,null,8,["modelValue"]),e.$isMobile()||e.isPortrait||o.tenantSettings?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(p,{key:0})),o.tenantSettings&&!o.hideSettingsSidebar?((0,k.uX)(),(0,k.Wv)(h,{key:1,onOpenSearch:o.openAdminSearch},null,8,["onOpenSearch"])):(0,k.Q3)("",!0),(e.$isMobile()||e.isPortrait)&&e.$store.state.isMobileAppSidebarMenuOpen?((0,k.uX)(),(0,k.Wv)(g,{key:2,onSwitchTenant:o.switchTenant},null,8,["onSwitchTenant"])):(0,k.Q3)("",!0),(0,k.bo)((0,k.Lk)("div",{id:"oMain",class:(0,E.C4)(["o-main nice-scrollbar",e.$route.name])},[(0,k.Lk)("div",{class:(0,E.C4)(["o-content",{"admin-content":o.tenantSettings}])},[((0,k.uX)(),(0,k.Wv)(f,{key:o.routeKey}))],2)],2),[[s.aG,!(e.$store.state.isMobileAppSidebarMenuOpen&&(e.$isMobile()||e.isPortrait))]])],2),!e.$isMobile()&&!e.isPortrait||e.$store.state.hideMobileNavbarTabs||e.$store.state.isMobileAppSidebarMenuOpen||e.$route.meta.hideMobileFooterNavbar?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(b,{key:3,"is-hidden":n.isTabNavbarHidden},null,8,["is-hidden"]))])):(0,k.Q3)("",!0),(0,k.bF)(y,{"is-open":n.showNotificationSidebar,onClose:t[5]||(t[5]=e=>n.showNotificationSidebar=!1)},null,8,["is-open"]),(0,k.bF)(v,{"is-open":e.$store.state.themeSidebarOpen,onClose:t[6]||(t[6]=t=>e.$store.commit("closeThemeSidebar"))},null,8,["is-open"]),o.tenantSettings?((0,k.uX)(),(0,k.Wv)(C,{key:2,modelValue:n.showAdminSearch,"onUpdate:modelValue":t[7]||(t[7]=e=>n.showAdminSearch=e)},null,8,["modelValue"])):(0,k.Q3)("",!0),o.showIntercomMessenger?((0,k.uX)(),(0,k.Wv)(L,{key:3})):(0,k.Q3)("",!0)])}var Xe=i(43797);const Ve={class:"sidebar-scrollable nice-scrollbar"},Re={key:0,class:"sidebar-mobile-toggle"},Oe={key:"community"},Qe={class:"level mb-0 is-mobile is-gapless sidebar-section-header"},Be={key:0,class:"level-left sidebar-section"},Ge={class:"level-right"},We={key:0,class:"level-item"},je={class:"icon is-small"},ze={class:"icon is-small"},qe={class:"icon is-small"},Je={key:1,class:"level-item"},He={class:"icon is-small"},Ke={class:"icon is-small"},Ye={class:"icon is-small"},Ze={class:"mx-4 mb-4 mt-2"},et={class:"mx-4 mb-4 mt-2"},tt=["onClick"],it={class:"logo-thumbnail o-userimg-xs"},st={class:"icon is-small"},at={key:0,class:"sidebar-emoji"},nt=["onMouseenter","onClick"],ot={class:"icon is-small sidebar-mode-link-icon"},lt={key:0,class:"sidebar-emoji-icon"},rt={class:"sidebar-mode-link-label"},dt={key:0,class:"icon is-small sidebar-mode-link-chevron"},ct=["onClick"],ut={class:"logo-thumbnail o-userimg-xs"},mt={class:"icon is-small"},pt={key:0,class:"sidebar-emoji-icon"},ht={class:"flyout-mobile-children"},gt=["onClick"],ft={class:"logo-thumbnail o-userimg-xs"},bt={class:"icon is-small"},yt={key:0,class:"sidebar-emoji-icon"},vt={key:3},kt=["onClick"],Ct={class:"logo-thumbnail o-userimg-xs"},Lt={class:"icon is-small"},wt={key:0,class:"sidebar-emoji-icon"},_t={class:"submenu-wrap"},Et=["onClick"],$t={class:"logo-thumbnail o-userimg-xs"},Ft={class:"icon is-small"},Tt={key:0,class:"sidebar-emoji-icon"},St=["onClick"],At={class:"logo-thumbnail o-userimg-xs"},Pt={class:"icon is-small"},It={key:0,class:"sidebar-emoji-icon"},Mt={key:0,class:"active-vote-indicator"},xt={key:1,class:"tag is-danger is-small is-rounded ml-2"},Nt={key:2,class:"ai-sidebar-badge"},Ut={key:0,href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer",class:"sidebar-powered-by"},Dt={class:"level mb-0 is-mobile is-gapless sidebar-section-header"},Xt={key:0,class:"level-left sidebar-section"},Vt={class:"level-right"},Rt={key:0,class:"level-item"},Ot={class:"icon is-small"},Qt={class:"icon is-small"},Bt={class:"icon is-small"},Gt={key:1,class:"level-item"},Wt={class:"icon is-small"},jt={class:"icon is-small"},zt={class:"icon is-small"},qt={class:"mx-4 mb-4 mt-2"},Jt={class:"mx-4 mb-4 mt-2"},Ht=["onClick"],Kt={class:"logo-thumbnail o-userimg-xs"},Yt={class:"icon is-small"},Zt={key:0,class:"sidebar-emoji"},ei=["onMouseenter","onClick"],ti={class:"icon is-small sidebar-mode-link-icon"},ii={key:0,class:"sidebar-emoji-icon"},si={class:"sidebar-mode-link-label"},ai={key:0,class:"icon is-small sidebar-mode-link-chevron"},ni=["onClick"],oi={class:"logo-thumbnail o-userimg-xs"},li={class:"icon is-small"},ri={key:0,class:"sidebar-emoji-icon"},di={class:"flyout-mobile-children"},ci=["onClick"],ui={class:"logo-thumbnail o-userimg-xs"},mi={class:"icon is-small"},pi={key:0,class:"sidebar-emoji-icon"},hi={key:3},gi=["onClick"],fi={class:"logo-thumbnail o-userimg-xs"},bi={class:"icon is-small"},yi={key:0,class:"sidebar-emoji-icon"},vi={class:"submenu-wrap"},ki=["onClick"],Ci={class:"logo-thumbnail o-userimg-xs"},Li={class:"icon is-small"},wi={key:0,class:"sidebar-emoji-icon"},_i=["onClick"],Ei={class:"logo-thumbnail o-userimg-xs"},$i={class:"icon is-small"}
1,Fi={key:0,class:"sidebar-emoji-icon"},Ti={key:0,class:"active-vote-indicator"},Si={key:1,class:"tag is-danger is-small is-rounded ml-2"},Ai={key:2,class:"ai-sidebar-badge"},Pi={class:"level mb-0 is-mobile is-gapless sidebar-section-header"},Ii={class:"level-left sidebar-section"},Mi={class:"level-right"},xi={class:"level-item"},Ni={class:"icon is-small"},Ui=["onClick"],Di={key:0,class:"tag is-danger is-small is-rounded ml-2"},Xi={key:0,href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer",class:"sidebar-powered-by"},Vi={key:0,class:"sidebar-sticky-footer"},Ri={class:"icon is-small sidebar-mode-link-icon"},Oi={class:"sidebar-mode-link-label"},Qi={class:"icon is-small sidebar-mode-link-chevron"},Bi={class:"icon is-small sidebar-mode-link-icon"},Gi={class:"sidebar-mode-link-label"},Wi={class:"icon is-small sidebar-mode-link-chevron"},ji={class:"icon is-small sidebar-mode-link-icon"},zi={class:"sidebar-mode-link-label"},qi={class:"icon is-small sidebar-mode-link-chevron"},Ji=["onClick"],Hi={class:"icon is-small"},Ki={key:0,class:"sidebar-emoji-icon"};function Yi(e,t,i,a,n,o){const l=(0,k.g2)("AppSidebarMenuItem"),r=(0,k.g2)("font-awesome-icon"),d=(0,k.g2)("b-tooltip"),c=(0,k.g2)("b-input"),u=(0,k.g2)("LogoThumbnail"),m=(0,k.g2)("AppSidebarUserMenu");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)(["o-allcard",{"sidebar-collapsed":i.isCollapsed}])},[(0,k.Lk)("div",Ve,[o.isCrmMode||!e.$isMobile()&&!e.isPortrait?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",Re,[(0,k.Lk)("button",{class:(0,E.C4)(["sidebar-mobile-toggle-btn",{"is-active":"community"===o.sidebarMode}]),onClick:t[0]||(t[0]=t=>e.$store.commit("setSidebarMode","community"))},(0,E.v_)(e.$t("Community")),3),o.hasAdminAccess?((0,k.uX)(),(0,k.CE)("button",{key:0,class:(0,E.C4)(["sidebar-mobile-toggle-btn",{"is-active":"community"!==o.sidebarMode}]),onClick:t[1]||(t[1]=t=>e.$store.commit("setSidebarMode","administration"))},(0,E.v_)(o.isLocalAdminMode?o.chapterAdministrationLabel:o.administrationLabel),3)):(0,k.Q3)("",!0)])),e.isGranted("ADMIN_TENANT")&&e.tenant.onboarding&&!e.tenant.onboarding.isComplete?((0,k.uX)(),(0,k.Wv)(l,{key:"home_onboarding",item:null,"is-collapsed":i.isCollapsed,home:"onboarding"},null,8,["is-collapsed"])):(0,k.Q3)("",!0),e.isGranted("ADMIN_TENANT")&&e.tenant.onboarding&&!e.tenant.onboarding.isComplete?((0,k.uX)(),(0,k.CE)("hr",{key:2,class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed}])},null,2)):(0,k.Q3)("",!0),(0,k.bF)(s.eB,{name:e.$isMobile()||e.isPortrait?"":"sidebar-slide"},{default:(0,k.k6)(()=>[n.menuCategories&&"community"===o.sidebarMode?((0,k.uX)(),(0,k.CE)("section",Oe,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.communityCategories,(a,u)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:a.id||`cat_${u}`},[o.isCategoryVisible(a)&&!o.isMobileHiddenCategory(a)?((0,k.uX)(),(0,k.CE)(k.FK,{key:0},[o.shouldShowCategoryHeader(a)&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)(k.FK,{key:0},[(0,k.Lk)("div",Qe,["main"!==a.id?((0,k.uX)(),(0,k.CE)("div",Be,(0,E.v_)(o.getCategoryLabel(a)),1)):(0,k.Q3)("",!0),(0,k.Lk)("div",Ge,["groups"===a.id?((0,k.uX)(),(0,k.CE)("div",We,[(0,k.bF)(d,{label:e.$t("Group list"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[2]||(t[2]=t=>e.$router.push({name:"GroupBrowse"}))},[(0,k.Lk)("span",je,[(0,k.bF)(r,{icon:"fa-light fa-user-group"})])])]),_:1},8,["label"]),(0,k.bF)(d,{label:e.$t("Search group"),position:"is-left"},{default:(0,k.k6)(()=>[o.isCategoryExpanded(a)&&(o.getCategoryItems(a)?.length>2&&!n.filterText||n.filterText)?((0,k.uX)(),(0,k.CE)("button",{key:0,class:"button is-small is-white is-rounded",onClick:t[3]||(t[3]=(...e)=>o.openSearchGroup&&o.openSearchGroup(...e))},[(0,k.Lk)("span",ze,[(0,k.bF)(r,{icon:"fa-light fa-search"})])])):(0,k.Q3)("",!0)]),_:2},1032,["label"]),(0,k.bF)(d,{label:e.$t("Create group"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.bo)((0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[4]||(t[4]=(...e)=>o.openCreateGroup&&o.openCreateGroup(...e))},[(0,k.Lk)("span",qe,[(0,k.bF)(r,{icon:"fa-light fa-plus"})])],512),[[s.aG,o.hasNewGroupButton]])]),_:1},8,["label"])])):(0,k.Q3)("",!0),"projects"===a.id?((0,k.uX)(),(0,k.CE)("div",Je,[(0,k.bF)(d,{label:e.$t("All projects"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[5]||(t[5]=t=>e.$router.push({name:"ProjectList"}))},[(0,k.Lk)("span",He,[(0,k.bF)(r,{icon:"fa-light fa-diagram-project"})])])]),_:1},8,["label"]),(0,k.bF)(d,{label:e.$t("Search project"),position:"is-left"},{default:(0,k.k6)(()=>[o.isCategoryExpanded(a)&&(o.getCategoryItems(a)?.length>2&&!n.projectFilterText||n.projectFilterText)?((0,k.uX)(),(0,k.CE)("button",{key:0,class:"button is-small is-white is-rounded",onClick:t[6]||(t[6]=(...e)=>o.openSearchProject&&o.openSearchProject(...e))},[(0,k.Lk)("span",Ke,[(0,k.bF)(r,{icon:"fa-light fa-search"})])])):(0,k.Q3)("",!0)]),_:2},1032,["label"]),(0,k.bF)(d,{label:e.$t("Create project"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.bo)((0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[7]||(t[7]=t=>e.$router.push({name:"ProjectCreate"}))},[(0,k.Lk)("span",Ye,[(0,k.bF)(r,{icon:"fa-light fa-plus"})])],512),[[s.aG,o.hasNewProjectButton]])]),_:1},8,["label"])])):(0,k.Q3)("",!0)])]),(0,k.bo)((0,k.Lk)("div",Ze,[(0,k.bF)(c,{ref_for:!0,ref:"groupSearchInput",modelValue:n.filterText,"onUpdate:modelValue":t[8]||(t[8]=e=>n.filterText=e),size:"is-small",icon:"fa-search",clearable:"",data:o.getCategoryItems(a),placeholder:e.$t("Search group.."),rounded:""},null,8,["modelValue","data","placeholder"])],512),[[s.aG,"groups"===a.id&&o.getCategoryItems(a)&&n.showGroupsSearch]]),(0,k.bo)((0,k.Lk)("div",et,[(0,k.bF)(c,{ref_for:!0,ref:"projectSearchInput",modelValue:n.projectFilterText,"onUpdate:modelValue":t[9]||(t[9]=e=>n.projectFilterText=e),size:"is-small",icon:"fa-search",clearable:"",placeholder:e.$t("Search project.."),rounded:""},null,8,["modelValue","placeholder"])],512),[[s.aG,"projects"===a.id&&o.getCategoryItems(a)&&n.showProjectsSearch]])],64)):(0,k.Q3)("",!0),(0,k.bo)((0,k.Lk)("div",{class:(0,E.C4)({"hide-when-collapsed":"groups"===a.id||"dynamic_group_category"===a.type})},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.getFilteredCategoryItems(a),(c,u)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:`${a.id}_item_${u}`},[o.isItemVisible(c)?((0,k.uX)(),(0,k.CE)(k.FK,{key:0},[o.isGroupItem(c)?((0,k.uX)(),(0,k.Wv)(l,{key:`group_${a.id}_${u}`,item:o.getGroupObject(c),"is-collapsed":i.isCollapsed},null,8,["item","is-collapsed"])):o.isProjectItem(c)?((0,k.uX)(),(0,k.Wv)(d,{key:1,label:c.name,position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":o.isProjectActive(c)}]),onClick:e=>o.navigateToProject(c)},[(0,k.Lk)("div",it,[(0,k.Lk)("span",st,[c.icon&&o.isEmoji(c.icon)?((0,k.uX)(),(0,k.CE)("span",at,(0,E.v_)(c.icon),1)):((0,k.uX)(),(0,k.CE)("span",{key:1,class:"sidebar-bullet",style:(0,E.Tr)({backgroundColor:o.resolveProjectColor(c.color)})},null,4))])]),(0,k.Lk)("h3",null,(0,E.v_)(c.name),1)],10,tt)]),_:2},1032,["label","active"])):o.isFlyoutItem(c)?((0,k.uX)(),(0,k.CE)("div",{key:2,ref_for:!0,ref:"flyoutTrigger_"+a.id+"_"+u},[e.$isMobile()||e.isPortrait?((0,k.uX)(),(0,k.CE)(k.FK,{key:1},[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":o.isFlyoutChildActive(c)}]),onClick:e=>o.handleFlyoutClick(c)},[(0,k.Lk)("div",ut,[(0,k.Lk)("span",mt,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",pt,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(c)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(c)),1)],10,ct),(0,k.Lk)("div",ht,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.getVisibleFlyoutChildren(c),(e,t)=>((0,k.uX)(),(0,k.CE)("article",{key:`flyout_child_${u}_${t}`,class:(0,E.C4)(["o-groupcard",o.getItemClasses(e)]),onClick:t=>
1o.handleItemClick(e)},[(0,k.Lk)("div",ft,[(0,k.Lk)("span",bt,[o.isEmoji(o.getItemIcon(e))?((0,k.uX)(),(0,k.CE)("span",yt,(0,E.v_)(o.getItemIcon(e)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(e)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(e)),1)],10,gt))),128))])],64)):((0,k.uX)(),(0,k.CE)("div",{key:0,class:(0,E.C4)(["sidebar-mode-link sidebar-flyout-trigger",{"groupcard-active":o.isFlyoutChildActive(c),"is-active-flyout":n.activeFlyout===c.label}]),onMouseenter:t=>o.openFlyout(c,e.$refs["flyoutTrigger_"+a.id+"_"+u]?.[0]||e.$refs["flyoutTrigger_"+a.id+"_"+u]),onMouseleave:t[10]||(t[10]=e=>o.scheduleCloseFlyout()),onClick:e=>o.handleFlyoutClick(c)},[(0,k.Lk)("span",ot,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",lt,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,icon:o.getItemIcon(c)},null,8,["icon"]))]),(0,k.Lk)("span",rt,(0,E.v_)(o.getItemLabel(c)),1),i.isCollapsed?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("span",dt,[(0,k.bF)(r,{icon:"fa-light fa-chevron-right"})]))],42,nt))],512)):c.children&&c.children.length?((0,k.uX)(),(0,k.CE)("div",vt,[(0,k.bF)(d,{label:o.getItemLabel(c),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",o.getItemClasses(c)]),onClick:e=>o.toggleItemExpanded(c)},[(0,k.Lk)("div",Ct,[(0,k.Lk)("span",Lt,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",wt,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(c)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(c)),1),i.isCollapsed?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("span",{key:0,class:(0,E.C4)(["icon is-small ml-auto item-chevron",{rotated:o.isItemExpanded(c)}])},[(0,k.bF)(r,{icon:"fa-light fa-chevron-down"})],2))],10,kt)]),_:2},1032,["label","active"]),(0,k.bo)((0,k.Lk)("div",_t,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(c.children,(e,t)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:`child_${u}_${t}`},[!1!==e.isActive?((0,k.uX)(),(0,k.Wv)(d,{key:0,label:o.getItemLabel(e),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard o-groupcard-child",o.getItemClasses(e)]),onClick:t=>o.handleItemClick(e)},[(0,k.Lk)("div",$t,[(0,k.Lk)("span",Ft,[o.isEmoji(o.getItemIcon(e))?((0,k.uX)(),(0,k.CE)("span",Tt,(0,E.v_)(o.getItemIcon(e)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(e)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(e)),1)],10,Et)]),_:2},1032,["label","active"])):(0,k.Q3)("",!0)],64))),128))],512),[[s.aG,o.isItemExpanded(c)&&!i.isCollapsed]])])):((0,k.uX)(),(0,k.Wv)(d,{key:4,label:o.getItemLabel(c),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",o.getItemClasses(c)]),onClick:e=>o.handleItemClick(c)},[(0,k.Lk)("div",At,[(0,k.Lk)("span",Pt,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",It,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(c)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,[(0,k.eW)((0,E.v_)(o.getItemLabel(c))+" ",1),"Voting"===c.route&&n.hasActiveVotes?((0,k.uX)(),(0,k.CE)("span",Mt)):(0,k.Q3)("",!0),"ContactRequestList"===c.route&&n.contactUnreadCount>0&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)("span",xt,(0,E.v_)(n.contactUnreadCount>99?"99+":n.contactUnreadCount),1)):(0,k.Q3)("",!0),c.isAiBadge&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)("span",Nt,(0,E.v_)(e.$t("Beta")),1)):(0,k.Q3)("",!0)])],10,St)]),_:2},1032,["label","active"]))],64)):(0,k.Q3)("",!0)],64))),128))],2),[[s.aG,o.isCategoryExpanded(a)||o.shouldShowWhenCollapsed(a)||i.isCollapsed]]),(0,k.Lk)("hr",{class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed,"hide-when-collapsed":"groups"===a.id||"dynamic_group_category"===a.type}])},null,2)],64)):(0,k.Q3)("",!0)],64))),128)),i.isCollapsed||o.hasWorkspaces&&(e.$isMobile()||e.isPortrait)?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("a",Ut,[...t[26]||(t[26]=[(0,k.eW)(" Powered by ",-1),(0,k.Lk)("span",{class:"sidebar-powered-by-brand"},"Orgo",-1)])]))])):n.menuCategories&&("administration"===o.sidebarMode||o.isLocalAdminMode)?((0,k.uX)(),(0,k.CE)("section",{key:"administration",class:(0,E.C4)({"mt-5":e.$isMobile()||e.isPortrait,"
1sidebar-admin-menu":!e.$isMobile()&&!e.isPortrait})},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.administrationCategories,(a,u)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:a.id||`admin_cat_${u}`},[o.isCategoryVisible(a)&&!o.isMobileHiddenCategory(a)?((0,k.uX)(),(0,k.CE)(k.FK,{key:0},[o.shouldShowCategoryHeader(a)&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)(k.FK,{key:0},[(0,k.Lk)("div",Dt,["main"!==a.id?((0,k.uX)(),(0,k.CE)("div",Xt,(0,E.v_)(o.getCategoryLabel(a)),1)):(0,k.Q3)("",!0),(0,k.Lk)("div",Vt,["groups"===a.id?((0,k.uX)(),(0,k.CE)("div",Rt,[(0,k.bF)(d,{label:e.$t("Group list"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[11]||(t[11]=t=>e.$router.push({name:"GroupBrowse"}))},[(0,k.Lk)("span",Ot,[(0,k.bF)(r,{icon:"fa-light fa-user-group"})])])]),_:1},8,["label"]),(0,k.bF)(d,{label:e.$t("Search group"),position:"is-left"},{default:(0,k.k6)(()=>[o.isCategoryExpanded(a)&&(o.getCategoryItems(a)?.length>2&&!n.filterText||n.filterText)?((0,k.uX)(),(0,k.CE)("button",{key:0,class:"button is-small is-white is-rounded",onClick:t[12]||(t[12]=(...e)=>o.openSearchGroup&&o.openSearchGroup(...e))},[(0,k.Lk)("span",Qt,[(0,k.bF)(r,{icon:"fa-light fa-search"})])])):(0,k.Q3)("",!0)]),_:2},1032,["label"]),(0,k.bF)(d,{label:e.$t("Create group"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.bo)((0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[13]||(t[13]=(...e)=>o.openCreateGroup&&o.openCreateGroup(...e))},[(0,k.Lk)("span",Bt,[(0,k.bF)(r,{icon:"fa-light fa-plus"})])],512),[[s.aG,o.hasNewGroupButton]])]),_:1},8,["label"])])):(0,k.Q3)("",!0),"projects"===a.id?((0,k.uX)(),(0,k.CE)("div",Gt,[(0,k.bF)(d,{label:e.$t("All projects"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[14]||(t[14]=t=>e.$router.push({name:"ProjectList"}))},[(0,k.Lk)("span",Wt,[(0,k.bF)(r,{icon:"fa-light fa-diagram-project"})])])]),_:1},8,["label"]),(0,k.bF)(d,{label:e.$t("Search project"),position:"is-left"},{default:(0,k.k6)(()=>[o.isCategoryExpanded(a)&&(o.getCategoryItems(a)?.length>2&&!n.projectFilterText||n.projectFilterText)?((0,k.uX)(),(0,k.CE)("button",{key:0,class:"button is-small is-white is-rounded",onClick:t[15]||(t[15]=(...e)=>o.openSearchProject&&o.openSearchProject(...e))},[(0,k.Lk)("span",jt,[(0,k.bF)(r,{icon:"fa-light fa-search"})])])):(0,k.Q3)("",!0)]),_:2},1032,["label"]),(0,k.bF)(d,{label:e.$t("Create project"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.bo)((0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[16]||(t[16]=t=>e.$router.push({name:"ProjectCreate"}))},[(0,k.Lk)("span",zt,[(0,k.bF)(r,{icon:"fa-light fa-plus"})])],512),[[s.aG,o.hasNewProjectButton]])]),_:1},8,["label"])])):(0,k.Q3)("",!0)])]),(0,k.bo)((0,k.Lk)("div",qt,[(0,k.bF)(c,{ref_for:!0,ref:"groupSearchInput",modelValue:n.filterText,"onUpdate:modelValue":t[17]||(t[17]=e=>n.filterText=e),size:"is-small",icon:"fa-search",clearable:"",data:o.getCategoryItems(a),placeholder:e.$t("Search group.."),rounded:""},null,8,["modelValue","data","placeholder"])],512),[[s.aG,"groups"===a.id&&o.getCategoryItems(a)&&n.showGroupsSearch]]),(0,k.bo)((0,k.Lk)("div",Jt,[(0,k.bF)(c,{ref_for:!0,ref:"projectSearchInput",modelValue:n.projectFilterText,"onUpdate:modelValue":t[18]||(t[18]=e=>n.projectFilterText=e),size:"is-small",icon:"fa-search",clearable:"",placeholder:e.$t("Search project.."),rounded:""},null,8,["modelValue","placeholder"])],512),[[s.aG,"projects"===a.id&&o.getCategoryItems(a)&&n.showProjectsSearch]])],64)):(0,k.Q3)("",!0),(0,k.bo)((0,k.Lk)("div",{class:(0,E.C4)({"hide-when-collapsed":"groups"===a.id||"dynamic_group_category"===a.type})},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.getFilteredCategoryItems(a),(c,u)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:`${a.id}_item_${u}`},[o.isItemVisible(c)?((0,k.uX)(),(0,k.CE)(k.FK,{key:0},[o.isGroupItem(c)?((0,k.uX)(),(0,k.Wv)(l,{key:`group_${a.id}_${u}`,item:o.getGroupObject(c),"is-collapsed":i.isCollapsed},null,8,["item","is-collapsed"])):o.isProjectItem(c)?((0,k.uX)(),(0,k.Wv)(d,{key:1,label:c.name,position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":o.isProjectActive(c)}]),onClick:e=>o.navigateToProject(c)},[(0,k.Lk)("div",Kt,[(0,k.Lk)("span",Yt,[c.icon&&o.isEmoji(c.icon)?((0,k.uX)(),(0,k.CE)("span",Zt,(0,E.v_)(c.icon),1)):((0,k.uX)(),(0,k.CE)("span",{key:1,class:"sidebar-bullet",style:(0,E.Tr)({backgroundColor:o.resolveProjectColor(c.color)})},null,4))])]),(0,k.Lk)("h3",null,(0,E.v_)(c.name),1)],10,Ht)]),_:2},1032,["label","active"])):o.isFlyoutItem(c)?((0,k.uX)(),(0,k.CE)("div",{key:2,ref_for:!0,ref:"flyoutTriggerAdmin_"+a.id+"_"+u},[e.$isMobile()||e.isPortrait?((0,k.uX)(),(0,k.CE)(k.FK,{key:1},[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":o.isFlyoutChildActive(c)}]),onClick:e=>o.handleFlyoutClick(c)},[(0,k.Lk)("div",oi,[(0,k.Lk)("span",li,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",ri,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(c)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(c)),1)],10,ni),(0,k.Lk)("div",di,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.getVisibleFlyoutChildren(c),(e,t)=>((0,k.uX)(),(0,k.CE)("article",{key:`flyout_admin_child_${u}_${t}`,class:(0,E.C4)(["o-groupcard",o.getItemClasses(e)]),onClick:t=>
1o.handleItemClick(e)},[(0,k.Lk)("div",ui,[(0,k.Lk)("span",mi,[o.isEmoji(o.getItemIcon(e))?((0,k.uX)(),(0,k.CE)("span",pi,(0,E.v_)(o.getItemIcon(e)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(e)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(e)),1)],10,ci))),128))])],64)):((0,k.uX)(),(0,k.CE)("div",{key:0,class:(0,E.C4)(["sidebar-mode-link sidebar-flyout-trigger",{"groupcard-active":o.isFlyoutChildActive(c),"is-active-flyout":n.activeFlyout===c.label}]),onMouseenter:t=>o.openFlyout(c,e.$refs["flyoutTriggerAdmin_"+a.id+"_"+u]?.[0]||e.$refs["flyoutTriggerAdmin_"+a.id+"_"+u]),onMouseleave:t[19]||(t[19]=e=>o.scheduleCloseFlyout()),onClick:e=>o.handleFlyoutClick(c)},[(0,k.Lk)("span",ti,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",ii,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,icon:o.getItemIcon(c)},null,8,["icon"]))]),(0,k.Lk)("span",si,(0,E.v_)(o.getItemLabel(c)),1),i.isCollapsed?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("span",ai,[(0,k.bF)(r,{icon:"fa-light fa-chevron-right"})]))],42,ei))],512)):c.children&&c.children.length?((0,k.uX)(),(0,k.CE)("div",hi,[(0,k.bF)(d,{label:o.getItemLabel(c),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",o.getItemClasses(c)]),onClick:e=>o.toggleItemExpanded(c)},[(0,k.Lk)("div",fi,[(0,k.Lk)("span",bi,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",yi,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(c)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(c)),1),i.isCollapsed?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("span",{key:0,class:(0,E.C4)(["icon is-small ml-auto item-chevron",{rotated:o.isItemExpanded(c)}])},[(0,k.bF)(r,{icon:"fa-light fa-chevron-down"})],2))],10,gi)]),_:2},1032,["label","active"]),(0,k.bo)((0,k.Lk)("div",vi,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(c.children,(e,t)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:`child_${u}_${t}`},[!1!==e.isActive?((0,k.uX)(),(0,k.Wv)(d,{key:0,label:o.getItemLabel(e),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard o-groupcard-child",o.getItemClasses(e)]),onClick:t=>o.handleItemClick(e)},[(0,k.Lk)("div",Ci,[(0,k.Lk)("span",Li,[o.isEmoji(o.getItemIcon(e))?((0,k.uX)(),(0,k.CE)("span",wi,(0,E.v_)(o.getItemIcon(e)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(e)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,(0,E.v_)(o.getItemLabel(e)),1)],10,ki)]),_:2},1032,["label","active"])):(0,k.Q3)("",!0)],64))),128))],512),[[s.aG,o.isItemExpanded(c)&&!i.isCollapsed]])])):((0,k.uX)(),(0,k.Wv)(d,{key:4,label:o.getItemLabel(c),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",o.getItemClasses(c)]),onClick:e=>o.handleItemClick(c)},[(0,k.Lk)("div",Ei,[(0,k.Lk)("span",$i,[o.isEmoji(o.getItemIcon(c))?((0,k.uX)(),(0,k.CE)("span",Fi,(0,E.v_)(o.getItemIcon(c)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,class:"menu_item_blue",icon:o.getItemIcon(c)},null,8,["icon"]))])]),(0,k.Lk)("h3",null,[(0,k.eW)((0,E.v_)(o.getItemLabel(c))+" ",1),"Voting"===c.route&&n.hasActiveVotes?((0,k.uX)(),(0,k.CE)("span",Ti)):(0,k.Q3)("",!0),"ContactRequestList"===c.route&&n.contactUnreadCount>0&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)("span",Si,(0,E.v_)(n.contactUnreadCount>99?"99+":n.contactUnreadCount),1)):(0,k.Q3)("",!0),c.isAiBadge&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)("span",Ai,(0,E.v_)(e.$t("Beta")),1)):(0,k.Q3)("",!0)])],10,_i)]),_:2},1032,["label","active"]))],64)):(0,k.Q3)("",!0)],64))),128))],2),[[s.aG,o.isCategoryExpanded(a)||o.shouldShowWhenCollapsed(a)||i.isCollapsed]]),(0,k.Lk)("hr",{class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed,"hide-when-collapsed":"groups"===a.id||"dynamic_group_category"===a.type}])},null,2)],64)):(0,k.Q3)("",!0)],64))),128))],2)):(0,k.Q3)("",!0)]),_:1},8,["name"]),o.hasWorkspaces&&(e.$isMobile()||e.isPortrait)?((0,k.uX)(),(0,k.CE)(k.FK,{key:3},[t[28]||(t[28]=(0,k.Lk)("hr",{class:"mt-4 mb-2"},null,-1)),(0,k.Lk)("div",Pi,[(0,k.Lk)("div",Ii,(0,E.v_)(e.$t("WORKSPACES")),1
1),(0,k.Lk)("div",Mi,[(0,k.Lk)("div",xi,[(0,k.bF)(d,{label:e.$t("Add workspace"),position:"is-left"},{default:(0,k.k6)(()=>[(0,k.Lk)("button",{class:"button is-small is-white is-rounded",onClick:t[20]||(t[20]=t=>e.$router.push({name:"StartTenant"}))},[(0,k.Lk)("span",Ni,[(0,k.bF)(r,{icon:"fa-light fa-plus"})])])]),_:1},8,["label"])])])]),((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(Object.entries(e.$store.state.spaces),([t,i])=>((0,k.uX)(),(0,k.CE)("article",{key:"mobile_ws_"+t,class:(0,E.C4)(["o-groupcard",{"groupcard-active":e.tenant?.slug===t}]),onClick:e=>o.handleSwitchTenant(t)},[(0,k.bF)(u,{item:i.tenant,"is-type":"roundXSmall",class:"logo-thumbnail o-userimg-xs"},null,8,["item"]),(0,k.Lk)("h3",null,[(0,k.eW)((0,E.v_)(i.tenant.name)+" ",1),i.unseenNotificationsCount>0?((0,k.uX)(),(0,k.CE)("span",Di,(0,E.v_)(i.unseenNotificationsCount),1)):(0,k.Q3)("",!0)])],10,Ui))),128)),"community"===o.sidebarMode?((0,k.uX)(),(0,k.CE)("a",Xi,[...t[27]||(t[27]=[(0,k.eW)(" Powered by ",-1),(0,k.Lk)("span",{class:"sidebar-powered-by-brand"},"Orgo",-1)])])):(0,k.Q3)("",!0)],64)):(0,k.Q3)("",!0)]),e.$isMobile()||e.isPortrait?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",Vi,[o.isCrmMode||!o.hasAdminAccess||"community"!==o.sidebarMode||i.isCollapsed||e.$isMobile()||e.isPortrait?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",{key:0,class:"sidebar-mode-link",onClick:t[21]||(t[21]=t=>e.$store.commit("setSidebarMode","administration"))},[(0,k.Lk)("span",Ri,[(0,k.bF)(r,{icon:"fa-light fa-grid-2"})]),(0,k.Lk)("span",Oi,(0,E.v_)(o.administrationLabel),1),(0,k.Lk)("span",Qi,[(0,k.bF)(r,{icon:"fa-light fa-chevron-right"})])])),o.isCrmMode||!o.isLocalAdminMode||i.isCollapsed||e.$isMobile()||e.isPortrait?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",{key:1,class:"sidebar-mode-link",onClick:t[22]||(t[22]=t=>e.$store.commit("setSidebarMode","administration"))},[(0,k.Lk)("span",Bi,[(0,k.bF)(r,{icon:"fa-light fa-grid-2"})]),(0,k.Lk)("span",Gi,(0,E.v_)(o.administrationLabel),1),(0,k.Lk)("span",Wi,[(0,k.bF)(r,{icon:"fa-light fa-chevron-right"})])])),o.isCrmMode||"administration"!==o.sidebarMode||i.isCollapsed||e.$isMobile()||e.isPortrait?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",{key:2,class:"sidebar-mode-link",onClick:t[23]||(t[23]=t=>e.$store.commit("setSidebarMode","community"))},[(0,k.Lk)("span",ji,[(0,k.bF)(r,{icon:"fa-light fa-users"})]),(0,k.Lk)("span",zi,(0,E.v_)(e.$t("Community")),1),(0,k.Lk)("span",qi,[(0,k.bF)(r,{icon:"fa-light fa-chevron-right"})])])),e.$isMobile()||e.isPortrait?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(m,{key:3,"is-collapsed":i.isCollapsed},null,8,["is-collapsed"]))])),((0,k.uX)(),(0,k.Wv)(k.Im,{to:"body"},[n.activeFlyout&&n.flyoutPosition&&n.menuCategories?((0,k.uX)(!0),(0,k.CE)(k.FK,{key:0},(0,k.pI)(n.menuCategories,e=>((0,k.uX)(),(0,k.CE)(k.FK,{key:"flyout_panel_"+e.id},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(e.items||[],(e,i)=>((0,k.uX)(),(0,k.CE)(k.FK,{key:"flyout_panel_item_"+i},[o.isFlyoutItem(e)&&n.activeFlyout===e.label?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"sidebar-flyout-panel",style:(0,E.Tr)(n.flyoutPosition),onMouseenter:t[24]||(t[24]=e=>o.cancelCloseFlyout()),onMouseleave:t[25]||(t[25]=e=>o.closeFlyoutNow())},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.getVisibleFlyoutChildren(e),(e,t)=>((0,k.uX)(),(0,k.CE)("a",{key:"flyout_child_panel_"+t,class:(0,E.C4)(["sidebar-flyout-item",{"is-active":"route"===e.type&&o.isRouteItemActive(e)}]),onClick:t=>o.handleFlyoutChildClick(e)},[(0,k.Lk)("span",Hi,[o.isEmoji(o.getItemIcon(e))?((0,k.uX)(),(0,k.CE)("span",Ki,(0,E.v_)(o.getItemIcon(e)),1)):((0,k.uX)(),(0,k.Wv)(r,{key:1,icon:o.getItemIcon(e)},null,8,["icon"]))]),(0,k.Lk)("span",null,(0,E.v_)(o.getItemLabel(e)),1)],10,Ji))),128))],36)):(0,k.Q3)("",!0)],64))),128))],64))),128)):(0,k.Q3)("",!0)]))],2)}i(22489),i(30531),i(7588);const Zi={class:"logo-thumbnail o-userimg-xs"},es={class:"icon is-small"},ts={key:0,class:"sidebar-emoji"},is={key:0},ss={key:1},as={key:2},ns={key:3},os={key:4},ls={key:5},rs={key:6},ds={key:7,class:"has-text-grey-dark"},cs={key:0,class:"tag is-danger is-small is-rounded ml-auto group-notif-badge"};function us(e,t,i,s,a,n){const o=(0,k.g2)("font-awesome-icon"),l=(0,k.g2)("b-tooltip");return(0,k.uX)(),(0,k.Wv)(l,{label:n.tooltipLabel,position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("div",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":n.isCurrentGroup}]),onClick:t[0]||(t[0]=(...e)=>n.changeCurrentGroup&&n.changeCurrentGroup(...e))},[(0,k.Lk)("div",Zi,[(0,k.Lk)("span",es,[i.item&&i.item.emoji?((0,k.uX)(),(0,k.CE)("span",ts,(0,E.v_)(i.item.emoji),1)):i.item?((0,k.uX)(),(0,k.CE)("span",{key:1,class:"sidebar-bullet",style:(0,E.Tr)({backgroundColor:n.bulletColor})},null,4)):i.item||"onboarding"!==i.home?i.item||"dashboard"!==i.home?i.item||"users"!==i.home?i.item||"users_local"!==i.home?i.item||"discussions"!==i.home?i.item||"events"!==i.home?i.item||"f
1iles"!==i.home?i.item||"Voting"!==i.home?i.item||"Adhesions"!==i.home?i.item||"profession"!==i.home?i.item||"groups_view_all"!==i.home?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(o,{key:12,class:"menu_item_grey",icon:"fa-light fa-chevron-down"})):((0,k.uX)(),(0,k.Wv)(o,{key:11,class:"menu_item_blue",icon:"fa-light fa-gem"})):((0,k.uX)(),(0,k.Wv)(o,{key:10,class:"menu_item_blue",icon:"fa-light fa-address-card"})):((0,k.uX)(),(0,k.Wv)(o,{key:9,class:"menu_item_blue",icon:"fa-light fa-box-ballot"})):((0,k.uX)(),(0,k.Wv)(o,{key:8,class:"menu_item_blue",icon:"fa-light fa-database"})):((0,k.uX)(),(0,k.Wv)(o,{key:7,class:"menu_item_blue",icon:"fa-light fa-calendar"})):((0,k.uX)(),(0,k.Wv)(o,{key:6,class:"menu_item_blue",icon:"fa-light fa-comments"})):((0,k.uX)(),(0,k.Wv)(o,{key:5,class:"menu_item_green",icon:"fa-light fa-hashtag"})):((0,k.uX)(),(0,k.Wv)(o,{key:4,class:"menu_item_blue",icon:"fa-light fa-users"})):((0,k.uX)(),(0,k.Wv)(o,{key:3,class:"menu_item_purple",icon:"fa-light fa-house"})):((0,k.uX)(),(0,k.Wv)(o,{key:2,class:"menu_item_purple",icon:"fa-light fa-rocket"}))])]),(0,k.Lk)("h3",null,[i.item&&"Tenant"===i.item["@type"]?((0,k.uX)(),(0,k.CE)("span",is,(0,E.v_)(i.item.shortName),1)):i.item?((0,k.uX)(),(0,k.CE)("span",ss,(0,E.v_)(i.item.name),1)):(0,k.Q3)("",!0),i.home&&!["users","users_local","dashboard","profession","groups_view_all"].includes(i.home)?((0,k.uX)(),(0,k.CE)("span",as,(0,E.v_)(e.$t(i.home)),1)):(0,k.Q3)("",!0),i.home&&"users"===i.home?((0,k.uX)(),(0,k.CE)("span",ns,(0,E.v_)(e.$t("members")),1)):(0,k.Q3)("",!0),i.home&&"dashboard"===i.home?((0,k.uX)(),(0,k.CE)("span",os,(0,E.v_)(e.$t("home")),1)):(0,k.Q3)("",!0),i.home&&"profession"===i.home?((0,k.uX)(),(0,k.CE)("span",ls,(0,E.v_)(e.$t("professionalNetwork")),1)):(0,k.Q3)("",!0),i.home&&"users_local"===i.home?((0,k.uX)(),(0,k.CE)("span",rs,(0,E.v_)(e.user.localCenter?.name),1)):(0,k.Q3)("",!0),i.home&&"groups_view_all"===i.home?((0,k.uX)(),(0,k.CE)("span",ds,(0,E.v_)(e.$t("See all")),1)):(0,k.Q3)("",!0)]),n.groupNotificationCount>0?((0,k.uX)(),(0,k.CE)("span",cs,(0,E.v_)(n.groupNotificationCount>99?"99+":n.groupNotificationCount),1)):(0,k.Q3)("",!0)],2)]),_:1},8,["label","active"])}var ms={props:["item","home","isCollapsed"],data(){return{}},computed:{...(0,L.L8)(["user","tenant","isGranted"]),groupNotificationCount(){if(!this.item?.id||!this.tenant?.slug)return 0;const e=this.$store.state.spaces[this.tenant.slug]?.groupNotificationCounts||{};return e[this.item.id]||0},bulletColor(){if(!this.item)return null;const e=this.tenant?.settingMenu?.groupColors||{};if("RoleGroup"===this.item["@type"]||this.item.isRoleGroup)return e.roleGroup||"#9b7def";if("Tenant"===this.item["@type"]||"LocalCenter"===this.item["@type"])return e.general||"#5b7def";if("Group"===this.item["@type"]&&this.item.category){const t=this.item.category.color||e.category||"#ec4899";return this.resolvePresetColor(t)}return"Group"===this.item["@type"]&&this.item.isJoinable?e.joinable||"#43b581":"Group"!==this.item["@type"]||this.item.isJoinable?e.general||"#5b7def":e.private||"#e8a44a"},tooltipLabel(){return this.item?"Tenant"===this.item["@type"]?this.item.shortName:"LocalCenter"===this.item["@type"]?`${this.item.name}`:this.item.name:this.home?"users"===this.home?this.$t("members"):"dashboard"===this.home?this.$t("home"):"profession"===this.home?this.$t("professionalNetwork"):"users_local"===this.home?this.user.localCenter?.name||"":"groups_view_all"===this.home?this.$t("See all"):this.$t(this.home):""},groupHasOnlyTasks(){return this.item&&this.item.isProject&&!this.item.hasDiscussion},isCurrentGroup(){if(!this.$route.meta||!this.$route.meta.hasAppSidebarMenu)return!1;if("groups_view_all"===this.home)return!1;let e=this.$store.state.currentGroup;if(null!==this.item){if(e?.id===this.item?.id&&"Tenant"!==this.item?.["@type"])return!0;if("generalUnit"===e&&"Tenant"===this.item?.["@type"]&&!this.$route.query.hotlink&&!this.item.isSupport&&"Dashboard"!==this.$route.name)return!0;if("support"===e&&this.item.isSupport)return!0}else if(null===e){if("DriveList"===this.$route.name&&"files"===this.home)return!0;
1if("DiscussList"===this.$route.name&&"discussions"===this.home&&!this.$route.query.hotlink)return!0;if("OnBoardingTenant"===this.$route.name&&"onboarding"===this.home)return!0;if("Dashboard"===this.$route.name&&"dashboard"===this.home)return!0;if("EventList"===this.$route.name&&"events"===this.home)return!0;if("VoteList"===this.$route.name&&"Voting"===this.home)return!0;if("UserList"===this.$route.name&&"users"===this.home&&this.$route.query.generalUnit)return!0}return!1},routeName(){let e="DiscussList",t=this.tenant.settingFeatures.group,i=this.$store.state.currentGroupTab;return t&&t.landingPage&&"users"===t.landingPage&&(e="UserList"),this.item&&(this.item.isProject||this.item.isSupport)?"IssueList":("discussions"===i?e="DiscussList":"events"===i?e="EventList":"drive"===i?e="DriveList":"issues"===i&&this.item&&this.item.isProject&&(e="IssueList"),e)},queryString(){let e=this.$store.state.currentGroup;if(null!==this.item){if(e?.id===this.item?.id&&"Tenant"!==this.item?.["@type"])return{unit:this.item.id};if("generalUnit"===e&&"Tenant"===this.item?.["@type"]&&!this.item?.isSupport)return{generalUnit:!0};if("support"===e)return{support:1}}else if(null===e)return{};return{}}},methods:{stringToColour:_.ly,resolvePresetColor(e){if(!e||e.startsWith("#"))return e;const t="dark"===this.$store.state.theme;return t?`var(--${e}-400, var(--${e}-200))`:`var(--${e}-500, var(--${e}-200))`},recordGroupVisit(){this.item?.id&&this.tenant?.slug&&(this.$store.commit("clearGroupNotificationCount",{tenantSlug:this.tenant.slug,groupId:this.item.id}),this.$http.plain.post(`/units/${this.item.id}/record-visit`,{}).catch(e=>console.error(e)))},changeCurrentGroup(){if(this.$store.commit("resetListValuesDiscussion"),this.$store.commit("resetListValuesIssue"),this.$store.commit("resetListValuesUser"),this.$store.commit("resetListValuesDrive"),this.$store.commit("resetListValuesEvent"),this.$store.commit("resetListValuesContract"),this.item&&"Tenant"===this.item["@type"]?this.$store.state.currentGroup="generalUnit":this.item&&this.item.isSupport?this.$store.state.currentGroup="support":(this.$store.state.currentGroup=this.item,this.recordGroupVisit()),this.home){if("dashboard"===this.home)return this.$router.push({name:"Dashboard"});if("discussions"===this.home)return this.$router.push({name:"DiscussList"});if("events"===this.home)return this.$router.push({name:"EventList"});if("profession"===this.home)return this.$router.push({name:"ProfessionalList"});if("files"===this.home)return this.$router.push({name:"DriveList"});if("Adhesions"===this.home)return this.$router.push({name:"Adhesions"});if("Voting"===this.home)return this.$router.push({name:"VoteList"});if("users"===this.home)return this.$router.push({name:"UserList",query:{generalUnit:!0}});if("users_local"===this.home)return this.$router.push({name:"UserList",query:{unit:this.user.localCenter?.id}});if("onboarding"===this.home)return this.$router.push({name:"OnBoardingTenant"});if("groups_view_all"===this.home)return this.$parent.openedItemsGroups=!0,void this.$store.commit("setOpenedItemsGroups",!0)}if(this.item&&"Group"===this.item["@type"]&&this.groupHasOnlyTasks){const e={...this.queryString};return delete e.hotlink,this.$router.push({name:"IssueList",query:e})}const e={...this.queryString};return delete e.hotlink,this.$router.push({name:"DiscussList",query:e})}}};const ps=(0,I.A)(ms,[["render",us]]);var hs=ps;const gs={class:"sidebar-user-menu"},fs={key:2,class:"sidebar-user-info"},bs={class:"sidebar-user-name"},ys={class:"sidebar-user-email"},vs={key:3,class:"icon is-small sidebar-user-trigger-icon"},ks={key:0,class:"sidebar-user-popup"},Cs={class:"sidebar-user-popup-main"},Ls={class:"sidebar-user-popup-header"},ws={class:"sidebar-user-email"},_s={class:"icon-text"},Es={class:"icon is-small"},$s={class:"ml-auto user-menu-item-right"},Fs={class:"user-menu-item-value"},Ts={class:"icon is-small"},Ss={class:"icon-text"},As={class:"icon is-small"},Ps={class:"icon is-small ml-auto"},Is=["onClick"],Ms={key:0,class:"icon is-small ml-auto"};function xs(e,t,i,a,n,o){const l=(0,k.g2)("AvatarWithProgress"),r=(0,k.g2)("LogoThumbnail"),d=(0,k.g2)("font-awesome-icon"),c=(0,k.g2)("UserMenuItems"),u=(0,k.g2)("PermissionImpersonationSelector");return(0,k.uX)(),(0,k.CE)("div",gs,[(0,k.Lk)("div",{class:"sidebar-user-trigger",onClick:t[0]||(t[0]=(...e)=>o.toggleMenu&&o.toggleMenu(...e))},[o.showProfileCompletion?((0,k.uX)(),(0,k.Wv)(l,{key:0,item:e.user,progress:e.user.profileCompletionPercentage||0,"is-type":"roundSmaller"},null,8,["item","progress"])):((0,k.uX)(),(0,k.Wv)(r,{key:1,item:e.user,"is-type":"roundSmall"},null,8,["item"])),i.isCollapsed?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",fs,[(0,k.Lk)("span",bs,(0,E.v_)(e.user.fullName),1),(0,k.Lk)("span",ys,(0,E.v_)(e.user.email),1)])),i.isCollapsed?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("span",vs,[(0,k.bF)(d,{icon:"fa-light fa-angles-up-down"})]))]),(0,k.bF)(s.eB,{name:"slide-up"},{default:(0,k.k6)(()=>[o.isOpen&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)("div",ks,[(0,k.Lk)("div",Cs,[(0,k.Lk)("div",Ls,[(0,k.Lk)("span",ws,(0,E.v_)(e.user.email),1)]),(0,k.bF)(c,{onNavigate:o.onNavigate,onOpenTheme:o.openThemeModal,onOpenFee:o.openProfileFeeTab,onOpenPermissionImpersonation:o.showPermissionImpersonationModal,onSignOut:o.signOut},{language:(0,k.k6)(()=>[o.language.isActive?((0,k.uX)(),(0,k.CE)("a",{key:0,ref:"langTrigger",class:(0,E.C4)(["user-menu-item",{"is-active-submenu":"language"===n.activeSubmenu}]),tabindex:"0",onMouseenter:t[1]||(t[1]=t=>o.openSubmenu("language",e.$refs.langTrigger)),onMouseleave:t[2]||(t[2]=e=>o.scheduleCloseSubmenu()),onClick:t[3]||(t[3]=t=>o.openSubmenu("language",e.$refs.langTrigger)),onFocus:t[4]||(t[4]=t=>o.openSubmenu("language",e.$refs.langTrigger))},[(0,k.Lk)("span",_s,[(0,k.Lk)("span",Es,[(0,k.bF)(d,{icon:"fa-light fa-globe-europe"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Language")),1)]),(0,k.Lk)("span",$s,[(0,k.Lk)("span",Fs,(0,E.v_)(n.languages[n.locale]),1),(0,k.Lk)("span",Ts,[(0,k.bF)(d,{icon:"fa-light fa-chevron-right"})])])],34)):(0,k.Q3)("",!0)]),download:(0,k.k6)(()=>[e.isNativeApp?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("a",{key:0,ref:"downloadTrigger",class:(0,E.C4)(["user-menu-item",{"is-active-submenu":"download"===n.activeSubmenu}]),tabindex:"0",onMouseenter:t[5]||(t[5]=t=>o.openSubmenu("download",e.$refs.downloadTrigger)),onMouseleave:t[6]||(t[6]=e=>o.scheduleCloseSubmenu()),onClick:t[7]||(t[7]=t=>o.openSubmenu("download",e.$refs.downloadTrigger)),onFocus:t[8]||(t[8]=t=>o.openSubmenu("download",e.$refs.downloadTrigger))},[(0,k.Lk)("span",Ss,[(0,k.Lk)("span",As,[(0,k.bF)(d,{icon:"fa-light fa-mobile"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Download app")),1)]),(0,k.Lk)("span",Ps,[(0,k.bF)(d,{icon:"fa-light fa-chevron-right"})])],34))]),_:1},8,["onNavigate","onOpenTheme","onOpenFee","onOpenPermissionImpersonation","onSignOut"])])])):(0,k.Q3)("",!0)]),_:1}),(0,k.bF)(u,{ref:"permissionImpersonationModal"},null,512),o.isOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"sidebar-user-overlay",onClick:t[9]||(t[9]=(...e)=>o.closeMenu&&o.closeMenu(...e))})):(0,k.Q3)("",!0),((0,k.uX)(),(0,k.Wv)(k.Im,{to:"body"},["language"===n.activeSubmenu&&n.submenuPosition?((0,k.uX)(),(0,k.CE)("div",{key:0,ref:"submenuPanel",class:"sidebar-user-side-panel-fixed",style:(0,E.Tr)(n.submenuPosition),onMouseenter:t[10]||(t[10]=e=>o.cancelCloseSubmenu()),onMouseleave:t[11]||(t[11]=e=>o.closeSubmenuNow())},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.availableLanguages,e=>((0,k.uX)(),(0,k.CE)("a",{key:"lang_"+e,class:(0,E.C4)(["sidebar-user-side-item",{"is-active":n.locale===e}]),onClick:t=>o.languageChange(e)},[(0,k.Lk)("span",null,(0,E.v_)(n.languages[e]),1),n.locale===e?((0,k.uX)(),(0,k.CE)("span",Ms,[(0,k.bF)(d,{icon:"fa-light fa-check"})])):(0,k.Q3)("",!0)],10,Is))),128))],36)):(0,k.Q3)("",!0),"download"===n.activeSubmenu&&n.submenuPosition?((0,k.uX)(),(0,k.CE)("div",{key:1,ref:"submenuPanel",class:"sidebar-user-side-panel-fixed",style:(0,E.Tr)(n.submenuPosition),onMouseenter:t[14]||(t[14]=e=>o.cancelCloseSubmenu()),onMouseleave:t[15]||(t[15]=e=>o.closeSubmenuNow())},[(0,k.Lk)("a",{class:"sidebar-user-side-item",onClick:t[12]||(t[12]=e=>o.openLink(o.iosAppLink))},[(0,k.bF)(d,{icon:["fab","app-store-ios"],class:"mr-2"}),(0,k.eW)(" "+(0,E.v_)(e.$t("Download iOS App")),1)]),(0,k.Lk)("a",{class:"sidebar-user-side-item",onClick:t[13]||(t[13]=e=>o.openLink(o.androidAppLink))},[(0,k.bF)(d,{icon:["fab","android"],class:"mr-2"}),(0,k.eW)(" "+(0,E.v_)(e.$t("Download Android App")),1)])],36)):(0,k.Q3)("",!0)]))])}
1var Ns=i(12409),Us=i(31823),Ds=i(1455),Xs=i(51716);const Vs=4,Rs=180;var Os={name:"AppSidebarUserMenu",components:{AvatarWithProgress:Ns.A,LogoThumbnail:Us.A,PermissionImpersonationSelector:Ds.A,UserMenuItems:Xs.A},props:{isCollapsed:{type:Boolean,default:!1}},data(){return{locale:this.$i18n.locale,languages:_.eo,activeSubmenu:null,submenuPosition:null,closeSubmenuTimer:null}},computed:{...(0,L.L8)(["user","tenant","isGranted","userTypeEligibleForFee","isGrantedAdhesion","isNativeApp"]),isOpen(){return this.$store.state.sidebarUserMenuOpen},showProfileCompletion(){return this.tenant?.settingFeatures?.users?.profileCompletionEnabled&&void 0!==this.user?.profileCompletionPercentage&&this.user.profileCompletionPercentage<100},language(){return this.tenant.settingFeatures.language},availableLanguages(){return Object.keys(this.languages).filter(e=>this.language[e])},iosAppLink(){return this.tenant?.iosApp||"https://apps.apple.com/us/app/orgo-community/id1484759378"},androidAppLink(){return this.tenant?.androidApp||"https://play.google.com/store/apps/details?id=com.orgoapp"}},methods:{toggleMenu(){this.isCollapsed?(this.$store.commit("toggleSidebarCollapse"),this.$store.state.sidebarUserMenuOpen||this.$store.commit("toggleSidebarUserMenu")):this.$store.commit("toggleSidebarUserMenu"),this.activeSubmenu=null},closeMenu(){this.$store.commit("closeSidebarUserMenu"),this.activeSubmenu=null,this.submenuPosition=null},openSubmenu(e,t){if(this.cancelCloseSubmenu(),!t)return;const i=t.$el||t,s=i.getBoundingClientRect();this.submenuPosition=this.buildSubmenuPosition(s,Rs),this.activeSubmenu=e,this.$nextTick(()=>{const t=this.$refs.submenuPanel;if(!t||this.activeSubmenu!==e)return;const i=(t.$el||t).getBoundingClientRect().width;i>Rs&&(this.submenuPosition=this.buildSubmenuPosition(s,i))})},buildSubmenuPosition(e,t){let i=e.right+Vs;i+t+Vs>window.innerWidth&&(i=e.left-t-Vs);const s=Math.max(Vs,window.innerWidth-t-Vs);return i=Math.min(Math.max(i,Vs),s),{position:"fixed",left:i+"px",bottom:Math.max(Vs,window.innerHeight-e.bottom)+"px"}},scheduleCloseSubmenu(){this.closeSubmenuTimer=setTimeout(()=>{this.activeSubmenu=null,this.submenuPosition=null},150)},cancelCloseSubmenu(){this.closeSubmenuTimer&&(clearTimeout(this.closeSubmenuTimer),this.closeSubmenuTimer=null)},closeSubmenuNow(){this.cancelCloseSubmenu(),this.activeSubmenu=null,this.submenuPosition=null},navigate(e,t,i){this.closeMenu(),this.$router.push({name:e,params:t||{},query:i||{}})},onNavigate(e){this.navigate(e.name,e.params,e.query)},openProfileFeeTab(){return this.closeMenu(),this.tenant.settingFeatures.fees.fixedStartingDateFee||"preper"===this.tenant.slug?this.$router.push({name:"UserShowMyProfile",query:{tab:"fees"}}):this.$router.push({name:"UserShowMyProfile",query:{tab:"payments",subtab:"fees"}})},openThemeModal(){this.$store.commit("closeSidebarUserMenu"),this.$store.commit("openThemeSidebar")},languageChange(e){this.locale=e,this.activeSubmenu=null,(0,c.J4)(e),this.$http.plain.patch("/profile-update/"+this.user.id,{language:e}).then(e=>{this.$store.commit("setCurrentUser",e.data)}).catch(e=>console.error(e))},showPermissionImpersonationModal(){this.closeMenu(),this.$refs.permissionImpersonationModal.show()},openLink(e){window.open(e,"_blank")},signOut(){this.closeMenu(),this.$http.plain.get("/logout").then(()=>{this.$store.commit("logout"),this.$router.push({name:"Login"})}).catch(e=>console.error(e))}}};const Qs=(0,I.A)(Os,[["render",xs],["__scopeId","data-v-514e8bdb"]]);var Bs=Qs,Gs=i(8277),Ws=i(60259);function js(e,t,i){if(!i)return void(e.state.currentGroup=null);const s=e.state.spaces?.[t]?.myGroups||[];e.state.currentGroup=s.find(e=>e.id===Number(i))||null}var zs={mixins:[Gs.A],props:["item","isCollapsed"],emits:["switch-tenant"],data(){return{currentGroup:this.$store.state.currentGroup,isSupport:this.$route.query.isSupport,isLoadingGroups:!1,filterText:"",projectFilterText:"",showGroupsSearch:!1,showProjectsSearch:!1,hasActiveVotes:!1,contactUnreadCount:0,openedItemsGroups:this.$store.state.openedItemsGroups,openedItemsAdministrative:this.$store.state.openedItemsAdministrative,openedItemsFinance:this.$store.state.openedItemsFinance,openedItemsResources:this.$store.state.openedItemsResources,openedItemsCommunity:this.$store.state.openedItemsCommunity,categoryStates:{main:!0,groups:!0,projects:!0,finance:!0,administrative:!0,resources:!0},menuCategories:null,localAdminCenterName:null,expandedItems:{},activeFlyout:null,flyoutPosition:null,closeFlyoutTimer:null}},watch:{"tenant.settingMenu":{handler(){this.loadMenuCategories()},deep:!0},chapterContextId:{handler:"loadLocalAdminCenterName",immediate:!0},isLocalAdminMode:"loadLocalAdminCenterName"},created(){this.loadMenuCategories(),this.tenant.settingFeatures.voting.isActive&&this.checkActiveVotes(),this.tenant.settingFeatures.contactForm?.isActive&&this.isGranted("COMMUNICATION_TENANT")&&this.loadContactUnreadCount(),this.tenant.settingFeatures.projectManagement?.isActive&&this.loadMyProjects()},methods:{isEmoji:_.Ve,resolveProjectColor(e){if(!e)return"var(--orgo-color-primary)";if(e.startsWith("#"))return e;const t="dark"===this.$store.state.theme;return t?`var(--${e}-400, var(--${e}-200))`:`var(--${e}-500, var(--${e}-200))`},isMobileHiddenCategory(e){return!(!this.$isMobile()&&!this.isPortrait)&&("dynamic"===e.type||"dynamic_group_category"===e.type)},handleSwitchTenant(e){this.$store.state.isMobileAppSidebarMenuOpen=!1,this.$emit("switch-tenant",e)},isCategoryVisible(e){if(e.permissions&&Array.isArray(e.permissions)){if(!e.permissions.some(e=>this.isGranted(e)))return!1}else if(e.permission)if(e.permission.includes("||")){const t=e.permission.split("||").map(e=>e.trim());if(!t.some(e=>this.isGranted(e)))return!1}else if(!this.isGranted(e.permission))return!1;if(Array.isArray(e.items)&&e.items.length&&!e.items.some(e=>this.isItemVisible(e)))return!1;
1if(e.feature)return this.evaluateFeature(e.feature);if(e.userType&&this.tenant?.settingFeatures?.users?.hasUserTypes){const t=this.$store.getters.effectiveUserType;if(Array.isArray(e.userType)){if(t&&!e.userType.includes(t.id))return!1}else if(t&&t.id!==parseInt(e.userType))return!1}return!0},loadMenuCategories(){this.tenant?.settingMenu&&Array.isArray(this.tenant.settingMenu.categories)?(this.menuCategories=JSON.parse(JSON.stringify(this.tenant.settingMenu.categories)),this.injectAllianceStats(),this.injectCompanies(),this.injectProducts(),this.injectReports(),this.injectContactMessages(),this.applyMenuItemOrder(),this.autoExpandActiveItems()):this.$http.plain.get("/tenant-default-template").then(e=>{e.data?.defaultSettingMenu&&(this.menuCategories=e.data.defaultSettingMenu.categories,this.menuCategories.forEach(e=>{this.categoryStates[e.id]=!1!==e.defaultOpen}),this.injectAllianceStats(),this.injectCompanies(),this.injectProducts(),this.injectReports(),this.injectContactMessages(),this.applyMenuItemOrder(),this.autoExpandActiveItems())})},autoExpandActiveItems(){if(!this.menuCategories)return;const e=this.$isMobile()||this.isPortrait;this.menuCategories.forEach(t=>{t.items&&t.items.forEach(t=>{if(t.children&&t.children.length){if(e&&this.isFlyoutItem(t)){const e=t.route||t.label;return void(this.expandedItems[e]=!0)}const i=t.children.some(e=>"route"===e.type&&this.$route.name===e.route);if(i){const e=t.route||t.label;this.expandedItems[e]=!0}}})})},injectAllianceStats(){if(!this.tenant?.isAlliance||!this.isGranted("ADMIN_TENANT"))return;const e=this.menuCategories.find(e=>"main"===e.id);if(!e||!e.items)return;const t=e.items.some(e=>"Stats"===e.route&&"Metrics"===e.label);if(!t){const t={type:"route",route:"Stats",label:"Metrics",icon:"fa-light fa-chart-mixed",permission:"ADMIN_TENANT",query:{tab:"organizations"},isActive:!0},i=e.items.findIndex(e=>"users"===e.route);-1!==i?e.items.splice(i,0,t):e.items.push(t)}},injectCompanies(){if(!this.tenant?.settingFeatures?.company?.isActive)return;const e=this.tenant.settingFeatures.company.whoCanCreateCompany||"USER",t=this.menuCategories.flatMap(e=>e.items||[]).find(e=>"CompanyList"===e.route);if(t)return void(t.permission=e);const i=this.menuCategories.find(e=>"administrative"===e.id)||this.menuCategories.find(e=>"main"===e.id);i&&i.items&&i.items.push({type:"route",route:"CompanyList",label:"Companies",icon:"fa-light fa-buildings",feature:"company.isActive",permission:e,isActive:!0})},injectReports(){const e=this.menuCategories.flatMap(e=>e.items||[]).some(e=>"ReportList"===e.route);if(e)return;const t=this.menuCategories.find(e=>"administrative"===e.id);t&&Array.isArray(t.items)&&t.items.push({type:"route",route:"ReportList",label:"Reports",icon:"fa-light fa-file-chart-line",permission:"ROLE_ADMIN_TENANT",isActive:!0})},injectContactMessages(){if(!this.tenant?.settingFeatures?.contactForm?.isActive)return;const e=this.menuCategories.flatMap(e=>e.items||[]).some(e=>"ContactRequestList"===e.route);if(e)return;const t=this.menuCategories.find(e=>"communication"===e.id);if(!t||!Array.isArray(t.items))return;const i={type:"route",route:"ContactRequestList",label:"Contact messages",icon:"fa-light fa-inbox",permission:"COMMUNICATION_TENANT",isActive:!0},s=t.items.findIndex(e=>"NewsletterWidget"===e.route);-1!==s?t.items.splice(s+1,0,i):t.items.push(i)},loadContactUnreadCount(){this.$http.plain.get("/contact_requests",{params:{isRead:!1,itemsPerPage:1}}).then(e=>{this.contactUnreadCount=e.data["hydra:totalItems"]||0}).catch(e=>console.error(e))},applyMenuItemOrder(){const e=[{route:"CompanyList",after:["ContactList","contacts"]},{route:"FormBuilderList",before:["BadgeUsers"]},{route:"ReportList",after:["FormBuilderList"]}];(this.menuCategories||[]).forEach(t=>{Array.isArray(t.items)&&e.forEach(e=>{const i=t.items.findIndex(t=>t.route===e.route);if(-1===i)return;const s=e.after||e.before,a=t.items.findIndex(e=>s.includes(e.route));if(-1===a)return;const n=t.items[e.after?i-1:i+1];if(n&&s.includes(n.route))return;const[o]=t.items.splice(i,1),l=t.items.findIndex(e=>s.includes(e.route));t.items.splice(e.after?l+1:l,0,o)})})},injectProducts(){const e=e=>
1"ProductList"===e.route&&("local"===e.params?.type||"Local products"===e.label),t=this.menuCategories.find(e=>(e.items||[]).some(e=>"ProductList"===e.route))||this.menuCategories.find(e=>"finance"===e.id);if(!t||!t.items)return;const i={feature:"fees.feeLocalExists || onlinePayments.isLocalActive",permission:"FINANCIAL_LOCAL",requiresLocalCenter:!0},s=t.items.find(e);if(s)return delete s.computed,void Object.assign(s,i);const a=t.items.findIndex(e=>"ProductList"===e.route),n={type:"route",route:"ProductList",params:{type:"local"},label:"Local products",icon:"fa-light fa-list",...i,isActive:!0};t.items.splice(-1===a?t.items.length:a+1,0,n)},shouldShowCategoryHeader(e){return!1!==e.collapsible},getCategoryLabel(e){return this.$t(e.label||e.name||"Unnamed Category")},isCategoryExpanded(e){return!1===e.collapsible||!1!==this.categoryStates[e.id]},getCategoryItems(e){if("groups"===e.id&&"dynamic"===e.type){const e=new Map;if(this.tenant){const t={...this.tenant,isActive:!0};e.set("tenant",t)}const t=this.$store.state.spaces?.[this.tenant.slug]?.myGroups||[];t.forEach(t=>{if(!e.has(t.id)&&!t.category){const i={...t,isActive:!0};e.set(t.id,i)}});const i=Array.from(e.values());if(this.filterText&&this.filterText.trim()){const e=this.filterText.toLowerCase().trim();return i.filter(t=>{const i=(t.name||t.shortName||"").toLowerCase();return i.includes(e)})}return i}if("dynamic_group_category"===e.type){const t=this.$store.state.spaces?.[this.tenant.slug]?.myGroups||[];return t.filter(t=>t.category&&t.category.id===e.groupCategoryId).map(e=>({...e,isActive:!0}))}if("projects"===e.id&&"dynamic"===e.type){const e=this.$store.state.spaces?.[this.tenant.slug]?.myProjects||[];if(this.projectFilterText&&this.projectFilterText.trim()){const t=this.projectFilterText.toLowerCase().trim();return e.filter(e=>{const i=(e.name||"").toLowerCase();return i.includes(t)})}return e}return e.items?e.items:[]},getFilteredCategoryItems(e){const t=this.getCategoryItems(e);return"groups"!==e.id||this.isCategoryExpanded(e)?t:t.filter(e=>"Tenant"===e["@type"]||!(!this.user?.localCenter||e.id!==this.user.localCenter.id))},shouldShowWhenCollapsed(e){return"groups"===e.id&&!this.isCategoryExpanded(e)},isGroupItem(e){return"Tenant"===e["@type"]||"LocalCenter"===e["@type"]||"Group"===e["@type"]||"Unit"===e["@type"]||"RoleGroup"===e["@type"]||e.isGroup||"group"===e.type},isProjectItem(e){return"Project"===e["@type"]},isProjectActive(e){return("ProjectShow"===this.$route.name||"ProjectOverview"===this.$route.name||"ProjectTasks"===this.$route.name||"ProjectBoard"===this.$route.name||"ProjectGantt"===this.$route.name)&&this.$route.params.id===e.uuid},navigateToProject(e){js(this.$store,this.tenant?.slug,null),this.$router.push({name:"ProjectShow",params:{id:e.uuid}})},openSearchProject(){this.showProjectsSearch=!this.showProjectsSearch,this.projectFilterText=""},loadMyProjects(){this.$http.plain.get("/my-projects").then(e=>{this.$store.commit("setTenantProjects",{slug:this.tenant.slug,projects:e.data["hydra:member"]})}).catch(e=>console.error("Failed to load projects:",e))},getGroupObject(e){if(e["@type"])return e;if("tenant"===e.type||e.isGeneralUnit)return this.tenant;if("localCenter"===e.type)return this.user?.localCenter;if("group"===e.type||e.isGroup){const t=this.$store.state.spaces?.[this.tenant.slug]?.myGroups||[],i=e.params?.id||e.groupId||e.id,s=t.find(e=>e.id===i);return s||e}return e},getItemIcon(e){return e.icon?e.icon:"action"===e.type?"fa-light fa-plus":"route"===e.type?"fa-light fa-cube":"fa-light fa-hashtag"},getItemLabel(e){return e.customLabel?e.customLabel:e.name?e.name:this.isLocalAdminMode&&"LocalCenterUpdate"===e.route&&this.localAdminCenterName?this.localAdminCenterName:e.label?this.$t(e.label):this.$t("Unnamed")},getItemClasses(e){const t={};if(e.isHotlink&&this.isHotlinkActive(e)&&(t["groupcard-active"]=!0),"route"===e.type&&this.isRouteItemActive(e)&&(t["groupcard-active"]=!0),e.isAiBadge&&(t["is-ai-item"]=!0),e.children&&e.children.length){const i=e.children.some(e=>"route"===e.type&&this.isRouteItemActive(e));i&&(t["groupcard-active"]=!0)}return t},isHotlinkActive(e){if(this.$route.path!==e.path)return!1;if(e.queryParams)for(const[t,i]of Object.entries(e.queryParams))if(this.$route.query[t]!==String(i))return!1;return!0},isRouteItemActive(e){if(("users"===e.route||"events"===e.route||"files"===e.route||"discussions"===e.route)&&this.$store.state.currentGroup)return!1;if("dashboard"===e.route&&"Dashboard"===this.$route.name)return!0;
1if("users"===e.route&&"UserList"===this.$route.name&&this.$route.query.generalUnit)return!0;if("users_local"===e.route&&"UserList"===this.$route.name&&this.$route.query.unit===this.user?.localCenter?.id)return!0;if("discussions"===e.route&&"DiscussList"===this.$route.name&&!this.$route.query.hotlink)return!0;if("events"===e.route&&"EventList"===this.$route.name)return!0;if("files"===e.route&&"DriveList"===this.$route.name)return!0;if("projects"===e.route&&("ProjectList"===this.$route.name||this.$route.name?.startsWith("Project")))return!0;if("Voting"===e.route&&"VoteList"===this.$route.name)return!0;if("Stats"===e.route&&"Stats"===this.$route.name)return!0;if("NaturalQuery"===e.route&&"NaturalQuery"===this.$route.name)return!0;if("Adhesions"===e.route&&"Adhesions"===this.$route.name)return!0;if("profession"===e.route&&"ProfessionalList"===this.$route.name)return!0;if(e.route&&this.$route.name===e.route){if(e.params)for(const[t,i]of Object.entries(e.params))if(this.$route.params[t]!==String(i))return!1;if(e.query)for(const[t,i]of Object.entries(e.query))if("hotlink"!==t&&this.$route.query[t]!==String(i))return!1;return!0}return!1},handleItemClick(e){"route"===e.type?this.handleRouteNavigation(e):e.isHotlink?this.handleHotlinkNavigation(e):"action"===e.type?this.handleAction(e):"computed-route"===e.type&&this.handleComputedRoute(e)},handleRouteNavigation(e){this.$store.commit("resetListValuesDiscussion"),this.$store.commit("resetListValuesIssue"),this.$store.commit("resetListValuesUser"),this.$store.commit("resetListValuesDrive"),this.$store.commit("resetListValuesEvent"),this.$store.commit("resetListValuesContract"),js(this.$store,this.tenant?.slug,"users_local"===e.route?this.user?.localCenter?.id:e.query?.unit);const t=["dashboard","onboarding","users","users_local","discussions","events","files","projects","Voting","Adhesions","profession","LocalCenterUpdate","ProductList"];if(t.includes(e.route)){if("dashboard"===e.route)this.$router.push({name:"Dashboard"});else if("users"===e.route){const t=e.query||{generalUnit:!0};delete t.hotlink,this.$router.push({name:"UserList",query:t})}else if("users_local"===e.route)this.$router.push({name:"UserList",query:{unit:this.user.localCenter?.id}});else if("discussions"===e.route)this.$router.push({name:"DiscussList"});else if("events"===e.route)this.$router.push({name:"EventList"});else if("files"===e.route)this.$router.push({name:"DriveList"});else if("projects"===e.route)this.$router.push({name:"ProjectList"});else if("Voting"===e.route)this.$router.push({name:"VoteList"});else if("Adhesions"===e.route)this.$router.push({name:"Adhesions"});else if("profession"===e.route)this.$router.push({name:"ProfessionalList"});else if("LocalCenterUpdate"===e.route){const e=this.isLocalAdminMode?this.chapterContextId:this.user.localCenter?.id;e&&this.$router.push({name:"LocalCenterUpdate",params:{item:e}})}else if("ProductList"===e.route){const t=!this.isGranted("FINANCIAL_TENANT")&&this.user?.localCenter?.id?"local":"tenant",i={name:"ProductList",params:{type:e.params?.type||t}};this.$router.push(this.isLocalAdminMode?(0,Ws.Jk)(i,this.chapterContextId):i)}}else{let t={name:e.route};e.params&&(t.params=e.params),e.query&&(t.query={...e.query},delete t.query.hotlink),this.isLocalAdminMode&&e.requiresLocalCenter&&(t=(0,Ws.Jk)(t,this.chapterContextId));try{this.$router.push(t)}catch(i){console.warn(`Route '${e.route}' not found, trying as path`),this.$router.push({path:`/${e.route}`})}}},handleHotlinkNavigation(e){if("Web"===e.originalType||"Web"===e.type)return void window.open(e.path,"_blank");let t=e.path||"/",i={hotlink:e.label};if(t.startsWith("http://")||t.startsWith("https://"))try{const e=new URL(t);t=e.pathname,e.searchParams.forEach((e,t)=>{i[t]=e})}catch(a){console.warn("Failed to parse legacy URL:",t,a)}const s={...i,...e.queryParams||{}};js(this.$store,this.tenant?.slug,s.unit),this.$router.replace({path:t,query:s})},toggleItemExpanded(e){const t=e.route||e.label;this.expandedItems[t]=!this.expandedItems[t]},isItemExpanded(e){const t=e.route||e.label;return!!this.expandedItems[t]}
1,isFlyoutItem(e){return"flyout"===e.submenuType&&e.children&&e.children.length},getVisibleFlyoutChildren(e){return e.children?e.children.filter(e=>{if(!1===e.isActive)return!1;if(e.feature)try{if(!this.evaluateFeature(e.feature))return!1}catch(i){return!1}const t={CourseList:"courses.isActive",GazetteList:"officialGazette.isActive"};if(e.route&&t[e.route])try{if(!this.evaluateFeature(t[e.route]))return!1}catch(i){return!1}if(e.permission)if(e.permission.includes("||")){const t=e.permission.split("||").map(e=>e.trim());if(!t.some(e=>this.isGranted(e)))try{if(!this.evaluateFeature(e.permission))return!1}catch(i){return!1}}else if(!this.isGranted(e.permission))try{if(!this.evaluateFeature(e.permission))return!1}catch(i){return!1}return!0}):[]},isFlyoutChildActive(e){return!!e.children&&e.children.some(e=>"route"===e.type&&this.isRouteItemActive(e))},openFlyout(e,t){if(this.$isMobile()||this.isPortrait)return;if(this.cancelCloseFlyout(),!t)return;const i=t.$el||t,s=i.getBoundingClientRect();this.flyoutPosition={position:"fixed",left:s.right+"px",top:s.top+"px"},this.activeFlyout=e.label},scheduleCloseFlyout(){this.closeFlyoutTimer=setTimeout(()=>{this.activeFlyout=null,this.flyoutPosition=null},150)},cancelCloseFlyout(){this.closeFlyoutTimer&&(clearTimeout(this.closeFlyoutTimer),this.closeFlyoutTimer=null)},closeFlyoutNow(){this.cancelCloseFlyout(),this.activeFlyout=null,this.flyoutPosition=null},handleFlyoutChildClick(e){this.closeFlyoutNow(),this.handleItemClick(e)},handleFlyoutClick(e){if(this.closeFlyoutNow(),e.defaultRoute){const t=this.getVisibleFlyoutChildren(e).find(t=>t.route===e.defaultRoute);if(t)return void this.handleItemClick(t)}const t=this.getVisibleFlyoutChildren(e);t.length&&this.handleItemClick(t[0])},toggleCategory(e){this.categoryStates[e]=!this.categoryStates[e],"groups"!==e||this.categoryStates[e]||(this.filterText="",this.showGroupsSearch=!1),"projects"!==e||this.categoryStates[e]||(this.projectFilterText="",this.showProjectsSearch=!1)},canSeeContactsNav(){const e=this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT");return e||this.contactChaptersEnabled},withGroupCategories(e){const t=this.$store.state.spaces?.[this.tenant.slug]?.myGroups||[],i=new Map;if(t.forEach(e=>{e.category&&e.category.id&&!i.has(e.category.id)&&i.set(e.category.id,e.category)}),0===i.size)return e;const s=e.findIndex(e=>"groups"===e.id);if(-1===s)return e;const a=[];i.forEach(e=>{a.push({id:`group_category_${e.id}`,type:"dynamic_group_category",groupCategoryId:e.id,label:e.name})});const n=[...e];return n.splice(s+1,0,...a),n},isItemVisible(e){if(this.isGroupItem(e))return!0;if(this.isProjectItem(e))return!0;if(!e.isActive)return!1;if(this.isLocalAdminMode&&!e.requiresLocalCenter)return!1;if(this.isFlyoutItem(e))return this.getVisibleFlyoutChildren(e).length>0;if("discussions"===e.route)return!1;if("dashboard"===e.route)return!this.$isMobile()&&!this.isPortrait;if(!this.isMenuEntryAccessible(e))return!1;if(("contacts"===e.route||"ContactList"===e.route)&&!this.canSeeContactsNav())return!1;if(e.isHotlink&&e.selectedGroup){const t="true"===e.queryParams?.generalUnit||String(e.selectedGroup)===String(this.tenant?.id);if(!t){const t=this.$store.state.spaces?.[this.tenant.slug]?.myGroups||[],i=t.some(t=>String(t.id)===String(e.selectedGroup));if(!i)return!1}}if(e.requiresLocalCenter){if(this.isLocalAdminMode)return!!this.chapterContextId;if("community"!==this.sidebarMode&&this.isGranted("ADMIN_TENANT"))return!1;if(!this.user.localCenter)return!1}return!(e.requiresCompany&&!this.user.hasCompany)},handleAction(e){e.route&&this.$router.push({name:e.route})},handleComputedRoute(e){e.action&&this[e.action]?this[e.action]():e.route&&this.$router.push({name:e.route,params:e.params||{}})},redirectFeeTenantPayments(){this.$router.push({name:"FeePayments"})},openProfileFeeTab(){return this.tenant.settingFeatures.fees.fixedStartingDateFee||"preper"===this.tenant.slug?this.$router.push({name:"UserShowMyProfile",query:{tab:"fees"}}):this.$router.push({name:"UserShowMyProfile",query:{tab:"payments",subtab:"fees"}})},openCreateGroup(){return this.showGroupsSearch=!1,this.$router.push({name:"GroupCreate"})},openSearchGroup(){this.showGroupsSearch=!this.showGroupsSearch,this.filterText=""},loadLocalAdminCenterName(){this.isLocalAdminMode&&this.chapterContextId?this.user?.localCenter&&String(this.user.localCenter.id)===this.chapterContextId?this.localAdminCenterName=this.user.localCenter.name:(this.localAdminCenterName=null,this.$http.plain.get("/local_centers/"+this.chapterContextId).then(e=>{this.localAdminCenterName=e.data.name}).catch(e=>console.log(e))):this.localAdminCenterName=null},checkActiveVotes(){this.$http.plain.get("/has_live_votes").then(e=>{this.hasActiveVotes=e.data.hasLiveVotes}).catch(e=>console.error(e))}},computed:{...(0,L.L8)(["currentUserBelongToGroup","isGranted","user","tenant","userTypeEligibleForFee","isGrantedAdhesion","tenantLogo","isNativeApp","contactChaptersEnabled","isPortrait"]),hasWorkspaces(){return Object.values(this.$store.state.spaces).length>1&&(["localhost","app.orgo.space","demo.orgo.space"].includes(location.hostname)||location.hostname.includes("ngrok"))},sidebarMode(){return this.isCrmMode?"community":this.$store.state.sidebarMode},isCrmMode(){return!0===this.tenant?.settingMenu?.crmMode},crmShowGroups(){return this.isCrmMode&&!0===this.tenant?.settingMenu?.crmShowGroups},isLocalAdminMode(){return"localAdministration"===this.sidebarMode},chapterContextId(){const e=(0,Ws.hz)(this.$route);return e||(this.user?.localCenter?.id?String(this.user.localCenter.id):null)},chapterAdministrationLabel(){return this.localAdminCenterName||this.$t("Chapter Administration")},communityCategories(){if(!this.menuCategories)return[];if(this.isCrmMode){const e=this.crmShowGroups?this.withGroupCategories(this.menuCategories):this.menuCategories.filter(e=>"groups"!==e.id&&"dynamic_group_category"!==e.type);if(this.isGranted("ADMIN_TENANT")){const t={id:"ai_promo",collapsible:!1,items:[{type:"route",label:"Ask Orgo",icon:"fa-light fa-sparkles",route:"NaturalQuery",isAiBadge:!0,isActive:!0}]},i=e.findIndex(e=>"administration"===e.section||"finance"===e.id||"administrative"===e.id||"communication"===e.id);if(-1!==i){const s=[...e];return s.splice(i,0,t),s}return[...e,t]}return e}const e=this.menuCategories.filter(e=>"administration"!==e.section&&"finance"!==e.id&&"administrative"!==e.id);return this.withGroupCategories(e)},administrationCategories(){if(!this.menuCategories)return[];const e=this.menuCategories.filter(e=>"administration"===e.section||"finance"===e.id||"administrative"===e.id||"communication"===e.id);if(this.isGranted("ADMIN_TENANT")){const t={id:"ai_promo",collapsible:!1,items:[{type:"route",label:"Ask Orgo",icon:"fa-light fa-sparkles",route:"NaturalQuery",isAiBadge:!0,isActive:!0}]};return[t,...e]}return e},hasAdminAccess(){return this.isGranted("HR_LOCAL")||this.isGranted("COMMUNICATION_TENANT")||this.isGranted("FINANCIAL_LOCAL")||this.isGranted("HR_ASSISTANT_LOCAL")},administrationLabel(){const e=["ADMIN_TENANT","HR_TENANT","HR_ASSISTANT_TENANT","FINANCIAL_TENANT","COMMUNICATION_TENANT","EVENT_TENANT"];return e.some(e=>this.isGranted(e))?this.$t("Administration"):this.user?.localCenter?this.$t("Chapter Administration"):this.$t("Administration")},isLocalOnlineEligible(){return this.tenant?.settingFeatures?.onlinePayments?.isActive&&this.tenant?.settingFeatures?.onlinePayments?.isLocalActive&&(this.tenant?.settingFeatures?.onlinePayments?.allLocalsEligible||this.user?.localCenter?.isStripeEligible)},nonLocalUnitTypes(){return this.tenant.unitTypes.filter(e=>!e.isLocal)},logo(){let e=this.tenant.logo;return e?w.hd+w.DJ+"tenant/"+e:w.hd+w.DJ+"defaults/orgo-square.svg"},hasNewGroupButton(){return!!this.isGranted(this.tenant?.settingFeatures?.group?.whoCanCreate)&&!(this.tenant?.settingFeatures?.users?.guestUserTypeId&&this.user?.isGuest&&!this.isGranted("ADMIN_TENANT"))},hasNewProjectButton(){return!!this.tenant?.settingFeatures?.projectManagement?.isActive&&!(this.tenant?.settingFeatures?.users?.guestUserTypeId&&this.user?.isGuest&&!this.isGranted("ADMIN_TENANT"))},myProjects(){return this.$store.state.spaces?.[this.tenant.slug]?.myProjects||[]},myGroups(){return void 0!==this.$store.state.spaces[this.tenant.slug]&&void 0!==this.$store.state.spaces[this.tenant.slug].myGroups?this.$store.state.spaces[this.tenant.slug].myGroups.filter(e=>e.name.toLowerCase().includes(this.filterText.toLocaleLowerCase())&&e.id!==this.user?.localCenter?.id&&!e.isProject).toSorted((e,t)=>e.name.toLowerCase()<t.name.toLowerCase()?-1:1):[]}},components:{BAutocomplete:a.vB,FontAwesomeIcon:d.gc,AppSidebarMenuItem:hs,AppSidebarUserMenu:Bs,LogoThumbnail:Us.A}};const qs=(0,I.A)(zs,[["render",Yi],["__scopeId","data-v-015139d8"]]);var Js=qs;const Hs={key:2,class:"o-groups-list mt-5"},Ks={class:"o-allcard"},Ys={class:"logo-thumbnail o-userimg-xs"},Zs={class:"icon is-small"};function ea(e,t,i,s,a,n){const o=(0,k.g2)("AppSidebarMenu"),l=(0,k.g2)("AppSidebarEvent"),r=(0,k.g2)("font-awesome-icon");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)(["o-sidebar nice-scrollbar",{"sidebar-collapsed":e.$store.state.sidebarCollapsed}])},[!e.$route.meta?.hasAppSidebarMenu&&!e.$route.meta?.hasProductMenu||e.$store.state.hideAppSidebar?e.$route.meta?.hasEventSidebar&&!e.$store.state.hideAppSidebar?((0,k.uX)(),(0,k.CE)("div",{key:1,class:(0,E.C4)(["o-groups-list",{"sidebar-collapsed":e.$store.state.sidebarCollapsed}])},[(0,k.bF)(l,{"is-collapsed":e.$store.state.sidebarCollapsed},null,8,["is-collapsed"])],2)):e.$route.meta?.hasNoSidebar?((0,k.uX)(),(0,k.CE)("div",Hs,[(0,k.Lk)("div",Ks,["AdhesionForm"!==e.$route.name&&"Adhesion"!==e.$route.name?((0,k.uX)(),(0,k.CE)("article",{key:0,class:"o-groupcard",onClick:t[0]||(t[0]=e=>n.goBack())},[(0,k.Lk)("div",Ys,[(0,k.Lk)("span",Zs,[(0,k.bF)(r,{icon:"fa-light fa-arrow-left",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("back")),1)])):(0,k.Q3)("",!0)])])):(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",{key:0,class:(0,E.C4)(["o-groups-list",{"sidebar-collapsed":e.$store.state.sidebarCollapsed}])},[(0,k.bF)(o,{"is-collapsed":e.$store.state.sidebarCollapsed},null,8,["is-collapsed"])],2))],2)}const ta={class:"logo-thumbnail o-userimg-xs"},ia={class:"icon is-small"},sa={key:0,class:"sidebar-section ml-5 mb-3 event-title"},aa={class:"logo-thumbnail o-userimg-xs"},na={class:"icon is-small"},oa={class:"logo-thumbnail o-userimg-xs"},la={class:"icon is-small"},ra={class:"logo-thumbnail o-userimg-xs"},da={class:"icon is-small"},ca={class:"logo-thumbnail o-userimg-xs"},ua={class:"icon is-small"},ma={class:"logo-thumbnail o-userimg-xs"},pa={class:"icon is-small"},ha={class:"logo-thumbnail o-userimg-xs"},ga={class:"icon is-small"},fa={class:"logo-thumbnail o-userimg-xs"},ba={class:"icon is-small"},ya={class:"logo-thumbnail o-userimg-xs"},va={class:"icon is-small"},ka={class:"logo-thumbnail o-userimg-xs"},Ca={class:"icon is-small"},La={class:"logo-thumbnail o-userimg-xs"},wa={class:"icon is-small"},_a={class:"logo-thumbnail o-userimg-xs"},Ea={class:"icon is-small"},$a={class:"logo-thumbnail o-userimg-xs"},Fa={class:"icon is-small"},Ta={class:"logo-thumbnail o-userimg-xs"},Sa={class:"icon is-small"},Aa={class:"logo-thumbnail o-userimg-xs"},Pa={class:"icon is-small"},Ia={class:"logo-thumbnail o-userimg-xs"},Ma={class:"icon is-small"},xa={class:"logo-thumbnail o-userimg-xs"},Na={class:"icon is-small"},Ua={class:"logo-thumbnail o-userimg-xs"},Da={class:"icon is-small"},Xa={class:"logo-thumbnail o-userimg-xs"},Va={class:"icon is-small"},Ra={class:"logo-thumbnail o-userimg-xs"},Oa={class:"icon is-small"},Qa={class:"logo-thumbnail o-userimg-xs"},Ba={class:"icon is-small"},Ga={class:"logo-thumbnail o-userimg-xs"},Wa={class:"icon is-small"},ja={class:"logo-thumbnail o-userimg-xs"},za={class:"icon is-small"},qa={class:"modal-card"},Ja={class:"modal-card-head"},Ha={class:"modal-card-title"},Ka={class:"modal-card-body"},Ya={class:"mb-4"},Za={key:0,value:null},en=["value"],tn={class:"modal-card-foot is-justify-content-flex-end"};function sn(e,t,i,s,a,n){const o=(0,k.g2)("b-loading"),l=(0,k.g2)("font-awesome-icon"),r=(0,k.g2)("b-tooltip"),d=(0,k.g2)("b-select"),c=(0,k.g2)("b-field"),u=(0,k.g2)("b-button"),m=(0,k.g2)("b-modal");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)(["o-allcard",{"sidebar-collapsed":i.isCollapsed}])},[(0,k.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,k.bF)(r,{label:e.$t("Events"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[1]||(t[1]=(...e)=>n.goToEventList&&n.goToEventList(...e))},[(0,k.Lk)("div",ta,[(0,k.Lk)("span",ia,[(0,k.bF)(l,{icon:"fa-light fa-arrow-left",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Events")),1)])]),_:1},8,["label","active"]),(0,k.Lk)("hr",{class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed}])},null,2),a.event&&!i.isCollapsed?((0,k.uX)(),(0,k.CE)("div",sa,(0,E.v_)(a.event.name),1)):(0,k.Q3)("",!0),!a.event||e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:1,label:e.$t("modify"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventUpdate"===e.$route.name}]),onClick:t[2]||(t[2]=e=>n.goToRoute("EventUpdate"))},[(0,k.Lk)("div",aa,[(0,k.Lk)("span",na,[(0,k.bF)(l,{icon:"fa-light fa-pen",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("modify")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),(0,k.bF)(r,{label:e.$t("View event"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventShow"===e.$route.name}]),onClick:t[3]||(t[3]=e=>n.goToRoute("EventShow"))},[(0,k.Lk)("div",oa,[(0,k.Lk)("span",la,[(0,k.bF)(l,{icon:"fa-light fa-calendar",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("View event")),1)],2)]),_:1},8,["label","active"]),a.event&&a.event.location?((0,k.uX)(),(0,k.Wv)(r,{key:2,label:e.$t("Event app"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":n.isEventAppActive}]),onClick:t[4]||(t[4]=e=>n.goToRoute("EventAppAgenda"))},[(0,k.Lk)("div",ra,[(0,k.Lk)("span",da,[(0,k.bF)(l,{icon:"fa-light fa-mobile-screen",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Event app")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),(0,k.Lk)("hr",{class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed}])},null,2),!a.event||e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:3,label:e.$t("attenders"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventAttend"===e.$route.name}]),onClick:t[5]||(t[5]=e=>n.goToRoute("EventAttend"))},[(0,k.Lk)("div",ca,[(0,k.Lk)("span",ua,[(0,k.bF)(l,{icon:"fa-light fa-users",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("attenders")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),n.isTrainingEvent?((0,k.uX)(),(0,k.Wv)(r,{key:4,label:e.$t("trainers"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventTrainers"===e.$route.name}]),onClick:t[6]||(t[6]=e=>n.goToRoute("EventTrainers"))},[(0,k.Lk)("div",ma,[(0,k.Lk)("span",pa,[(0,k.bF)(l,{icon:"fa-light fa-chalkboard-user",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("trainers")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),a.event&&a.event.settings&&a.event.settings.enableSpeakers?((0,k.uX)(),(0,k.Wv)(r,{key:5,label:e.$t("Speakers"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventSpeakers"===e.$route.name}]),onClick:t[7]||(t[7]=e=>n.goToRoute("EventSpeakers"))},[(0,k.Lk)("div",ha,[(0,k.Lk)("span",ga,[(0,k.bF)(l,{icon:"fa-light fa-microphone-lines",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Speaker
1s")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),a.event&&a.event.hasNetworking&&e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:6,label:e.$t("Networking spaces"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventNetworkingSpaces"===e.$route.name}]),onClick:t[8]||(t[8]=e=>n.goToRoute("EventNetworkingSpaces"))},[(0,k.Lk)("div",fa,[(0,k.Lk)("span",ba,[(0,k.bF)(l,{icon:"fa-light fa-handshake",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Networking spaces")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),!a.event||e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:7,label:e.$t("Agenda"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventAgenda"===e.$route.name}]),onClick:t[9]||(t[9]=e=>n.goToRoute("EventAgenda"))},[(0,k.Lk)("div",ya,[(0,k.Lk)("span",va,[(0,k.bF)(l,{icon:"fa-light fa-list-check",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Agenda")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),!a.event||e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:8,label:e.$t("Votes"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":n.isVotesActive}]),onClick:t[10]||(t[10]=e=>n.goToRoute("EventVotes"))},[(0,k.Lk)("div",ka,[(0,k.Lk)("span",Ca,[(0,k.bF)(l,{icon:"fa-light fa-check-to-slot",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Votes")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),a.event&&e.isGrantedOwner(a.event)&&a.event.requiresRegistrationForm?((0,k.uX)(),(0,k.Wv)(r,{key:9,label:e.$t("Registration form"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventRegistrationForm"===e.$route.name}]),onClick:t[11]||(t[11]=e=>n.goToRoute("EventRegistrationForm"))},[(0,k.Lk)("div",La,[(0,k.Lk)("span",wa,[(0,k.bF)(l,{icon:"fa-light fa-clipboard-list-check",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Registration form")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),n.showTicketingSettings?((0,k.uX)(),(0,k.Wv)(r,{key:10,label:e.$t("Tickets"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventTicketingSettings"===e.$route.name}]),onClick:t[12]||(t[12]=e=>n.goToRoute("EventTicketingSettings"))},[(0,k.Lk)("div",_a,[(0,k.Lk)("span",Ea,[(0,k.bF)(l,{icon:"fa-light fa-ticket",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Tickets")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),n.showTicketingSettings?((0,k.uX)(),(0,k.Wv)(r,{key:11,label:e.$t("Orders"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventPayments"===e.$route.name}]),onClick:t[13]||(t[13]=(...e)=>n.goToPayments&&n.goToPayments(...e))},[(0,k.Lk)("div",$a,[(0,k.Lk)("span",Fa,[(0,k.bF)(l,{icon:"fa-light fa-receipt",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("payments")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),a.event&&e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:12,label:e.$t("Analytics"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventAnalytics"===e.$route.name}]),onClick:t[14]||(t[14]=e=>n.goToRoute("EventAnalytics"))},[(0,k.Lk)("div",Ta,[(0,k.Lk)("span",Sa,[(0,k.bF)(l,{icon:"fa-light fa-chart-line",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Analytics")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),!(e.isGranted("EVENT_TENANT")||e.isGranted("EVENT_LOCAL")||e.isGranted("COMMUNICATION_TENANT"))||a.event&&!e.isGrantedOwner(a.event)?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.Wv)(r,{key:13,label:e.$t("Send email"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":n.isMessagesActive}]),onClick:t[15]||(t[15]=(...e)=>n.goToNewsletter&&n.goToNewsletter(...e))},[(0,k.Lk)("div",Aa,[(0,k.Lk)("span",Pa,[(0,k.bF)(l,{icon:"fa-light fa-envelope",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Messages")),1)],2)]),_:1},8,["label","active"])),a.event&&"draft"!==a.event.status&&a.event.isPublic?((0,k.uX)(),(0,k.Wv)(r,{key:14,label:e.$t("view"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[16]||(t[16]=e=>n.openPublicPage())},[(0,k.Lk)("div",Ia,[(0,k.Lk)("span",Ma,[(0,k.bF)(l,{icon:"fa-light fa-globe-pointer",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Landing page")),1)])]),_:1},8,["label","active"])):(0,k.Q3)("",!0),a.event&&"draft"===a.event.status&&a.event.isPublic&&!0===a.event.canEditEvent?((0,k.uX)(),(0,k.Wv)(r,{key:15,label:e.$t("Preview public page"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[17]||(t[17]=e=>n.openPublicPage({preview:!0}))},[(0,k.Lk)("div",xa,[(0,k.Lk)("span",Na,[(0,k.bF)(l,{icon:"fa-light fa-globe-pointer",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Preview public page")),1)])]),_:1},8,["label","active"])):(0,k.Q3)("",!0),a.event&&"draft"!==a.event.status&&a.event.isPublic?((0,k.uX)(),(0,k.Wv)(r,{key:16,label:e.$t("Copy link"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"is-disabled":a.isCopyingLink}]),onClick:t[18]||(t[18]=(...e)=>n.shareLink&&n.shareLink(...e))},[(0,k.Lk)("div",Ua,[(0,k.Lk)("span",Da,[a.isCopyingLink?((0,k.uX)(),(0,k.Wv)(l,{key:0,icon:"fa-light fa-spinner-third",class:"menu_item_blue fa-spin"})):a.linkCopied?((0,k.uX)(),(0,k.Wv)(l,{key:1,icon:"fa-light fa-check",class:"menu_item_blue"})):((0,k.uX)(),(0,k.Wv)(l,{key:2,icon:"fa-light fa-link",class:"menu_item_blue"}))])]),(0,k.Lk)("h3",null,(0,E.v_)(a.linkCopied?e.$t("Copied!"):e.$t("Copy link")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),e.tenant.settingFeatures.events.hasEventReport?((0,k.uX)(),(0,k.Wv)(r,{key:17,label:e.$t("report"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:(0,E.C4)(["o-groupcard",{"groupcard-active":"EventReportUpdate"===e.$route.name}]),onClick:t[19]||(t[19]=e=>n.goToRoute("EventReportUpdate"))},[(0,k.Lk)("div",Xa,[(0,k.Lk)("span",Va,[(0,k.bF)(l,{icon:"fa-light fa-file-chart-line",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("report")),1)],2)]),_:1},8,["label","active"])):(0,k.Q3)("",!0),(0,k.Lk)("hr",{class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed}])},null,2),!a.event||e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:18,label:e.$t("Duplicate Event"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[20]||(t[20]=(...e)=>n.openDuplicateModal&&n.openDuplicateModal(...e))},[(0,k.Lk)("div",Ra,[(0,k.Lk)("span",Oa,[(0,k.bF)(l,{icon:"fa-light fa-copy",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Duplicate Event")),1)])]),_:1},8,["label","active"])):(0,k.Q3)("",!0),e.isGranted("ADMIN_TENANT")?((0,k.uX)(),(0,k.Wv)(r,{key:19,label:e.$t("Save as Template"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[21]||(t[21]=(...e)=>n.promptSaveAsTemplate&&n.promptSaveAsTemplate(...e))},[(0,k.Lk)("div",Qa,[(0,k.Lk)("span",Ba,[(0,k.bF)(l,{icon:"fa-light fa-floppy-disk",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Save as Template")),1)])]),_:1},8,["label","active"])):(0,k.Q3)("",!0),e.isGranted("ADMIN_TENANT")?((0,k.uX)(),(0,k.Wv)(r,{key:20,label:e.$t("Email Templates"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[22]||(t[22]=(...e)=>n.goToEmailTemplates&&n.goToEmailTemplates(...e))},[(0,k.Lk)("div",Ga,[(0,k.Lk)("span",Wa,[(0,k.bF)(l,{icon:"fa-light fa-envelope-open",class:"menu_item_blue"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("Email Templates")),1)])]),_:1},8,["label","active"])):(0,k.Q3)("",!0),(0,k.Lk)("hr",{class:(0,E.C4)(["mt-3 mb-2",{"collapsed-separator":i.isCollapsed}])},null,2),a.event&&e.isGrantedOwner(a.event)?((0,k.uX)(),(0,k.Wv)(r,{key:21,label:e.$t("delete"),position:"is-right",active:i.isCollapsed,type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("article",{class:"o-groupcard",onClick:t[23]||(t[23]=(...e)=>n.confirmDelete&&n.confirmDelete(...e))},[(0,k.Lk)("div",ja,[(0,k.Lk)("span",za,[(0,k.bF)(l,{icon:"fa-light fa-trash",class:"menu_item_red"})])]),(0,k.Lk)("h3",null,(0,E.v_)(e.$t("delete")),1)])]),_:1},8,["label","active"])):(0,k.Q3)("",!0),(0,k.bF)(m,{modelValue:a.showDuplicateModal,"onUpdate:modelValue":t[27]||(t[27]=e=>a.showDuplicateModal=e),"has-modal-card":"","trap-focus":"","destroy-on-hide":!0,"aria-role":"dialog","aria-modal":""},{default:(0,k.k6)(()=>[(0,k.Lk)("div",qa,[(0,k.Lk)("header",Ja,[(0,k.Lk)("p",Ha,(0,E.v_)(e.$t("Duplicate Event")),1),(0,k.Lk)("button",{type:"button",class:"delete",onClick:t[24]||(t[24]=e=>a.showDuplicateModal=!1)})]),(0,k.Lk)("section",Ka,[(0,k.Lk)("p",Ya,(0,E.v_)(e.$t("Select the group where you want to create the duplicate event.")),1),(0,k.bF)(c,{label:e.$t("Target group")},{default:(0,k.k6)(()=>[(0,k.bF)(d,{modelValue:a.duplicateTargetUnit,"onUpdate:modelValue":t[25]||(t[25]=e=>a.duplicateTargetUnit=e),placeholder:e.$t("Select a group"),expanded:""},{default:(0,k.k6)(()=>[n.hasGeneralUnitAccess?((0,k.uX)(),(0,k.CE)("option",Za,(0,E.v_)(e.$t("No group (tenant level)")),1)):(0,k.Q3)("",!0),((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(n.duplicateGroups,e=>((0,k.uX)(),(0,k.CE)("option",{key:e.id,value:e["@id"]},(0,E.v_)(e.name),9,en))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),(0,k.Lk)("footer",tn,[(0,k.bF)(u,{label:e.$t("Cancel"),"is-rounded":"",onClick:t[26]||(t[26]=e=>a.showDuplicateModal=!1)},null,8,["label"]),(0,k.bF)(u,{type:"is-primary","is-rounded":"",loading:a.isDuplicating,label:e.$t("Duplicate"),onClick:n.duplicateEvent},null,8,["loading","label","onClick"])])])]),_:1},8,["modelValue"])],2)}var an=i(36049),nn={name:"AppSidebarEvent",props:{isCollapsed:{type:Boolean,default:!1}},data(){return{event:null,isLoading:!1,isCopyingLink:!1,linkCopied:!1,showDuplicateModal:!1,isDuplicating:!1,duplicateTargetUnit:void 0,isSavingTemplate:!1}},computed:{...(0,L.L8)(["isGranted","isGrantedOwner","tenant","user"]),eventUuid(){return this.$route.query.eventUuid||this.$route.params.item},showTicketingSettings(){return this.event&&this.event.hasEventTicketing&&(this.isGranted("FINANCIAL_TENANT")||this.isGranted("EVENT_TENANT"))},isTrainingEvent(){return this.event&&this.event.type&&this.tenant.settingFeatures.events.trainingEventType&&this.tenant.settingFeatures.events.trainingEventType==this.event.type.id},myGroups(){return this.$store.state.spaces?.[this.tenant?.slug]?.myGroups||[]},hasGeneralUnitAccess(){const e=this.tenant?.settingFeatures?.events;return!!e?.whoCanPostPublic&&this.isGranted(e.whoCanPostPublic)},duplicateGroups(){return this.myGroups.filter(e=>"LocalCenter"===e["@type"]||"Group"===e["@type"])},isMessagesActive(){const e=this.$route.name;return"EventMessageList"===e||"EventMessageCreate"===e||!("NewsletterUpdate"!==e&&"NewsletterBuilder"!==e&&"NewsletterShow"!==e||!this.$route.query.eventUuid)},isVotesActive(){const e=this.$route.name;return"EventVotes"===e||"VoteShow"===e&&!!this.$route.query.eventUuid},isEventAppActive(){return"string"===typeof this.$route.name&&this.$route.name.startsWith("EventApp")}},watch:{eventUuid:{immediate:!0,handler(e){e&&this.loadEvent(e)}}},mounted(){window.addEventListener("event-updated",this.onEventUpdated)},beforeUnmount(){window.removeEventListener("event-updated",this.onEventUpdated)},methods:{openDuplicateModal(){const e=this.event?.unit,t="string"===typeof e?e:e?.["@i
1d"];t&&this.duplicateGroups.some(e=>e["@id"]===t)?this.duplicateTargetUnit=t:!e&&this.hasGeneralUnitAccess&&(this.duplicateTargetUnit=null),this.showDuplicateModal=!0},copyToClipboardAsync:_.bm,onEventUpdated(e){e.detail?.uuid===this.eventUuid&&this.loadEvent(this.eventUuid)},loadEvent(e){this.isLoading=!0,this.$http.plain.get("/events/"+e).then(e=>{this.event=e.data}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},goToRoute(e){this.$route.name!==e&&this.$router.push({name:e,params:{item:this.eventUuid}})},goToEventList(){if("contact"===this.user?.kind)return this.$router.push({name:"EventAppMyEvents"});let e=this.$store.state.currentGroup;return e&&!["generalUnit"].includes(e)?this.$router.push({name:"EventList",query:{unit:e.id}}):"generalUnit"===e?this.$router.push({name:"EventList",query:{generalUnit:1}}):this.$router.push({name:"EventList"})},goToNewsletter(){this.event&&this.$router.push({name:"EventMessageList",params:{item:this.$route.params.item,eventTitle:this.event.name}})},goToPayments(){"EventPayments"!==this.$route.name&&this.event&&this.event.product&&this.$router.push({name:"EventPayments",params:{item:this.eventUuid},query:{productUuid:this.event.product.uuid}})},openPublicPage({preview:e=!1}={}){const t=this.$router.resolve((0,an._p)(this.eventUuid,this.tenant,{preview:e}));window.open(t.href,"_blank")},shareLink(){this.isCopyingLink||(this.isCopyingLink=!0,this.linkCopied=!1,this.$http.plain.patch(`/event-go-publish/${this.eventUuid}`,{}).then(e=>{if(!e.data.slugGo)return void this.$buefy.toast.open({message:this.$t("Action failed. Please try again!"),type:"is-warning",duration:1500,actionText:null});const t="https://"+this.tenant.appHost+"/share/"+e.data.slugGo;return this.copyToClipboardAsync(t).then(e=>{e?(this.linkCopied=!0,setTimeout(()=>{this.linkCopied=!1},2e3)):this.$buefy.toast.open({message:this.$t("Couldn't copy to clipboard"),type:"is-danger",duration:500,onClose:()=>{alert(t)}})})}).catch(e=>{console.log(e)}).finally(()=>{this.isCopyingLink=!1}))},confirmDelete(){this.$buefy.dialog.confirm({title:this.$t("deleting")+" "+this.$t("event"),message:this.$t("confirmDelete")+" "+this.event.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete")+" "+this.$t("event"),type:"is-danger",onConfirm:()=>this.deleteEvent()})},duplicateEvent(){this.isDuplicating||(this.isDuplicating=!0,this.$http.plain.post(`/events/${this.eventUuid}/duplicate`,{unit:this.duplicateTargetUnit||null}).then(e=>{this.showDuplicateModal=!1,this.duplicateTargetUnit=void 0,this.$buefy.toast.open({message:this.$t("Event duplicated successfully"),type:"is-success"}),this.$router.push({name:"EventUpdate",params:{item:e.data.uuid}})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.detail||this.$t("An error occurred"),type:"is-danger"})}).finally(()=>{this.isDuplicating=!1}))},promptSaveAsTemplate(){this.$buefy.dialog.prompt({title:this.$t("Save as Template"),message:this.$t("Enter a name for the template"),inputAttrs:{placeholder:this.event?.name||"",value:this.event?.name||""},confirmText:this.$t("Save"),cancelText:this.$t("Cancel"),trapFocus:!0,onConfirm:e=>{this.saveAsTemplate(e)}})},saveAsTemplate(e){this.isSavingTemplate||(this.isSavingTemplate=!0,this.$http.plain.post(`/events/${this.eventUuid}/save-as-template`,{name:e}).then(()=>{this.$buefy.toast.open({message:this.$t("Template saved successfully"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.detail||this.$t("An error occurred"),type:"is-danger"})}).finally(()=>{this.isSavingTemplate=!1}))},goToEmailTemplates(){this.$router.push({name:"EmailTemplates",query:{category:"events"}})},deleteEvent(){this.isLoading=!0,this.$http.plain.delete("/events/"+this.eventUuid).then(()=>{this.$router.push({name:"EventList"}),this.$buefy.toast.open(this.$t("deleted"))}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.detail||e.response?.data?.["hydra:description"]||this.$t("An error occurred"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})}}};const on=(0,I.A)(nn,[["render",sn],["__scopeId","data-v-2cd99350"]]);var ln=on,rn={name:"AppSidebar",components:{AppSidebarMenu:Js,AppSidebarEvent:ln},data(){return{isLoading:!1}},computed:{...(0,L.L8)(["isGranted","user","tenant","isCustomDomain"])},created(){this.$store.state.isLoadingGeneral=!1,this.$store.state.sideMenuOpen=!0},methods:{goBack(){return window.history.length>2?this.$router.go(-1):this.$router.push({name:"DiscussList"})}}};const dn=(0,I.A)(rn,[["render",ea]]);var cn=dn,un=i(67124);const mn={class:"menu pl-3"},pn={class:"search-trigger-wrapper"},hn={class:"icon"},gn={class:"search-text"},fn={class:"keyboard-hint"},bn={key:0},yn={key:1},vn={class:"menu-label mt-0"},kn={class:"menu-list"},Cn={key:0},Ln={key:1},wn={class:"menu-label"},_n={class:"menu-list"},En={key:0},$n={class:"menu-label"},Fn={class:"menu-list"},Tn={key:0},Sn={key:1},An={key:2},Pn={key:3},In={class:"menu-label"},Mn={class:"menu-list"},xn={key:0},Nn={key:1},Un={href:"https://docs.orgo.space",target:"_blank"};function Dn(e,t,i,s,a,n){const o=(0,k.g2)("font-awesome-icon"),l=(0,k.g2)("router-link");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)(["tenant-settings-sidebar nice-scrollbar",{"settings-mobile":a.isMobile,"settings-show":n.isMobileSettingsSidebarOpen}])},[(0,k.Lk)("div",mn,[(0,k.Lk)("div",pn,[(0,k.Lk)("button",{class:"search-trigger is-rounded",onClick:t[0]||(t[0]=t=>e.$emit("open-search"))},[(0,k.Lk)("span",hn,[(0,k.bF)(o,{icon:"fa-light fa-magnifying-glass"})]),(0,k.Lk)("span",gn,(0,E.v_)(e.$t("Search settings...")),1),(0,k.Lk)("span",fn,[n.isMac?((0,k.uX)(),(0,k.CE)("kbd",bn,"â")):((0,k.uX)(),(0,k.CE)("kbd",yn,"Ctrl")),t[1]||(t[1]=(0,k.Lk)("kbd",null,"K",-1))])])]),(0,k.Lk)("p",vn,(0,E.v_)(e.$t("Organization")),1),(0,k.Lk)("ul",kn,[(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantUpdate"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("menu.organisationInfo")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantBranding"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Branding")),1)]),_:1})]),e.isGranted("ADMIN_TENANT")&&n.isWebsiteBuilderEnabled?((0,k.uX)(),(0,k.CE)("li",Cn,[(0,k.bF)(l,{to:{name:"WebsiteAdmin"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Website")),1)]),_:1})])):(0,k.Q3)("",!0),e.isGranted("ADMIN_TENANT")?((0,k.uX)(),(0,k.CE)("li",Ln,[(0,k.bF)(l,{to:{name:"TenantUsage"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Usage & Billing")),1)]),_:1})])):(0,k.Q3)("",!0)]),(0,k.Lk)("p",wn,(0,E.v_)(e.$t("Modules")),1),(0,k.Lk)("ul",_n,[(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleUsersConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Users & Profiles")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleContactsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Contacts")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleEventsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Events")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleDiscussionsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Discussions")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleGroupsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Groups & Teams")),1)]),_:1})]),e.tenant?.settingFeatures?.drive?.isActive?((0,k.uX)(),(0,k.CE)("li",En,[(0,k.bF)(l,{to:{name:"ModuleDriveConfig"}}
1,{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Files & eDocuments")),1)]),_:1})])):(0,k.Q3)("",!0),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleEmailsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Emails & Notifications")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleProfessionsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Professions")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModulePaymentsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Payments & Fees")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleGamificationConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Gamification & Courses")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleHelpdeskConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Helpdesk")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleProjectsConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Projects")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleVotingConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Voting")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleIdentityValidationConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Identity Validation")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleCompanyConfig"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Companies")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"ModuleFormBuilderConfig"}}
1,{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Form Builder")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantSettingFeatures"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("All Modules")),1)]),_:1})])]),(0,k.Lk)("p",$n,(0,E.v_)(e.$t("Customization")),1),(0,k.Lk)("ul",Fn,[(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"WorkflowList"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Workflows")),1)]),_:1})]),e.tenant.settingFeatures.eDocuments.isActive?((0,k.uX)(),(0,k.CE)("li",Tn,[(0,k.bF)(l,{to:{name:"DocumentList"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("eDocuments templates")),1)]),_:1})])):(0,k.Q3)("",!0),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantCustomDomain"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Custom Domain")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantLanguages"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Languages")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantTexts"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("menu.texts")),1)]),_:1})]),e.tenant.settingFeatures.terminology?.isActive?((0,k.uX)(),(0,k.CE)("li",Sn,[(0,k.bF)(l,{to:{name:"TenantTerminology"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Terminology")),1)]),_:1})])):(0,k.Q3)("",!0),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"CustomMenuList"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Menu Organizer")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"DashboardBuilder"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Dashboard builder")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"DashboardWelcomeTemplate"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Dashboard Welcome")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantImport"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Import")),1)]),_:1})]),!0===e.tenant.demo?((0,k.uX)(),(0,k.CE)("li",An,[(0,k.bF)(l,{to:{name:"TenantImportDemo"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Demo Data")),1)]),_:1})])):(0,k.Q3)("",!0),!0===e.tenant.demo?((0,k.uX)(),(0,k.CE)("li",Pn,[(0,k.bF)(l,{to:{name:"TenantProvisioning"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("AI Provisioning")),1)]),_:1})])):(0,k.Q3)("",!0)]),(0,k.Lk)("p",In,(0,E.v_)(e.$t("Developers")),1),(0,k.Lk)("ul",Mn,[(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantSettingsIntegrations"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Third-party Integrations")),1)]),_:1})]),e.tenant.settingFeatures.api.isActive?((0,k.uX)(),(0,k.CE)("li",xn,[(0,k.bF)(l,{to:{name:"ApiTokens"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("API Tokens")),1)]),_:1})])):(0,k.Q3)("",!0),e.tenant.settingFeatures.api.isActive?((0,k.uX)(),(0,k.CE)("li",Nn,[(0,k.bF)(l,{to:{name:"AppList"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("OAuth Apps")),1)]),_:1})])):(0,k.Q3)("",!0),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"WebhookList"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Webhooks")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"MergeIndex"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Merge Records")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.bF)(l,{to:{name:"TenantLogs"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Logs")),1)]),_:1})]),(0,k.Lk)("li",null,[(0,k.Lk)("a",Un,(0,E.v_)(e.$t("API Documentation")),1)])])])],2)}var Xn=i(99357),Vn={name:"SettingsMenuTenant",emits:["open-search"],data(){return{isMobile:window.innerWidth<768}},computed:{...(0,L.L8)(["tenant","user","isGranted"]),isWebsiteBuilderEnabled(){return(0,Xn.m)(this.tenant)},isMac(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isMobileSettingsSidebarOpen(){return this.$store.state.isMobileSettingsSidebarOpen}},watch:{"$route.path":{handler(){this.$nextTick(()=>{this.removeClassFromTags()})}}},mounted(){window.addEventListener("resize",this.updateIsMobile)},unmounted(){window.removeEventListener("resize",this.updateIsMobile)},methods:{updateIsMobile(){this.isMobile=window.innerWidth<768},removeClassFromTags(){const e="menu-item-class",t="router-link-exact-active",i="router-link-active",s="is-active",a="is-selected",n=document.querySelectorAll(`.${e}`);
1n.forEach(e=>{e.classList.contains(a)||(e.classList.remove(t),e.classList.remove(i),e.classList.remove(s))})},isActiveTab(e){return this.$route.name===e}}};const Rn=(0,I.A)(Vn,[["render",Dn],["__scopeId","data-v-5bc0b3b6"]]);var On=Rn;const Qn={key:0,class:"notification-sidebar"},Bn={key:0,class:"notification-loading-container"},Gn={key:1,class:"notification-header"},Wn={class:"notification-title"},jn={key:2,class:"notification-content"},zn=["onClick"],qn={class:"notification-item-body"},Jn={class:"notification-item-text"},Hn={class:"has-text-weight-semibold"},Kn={class:"has-text-grey-dark"},Yn={key:0,class:"has-text-weight-semibold"},Zn={class:"has-text-grey-dark"},eo={class:"has-text-weight-semibold"},to={class:"notification-item-time"},io={key:0,class:"notification-empty"},so={class:"notification-empty-icon"},ao={key:1,class:"notification-end"};function no(e,t,i,a,n,o){const l=(0,k.g2)("b-loading"),r=(0,k.g2)("font-awesome-icon"),d=(0,k.g2)("LogoThumbnail");return(0,k.uX)(),(0,k.CE)("div",null,[(0,k.bF)(s.eB,{name:"overlay-fade"},{default:(0,k.k6)(()=>[i.isOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"notification-overlay",onClick:t[0]||(t[0]=(...e)=>o.close&&o.close(...e))})):(0,k.Q3)("",!0)]),_:1}),(0,k.bF)(s.eB,{name:"slide",onAfterEnter:o.onAfterEnter},{default:(0,k.k6)(()=>[i.isOpen?((0,k.uX)(),(0,k.CE)("div",Qn,[n.contentReady?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",Bn,[(0,k.bF)(l,{modelValue:n.isInitialLoading,"onUpdate:modelValue":t[1]||(t[1]=e=>n.isInitialLoading=e),"is-full-page":!1},null,8,["modelValue"])])),n.contentReady?((0,k.uX)(),(0,k.CE)("div",Gn,[(0,k.Lk)("h2",Wn,(0,E.v_)(e.$t("yourNotifications")),1),(0,k.Lk)("button",{class:"notification-close-btn","aria-label":"close",onClick:t[2]||(t[2]=(...e)=>o.close&&o.close(...e))},[(0,k.bF)(r,{icon:"fa-light fa-times"})])])):(0,k.Q3)("",!0),n.contentReady?((0,k.uX)(),(0,k.CE)("div",jn,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(n.items,i=>((0,k.uX)(),(0,k.CE)("div",{key:i.id,class:"notification-item",onClick:e=>o.redirectToTragetPage(i.notification.metadata)},[o.triggerPrincipal(i.notification)?((0,k.uX)(),(0,k.Wv)(d,{key:0,item:o.triggerPrincipal(i.notification),"is-type":"roundSmall","is-inline":!0},null,8,["item"])):(0,k.Q3)("",!0),(0,k.Lk)("div",qn,[(0,k.Lk)("p",Jn,[(0,k.Lk)("span",Hn,(0,E.v_)(o.triggerPrincipal(i.notification)?.fullName),1),t[6]||(t[6]=(0,k.eW)(" "+(0,E.v_)(" ")+" ",-1)),(0,k.Lk)("span",Kn,(0,E.v_)(e.$t(i.notification.metadata.event)),1),i.notification.metadata.targetTitle&&i.notification.metadata.targetTitle!==i.notification.metadata.event&&"connection"!==i.notification.metadata.type?((0,k.uX)(),(0,k.CE)("span",Yn,' "'+(0,E.v_)(o.truncateTitle(i.notification.metadata.targetTitle))+'" ',1)):(0,k.Q3)("",!0),i.notification.metadata.unitName?((0,k.uX)(),(0,k.CE)(k.FK,{key:1},[(0,k.Lk)("span",Zn,(0,E.v_)(e.$t("in group")),1),t[5]||(t[5]=(0,k.eW)(" "+(0,E.v_)(" ")+" ",-1)),(0,k.Lk)("span",eo,(0,E.v_)(i.notification.metadata.unitName),1)],64)):(0,k.Q3)("",!0)]),(0,k.Lk)("span",to,(0,E.v_)(e.$filters.fromNow(i.notification.createdAt)),1)])],8,zn))),128)),(0,k.bF)(l,{modelValue:n.isLoadingMore,"onUpdate:modelValue":t[3]||(t[3]=e=>n.isLoadingMore=e),"is-full-page":!1},null,8,["modelValue"]),0!==n.items.length||n.isLoadingMore?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",io,[(0,k.Lk)("span",so,[(0,k.bF)(r,{icon:"fa-light fa-bell-slash"})]),(0,k.Lk)("p",null,(0,E.v_)(e.$t("No notifications yet")),1)])),n.items.length>=10&&n.finishedNotifications?((0,k.uX)(),(0,k.CE)("div",ao,[(0,k.Lk)("a",{onClick:t[4]||(t[4]=(...e)=>o.scrollToTop&&o.scrollToTop(...e))},(0,E.v_)(e.$t("backToTop")),1)])):(0,k.Q3)("",!0)])):(0,k.Q3)("",!0)])):(0,k.Q3)("",!0)]),_:1},8,["onAfterEnter"])])}var oo={props:{isOpen:{type:Boolean,required:!0}},data(){return{items:[],itemsTotal:0,itemPageCurrent:1,finishedNotifications:!1,nextPage:1,isInitialLoading:!0,isLoadingMore:!1,scrollContainer:null,contentReady:!1}},watch:{isOpen(e){e?(this.items=[],this.nextPage=1,this.finishedNotifications=!1,this.contentReady=!1,this.isInitialLoading=!0,document.body.classList.add("notification-sidebar-open")):document.body.classList.remove("notification-sidebar-open")}},mounted(){this.$nextTick(()=>{this.scrollContainer=document.querySelector(".notification-content"),this.scrollContainer&&this.scrollContainer.addEventListener("scroll",this.handleScroll)})},beforeUnmount(){this.scrollContainer&&this.scrollContainer.removeEventListener("scroll",this.handleScroll),document.body.classList.remove("notification-sidebar-open")},methods:{onAfterEnter(){setTimeout(()=>{this.retrieve(),this.$nextTick(()=>{this.scrollContainer=document.querySelector(".notification-content"),this.scrollContainer&&this.scrollContainer.addEventListener("scroll",this.handleScroll)})},50)},close(){this.$emit("close")},handleScroll(){if(!this.scrollLock&&!this.finishedNotifications&&this.scrollContainer){const e=this.scrollContainer.scrollTop+this.scrollContainer.clientHeight>=this.scrollContainer.scrollHeight-100;e&&(this.scrollLock=!0,this.retrieve())}},retrieve(){const e=1===this.nextPage;e||(this.isLoadingMore=!0),this.$http.plain.get("/notification_users?order[notification.id]=DESC",{params:{page:this.nextPage}}).then(t=>{t.data["hydra:member"].map(e=>this.items.push(e)),this.itemsTotal=t.data["hydra:totalItems"],this.checkIfLastPage(t.data)&&(this.finishedNotifications=!0),this.$store.commit("unseenNotificationsCount",{tenantSlug:this.tenant.slug,value:0}),this.scrollLock=!1,this.nextPage++,e&&setTimeout(()=>{this.contentReady=!0,this.isInitialLoading=!1},100)}).catch(e=>console.error(e)).finally(()=>{e||(this.isLoadingMore=!1)})},triggerPrincipal(e){return e.triggerUser||e.triggerUserContact||null},truncateTitle(e){const t=e.trim();return t.length>60?t.slice(0,60).trim()+"â¦":t},redirectToTragetPage(e){if(this.close(),"file"===e.type){const t=this.$router.resolve({name:"DriveItem",params:{item:e.targetId}});return window.open(t.href,"_blank"),null}return this.$router.push(e.targetRoute)},checkIfLastPage(e){return 0===e["hydra:totalItems"]||e["hydra:view"]&&!e["hydra:view"].hasOwnProperty("hydra:last")||e["hydra:view"]&&e["hydra:view"]["@id"]===e["hydra:view"]["hydra:last"]},scrollToTop(){this.scrollContainer&&this.scrollContainer.scrollTo(0,0)}},computed:{...(0,L.L8)(["user","isLoadingButton","tenant"])},components:{LogoThumbnail:Us.A}};const lo=(0,I.A)(oo,[["render",no],["__scopeId","data-v-727e2bf3"]]);var ro=lo;const co=["aria-label"],uo={class:"theme-sidebar-header"},mo={class:"theme-sidebar-title"},po={class:"theme-sidebar-actions"},ho=["aria-label"],go=["title","aria-pressed"],fo=["title","aria-pressed"],bo=["aria-label"],yo={class:"theme-sidebar-content nice-scrollbar"};function vo(e,t,i,a,n,o){const l=(0,k.g2)("font-awesome-icon"),r=(0,k.g2)("ThemePicker");return(0,k.uX)(),(0,k.CE)("div",null,[(0,k.bF)(s.eB,{name:"theme-slide"},{default:(0,k.k6)(()=>[i.isOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"theme-sidebar",role:"dialog","aria-modal":"false","aria-label":e.$t("Theme appearance")},[(0,k.Lk)("div",uo,[(0,k.Lk)("h2",mo,(0,E.v_)(e.$t("Theme appearance")),1),(0,k.Lk)("div",po,[(0,k.Lk)("div",{class:"orgo-segmented-toggle",role:"group","aria-label":e.$t("Theme mode")},[(0,k.Lk)("button",{class:(0,E.C4)(["orgo-segmented-option",{"is-active":!o.isDarkMode}]),title:e.$t("Switch light mode"),"aria-pressed":!o.isDarkMode,onClick:t[0]||(t[0]=e=>o.setMode("light"))},[(0,k.bF)(l,{icon:"fa-light fa-sun-bright"})],10,go),(0,k.Lk)("button",{class:(0,E.C4)(["orgo-segmented-option",{"is-active":o.isDarkMode}]),title:e.$t("Switch dark mode"),"aria-pressed":o.isDarkMode,onClick:t[1]||(t[1]=e=>o.setMode("dark"))},[(0,k.bF)(l,{icon:"fa-light fa-moon-stars"})],10,fo)],8,ho),(0,k.Lk)("button",{class:"theme-sidebar-close-btn","aria-label":e.$t("close"),onClick:t[2]||(t[2]=t=>e.$emit("close"))},[(0,k.bF)(l,{icon:"fa-light fa-times"})],8,bo)])]),(0,k.Lk)("div",yo,[(0,k.bF)(r,{ref:"themePicker","show-note":!0},null,512)])],8,co)):(0,k.Q3)("",!0)]),_:1})])}var ko=i(74581),Co={name:"ThemeSidebar",components:{ThemePicker:ko.A,FontAwesomeIcon:d.gc},props:{isOpen:{type:Boolean,default:!1}},emits:["close"],computed:{...(0,L.L8)(["user"]),isDarkMode(){return"dark"===this.$store.state.theme}},watch:{isOpen(e){e?document.addEventListener("keydown",this.onKeydown):document.removeEventListener("keydown",this.onKeydown)}},beforeUnmount(){document.removeEventListener("keydown",this.onKeydown)},methods:{onKeydown(e){"Escape"===e.key&&this.$emit("close")},setMode(e){if("dark"===e===this.isDarkMode)return;this.$store.commit("switchTheme",e);const t="dark"===e?"midnight":"default";if(this.$nextTick(()=>{this.$refs.themePicker?.applyPickerSelection(t)}),!this.user)return;const i=this.user.notificationSettings||{};i.prefTheme=e,this.user.notificationSettings=i,this.$http.plain.patch("/profile-update/"+this.user.id,{notificationSettings:i}).then(()=>{}).catch(e=>console.log(e))}}};const Lo=(0,I.A)(Co,[["render",vo],["__scopeId","data-v-bc92428e"]]);var wo=Lo;const _o={class:"admin-search-modal"},Eo={class:"search-header"},$o={class:"search-input-wrapper"},Fo={class:"icon search-icon"},To=["placeholder"],So={class:"search-results nice-scrollbar"},Ao={key:0,class:"search-sections"},Po={key:0,class:"search-section"},Io={class:"section-header"},Mo={class:"section-title"},xo={class:"section-items"},No=["onClick","onMouseenter"],Uo={class:"item-content"},Do={class:"item-name"},Xo={class:"item-breadcrumb"},Vo={class:"item-type-badge"},Ro={class:"search-section"},Oo={class:"section-header"},Qo={class:"section-title"},Bo={class:"section-items"},Go=["onClick","onMouseenter"],Wo={class:"item-content"},jo={class:"item-name"},zo={class:"item-description"},qo={key:1,class:"search-sections"},Jo={key:0,class:"search-section"},Ho={class:"section-header"},Ko={class:"section-title"},Yo={class:"section-items"},Zo=["onClick","onMouseenter"],el={class:"item-content"},tl={class:"item-name"},il={class:"item-breadcrumb"},sl={class:"item-type-badge"},al={key:1,class:"search-section"},nl={class:"section-header"},ol={class:"section-title"},ll={class:"section-items"},rl=["onClick","onMouseenter"],dl={class:"item-icon"},cl={class:"item-content"},ul={class:"item-name"},ml={class:"item-breadcrumb"},pl={class:"item-type-badge"},hl={key:2,class:"search-section"},gl={class:"section-header"},fl={class:"section-title"},bl={class:"section-items"},yl=["onClick","onMouseenter"],vl={class:"item-icon"},kl={class:"item-content"},Cl={class:"item-name"},Ll={class:"item-breadcrumb"},wl={class:"item-type-badge"},_l={key:3,class:"search-section"},El={class:"section-header"},$l={class:"section-title"}
1,Fl={class:"section-items"},Tl=["onClick","onMouseenter"],Sl={class:"item-icon"},Al={class:"item-content"},Pl={class:"item-name"},Il={class:"item-breadcrumb"},Ml={class:"item-type-badge"},xl={key:2,class:"no-results"},Nl={class:"icon is-large"},Ul={class:"hint"},Dl={class:"search-footer"},Xl={class:"footer-hints"},Vl={class:"hint-item"},Rl={class:"hint-item"},Ol={class:"hint-item"};function Ql(e,t,i,a,n,o){const l=(0,k.g2)("font-awesome-icon");return o.isOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"admin-search-modal-overlay",onClick:t[6]||(t[6]=(0,s.D$)((...e)=>o.close&&o.close(...e),["self"]))},[(0,k.Lk)("div",_o,[(0,k.Lk)("div",Eo,[(0,k.Lk)("div",$o,[(0,k.Lk)("span",Fo,[(0,k.bF)(l,{icon:"fa-light fa-magnifying-glass"})]),(0,k.bo)((0,k.Lk)("input",{ref:"searchInput","onUpdate:modelValue":t[0]||(t[0]=e=>n.searchQuery=e),type:"text",class:"search-input",placeholder:e.$t("Search settings..."),onKeydown:[t[1]||(t[1]=(0,s.jR)((0,s.D$)((...e)=>o.navigateDown&&o.navigateDown(...e),["prevent"]),["down"])),t[2]||(t[2]=(0,s.jR)((0,s.D$)((...e)=>o.navigateUp&&o.navigateUp(...e),["prevent"]),["up"])),t[3]||(t[3]=(0,s.jR)((0,s.D$)((...e)=>o.selectItem&&o.selectItem(...e),["prevent"]),["enter"])),t[4]||(t[4]=(0,s.jR)((...e)=>o.close&&o.close(...e),["esc"]))]},null,40,To),[[s.Jo,n.searchQuery]]),t[7]||(t[7]=(0,k.Lk)("span",{class:"keyboard-shortcut"},[(0,k.Lk)("kbd",null,"esc")],-1))])]),(0,k.Lk)("div",So,[n.searchQuery?o.filteredResults.length>0?((0,k.uX)(),(0,k.CE)("div",qo,[o.groupedResults.modules.length>0?((0,k.uX)(),(0,k.CE)("div",Jo,[(0,k.Lk)("div",Ho,[(0,k.Lk)("span",Ko,(0,E.v_)(e.$t("Modules")),1)]),(0,k.Lk)("div",Yo,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.groupedResults.modules,t=>((0,k.uX)(),(0,k.CE)("div",{key:t.route||t.name,class:(0,E.C4)(["search-item",{"is-selected":n.selectedIndex===o.getItemIndex(t)}]),onClick:e=>o.navigateToItem(t),onMouseenter:e=>n.selectedIndex=o.getItemIndex(t)},[(0,k.Lk)("span",{class:"item-icon",style:(0,E.Tr)(t.iconColor?{color:t.iconColor}:{})},[(0,k.bF)(l,{icon:t.icon||"fa-light fa-folder"},null,8,["icon"])],4),(0,k.Lk)("div",el,[(0,k.Lk)("span",tl,(0,E.v_)(e.$t(t.nameKey||t.name)),1),(0,k.Lk)("span",il,(0,E.v_)(t.breadcrumb),1)]),(0,k.Lk)("span",sl,(0,E.v_)(o.getTypeBadge(t.type)),1)],42,Zo))),128))])])):(0,k.Q3)("",!0),o.groupedResults.pages.length>0?((0,k.uX)(),(0,k.CE)("div",al,[(0,k.Lk)("div",nl,[(0,k.Lk)("span",ol,(0,E.v_)(e.$t("Pages")),1)]),(0,k.Lk)("div",ll,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.groupedResults.pages,t=>((0,k.uX)(),(0,k.CE)("div",{key:t.route||t.name,class:(0,E.C4)(["search-item",{"is-selected":n.selectedIndex===o.getItemIndex(t)}]),onClick:e=>o.navigateToItem(t),onMouseenter:e=>n.selectedIndex=o.getItemIndex(t)},[(0,k.Lk)("span",dl,[(0,k.bF)(l,{icon:t.icon||"fa-light fa-file"},null,8,["icon"])]),(0,k.Lk)("div",cl,[(0,k.Lk)("span",ul,(0,E.v_)(e.$t(t.nameKey||t.name)),1),(0,k.Lk)("span",ml,(0,E.v_)(t.breadcrumb),1)]),(0,k.Lk)("span",pl,(0,E.v_)(o.getTypeBadge(t.type)),1)],42,rl))),128))])])):(0,k.Q3)("",!0),o.groupedResults.submenus.length>0?((0,k.uX)(),(0,k.CE)("div",hl,[(0,k.Lk)("div",gl,[(0,k.Lk)("span",fl,(0,E.v_)(e.$t("Submenus")),1)]),(0,k.Lk)("div",bl,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.groupedResults.submenus,t=>((0,k.uX)(),(0,k.CE)("div",{key:t.route||t.name,class:(0,E.C4)(["search-item",{"is-selected":n.selectedIndex===o.getItemIndex(t)}]),onClick:e=>o.navigateToItem(t),onMouseenter:e=>n.selectedIndex=o.getItemIndex(t)},[(0,k.Lk)("span",vl,[(0,k.bF)(l,{icon:t.icon||"fa-light fa-chevron-right"},null,8,["icon"])]),(0,k.Lk)("div",kl,[(0,k.Lk)("span",Cl,(0,E.v_)(e.$t(t.nameKey||t.name)),1),(0,k.Lk)("span",Ll,(0,E.v_)(t.breadcrumb),1)]),(0,k.Lk)("span",wl,(0,E.v_)(o.getTypeBadge(t.type)),1)],42,yl))),128))])])):(0,k.Q3)("",!0),o.groupedResults.settings.length>0?((0,k.uX)(),(0,k.CE)("div",_l,[(0,k.Lk)("div",El,[(0,k.Lk)("span",$l,(0,E.v_)(e.$t("Settings")),1)]),(0,k.Lk)("div",Fl,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.groupedResults.settings,t=>((0,k.uX)(),(0,k.CE)("div",{key:t.key||t.name,class:(0,E.C4)(["search-item",{"is-selected":n.selectedIndex===o.getItemIndex(t)}]),onClick:e=>o.navigateToItem(t),onMouseenter:e=>n.selectedIndex=o.getItemIndex(t)},[(0,k.Lk)("span",Sl,[(0,k.bF)(l,{icon:"fa-light fa-sliders"}
1)]),(0,k.Lk)("div",Al,[(0,k.Lk)("span",Pl,(0,E.v_)(e.$t(t.name)),1),(0,k.Lk)("span",Il,(0,E.v_)(t.breadcrumb),1)]),(0,k.Lk)("span",Ml,(0,E.v_)(o.getTypeBadge(t.type)),1)],42,Tl))),128))])])):(0,k.Q3)("",!0)])):n.searchQuery?((0,k.uX)(),(0,k.CE)("div",xl,[(0,k.Lk)("span",Nl,[(0,k.bF)(l,{icon:"fa-light fa-face-thinking"})]),(0,k.Lk)("p",null,(0,E.v_)(e.$t("No settings found for"))+' "'+(0,E.v_)(n.searchQuery)+'"',1),(0,k.Lk)("p",Ul,(0,E.v_)(e.$t("Try searching for modules, pages, or specific settings")),1)])):(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",Ao,[n.recentSearches.length>0?((0,k.uX)(),(0,k.CE)("div",Po,[(0,k.Lk)("div",Io,[(0,k.Lk)("span",Mo,(0,E.v_)(e.$t("Recent")),1),(0,k.Lk)("button",{class:"clear-recent is-rounded",onClick:t[5]||(t[5]=(...e)=>o.clearRecent&&o.clearRecent(...e))},(0,E.v_)(e.$t("Clear")),1)]),(0,k.Lk)("div",xo,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(n.recentSearches,(t,i)=>((0,k.uX)(),(0,k.CE)("div",{key:"recent-"+i,class:(0,E.C4)(["search-item",{"is-selected":n.selectedIndex===i}]),onClick:e=>o.navigateToItem(t),onMouseenter:e=>n.selectedIndex=i},[(0,k.Lk)("span",{class:"item-icon",style:(0,E.Tr)(t.iconColor?{color:t.iconColor}:{})},[(0,k.bF)(l,{icon:o.getItemIcon(t)},null,8,["icon"])],4),(0,k.Lk)("div",Uo,[(0,k.Lk)("span",Do,(0,E.v_)(e.$t(t.nameKey||t.name)),1),(0,k.Lk)("span",Xo,(0,E.v_)(t.breadcrumb),1)]),(0,k.Lk)("span",Vo,(0,E.v_)(o.getTypeBadge(t.type)),1)],42,No))),128))])])):(0,k.Q3)("",!0),(0,k.Lk)("div",Ro,[(0,k.Lk)("div",Oo,[(0,k.Lk)("span",Qo,(0,E.v_)(e.$t("Quick Access")),1)]),(0,k.Lk)("div",Bo,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.quickAccessItems,(t,i)=>((0,k.uX)(),(0,k.CE)("div",{key:"quick-"+t.route,class:(0,E.C4)(["search-item",{"is-selected":n.selectedIndex===n.recentSearches.length+i}]),onClick:e=>o.navigateToItem(t),onMouseenter:e=>n.selectedIndex=n.recentSearches.length+i},[(0,k.Lk)("span",{class:"item-icon",style:(0,E.Tr)(t.iconColor?{color:t.iconColor}:{})},[(0,k.bF)(l,{icon:t.icon},null,8,["icon"])],4),(0,k.Lk)("div",Wo,[(0,k.Lk)("span",jo,(0,E.v_)(e.$t(t.nameKey||t.name)),1),(0,k.Lk)("span",zo,(0,E.v_)(e.$t(t.description)),1)])],42,Go))),128))])])]))]),(0,k.Lk)("div",Dl,[(0,k.Lk)("div",Xl,[(0,k.Lk)("span",Vl,[(0,k.Lk)("kbd",null,[(0,k.bF)(l,{icon:"fa-light fa-arrow-up"})]),(0,k.Lk)("kbd",null,[(0,k.bF)(l,{icon:"fa-light fa-arrow-down"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("to navigate")),1)]),(0,k.Lk)("span",Rl,[(0,k.Lk)("kbd",null,[(0,k.bF)(l,{icon:"fa-light fa-arrow-turn-down-left"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("to select")),1)]),(0,k.Lk)("span",Ol,[t[8]||(t[8]=(0,k.Lk)("kbd",null,"esc",-1)),(0,k.Lk)("span",null,(0,E.v_)(e.$t("to close")),1)])])])])])):(0,k.Q3)("",!0)}const Bl={organization:[{type:"page",name:"Organisation Info",nameKey:"menu.organisationInfo",description:"Organization name, logo, and basic information",route:"TenantUpdate",icon:"fa-light fa-building",section:"Organization",keywords:["organization","info","name","logo","organizatie","informatii"]},{type:"page",name:"Branding",nameKey:"Branding",description:"Colors, themes, and visual identity",route:"TenantBranding",icon:"fa-light fa-palette",section:"Organization",keywords:["branding","colors","theme","logo","culori","tema"]},{type:"page",name:"Website",nameKey:"Website",description:"Public website pages, menus and design",route:"WebsiteAdmin",icon:"fa-light fa-globe",section:"Organization",featureFlag:"website.isActive",keywords:["website","site","pages","menu","homepage","pagini","meniu","sait"]},{type:"page",name:"Reports",nameKey:"Reports",description:"Build custom spreadsheet reports from members, payments, events and more",route:"ReportList",icon:"fa-light fa-file-chart-line",section:"Organization",keywords:["reports","report","export","csv","spreadsheet","rapoarte","raport","export"]}],modules:[{type:"module",name:"Users & Profiles",nameKey:"Users & Profiles",description:"Manage user profiles, registration, and member information",route:"ModuleUsersConfig",icon:"fa-light fa-user",iconColor:"#3273dc",section:"Modules",keywords:["users","profiles","members","utilizatori","profil","membri"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleUsersConfig",icon:"fa-light fa-cog"},{name:"Custom Fields",nameKey:"Custom Fields",route:"ModuleUsersCustomFields",icon:"fa-light fa-list-check"},{name:"Tags",nameKey:"Tags",route:"ModuleUsersTags",icon:"fa-light fa-tag"},{name:"Roles & User types",nameKey:"Roles & User types",route:"ModuleUsersRoles",icon:"fa-light fa-user-shield",featureFlag:"users.hasRoles"},{name:"Registration Form",nameKey:"Registration Form",route:"ModuleUsersUserTypeForms",icon:"fa-light fa-file-lines",featureFlag:"users.hasRegistrationForm"},{name:"Profile Form",nameKey:"Profile Form",route:"ModuleUsersFormsProfile",icon:"fa-light fa-id-card"},{name:"Adhesion Form",nameKey:"Adhesion Form",route:"ModuleAdhesionFormsProfile",icon:"fa-light fa-id-card",featureFlag:"adhesion.isActive"},{name:"Adhesion Template",nameKey:"Adhesion Template",route:"ModuleAdhesionTemplate",icon:"fa-light fa-file-code",featureFlag:"adhesion.isActive"},{name:"Referral Program",nameKey:"Referral Program",route:"ModuleUsersReferral",icon:"fa-light fa-users-between-lines",featureFlag:"referral.isActive"},{name:"Registration Waitlist",nameKey:"Registration Waitlist",route:"ModuleUsersWaitlist",icon:"fa-light fa-hourglass-half",featureFlag:"waitlist.isActive"},{name:"Security & Permissions",nameKey:"Security & Permissions",route:"ModuleUsersSecurityPermissions",icon:"fa-light fa-shield-check"}],settings:[{key:"hasUserTypes",label:"Enable User Types",section:"User Types & Roles",keywords:["user types","tipuri utilizatori"]},{key:"hasRoles",label:"Enable Roles",section:"User Types & Roles",keywords:["roles","roluri"]},{key:"hasVolunteerRoles",label:"Enable Volunteer Roles",section:"User Types & Roles",keywords:["volunteer","voluntar"]},{key:"whoCanSeeUserType",label:"Who Can See User Types",section:"User Types & Roles",keywords:["visibility","vizibilitate"]},{key:"whoCanFilterUsersByType",label:"Who Can Filter Users by Type",section:"User Types & Roles",keywords:["filter","filtru","user type","tip utilizator"]},{key:"defaultUserTypeIdAfterRegistration",label:"Default User Type After Registration",section:"User Types & Roles",keywords:["default","implicit"]},{key:"guestUserTypeId",label:"Guest User Type",section:"User Types & Roles",keywords:["guest","vizitator"]},{key:"hasRegistrationForm",label:"Enable Registration Form",section:"Registration & Membership",keywords:["registration","inregistrare","formular"]},{key:"hasManualApprove",label:"Manual Approval",section:"Registration & Membership",keywords:["approval","aprobare","manual"]},{key:"hasFullMembership",label:"Full Membership Status",section:"Registration & Membership",keywords:["membership","membru complet"]},{key:"dateJoinedEqualsDateFullMember",label:"Join Date = Full Member Date",section:"Registration & Membership",keywords:["date","data"]},{key:"sendWelcomeMessageOnStatusActive",label:"Send Welcome Message",section:"Registration & Membership",keywords:["welcome","bun venit","mesaj"]},{key:"notifyAdminsOfNewRegistrations",label:"Notify Admins of New Registrations",section:"Registration & Membership",keywords:["notify","notificare","admin"]},{key:"canReactivateAccountOnLogin",label:"Allow Account Reactivation",section:"Registration & Membership",keywords:["reactivate","reactivare","cont"]},{key:"defaultStatusForAdminRegistration",label:"Default Status for Admin-Created Users",section:"Registration & Membership",keywords:["status","admin"]},{key:"hasUserInvitation",label:"Enable User Invitations",section:"User Invitations",keywords:["invitation","invitatie"]},{key:"whoCanSendUserInvitation",label:"Who Can Send Invitations",section:"User Invitations",keywords:["send","trimite"]},{key:"hasFamilyMembers",label:"Enable Family Members",section:"Family & Relationships",keywords:["family","familie"]},{key:"hasFamilyNonMembers",label:"Non-Member Family Profiles",section:"Family & Relationships",keywords:["non-member","non-membru"]},{key:"childrenAuthRestrictionAge",label:"Children Auth Restriction Age",section:"Family & Relationships",keywords:["children","copii","varsta"]},{key:"childrenMinRegistrationAge",label:"Minimum Registration Age",section:"Family & Relationships",keywords:["minimum","age","varsta"]},{key:"hasCardId",label:"Enable Card/Member IDs",section:"Profile Settings",keywords:["card","id","legitimatie"]},{key:"hasOrganisationalChart",label:"Organizational Chart",section:"Profile Settings",keywords:["chart","organigrama"]},{key:"hasListFieldAge",label:"Show Age in Lists",section:"Profile Settings",keywords:["age","varsta","lista"]},{key:"adminCanChangeProfileImage",label:"Admin Can Change Profile Images",section:"Profile Settings",keywords:["image","imagine","poza"]},{key:"nameDisplayLastNameFirst",label:"Display Last Name First",section:"Profile Settings",keywords:["name","nume","display"]},{key:"profileCompletionEnabled",label:"Profile Completion Enabled",section:"Profile Settings",keywords:["completion","completare","profil"]},{key:"seeMembersInGeneralUnitGroup",label:"Who Can See Members in General Groups",section:"Privacy & Visibility",keywords:["see","visibility","vizibilitate"]},{key:"seeMembersInLocalCenter",label:"Who Can See Local Center Members",section:"Privacy & Visibility",keywords:["local","center","centru"]},{key:"privatizeUserProfiles",label:"Restrict Profiles to Shared Local Centers",section:"Privacy & Visibility",keywords:["private","restrict","privat"]},{key:"allowLocalAdminsToModifyUserPermissions",label:"Allow Local Admins to Modify User Permissions",section:"Privacy & Visibility",keywords:["local","admin","permissions"]},{key:"customHomepage",label:"Custom Homepage URL",section:"Advanced Settings",keywords:["homepage","pagina principala"]},{key:"anonymousHomepage",label:"Anonymous Homepage URL",section:"Advanced Settings",keywords:["anonymous","anonim"]}]},{type:"module",name:"Contacts",nameKey:"Contacts",description:"Manage external
1contacts and CRM",route:"ModuleContactsConfig",icon:"fa-light fa-address-book",iconColor:"#2ecc71",section:"Modules",keywords:["contacts","crm","contacte"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleContactsConfig",icon:"fa-light fa-cog"},{name:"Contact Statuses",nameKey:"Contact Statuses",route:"ModuleContactsStatuses",icon:"fa-light fa-list-check",featureFlag:"contacts.hasStatuses"}],settings:[]},{type:"module",name:"Events",nameKey:"Events",description:"Event management and calendar",route:"ModuleEventsConfig",icon:"fa-light fa-calendar",iconColor:"#48c774",section:"Modules",keywords:["events","calendar","evenimente","calendar"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleEventsConfig",icon:"fa-light fa-cog"},{name:"Event Types",nameKey:"Event Types",route:"ModuleEventsEventTypes",icon:"fa-light fa-tags"},{name:"Event Statuses",nameKey:"Event Statuses",route:"ModuleEventsEventStatuses",icon:"fa-light fa-list-check",featureFlag:"events.hasCustomStatuses"},{name:"Attendance Reminder",nameKey:"Attendance Reminder",route:"ModuleEventsAttendanceReminder",icon:"fa-light fa-bell",featureFlag:"events.sendAttendanceReminder"}],settings:[{key:"whoCanPostPublic",label:"Who Can Create Public Events",section:"Basic Configuration",keywords:["public","create","crea"]},{key:"trainingEventType",label:"Training Event Type",section:"Basic Configuration",keywords:["training","antrenament"]},{key:"generalMeetingEventType",label:"General Meeting Event Type",section:"Basic Configuration",keywords:["meeting","intalnire"]},{key:"hasCustomStatuses",label:"Enable Custom Statuses",section:"Basic Configuration",keywords:["custom","statuses","statusuri"]},{key:"hasTicketOnlinePayments",label:"Online Ticket Payments",section:"Ticketing & Payments",keywords:["ticket","bilet","payment"]},{key:"hasEventReport",label:"Event Reports",section:"Reporting & Analytics",keywords:["report","raport"]},{key:"hasAnnualReport",label:"Annual Event Reports",section:"Reporting & Analytics",keywords:["annual","anual"]},{key:"hasSDG",label:"Sustainable Development Goals (SDG)",section:"Additional Features",keywords:["sdg","sustainable","development"]},{key:"sendAttendanceReminder",label:"Enable Attendance Reminder",section:"Additional Features",keywords:["attendance","prezenta","reminder"]},{key:"sendBulkInvites",label:"Bulk Invites",section:"Additional Features",keywords:["bulk","invites","invitatii"]},{key:"propagateEventsAllToLocalCenters",label:"Propagate Events to Local Centers",section:"Additional Features",keywords:["propagate","local"]}]},{type:"module",name:"Discussions",nameKey:"Discussions",description:"Forum and discussion management",route:"ModuleDiscussionsConfig",icon:"fa-light fa-comments",iconColor:"#ff3860",section:"Modules",keywords:["discussions","forum","discutii"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleDiscussionsConfig",icon:"fa-light fa-cog"},{name:"Discussion Categories",nameKey:"Discussion Categories",route:"ModuleDiscussionsCategories",icon:"fa-light fa-folder",featureFlag:"discussions.hasNamespaces"}],settings:[{key:"whoCanPostPublic",label:"Who Can Create Public Discussions",section:"Basic Configuration",keywords:["public","create"]},{key:"hasNamespaces",label:"Enable Discussion Namespaces",section:"Basic Configuration",keywords:["namespaces","categorii"]}]},{type:"module",name:"Groups & Teams",nameKey:"Groups & Teams",description:"Group and team management",route:"ModuleGroupsConfig",icon:"fa-light fa-users",iconColor:"#9b59b6",section:"Modules",keywords:["groups","teams","grupuri","echipe"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleGroupsConfig",icon:"fa-light fa-cog"},{name:"Group Categories",nameKey:"Group Categories",route:"ModuleGroupsCategories",icon:"fa-light fa-folder",featureFlag:"groups.hasGroupCategories"},{name:"Unit Types",nameKey:"Unit Types",route:"ModuleGroupsUnitTypes",icon:"fa-light fa-sitemap",featureFlag:"groups.hasUnits"},{name:"Local Centers",nameKey:"Local Centers",route:"ModuleLocalCentersConfig",icon:"fa-light fa-building",featureFlag:"localCenter.isActive"},{name:"Regions",nameKey:"Regions",route:"ModuleLocalCentersRegions",icon:"fa-light fa-map",featureFlag:"localCenter.hasRegions"}],settings:[{key:"hasGroupCategories",label:"Enable Group Categories",section:"Group Types & Organization",keywords:["categories","categorii"]},{key:"hasRoleGroups",label:"Enable Role Groups",section:"Group Types & Organization",keywords:["role","rol"]},{key:"hasUnits",label:"Enable Organizational Units",section:"Group Types & Organization",keywords:["units","unitati"]},{key:"hasTasks",label:"Group Tasks",section:"Group Features",keywords:["tasks","task-uri"]},{key:"hasAllMembersGroup",label:"All Members Group",section:"Group Features",keywords:["all members","toti membri"]}]},{type:"module",name:"Files & eDocuments",nameKey:"Files & eDocuments",description:"File storage and document management",route:"ModuleDriveConfig",icon:"fa-light fa-folder-open",iconColor:"#3498db",section:"Modules",keywords:["files","documents","fisiere","documente","drive"],featureFlag:"drive.isActive",submenus:[{name:"Drive",nameKey:"Drive",route:"ModuleDriveConfig",icon:"fa-light fa-hard-drive"},{name:"Official Gazette",nameKey:"Official Gazette",route:"ModuleOfficialGazetteConfig",icon:"fa-light fa-newspaper"},{name:"eDocuments",nameKey:"eDocuments",route:"ModuleEDocumentsConfig",icon:"fa-light fa-file-contract"},{name:"eDocuments Templates",nameKey:"eDocuments Templates",route:"ModuleEDocumentsTemplates",icon:"fa-light fa-file-code"}],settings:[]},{type:"module",name:"Emails & Notifications",nameKey:"Emails & Notifications",description:"Email campaigns and notification settings",route:"ModuleEmailsConfig",icon:"fa-light fa-envelopes",iconColor:"#3498db",section:"Modules",keywords:["emails","notifications","emailuri","notificari","newsletter","contact form","formular de contact"],submenus:[{name:"Email Campaigner",nameKey:"Email Campaigner",route:"ModuleEmailsConfig",icon:"fa-light fa-paper-plane"},{name:"Notification Preferences",nameKey:"Notification Preferences",route:"ModuleEmailsNotifications",icon:"fa-light fa-bell"},{name:"System Emails",nameKey:"System Emails",route:"ModuleEmailsSystem",icon:"fa-light fa-toggle-on"},{name:"Email Templates",nameKey:"Email Templates",route:"ModuleEmailsTemplates",icon:"fa-light fa-file-lines"},{name:"Campaigns Templates",nameKey:"Campaigns Templates",route:"NewsletterTemplateSelection",icon:"fa-light fa-palette"}
1,{name:"Campaigns",nameKey:"Campaigns",route:"NewsletterList",icon:"fa-light fa-bullhorn"},{name:"Campaigns Gallery",nameKey:"Campaigns Gallery",route:"NewsletterGalleryList",icon:"fa-light fa-images"},{name:"Contact forms",nameKey:"Contact forms",route:"ContactWidgetList",icon:"fa-light fa-envelope-open-text"},{name:"Contact messages",nameKey:"Contact messages",route:"ContactRequestList",icon:"fa-light fa-inbox"}],settings:[{key:"hasAutoSubscribe",label:"Auto-subscribe to newsletter",route:"ModuleEmailsConfig",section:"Newsletter Management",keywords:["newsletter","auto","subscribe","abonare","opt-in"]},{key:"defaultNewsletter",label:"Newsletter Notifications",section:"Notification Defaults",keywords:["newsletter","buletin"]},{key:"defaultPush",label:"Push Notifications",section:"Notification Defaults",keywords:["push","notificari"]},{key:"defaultEmailComment",label:"Email Notifications: Comments",section:"Notification Defaults",keywords:["email","comments","comentarii"]},{key:"defaultEmailIssue",label:"Email Notifications: Tasks",section:"Notification Defaults",keywords:["email","tasks","task-uri"]},{key:"defaultEmailVote",label:"Email Notifications: Votes",section:"Notification Defaults",keywords:["email","votes","voturi"]},{key:"defaultEmailEvent",label:"Email Notifications: Events",section:"Notification Defaults",keywords:["email","events","evenimente"]},{key:"defaultEmailDiscussion",label:"Email Notifications: Discussions",section:"Notification Defaults",keywords:["email","discussions","discutii"]},{key:"systemEmails.welcome",label:"Welcome Email",section:"System Emails",keywords:["welcome","bun venit","system","sistem"]},{key:"systemEmails.registration",label:"Registration Confirmation",section:"System Emails",keywords:["registration","inregistrare","confirmation","system"]},{key:"systemEmails.userInvitation",label:"User Invitation",section:"System Emails",keywords:["invitation","invitatie","user","system"]},{key:"systemEmails.userCreatedByAdmin",label:"User Created by Admin",section:"System Emails",keywords:["admin","created","creat","system"]},{key:"systemEmails.newMemberNotification",label:"New Member Admin Notification",section:"System Emails",keywords:["new member","membru nou","admin","notification"]},{key:"systemEmails.membershipRenewalReminders",label:"Membership Renewal Reminders",section:"System Emails",keywords:["membership","renewal","reinnoire","reminder"]},{key:"systemEmails.membershipPaymentSuccess",label:"Membership Payment Success",section:"System Emails",keywords:["payment","plata","success","membership"]},{key:"systemEmails.membershipPaymentFailed",label:"Membership Payment Failed",section:"System Emails",keywords:["payment","plata","failed","esuat","membership"]},{key:"systemEmails.adhesionNotifications",label:"Adhesion Notifications",section:"System Emails",keywords:["adhesion","adeziune","application","system"]},{key:"systemEmails.identityValidation",label:"Identity Validation Emails",section:"System Emails",keywords:["identity","identitate","validation","verificare"]},{key:"systemEmails.eventInvitation",label:"Event Invitations",section:"System Emails",keywords:["event","eveniment","invitation","invitatie"]},{key:"systemEmails.eventRegistration",label:"Event Registration Confirmation",section:"System Emails",keywords:["event","registration","inregistrare"]},{key:"systemEmails.eventReminders",label:"Event Reminders",section:"System Emails",keywords:["event","reminder","memento"]},{key:"systemEmails.ticketPaid",label:"Ticket Payment Confirmation",section:"System Emails",keywords:["ticket","bilet","payment","plata"]},{key:"systemEmails.contractReminders",label:"Contract Expiry Reminders",section:"System Emails",keywords:["contract","expiry","reminder"]},{key:"systemEmails.contractSigned",label:"Contract Signed Notifications",section:"System Emails",keywords:["contract","signed","semnat"]},{key:"systemEmails.localCenterRequests",label:"Local Center Request Notifications",section:"System Emails",keywords:["local","center","request","cerere"]},{key:"systemEmails.referralNotifications",label:"Referral Notifications",section:"System Emails",keywords:["referral","recomandare"]},{key:"systemEmails.subscriptionNotifications",label:"Subscription Notifications",section:"System Emails",keywords:["subscription","abonament"]},{key:"systemEmails.resignationNotifications",label:"Resignation Notifications",section:"System Emails",keywords:["resignation","demisie"]},{key:"systemEmails.paymentConfirmation",label:"Payment Confirmations",section:"System Emails",keywords:["payment","plata","confirmation"]},{key:"systemEmails.discussionNotification",label:"Discussion Notifications",section:"System Emails",keywords:["discussion","discutie","notification"]}]}
1,{type:"module",name:"Professions",nameKey:"Professions",description:"Professional skills and industry tracking",route:"ModuleProfessionsConfig",icon:"fa-light fa-briefcase",iconColor:"#16a085",section:"Modules",keywords:["professions","skills","profesii","industrii"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleProfessionsConfig",icon:"fa-light fa-cog"},{name:"Profession Industries",nameKey:"Profession Industries",route:"ModuleProfessionsIndustries",icon:"fa-light fa-industry",featureFlag:"profession.hasIndustry"}],settings:[{key:"hasIndustry",label:"Enable Industry Tracking",section:"Basic Configuration",keywords:["industry","industrie"]},{key:"hasJob",label:"Enable Job Information",section:"Basic Configuration",keywords:["job","slujba"]},{key:"hasExpertise",label:"Enable Expertise",section:"Basic Configuration",keywords:["expertise","expertiza"]}]},{type:"module",name:"Payments & Fees",nameKey:"Payments & Fees",description:"Payment processing and membership fees",route:"ModulePaymentsConfig",icon:"fa-light fa-credit-card",iconColor:"#f39c12",section:"Modules",keywords:["payments","fees","plati","cotizatii","stripe"],submenus:[{name:"Online Payments",nameKey:"Online Payments",route:"ModulePaymentsConfig",icon:"fa-light fa-credit-card"},{name:"Payment Gateway",nameKey:"Payment Gateway",route:"ModulePaymentsGateway",icon:"fa-light fa-building-columns"},{name:"Membership fees",nameKey:"Membership fees",route:"ModulePaymentsMembershipFees",icon:"fa-light fa-receipt"},{name:"Donation Product",nameKey:"Donation Product",route:"ModulePaymentsProductSetup",icon:"fa-light fa-hand-holding-heart"},{name:"Invoice Product",nameKey:"Invoice Product",route:"ModulePaymentsInvoiceProduct",icon:"fa-light fa-file-invoice"}],settings:[{key:"hasPaymentIban",label:"Allow Bank Transfer Payments",section:"Payment Methods",keywords:["bank","transfer","iban"]},{key:"enableMembershipPaymentsViaBankTransfer",label:"Enable Membership Payments via Bank Transfer",section:"Payment Methods",keywords:["membership","bank","cotizatie"]},{key:"feeLocalExists",label:"Local Center Fees Enabled",section:"Local Center Fees",keywords:["local","fees","cotizatie"]},{key:"hasLocalCentersDashboard",label:"Local Centers Dashboard",section:"Local Center Fees",keywords:["dashboard","local"]},{key:"hasLifeTime",label:"Lifetime Membership Available",section:"Membership Validity",keywords:["lifetime","viata"]},{key:"feeMaxDaysStillActive",label:"Fee Valid Days",section:"Membership Validity",keywords:["days","zile","valid"]},{key:"canPayNextYear",label:"Allow Next Year Payment",section:"Fee Eligibility",keywords:["next year","anul viitor"]},{key:"advancePaymentWindowMonths",label:"Advance Payment Window (Months)",section:"Fee Eligibility",keywords:["advance","window","early","in avans"]},{key:"advancePaymentWindowDays",label:"Advance Payment Window (Days)",section:"Fee Eligibility",keywords:["advance","window","early","in avans"]},{key:"productPriceAgeRestriction",label:"Enable Age Restrictions on Prices",section:"Fee Pricing",keywords:["age","varsta","price"]},{key:"hasVat",label:"Enable VAT on Fees",section:"Fee Pricing",keywords:["vat","tax","tva","taxa"]},{key:"hasRegistrationFee",label:"Enable One-time Registration Fee",section:"Fee Pricing",keywords:["registration","joining","inscriere","fee"]},{key:"isMandatory",label:"Fee Payment Mandatory",section:"Fee Requirements",keywords:["mandatory","obligatoriu"]},{key:"requireContractForMembershipPurchase",label:"Require Contract for Membership",section:"Fee Requirements",keywords:["contract","membership"]},{key:"hasPdfProof",label:"PDF Receipts/Proofs",section:"Receipts & Documentation",keywords:["pdf","receipt","chitanta"]},{key:"showDonateButtonInHeader",label:"Donate Button in Header",route:"ModulePaymentsProductSetup",section:"Donation Product",keywords:["donate","donation","header","doneaza","donatie"]}]},{type:"module",name:"Gamification & Courses",nameKey:"Gamification & Courses",description:"Badges, achievements, and learning courses",route:"ModuleGamificationConfig",icon:"fa-light fa-trophy",iconColor:"#f39c12",section:"Modules",keywords:["gamification","courses","badges","cursuri","insigne"],submenus:[{name:"Gamification",nameKey:"Gamification",route:"ModuleGamificationConfig",icon:"fa-light fa-gamepad"},{name:"Badges",nameKey:"Badges",route:"ModuleGamificationBadges",icon:"fa-light fa-medal",featureFlag:"gamification.isActive"},{name:"Badge Categories",nameKey:"Badge Categories",route:"ModuleGamificationBadgeTypes",icon:"fa-light fa-folder",featureFlag:"gamification.isActive"},{name:"Courses",nameKey:"Courses",route:"ModuleGamificationCourses",icon:"fa-light fa-graduation-cap"}],settings:[]}
1,{type:"module",name:"Helpdesk",nameKey:"Helpdesk",description:"Support tickets and help desk management",route:"ModuleHelpdeskConfig",icon:"fa-light fa-headset",iconColor:"#e74c3c",section:"Modules",keywords:["helpdesk","support","tickets","suport","tichete"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleHelpdeskConfig",icon:"fa-light fa-cog"}],settings:[]},{type:"module",name:"Voting",nameKey:"Voting",description:"Elections and voting management",route:"ModuleVotingConfig",icon:"fa-light fa-box-ballot",iconColor:"#9b59b6",section:"Modules",keywords:["voting","elections","votare","alegeri","poll"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleVotingConfig",icon:"fa-light fa-cog"}],settings:[]},{type:"module",name:"Identity Validation",nameKey:"Identity Validation",description:"ID verification and identity management",route:"ModuleIdentityValidationConfig",icon:"fa-light fa-id-card",iconColor:"#e67e22",section:"Modules",keywords:["identity","validation","identitate","verificare","kyc"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleIdentityValidationConfig",icon:"fa-light fa-cog"}],settings:[]},{type:"module",name:"Companies",nameKey:"Companies",description:"Company and organization management",route:"ModuleCompanyConfig",icon:"fa-light fa-building",iconColor:"#3498db",section:"Modules",keywords:["companies","companii","firme","organizatii"],submenus:[{name:"Configuration",nameKey:"Configuration",route:"ModuleCompanyConfig",icon:"fa-light fa-cog"}],settings:[]},{type:"page",name:"All Modules",nameKey:"All Modules",description:"View and manage all available modules",route:"TenantSettingFeatures",icon:"fa-light fa-grid-2",section:"Modules",keywords:["all","modules","toate","modulele"]}],customization:[{type:"page",name:"Workflows",nameKey:"Workflows",description:"Automate actions based on events and triggers",route:"WorkflowList",icon:"fa-light fa-diagram-project",section:"Customization",keywords:["workflows","automation","automatizare","triggers","actions","events","email"]},{type:"page",name:"Custom Domain",nameKey:"Custom Domain",description:"Set up a custom domain for your community",route:"TenantCustomDomain",icon:"fa-light fa-globe-pointer",section:"Customization",keywords:["custom domain","subdomain","dns","ssl","apex","domeniu personalizat"]},{type:"page",name:"Languages",nameKey:"Languages",description:"Manage available languages and translations",route:"TenantLanguages",icon:"fa-light fa-globe",section:"Customization",keywords:["languages","translation","limbi","traduceri","i18n"]},{type:"page",name:"Texts",nameKey:"menu.texts",description:"Customize text labels and messages",route:"TenantTexts",icon:"fa-light fa-font",section:"Customization",keywords:["texts","labels","texte","etichete","mesaje"]},{type:"page",name:"Terminology",nameKey:"Terminology",description:"Rename platform concepts (chapter, member, eventâ¦) in the app and in email",route:"TenantTerminology",icon:"fa-light fa-language",section:"Customization",keywords:["terminology","rename","wording","chapter","terminologie","redenumire"],featureFlag:"terminology.isActive"},{type:"page",name:"Menu Organizer",nameKey:"Menu Organizer",description:"Customize navigation menu structure",route:"CustomMenuList",icon:"fa-light fa-bars",section:"Customization",keywords:["menu","navigation","meniu","navigare"]},{type:"page",name:"Dashboard Organizer",nameKey:"Dashboard Organizer",description:"Customize dashboard widgets and layout",route:"DashboardBuilder",icon:"fa-light fa-objects-column",section:"Customization",keywords:["dashboard","widgets","panou","layout"]},{type:"page",name:"Dashboard Welcome",nameKey:"Dashboard Welcome",description:"Configure welcome message on dashboard",route:"DashboardWelcomeTemplate",icon:"fa-light fa-hand-wave",section:"Customization",keywords:["welcome","dashboard","bun venit","mesaj"]},{type:"page",name:"Import",nameKey:"Import",description:"Import data from external sources",route:"TenantImport",icon:"fa-light fa-file-import",section:"Customization",keywords:["import","data","date","csv","excel"]},{type:"page",name:"Demo Data",nameKey:"Demo Data",description:"Load demo data for testing",route:"TenantImportDemo",icon:"fa-light fa-database",section:"Customization",keywords:["demo","data","test","date"],featureFlag:"tenant.demo"}
1],developers:[{type:"page",name:"Third-party Integrations",nameKey:"Third-party Integrations",description:"Configure external service integrations",route:"TenantSettingsIntegrations",icon:"fa-light fa-plug",section:"Developers",keywords:["integrations","third-party","integrari","api","external"]},{type:"page",name:"API Tokens",nameKey:"API Tokens",description:"Manage API access tokens",route:"ApiTokens",icon:"fa-light fa-key",section:"Developers",keywords:["api","tokens","chei","access"],featureFlag:"api.isActive"},{type:"page",name:"OAuth Apps",nameKey:"OAuth Apps",description:"Manage OAuth applications",route:"AppList",icon:"fa-light fa-shield-check",section:"Developers",keywords:["oauth","apps","aplicatii","authentication"],featureFlag:"api.isActive"},{type:"page",name:"Webhooks",nameKey:"Webhooks",description:"Configure webhook endpoints",route:"WebhookList",icon:"fa-light fa-webhook",section:"Developers",keywords:["webhooks","endpoints","callbacks","events"]},{type:"page",name:"API Documentation",nameKey:"API Documentation",description:"View API documentation",url:"https://docs.orgo.space",icon:"fa-light fa-book",section:"Developers",keywords:["api","documentation","docs","documentatie"],external:!0}]};function Gl(e){const t=[];return Bl.organization.forEach(i=>{i.featureFlag&&!Wl(e,i.featureFlag)||t.push({...i,breadcrumb:`Organization > ${i.name}`})}),Bl.modules.forEach(i=>{i.featureFlag&&!Wl(e,i.featureFlag)||(t.push({...i,breadcrumb:`Modules > ${i.name}`}),i.submenus&&i.submenus.forEach(s=>{s.featureFlag&&!Wl(e,s.featureFlag)||t.push({type:"submenu",name:s.name,nameKey:s.nameKey,route:s.route,icon:s.icon,parent:i.name,parentRoute:i.route,section:"Modules",breadcrumb:`${i.name} > ${s.name}`,keywords:[s.name.toLowerCase(),i.name.toLowerCase()]})}),i.settings&&i.settings.forEach(e=>{t.push({type:"setting",name:e.label,key:e.key,parent:i.name,parentRoute:i.route,section:e.section,settingSection:e.section,breadcrumb:`${i.name} > Configuration > ${e.section}`,keywords:[...e.keywords||[],e.label.toLowerCase(),e.key.toLowerCase()],scrollTo:e.key})}))}),Bl.customization.forEach(i=>{i.featureFlag&&!Wl(e,i.featureFlag)||t.push({...i,breadcrumb:`Customization > ${i.name}`})}),Bl.developers.forEach(i=>{i.featureFlag&&!Wl(e,i.featureFlag)||t.push({...i,breadcrumb:`Developers > ${i.name}`})}),t}function Wl(e,t){if(!e||!e.settingFeatures)return!0;const i=t.split(".");if("tenant"===i[0])return e[i[1]];let s=e.settingFeatures;for(const a of i){if(void 0===s||null===s)return!1;s=s[a]}return Boolean(s)}function jl(e,t){if(!e||""===e.trim())return[];const i=e.toLowerCase().trim(),s=[];return t.forEach(e=>{let t=0;const a=e.name?.toLowerCase()||"";a.includes(i)&&(t+=a===i?100:a.startsWith(i)?80:50),e.keywords&&e.keywords.forEach(e=>{e.includes(i)&&(t+=e===i?40:20)});const n=e.breadcrumb?.toLowerCase()||"";n.includes(i)&&(t+=15);const o=e.section?.toLowerCase()||"";o.includes(i)&&(t+=10),e.key&&e.key.toLowerCase().includes(i)&&(t+=30),t>0&&s.push({...e,score:t})}),s.sort((e,t)=>{if(t.score!==e.score)return t.score-e.score;const i={module:4,page:3,submenu:2,setting:1};return(i[t.type]||0)-(i[e.type]||0)})}var zl={name:"AdminSearchModal",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","navigate"],data(){return{searchQuery:"",selectedIndex:0,searchIndex:[],recentSearches:[]}},computed:{...(0,L.L8)(["tenant"]),isOpen:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},filteredResults(){return this.searchQuery?jl(this.searchQuery,this.searchIndex):[]},groupedResults(){const e={modules:[],pages:[],submenus:[],settings:[]};return this.filteredResults.forEach(t=>{"module"===t.type?e.modules.push(t):"page"===t.type?e.pages.push(t):"submenu"===t.type?e.submenus.push(t):"setting"===t.type&&e.settings.push(t)}),e},allItems(){return this.searchQuery?this.filteredResults:[...this.recentSearches,...this.quickAccessItems]},quickAccessItems(){return this.searchIndex.filter(e=>"module"===e.type).slice(0,5)}},watch:{isOpen(e){e?this.onOpen():this.onClose()},searchQuery(){this.selectedIndex=0}},created(){this.loadRecentSearches()},mounted(){this.buildIndex()},methods:{buildIndex(){this.searchIndex=Gl(this.tenant)},onOpen(){this.searchQuery="",this.selectedIndex=0,this.buildIndex(),this.$nextTick(()=>{this.$refs.searchInput?.focus()}),document.addEventListener("keydown",this.handleGlobalKeydown)},onClose(){document.removeEventListener("keydown",this.handleGlobalKeydown)},close(){this.isOpen=!1},handleGlobalKeydown(e){"Escape"===e.key&&this.close()},navigateDown(){this.selectedIndex<this.allItems.length-1&&(this.selectedIndex++,this.scrollToSelected())},navigateUp(){this.selectedIndex>0&&(this.selectedIndex--,this.scrollToSelected())},scrollToSelected(){this.$nextTick(()=>{const e=document.querySelector(".search-item.is-selected");e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})})},selectItem(){const e=this.allItems[this.selectedIndex];e&&this.navigateToItem(e)},getItemIndex(e){return this.allItems.findIndex(t=>t.route&&t.route===e.route||t.key&&t.key===e.key||t.name===e.name)},getItemIcon(e){return e.icon||"fa-light fa-circle"},getTypeBadge(e){const t={module:"Module",page:"Page",submenu:"Menu",setting:"Setting"};return t[e]||e},navigateToItem(e){if(this.addToRecent(e),this.close(),e.external&&e.url)return void window.open(e.url,"_blank");const t=e.route||e.parentRoute;("setting"===e.type||e.scrollTo)&&e.scrollTo&&sessionStorage.setItem("adminSearchScrollTo",JSON.stringify({key:e.scrollTo,section:e.settingSection,timestamp:Date.now()}));const i=this.$route.name;if(i===t)return this.$emit("navigate",{type:"setting",key:e.scrollTo,section:e.settingSection}),void setTimeout(()=>{this.triggerScrollToSetting(e.scrollTo,e.settingSection)},100);t&&this.$router.push({name:t})},triggerScrollToSetting(e,t){if(!e)return;let i=document.querySelector(`[data-setting-key="${e}"]`);if(!i){const t=document.querySelectorAll(".setting-item");t.forEach(t=>{const s=t.querySelector(".label, .setting-label .label");if(s){const a=s.textContent.toLowerCase(),n=e.toLowerCase().replace(/([A-Z])/g," $1").trim();
1(a.includes(n)||a.includes(e.toLowerCase()))&&(i=t)}})}i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),i.classList.add("search-highlight"),setTimeout(()=>{i.classList.remove("search-highlight")},2500))},addToRecent(e){this.recentSearches=this.recentSearches.filter(t=>!(t.route&&t.route===e.route||t.key&&t.key===e.key)),this.recentSearches.unshift({...e,type:e.type}),this.recentSearches=this.recentSearches.slice(0,5),this.saveRecentSearches()},loadRecentSearches(){try{const e=localStorage.getItem("adminSearchRecent");e&&(this.recentSearches=JSON.parse(e))}catch(e){console.log(e),this.recentSearches=[]}},saveRecentSearches(){try{localStorage.setItem("adminSearchRecent",JSON.stringify(this.recentSearches))}catch(e){console.log(e)}},clearRecent(){this.recentSearches=[],this.saveRecentSearches()}}};const ql=(0,I.A)(zl,[["render",Ql],["__scopeId","data-v-a7fae39a"]]);var Jl=ql;const Hl=["aria-label"],Kl=["aria-label"],Yl=["src","alt"],Zl={class:"install-app-banner__text"},er={class:"install-app-banner__title"},tr={class:"install-app-banner__subtitle"},ir=["href"];function sr(e,t,i,a,n,o){const l=(0,k.g2)("font-awesome-icon");return(0,k.uX)(),(0,k.Wv)(s.eB,{name:"install-banner-slide"},{default:(0,k.k6)(()=>[o.shouldShow?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"install-app-banner",role:"region","aria-label":e.$t("Install app suggestion")},[(0,k.Lk)("button",{type:"button",class:"install-app-banner__dismiss","aria-label":e.$t("Dismiss"),onClick:t[0]||(t[0]=(...e)=>o.dismiss&&o.dismiss(...e))},[(0,k.bF)(l,{icon:"fa-light fa-xmark"})],8,Kl),(0,k.Lk)("img",{src:o.iconSrc,alt:o.brandDisplayName,class:"install-app-banner__icon mr-2"},null,8,Yl),(0,k.Lk)("div",Zl,[(0,k.Lk)("div",er,(0,E.v_)(o.brandDisplayName),1),(0,k.Lk)("div",tr,(0,E.v_)(e.$t("Faster, smoother in the app")),1)]),(0,k.Lk)("a",{href:o.storeFallbackUrl,class:"button is-primary is-rounded is-small install-app-banner__cta",onClick:t[1]||(t[1]=(...e)=>o.handleInstallClick&&o.handleInstallClick(...e))},(0,E.v_)(o.ctaLabel),9,ir)],8,Hl)):(0,k.Q3)("",!0)]),_:1})}const ar="orgoInstallAppBannerDismissed",nr="fbx.orgo.space",or="--orgo-install-banner-height",lr="56px",rr="orgoapp",dr="app.orgo.space",cr="com.orgoapp",ur="https://apps.apple.com/us/app/orgo-community/id1484759378",mr="https://play.google.com/store/apps/details?id=com.orgoapp",pr=1200;var hr={name:"InstallAppBanner",data(){return{isDismissed:!1,isAppInstalled:!1}},computed:{...(0,L.L8)(["tenant","isNativeApp"]),brandSlug(){return"undefined"!==typeof window&&window.location.hostname===nr?"fbx":"_orgo"},brandDisplayName(){return"fbx"===this.brandSlug?"My FBX":"Orgo"},iconSrc(){return"/img/icons/orgo-logo-192x192.png"},ctaLabel(){return this.isAppInstalled?this.$t("Open app"):this.$t("Install app")},isOrgoBrand(){return"fbx"!==this.brandSlug},iosAppLink(){return this.tenant?.iosApp||ur},androidAppLink(){return this.tenant?.androidApp||mr},storeFallbackUrl(){return"undefined"!==typeof navigator&&/Android/i.test(navigator.userAgent)?this.androidAppLink:this.iosAppLink},deepLinkPath(){const e=this.$route.path||"/",t=new URLSearchParams;Object.entries(this.$route.query||{}).forEach(([e,i])=>{Array.isArray(i)?i.forEach(i=>t.append(e,i)):null!==i&&void 0!==i&&t.append(e,i)}),this.tenant?.slug&&t.set("workspace",this.tenant.slug);const i=t.toString();return`${e}${i?"?"+i:""}`},shouldShow(){return!this.isDismissed&&(!this.isNativeApp&&("undefined"!==typeof window&&(!(!this.$isMobile||!this.$isMobile())&&(!this.$store.state.isIframe&&!this.$route.query.iframe))))}},watch:{shouldShow:{immediate:!0,handler(e){"undefined"!==typeof document&&document.documentElement.style.setProperty(or,e?lr:"0px")}}},created(){try{this.isDismissed="1"===localStorage.getItem(ar)}catch(e){console.log(e)}this.detectInstalledApp()},beforeUnmount(){"undefined"!==typeof document&&document.documentElement.style.setProperty(or,"0px")},methods:{dismiss(){this.isDismissed=!0;try{localStorage.setItem(ar,"1")}catch(e){console.log(e)}},detectInstalledApp(){"undefined"!==typeof navigator&&"function"===typeof navigator.getInstalledRelatedApps&&navigator.getInstalledRelatedApps().then(e=>{this.isAppInstalled=Array.isArray(e)&&e.length>0}).catch(e=>{console.log(e)})},handleInstallClick(e){e.preventDefault(),this.dismiss();const t="undefined"!==typeof navigator&&navigator.userAgent||"",i=/iPad|iPhone|iPod/.test(t)&&!window.MSStream,s=/Android/i.test(t);i?this.openOnIos():s?this.openOnAndroid():window.open(this.storeFallbackUrl,"_blank","noopener,noreferrer")},openOnIos(){if(!this.isOrgoBrand)return void(window.location.href=this.iosAppLink);const e=`${rr}://${dr}${this.deepLinkPath}`;let t=!1;const i=()=>{"hidden"===document.visibilityState&&(t=!0)};
1document.addEventListener("visibilitychange",i),window.location.href=e,setTimeout(()=>{document.removeEventListener("visibilitychange",i),t||"hidden"===document.visibilityState||(window.location.href=this.iosAppLink)},pr)},openOnAndroid(){if(!this.isOrgoBrand)return void(window.location.href=this.androidAppLink);const e=encodeURIComponent(this.androidAppLink),t=`intent://${dr}${this.deepLinkPath}#Intent;scheme=${rr};package=${cr};S.browser_fallback_url=${e};end`;window.location.href=t}}};const gr=(0,I.A)(hr,[["render",sr],["__scopeId","data-v-5782c14d"]]);var fr=gr;const br=600,yr=20;var vr={name:"IntercomMessenger",data(){return{booted:!1,requestInFlight:!1,isMobileWidth:!1}},computed:{...(0,L.L8)(["user"])},watch:{$route(){this.notifyNavigation()}},mounted(){this.isMobileWidth=this.mobileWidth(),this.fetchSessionAndBoot(),window.addEventListener("resize",this.handleViewportChange)},beforeUnmount(){window.removeEventListener("resize",this.handleViewportChange),this.shutdown()},methods:{mobileWidth(){return window.innerWidth<=br},fetchSessionAndBoot(){this.booted||this.requestInFlight||this.isMobileWidth||(this.requestInFlight=!0,this.$http.plain.get("/intercom/session").then(e=>{e.data&&e.data.appId&&(this.injectScript(e.data.appId),this.boot(e.data))}).catch(e=>{console.log(e)}).finally(()=>{this.requestInFlight=!1}))},injectScript(e){if(window.Intercom)return;const t=function(){t.c(arguments)};t.q=[],t.c=function(e){t.q.push(e)},window.Intercom=t;const i=document.createElement("script");i.id="intercom-widget",i.type="text/javascript",i.async=!0,i.src="https://widget.intercom.io/widget/"+e,document.head.appendChild(i)},boot(e){const t={api_base:"https://api-iam.intercom.io",app_id:e.appId,intercom_user_jwt:e.userJwt,name:e.name,created_at:e.createdAt,language_override:e.languageOverride,vertical_padding:yr,hide_default_launcher:this.mobileWidth()};window.Intercom("boot",t),this.booted=!0},handleViewportChange(){const e=this.mobileWidth();e!==this.isMobileWidth&&(this.isMobileWidth=e,this.booted?window.Intercom("update",{hide_default_launcher:e}):this.fetchSessionAndBoot())},notifyNavigation(){this.booted&&window.Intercom&&window.Intercom("update")},shutdown(){this.booted&&window.Intercom&&(window.Intercom("shutdown"),this.booted=!1)}},render(){return null}};const kr=vr;var Cr=kr,Lr={components:{AppTabNavbar:un.A,AppHeader:Xe.A,AppSidebar:cn,AppSidebarMenu:Js,SettingsMenuTenant:On,LogoThumbnail:Us.A,NotificationSidebar:ro,ThemeSidebar:wo,AdminSearchModal:Jl,InstallAppBanner:fr,IntercomMessenger:Cr},data(){return{showNotificationSidebar:!1,myGroupsLoadedAt:Date.now(),isExitingPermissionImpersonation:!1,showAdminSearch:!1,isTabNavbarHidden:!1,lastScrollY:0,scrollThreshold:10}},mounted(){this.$nextTick(()=>{const e=document.getElementById("oMain");e&&e.addEventListener("scroll",this.handleMainScroll,{passive:!0})}),document.addEventListener("keydown",this.handleKeyboardShortcut),document.addEventListener("visibilitychange",this.reloadMyGroupsWhenStale)},beforeUnmount(){const e=document.getElementById("oMain");e&&e.removeEventListener("scroll",this.handleMainScroll),document.removeEventListener("keydown",this.handleKeyboardShortcut),document.removeEventListener("visibilitychange",this.reloadMyGroupsWhenStale)},methods:{handleKeyboardShortcut(e){(e.metaKey||e.ctrlKey)&&"k"===e.key&&this.tenantSettings&&(e.preventDefault(),this.showAdminSearch=!0)},openAdminSearch(){this.showAdminSearch=!0},handleMainScroll(e){const t=e.target.scrollTop,i=t-this.lastScrollY;Math.abs(i)<this.scrollThreshold||(i>0&&t>60?this.isTabNavbarHidden=!0:i<0&&(this.isTabNavbarHidden=!1),this.lastScrollY=t)},exitImpersonate(){this.$store.state.impersonatedAs=null,this.$store.state.impersonator=null,this.isLoading=!0,this.$http.plain.get("/me").then(e=>{u.M.commit("setCurrentUser",e.data),window.location.reload()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},exitPermissionImpersonation(){this.isExitingPermissionImpersonation=!0,this.$http.plain.post("/permission-impersonation/end").then(()=>{this.$store.commit("clearPermissionImpersonation"),this.$buefy.toast.o
1pen({message:this.$t("Permission impersonation ended"),type:"is-success"}),window.location.reload()}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Failed to end impersonation"),type:"is-danger"})}).finally(()=>{this.isExitingPermissionImpersonation=!1})},switchTenant(e){if(e!==this.tenant.slug){const i=this.$store.state.spaces[e];if(i&&"contact"===i.eventAppKind)return this.$store.state.isLoadingGeneral=!0,this.$http.plain.post("/event-app/session/"+e).then(()=>{try{sessionStorage.setItem("eventApp.tenantSlug",e),this.user?.email&&sessionStorage.setItem("eventApp.verifiedEmail",this.user.email)}catch(t){}this.$router.push({name:"EventAppMyEvents"})}).catch(t=>{console.log(t),this.$router.push({name:"Login",query:{eventAppDirect:"1",email:this.user?.email||"",targetTenant:e}})}).finally(()=>{this.$store.state.isLoadingGeneral=!1});try{sessionStorage.removeItem("eventApp.tenantSlug"),sessionStorage.removeItem("eventApp.verifiedEmail")}catch(t){}this.$store.state.currentGroup=null,this.$store.state.isLoadingGeneral=!0;const s=this.$store.state.spaces[e].tenant;return this.$http.plain.get("/tenants?slug="+e,{headers:{"User-Tenant":e,"X-Tenant-ID":s.id}}).then(t=>{const i=t.data["hydra:member"][0];return i?(this.$store.state.spaces[e].tenant=i,this.$store.commit("setTenant",i),this.loadMe()):(console.error("switchTenant: empty /tenants?slug= result for "+e),void(this.$store.state.isLoadingGeneral=!1))}).catch(e=>{console.error(e),this.$store.state.isLoadingGeneral=!1})}if("Dashboard"!==this.$route.name)return this.$router.push({name:"Dashboard"});window.location.reload()},loadMe(){this.$store.state.isLoadingGeneral=!0;let e=this.$store.state.impersonatedAs?"/users/"+this.$store.state.impersonatedAs.id:"/me";this.$http.plain.get(e).then(e=>{if(e.data&&e.data.id){u.M.commit("setCurrentUser",e.data),u.M.state.spaces[this.tenant.slug].user=e.data;let t=this.user.language?this.user.language:this.tenant.language;return(0,c.J4)(t),this.refreshMyGroups()}}).catch(e=>{console.error(e)}).finally(()=>{this.$store.state.isLoadingGeneral=!1})},reloadMyGroupsWhenStale(){"visible"===document.visibilityState&&this.user?.id&&"contact"!==this.user.kind&&(Date.now()-this.myGroupsLoadedAt<3e5||(this.myGroupsLoadedAt=Date.now(),this.$http.plain.get("/my-groups").then(e=>{this.$store.commit("setTenantGroups",{slug:this.tenant.slug,groups:e.data["hydra:member"]})}).catch(()=>{})))},refreshMyGroups(){return this.$store.state.isLoadingGeneral=!0,this.$http.plain.get("/my-groups").then(e=>(this.$store.commit("setTenantGroups",{slug:this.tenant.slug,groups:e.data["hydra:member"]}),this.$store.state.spaces[this.tenant.slug].unseenNotificationsCount>0?this.$router.push({name:"UserNotifications"}):this.$router.push({name:"Dashboard"}))).catch(e=>console.error(e)).finally(()=>{this.$store.state.isLoadingGeneral=!1})}},computed:{...(0,L.L8)(["tenant","user","isGranted","isPortrait"]),showIntercomMessenger(){return this.isGranted("ADMIN_TENANT")&&!this.$route.meta.anonymous&&!this.$store.state.impersonatedAs&&!this.tenant?.settingFeatures?.integrations?.hideSupportChat},tenantSettings(){return!(!this.$route.meta||!this.$route.meta.isTenantSettings)||!!this.$route.query.isTenantSettings}
1,hideSettingsSidebar(){return!0===this.$route.meta?.hideSettingsSidebar},hasWorkspaces(){return Object.values(this.$store.state.spaces).length>1&&(["localhost","app.orgo.space","demo.orgo.space"].includes(location.hostname)||location.hostname.includes("ngrok"))},displayedImpersonatedPermissions(){const e=this.$store.state.permissionImpersonation.impersonatedPermissions||[],t=e.slice(0,3).map(e=>this.$t(e));return t.join(", ")},remainingImpersonatedPermissions(){const e=this.$store.state.permissionImpersonation.impersonatedPermissions||[];return e.length<=3?[]:e.slice(3).map(e=>this.$t(e))},routeKey(){const e=this.tenant?.slug?`${this.tenant.slug}|`:"",t=this.$route;if(t.path.startsWith("/project/")&&t.matched.length>1)return`${e}/project/${t.params.id}`;if(t.path.startsWith("/website-builder"))return`${e}/website-builder`;if("Stats"===t.name)return`${e}${t.path}`;if("LocalCenterAnalytics"===t.name)return t.path+(t.query.unit?"?unit="+t.query.unit:"");if("CourseUpdate"===t.name||"CourseCreate"===t.name)return`${e}${t.path}`;const i={...t.query};delete i.page;const s=Object.keys(i).sort();if(0===s.length)return`${e}${t.path}`;const a=s.map(e=>`${e}=${i[e]}`).join("&");return`${e}${t.path}?${a}`}}};const wr=(0,I.A)(Lr,[["render",De]]);var _r=wr;const Er={class:"o-center-scroll"};function $r(e,t,i,s,a,n){const o=(0,k.g2)("InstallAppBanner"),l=(0,k.g2)("router-view");return(0,k.uX)(),(0,k.CE)("div",Er,[(0,k.bF)(o),(0,k.Lk)("section",{class:(0,E.C4)(e.$route.name)},[(0,k.Lk)("div",{class:(0,E.C4)(["is-centered",{"pt-3 pb-5":!e.$isMobile()&&"full"!==i.layoutSize,"p-2":e.$isMobile(),"o-xswidth":"small"===i.layoutSize,"o-mediumwidth":"medium"===i.layoutSize,"o-maxwidth":"full"===i.layoutSize,"mb-6":"full"!==i.layoutSize}])},[((0,k.uX)(),(0,k.Wv)(l,{key:e.$route.fullPath}))],2)],2)])}var Fr={components:{InstallAppBanner:fr},props:["layoutSize"],data(){return{}},computed:{},created(){}};const Tr=(0,I.A)(Fr,[["render",$r]]);var Sr=Tr;const Ar={id:"o-center-scroll-payment",class:"o-center-scroll"};function Pr(e,t,i,s,a,n){const o=(0,k.g2)("router-view");return(0,k.uX)(),(0,k.CE)("div",Ar,[((0,k.uX)(),(0,k.Wv)(o,{key:e.$route.fullPath}))])}var Ir={data(){return{}},computed:{}};const Mr=(0,I.A)(Ir,[["render",Pr]]);var xr=Mr;const Nr={class:"o-center-scroll"};function Ur(e,t,i,s,a,n){const o=(0,k.g2)("router-view");return(0,k.uX)(),(0,k.CE)("div",Nr,[(0,k.Lk)("section",null,[((0,k.uX)(),(0,k.Wv)(o,{key:e.$route.fullPath}))])])}var Dr={data(){return{}},computed:{}};const Xr=(0,I.A)(Dr,[["render",Ur]]);var Vr=Xr;function Rr(e,t,i,a,n,o){const l=(0,k.g2)("b-notification"),r=(0,k.g2)("router-view");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)({"o-center-scroll":"AnnualReport"!==e.$route.name})},[(0,k.Lk)("section",null,[e.$store.getters.error&&!e.$route.meta.anonymous?((0,k.uX)(),(0,k.Wv)(l,{key:0,type:"is-danger",innerHTML:e.$store.getters.error},null,8,["innerHTML"])):(0,k.Q3)("",!0),(0,k.bF)(r,null,{default:(0,k.k6)(({Component:e})=>[(0,k.bF)(s.eB,{name:"fade",mode:"out-in"},{default:(0,k.k6)(()=>[((0,k.uX)(),(0,k.Wv)((0,k.$y)(e)))]),_:2},1024)]),_:1})])],2)}var Or={data(){return{}},computed:{}};const Qr=(0,I.A)(Or,[["render",Rr]]);var Br=Qr;const Gr={class:"o-website-frame"},Wr={class:"o-website-main"};function jr(e,t,i,s,a,n){const o=(0,k.g2)("WebsiteEditBar"),l=(0,k.g2)("WebsiteTemplateDemoBar"),r=(0,k.g2)("WebsiteHeader"),d=(0,k.g2)("router-view"),c=(0,k.g2)("WebsiteFooter");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)(["o-website",[n.themeClasses,{"is-editing":a.websiteState.edit.enabled},`o-w-device--${a.websiteState.edit.device}`]]),"data-theme":"light",style:(0,E.Tr)(n.themeStyle)},[n.isEditableRoute?((0,k.uX)(),(0,k.Wv)(o,{key:0,edit:a.websiteState.edit,onSave:t[0]||(t[0]=e=>a.websiteState.editor&&a.websiteState.editor.save()),onPublish:t[1]||(t[1]=e=>a.websiteState.editor&&a.websiteState.editor.publish()),onDiscard:t[2]||(t[2]=e=>a.websiteState.editor&&a.websiteState.editor.discard()),onToggle:t[3]||(t[3]=e=>a.websiteState.edit.enabled=e),onDevice:t[4]||(t[4]=e=>a.websiteState.edit.device=e)},null,8,["edit"])):(0,k.Q3)("",!0),a.websiteState.site&&a.websiteState.site.demo?((0,k.uX)(),(0,k.Wv)(l,{key:1,label:a.websiteState.site.demo.label},null,8,["label"])):(0,k.Q3)("",!0),(0,k.Lk)("div",Gr,[(0,k.bF)(r,{site:n.site,tenant:e.tenant},null,8,["site","tenant"]),(0,k.Lk)("main",Wr,[((0,k.uX)(),(0,k.Wv)(d,{key:e.$route.fullPath}))]),(0,k.bF)(c,{site:n.site,tenant:e.tenant},null,8,["site","tenant"])])],6)}var zr=i(91495),qr=i(39886),Jr=i(43087),Hr=i(35824);const Kr={class:"o-we-bar__group"},Yr={key:0,class:"o-we-bar__group o-we-bar__devices"}
1,Zr=["aria-label","title","onClick"],ed={key:1,class:"o-we-bar__group o-we-bar__save"},td={key:0,class:"o-we-bar__dirty"},id=["disabled"],sd=["disabled"],ad=["disabled","title"];function nd(e,t,i,s,a,n){const o=(0,k.g2)("font-awesome-icon");return n.canEdit?((0,k.uX)(),(0,k.CE)("div",{key:0,class:(0,E.C4)(["o-we-bar",{"is-editing":i.edit.enabled}])},[(0,k.Lk)("div",Kr,[(0,k.Lk)("button",{class:(0,E.C4)(["o-we-bar__mode",{"is-on":i.edit.enabled}]),onClick:t[0]||(t[0]=(...e)=>n.toggle&&n.toggle(...e))},[(0,k.bF)(o,{icon:["fal",i.edit.enabled?"eye":"pen"]},null,8,["icon"]),(0,k.eW)(" "+(0,E.v_)(i.edit.enabled?e.$t("Preview"):e.$t("Edit page")),1)],2)]),i.edit.enabled?((0,k.uX)(),(0,k.CE)("div",Yr,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(n.devices,t=>((0,k.uX)(),(0,k.CE)("button",{key:t.key,class:(0,E.C4)(["o-we-bar__device",{"is-on":i.edit.device===t.key}]),"aria-label":e.$t(t.label),title:e.$t(t.label),onClick:i=>e.$emit("device",t.key)},[(0,k.bF)(o,{icon:["fal",t.icon]},null,8,["icon"])],10,Zr))),128))])):(0,k.Q3)("",!0),i.edit.enabled?((0,k.uX)(),(0,k.CE)("div",ed,[i.edit.dirty?((0,k.uX)(),(0,k.CE)("span",td,(0,E.v_)(e.$t("Unsaved changes")),1)):(0,k.Q3)("",!0),(0,k.Lk)("button",{class:"o-we-bar__btn",disabled:!i.edit.dirty||i.edit.isSaving,onClick:t[1]||(t[1]=t=>e.$emit("discard"))},(0,E.v_)(e.$t("Discard")),9,id),(0,k.Lk)("button",{class:"o-we-bar__btn is-primary",disabled:!i.edit.dirty||i.edit.isSaving,onClick:t[2]||(t[2]=t=>e.$emit("save"))},[i.edit.isSaving?((0,k.uX)(),(0,k.Wv)(o,{key:0,icon:["fal","spinner"],spin:""})):(0,k.Q3)("",!0),(0,k.eW)(" "+(0,E.v_)(e.$t("Save")),1)],8,sd),i.edit.canPublish?((0,k.uX)(),(0,k.CE)("button",{key:1,class:"o-we-bar__btn is-publish",disabled:i.edit.isSaving||i.edit.isPublishing,title:e.$t("Publishes this page. Everything else on your website stays as it is."),onClick:t[3]||(t[3]=t=>e.$emit("publish"))},[(0,k.bF)(o,{icon:["fal",i.edit.isPublishing?"spinner":"cloud-arrow-up"],spin:i.edit.isPublishing},null,8,["icon","spin"]),(0,k.eW)(" "+(0,E.v_)(e.$t("Publish")),1)],8,ad)):(0,k.Q3)("",!0)])):(0,k.Q3)("",!0)],2)):(0,k.Q3)("",!0)}var od={name:"WebsiteEditBar",props:{edit:{type:Object,required:!0}},emits:["save","publish","discard","device","toggle"],computed:{...(0,L.L8)(["isGranted","tenant"]),canEdit(){return this.isGranted("ADMIN_TENANT")&&(0,Xn.m)(this.tenant)},devices(){return[{key:"desktop",icon:"desktop",label:"Desktop"},{key:"tablet",icon:"tablet-screen-button",label:"Tablet"},{key:"mobile",icon:"mobile-screen",label:"Mobile"}]}},methods:{toggle(){this.edit.enabled&&this.edit.dirty?this.$buefy.dialog.confirm({title:this.$t("Leave edit mode"),message:this.$t("You have unsaved changes. Leaving now discards them."),confirmText:this.$t("Discard and leave"),cancelText:this.$t("Stay"),type:"is-danger",onConfirm:()=>{this.$emit("discard"),this.$emit("toggle",!1)}}):this.$emit("toggle",!this.edit.enabled)}}};const ld=(0,I.A)(od,[["render",nd],["__scopeId","data-v-e332d34e"]]);var rd=ld;const dd={class:"o-wtd-bar"},cd={class:"o-wtd-bar__label"},ud={class:"o-wtd-bar__hint"};function md(e,t,i,s,a,n){const o=(0,k.g2)("router-link");return(0,k.uX)(),(0,k.CE)("div",dd,[(0,k.Lk)("span",cd,(0,E.v_)(e.$t("Demo of the {name} template",{name:e.$t(i.label)})),1),(0,k.Lk)("span",ud,(0,E.v_)(e.$t("Nothing here is your site.")),1),(0,k.bF)(o,{class:"o-wtd-bar__btn",to:{name:"WebsiteAdmin"}},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Back to the builder")),1)]),_:1})])}var pd={name:"WebsiteTemplateDemoBar",props:{label:{type:String,required:!0}}};const hd=(0,I.A)(pd,[["render",md],["__scopeId","data-v-4296b5aa"]]);var gd=hd,fd=i(22539),bd={name:"WebsiteLayout",components:{WebsiteHeader:Jr.A,WebsiteFooter:Hr.A,WebsiteEditBar:rd,WebsiteTemplateDemoBar:gd},provide(){return{website:this.websiteState}},props:["layoutSize"],data(){return{websiteState:{site:null,isLoading:!0,edit:{enabled:!1,device:"desktop",dirty:!1,isSaving:!1,canPublish:!1,isPublishing:!1},editor:null,leadBlock:null}}},computed:{...(0,L.L8)(["tenant","isGranted"]),site(){return this.websiteState.site},homeRoute(){return(0,zr.ww)(this.site)},settings(){return this.site?.website||null},themeClasses(){return[...(0,fd.bd)(this.settings,this.websiteState.leadBlock),!1===this.settings?.header?.sticky?"o-w-sticky--off":null].filter(
1Boolean)},themeStyle(){return(0,fd.Ce)(this.settings)},isEditableRoute(){return!0===this.$route.meta?.websiteEditable},demoTemplateKey(){return!0===this.$route.meta?.websiteTemplateDemo&&this.$route.params.key||null}},watch:{isEditableRoute(e){e||(this.websiteState.edit.enabled=!1)}},created(){this.fetchSite(),"1"===this.$route.query.edit&&this.isEditableRoute&&this.isGranted("ADMIN_TENANT")&&(0,Xn.m)(this.tenant)&&(this.websiteState.edit.enabled=!0)},methods:{fetchSite(){if(this.demoTemplateKey)return void this.fetchTemplateDemo(this.demoTemplateKey);const e={},t=this.tenant?.slug||(0,Q.zk)(window.location.hostname);t&&(e.tenant=t);const i=(0,qr.X)(this)?this.$http.plain.get("/website-preview/bootstrap"):ae.A.get(`${w.QU}${w.H$}/website-public/bootstrap`,{params:e});i.then(e=>{this.websiteState.site=e.data,this.followRedirect()}).catch(e=>{console.log(e)}).finally(()=>{this.websiteState.isLoading=!1})},fetchTemplateDemo(e){this.$http.plain.get(`/website-templates/${e}/demo`,{params:this.$route.query}).then(e=>{this.websiteState.site=e.data}).catch(e=>{console.log(e)}).finally(()=>{this.websiteState.isLoading=!1})},followRedirect(){const e=this.$route.path.replace(/\/+$/,"").toLowerCase()||"/",t=(this.websiteState.site?.redirects||[]).find(t=>t.from===e);t&&(/^https?:\/\//i.test(t.to)?window.location.replace(t.to):this.$router.replace(t.to))}}};const yd=(0,I.A)(bd,[["render",jr]]);var vd=yd;const kd={key:0,class:"o-workspaces is-hidden-touch"},Cd={class:"b-tooltips o-ws-vert"},Ld=["onClick"],wd={key:0,class:"o-badge"},_d={class:"icon is-small"},Ed={class:"event-app"},$d={class:"event-app__content"},Fd=["aria-label","title"],Td={class:"event-app__hero-actions"},Sd=["aria-label","title"],Ad=["aria-label"],Pd={class:"event-app__badge-btn-icon"},Id={class:"event-app__badge-btn-label"},Md=["aria-label"],xd={class:"event-app__badge-btn-icon"},Nd={class:"event-app__badge-btn-label"},Ud={class:"event-app__hero-body"},Dd={class:"event-app__title"},Xd={key:0,class:"event-app__subtitle"},Vd=["href"],Rd=["aria-label"],Od={class:"icon is-small"},Qd={class:"icon is-small"},Bd={class:"icon is-small"},Gd={class:"icon is-small"},Wd=["aria-label"],jd={key:0,class:"event-app__tab-count"},zd=["title"],qd={class:"event-app__page"},Jd={key:0,class:"event-app__loading"},Hd={key:0,class:"event-app-badge"},Kd=["aria-label"],Yd={class:"event-app-badge__event"},Zd={class:"event-app-badge__event-logo"},ec=["src","alt"],tc={key:1},ic={class:"event-app-badge__event-text"},sc={class:"event-app-badge__event-name"},ac={key:0,class:"event-app-badge__event-meta"},nc={class:"event-app-badge__person"},oc={key:0,class:"event-app-badge__avatar-ring"},lc={class:"event-app-badge__role-pill"},rc={class:"event-app-badge__name"},dc={key:1,class:"event-app-badge__headline"},cc={key:2,class:"event-app-badge__affiliation"},uc={key:0,class:"event-app-badge__qr-card"},mc={class:"event-app-badge__qr-wrap"},pc={class:"event-app-badge__qr-overlay"},hc=["src","alt"],gc={key:1},fc={class:"event-app-badge__code-text"},bc={class:"icon"},yc={class:"event-app-badge__footer mt-5 mb-3"},vc=["aria-label","title"],kc=["aria-label","title"];function Cc(e,t,i,a,n,o){const l=(0,k.g2)("InstallAppBanner"),r=(0,k.g2)("LogoThumbnail"),d=(0,k.g2)("b-tooltip"),c=(0,k.g2)("font-awesome-icon"),u=(0,k.g2)("AppHeader"),m=(0,k.g2)("AppSidebar"),p=(0,k.g2)("router-link"),h=(0,k.g2)("b-loading"),g=(0,k.g2)("router-view"),f=(0,k.g2)("qrcode-vue"),b=(0,k.g2)("b-modal"),y=(0,k.g2)("EventAppQRScannerModal"),v=(0,k.g2)("EventAppOnboardingSplash"),C=(0,k.g2)("NotificationSidebar");return(0,k.uX)(),(0,k.CE)("div",{class:(0,E.C4)(o.isDesktop?"add-ws":"event-app-shell__layer")},[(0,k.bF)(l),o.isDesktop&&o.hasWorkspaces?((0,k.uX)(),(0,k.CE)("div",kd,[(0,k.Lk)("ul",Cd,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(Object.entries(e.$store.state.spaces),([t,i])=>((0,k.uX)(),(0,k.CE)("li",{key:t,class:(0,E.C4)({"o-has-badge":e.$store.state.spaces[t].unseenNotificationsCount>0,"active-tenant":e.tenant?.slug===t}),onClick:e=>o.switchTenant(t)},[(0,k.bF)(d,{label:i.tenant.name,position:"is-right",type:"is-dark"},{default:(0,k.k6)(()=>[(0,k.bF)(r,{item:e.$store.state.spaces[t].tenant,"is-type":"roundSmall"},null,8,["item"]),e.$store.state.spaces[t].unseenNotificationsCount>0?((0,k.uX)(),(0,k.CE)("span",wd,(0,E.v_)(e.$store.state.spaces[t].unseenNotificationsCount),1)):(0,k.Q3)("",!0)]),_:2},1032,["label"])],10,Ld))),128))]),(0,k.Lk)("button",{class:"button is-text","aria-haspopup":"true","aria-controls":"ws-menu",onClick:t[0]||(t[0]=t=>e.$router.push({name:"StartTenant"}))},[(0,k.Lk)("span",_d,[(0,k.bF)(c,{icon:"fa-light fa-plus","aria-hidden":"true"})])])])):(0,k.Q3)("",!0),(0,k.Lk)("div",{class:(0,E.C4)(o.isDesktop?"o-wrap":"event-app-shell__layer")},[o.isDesktop?((0,k.uX)(),(0,k.Wv)(u,{key:0,onToggleNotifications:t[1]||(t[1]=e=>n.showNotificationSidebar=!0)})):(0,k.Q3)("",!0),(0,k.Lk)("div",{class:(0,E.C4)(o.isDesktop?"o-page":"event-app-shell__layer")},[o.isDesktop?((0,k.uX)(),(0,k.Wv)(m,{key:0})):(0,k.Q3)("",!0),(0,k.Lk)("div",{class:(0,E.C4)(o.isDesktop?"o-main nice-scrollbar":"event-app-shell__layer")},[(0,k.Lk)("div",{class:(0,E.C4)(o.isDesktop?"event-app-shell__inner o-minwidth":"event-app-shell__layer")},[(0,k.Lk)("section",Ed,[(0,k.Lk)("main",$d,[n.event?((0,k.uX)(),(0,k.CE)("header",{key:0,class:(0,E.C4)(["event-app__hero",{"has-cover":!!o.eventCoverUrl,"is-collapsed":o.isHeroCollapsed}])},[(0,k.Lk)("div",{class:"event-app__hero-cover",style:(0,E.Tr)(o.eventCoverUrl?{backgroundImage:"url("+o.eventCoverUrl+")"}:null)},[t[18]||(t[18]=(0,k.Lk)("div",{class:"event-app__hero-fade"},null,-1)),o.isDesktop?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("button",{key:0,t
1ype:"button",class:"event-app__back-btn","aria-label":e.$t("Back to events"),title:e.$t("Back to events"),onClick:t[2]||(t[2]=(...e)=>o.goBackToEvents&&o.goBackToEvents(...e))},[(0,k.bF)(c,{icon:"fa-light fa-chevron-left"})],8,Fd)),(0,k.Lk)("div",Td,[n.event.canManageEventApp&&n.event.currentEventAttend&&n.event.currentEventAttend.hash?((0,k.uX)(),(0,k.CE)("button",{key:0,type:"button",class:"event-app__scan-pill","aria-label":e.$t("Scan QR"),title:e.$t("Scan QR"),onClick:t[3]||(t[3]=e=>n.showScanner=!0)},[(0,k.bF)(c,{icon:"fa-light fa-qrcode"})],8,Sd)):(0,k.Q3)("",!0),n.event.currentEventAttend&&n.event.currentEventAttend.hash?((0,k.uX)(),(0,k.CE)("button",{key:1,type:"button",class:"event-app__badge-btn","aria-label":e.$t("Badge"),onClick:t[4]||(t[4]=e=>n.showBadge=!0)},[(0,k.Lk)("span",Pd,[(0,k.bF)(c,{icon:n.event.canManageEventApp?"fa-light fa-id-badge":"fa-light fa-qrcode"},null,8,["icon"])]),(0,k.Lk)("span",Id,(0,E.v_)(e.$t("Badge")),1)],8,Ad)):n.event.canManageEventApp?((0,k.uX)(),(0,k.CE)("button",{key:2,type:"button",class:"event-app__badge-btn","aria-label":e.$t("Scan QR"),onClick:t[5]||(t[5]=e=>n.showScanner=!0)},[(0,k.Lk)("span",xd,[(0,k.bF)(c,{icon:"fa-light fa-qrcode"})]),(0,k.Lk)("span",Nd,(0,E.v_)(e.$t("Scan QR")),1)],8,Md)):(0,k.Q3)("",!0)])],4),(0,k.Lk)("div",Ud,[(0,k.Lk)("h1",Dd,(0,E.v_)(n.event.name),1),o.town?((0,k.uX)(),(0,k.CE)("p",Xd,[(0,k.Lk)("a",{href:o.mapsUrl,target:"_blank",rel:"noopener",class:"event-app__subtitle-link"},(0,E.v_)(o.town),9,Vd)])):(0,k.Q3)("",!0),((0,k.uX)(),(0,k.Wv)(k.Im,{to:"body"},[(0,k.bF)(s.eB,{name:"event-app__calendar-fade"},{default:(0,k.k6)(()=>[n.isCalendarMenuOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"event-app__calendar-backdrop",onClick:t[6]||(t[6]=e=>n.isCalendarMenuOpen=!1)})):(0,k.Q3)("",!0)]),_:1}),(0,k.bF)(s.eB,{name:"event-app__calendar-slide"},{default:(0,k.k6)(()=>[n.isCalendarMenuOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"event-app__calendar-sheet",role:"menu","aria-label":e.$t("Add to calendar")},[t[23]||(t[23]=(0,k.Lk)("div",{class:"event-app__calendar-sheet-handle"},null,-1)),(0,k.Lk)("button",{type:"button",class:"event-app__calendar-menu-item",role:"menuitem",onClick:t[7]||(t[7]=e=>o.onPickCalendar("google"))},[(0,k.Lk)("span",Od,[(0,k.bF)(c,{icon:["fab","google"]})]),t[19]||(t[19]=(0,k.Lk)("span",null,"Google Calendar",-1))]),(0,k.Lk)("button",{type:"button",class:"event-app__calendar-menu-item",role:"menuitem",onClick:t[8]||(t[8]=e=>o.onPickCalendar("apple"))},[(0,k.Lk)("span",Qd,[(0,k.bF)(c,{icon:"fa-light fa-calendar"})]),t[20]||(t[20]=(0,k.Lk)("span",null,"Apple Calendar",-1))]),(0,k.Lk)("button",{type:"button",class:"event-app__calendar-menu-item",role:"menuitem",onClick:t[9]||(t[9]=e=>o.onPickCalendar("outlook"))},[(0,k.Lk)("span",Bd,[(0,k.bF)(c,{icon:["fab","microsoft"]})]),t[21]||(t[21]=(0,k.Lk)("span",null,"Outlook",-1))]),(0,k.Lk)("button",{type:"button",class:"event-app__calendar-menu-item",role:"menuitem",onClick:t[10]||(t[10]=e=>o.onPickCalendar("yahoo"))},[(0,k.Lk)("span",Gd,[(0,k.bF)(c,{icon:["fab","yahoo"]})]),t[22]||(t[22]=(0,k.Lk)("span",null,"Yahoo",-1))])],8,Rd)):(0,k.Q3)("",!0)]),_:1})]))])],2)):(0,k.Q3)("",!0),(0,k.Lk)("nav",{ref:"tabsNav",class:"event-app__tabs","aria-label":e.$t("Event app")},[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(o.tabs,t=>((0,k.uX)(),(0,k.Wv)(p,{key:t.name,to:{name:t.name,params:{item:o.eventUuid}},class:(0,E.C4)(["event-app__tab",{"is-active":o.isTabActive(t)}]),"active-class":""},{default:(0,k.k6)(()=>[(0,k.Lk)("span",null,(0,E.v_)(e.$t(t.label)),1),"number"!==typeof t.count||o.isDesktop?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("span",jd,(0,E.v_)(t.count),1)),t.adminOnly?((0,k.uX)(),(0,k.CE)("span",{key:1,class:"icon is-small event-app__tab-admin-icon",title:e.$t("Only admins can see this")},[(0,k.bF)(c,{icon:["fal","shield-keyhole"]})],8,zd)):(0,k.Q3)("",!0)]),_:2},1032,["to","class"]))),128)),(0,k.Lk)("span",{class:"event-app__tab-indicator",style:(0,E.Tr)(n.indicatorStyle)},null,4)],8,Wd),(0,k.Lk)("div",qd,[n.isLoading?((0,k.uX)(),(0,k.CE)("div",Jd,[(0,k.bF)(h,{"is-full-page":!1,"model-value":!0})])):n.hasAccess?((0,k.uX)(),(0,k.Wv)(g,{key:1},{default:(0,k.k6)(({Component:t})=>[(0,k.bF)(s.eB,{name:"event-app-route",mode:"out-in"},{default:(0,k.k6)(()=>[((0,k.uX)(),(0,k.Wv)((0,k.$y)(t),{key:e.$route.name,event:n.event},null,8,["event"]))]),_:2},1024)]),_:1})):(0,k.Q3)("",!0)])]),(0,k.bF)(b,{modelValue:n.showBadge,"onUpdate:modelValue":t[13]||(t[13]=e=>n.showBadge=e),width:400,scroll:"keep",class:"event-app-badge-modal"},{default:(0,k.k6)(()=>[n.event?((0,k.uX)(),(0,k.CE)("div",Hd,[(0,k.Lk)("button",{type:"button",class:"event-app-badge__close","aria-label":e.$t("Close"),onClick:t[11]||(t[11]=e=>n.showBadge=!1)},[(0,k.bF)(c,{icon:"fa-light fa-xmark"})],8,Kd),(0,k.Lk)("div",Yd,[(0,k.Lk)("div",Zd,[o.eventLogoUrl?((0,k.uX)(),(0,k.CE)("img",{key:0,src:o.eventLogoUrl,alt:n.event.name},null,8,ec)):((0,k.uX)(),(0,k.CE)("span",tc,(0,E.v_)(o.eventInitials
1),1))]),(0,k.Lk)("div",ic,[(0,k.Lk)("h3",sc,(0,E.v_)(n.event.name),1),o.badgeSubtitle?((0,k.uX)(),(0,k.CE)("p",ac,(0,E.v_)(o.badgeSubtitle),1)):(0,k.Q3)("",!0)])]),t[24]||(t[24]=(0,k.Lk)("hr",{class:"event-app-badge__divider"},null,-1)),(0,k.Lk)("div",nc,[e.user?((0,k.uX)(),(0,k.CE)("div",oc,[(0,k.bF)(r,{item:e.user,"is-type":"roundLarge"},null,8,["item"])])):(0,k.Q3)("",!0),(0,k.Lk)("span",lc,(0,E.v_)(e.$t("Attendee")),1),(0,k.Lk)("p",rc,(0,E.v_)(o.userFullName),1),o.userHeadline?((0,k.uX)(),(0,k.CE)("p",dc,(0,E.v_)(o.userHeadline),1)):(0,k.Q3)("",!0),o.userAffiliation?((0,k.uX)(),(0,k.CE)("p",cc,(0,E.v_)(o.userAffiliation),1)):(0,k.Q3)("",!0)]),t[25]||(t[25]=(0,k.Lk)("div",{class:"event-app-badge__perforation"},[(0,k.Lk)("span",{class:"dot"})],-1)),o.currentEventAttendHash?((0,k.uX)(),(0,k.CE)("div",uc,[(0,k.Lk)("div",mc,[(0,k.bF)(f,{value:o.qrCodeUrl,size:160,margin:4,level:"H","render-as":"svg"},null,8,["value"]),(0,k.Lk)("div",pc,[o.tenantLogoSquareUrl?((0,k.uX)(),(0,k.CE)("img",{key:0,src:o.tenantLogoSquareUrl,alt:e.tenant&&e.tenant.name,class:"event-app-badge__qr-overlay-img"},null,8,hc)):((0,k.uX)(),(0,k.CE)("span",gc,(0,E.v_)(o.userInitials),1))])]),(0,k.Lk)("p",fc,(0,E.v_)(o.codeText),1)])):(0,k.Q3)("",!0),n.event.canManageEventApp?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("button",{key:1,type:"button",class:"event-app-badge__scan-btn",onClick:t[12]||(t[12]=(...e)=>o.openScannerFromBadge&&o.openScannerFromBadge(...e))},[(0,k.Lk)("span",bc,[(0,k.bF)(c,{icon:"fa-light fa-qrcode"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Scan QR Code")),1)])),(0,k.Lk)("p",yc,(0,E.v_)(e.$t("Powered by Orgo")),1
1)])):(0,k.Q3)("",!0)]),_:1},8,["modelValue"]),o.isHeroCollapsed&&n.event&&n.event.currentEventAttend&&n.event.currentEventAttend.hash?((0,k.uX)(),(0,k.CE)("button",{key:0,type:"button",class:"event-app__floating-badge-btn","aria-label":e.$t("Badge"),title:e.$t("Badge"),onClick:t[14]||(t[14]=e=>n.showBadge=!0)},[(0,k.bF)(c,{icon:"fa-light fa-qrcode"})],8,vc)):o.isHeroCollapsed&&n.event&&n.event.canManageEventApp?((0,k.uX)(),(0,k.CE)("button",{key:1,type:"button",class:"event-app__floating-badge-btn","aria-label":e.$t("Scan QR"),title:e.$t("Scan QR"),onClick:t[15]||(t[15]=e=>n.showScanner=!0)},[(0,k.bF)(c,{icon:"fa-light fa-qrcode"})],8,kc)):(0,k.Q3)("",!0),n.showScanner?((0,k.uX)(),(0,k.Wv)(y,{key:n.prefilledScannerHash||"manual",modelValue:n.showScanner,"onUpdate:modelValue":t[16]||(t[16]=e=>n.showScanner=e),event:n.event,"prefilled-hash":n.prefilledScannerHash,onBook:e.onScannedBook,onOpenMeeting:e.onScannedOpenMeeting,onCheckedIn:o.onScannedCheckedIn},null,8,["modelValue","event","prefilled-hash","onBook","onOpenMeeting","onCheckedIn"])):(0,k.Q3)("",!0),o.showOnboardingSplash?((0,k.uX)(),(0,k.Wv)(v,{key:3,onGoToProfile:o.onSplashGoToProfile},null,8,["onGoToProfile"])):(0,k.Q3)("",!0)])],2)],2)],2)],2),o.isDesktop?((0,k.uX)(),(0,k.Wv)(C,{key:1,"is-open":n.showNotificationSidebar,onClose:t[17]||(t[17]=e=>n.showNotificationSidebar=!1)},null,8,["is-open"])):(0,k.Q3)("",!0)],2)}i(64979);var Lc=i(67944);const wc={class:"modal-card eaqr"},_c={class:"modal-card-head"},Ec={class:"modal-card-title"},$c={class:"modal-card-body"},Fc={key:0,class:"eaqr__camera"},Tc={key:0,class:"has-text-danger has-text-centered mt-3"},Sc={key:1},Ac={key:0,class:"eaqr__result"},Pc={key:0,class:"eaqr__checkedin-banner"},Ic={class:"eaqr__identity"},Mc={key:0,class:"eaqr__avatar"},xc=["src","alt"],Nc={key:1,class:"eaqr__avatar-fallback"},Uc={class:"eaqr__name"},Dc={key:2,class:"eaqr__headline"},Xc={key:3,class:"eaqr__tags"},Vc={key:1,class:"tag is-rounded is-light"},Rc={key:4,class:"eaqr__social"},Oc=["href","aria-label"],Qc=["href","aria-label"],Bc={key:1,class:"eaqr__note"},Gc={key:2,class:"notification is-warning is-light is-size-7 mb-3"},Wc={class:"eaqr__actions"},jc={class:"mr-1"},zc={class:"mr-1"},qc={class:"mr-1"},Jc={key:1,class:"notification is-danger is-light has-text-centered is-rounded"},Hc={class:"mr-1"},Kc={key:2,class:"has-text-centered py-5"};function Yc(e,t,i,s,a,n){const o=(0,k.g2)("QrcodeStream"),l=(0,k.g2)("font-awesome-icon"),r=(0,k.g2)("b-tooltip"),d=(0,k.g2)("b-button"),c=(0,k.g2)("b-loading"),u=(0,k.g2)("b-modal");return(0,k.uX)(),(0,k.Wv)(u,{"model-value":i.modelValue,"has-modal-card":"","trap-focus":"","can-cancel":!a.isProcessing,"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:modelValue",t)),onClose:n.close},{default:(0,k.k6)(()=>[(0,k.Lk)("div",wc,[(0,k.Lk)("header",_c,[(0,k.Lk)("p",Ec,(0,E.v_)(e.$t("Scan QR Code")),1),(0,k.Lk)("button",{class:"delete","aria-label":"close",onClick:t[0]||(t[0]=(...e)=>n.close&&n.close(...e))})]),(0,k.Lk)("section",$c,[a.scanResult?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("div",Fc,[(0,k.bF)(o,{constraints:{facingMode:{ideal:"environment"}},onDetect:n.onDetect,onError:n.onError},null,8,["onDetect","onError"]),a.cameraError?((0,k.uX)(),(0,k.CE)("p",Tc,(0,E.v_)(a.cameraError),1)):(0,k.Q3)("",!0)])),a.scanResult&&!a.isLoading?((0,k.uX)(),(0,k.CE)("div",Sc,[a.member?((0,k.uX)(),(0,k.CE)("div",Ac,[a.checkedIn?((0,k.uX)(),(0,k.CE)("div",Pc,[(0,k.bF)(l,{icon:"fa-light fa-circle-check",class:"eaqr__checkedin-icon"}),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Checked in")),1)])):(0,k.Q3)("",!0),(0,k.Lk)("div",Ic,[a.profilePicture?((0,k.uX)(),(0,k.CE)("div",Mc,[(0,k.Lk)("img",{src:a.profilePicture,alt:a.member.name},null,8,xc)])):((0,k.uX)(),(0,k.CE)("div",Nc,[(0,k.bF)(l,{icon:"fa-light fa-user",size:"2x"})])),(0,k.Lk)("h3",Uc,(0,E.v_)(a.member.name),1),a.member.headline?((0,k.uX)(),(0,k.CE)("p",Dc,(0,E.v_)(a.member.headline),1)):(0,k.Q3)("",!0),a.registrationType||a.ticket?((0,k.uX)(),(0,k.CE)("div",Xc,[a.registrationType?((0,k.uX)(),(0,k.CE)("span",{key:0,class:(0,E.C4)(["tag is-rounded is-passive","is-"+("is-success"===n.registrationTagType?"success":"is-warning"===n.registrationTagType?"warning":"info")])},(0,E.v_)(e.$t(a.registrationType)),3)):(0,k.Q3)("",!0),a.ticket?((0,k.uX)(),(0,k.CE)("span",Vc,(0,E.v_)(a.ticket.name),1)):(0,k.Q3)("",!0)])):(0,k.Q3)("",!0),n.hasSocialChannels?((0,k.uX)(),(0,k.CE)("div",Rc,[a.member.linkedinUrl?((0,k.uX)(),(0,k.Wv)(r,{key:0,label:a.member.linkedinUrl,position:"is-top",type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("a",{href:a.member.linkedinUrl,target:"_blank",rel:"noopener noreferrer",class:"eaqr__social-btn","aria-label":a.member.linkedinUrl},[(0,k.bF)(l,{icon:"fa-brands fa-linkedin"})],8,Oc)]),_:1},8,["label"])):(0,k.Q3)("",!0),a.member.bskyHandle?((0,k.uX)(),(0,k.Wv)(r,{key:1,label:a.member.bskyHandle,position:"is-top",type:"is-dark","append-to-body":""},{default:(0,k.k6)(()=>[(0,k.Lk)("a",{href:n.bskyProfileUrl(a.member.bskyHandle),target:"_blank",rel:"noopener noreferrer",class:"eaqr__social-btn","aria-label":a.member.bskyHandle},[(0,k.bF)(l,{icon:"fa-brands fa-bluesky"})],8,Qc)]),_:1},8,["label"])):(0,k.Q3)("",!0)])):(0,k.Q3)("",!0)]),a.isGuestPass?((0,k.uX)(),(0,k.CE)("p",Bc,(0,E.v_)(e.$t("Guest pass issued to"))+": "+(0,E.v_)(a.issuedTo),1)):(0,k.Q3)("",!0),a.paymentStatus&&"success"!==a.paymentStatus?((0,k.uX)(),(0,k.CE)("p",Gc,[(0,k.bF)(l,{icon:"fa-light fa-triangle-exclamation",class:"mr-1"}),(0,k.eW)(" "+(0,E.v_)(e.$t("Payment not completed"))+": "+(0,E.v_)(a.paymentStatus),1)])):(0,k.Q3)("",!0),(0,k.Lk)("div",Wc,[a.canCheckIn&&!a.checkedIn?((0,k.uX)(),(0,k.Wv)(d,{key:0,t
1ype:"is-success",class:"is-rounded is-passive",expanded:"",loading:a.isProcessing,onClick:n.checkInAttendee},{default:(0,k.k6)(()=>[(0,k.Lk)("span",jc,[(0,k.bF)(l,{icon:"fa-light fa-check"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Check in")),1)]),_:1},8,["loading","onClick"])):(0,k.Q3)("",!0),n.canSave?((0,k.uX)(),(0,k.Wv)(d,{key:1,type:a.isSaved?"is-primary is-light":"is-primary",class:"is-rounded is-passive",expanded:"",outlined:!a.isSaved,loading:a.isSavingBookmark,onClick:n.toggleSaved},{default:(0,k.k6)(()=>[(0,k.Lk)("span",zc,[(0,k.bF)(l,{icon:"fa-light fa-bookmark"})]),(0,k.Lk)("span",null,(0,E.v_)(a.isSaved?e.$t("Saved"):e.$t("Save")),1)]),_:1},8,["type","outlined","loading","onClick"])):(0,k.Q3)("",!0),n.canConnect?((0,k.uX)(),(0,k.Wv)(d,{key:2,type:"is-primary",class:"is-rounded is-passive",expanded:"",outlined:"",loading:a.isConnecting,onClick:n.onConnect},{default:(0,k.k6)(()=>[(0,k.Lk)("span",qc,[(0,k.bF)(l,{icon:"fa-light fa-user-plus"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Connect")),1)]),_:1},8,["loading","onClick"])):(0,k.Q3)("",!0)])])):(0,k.Q3)("",!0),a.scanError?((0,k.uX)(),(0,k.CE)("div",Jc,[(0,k.bF)(l,{icon:"fa-light fa-circle-xmark",size:"2x",class:"mb-2"}),(0,k.Lk)("p",null,(0,E.v_)(a.scanError),1)])):(0,k.Q3)("",!0),(0,k.bF)(d,{class:"is-rounded mt-4",expanded:"",onClick:n.resetScan},{default:(0,k.k6)(()=>[(0,k.Lk)("span",Hc,[(0,k.bF)(l,{icon:"fa-light fa-qrcode"})]),(0,k.Lk)("span",null,(0,E.v_)(e.$t("Scan another")),1)]),_:1},8,["onClick"])])):(0,k.Q3)("",!0),a.isLoading?((0,k.uX)(),(0,k.CE)("div",Kc,[(0,k.bF)(c,{"is-full-page":!1,"model-value":!0})])):(0,k.Q3)("",!0)])])]),_:1},8,["model-value","can-cancel","onClose"])}var Zc=i(59995),eu={name:"EventAppQRScannerModal",components:{QrcodeStream:Zc.tR},props:{modelValue:{type:Boolean,default:!1},event:{type:Object,default:null},prefilledHash:{type:String,default:null}},emits:["update:modelValue","close","checked-in","scan-error"],data(){return{isLoading:!1,isProcessing:!1,scanResult:null,scanError:null,cameraError:null,member:null,ticket:null,eventName:null,ticketNumber:null,checkedIn:!1,registrationType:null,paymentStatus:null,isGuestPass:!1,issuedTo:null,canCheckIn:!1,profilePicture:null,isSaved:!1,bookmarkId:null,isSavingBookmark:!1,isConnecting:!1,isConnected:!1}},computed:{...(0,L.L8)(["user"]),isContactViewer(){return this.user&&"contact"===this.user.kind},registrationTagType(){const e={paid:"is-info",free:"is-success is-light",invited:"is-warning is-light",guest:"is-light",registered:"is-primary is-light"};return e[this.registrationType]||"is-light"},hasSocialChannels(){const e=this.member;return!!e&&!(!e.linkedinUrl&&!e.bskyHandle)},canSave(){return!!this.event&&(!this.event.canManageEventApp&&!(!this.event.currentEventAttend||!this.event.currentEventAttend.hash))},canConnect(){return!!this.member&&("user"===this.member.kind&&(!this.isContactViewer&&!this.isConnected))}},mounted(){this.prefilledHash&&(this.scanResult=this.prefilledHash,this.lookupTicket(this.prefilledHash))},methods:{bskyProfileUrl(e){if(!e)return"#";const t=String(e).trim();if(/^https?:\/\//i.test(t))return t;const i=t.replace(/^@/,"").replace(/^\/+/,"");return"https://bsky.app/profile/"+i},copyToClipboard(e,t){if(!e)return;const i=()=>{this.$buefy.toast.open({message:t||this.$t("Copied"),type:"is-success",duration:2e3})},s=()=>{this.$buefy.toast.open({message:this.$t("Could not copy"),type:"is-danger"})};if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(e).then(i).catch(s);else try{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();const a=document.execCommand("copy");document.body.removeChild(t),a?i():s()}catch(a){s()}},onDetect(e){if(!e||!e.length||this.isLoading)return;const t=e[0].rawValue;if(!t)return;let i=t;const s=t.match(/(?:check-ticket|ticket)\/([^?/]+)/);s&&(i=s[1]),this.scanResult=i,this.lookupTicket(i)},onError(e){"NotAllowedError"===e.name?this.cameraError=this.$t("Camera access denied. Please allow camera access to scan QR codes."):"NotFoundError"===e.name?this.cameraError=this.$t("No camera found on this device."):this.cameraError=this.$t("Camera error")+": "+e.message},lookupTicket(e){this.isLoading=!0,this.scanError=null,this.$http.plain.post("/event-app/check-qr",{qrCode:e}).then(e=>{const t=e.data||{};this.member=t.member,this.ticket=t.ticket,this.eventName=t.event,this.ticketNumber=t.ticketNumber,this.checkedIn=!!t.checkedIn,this.registrationType=t.registrationType,this.paymentStatus=t.paymentStatus,this.isGuestPass=!!t.isGuestPass,this.issuedTo=t.issuedTo||null,this.canCheckIn=!!t.canCheckIn,this.profilePicture=t.member?.profilePicture||null,this.isSaved=!!t.isSaved,this.bookmarkId=t.bookmarkId||null,this.canSave&&!this.isSaved&&this.ticketNumber&&this.saveBookmark()}).catch(e=>{console.log(e),this.scanError=e.response?.data?.detail||e.response?.data?.["hydra:description"]||this.$t("QR code is invali
1d or has expired")}).finally(()=>{this.isLoading=!1})},checkInAttendee(){this.ticketNumber&&this.canCheckIn&&(this.isProcessing=!0,this.$http.plain.patch("/event_attends/"+this.ticketNumber,{statusRsvp:"attended"},{headers:{"Content-Type":"application/merge-patch+json"}}).then(()=>{this.checkedIn=!0,this.$emit("checked-in",this.ticketNumber)}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.["hydra:description"]||this.$t("Check-in failed"),type:"is-danger"})}).finally(()=>{this.isProcessing=!1}))},onConnect(){if(!this.canConnect||this.isConnecting)return;if(!this.member||!this.member.userId)return;this.isConnecting=!0;const e="/api/v1/users/"+this.member.userId;this.$http.plain.post("/user-connections",{recipient:e}).then(()=>{this.isConnected=!0,this.$buefy.toast.open({message:this.$t("Connection request sent"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.detail||this.$t("Could not send connection request"),type:"is-danger"})}).finally(()=>{this.isConnecting=!1})},toggleSaved(){this.event&&this.event.uuid&&this.member&&(this.isSavingBookmark||(this.isSaved?this.unsaveBookmark():this.saveBookmark()))},saveBookmark(){this.isSavingBookmark=!0,this.$http.plain.post("/event-app/"+this.event.uuid+"/bookmarks",{eventAttend:this.ticketNumber}).then(e=>{this.isSaved=!0,this.bookmarkId=e.data?.id||null,this.$buefy.toast.open({message:this.$t("Saved"),type:"is-success",duration:1500})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.detail||this.$t("Could not save"),type:"is-danger"})}).finally(()=>{this.isSavingBookmark=!1})},unsaveBookmark(){this.bookmarkId?(this.isSavingBookmark=!0,this.$http.plain.delete("/event-app/"+this.event.uuid+"/bookmarks/"+this.bookmarkId).then(()=>{this.isSaved=!1,this.bookmarkId=null,this.$buefy.toast.open({message:this.$t("Removed from Saved"),type:"is-warning",duration:1500})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:e.response?.data?.detail||this.$t("Could not unsave"),type:"is-danger"})}).finally(()=>{this.isSavingBookmark=!1})):this.isSaved=!1},resetScan(){this.scanResult=null,this.scanError=null,this.member=null,this.ticket=null,this.eventName=null,this.profilePicture=null,this.ticketNumber=null,this.checkedIn=!1,this.registrationType=null,this.paymentStatus=null,this.isGuestPass=!1,this.issuedTo=null,this.canCheckIn=!1,this.isSaved=!1,this.bookmarkId=null,this.isSavingBookmark=!1,this.isConnecting=!1,this.isConnected=!1},close(){this.resetScan(),this.cameraError=null,this.$emit("update:modelValue",!1),this.$emit("close")}}};const tu=(0,I.A)(eu,[["render",Yc],["__scopeId","data-v-8ebc5634"]]);var iu=tu,su=i(10858),au=i(88722),nu=i(70223),ou=i(28159);const lu="BOMzr0Fdh7KtN8suJuUgabgTPuyRB2gWlYLsrFNsy62opr2yCVGeUh3kYLkmAtvjyFUoP-JM66g9wPkAPXfat18";var ru={name:"EventAppLayout",components:{QrcodeVue:Lc.Ay,LogoThumbnail:Us.A,EventAppQRScannerModal:iu,EventAppOnboardingSplash:su.A,AppHeader:Xe.A,AppSidebar:cn,NotificationSidebar:ro,InstallAppBanner:fr},provide(){return{openEventAppBadge:()=>{this.showBadge=!0},openEventAppCalendarMenu:()=>{this.isCalendarMenuOpen=!0}}},data(){return{event:null,isLoading:!0,hasAccess:!1,showBadge:!1,indicatorStyle:{opacity:0},hasVotes:!1,hasAgenda:!0,participantsCount:null,networkingCount:null,showScanner:!1,prefilledScannerHash:null,bookingModalOpen:!1,bookingTarget:null,isCalendarMenuOpen:!1,isPortrait:window.innerHeight>window.innerWidth,showNotificationSidebar:!1}},computed:{...(0,L.L8)(["user","tenant"]),eventUuid(){return this.$route.params.item},isDesktop(){return!this.$isMobile()&&!this.isPortrait},hasWorkspaces(){const e=this.$store.state.spaces||{};if(Object.values(e).length<=1)return!1;const t=location.hostname;return["localhost","app.orgo.space","demo.orgo.space"].includes(t)||t.includes("ngrok")},tabs(){const e=[];return this.hasAgenda&&e.push({name:"EventAppAgenda",label:"Agenda"}),e.push({name:"EventAppDetails",label:"Details"}),e.push({name:"EventAppFeed",label:"Feed"}),this.event&&this.event.canManageEventApp&&!this.isDesktop&&e.push({name:"EventAppParticipants",label:"Participants",adminOnly:!0,count:this.participantsCount}),this.event&&this.event.hasPublicAttendeeList&&e.push({name:"EventAppNetworking",label:"Networking",count:this.networkingCount}),this.hasVotes&&e.push({name:"EventAppVotes",label:"Vote"}),e.push({name:"EventAppProfile",label:"Profile"}),e},currentEventAttendHash(){return this.event&&this.event.currentEventAttend?this.event.currentEventAttend.hash:null},subtitle(){if(!this.event)return"";const e=[],t=this.formatDateRange(this.event.dateTimeBegin,this.event.dateTimeEnd);t&&e.push(t);const i=this.extractTown(this.event.location);return i&&e.push(i),e.join(" · ")},dateRangeText(){return this.event?this.formatDateRange(this.event.dateTimeBegin,this.event.dateTimeEnd):""},town(){return this.event?this.extractTown(this.event.location):""},mapsUrl(){return this.event&&this.event.location?"https://www.google.com/maps/search/?api=1&query="+encodeURIComponent(this.event.location):null}
1,canAddToCalendar(){return!(!this.event||!this.event.dateTimeBegin&&!this.event.dateTimeEnd)},userFullName(){return this.user?[this.user.firstName,this.user.lastName].filter(Boolean).join(" "):""},tenantLogoSquareUrl(){const e=this.tenant?.logoSquare||this.tenant?.logoSquareDark;return e?w.hd+w.DJ+"tenant/"+e:null},userInitials(){if(!this.user)return"";const e=(this.user.firstName||"").slice(0,1),t=(this.user.lastName||"").slice(0,1);return(e+t).toUpperCase()||"?"},userAffiliation(){return this.user?.localCenter?.name||null},userHeadline(){return this.user?.professionHeadline||null},eventInitials(){if(!this.event?.name)return"";const e=this.event.name.replace(/[^a-zA-Z0-9]/g,"");return e.slice(0,2).toUpperCase()||"?"},eventLogoUrl(){const e=this.event?.logo;return e?e.startsWith("http://")||e.startsWith("https://")?e:`${w.ze}${w.DJ}event/${e}`:null},eventCoverUrl(){return this.eventLogoUrl},isHeroCollapsed(){return"EventAppFeedPost"===this.$route.name},badgeSubtitle(){if(!this.event)return"";const e=[],t=this.formatBadgeDateRange(this.event.dateTimeBegin,this.event.dateTimeEnd);t&&e.push(t);const i=this.extractTown(this.event.location);return i&&e.push(i),e.join(" · ")},codeText(){const e=(this.currentEventAttendHash||"").toUpperCase(),t=e?e.slice(-4):"";return[this.userInitials,this.eventInitials,t].filter(Boolean).join(" · ")},qrCodeUrl(){return this.event?.currentEventAttend?.qrSmartLink||""},showOnboardingSplash(){return!(!this.user||"contact"!==this.user.kind)&&(!this.user.prefEventAppOnboardingSeen&&(!!this.event&&this.hasAccess))}},watch:{"$route.params.item"(e,t){e&&e!==t&&this.loadEvent()},"$route.name"(){this.$nextTick(this.updateTabIndicator)},"$route.query.scannedHash"(e){e&&this.tryConsumeScannedHash()},showScanner(e){e||(this.prefilledScannerHash=null)}},created(){this.bootstrapEventAppPrincipalIfNeeded().finally(()=>this.loadEvent())},mounted(){this.$nextTick(this.updateTabIndicator),window.addEventListener("resize",this.onWindowResize),document.addEventListener("keydown",this.onCalendarKeydown),setTimeout(()=>this.initEventAppPush(),1500)},beforeUnmount(){window.removeEventListener("resize",this.onWindowResize),document.removeEventListener("keydown",this.onCalendarKeydown)},methods:{onWindowResize(){this.isPortrait=window.innerHeight>window.innerWidth,this.updateTabIndicator()},switchTenant(e){return e===this.tenant?.slug?"Dashboard"!==this.$route.name?this.$router.push({name:"Dashboard"}):void window.location.reload():(this.$store.state.currentGroup=null,this.$store.commit("setTenant",this.$store.state.spaces[e].tenant),this.$store.state.isLoadingGeneral=!0,this.$http.plain.get("/tenants?slug="+this.tenant.slug).then(t=>{this.$store.state.spaces[this.tenant.slug].tenant=t.data["hydra:member"][0],this.$store.commit("setTenant",this.$store.state.spaces[e].tenant)}).catch(e=>console.log(e)).finally(()=>{this.$store.state.isLoadingGeneral=!1}),this.reloadMeForSwitch())},reloadMeForSwitch(){this.$store.state.isLoadingGeneral=!0;const e=this.$store.state.impersonatedAs?"/users/"+this.$store.state.impersonatedAs.id:"/me";return this.$http.plain.get(e).then(e=>{if(e.data&&e.data.id){u.M.commit("setCurrentUser",e.data),u.M.state.spaces[this.tenant.slug].user=e.data;const t=this.user.language?this.user.language:this.tenant.language;return(0,c.J4)(t),this.refreshGroupsForSwitch()}}).catch(e=>console.log(e)).finally(()=>{this.$store.state.isLoadingGeneral=!1})},refreshGroupsForSwitch(){return this.$store.state.isLoadingGeneral=!0,this.$http.plain.get("/my-groups").then(e=>(this.$store.commit("setTenantGroups",{slug:this.tenant.slug,groups:e.data["hydra:member"]}),this.$store.state.spaces[this.tenant.slug].unseenNotificationsCount>0?this.$router.push({name:"UserNotifications"}):this.$router.push({name:"Dashboard"}))).catch(e=>console.log(e)).finally(()=>{this.$store.state.isLoadingGeneral=!1})},bootstrapEventAppPrincipalIfNeeded(){const e=!(!this.user||!this.user.id);let t=null,i=null;try{t=sessionStorage.getItem("eventApp.contactHash"),i=sessionStorage.getItem("eventApp.tenantSlug")}catch(s){t=null,i=null}return e||!t&&!i?Promise.resolve():this.$http.plain.get("/event-app/me").then(e=>{const t=e.data||{};t.tenant&&this.$store.commit("setTenant",t.tenant);const i="contact"===t.kind;this.$store.commit("setCurrentUser",{id:t.id,firstName:t.firstName,lastName:t.lastName,name:[t.firstName,t.lastName].filter(
1Boolean).join(" "),email:t.email,phoneNumber:t.phoneNumber,logo:t.logo,kind:t.kind||"user","@type":i?"Contact":"User",userRoles:[],notificationSettings:{},isEventAppPhonePrivate:!!t.isEventAppPhonePrivate,isEventAppEmailPrivate:!!t.isEventAppEmailPrivate,prefEventAppOnboardingSeen:!!t.prefEventAppOnboardingSeen})}).catch(e=>{console.log(e);try{sessionStorage.removeItem("eventApp.contactHash"),sessionStorage.removeItem("eventApp.tenantSlug")}catch(s){}})},tryConsumeScannedHash(){const e=this.$route.query.scannedHash;if(!e||!this.event||!this.hasAccess)return;this.prefilledScannerHash=e,this.showScanner=!0;const t={...this.$route.query};delete t.scannedHash,this.$router.replace({name:this.$route.name,params:this.$route.params,query:t})},loadEvent(){this.isLoading=!0,this.$http.plain.get("/events/"+this.eventUuid).then(e=>{if(this.event=e.data,this.hasAccess=!0===e.data.canAccessEventApp,!this.hasAccess)return this.$buefy.toast.open({message:this.$t("You are not registered for this event"),type:"is-warning"}),void this.$router.replace({name:"EventShow",params:{item:this.eventUuid}});this.loadVotesAvailability(),this.loadAgendaAvailability(),this.loadNetworkingCount(),this.loadParticipantsCount(),this.tryConsumeScannedHash()}).catch(e=>{console.log(e);const t="contact"===this.user?.kind?"EventAppMyEvents":"EventList";this.$router.replace({name:t})}).finally(()=>{this.isLoading=!1})},initEventAppPush(){try{const e=navigator.userAgent;if(e.includes("orgo-app"))return void this.initEventAppOneSignal(e);if(/^((?!chrome|android).)*safari/i.test(e))return;if("undefined"===typeof Notification||!("serviceWorker"in navigator))return;const t=(0,nu.Wp)(w.Nd),i=(0,ou.dG)(t),s=()=>{(0,ou.gf)(i,{vapidKey:lu}).then(e=>{e&&this.saveEventAppPushToken(e)}).catch(e=>console.log(e))};navigator.permissions.query({name:"push",userVisibleOnly:!0}).then(e=>{"prompt"===e.state?Notification.requestPermission().then(e=>{"granted"===e&&s()}):"granted"===e.state&&s(),e.onchange=()=>{"granted"===e.state&&s()}}).catch(e=>console.log(e)),(0,ou.xD)(i,e=>{this.$buefy.snackbar.open({duration:8e3,message:(e.notification?.title||"")+(e.notification?.body?"</br>"+e.notification.body:""),type:"is-warning",position:"is-bottom-left",actionText:this.$t("view"),onAction:()=>{const t=e.fcmOptions?.link;if(!t)return;const i=(0,au.T)(t);i?this.$router.replace(i):window.location.assign(t)}})})}catch(e){console.log(e)}},initEventAppOneSignal(e){const t=e.match(/orgo-app\s([a-f0-9-]+)\s(Android|iOS)/);if(!t)return;const i=t[1],s=t[2];this.user&&this.user.id&&this.$http.plain.patch("/push-token-add",{token:i,deviceId:this.getDeviceFingerprint(),deviceType:s}).catch(e=>console.log(e))},saveEventAppPushToken(e){const t=this.getDeviceFingerprint();this.$http.plain.patch("/push-token-add",{token:e,deviceId:t,deviceType:navigator.platform}).then(()=>{}).catch(e=>console.log(e))},getDeviceFingerprint(){try{const e=document.createElement("canvas").getContext("webgl");if(!e)return"event-app-no-webgl";
1const t=e.getExtension("WEBGL_debug_renderer_info");if(!t)return"event-app-no-debug";const i=e.getParameter(t.UNMASKED_RENDERER_WEBGL);return btoa(i)}catch(e){return"event-app-fallback"}},loadAgendaAvailability(){this.$http.plain.get("/sub-events-list/"+this.eventUuid).then(e=>{const t=e.data,i=t["hydra:member"]||t.items||t||[];this.hasAgenda=!!Array.isArray(i)&&i.length>0,this.hasAgenda||"EventAppAgenda"!==this.$route.name||this.$router.replace({name:"EventAppDetails",params:{item:this.eventUuid}}),this.$nextTick(this.updateTabIndicator)}).catch(()=>{this.hasAgenda=!1,"EventAppAgenda"===this.$route.name&&this.$router.replace({name:"EventAppDetails",params:{item:this.eventUuid}}),this.$nextTick(this.updateTabIndicator)})},loadNetworkingCount(){this.isDesktop||this.$http.plain.get("/event-app/"+this.eventUuid+"/attendees").then(e=>{const t=e.data?.confirmedCount;this.networkingCount="number"===typeof t?t:null,this.$nextTick(this.updateTabIndicator)}).catch(()=>{this.networkingCount=null})},loadParticipantsCount(){this.isDesktop||this.event&&this.event.canManageEventApp&&this.event.id&&this.$http.plain.get("/event_attends?event="+this.event.id+"&itemsPerPage=0").then(e=>{const t=e.data?.["hydra:totalItems"];this.participantsCount="number"===typeof t?t:null,this.$nextTick(this.updateTabIndicator)}).catch(()=>{this.participantsCount=null})},loadVotesAvailability(){this.$http.plain.get("/event-app/"+this.eventUuid+"/votes").then(e=>{const t=Array.isArray(e.data)?e.data:[];this.hasVotes=t.some(e=>["upcoming","live","closed"].includes(e.status)),this.$nextTick(this.updateTabIndicator)}).catch(()=>{this.hasVotes=!1})},formatDateRange(e,t){if(!e)return"";const i=this.$filters.format(e,"MMM D");if(!t)return this.capitalizeWords(i);const s=new Date(e),a=new Date(t);if(s.toDateString()===a.toDateString())return this.capitalizeWords(i);const n=this.$filters.format(t,"MMM D");return this.capitalizeWords(`${i} â ${n}`)},formatBadgeDateRange(e,t){if(!e)return"";if(!t)return this.capitalizeWords(this.$filters.format(e,"monthDay"));const i=new Date(e),s=new Date(t);if(i.toDateString()===s.toDateString())return this.capitalizeWords(this.$filters.format(e,"monthDay"));const a=i.getMonth()===s.getMonth()&&i.getFullYear()===s.getFullYear();return a?this.capitalizeWords(`${i.getDate()}â${s.getDate()} ${this.$filters.format(t,"MMMM")}`):this.capitalizeWords(`${this.$filters.format(e,"monthDay")} â ${this.$filters.format(t,"monthDay")}`)},capitalizeWords(e){return e?e.replace(/\p{L}+/gu,e=>e.charAt(0).toUpperCase()+e.slice(1)):""},extractTown(e){if(!e)return"";const t=e.split(",").map(e=>e.trim()).filter(Boolean);return 0===t.length?"":1===t.length?t[0]:t[t.length-2]},onPickCalendar(e){this.isCalendarMenuOpen=!1,this.addToCalendar(e)},onCalendarKeydown(e){"Escape"===e.key&&this.isCalendarMenuOpen&&(this.isCalendarMenuOpen=!1)},goBackToEvents(){"contact"!==this.user?.kind?(this.$store.commit("setCurrentGroup",null),this.$router.push({name:"EventList"})):this.$router.push({name:"EventAppMyEvents"})},addToCalendar(e){if(!this.event)return;if("apple"===e)return void this.downloadIcsInvite();const t=this.buildCalendarUrl(e);t&&window.open(t,"_blank","noopener,noreferrer")},buildCalendarUrl(e){const t=this.toIcsDate(this.event.dateTimeBegin),i=this.toIcsDate(this.event.dateTimeEnd)||t;if(!t)return null;const s=this.event.name||"",a=this.event.location||"",n=(this.event.description||"").replace(/<[^>]+>/g,""),o=new URLSearchParams;switch(e){case"google":return o.set("action","TEMPLATE"),o.set("text",s),o.set("dates",t+"/"+i),n&&o.set("details",n),a&&o.set("location",a),"https://calendar.google.com/calendar/render?"+o.toString();case"outlook":return o.set("path","/calendar/action/compose"),o.set("rru","addevent"),o.set("subject",s),o.set("startdt",new Date(this.event.dateTimeBegin).toISOString()),this.event.dateTimeEnd&&o.set("enddt",new Date(this.event.dateTimeEnd).toISOString()),n&&o.set("body",n),a&&o.set("location",a),"https://outlook.office.com/calendar/0/deeplink/compose?"+o.toString();case"yahoo":return o.set("v","60"),o.set("title",s),o.set("st",t),this.event.dateTimeEnd&&o.set("et",i),n&&o.set("desc",n),a&&o.set("in_loc",a),"https://calendar.yahoo.com/?"+o.toString();default:return null}}
1,downloadIcsInvite(){const e=this.buildIcsContent(),t=new Blob([e],{type:"text/calendar;charset=utf-8"}),i=URL.createObjectURL(t),s=(this.event.name||"event").replace(/[^a-z0-9-_]+/gi,"_")+".ics",a=/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;if(a)window.location.href=i;else{const e=document.createElement("a");e.href=i,e.download=s,document.body.appendChild(e),e.click(),document.body.removeChild(e)}setTimeout(()=>URL.revokeObjectURL(i),6e4)},buildIcsContent(){const e=this.toIcsDate(this.event.dateTimeBegin),t=this.toIcsDate(this.event.dateTimeEnd),i=this.toIcsDate((new Date).toISOString()),s=(this.event.uuid||this.event.id||"event-"+Date.now())+"@orgo.space",a=this.icsEscape(this.event.name||""),n=this.icsEscape(this.event.location||""),o=this.icsEscape((this.event.description||"").replace(/<[^>]+>/g,"")),l=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//Orgo//EventApp//EN","BEGIN:VEVENT","UID:"+s,"DTSTAMP:"+i];return e&&l.push("DTSTART:"+e),t&&l.push("DTEND:"+t),a&&l.push("SUMMARY:"+a),n&&l.push("LOCATION:"+n),o&&l.push("DESCRIPTION:"+o),l.push("END:VEVENT","END:VCALENDAR"),l.join("\r\n")},toIcsDate(e){if(!e)return"";const t=new Date(e);return isNaN(t.getTime())?"":t.toISOString().replace(/[-:]/g,"").split(".")[0]+"Z"},icsEscape(e){return String(e||"").replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\n/g,"\\n")},updateTabIndicator(){const e=this.$refs.tabsNav;if(!e)return;const t=e.querySelector(".event-app__tab.is-active");t?(this.indicatorStyle={opacity:1,width:`${t.offsetWidth}px`,transform:`translateX(${t.offsetLeft}px)`},this.scrollActiveTabIntoView(t)):this.indicatorStyle={opacity:0}},isTabActive(e){const t=this.$route.name;if(t===e.name)return!0;const i={EventAppNetworking:["EventAppNetworkingMeetings"],EventAppFeed:["EventAppFeedPost"]};return(i[e.name]||[]).includes(t)},openScannerFromBadge(){this.showBadge=!1,this.$nextTick(()=>{this.showScanner=!0})},onScannedCheckedIn(){this.$buefy.toast.open({message:this.$t("Checked in"),type:"is-success",duration:2500})},onSplashGoToProfile(){this.eventUuid&&this.$router.push({name:"EventAppProfile",params:{item:this.eventUuid}})},scrollActiveTabIntoView(e){const t=this.$refs.tabsNav;t&&e&&(t.scrollWidth<=t.clientWidth||"function"===typeof e.scrollIntoView&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"}))}}};const du=(0,I.A)(ru,[["render",Cc],["__scopeId","data-v-58d220d2"]]);var cu=du;const uu={class:"event-app-contact-shell"},mu={key:0,class:"event-app-contact-header"},pu=["aria-label","aria-expanded"],hu=["aria-label"],gu=["title","aria-pressed"],fu=["title","aria-pressed"],bu={key:1,class:"event-app-contact-rail is-hidden-touch","aria-label":"$t('Workspaces')"},yu={class:"event-app-contact-rail-list"},vu=["aria-label","onClick"],ku={key:0,class:"event-app-contact-rail-kind"},Cu={class:"event-app-contact-main"},Lu=["aria-label"],wu={class:"event-app-contact-drawer-header"},_u={class:"event-app-contact-drawer-title"},Eu=["aria-label"],$u={key:0,class:"event-app-contact-drawer-account"},Fu={class:"event-app-contact-drawer-account-label"},Tu={class:"event-app-contact-drawer-account-email"},Su={key:1,class:"event-app-contact-drawer-list"},Au=["onClick"],Pu={class:"event-app-contact-drawer-item-logo"},Iu={key:0,class:"event-app-contact-drawer-item-kind"},Mu={class:"event-app-contact-drawer-item-name"},xu={class:"event-app-contact-drawer-actions"};function Nu(e,t,i,a,n,o){const l=(0,k.g2)("font-awesome-icon"),r=(0,k.g2)("LogoThumbnail"),d=(0,k.g2)("b-tooltip"),c=(0,k.g2)("router-view"),u=(0,k.g2)("b-button");return(0,k.uX)(),(0,k.CE)("div",uu,[o.isDesktop?(0,k.Q3)("",!0):((0,k.uX)(),(0,k.CE)("header",mu,[(0,k.Lk)("button",{type:"button",class:"event-app-contact-burger","aria-label":e.$t("Open workspaces menu"),"aria-expanded":n.isDrawerOpen?"true":"false","aria-controls":"event-app-contact-drawer",onClick:t[0]||(t[0]=(...e)=>o.openDrawer&&o.openDrawer(...e))},[(0,k.bF)(l,{icon:"fa-light fa-bars"})],8,pu),(0,k.Lk)("div",{class:"event-app-contact-theme-toggle",role:"group","aria-label":e.$t("Theme mode")},[(0,k.Lk)("button",{type:"button",class:(0,E.C4)(["event-app-contact-theme-btn",{"is-active":!o.isDarkMode}]),title:e.$t("Switch light mode"),"aria-pressed":!o.isDarkMode,onClick:t[1]||(t[1]=e=>o.setThemeMode("light"))},[(0,k.bF)(l,{icon:"fa-light fa-sun-bright"})],10,gu),(0,k.Lk)("button",{type:"button",class:(0,E.C4)(["event-app-contact-theme-btn",{"is-active":o.isDarkMode}]),title:e.$t("Switch dark mode"),"aria-pressed":o.isDarkMode,onClick:t[2]||(t[2]=e=>o.setThemeMode("dark"))},[(0,k.bF)(l,{icon:"fa-light fa-moon-stars"})],10,fu)],8,hu)])),o.isDesktop&&o.hasWorkspaces?((0,k.uX)(),(0,k.CE)("aside",bu,[(0,k.Lk)("ul",yu,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(Object.entries(e.$store.state.spaces),([t,i])=>((0,k.uX)(),(0,k.CE)("li",{key:t,class:(0,E.C4)({"is-active":e.tenant&&e.tenant.slug===t})},[(0,k.bF)(d,{label:i.tenant.name,position:"is-right",type:"is-dark"},{default:(0,k.k6)(()=>[(0,k.Lk)("button",{type:"button",class:"event-app-contact-rail-btn","aria-label":i.tenant.name,onClick:e=>o.switchTenant(t)},[(0,k.bF)(r,{item:i.tenant,"is-type":"roundSmall"},null,8,["item"]),"contact"===i.eventAppKind?((0,k.uX)(),(0,k.CE)("span",ku,[(0,k.bF)(l,{icon:"fa-light fa-user-tag"})])):(0,k.Q3)("",!0)],8,vu)]),_:2},1032,["label"])],2))),128))])])):(0,k.Q3)("",!0),(0,k.Lk)("main",Cu,[((0,k.uX)(),(0,k.Wv)(c,{key:e.$route.fullPath}))]),(0,k.bF)(s.eB,{name:"event-app-contact-drawer-fade"},{default:(0,k.k6)(()=>[n.isDrawerOpen?((0,k.uX)(),(0,k.CE)("div",{key:0,class:"event-app-contact-drawer-overlay",onClick:t[3]||(t[3]=(...e)=>o.closeDrawer&&o.closeDrawer(...e))})):(0,k.Q3)("",!0)]),_:1}),(0,k.bF)(s.eB,{name:"event-app-contact-drawer-slide"},{default:(0,k.k6)(()=>[n.isDrawerOpen?((0,k.uX)(),(0,k.CE)("aside",{key:0,id:"event-app-contact-drawer",class:"event-app-contact-drawer",role:"dialog","aria-label":e.$t("Workspaces")},[(0,k.Lk)("header",wu,[(0,k.Lk)("h2",_u,(0,E.v_)(e.$t("Workspaces")),1),(0,k.Lk)("button",{type:"button",class:"event-app-contact-drawer-close","aria-label":e.$t("Close"),onClick:t[4]||(t[4]=(...e)=>o.closeDrawer&&o.closeDrawer(...e))},[(0,k.bF)(l,{icon:"fa-light fa-xmark"})],8,Eu)]),o.verifiedEmail?((0,k.uX)(),(0,k.CE)("div",$u,[(0,k.Lk)("p",Fu,(0,E.v_)(e.$t("Signed in as")),1
1),(0,k.Lk)("p",Tu,(0,E.v_)(o.verifiedEmail),1)])):(0,k.Q3)("",!0),o.hasWorkspaces?((0,k.uX)(),(0,k.CE)("ul",Su,[((0,k.uX)(!0),(0,k.CE)(k.FK,null,(0,k.pI)(Object.entries(e.$store.state.spaces),([t,i])=>((0,k.uX)(),(0,k.CE)("li",{key:t},[(0,k.Lk)("button",{type:"button",class:(0,E.C4)(["event-app-contact-drawer-item",{"is-active":e.tenant&&e.tenant.slug===t}]),onClick:e=>o.switchTenant(t)},[(0,k.Lk)("span",Pu,[(0,k.bF)(r,{item:i.tenant,"is-type":"roundSmall"},null,8,["item"]),"contact"===i.eventAppKind?((0,k.uX)(),(0,k.CE)("span",Iu,[(0,k.bF)(l,{icon:"fa-light fa-user-tag"})])):(0,k.Q3)("",!0)]),(0,k.Lk)("span",Mu,(0,E.v_)(i.tenant.name),1)],10,Au)]))),128))])):(0,k.Q3)("",!0),(0,k.Lk)("div",xu,[(0,k.bF)(u,{class:"is-rounded is-fullwidth","icon-left":"user",onClick:o.goToProfile},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("My profile")),1)]),_:1},8,["onClick"]),(0,k.bF)(u,{class:"is-rounded is-fullwidth is-danger is-light mt-2","icon-left":"right-from-bracket",onClick:o.logout},{default:(0,k.k6)(()=>[(0,k.eW)((0,E.v_)(e.$t("Log out")),1)]),_:1},8,["onClick"])])],8,Lu)):(0,k.Q3)("",!0)]),_:1})])}var Uu={name:"EventAppContactLayout",components:{LogoThumbnail:Us.A},props:["layoutSize"],data(){return{isDrawerOpen:!1}},computed:{...(0,L.L8)(["tenant","user"]),verifiedEmail(){try{return sessionStorage.getItem("eventApp.verifiedEmail")||null}catch(e){return null}},hasWorkspaces(){const e=this.$store.state.spaces||{};return Object.keys(e).length>0},isDesktop(){return!this.$isMobile()},isDarkMode(){return"dark"===this.$store.state.theme}},created(){try{const e=localStorage.getItem("eventApp.themeMode");"light"!==e&&"dark"!==e||e===this.$store.state.theme||this.$store.commit("switchTheme",e)}catch(e){}},methods:{setThemeMode(e){if("dark"===e!==this.isDarkMode){this.$store.commit("switchTheme",e);try{localStorage.setItem("eventApp.themeMode",e)}catch(t){}}},openDrawer(){this.isDrawerOpen=!0},closeDrawer(){this.isDrawerOpen=!1},switchTenant(e){const t=this.$store.state.spaces[e];if(t&&t.tenant)if(this.isDrawerOpen=!1,this.$store.commit("setTenant",t.tenant),"user"!==t.eventAppKind){try{sessionStorage.setItem("eventApp.tenantSlug",e)}catch(i){}"EventAppMyEvents"===this.$route.name?this.$router.go(0):this.$router.push({name:"EventAppMyEvents"})}else{try{sessionStorage.removeItem("eventApp.tenantSlug"),sessionStorage.removeItem("eventApp.verifiedEmail")}catch(i){}this.$http.plain.get("/me").then(t=>{this.$store.commit("setCurrentUser",t.data),this.$store.state.spaces[e].user=t.data,this.$router.push({name:"Dashboard"})}).catch(e=>{console.log(e)})}},goToProfile(){this.isDrawerOpen=!1,this.$router.push({name:"EventAppContactProfile"})},logout(){this.isDrawerOpen=!1;try{sessionStorage.removeItem("eventApp.tenantSlug"),sessionStorage.removeItem("eventApp.verifiedEmail")}catch(e){}this.$store.state.spaces={},this.$router.push({name:"Login"})}}};const Du=(0,I.A)(Uu,[["render",Nu],["__scopeId","data-v-0c6237f3"]]);var Xu=Du,Vu=i(11736),Ru=i.n(Vu),Ou=i(99418);const Qu=["style","iframe","frame","object","embed","form","input","button","select","textarea"],Bu=["srcdoc","formaction","ping"];let Gu=!1;function Wu(){Gu||(Ou.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.getAttribute("target")&&e.setAttribute("rel","noopener noreferrer")}),Gu=!0)}function ju(e){return null===e||void 0===e||""===e?"":(Wu(),Ou.A.sanitize(String(e),{FORBID_TAGS:Qu,FORBID_ATTR:Bu,ADD_ATTR:["target"],KEEP_CONTENT:!0}))}const zu={beforeMount(e,t){e.innerHTML=ju(t.value)},updated(e,t){t.value!==t.oldValue&&(e.innerHTML=ju(t.value))}};function qu(e,t){const i=e=>{const i=e.target;i&&"function"===typeof i.setCustomValidity&&i.validity?.valueMissing&&(i.setCustomValidity(t("Please fill in this field")),Promise.resolve().then(()=>i.setCustomValidity("")))};return e.addEventListener("invalid",i,!0),()=>e.removeEventListener("invalid",i,!0)}var Ju=i(33723);(0,Ju.k)("/service-worker.js",{ready(){},registered(){},cached(){},updatefound(){},updated(){},offline(){},error(e){console.error("Error during service worker registration:",e)}});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const Hu=`${w.QU}${w.H$}/frontend-logs`,Ku="build-1790265469329";class Yu{constructor(){this.enabled=!1,this.seen=new Set,this.sent=0,this.maxPerSession=25,this.windowCount=0,this.windowStart=0,this.maxPerMinute=10,this.bootStart=0,this.interactive=!1,this.stallReported=!1,this.watchdog=null}enable(){this.enabled||(this.enabled=!0,window.addEventListener("error",e=>{(e.error||e.message)&&this.report({type:"UncaughtError",message:e.message,stack:e.error&&e.error.stack,file:e.filename,line:e.lineno})}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;this.report({type:this._isChunk(t)?"ChunkLoadError":"UnhandledRejection",message:t&&t.message||String(t),stack:t&&t.stack})}),window.__orgoReportError=e=>this.report(e))}_isChunk(e){const t=e&&(e.message||String(e))||"";return e&&"ChunkLoadError"===e.name||t.includes("Loading chunk")||t.includes("dynamically imported module")||t.includes("Importing a module script failed")}markBootStart(){this.bootStart=performance.now()}startWatchdog(e=1e4){this.watchdog=setTimeout(()=>{this.interactive||(this.stallReported=!0,this.report({type:"BootStall",message:`app not interactive after ${e}ms`,elapsedMs:Math.round(performance.now()-this.bootStart)},!0))},e)}markInteractive(){this.interactive||(this.interactive=!0,clearTimeout(this.watchdog),this.stallReported&&this.report({type:"BootRecovered",message:"app became interactive after a stall",elapsedMs:Math.round(performance.now()-this.bootStart)},!0))}report(e,t=!1){if(!this.enabled)return;const i=Date.now();if(i-this.windowStart>6e4&&(this.windowStart=i,this.windowCount=0),this.windowCount>=this.maxPerMinute||this.sent>=this.maxPerSession)return;const s=`${e.type}|${e.message}|${(e.stack||"").slice(0,120)}`;if(!t&&this.seen.has(s))return;this.seen.add(s),this.windowCount++,this.sent++;const a=u.M&&u.M.state&&u.M.state.currentUser,n={log_type:"frontend_event",kind:e.type,message:this._clip(e.message,500),stack:this._clip(e.stack,1500),file:e.file,line:e.line,elapsedMs:e.elapsedMs,url:location.href,release:Ku,userId:a&&a.id||"anonymous",email:a&&a.email||null,tenant:u.M.state.tenant&&u.M.state.tenant.slug||"unknown",userAgent:navigator.userAgent};this._send(n)}_send(e){const t=JSON.stringify(e);if("function"===typeof fetch){const e={"Content-Type":"application/json"},i=u.M.state.tenant&&u.M.state.tenant.slug;return i&&(e["User-Tenant"]=i),void fetch(Hu,{method:"POST",body:t,keepalive:!0,credentials:"include",headers:e}).catch(()=>{})}navigator.sendBeacon&&navigator.sendBeacon(Hu,new Blob([t],{type:"application/json"}))}_clip(e,t){return null==e?e:String(e).slice(0,t)}}const Zu=new Yu;var em=Zu;(0,_.H2)(window.location.href),function(){const e=EventTarget.prototype.addEventListener,t=["touchstart","touchmove","wheel","mousewheel"];EventTarget.prototype.addEventListener=function(i,s,a){return t.includes(i)&&("object"===typeof a&&null!==a?void 0===a.passive&&(a.passive=!0):a={capture:"boolean"===typeof a&&a,passive:!0}),e.call(this,i,s,a)}}(),document.addEventListener("wheel",e=>{const t=document.activeElement;t&&"INPUT"===t.tagName&&"number"===t.type&&t===e.target&&t.blur()},{passive:!0});const tm=console.warn;console.warn=(...e)=>
1{/NavigationDuplicated|Discarded invalid param|Inspector router-inspector:0 not found/.test(e[0])||tm.apply(console,e)},(0,G.ku)(),window.setChrome=G.TV,em.enable(),em.markBootStart(),em.startWatchdog(1e4);const im=(0,s.Ef)(ee);window.app=im,im.use(u.M),im.use(te.A),im.use(v),im.use(c.Ay),im.use(se()),im.use(be),r.B&&r.B.props&&("object"===typeof r.B.props.appendToBody?r.B.props.appendToBody.default=!0:r.B.props.appendToBody={type:Boolean,default:!0});const sm=()=>(0,l.Wq)("numeric",(0,l.xy)(u.M.state.tenant));im.use(a.Ay,{defaultIconComponent:"font-awesome-icon",defaultIconPack:"fa-light",defaultIconSize:"is-medium",defaultIconPrev:"fa-chevron-left",defaultIconNext:"fa-chevron-right",defaultContainerElement:"#content",defaultDropdownMobileModal:!0,defaultDateFormatter:e=>Array.isArray(e)?e.map(e=>o()(e).format(sm())).join(" - "):o()(e).format(sm()),defaultDateParser:e=>{const t=o()(e,[sm(),...l.Yx],!0);return t.isValid()?t.toDate():null}}),qu(document,e=>c.Ay.global.t(e)),im.directive("linkified",Ru()),im.directive("safe-html",zu),im.component("FontAwesomeIcon",d.gc),im.component("AppLayout",_r),im.component("SimpleLayout",Sr),im.component("PaymentLayout",xr),im.component("StartLayout",Vr),im.component("IframeLayout",Br),im.component("WebsiteLayout",vd),im.component("EventAppLayout",cu),im.component("EventAppContactLayout",Xu),im.config.globalProperties.$cookieService=A.Ay,im.config.globalProperties.$store=u.M,im.config.productionTip=!1,im.mount("#app"),A.Ay.execute(),te.A.isReady().then(()=>em.markInteractive())},39162:function(e,t,i){"use strict";i.d(t,{A:function(){return g}});var s=i(20641),a=i(90033);const n={key:0,class:"celebration-overlay"},o={class:"confetti-container"},l={class:"celebration-modal"},r={class:"celebration-icon"},d={class:"celebration-title"},c={class:"celebration-message"};function u(e,t,i,u,m,p){const h=(0,s.g2)("font-awesome-icon");return m.isVisible?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",o,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(50,e=>(0,s.Lk)("div",{key:e,class:"confetti",style:(0,a.Tr)(p.getConfettiStyle(e))},null,4)),64))]),(0,s.Lk)("div",l,[(0,s.Lk)("div",r,[(0,s.bF)(h,{icon:"fa-light fa-party-horn"})]),(0,s.Lk)("h2",d,(0,a.v_)(e.$t("Congratulations"))+"!",1),(0,s.Lk)("p",c,(0,a.v_)(e.$t("You have completed your profile")),1),t[1]||(t[1]=(0,s.Lk)("div",{class:"celebration-progress"},[(0,s.Lk)("div",{class:"progress-circle"},[(0,s.Lk)("span",{class:"progress-text"},"100%")])],-1)),(0,s.Lk)("button",{class:"button is-primary is-rounded celebration-button",onClick:t[0]||(t[0]=(...e)=>p.dismiss&&p.dismiss(...e))},(0,a.v_)(e.$t("Continue")),1)])])):(0,s.Q3)("",!0)}var m={name:"ProfileCompletionCelebration",props:{userId:{type:[Number,String],required:!0}},emits:["dismissed"],data(){return{isVisible:!0,confettiColors:["#FFD700","#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8"]}},methods:{getConfettiStyle(e){const t=this.confettiColors[e%this.confettiColors.length],i=100*Math.random(),s=3*Math.random(),a=3+2*Math.random(),n=8+8*Math.random(),o=360*Math.random();return{"--confetti-color":t,left:`${i}%`,width:`${n}px`,height:`${n}px`,animationDelay:`${s}s`,animationDuration:`${a}s`,transform:`rotate(${o}deg)`}},async dismiss(){try{await this.$http.plain.patch("/users/"+this.userId,{privacy:{hasSeenProfileCompletionCelebration:!0}})}catch(e){console.error(e)}this.isVisible=!1,this.$emit("dismissed")}}},p=i(66262);const h=(0,p.A)(m,[["render",u],["__scopeId","data-v-0801280d"]]);var g=h},39886:function(e,t,i){"use strict";i.d(t,{X:function(){return n}});var s=i(99357),a=i(61486);function n(e){return!(0,a.zk)(window.location.hostname)&&(Boolean(e?.isGranted?.("ADMIN_TENANT"))&&(0,s.m)(e?.tenant))}},41183:function(e,t,i){"use strict";i.d(t,{OC:function(){return f},uK:function(){return m},ov:function(){return p},Lk:function(){return g},Vd:function(){return h},eY:function(){return w},om:function(){return I},bU:function(){return D},qS:function(){return $},yS:function(){return W},tY:function(){return P},qv:function(){return S},ql:function(){return j},rK:function(){return A},F2:function(){return z},AI:function(){return L}});i(44114),i(18111),i(22489),i(7588),i(61701),i(18237),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);const s="EU",a="NA",n="OTHER",o=["ALA","ALB","AND","AUT","BEL","BGR","BIH","BLR","CHE","CYP","CZE","DEU","DNK","ESP","EST","FIN","FRA","FRO","GBR","GGY","GIB","GRC","HRV","HUN","IMN","IRL","ISL","ITA","JEY","LIE","LTU","LUX","LVA","MCO","MDA","MKD","MLT","MNE","NLD","NOR","POL","PRT","ROU","RUS","SMR","SRB","SVK","SVN","SWE","TUR","UKR","VAT","XKX"],l=["ABW","AIA","ATG","BHS","BLZ","BMU","BRB","CA
1N","CRI","CUB","CUW","CYM","DMA","DOM","GLP","GRD","GTM","HND","HTI","JAM","KNA","LCA","MEX","MSR","MTQ","NIC","PAN","PRI","SLV","SXM","TCA","TTO","USA","VCT","VGB","VIR"],r={};function d(e){return e&&r[String(e).toUpperCase()]||n}o.forEach(e=>{r[e]=s}),l.forEach(e=>{r[e]=a});var c=i(58511),u=i(55657);const m="country",p="county",h="state",g="county-plain",f="cluster",b={south:27.5,west:-25,north:71.5,east:45},y={south:7,west:-168,north:72,east:-52},v={south:-56,west:-170,north:78,east:179},k={[m]:5,[h]:3,[p]:3,[g]:3},C=3;function L(e){return k[e]??C}const w=1,_=["BG","CA","GR","LB","PT","RO","SK","UA","US"],E=["CA","US"];function $(e){return _.includes(String(e||"").toUpperCase())}function F(e){return null!==(0,c.Vb)(e)}function T(e){return E.includes(String(e||"").toUpperCase())}function S(e,t){const i=String(e||"").toUpperCase();if(!i)return null;if(t&&T(i)){const e="US"===i?(0,c.Vb)(t):null;return e?`${i}-${e}`:null}return i}function A({tenant:e,filters:t={},hasPolygons:i=null}){const s=!!t.county;if(s)return f;const a=t.country?.id??t.country,n=!!e?.isInternational;if(n&&!a)return m;const o=n?t.country?.code:e?.country?.code,l=null===i?$(o):i;return l?T(o)?t.state?F(t.state)?p:g:h:p:g}function P(e){return e!==f}function I(e){return e===g?p:e}function M(e){return Number.isFinite(e?.lat)&&Number.isFinite(e?.lng)?{south:e.lat,west:e.lng,north:e.lat,east:e.lng}:null}function x(e,t){return{south:Math.min(e.south,t.south),west:Math.min(e.west,t.west),north:Math.max(e.n
1orth,t.north),east:Math.max(e.east,t.east)}}function N(e=[]){const t=e.filter(e=>(e.count||0)>0),i=t.map(e=>(0,u.V2)({iso3:e.code})||M(e)).filter(Boolean);if(i.length)return i.reduce(x);const o=new Set(t.map(e=>d(e.code)));if(o.has(n)||0===o.size)return v;const l=o.has(s),r=o.has(a);return l&&r?x(b,y):r?y:b}function U(e=[],t=.35){const i=e.filter(e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng));if(!i.length)return null;const s=i.map(e=>e.lat),a=i.map(e=>e.lng);return{south:Math.min(...s)-t,west:Math.min(...a)-t,north:Math.max(...s)+t,east:Math.max(...a)+t}}function D(e,t=[],i=null,s=null){return e===m?N(t):B(s)||(0,u.V2)(i)||U(t)}const X=2.5;function V(e){let t=0;for(let i=0,s=e.length-1;i<e.length;s=i++)t+=e[s][0]*e[i][1]-e[i][0]*e[s][1];return Math.abs(t/2)}function R(e,t){const i=Math.max(0,Math.max(e.south-t.north,t.south-e.north)),s=Math.max(0,Math.max(e.west-t.east,t.west-e.east));return Math.hypot(s,i)}function O(e,t){return{south:Math.min(e.south,t.south),west:Math.min(e.west,t.west),north:Math.max(e.north,t.north),east:Math.max(e.east,t.east)}}function Q(e){const t=[];return e.forEach(e=>{const i=e?.geometry;if(!i)return;const s="Polygon"===i.type?[i.coordinates]:"MultiPolygon"===i.type?i.coordinates:[];s.forEach(e=>{const i=e[0];if(!i?.length)return;let s=90,a=180,n=-90,o=-180;i.forEach(([e,t])=>{t<s&&(s=t),t>n&&(n=t),e<a&&(a=e),e>o&&(o=e)}),t.push({box:{south:s,west:a,north:n,east:o},area:V(i)})})}),t}function B(e){const t=Q(e?.features||[]);if(!t.length)return null;const i=[];return t.slice().sort((e,t)=>t.area-e.area).forEach(e=>{const t=i.filter(t=>R(t.box,e.box)<=X);if(!t.length)return void i.push({box:e.box,area:e.area});const s=t.reduce((e,t)=>({box:O(e.box,t.box),area:e.area+t.area}),e);t.forEach(e=>i.splice(i.indexOf(e),1)),i.push(s)}),i.reduce((e,t)=>t.area>e.area?t:e).box}function G(e){return(e||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\bsaint\b/g,"st").replace(/[^a-z0-9]/g,"")}function W(e=[]){const t={};return e.forEach(e=>{[e.name,e.code].forEach(i=>{const s=G(i);s&&void 0===t[s]&&(t[s]=e)})}),t}function j(e,t){const i=e?.properties||{};for(const s of[i.name,i.county,i.code,i.NAME,i.shapeName,e?.id]){const e=G(s);if(e&&t[e])return t[e]}return null}function z(e=[],t=null){return t?e.map(e=>{const i=t[String(e.id)]||0;return{...e,memberCount:i,isEmpty:0===i}}).sort((e,t)=>t.memberCount-e.memberCount||(e.name||"").localeCompare(t.name||"")):e}},41664:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(53751),n=i(90033);const o={autocomplete:"off"},l={class:"pl-2 text-overflow-trim is-flex-grow-1"},r={key:0},d={key:0,class:"icon is-small has-text-success"};function c(e,t,i,c,u,m){const p=(0,s.g2)("LogoThumbnail"),h=(0,s.g2)("font-awesome-icon"),g=(0,s.g2)("b-autocomplete"),f=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("form",o,[(0,s.bF)(f,{class:"user_search m-0"},{default:(0,s.k6)(()=>[(0,s.bF)(g,{ref:"userSearch",data:m.sortedFilteredUsers,"open-on-focus":!0,placeholder:i.label,field:"fullName","dropdown-position":"bottom",icon:i.icon,size:"is-small",rounded:!1!==i.isRounded,expanded:"",onSelect:m.change,onKeyup:(0,a.jR
1)(m.emitBlur,["esc"]),onFocus:m.getFilteredMembers,onTyping:m.getFilteredMembers},{default:(0,s.k6)(t=>[(0,s.Lk)("div",{class:(0,n.C4)(["is-flex is-align-items-center assignee-option",{"assignee-option--selected":m.isCurrentAssignee(t.option)}])},[((0,s.uX)(),(0,s.Wv)(p,{key:t.option.id,item:t.option,"is-type":"roundSmall"},null,8,["item"])),(0,s.Lk)("span",l,[(0,s.eW)(" Â "+(0,n.v_)(t.option.fullName)+" ",1),t.option.id===e.user.id?((0,s.uX)(),(0,s.CE)("span",r,"("+(0,n.v_)(e.$t("Me"))+")",1)):(0,s.Q3)("",!0)]),m.isCurrentAssignee(t.option)?((0,s.uX)(),(0,s.CE)("span",d,[(0,s.bF)(h,{icon:"fa-light fa-check"})])):(0,s.Q3)("",!0)],2)]),_:1},8,["data","placeholder","icon","rounded","onSelect","onKeyup","onFocus","onTyping"])]),_:1})])}i(44114),i(18111),i(22489),i(7588),i(61701),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var u=i(40834),m=i(31823),p={props:["label","isSupport","itemLoaded","isAssignee","supportTeam","icon","modelValue","focusOnLoad","project","currentAssignees","excludeAssigned","isRounded"],data(){return{title:this.label?this.label:this.$t("member"),memberName:null,unassigned:{fullName:null,id:"unassigned","@id":null,logo:null},data:[],isFetching:!1,users:[],filteredUsers:[]}},created(){this.unassigned.fullName=this.$t("unassigned"),this.loadUsers()},mounted(){this.focus()},methods:{...(0,u.L8)(["isGranted"]),isCurrentAssignee(e){return!(!this.currentAssignees||!this.currentAssignees.length||"unassigned"===e.id)&&this.currentAssignees.some(t=>t.id===e.id)},loadUsers(){this.isSupport?this.setSupportMembers():this.project&&this.project.uuid?this.setProjectMembers():this.setGroupMembers()},setProjectMembers(){this.$http.plain.get("/search-project-user/"+this.project.uuid+"/_").then(e=>{this.users=e.data.map(e=>({...e,fullName:e.firstName+" "+e.lastName}));let t=this.user.id;this.users=this.users.filter(e=>e.id!==t),this.users.unshift(this.user),this.isAssignee&&this.users.length>0&&this.users[0].id&&this.users.unshift(this.unassigned),this.filteredUsers=this.users}).catch(e=>{console.log(e),this.users=[this.user],this.isAssignee&&this.users.unshift(this.unassigned),this.filteredUsers=this.users})},setGroupMembers(){let e=this.$store.state.currentGroup;if(this.users=[],e&&"Group"===e["@type"]&&e.isProject&&e.userRoles)for(let i of e.userRoles)this.users.push(i.user);let t=this.user.id;this.users=this.users.filter(function(e){return e.id!==t}),this.users.unshift(this.user),this.isAssignee&&this.users.length>0&&this.users[0].id&&this.users.unshift(this.unassigned)},setSupportMembers(){this.users=[],this.users=this.supportTeam;let e=this.user.id;this.users=this.users.filter(function(t){return t.id!==e}),this.users.unshift(this.user),this.isAssignee&&this.users.length>0&&this.users[0].id&&this.users.unshift(this.unassigned),this.filteredUsers=this.users},getFilteredMembers(e){this.project&&this.project.uuid&&e&&e.length>=3?this.$http.plain.get("/search-project-user/"+this.project.uuid+"/"+encodeURIComponent(e)).then(e=>{let t=e.data.map(e=>({...e,fullName:e.firstName+" "+e.lastName})),i=this.user.id;t=t.filter(e=>e.id!==i),t.unshift(this.user),this.isAssignee&&t.unshift(this.unassigned),this.filteredUsers=t}).catch(e=>{console.log(e)}):(this.filteredUsers=this.users,e&&e.length>0&&(this.filteredUsers=this.users.filter(t=>t.fullName.toString().toLowerCase().indexOf(e.toLowerCase())>=0)))},focus(){this.focusOnLoad&&this.$refs.userSearch.focus()},emitBlur(){this.$emit("blur")},change(e){let t=e||null;this.$emit("update:modelValue",t),t&&this.$refs.userSearch&&this.$nextTick(()=>{this.$refs.userSearch.setSelected(null),this.$refs.userSearch.newValue=""})}},watch:{"$store.state.currentGroup":function(){this.project||this.setGroupMembers()}},computed:{...(0,u.L8)(["user","tenant"]),sortedFilteredUsers(){if(!this.currentAssignees||!this.currentAssignees.length)return this.filteredUsers;const e=new Set(this.currentAssignees.map(e=>e.id));if(this.excludeAssigned)return this.filteredUsers.filter(t=>"unassigned"===t.id||!e.has(t.id));const t=[],i=[],s=[];return this.filteredUsers.forEach(a=>{"unassigned"===a.id?i.push(a):e.has(a.id)?t.push(a):s.push(a)}),[...i,...t,...s]}},components:{LogoThumbnail:m.A}},h=i(66262);const g=(0,h.A)(p,[["render",c]]);var f=g},41863:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(90033),n=i(53751);const o=["disabled"],l={class:"icon is-small mr-1"},r=["disabled"],d={class:"icon is-small mr-1"};function c(e,t,i,c,u,m){const p=(0,s.g2)("font-awesome-icon");return i.isAttending?((0,s.uX)(),(0,s.CE)("button",{key:1,type:"button",class:(0,a.C4)(["button is-success is-small is-rounded",{"is-loading":i.isLoading}]),disabled:i.isLoading,onClick:t[1]||(t[1]=(0,n.D$)(t=>e.$emit("unattend"),["stop"]))},[(0,s.Lk)("span",d,[(0,s.bF)(p,{icon:"fa-light fa-circle-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Attending")),1)],10,r)):((0,s.uX)(),(0,s.CE)("button",{key:0,t
1ype:"button",class:(0,a.C4)(["button is-primary is-small is-rounded is-outlined",{"is-loading":i.isLoading}]),disabled:i.isLoading,onClick:t[0]||(t[0]=(0,n.D$)(t=>e.$emit("attend"),["stop"]))},[(0,s.Lk)("span",l,[(0,s.bF)(p,{icon:"fa-light fa-calendar-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Attend")),1)],10,o))}var u={name:"SubEventAttendButton",props:{isAttending:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1}},emits:["attend","unattend"]},m=i(66262);const p=(0,m.A)(u,[["render",c]]);var h=p},41891:function(e,t,i){"use strict";i.d(t,{Bj:function(){return o},Ed:function(){return l},i4:function(){return a}});const s=1200;function a(e){return!!e?.settingFeatures?.fees?.productUuid}function n(e,t){return!!e?.settingFeatures?.fees?.feeLocalExists&&!!t?.localCenter?.feeProduct}function o(e,t){return a(e)||n(e,t)}function l(e,t){return e?e.isLifetime?s:e.overwriteMonthPeriod||t?.monthPeriod||null:null}},43087:function(e,t,i){"use strict";i.d(t,{A:function(){return A}});var s=i(20641),a=i(90033);const n={key:0,class:"o-website-topbar"},o={class:"o-website-container o-website-topbar__inner"},l={key:0},r={key:1,class:"o-website-topbar__social"},d=["href","aria-label"],c={class:"o-website-header"},u={class:"o-website-container o-website-header__inner"},m=["src","alt"],p={key:1,class:"o-website-brand__name"},h={class:"o-website-nav__entries"},g=["onMouseenter","onFocusin"],f={class:"o-website-nav__row"},b=["aria-expanded","aria-label","onClick"],y={key:0,class:"o-website-nav__actions"},v=["aria-label"];function k(e,t,i,k,C,L){const w=(0,s.g2)("WebsiteIcon"),_=(0,s.g2)("router-link"),E=(0,s.g2)("WebsiteMenuLink");return(0,s.uX)(),(0,s.CE)("div",{ref:"root",class:(0,a.C4)(["o-website-chrome",{"is-stuck":C.isStuck,"is-menu-open":C.mobileOpen}])},[L.topBar.show&&(L.topBar.text||L.topBar.showSocial&&L.socialLinks.length)?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",o,[L.topBar.text?((0,s.uX)(),(0,s.CE)("span",l,(0,a.v_)(L.topBar.text),1)):(0,s.Q3)("",!0),L.topBar.showSocial&&L.socialLinks.length?((0,s.uX)(),(0,s.CE)("span",r,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(L.socialLinks,e=>((0,s.uX)(),(0,s.CE)("a",{key:e.network,href:e.url,"aria-label":e.label,target:"_blank",rel:"noopener noreferrer"},[(0,s.bF)(w,{name:e.icon},null,8,["name"])],8,d))),128))])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),(0,s.Lk)("header",c,[(0,s.Lk)("div",u,[(0,s.bF)(_,{class:"o-website-brand",to:L.homeRoute},{default:(0,s.k6)(()=>[L.logoUrl?((0,s.uX)(),(0,s.CE)("img",{key:0,src:L.logoUrl,alt:L.tenantName,class:"o-website-brand__logo"},null,8,m)):((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(L.tenantName),1))]),_:1},8,["to"]),(0,s.Lk)("nav",{ref:"nav",class:(0,a.C4)(["o-website-nav",{"is-open":C.mobileOpen}]),onMouseenter:t[0]||(t[0]=(...e)=>L.cancelClose&&L.cancelClose(...e)),onMouseleave:t[1]||(t[1]=(...e)=>L.scheduleClose&&L.scheduleClose(...e)),onFocusout:t[2]||(t[2]=(...e)=>L.onNavFocusOut&&L.onNavFocusOut(...e))},[(0,s.Lk)("div",{class:(0,a.C4)(["o-website-nav__pane",{"is-visible":!!C.hoverUuid}]),style:(0,a.Tr)(L.paneStyle),"aria-hidden":"true"},null,6),(0,s.Lk)("div",h,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(L.headerMenu,(t,i)=>((0,s.uX)(),(0,s.CE)("div",{key:t.uuid,class:(0,a.C4)(["o-website-nav__item",[C.hoverUuid===t.uuid?C.hoverMotion:null,{"has-submenu":t.children.length,"is-expanded":C.expandedUuid===t.uuid,"is-open":C.hoverUuid===t.uuid}]]),onMouseenter:e=>L.openSubmenu(t,i,e),onFocusin:e=>L.openSubmenu(t,i,e)},[(0,s.Lk)("div",f,[(0,s.bF)(E,{item:t,"has-children":!!t.children.length,"link-class":"o-website-nav__link",onNavigate:L.closeMenus},null,8,["item","has-children","onNavigate"]),t.children.length?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"o-website-nav__toggle","aria-expanded":C.expandedUuid===t.uuid||C.hoverUuid===t.uuid?"true":"false","aria-label":e.$t("Open submenu"),onClick:e=>L.toggleSubmenu(t.uuid)},[(0,s.bF)(w,{name:"chevron-down"})],8,b)):(0,s.Q3)("",!0)]),t.children.length?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["o-website-submenu",{"is-columns":t.children.length>6}])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.children,e=>((0,s.uX)(),(0,s.Wv)(E,{key:e.uuid,item:e,description:e.description,"link-class":"o-website-submenu__link",onNavigate:L.closeMenus},null,8,["item","description","onNavigate"]))),128))],2)):(0,s.Q3)("",!0)],42,g))),128))]),L.headerActions.length?((0,s.uX)(),(0,s.CE)("div",y,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(L.headerActions,e=>((0,s.uX)(),(0,s.Wv)(E,{key:e.uuid,item:e,"link-class":L.actionClass(e),onNavigate:L.closeMenus},null,8,["item","link-class","onNavigate"]))),128))])):(0,s.Q3)("",!0)],34),(0,s.Lk)("button",{class:"o-website-burger","aria-label":e.$t("Menu"),onClick:t[3]||(t[3]=e=>C.mobileOpen=!C.mobileOpen)},[(0,s.bF)(w,{name:C.mobileOpen?"xmark":"bars"},null,8,["name"])],8,v)])])],2)}i(18111),i(22489),i(7588),i(61701),i(18237),i(13579);var C=i(86489),L=i(19318),w=i(91495),_=i(28782),E=i(93811);const $=8;var F={name:"WebsiteHeader",components:{WebsiteMenuLink:C.A,WebsiteIcon:L.A},props:{site:{type:Object,default:null},tenant:{type:Object,default:null}},data(){return{mobileOpen:!1,isStuck:!1,expandedUuid:null,hoverUuid:null,hoverIndex:-1,hoverMotion:null,paneRect:null,closeTimer:null}},computed:{settings(){return this.site?.website||null},homeRoute(){return(0,w.ww)(this.site)},tenantName(){return this.site?.tenant?.name||this.tenant?.name||"Orgo"},logoUrl(){const e=this.site?.tenant?.logo||this.tenant?.logo;return e?_.hd+_.DJ+"tenant/"+e:null}
1,topBar(){return this.settings?.header?.topBar||{show:!1,text:null,showSocial:!1}},headerMenu(){return this.site?.menus?.header||[]},socialLinks(){const e=this.settings?.social||{};return E._.filter(t=>!!e[t.network]).map(t=>({...t,url:e[t.network]}))},paneStyle(){return this.paneRect?{transform:`translate3d(${this.paneRect.left}px, ${this.paneRect.top}px, 0)`,width:`${this.paneRect.width}px`,height:`${this.paneRect.height}px`}:null},headerActions(){const e=this.site?.menus?.headerActions||[];return e.length?e:[{uuid:"default-login",label:this.$t("Login"),linkType:"ROUTE",target:"Login",style:"TEXT"},{uuid:"default-register",label:this.$t("Become a member"),linkType:"ROUTE",target:"Register",style:"PRIMARY"}]}},mounted(){this.scrollRoots=[this.$refs.root?.closest(".o-website-frame"),this.$refs.root?.closest(".o-website")].filter(Boolean),this.scrollRoots.forEach(e=>e.addEventListener("scroll",this.onScroll,{passive:!0})),this.onScroll(),this.publishChromeHeight()},beforeUnmount(){this.cancelClose(),(this.scrollRoots||[]).forEach(e=>e.removeEventListener("scroll",this.onScroll)),this.chromeObserver?.disconnect()},methods:{publishChromeHeight(){const e=this.$refs.root,t=e?.closest(".o-website");if(!e||!t)return;const i=()=>[e.querySelector(".o-website-topbar"),e.querySelector(".o-website-header")].filter(Boolean),s=()=>t.style.setProperty("--o-w-chrome-h",`${i().reduce((e,t)=>e+t.offsetHeight,0)}px`);s(),"undefined"!==typeof ResizeObserver&&(this.chromeObserver=new ResizeObserver(s),i().forEac
1h(e=>this.chromeObserver.observe(e)))},onScroll(){this.isStuck=(this.scrollRoots||[]).some(e=>e.scrollTop>$)},actionClass(e){return"TEXT"===e.style?"o-website-nav__link o-website-nav__link--action":"o-website-nav__cta"+("SECONDARY"===e.style?" o-website-nav__cta--secondary":"")},toggleSubmenu(e){this.expandedUuid=this.expandedUuid===e?null:e},closeMenus(){this.mobileOpen=!1,this.expandedUuid=null,this.closeSubmenu()},openSubmenu(e,t,i){if(this.cancelClose(),!e.children.length)return void this.closeSubmenu();if(this.hoverUuid===e.uuid||this.mobileOpen)return;const s=i.currentTarget,a=s.querySelector(".o-website-submenu");a&&a.offsetWidth&&(this.paneRect={left:s.offsetLeft+a.offsetLeft,top:s.offsetTop+a.offsetTop,width:a.offsetWidth,height:a.offsetHeight},this.hoverMotion=null===this.hoverUuid?null:t>this.hoverIndex?"is-from-end":"is-from-start",this.hoverIndex=t,this.$nextTick(()=>{a.offsetWidth,this.hoverUuid=e.uuid}))},closeSubmenu(){this.cancelClose(),this.hoverUuid=null,this.hoverIndex=-1,this.hoverMotion=null},scheduleClose(){this.cancelClose(),this.closeTimer=setTimeout(()=>{this.hoverUuid=null,this.hoverIndex=-1,this.hoverMotion=null},140)},cancelClose(){this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null)},onNavFocusOut(e){this.$refs.nav?.contains(e.relatedTarget)||this.closeSubmenu()}}},T=i(66262);const S=(0,T.A)(F,[["render",k]]);var A=S},43432:function(e,t,i){"use strict";i.d(t,{A:function(){return P}});var s=i(20641),a=i(90033),n=i(53751);const o={ref:"pillContainer",class:"list-filter-pill"},l={class:"pill-label"},r={class:"pill-value"},d={class:"pill-label"},c={class:"pill-dropdown-header"},u={key:0,class:"pill-dropdown-search"},m={class:"control has-icons-left"},p=["placeholder"],h={class:"icon is-left is-small"},g={class:"pill-dropdown-body"},f={key:0,class:"pill-option-group-label"},b={class:"pill-option-text"},y=["onClick"],v={class:"pill-option-text"},k={key:0,class:"pill-dropdown-empty"},C={key:1,class:"pill-dropdown-apply"};function L(e,t,i,L,w,_){const E=(0,s.g2)("font-awesome-icon"),$=(0,s.g2)("b-checkbox"),F=(0,s.g2)("b-radio");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":_.hasSelection}]),onClick:t[1]||(t[1]=(0,n.D$)((...e)=>_.toggleDropdown&&_.toggleDropdown(...e),["stop"]))},[_.hasSelection?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>_.clearSelection&&_.clearSelection(...e),["stop"]))},[(0,s.bF)(E,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",l,(0,a.v_)(e.displayLabel),1),t[6]||(t[6]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),_.selectedColor?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"pill-option-swatch",style:(0,a.Tr)({backgroundColor:_.selectedColor})},null,4)):(0,s.Q3)("",!0),(0,s.Lk)("span",r,(0,a.v_)(_.selectedLabel),1),(0,s.bF)(E,{icon:"fa-light fa-chevron-down",class:"pill-chevron"})],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(E,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",d,(0,a.v_)(e.displayLabel),1)],64))],2),(0,s.bo)((0,s.Lk)("div",{ref:"dropdown",class:(0,a.C4)(["pill-dropdown",{"is-searchable":_.isSearchable,"is-align-right":_.isAlignedRight}])},[(0,s.Lk)("div",c,(0,a.v_)(i.filterTitle||e.$t("Filter by")+": "+e.displayLabel),1),_.isSearchable?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("div",m,[(0,s.bo)((0,s.Lk)("input",{ref:"searchInput","onUpdate:modelValue":t[2]||(t[2]=e=>w.searchQuery=e),class:"input is-small",placeholder:e.$t("Search"),onClick:t[3]||(t[3]=(0,n.D$)(()=>{},["stop"]))},null,8,p),[[n.Jo,w.searchQuery]]),(0,s.Lk)("span",h,[(0,s.bF)(E,{icon:"fa-light fa-magnifying-glass"})])])])):(0,s.Q3)("",!0),(0,s.Lk)("div",g,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(_.groupedOptions,(o,l)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"group-"+l},[o.label?((0,s.uX)(),(0,s.CE)("div",f,(0,a.v_)(o.label),1)):(0,s.Q3)("",!0),i.multiple?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:1},(0,s.pI)(o.options,i=>((0,s.uX)(),(0,s.CE)("div",{key:"cb-"+i.value,class:"pill-option",onClick:t[4]||(t[4]=(0,n.D$)(()=>{},["stop"]))},[(0,s.bF)($,{"model-value":w.pendingValue,"native-value":i.value,"onUpdate:modelValue":_.onCheckboxChange},{default:(0,s.k6)(()=>[_.hasColors?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["pill-option-swatch",{"is-empty":!i.color}]),style:(0,a.Tr)(i.color?{backgroundColor:i.color}:null)},null,6)):(0,s.Q3)("",!0),(0,s.Lk)("span",b,(0,a.v_)(e.optionLabel(i)),1)]),_:2},1032,["model-value","native-value","onUpdate:modelValue"])]))),128)):((0,s.uX)(!0),(0,s.CE)(s.FK,{key:2},(0,s.pI)(o.options,t=>((0,s.uX)(),(0,s.CE)("label",{key:"rb-"+t.value,class:(0,a.C4)(["pill-option",{"has-option-color":!!t.color}]),style:(0,a.Tr)(t.color?{"--pill-option-color":t.color}:null),onClick:(0,n.D$)(e=>_.selectOption(t.value),["stop"])},[(0,s.bF)(F,{"model-value":w.pendingValue,"native-value":t.value},{default:(0,s.k6)(()=>[(0,s.Lk)("span",v,(0,a.v_)(e.optionLabel(t)),1)]),_:2},1032,["model-value","native-value"])],14,y))),128))],64))),128)),0===_.filteredOptions.length?((0,s.uX)(),(0,s.CE)("div",k,(0,a.v_)(e.$t("noResults")),1)):(0,s.Q3)("",!0)]),_.needsApply?((0,s.uX)(),(0,s.CE)("div",C,[(0,s.Lk)("button",{class:"button is-small is-primary is-rounded is-fullwidth",onClick:t[5]||(t[5]=(0,n.D$)((...e)=>_.apply&&_.apply(...e),["stop"]))},(0,a.v_)(e.$t("apply")),1)])):(0,s.Q3)("",!0)],2),[[n.aG,w.isOpen]])],512)}i(18111),i(22489),i(20116),i(30531),i(61701),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);
1var w=i(37440),_=i(46093),E=i(95256),$=i(28906);const F=12;var T={name:"ListFilterPill",mixins:[$.A],props:{label:{type:String,required:!0},options:{type:Array,required:!0},modelValue:{type:[String,Number,Array],default:null},filterTitle:{type:String,default:null},searchable:{default:null},multiple:{type:Boolean,default:!1},showApply:{type:Boolean,default:!1},align:{type:String,default:"left"}},emits:["update:modelValue","open"],data(){return{isOpen:!1,pendingValue:this.multiple?[...this.modelValue||[]]:this.modelValue,searchQuery:"",flipped:!1}},computed:{isAlignedRight(){return"right"===this.align||this.flipped},isGrouped(){return this.options.length>0&&Array.isArray(this.options[0]?.options)},allOptions(){return this.isGrouped?this.options.flatMap(e=>e.options):this.options},isSearchable(){return null!==this.searchable?this.searchable:this.allOptions.length>=F},needsApply(){return this.multiple||this.showApply},hasSelection(){return this.multiple?Array.isArray(this.modelValue)&&this.modelValue.length>0:null!==this.modelValue&&void 0!==this.modelValue&&""!==this.modelValue},selectedLabel(){if(!this.hasSelection)return"";if(this.multiple){if(1===this.modelValue.length){const e=this.allOptions.find(e=>e.value===this.modelValue[0]);return e?(0,E.ND)(e.label):""}return this.modelValue.length+" "+this.$t("selected")}const e=this.allOptions.find(e=>e.value===this.modelValue);return e?(0,E.ND)(e.label):""},hasColors(){return this.allOptions.some(e=>!!e.color)},selectedColor(){if(this.multiple||!this.hasSelection)return null;const e=this.allOptions.find(e=>e.value===this.modelValue);return e?.color||null},filteredOptions(){if(!this.searchQuery)return this.allOptions;const e=this.searchQuery.toLowerCase();return this.allOptions.filter(t=>t.label.toLowerCase().includes(e))},groupedOptions(){if(!this.isGrouped)return[{label:null,options:this.filteredOptions}];const e=new Set(this.filteredOptions.map(e=>e.value));return this.options.map(t=>({label:t.label,options:t.options.filter(t=>e.has(t.value))})).filter(e=>e.options.length>0)}},watch:{modelValue(e){this.pendingValue=this.multiple?[...e||[]]:e}},mounted(){document.addEventListener("click",this.onClickOutside),this.unregisterPill=(0,w.f)(this.close)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside),this.unregisterPill&&this.unregisterPill()},methods:{toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&((0,w.r)(this.close),(0,_.Mj)(this),this.resetPending(),this.searchQuery="",this.$emit("open"),this.isSearchable&&this.$nextTick(()=>{this.$refs.searchInput&&this.$refs.searchInput.focus()}))},open(){this.isOpen||this.toggleDropdown()},close(){this.isOpen=!1},resetPending(){this.pendingValue=this.multiple?[...this.modelValue||[]]:this.modelValue},selectOption(e){this.pendingValue=e,this.needsApply||(this.$emit("update:modelValue",e),this.isOpen=!1)},onCheckboxChange(e){this.pendingValue=e},apply(){this.$emit("update:modelValue",this.multiple?[...this.pendingValue||[]]:this.pendingValue),this.isOpen=!1},clearSelection(){this.pendingValue=this.multiple?[]:null,this.$emit("update:modelValue",this.multiple?[]:null),this.isOpen=!1},onClickOutside(e){this.isOpen&&this.$refs.pillContainer&&!this.$refs.pillContainer.contains(e.target)&&(this.isOpen=!1)}}},S=i(66262);const A=(0,S.A)(T,[["render",L]]);var P=A},43464:function(e,t,i){"use strict";i.d(t,{M:function(){return h}});i(44114),i(18111),i(22489),i(20116),i(7588),i(13579),i(14603),i(47566),i(98721);var s=i(40834),a=i(70406),n=i(2321),o=i(95256);class l{constructor(e){let t=Object.keys(o.P);if(t.push("USER"),t.push("USER_LOCAL"),!t.includes(e))return!1}voteOnAttribute(e,t,i){if(i&&(i.permissions?"object"!==typeof i.permissions||Array.isArray(i.permissions)?Array.isArray(i.permissions)||(i.permissions=[]):i.permissions=Object.values(i.permissions):i.permissions=[],0!==i.permissions.length||i.isRoleAdminTenant||i.isRoleSuperAdmin)){if(i.permissions.includes("ADMIN_TENANT")||i.isRoleAdminTenant||i.isRoleSuperAdmin)return!0;if(e.includes("_LOCAL")){if(e.includes("_PARENT_LOCAL")){let t=e.replace("_PARENT_LOCAL","_TENANT");if(this.hasRights(t,i))return!0}else{let t=e.replace("_LOCAL","_TENANT");if(this.hasRights(t,i))return!0}let s=null;if(["HR_PARENT_LOCAL","FINANCIAL_PARENT_LOCAL","ADMIN_PARENT_LOCAL"].includes(e)?s=e:["ADMIN_LOCAL","HR_LOCAL","FINANCIAL_LOCAL"].includes(e)&&(s=e.replace("_LOCAL","_PARENT_LOCAL")),!i.permissions.includes(e)&&this.hasRights(e,i)&&this.isSameLocalCenterOrParent(t,i))return!0;
1if(s&&i.permissions.includes(s)&&this.isSameLocalCenterOrParent(t,i))return!0;if(t&&!this.isSameLocalCenter(t,i))return!1;if(i.permissions.includes("ADMIN_PARENT_LOCAL"))return!0;if(i.permissions.includes("ADMIN_LOCAL")&&!e.includes("_PARENT_LOCAL"))return!0}return this.hasRights(e,i)}}hasRights(e,t){if("USER_LOCAL"===e)return!0;if(t.permissions?"object"!==typeof t.permissions||Array.isArray(t.permissions)?Array.isArray(t.permissions)||(t.permissions=[]):t.permissions=Object.values(t.permissions):t.permissions=[],t.permissions.includes(e))return!0;for(const[i,s]of Object.entries(o.ZV))for(const a of s)if(a===e&&t.permissions.includes(i))return!0;return!1}isSameLocalCenter(e,t){if(!e)return!1;let i=e;if(e&&e["@id"]&&e.id&&(i=e.id),e&&("string"===typeof e||e instanceof String)&&e.includes("api/v1")&&(i=parseInt(e.split("/").pop())),t.localCenter&&t.localCenter.id===i)return!0;if(t.localCenterObject&&t.localCenterObject.id===i)return!0;if(t.userRoles&&Array.isArray(t.userRoles))for(const s of t.userRoles)if(!s.dateEnded&&s.localCenterPermission&&s.unit){let e=s.unit.id||("number"===typeof s.unit?s.unit:null);if(e===i)return!0}return!1}isSameParentLocalCenter(e,t){if(!e||!t.localCenterParent)return!1;let i=e;return e&&e["@id"]&&e.id&&(i=e.id),e&&("string"===typeof e||e instanceof String)&&e.includes("api/v1")&&(i=parseInt(e.split("/").pop())),!(!t.localCenterParent||t.localCenterParent.id!==i)}isSameLocalCenterOrParent(e,t){if(!e)return!1;if(!t.localCenter)return!1;if(t.localCenterParent&&t.localCenterParent.id){if(e.id===t.localCenterParent.id)return!0;if(Array.isArray(e.ancestors)&&e.ancestors.some(e=>e.id===t.localCenterParent.id))return!0;let i=null;if(e.isParent?i=e:e.parent&&(i=e.parent),i&&i.id===t.localCenterParent.id)return!0}return this.isSameParentLocalCenter(e,t)||this.isSameLocalCenter(e,t)}}var r=i(3095),d=i(28782);const c=2,u=["isLoadingButton","isLoadingGeneral","isMobile","isPortrait","isFormModalVisible","isMobileAppSidebarMenuOpen","isMobileSettingsSidebarOpen","isMobileProfileHeaderMenuOpen","sidebarOpen","sideMenuOpen","refreshCachedKeepAliveList","loginOtpFlowActive","dashboardFeedCache","dashboardPendingScrollRestore","eventAppFeedCache","eventAppFeedPendingScrollRestore"];let m=null;const p=e=>{const t=e=>"LocalCenter"===e?0:"Group"===e?2:1;return e.sort((e,i)=>t(e["@type"])-t(i["@type"]))},h=(0,s.y$)({state:{ENV:"production",error:"",spaces:{},tenant:null,loginOtpFlowActive:!1,tenantIntervalCheck:null,demoTenant:{name:null,logo:null,logoSquare:null,logoSquareDark:null},productTab:null,notificationChecker:null,openedItemsGroups:!0,openedItemsAdministrative:!0,openedItemsFinance:!0,openedItemsResources:!0,openedItemsCommunity:!0,isIframe:!1,unauthorizedPage:null,currentUser:{},returnLink:null,namespaced:!0,productsListShowTotals:!1,productsListShowEvents:!1,impersonatedAs:null,impersonator:null,permissionImpersonation:{isActive:!1,impersonatedPermissions:[],originalPermissions:[],expiresAt:null,impersonatedUserType:null},currentMercureEvent:null,notificationMercureEvent:null,seenNotificationIds:[],maxSeenNotificationIds:100,prevRoute:null,signedIn:!1,newDiscussionPosted:!1,emailTemplateCategory:"user",newDiscussion:{title:null,content:null},issueTagColoring:["aliceblue","azure","antiquewhite","beige","honeydew","gold","khaki","lavenderblush","lemonchiffon","lightcoral","lightpink","lightsalmon","linen","moccasin","orange","palevioletred","papayawhip","sandybrown","whitesmoke","yellowgreen","wheat"],issuePrioritiesData:[{id:1,text:"priorityHighest",icon:"fa-chevrons-up",color:"red"},{id:2,text:"priorityHigh",icon:"fa-chevron-up",color:"red"},{id:3,text:"priorityMedium",icon:"fa-equals",color:"orange"},{id:4,text:"priorityLow",icon:"fa-chevron-down",color:"blue"},{id:5,text:"priorityLowest",icon:"fa-chevrons-down",color:"blue"}],isLoadingButton:!1,isLoadingGeneral:!1,isMobileProfileHeaderMenuOpen:!1,sidebarOpen:!1,hideAppSidebar:!1,sidebarCollapsed:!1,sideMenuOpen:!1,isFormModalVisible:!1,filterByTown:{},filterByCountry:{},filterByCounty:{},locale:"en",isMobile:!1,isPortrait:"undefined"!==typeof window&&window.innerHeight>window.innerWidth,theme:"default",refreshCachedKeepAliveList:!1,dashboardFeedCache:null,dashboardPendingScrollRestore:!1,eventAppFeedCache:null,eventAppFeedPendingScrollRestore:!1,metricsCache:{},statsLocalCenters:null,nlqConversation:null,nlqConversations:null,currentGroup:null,currentGroupIssueStatuses:[],currentGroupIssueTypes:[],currentGroupTab:"discussions",isMobileAppSidebarMenuOpen:!1,isMobileSettingsSidebarOpen:!1,hideMobileNavbarTabs:!1,listValues:{user:{advancedOptions:null,isFilter:!1,isGallery:null,isMapView:null,isGalleryOnly:!1,sortField:null,sortOrder:"asc",defaultSortOrder:"asc",invisibleColumns:["age"],unitId:null,unitType:null,isColumnGroup:!1},discussion:{itemsPageCurrent:1,orderBy:"new",sortField:"id",sortOrder:"desc",isMyDiscussionsChecked:!1,viewMode:"comfortable",filters:{search:null,owner:null,category:null,status:null,isArchived:!1,topic:[]},unitId:null,cache:null,pendingScrollRestore:!1},adhesion:{itemsPageCurrent:1,sortField:"id",sortOrder:"desc",filters:{name:null,status:null}},resignation:{itemsPageCurrent:1,sortField:"id",sortOrder:"desc",filters:{name:null,status:null}},localCenterTransfer:{itemsPageCurrent:1,sortField:"id",sortOrder:"desc",filters:{name:null,status:null}}
1,event:{itemsPageCurrent:1,sortField:"dateTimeBegin",sortOrder:"desc",isMyEventsChecked:!1,isCalendarView:!1,period:"upcoming",filters:{search:null,sdg:null,type:null,time:"past",isAnnualReportNational:!1},unitId:null},contract:{itemsPageCurrent:1,sortField:"dateSignature",sortOrder:"desc"},issue:{sortField:"mainPost.dateCreated",sortOrder:"desc",quickSortBy:"desc",boardType:{},filters:{}},gazette:{filters:{search:null,searchType:"subject"}},drive:{myDrive:!1,search:null,isGallery:!1},localCenters:{isMapView:!0},eventAttend:{advancedOptions:[]},company:{selectedStatus:"ACTIVE",searchQuery:"",currentPage:1}},projectTaskFilters:{},projectLastTab:{},isListEventGridView:!1,driveCurrentFolder:{},newsletterStats:null,sidebarMode:"community",sidebarUserMenuOpen:!1,themeSidebarOpen:!1},mutations:{setIsPortrait(e,t){e.isPortrait=t},resetEventSource(e){e.currentMercureEvent instanceof EventSource&&e.currentMercureEvent.close(),e.currentMercureEvent=null},initEventSource(e,t){let i=(d.QU||"")+"/.well-known/mercure";"prod"===e.ENV&&(i=t.hubUrl);const s=new URL(i,window.origin);s.searchParams.append("topic",t.topic),t.token&&s.searchParams.append("authorization",t.token),e.currentMercureEvent=new EventSource(s),e.currentMercureEvent.onerror=e=>{console.error("Mercure EventSource error:",e)}},initNotificationEventSource(e,{userId:t,token:i,hubUrl:s,onNotification:a}
1){e.notificationMercureEvent instanceof EventSource&&e.notificationMercureEvent.close();let n=(d.QU||"")+"/.well-known/mercure";"prod"===e.ENV&&(n=s);const o=new URL(n,window.origin);o.searchParams.append("topic","notification_"+t),i&&o.searchParams.append("authorization",i),e.notificationMercureEvent=new EventSource(o),e.notificationMercureEvent.onmessage=t=>{try{const i=JSON.parse(t.data);if("new_notification"===i.action&&i.notification){const t=i.notification.id;if(e.seenNotificationIds.includes(t))return;e.seenNotificationIds.push(t),e.seenNotificationIds.length>e.maxSeenNotificationIds&&e.seenNotificationIds.shift(),a&&a(i.notification)}}catch(i){console.error("Failed to parse notification Mercure message",i)}},e.notificationMercureEvent.onerror=e=>{console.error("Notification Mercure error:",e)}},resetNotificationEventSource(e){e.notificationMercureEvent instanceof EventSource&&e.notificationMercureEvent.close(),e.notificationMercureEvent=null,e.seenNotificationIds=[]},incrementUnseenNotifications(e,t){if(e.spaces[t]){const i=e.spaces[t].unseenNotificationsCount||0;e.spaces[t].unseenNotificationsCount=i+1}},setSidebarOpen(e,t){e.sidebarOpen=t},setSidebarMode(e,t){e.sidebarMode=t},toggleSidebarUserMenu(e){e.sidebarUserMenuOpen=!e.sidebarUserMenuOpen},closeSidebarUserMenu(e){e.sidebarUserMenuOpen=!1},openThemeSidebar(e){e.themeSidebarOpen=!0},closeThemeSidebar(e){e.themeSidebarOpen=!1},setProductTab(e,t){e.productTab=t},setOpenedItemsGroups(e,t){e.openedItemsGroups=t},setOpenedItemsAdministrative(e,t){e.openedItemsAdministrative=t},setOpenedItemsFinance(e,t){e.openedItemsFinance=t},setOpenedItemsResources(e,t){e.openedItemsResources=t},setOpenedItemsCommunity(e,t){e.openedItemsCommunity=t},setProductsListShowTotals(e,t){e.productsListShowTotals=t},setProductsListShowEvents(e,t){e.productsListShowEvents=t},setHideMobileNavbarTabs(e,t){e.hideMobileNavbarTabs=t},setCurrentUser(e,t){t&&(e.signedIn=!0,t.userRoles&&!Array.isArray(t.userRoles)?t.userRoles=Object.values(t.userRoles):t.userRoles||(t.userRoles=[])),t["@id"]="/api/v1/users/"+t.id,t.privacy||(t.privacy={}),t.notificationSettings||(t.notificationSettings={}),e.spaces[e.tenant.slug]?.user&&(e.spaces[e.tenant.slug].user.logo=t.logo),e.currentUser=t},setCurrentGroup(e,t){e.currentGroup=t,e.currentGroupIssueTypes=[],e.currentGroupIssueStatuses=[],e.listValues.event.period="upcoming"},setLocalCentersIsMapView(e,t){e.listValues.localCenters.isMapView=t},unsetCurrentUser(e){e.currentUser={},e.signedIn=!1,e.units={},e.tenant&&e.spaces[e.tenant.slug]&&(e.spaces[e.tenant.slug].user=null)},refresh(e,t){e.signedIn=!0,e.csrf=t},setTenantLogoSquare(e,t){e.tenant.logoSquare=t},setTenantLogoSquareDark(e,t){e.tenant.logoSquareDark=t},setTenantLogoDark(e,t){e.tenant.logoDark=t},setTenantLogo(e,t){e.tenant.logo=t},updateFavicon(e){if(!e.tenant)return;let t=!1;"default"===e.theme?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:"dark"===e.theme&&(t=!0);let i=null;if(t&&e.tenant.logoSquareDark?i=e.tenant.logoSquareDark:e.tenant.logoSquare&&(i=e.tenant.logoSquare),i){let e=document.querySelector("link[rel~='icon']");e||(e=document.createElement("link"),e.rel="icon",document.head.appendChild(e)),e.href=d.hd+d.DJ+"tenant/"+i}},setTenant(e,t){let i=Object.assign({},e.tenant);e.tenant=t,i.namespaces&&(e.tenant.namespaces=i.namespaces),i.roleGroups&&(e.tenant.roleGroups=i.roleGroups),e.tenant?.customFields?.sort((e,t)=>e.position-t.position),e.tenant?.roles?.sort((e,t)=>e.position-t.position),this.commit("updateFavicon")},setTenantGroups(e,t){e.spaces[t.slug]&&(e.spaces[t.slug].myGroups=p(t.groups))},setTenantProjects(e,t){e.spaces[t.slug]&&(e.spaces[t.slug].myProjects=t.projects)},updateTenantProject(e,t){const i=e.spaces[t.slug]?.myProjects;if(!i)return;const s=i.findIndex(e=>e.id===t.projectId);-1!==s&&Object.assign(i[s],t.fields)},setCustomFields(e,t){e.tenant.customFields=[...t]},unseenNotificationsCount(e,t){e.spaces[t.tenantSlug].unseenNotificationsCount=t.value},groupNotificationCounts(e,{tenantSlug:t,counts:i}){e.spaces[t]&&(e.spaces[t].groupNotificationCounts=i)},clearGroupNotificationCount(e,{tenantSlug:t,groupId:i}){e.spaces[t]?.groupNotificationCounts&&delete e.spaces[t].groupNotificationCounts[i]},setLocale(e,t){e.locale=t},setSettingMenu(e,t){e.tenant.settingMenu=t},addRole(e,t){e.tenant&&e.tenant.roles&&(e.tenant.roles.push(t),e.tenant.roles.sort((e,t)=>
1e.position-t.position))},updateRole(e,t){if(e.tenant&&e.tenant.roles){const i=e.tenant.roles.findIndex(e=>e.id===t.id);-1!==i&&(e.tenant.roles[i]=t,e.tenant.roles.sort((e,t)=>e.position-t.position))}},removeRole(e,t){e.tenant&&e.tenant.roles&&(e.tenant.roles=e.tenant.roles.filter(e=>e.id!==t))},setError(e,t){if(void 0!==t&&null!==t){let i=null;if(t.response&&t.response.data&&t.response.data.detail?i=t.response.data.detail:t.response&&t.response.data&&t.response.data.message?(i=t.response.data.message,"Request Too Long"===i&&(i=n.Ay.global.t("Maximum filesize is 5MB"))):t.response&&t.response.data&&t.response.data["hydra:description"]?i=n.Ay.global.t(t.response.data["hydra:description"]):void 0!==t.response?i=n.Ay.global.t("Internal Server Error"):t&&(i=n.Ay.global.t(t)),i&&(i.startsWith("AWAITING_REFERRAL")||i.startsWith("INACTIVE")))return;e.error=i}else e.error=null},setUnit(e,t){e.units[t.id]=t},setENV(e,t){e.ENV=t},setDynamicCurrentGroup(e,t){t.unit?e.currentGroup&&e.currentGroup.id===t.unit.id||(e.currentGroup=t.unit):["support","generalUnit"].includes(e.currentGroup)||(e.currentGroup=t.isSupport?"support":"generalUnit")},setGroupAfterUpdate(e,t){let i=e.spaces[e.tenant.slug].myGroups.findIndex(e=>e.id===t.id);e.spaces[e.tenant.slug].myGroups[i]=t,e.currentGroup&&e.currentGroup.id===t.id&&(e.currentGroup=t),e.spaces[e.tenant.slug].myGroups=p(e.spaces[e.tenant.slug].myGroups)},setGroupAfterDelete(e,t){let i=e.spaces[e.tenant.slug].myGroups.findIndex(e=>e.id===t.id);e.spaces[e.tenant.slug].myGroups.splice(i,1),e.currentGroup&&e.currentGroup.id===t.id&&(e.currentGroup=null),e.spaces[e.tenant.slug].myGroups=p(e.spaces[e.tenant.slug].myGroups)},addGroupToMyGroups(e,{slug:t,group:i}){if(!e.spaces[t]||!e.spaces[t].myGroups)return;const s=e.spaces[t].myGroups.find(e=>e.id===i.id);s||(e.spaces[t].myGroups.push(i),e.spaces[t].myGroups=p(e.spaces[t].myGroups))},resetListValuesUser(e){e.listValues.user.unitId=null,e.listValues.user.unitType=null,e.listValues.user.sortField=null,e.listValues.user.sortOrder="asc"},resetListValuesDrive(e){e.listValues.drive.myDrive=!1,e.listValues.drive.search=null},resetListValuesContract(e){e.listValues.contract.itemsPageCurrent=1,e.listValues.contract.sortField="dateSignature",e.listValues.contract.sortOrder="desc"},resetListValuesAdhesion(e){e.listValues.adhesion.sortField="id",e.listValues.adhesion.sortOrder="desc"},resetListValuesResignation(e){e.listValues.resignation.sortField="id",e.listValues.resignation.sortOrder="desc"},resetListValuesLocalCenterTransfer(e){e.listValues.localCenterTransfer.sortField="id",e.listValues.localCenterTransfer.sortOrder="desc"},resetListValuesDiscussion(e){e.listValues.discussion.itemsPageCurrent=1,e.listValues.discussion.orderBy="new",e.listValues.discussion.sortField="mainPost.dateCreated",e.listValues.discussion.sortOrder="desc",e.listValues.discussion.isMyDiscussionsChecked=!1,e.listValues.discussion.viewMode="comfortable",e.listValues.discussion.filters.search=null,e.listValues.discussion.filters.owner=null,e.listValues.discussion.filters.category=null,e.listValues.discussion.filters.isArchived=!1,e.listValues.discussion.filters.topic=[]},resetListValuesIssue(e){e.listValues.issue.sortField="mainPost.dateCreated",e.listValues.issue.sortOrder="desc"},resetListValuesEvent(e){e.listValues.event={itemsPageCurrent:1,sortField:"dateTimeBegin",sortOrder:"desc",isMyEventsChecked:!1,isCalendarView:!1,period:"upcoming",filters:{search:null,type:null,time:"future",isAnnualReportNational:!1},unitId:null}},setProjectTaskFilters(e,{projectId:t,filters:i}){e.projectTaskFilters[t]=i},setProjectLastTab(e,{projectId:t,tab:i}){e.projectLastTab[t]=i},switchTheme(e,t){let i=new URLSearchParams(window.location.search);(i.has("iframe")||i.has("light")||window.location.pathname.includes("donate")||window.location.pathname.includes("pay/"))&&(t="light");const s=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,a="default"===e.theme?s:"dark"===e.theme;t&&(e.theme=t);const n="default"===e.theme?s:"dark"===e.theme;if(n?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"),a!==n){const e=(0,r.O5)();(0,r.q$)(e)?(0,r.I4)(e):(0,r.I4)(n?"midnight":"default")}this.commit("updateFavicon"),e.newDiscussion={title:null,content:null}},setPrevRoute(e,t){e.prevRoute=t},updateSpace(e,{slug:t,tenant:i}){e.spaces[t]||(e.spaces[t]={}),e.spaces[t].tenant=i,e.spaces[t].tenant["@type"]="Tenant"},resetSpaces(e){e.spaces={}},setLoginOtpFlowActive(e,t){e.loginOtpFlowActive=!!t},setIsSubscribed(e,t){e.currentGroup&&(e.currentGroup.isSubscribed=t)},setUserFollowId(e,t){e.currentGroup&&(e.currentGroup.userFollowId=t)},setIsMuted(e,t){e.currentGroup&&(e.currentGroup.isMuted=t)},setUserMuteId(e,t){e.currentGroup&&(e.currentGroup.userMuteId=t)},toggleSidebarCollapse(e,t){e.sidebarCollapsed=t||!e.sidebarCollapsed},setReturnLink(e,t){e.returnLink=t},clearReturnLink(e){e.returnLink=null},setEmailTemplateCategory(e,t){e.emailTemplateCategory=t},setDashboardData(e,{tenant:t,data:i}){e.spaces[t]||(e.spaces[t]={}),e.spaces[t].dashboard=i},updateDashboardCategory(e,{tenant:t,category:i}){if(!e.spaces[t]||!e.spaces[t].dashboard)return;const s=e.spaces[t].dashboard.categories||[],a=s.findIndex(e=>e.uuid===i.uuid);-1!==a&&(s[a]=i)},clearDashboardData(e,t){e.spaces[t]&&e.spaces[t].dashboard&&delete e.spaces[t].dashboard},setPermissionImpersonation(e,t){e.permissionImpersonation={isActive:!0,impersonatedPermissions:t.impersonatedPermissions||[],originalPermissions:t.originalPermissions||[],expiresAt:t.expiresAt||null,impersonatedUserType:t.impersonatedUserType||null}},clearPermissionImpersonation(e){e.permissionImpersonation={isActive:!1,impersonatedPermissions:[],originalPermissions:[],expiresAt:null,impersonatedUserType:null}},setStatsLocalCenters(e,t){e.statsLocalCenters=t},setNlqConversation(e,t){e.nlqConversation=t},setNlqConversations(e,t){e.nlqConversations=t},invalidateNlqConversations(e){e.nlqConversations=null},setMetricsCache(e,{key:t,data:i}){e.metricsCache[t]={data:i,timestamp:Date.now(),version:c}},clearMetricsCache(e,t){if(t){const i=t+"_";Object.keys(e.metricsCache).forEach(t=>{t.startsWith(i)&&delete e.metricsCache[t]}
1)}else e.metricsCache={}},setNewsletterStats(e,t){e.newsletterStats=t}},getters:{isPortrait:e=>e.isPortrait,isCustomDomain(){return!["demo.orgo.space","localhost","app.orgo.space","stage.orgo.space","test.orgo.space"].includes(location.hostname)&&!location.host.includes("ngrok")},hasGroupToPost:(e,t)=>void 0!==e.spaces[e.tenant.slug]&&void 0!==e.spaces[e.tenant.slug].myGroups&&(!(!t.isGranted(e.tenant.settingFeatures.events.whoCanPostPublic)&&!t.isGranted("COMMUNICATION_TENANT"))||!e.permissionImpersonation.isActive&&e.spaces[e.tenant.slug].myGroups?.length>0),hasDiscussionToPost:(e,t)=>!(!t.isGranted(e.tenant.settingFeatures?.discussions?.whoCanPostPublic||"COMMUNICATION_TENANT")&&!t.isGranted("COMMUNICATION_TENANT"))||void 0!==e.spaces[e.tenant.slug]&&void 0!==e.spaces[e.tenant.slug].myGroups&&(!e.permissionImpersonation.isActive&&e.spaces[e.tenant.slug].myGroups?.length>0),currentUserBelongToGroup:e=>t=>{if(!e.tenant?.slug||!e.spaces[e.tenant?.slug])return!1;if(!e.spaces[e.tenant?.slug].myGroups?.length||!t)return!1;let i=e.spaces[e.tenant.slug].myGroups.find(e=>e.id===t);return void 0!==i},adhesionStatusLabel:e=>e=>{const t=[{value:"new",textKey:"Initiated"},{value:"pending",textKey:"pending"},{value:"validated",textKey:"Adhesion form validated"}
1,{value:"background_checked",textKey:"Background checked"},{value:"interviewed",textKey:"Interviewed"},{value:"canceled",textKey:"Adhesion canceled"},{value:"rejected",textKey:"Adhesion rejected"},{value:"success",textKey:"Adhesion success"},{value:"duplicated",textKey:"Duplicated"}];let i=t.find(t=>t.value===e);return i?i.textKey:null},hasHistory(){return window.history.length>2},sdgGoals(){let e=[];for(let t=1;t<=17;t++)e.push({id:t,name:t+". "+n.Ay.global.t("GOAL"+t)});return e},isCustomFieldVisible:(e,t)=>t=>!!t?.id&&!!e.tenant.settingForms.profileForm.profileCustomFields.includes(t.id),userTypeEligibleForFee:e=>t=>(0,o.mZ)(t,e.tenant.settingFeatures.fees.notEligibleUserTypeId),appURL:e=>e.tenant?"https://"+e.tenant.appHost:"https://app.orgo.space",billing:e=>(e.tenant&&e.tenant.billingProfile&&e.tenant.billingProfile.trialEnd&&(e.tenant.billingProfile.trialEnd=new Date(e.tenant.billingProfile.trialEnd)),e.tenant&&e.tenant.billingProfile?e.tenant.billingProfile:null),localUnitTypes:e=>{let t=e.tenant.unitTypes,i=[];for(let s of t)s.isLocal&&i.push(s);return i},isCurrentGroupMember:e=>{if(e.currentGroup&&e.currentUser&&e.currentUser.userRoles){if(e.currentGroup.includesAllMembers)return!0;for(let t of e.currentUser.userRoles)if(t.unit&&"Group"===t.unit["@type"]&&t.unit.id===e.currentGroup.id&&!t.dateEnded)return!0}return!1},isCurrentGroupAdmin:(e,t)=>{if(e.currentGroup&&e.currentUser&&e.currentUser.userRoles){if(t.isGranted("ADMIN_TENANT"))return!0;if(!e.permissionImpersonation.isActive)for(let t of e.currentUser.userRoles)if(t.unit&&["Group","RoleGroup"].includes(t.unit["@type"])&&e.currentGroup&&t.unit.id===e.currentGroup.id&&!t.dateEnded)return t.isAdmin;if("LocalCenter"===e.currentGroup["@type"]&&t.isGranted("ADMIN_LOCAL",e.currentGroup))return!0;if("RoleGroup"===e.currentGroup["@type"])return!0}},userGroups:e=>{let t=[];if(e.currentUser&&e.currentUser.userRoles.length>0)for(let i of e.currentUser.userRoles)i.unit&&"Group"===i.unit["@type"]&&!i.dateEnded&&t.push(i.unit);return t},tenantLanguages:e=>{let t=[];for(const[i,s]of Object.entries(e.tenant.settingFeatures.language))s&&!["isActive","default"].includes(i)&&t.push(i);return t},isBillingFreePlan:(e,t)=>null===t.billing||"prod_free"===t.billing.stripeProductIds?.[0],isGrantedAdhesion:e=>t=>!!e.tenant?.settingFeatures?.adhesion?.isActive&&((!t.adhesion||"success"!==t.adhesion.status)&&(!!t.adhesion||(!t.type||t.type.id!==parseInt(e.tenant.settingFeatures.adhesion.successDefaultUserTypeId)))),isGranted:e=>(t,i=null,s=null)=>{if(!s&&(s=e.currentUser,!s))return!1;if("USER"===t&&s.id)return!0;if("ROLE_USER"===t&&s.id)return!0;if(e.permissionImpersonation.isActive){if("ROLE_ADMIN_TENANT"===t)return!1;if("ROLE_SUPER_ADMIN"===t)return!1;const a={...s,permissions:e.permissionImpersonation.impersonatedPermissions,isRoleAdminTenant:!1,isRoleSuperAdmin:!1},n=new l(t);return n.voteOnAttribute(t,i,a)}if("ROLE_ADMIN_TENANT"===t)return s.isRoleAdminTenant;if("ROLE_SUPER_ADMIN"===t)return s.isRoleSuperAdmin;const a=new l(t);return a.voteOnAttribute(t,i,s)},isGrantedOwner:(e,t)=>i=>{if(i.owner&&i.owner.id===e.currentUser.id)return!0;if("User"===i["@type"]){if(i.id===e.currentUser.id||e.tenant?.settingFeatures?.users?.adminCanChangeProfileImage&&(t.isGranted("ADMIN_TENANT")||i.localCenter&&e.currentUser.localCenter&&i.localCenter.id&&i.localCenter.id===e.currentUser.localCenter.id&&t.isGranted("ADMIN_LOCAL")))return!0}else if("LocalCenter"===i["@type"]){if(e.currentUser.localCenter&&i.id===e.currentUser.localCenter.id&&t.isGranted("ADMIN_LOCAL")||t.isGranted("ADMIN_TENANT"))return!0}else if("Unit"===i["@type"]){if(i.localCenter&&e.currentUser.localCenter){if(i.localCenter.id===e.currentUser.localCenter.id&&t.isGranted("HR_LOCAL"))return!0}else if(i.isRoleGroup&&t.isGranted("ADMIN_TENANT"))return!0}else if("Event"===i["@type"]){const s=e.tenant?.settingFeatures?.events?.restrictEventsByUserType&&i.allowedUserType&&!t.isGranted("ADMIN_TENANT")&&!t.isGranted("EVENT_TENANT");if(s){const t=e.currentUser.type?.id??null,s=i.allowedUserType?.id??null;if(!t||t!==s)return!1}if(i.unit&&(t.isGranted("EVENT_LOCAL",i.unit)||t.isGranted("ADMIN_LOCAL",i.unit)))return!0;
1if(t.isGranted("ADMIN_TENANT")||t.isGranted("EVENT_TENANT"))return!0;if(i.unit&&e.currentUser.userRoles){const t="object"===typeof i.unit?i.unit.id:null;if(t)for(let i of e.currentUser.userRoles)if(i.unit&&"Group"===i.unit["@type"]&&i.unit.id===t&&!i.dateEnded&&i.isAdmin)return!0;if(i.unit.owner&&i.unit.owner.id===e.currentUser.id)return!0}}else if(["Badge","BadgeType","Tenant","RoleGroup"].includes(i["@type"])&&t.isGranted("ADMIN_TENANT"))return!0;return!1},canManageProfileAsParent:e=>t=>e.currentUser?.canManageChildren?.some(e=>e===t?.id)??!1,tenantSettingsFee(e){let t=e.tenant.settingFeatures.fees;return t.fees},isSidebarOpen(e){return e.sidebarOpen},isEnvDev(e){return"dev"===e.ENV},isEnvProd(e){return"prod"===e.ENV},isLoadingButton(e){return e.isLoadingButton},user(e){return e.currentUser},effectiveUserType(e){return e.permissionImpersonation.isActive&&e.permissionImpersonation.impersonatedUserType?e.permissionImpersonation.impersonatedUserType:e.currentUser?.type||null},tenant(e){return e.tenant},contactChaptersEnabled(e){return!(!e.tenant?.settingFeatures?.localCenter?.isActive||!e.tenant?.settingFeatures?.contacts?.perChapterContacts)},tenantLogo(e){let t=e.tenant.logo;return"dark"===e.theme&&e.tenant.logoDark&&(t=e.tenant.logoDark),t?d.hd+d.DJ+"tenant/"+t:"/img/orgo-logo.svg"},error(e){return e.error},sidebarOpen(e){return e.sidebarOpen},isPrivacyUnset(e){if(!e.currentUser)return!0;if(null===e.currentUser.privacy||void 0===e.currentUser.privacy)return!0;if(!0===e.currentUser.privacy.profile)return!1;if(e.currentUser.privacy){if(void 0===e.currentUser.privacy.name||null===e.currentUser.privacy.name)return!0;if(void 0===e.currentUser.privacy.email||null===e.currentUser.privacy.email)return!0;if(void 0===e.currentUser.privacy.phone||null===e.currentUser.privacy.phone)return!0;if(void 0===e.currentUser.privacy.age||null===e.currentUser.privacy.age)return!0;if(void 0===e.currentUser.privacy.image||null===e.currentUser.privacy.image)return!0;if(void 0===e.currentUser.privacy.town||null===e.currentUser.privacy.town)return!0;if(void 0===e.currentUser.privacy.profession||null===e.currentUser.privacy.profession)return!0;if(void 0===e.currentUser.privacy.social||null===e.currentUser.privacy.social)return!0}return!e.currentUser.notificationSettings||void 0===e.currentUser.notificationSettings.pPrivacyRead||null===e.currentUser.notificationSettings.pPrivacyRead||!1===e.currentUser.notificationSettings.pPrivacyRead},checkMandatoryProfileFields:(e,t)=>()=>{let i={birthday:"dateBirth",town_from:"townFrom",town_current:"townCurrent",first_name:"firstName",middle_name:"middleName",last_name:"lastName",gender:"gender",phoneNumber:"phoneNumber",address:"address",tiktok:"profileTiktok",linkedin:"profileLinkedin",facebook:"profileFacebook",instagram:"profileInstagram",telegram:"profileTelegram",twitter:"profileTwitter"},s=[],a=[];if(e.currentUser&&e.currentUser.id){if(e.tenant?.settingForms?.profileForm?.profileFieldsMandatory)for(let a of e.tenant.settingForms.profileForm.profileFieldsMandatory)i[a]&&(void 0===e.currentUser[i[a]]||null===e.currentUser[i[a]]||""===e.currentUser[i[a]])&&t.checkProfileFieldExists(a)&&s.push(a);if(e.tenant?.settingForms?.profileForm?.profileCustomFieldsMandatory)for(let i of e.tenant.settingForms.profileForm.profileCustomFieldsMandatory){const s=e.tenant.customFields&&e.tenant.customFields.find(e=>e.id===i);s&&(("admin"!==s.visibility||t.isGranted("HR_ASSISTANT_LOCAL"))&&!t.checkUserHasCustomFieldValue(i)&&t.checkProfileCustomFieldExists(i)&&a.push(i))}}return{fields:s,customFields:a}},checkProfileFieldExists:e=>t=>e.tenant?.settingForms?.profileForm?.profileFields?.includes(t)??!1,checkProfileCustomFieldExists:e=>t=>e.tenant?.settingForms?.profileForm?.profileCustomFieldsMandatory?.includes(t)??!1,checkUserHasCustomFieldValue:e=>t=>{for(let i of e.currentUser.customFieldValues)if((i.value||i.media)&&(i.field==="/api/v1/custom_fields/"+parseInt(t)||"object"===typeof i.field&&i.field.id===t))return!0;return!1},returnLink:e=>e.returnLink,emailTemplateCategory:e=>e.emailTemplateCategory,isNativeAppIos(){return navigator.userAgent.includes("iOS")&&navigator.userAgent.includes("orgo-app")},isNativeApp(){return navigator.userAgent.includes("orgo-app")},getMetricsCache:e=>t=>{const i=828e5,s=e.metricsCache[t];return s&&s.version===c?Date.now()-s.timestamp>i?null:s.data:null}},actions:{syncOrientation({commit:e,state:t}){m||(m=requestAnimationFrame(()=>{m=null;const i=window.innerHeight>window.innerWidth;i!==t.isPortrait&&e("setIsPortrait",i)}))}
1,saveSuccess(e){return this.$buefy.toast.open({message:n.Ay.global.t("updatedSuccessfully")})}},plugins:window.self!==window.top&&window.location.pathname.startsWith("/newsletter-builder-embed")?[]:[(0,a.A)({reducer:e=>{const t={...e};for(const i of u)delete t[i];return t}})]})},43797:function(e,t,i){"use strict";i.d(t,{A:function(){return Le}});var s=i(20641),a=i(90033),n=i(53751);const o={key:0,class:"navbar-item sidebar-toggle-btn"},l={class:"icon is-small"},r={key:2,class:"navbar-item mobile-header-icon pl-0"},d={class:"icon"},c={key:3,class:"navbar-item mobile-header-icon"},u={class:"icon"},m={key:4,class:"navbar-item mobile-header-icon mr-auto pl-0"},p={class:"icon"},h={class:"o-mobilemenu ml-auto is-hidden-desktop"},g={key:6,class:"navbar-item ml-auto pr-0 navbar-actions"},f={class:"icon is-small"},b={key:7,class:"navbar-item ml-auto pr-0 navbar-actions"},y={class:"icon is-small"},v={class:"navbar-menu"},k={class:"navbar-start"},C={class:"navbar-item"},L={key:0,id:"billingMessage",class:"navbar-item is-size-6"},w={key:0,class:"has-text-danger"},_={key:1,class:"has-text-info"},E={key:0},$={key:1},F={key:2},T={key:2,class:"has-text-danger"},S={key:0},A={key:1},P={key:3,class:"has-text-danger"},I={class:"navbar-end"},M={key:0,class:"navbar-item"},x=["href"],N={key:0,class:"mobile-user-sheet-content"},U={class:"mobile-user-sheet-header"},D={class:"mobile-user-sheet-user-info"},X={class:"has-text-weight-bold"},V={class:"is-size-7 has-text-grey"},R={class:"user-menu-item"},O={class:"icon-text"},Q={class:"icon is-small"},B={class:"ml-auto user-menu-item-right"},G={class:"user-menu-item-value"},W={class:"icon is-small"},j={class:"user-menu-item"},z={class:"icon-text"},q={class:"icon is-small"},J={class:"icon is-small ml-auto"},H=["href"],K=["href"];function Y(e,t,i,Y,Z,ee){const te=(0,s.g2)("b-loading"),ie=(0,s.g2)("font-awesome-icon"),se=(0,s.g2)("OrgoLogo"),ae=(0,s.g2)("AppHeaderNotification"),ne=(0,s.g2)("AvatarWithProgress"),oe=(0,s.g2)("LogoThumbnail"),le=(0,s.g2)("router-link"),re=(0,s.g2)("SearchBar"),de=(0,s.g2)("b-dropdown-item"),ce=(0,s.g2)("b-dropdown"),ue=(0,s.g2)("UserMenuItems"),me=(0,s.g2)("PermissionImpersonationSelector");return(0,s.uX)(),(0,s.CE)("nav",{class:(0,a.C4)(["navbar",{"navbar-native-app":e.isNativeApp,"is-search-active":Z.isSearchActive}]),role:"navigation","aria-label":"main navigation"},[(0,s.bF)(te,{modelValue:Z.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>Z.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),(0,s.Lk)("div",{class:(0,a.C4)(["navbar-brand",{"sidebar-on":ee.hasSidebar&&!ee.isSidebarHidden,"sidebar-off":!ee.hasSidebar||ee.isSidebarHidden}])},[e.$isMobile()||e.isPortrait||ee.tenantSettings||!(e.$route.meta.hasAppSidebarMenu||e.$route.meta.hasEventSidebar||e.$route.meta.hasProductMenu)?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:"button is-white is-small is-rounded sidebar-toggle-button",onClick:t[1]||(t[1]=t=>e.$store.commit("toggleSidebarCollapse"))},[(0,s.Lk)("span",l,[(0,s.bF)(ie,{class:"sidebar-icon-default",icon:"fa-light fa-sidebar"}),e.$store.state.sidebarCollapsed?((0,s.uX)(),(0,s.Wv)(ie,{key:0,class:"sidebar-icon-hover",icon:"fa-light fa-arrow-right-to-line"})):((0,s.uX)(),(0,s.Wv)(ie,{key:1,class:"sidebar-icon-hover",icon:"fa-light fa-arrow-left-to-line"}))])])])),e.$isMobile()||e.isPortrait?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:1,class:"navbar-item p-2",onClick:t[2]||(t[2]=t=>e.$store.commit("setSidebarMode","community"))},[(0,s.bF)(se,{"is-app-header":!0,"target-route-name":ee.tenantLogoRouteName},null,8,["target-route-name"])])),e.$isMobile()||e.isPortrait?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("button",{class:"button is-white is-rounded",onClick:t[3]||(t[3]=(...e)=>ee.openMobileGroupSidebar&&ee.openMobileGroupSidebar(...e))},[(0,s.Lk)("span",d,[(0,s.bF)(ie,{icon:"fa-light fa-bars"})])])])):(0,s.Q3)("",!0),e.$isMobile()&&(ee.tenantSettings||e.localSettings)?((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("button",{class:"button is-white is-rounded header-cog-btn",onClick:t[4]||(t[4]=(...e)=>ee.openMobileSettingsSidebar&&ee.openMobileSettingsSidebar(...e))},[(0,s.Lk)("span",u,[(0,s.bF)(ie,{icon:"fa-light fa-cog"})])])])):(0,s.Q3)("",!0),e.$isMobile()||e.isPortrait?((0,s.uX)(),(0,s.CE)("div",m,[(0,s.Lk)("a",{class:"button is-white is-rounded",onClick:t[5]||(t[5]=(0,n.D$)(e=>ee.showMobileMenu(0),["prevent"]))},[(0,s.Lk)("span",p,[(0,s.bF)(ie,{icon:"fa-light fa-search"})])])])):(0,s.Q3)("",!0),!e.$isMobile()&&!e.isPortrait||ee.tenantSettings||e.localSettings?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:5,class:"o-logo-mobile navbar-item",onClick:t[6]||(t[6]=t=>e.$store.commit("setSidebarMode","community"))},[(0,s.bF)(se,{"is-app-header":!0,"target-route-name":ee.tenantLogoRouteName}
1,null,8,["target-route-name"])])),(0,s.Lk)("div",h,[(0,s.bF)(ae,{onToggleNotifications:t[7]||(t[7]=t=>e.$emit("toggle-notifications"))}),(0,s.Lk)("a",{class:"navbar-item mobile-header-icon mobile-header-avatar",onClick:t[8]||(t[8]=(0,n.D$)(e=>ee.showMobileMenu(2),["prevent"]))},[ee.showProfileCompletion?((0,s.uX)(),(0,s.Wv)(ne,{key:"profile_picture_header_progress",item:e.user,progress:e.user.profileCompletionPercentage||0,"is-type":"roundSmaller"},null,8,["item","progress"])):((0,s.uX)(),(0,s.Wv)(oe,{key:"profile_picture_header",item:e.user,"is-type":"roundSmaller"},null,8,["item"]))])]),e.$isMobile()||e.isPortrait||!e.$route.meta.hasAppSidebarMenu&&!e.$route.meta.hasProductMenu?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",g,[e.isGranted("ROLE_ADMIN_TENANT")&&!e.$isMobile()?((0,s.uX)(),(0,s.Wv)(le,{key:0,class:(0,a.C4)(["button is-white is-small is-rounded header-cog-btn",{link_active:"TenantUpdate"===e.$route.name}]),to:{name:"TenantUpdate"}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",f,[(0,s.bF)(ie,{icon:"fa-light fa-cog"})])]),_:1},8,["class"])):(0,s.Q3)("",!0)])),e.$isMobile()||e.isPortrait||!ee.tenantSettings?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",b,[(0,s.bF)(le,{class:"button is-white is-small is-rounded",to:{name:"Dashboard"}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",y,[(0,s.bF)(ie,{icon:"fa-light fa-house"})])]),_:1})]))],2),(0,s.Lk)("div",v,[(0,s.Lk)("div",k,[(0,s.Lk)("div",C,[(0,s.bF)(re,{class:"ml-5",onActiveChange:t[9]||(t[9]=e=>Z.isSearchActive=e)})]),e.isGranted("ADMIN_TENANT")&&e.billing&&"manual"!==e.billing.subscriptionType&&!1===e.isBillingFreePlan?((0,s.uX)(),(0,s.CE)("div",L,[e.billing.stripeSubscriptionId?e.billing.trialEnd&&!e.billing.isSubscriptionInactive?((0,s.uX)(),(0,s.CE)("div",_,[e.billing.trialEnd<new Date?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.eW)((0,a.v_)(e.$t("freeTrialExpired"))+" ",1),"Billing"!==e.$route.name?((0,s.uX)(),(0,s.Wv)(le,{key:0,to:{name:"Billing"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("updatePaymentDetails")),1)]),_:1})):(0,s.Q3)("",!0)])):e.billing.trialEnd.setDate(e.billing.trialEnd.getDate()-1)<new Date?((0,s.uX)(),(0,s.CE)("div",$,[(0,s.eW)((0,a.v_)(e.$t("freeTrialEndsToday"))+" ",1),"Billing"!==e.$route.name?((0,s.uX)(),(0,s.Wv)(le,{key:0,to:{name:"Billing"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("updatePaymentDetails")),1)]),_:1})):(0,s.Q3)("",!0)])):e.billing.trialEnd.setDate(e.billing.trialEnd.getDate()-1)>=new Date?((0,s.uX)(),(0,s.CE)("div",F,[(0,s.eW)((0,a.v_)(e.$t("freeTrialEndsIn"))+" "+(0,a.v_)(ee.trialDaysLeft)+" "+(0,a.v_)(e.$t("days"))+". ",1),"Billing"!==e.$route.name?((0,s.uX)(),(0,s.Wv)(le,{key:0,to:{name:"Billing"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("updatePaymentDetails")),1)]),_:1})):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):e.billing.isSubscriptionInactive?((0,s.uX)(),(0,s.CE)("div",T,[e.billing.currentPeriodEnd>new Date?((0,s.uX)(),(0,s.CE)("span",S,(0,a.v_)(e.$t("subscriptionCanceledEndingOn"))+" "+(0,a.v_)(e.$filters.formatDateCool(e.billing.currentPeriodEnd))+". ",1)):((0,s.uX)(),(0,s.CE)("span",A,(0,a.v_)(e.$t("yourSubscriptionCanceled"))+".",1)),"Billing"!==e.$route.name?((0,s.uX)(),(0,s.Wv)(le,{key:2,to:{name:"Billing"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("updateSubscription")),1)]),_:1})):(0,s.Q3)("",!0)])):e.billing.isFailedPayment?((0,s.uX)(),(0,s.CE)("div",P,[(0,s.eW)((0,a.v_)(e.$t("chargingFailed"))+". ",1),"Billing"!==e.$route.name?((0,s.uX)(),(0,s.Wv)(le,{key:0,to:{name:"Billing"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("updatePaymentDetails")),1)]),_:1})):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",w,["Billing"!==e.$route.name?((0,s.uX)(),(0,s.Wv)(le,{key:0,to:{name:"Billing"}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("updatePaymentDetails")),1)]),_:1})):(0,s.Q3)("",!0)]))])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",I,[ee.showDonateButton?((0,s.uX)(),(0,s.CE)("div",M,[(0,s.Lk)("a",{class:"button is-small is-rounded header-donate-btn",href:ee.donateButtonHref,target:"_blank",rel:"noopener",onClick:t[10]||(t[10]=(...e)=>ee.playDonateHeartbeat&&ee.playDonateHeartbeat(...e))},[(0,s.Lk)("span",{class:(0,a.C4)(["icon is-small donate-heart",{"is-beating":Z.isDonateHeartAnimating}])},[(0,s.bF)(ie,{icon:"fa-light fa-heart"})],2),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Donate")),1)],8,x)])):(0,s.Q3)("",!0),(0,s.bF)(ae,{onToggleNotifications:t[11]||(t[11]=t=>e.$emit("toggle-notifications"))})])]),((0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[(0,s.bo)((0,s.Lk)("div",{class:(0,a.C4)(["o-mobilelinks is-hidden-desktop",{"is-search-open":Z.mobileMenuOpen[0]}]),onClick:t[16]||(t[16]=t=>e.$store.state.isMobileProfileHeaderMenuOpen=!1)},[(0,s.bo)((0,s.Lk)("div",{class:"mmenu",onClick:t[12]||(t[12]=(0,n.D$)(()=>{},["stop"]))},[(0,s.bF)(re,{ref:"mobileSearchBar"},null,512)],512),[[n.aG,Z.mobileMenuOpen[0]]]),(0,s.bo)((0,s.Lk)("div",{class:"mmenu mobile-user-sheet",onClick:t[15]||(t[15]=(0,n.D$)(()=>{},["stop"]))},[t[17]||(t[17]=(0,s.Lk)("div",{class:"mobile-user-sheet-handle"},null,-1)),e.user&&e.user.id?((0,s.uX)(),(0,s.CE)("div",N,[(0,s.Lk)("div",U,[(0,s.bF)(oe,{item:e.user,"is-type":"roundSmall"},null,8,["item"]),(0,s.Lk)("div",D,[(0,s.Lk)("span",X,(0,a.v_)(e.user.fullName),1),(0,s.Lk)("span",V,(0,a.v_)(e.user.email),1)]),(0,s.Lk)("a",{class:"mobile-user-sheet-close",onClick:t[13]||(t[13]=t=>e.$store.state.isMobileProfileHeaderMenuOpen=!1)},[(0,s.bF)(ie,{icon:"fa-light fa-xmark"})])]),(0,s.bF)(ue,{onNavigate:ee.closeMobileMenuAndNavigateEvent,onOpenTheme:ee.closeMobileMenuAndOpenThemeSidebar,onOpenFee:ee.closeMobileMenuAndOpenFeeTab,onOpenPermissionImpersonation:ee.showPermissionImpersonationModal,onSignOut:ee.signOut},{language:(0,s.k6)(()=>[ee.language.isActive&&ee.availableLanguages.length>1?((0,s.uX)(),(0,s.Wv)(ce,{key:0,modelValue:Z.locale,"onUpdate:modelValue":[t[14]||(t[14]=e=>Z.locale=e),ee.languageChange],class:"mobile-lang-dropdown","aria-role":"list",position:"is-top-right","append-to-body":"",onActiveChange:ee.onLangDropdownToggle},{trigger:(0,s.k6)(()=>[(0,s.Lk)("a",R,[(0,s.Lk)("span",O,[(0,s.Lk)("span",Q,[(0,s.bF)(ie,{icon:"fa-light fa-globe-europe"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Language")),1)]),(0,s.Lk)("span",B,[(0,s.Lk)("span",G,(0,a.v_)(Z.languages[Z.locale]),1),(0,s.Lk)("span",W,[(0,s.bF)(ie,{icon:"fa-light fa-chevron-right"})])])])]),default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ee.availableLanguages,e=>((0,s.uX)(),(0,s.Wv)(de,{key:"mobile_lang_"+e,value:e,class:(0,a.C4)({"is-active":Z.locale===e}),"aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Z.languages[e]),1)]),_:2},1032,["value","class"]))),128))]),_:1},8,["modelValue","onActiveChange","onUpdate:modelValue"])):(0,s.Q3)("",!0)]),download:(0,s.k6)(()=>[e.isNativeApp?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(ce,{key:0,class:"mobile-download-dropdown","aria-role":"list",position:"is-top-right","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("a",j,[(0,s.Lk)("span",z,[(0,s.Lk)("span",q,[(0,s.bF)(ie,{icon:"fa-light fa-mobile"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Download app")),1)]),(0,s.Lk)("span",J,[(0,s.bF)(ie,{icon:"fa-light fa-chevron-right"})])])]),default:(0,s.k6)(()=>[(0,s.bF)(de,{"aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:ee.iosAppLink,target:"_blank",class:"mobile-download-item"},[(0,s.bF)(ie,{icon:["fab","app-store-ios"],class:"mr-2"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Download iOS App")),1)],8,H)]),_:1}),(0,s.bF)(de,{"aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{href:ee.androidAppLink,target:"_blank",class:"mobile-download-item"},[(0,s.bF)(ie,{icon:["fab","android"],class:"mr-2"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Download Android App")),1)],8,K)]),_:1})]),_:1}))]),_:1},8,["onNavigate","onOpenTheme","onOpenFee","onOpenPermissionImpersonation","onSignOut"])])):(0,s.Q3)("",!0)],512),[[n.aG,Z.mobileMenuOpen[2]]])],2),[[n.aG,e.$store.state.isMobileProfileHeaderMenuOpen]])])),(0,s.bF)(me,{ref:"permissionImpersonationModal"},null,512)],2)}i(44114),i(18111),i(22489),i(20116),i(14603),i(47566),i(98721);var Z=i(70223),ee=i(28159),te=i(28782),ie=i(40834),se=i(37557),ae=i(31823),ne=i(12409);const oe={class:"navbar-item mobile-header-icon"},le=["data-badge"],re={key:1,class:"icon"};function de(e,t,i,a,n,o){const l=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",oe,[(0,s.Lk)("a",{class:"button is-white is-rounded",onClick:t[0]||(t[0]=(...e)=>o.toggleNotificationSidebar&&o.toggleNotificationSidebar(...e))},[e.$store.state.spaces[e.tenant?.slug]&&e.$store.state.spaces[e.tenant?.slug].unseenNotificationsCount>0?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"icon has-badge-rounded has-badge-danger has-badge-top has-badge-small","data-badge":e.$store.state.spaces[e.tenant?.slug]&&e.$store.state.spaces[e.tenant?.slug].unseenNotificationsCount},[(0,s.bF)(l,{icon:"fa-light fa-bell"})],8,le)):((0,s.uX)(),(0,s.CE)("span",re,[(0,s.bF)(l,{icon:"fa-light fa-bell"})]))])])}var ce={data(){return{}},methods:{toggleNotificationSidebar(){this.$emit("toggle-notifications")}},computed:{...(0,ie.L8)(["user","tenant"])},components:{}},ue=i(66262);const me=(0,ue.A)(ce,[["render",de]]);var pe=me,he=i(95256),ge=i(2321),fe=i(88722),be=i(71537),ye=i(1455),ve=i(51716),ke={name:"AppHeader",components:{OrgoLogo:be.A,SearchBar:se.A,LogoThumbnail:ae.A,AvatarWithProgress:ne.A,AppHeaderNotification:pe,PermissionImpersonationSelector:ye.A,UserMe
1nuItems:ve.A},data(){return{mobileMenuOpen:[!1,!1,!1],isDonateHeartAnimating:!1,donateHeartTimeout:null,isSearchActive:!1,isLoading:!1,mobilePlatform:null,locale:this.$i18n.locale,languages:he.eo}},computed:{...(0,ie.L8)(["user","tenant","isGranted","isBillingFreePlan","billing","userTypeEligibleForFee","isNativeApp","isGrantedAdhesion","isPortrait"]),showDonateButton(){const e=this.tenant?.settingFeatures?.onlinePayments;return!(!e?.donationProductUuid&&!(0,he.Hp)(e?.donateButtonUrl))&&!1!==e.showDonateButtonInHeader},donateButtonHref(){return(0,he.Hp)(this.tenant?.settingFeatures?.onlinePayments?.donateButtonUrl)||this.$router.resolve({name:"DonatePage"}).href},showProfileCompletion(){return this.tenant?.settingFeatures?.users?.profileCompletionEnabled&&void 0!==this.user?.profileCompletionPercentage&&this.user.profileCompletionPercentage<100},deviceId(){return(0,he.rP)()},trialDaysLeft(){if(this.billing&&this.billing.trialEnd){var e=this.billing.trialEnd.getTime()-(new Date).getTime(),t=Math.ceil(e/864e5);return t}return null},tenantLogoRouteName(){if(!this.tenant)return"Dashboard";if(this.tenant.settingFeatures&&this.tenant.settingFeatures.users.customHomepage){const e=this.tenant.settingFeatures.users.customHomepage;if(e.startsWith("/")){const t=this.$router.resolve(e);if(t.matched.length)return{name:t.name,query:t.query}}else{const t=this.$router.resolve({name:e});if(t.matched.length)return e}}return this.isGranted("ADMIN_TENANT"),"Dashboard"},tenantSettings(){return!(!this.$route.meta||!this.$route.meta.isTenantSettings)||!!this.$route.query.isTenantSettings},hasSidebar(){return this.$route.meta&&this.$route.meta.hasAppSidebarMenu||this.tenantSettings},language(){return this.tenant?.settingFeatures?.language||{}},availableLanguages(){return Object.keys(this.languages).filter(e=>this.language[e])},iosAppLink(){return this.tenant?.iosApp?this.tenant?.iosApp:"https://apps.apple.com/us/app/orgo-community/id1484759378"},androidAppLink(){return this.tenant?.androidApp?this.tenant?.androidApp:"https://play.google.com/store/apps/details?id=com.orgoapp"},hasWorkspaces(){return Object.values(this.$store.state.spaces).length>1},isSidebarHidden(){return!(!this.$route.meta||!this.$route.meta.hasAppSidebarMenu)&&this.$store.state.hideAppSidebar}},watch:{$route(e,t){this.$store.state.isMobileProfileHeaderMenuOpen=!1;t&&t.meta&&t.meta.hasAppSidebarMenu,e&&e.meta&&e.meta.hasAppSidebarMenu}},mounted(){const e=(0,Z.Wp)(te.Nd),t=(0,ee.dG)(e),i="BOMzr0Fdh7KtN8suJuUgabgTPuyRB2gWlYLsrFNsy62opr2yCVGeUh3kYLkmAtvjyFUoP-JM66g9wPkAPXfat18";let s=this;this.initOneSignalToken(),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||navigator.userAgent.includes("orgo-app")||navigator.permissions.query({name:"push",userVisibleOnly:!0}).then(function(e){"prompt"===e.state&&Notification.requestPermission().then(e=>{}),"granted"!==e.state||s.deviceIdHasToken()||(0,ee.gf)(t,{vapidKey:i}).then(e=>{s.saveNotificationToken(e)}).catch(e=>console.error(e)),e.onchange=function(){"granted"===e.state?(0,ee.gf)(t,{vapidKey:i}).then(e=>{s.saveNotificationToken(e)}).catch(e=>console.error(e)):s.deviceIdHasToken()&&s.removeNotificationToken()}}),(0,ee.xD)(t,e=>{this.checkUnseenNotificationsCount(),this.$buefy.snackbar.open({duration:8e3,message:e.notification.title+(e.notification.body?"</br>"+e.notification.body:""),type:"is-warning",position:"is-bottom-left",actionText:this.$t("view"),onAction:()=>{const t=e.fcmOptions?.link;if(!t)return;const i=(0,fe.T)(t);i?this.$router.replace(i):window.location.assign(t)}})})},created(){this.checkUnseenNotificationsCount(),this.checkGroupNotificationCounts(),this.setNotificationChecker();let e=this;this.initOneSignalToken();const t=new URL(window.location.href);let i=t.searchParams.get("oid")||(0,he.X)();!(i&&this.user&&this.user.id)||e.deviceIdHasToken()&&e.isPushNotificationTokenDifferent(i)||(this.mobilePlatform="iOS",e.saveNotificationToken(i))},beforeUnmount(){this.donateHeartTimeout&&clearTimeout(this.donateHeartTimeout)},methods:{playDonateHeartbeat(){this.donateHeartTimeout&&clearTimeout(this.donateHeartTimeout),this.isDonateHeartAnimating=!1,this.$nextTick(()=>{this.isDonateHeartAnimating=!0,this.donateHeartTimeout=setTimeout(()=>{this.isDonateHeartAnimating=!1},600)})},showPermissionImpersonationModal(){this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.$refs.permissionImpersonationModal.show()},initOneSignalToken(){let e=this;if(this.user&&this.user.id){const t=(0,he.ey)(navigator.userAgent);!t||e.deviceIdHasToken()&&e.isPushNotificationTokenDifferent(t.oneSignalId)||(this.mobilePlatform=t.platform,e.saveNotificationToken(t.oneSignalId))}},openMobileGroupSidebar(){this.$store.state.isMobileSettingsSidebarOpen=!1,this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.$store.state.isMobileAppSidebarMenuOpen=!this.$store.state.isMobileAppSidebarMenuOpen},openMobileSettingsSidebar(){this.$store.state.isMobileAppSidebarMenuOpen=!1,this.$store.state.isMobileSettingsSidebarOpen=!this.$store.state.isMobileSettingsSidebarOpen},deviceIdHasToken(){return this.user&&this.user.pushNotificationTokens?this.user.pushNotificationTokens.find(e=>e.deviceId===this.deviceId):null},isPushNotificationTokenDifferent(e){return this.user&&this.user.pushNotificationTokens?this.user.pushNotificationTokens.find(t=>t.mobileOneSignalSubscriptionId===e):null},saveNotificationToken(e){this.user&&this.user.id&&this.$http.plain.patch("/push-token-add",{token:e,deviceId:this.deviceId,deviceType:this.mobilePlatform?this.mobilePlatform:navigator.platform}).then(e=>{(0,he.c8)()}).catch(e=>{console.error(e.message)})},removeNotificationToken(){this.user&&this.user.id&&this.$http.plain.patch("/push-token-remove",{deviceId:this.deviceId}).then(e=>{}).catch(e=>{console.error(e.message)})},checkUnseenNotificationsCount(){for(let e of Object.values(this.$store.state.spaces))void 0===e.user||!e.user||this.$store.state.impersonatedAs||this.$store.state.impersonator||this.$http.plain.get("/unseen-notifications",{headers:{"User-Tenant":e.tenant.slug}}).then(t=>{t&&this.$store.commit("unseenNotificationsCount",{tenantSlug:e.tenant.slug,value:parseInt(t.data.count)})}).catch(e=>console.error(e))},checkGroupNotificationCounts(){for(let e of Object.values(this.$store.state.spaces))void 0===e.user||!e.user||this.$store.state.impersonatedAs||this.$store.state.impersonator||this.$http.plain.get("/group-notification-counts",{headers:{"User-Tenant":e.tenant.slug}}).then(t=>{t&&this.$store.commit("groupNotificationCounts",{tenantSlug:e.tenant.slug,counts:t.data})}).catch(e=>console.error(e))},setNotificationChecker(){"dev"!==te.Km&&(this.$store.state.notificationChecker=setInterval(()=>{this.checkUnseenNotificationsCount(),this.checkGroupNotificationCounts()},18e4))},signOut(){this.$http.plain.get("/logout").then(e=>(this.$store.commit("unsetCurrentUser"),this.$store.state.unauthorizedPage=null,this.$store.state.spaces={},this.$router.push({name:"Login"}))).catch(e=>{console.error(e)})},showMobileMenu(e){this.$store.state.isMobileProfileHeaderMenuOpen=!this.$store.state.isMobileProfileHeaderMenuOpen,this.mobileMenuOpen=[!1,!1,
1!1],this.mobileMenuOpen[e]=!0,0===e&&this.$store.state.isMobileProfileHeaderMenuOpen&&this.$nextTick(()=>this.$refs.mobileSearchBar?.focusInput())},languageChange(e){this.locale=e,(0,ge.J4)(e),this.$http.plain.patch("/profile-update/"+this.user.id,{language:e}).then(e=>{this.$store.commit("setCurrentUser",e.data)}).catch(e=>console.log(e))},onLangDropdownToggle(e){e?document.body.classList.add("mobile-lang-dropdown-open"):document.body.classList.remove("mobile-lang-dropdown-open")},closeMobileMenuAndNavigate(e,t,i){this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.$router.push({name:e,params:t||{},query:i||{}})},closeMobileMenuAndNavigateEvent(e){this.closeMobileMenuAndNavigate(e.name,e.params,e.query)},closeMobileMenuAndOpenFeeTab(){this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.openProfileFeeTab()},closeMobileMenuAndOpenThemeSidebar(){this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.$store.commit("openThemeSidebar")},openProfileFeeTab(){return this.tenant.settingFeatures.fees.fixedStartingDateFee||"preper"===this.tenant.slug?this.$router.push({name:"UserShowMyProfile",query:{tab:"fees"}}):this.$router.push({name:"UserShowMyProfile",query:{tab:"payments",subtab:"fees"}})},switchTenant(e){return e!==this.tenant.slug?(this.$store.state.currentGroup=null,this.$store.commit("setTenant",this.$store.state.spaces[e].tenant),this.$store.state.isLoadingGeneral=!0,this.$store.state.isMobileProfileHeaderMenuOpen=!1,this.$http.plain.get("/tenants?slug="+e).then(t=>(this.$store.state.spaces[e].tenant=t.data["hydra:member"][0],this.$store.commit("setTenant",this.$store.state.spaces[e].tenant),this.loadMe(e))).catch(e=>console.log(e)).finally(()=>{this.$store.state.isLoadingGeneral=!1})):(this.$store.state.isMobileProfileHeaderMenuOpen=!1,"Dashboard"!==this.$route.name?this.$router.push({name:"Dashboard"}):void 0)},loadMe(e){let t=this.$store.state.impersonatedAs?"/users/"+this.$store.state.impersonatedAs.id:"/me";return this.$http.plain.get(t).then(t=>{if(t.data&&t.data.id){this.$store.commit("setCurrentUser",t.data),this.$store.state.spaces[e].user=t.data;let i=this.user.language?this.user.language:this.tenant.language;return(0,ge.J4)(i),this.refreshMyGroups(e)}}).catch(e=>console.log(e))},refreshMyGroups(e){this.$http.plain.get("/my-groups").then(t=>(this.$store.commit("setTenantGroups",{slug:e,groups:t.data["hydra:member"]}),this.$store.state.currentGroup="generalUnit",this.$router.push({name:"Dashboard"}))).catch(e=>console.log(e))}}};const Ce=(0,ue.A)(ke,[["render",Y],["__scopeId","data-v-cb71a0fa"]]);var Le=Ce},44352:function(e,t,i){"use strict";i.d(t,{A:function(){return v}});var s=i(20641),a=i(90033);const n={class:"personal-id-log","data-test":"personal-id-log"},o={class:"mb-2"},l={class:"has-text-weight-semibold"},r={key:0,class:"has-text-grey ml-2"},d={key:0,class:"mb-2 has-text-grey"},c={class:"personal-id-log-values"},u={class:"personal-id-log-value"},m={class:"personal-id-log-value"},p=["disabled"],h={class:"icon is-small"};function g(e,t,i,g,f,b){const y=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("p",o,[(0,s.Lk)("span",l,(0,a.v_)(b.sourceLabel),1),b.details.paymentUid?((0,s.uX)(),(0,s.CE)("span",r,(0,a.v_)(e.$t("Payment"))+" #"+(0,a.v_)(b.details.paymentUid),1)):(0,s.Q3)("",!0)]),b.namesLine?((0,s.uX)(),(0,s.CE)("p",d,(0,a.v_)(b.namesLine),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",c,[f.revealed?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",u,(0,a.v_)(f.revealed.old||"-"),1),t[2]||(t[2]=(0,s.Lk)("span",{class:"mx-2","aria-hidden":"true"}," â ",-1)),(0,s.Lk)("span",m,(0,a.v_)(f.revealed.new||"-"),1),(0,s.Lk)("button",{type:"button",class:"button is-light is-rounded is-small ml-3",onClick:t[0]||(t[0]=e=>f.revealed=null)},(0,a.v_)(e.$t("Hide")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[t[3]||(t[3]=(0,s.Lk)("span",{class:"personal-id-log-value has-text-grey"},"â¢â¢â¢â¢â¢â¢",-1)),t[4]||(t[4]=(0,s.Lk)("span",{class:"mx-2","aria-hidden":"true"}," â ",-1)),t[5]||(t[5]=(0,s.Lk)("span",{class:"personal-id-log-value has-text-grey"},"â¢â¢â¢â¢â¢â¢",-1)),i.canReveal?((0,s.uX)(),(0,s.CE)("button",{key:0,t
1ype:"button",class:(0,a.C4)(["button is-light is-rounded is-small ml-3",{"is-loading":f.isRevealing}]),disabled:f.isRevealing,"data-test":"personal-id-log-reveal",onClick:t[1]||(t[1]=(...e)=>b.reveal&&b.reveal(...e))},[(0,s.Lk)("span",h,[(0,s.bF)(y,{icon:"fa-light fa-eye"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Reveal")),1)],10,p)):(0,s.Q3)("",!0)],64))])])}var f={name:"PersonalIdChangeLogDetails",props:{log:{type:Object,required:!0},canReveal:{type:Boolean,default:!1}},data(){return{revealed:null,isRevealing:!1}},computed:{details(){const e=this.log?.details;if(!e)return{};if("string"!==typeof e)return e;try{return JSON.parse(e)||{}}catch{return{}}},sourceLabel(){return"donation"===this.details.source?this.$t("Personal ID number changed during donation"):this.$t("Personal ID number changed on profile")},namesLine(){const e=this.details.names;return e&&"object"===typeof e?void 0!==e.name?[e.name,e.middle].filter(Boolean).join(" "):[e.first,e.middle,e.last].filter(Boolean).join(" "):""}},methods:{reveal(){this.isRevealing=!0,this.$http.plain.get(`/logs/${this.log.id}/personal-id`).then(e=>{this.revealed={old:e.data?.old??"",new:e.data?.new??""}}).catch(e=>{console.error(e),this.$buefy.snackbar.open({message:this.$t("Could not reveal the personal identification number"),type:"is-danger",duration:5e3})}).finally(()=>{this.isRevealing=!1})}}},b=i(66262);const y=(0,b.A)(f,[["render",g],["__scopeId","data-v-a2222f5a"]]);var v=y},44917:function(e,t,i){"use strict";i.d(t,{A:function(){return Ae}});i(18111),i(22489);var s=i(20641),a=i(90033),n=i(53751);const o={id:"myModal",class:"modalSignature"},l={class:"modal-content card o-xswidth"},r={class:"mt-5 mb-6"},d={id:"canvas",ref:"canvas"},c=["disabled"],u={id:"fieldsForm",class:"modalSignature"},m={class:"modal-content card",style:{"max-width":"680px"}},p={action:""},h={class:"level-item mt-3"},g=["value"],f={class:"mt-5"},b=["disabled"],y=["disabled"],v={class:"modal-card card p-5",style:{"min-height":"570px"}},k={class:"modal-card-head"},C={class:"modal-card-title has-text-weight-semibold is-size-4"},L={class:"modal-card-body"},w={class:"has-content-centered"},_={class:"mt-5"},E=["disabled"],$={key:0,class:"card p-5 mb-5 is-flex is-justify-content-space-between is-align-items-center"},F={class:"edoc-required-title"},T={class:"icon"},S={class:"edoc-count"},A={class:"edoc-count-signed"},P={class:"edoc-count-total"},I={class:"edoc-count-label"},M={key:1},x={key:0,class:"is-flex is-align-items-center p-5"},N={class:"is-flex-grow-1 mr-4"},U={class:"has-text-weight-bold is-size-5"},D={key:0,class:"mt-1"},X={class:"has-text-info has-text-weight-semibold"},V={key:1,class:"mt-1"},R={class:"edoc-history-tag edoc-history-tag--warning"},O={key:2,class:"has-text-danger is-size-7 mt-1"},Q={key:3,class:"mt-1 is-size-7 has-text-info"},B={key:4,class:"mt-1 has-text-grey is-size-7"},G={class:"is-flex is-align-items-center edoc-actions"},W=["onClick"],j={class:"icon is-small mr-1"},z=["onClick"],q={class:"icon is-small mr-1"},J={class:"icon is-small mr-1"},H={class:"icon is-small mr-1"},K={class:"icon is-small mr-1"},Y={class:"icon is-small mr-1"},Z={class:"icon is-small mr-1"},ee=["onClick"],te={class:"icon is-small mr-1"},ie={key:1,class:"edoc-history px-5 pb-4"},se={class:"is-flex-grow-1"},ae={class:"edoc-history-tag edoc-history-tag--danger"},ne={class:"has-text-grey is-size-7 ml-2"},oe={class:"edoc-history-tag edoc-history-tag--info"},le={class:"has-text-grey is-size-7 ml-2"},re={class:"edoc-history-tag edoc-history-tag--success"},de={class:"has-text-grey is-size-7 ml-2"},ce={class:"is-flex is-align-items-center edoc-history-actions"},ue=["onClick"],me={class:"icon is-small mr-1"},pe=["onClick"],he={key:0,class:"has-text-grey-light"},ge={key:1,class:"edoc-empty"},fe={class:"edoc-empty-icon mb-3"},be={class:"edoc-empty-message"},ye={class:"edoc-empty-hint mt-2"};function ve(e,t,i,ve,ke,Ce){const Le=(0,s.g2)("font-awesome-icon"),we=(0,s.g2)("b-notification"),_e=(0,s.g2)("b-input"),Ee=(0,s.g2)("b-field"),$e=(0,s.g2)("b-select"),Fe=(0,s.g2)("BirthdaySelect"),Te=(0,s.g2)("TownAutocomplete"),Se=(0,s.g2)("CustomFieldWidget"),Ae=(0,s.g2)("b-datepicker"),Pe=(0,s.g2)("b-modal"),Ie=(0,s.g2)("b-loading"),Me=(0,s.g2)("router-link"),xe=(0,s.g2)("b-upload"),Ne=(0,s.g2)("b-tooltip");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bo)((0,s.Lk)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("span",{class:"close",onClick:t[0]||(t[0]=e=>ke.isModal=!1)},[(0,s.Lk)("span",null,[(0,s.bF)(Le,{icon:"fa-light fa-xmark"})])]),(0,s.Lk)("p",null,(0,a.v_)(e.$t("Sign in the rectangle below")),1),(0,s.Lk)("div",r,[(0,s.Lk)("canvas",d,null,512)]),(0,s.Lk)("p",null,[(0,s.Lk)("button",{disabled:ke.isLoading,class:"button is-primary mr-3 is-rounded",onClick:t[1]||(t[1]=e=>Ce.save(ke.currentContract))},(0,a.v_)(e.$t("save")),9,c),ke.isLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-default is-rounded ml-3",onClick:t[2]||(t[2]=(...e)=>Ce.undo&&Ce.undo(...e))},(0,a.v_)(e.$t("clear")),1))])])],512),[[n.aG,ke.isModal]]),(0,s.bo)((0,s.Lk)("div",u,[(0,s.Lk)("div",m,[(0,s.Lk)("span",{class:"close",onClick:t[3]||(t[3]=e=>ke.isModalFieldsRequired=!1)}
1," Ã "),(0,s.Lk)("form",p,[(0,s.bF)(we,{type:"is-danger",closable:!1,class:"mb-6"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("fieldsRequiredBeforeSign")),1)]),_:1}),ke.modalMissingFields.includes("firstName")?((0,s.uX)(),(0,s.Wv)(Ee,{key:0,label:e.$t("firstName")},{default:(0,s.k6)(()=>[(0,s.bF)(_e,{modelValue:e.user.firstName,"onUpdate:modelValue":t[4]||(t[4]=t=>e.user.firstName=t),required:""},null,8,["modelValue"])]),_:1},8,["label"])):(0,s.Q3)("",!0),ke.modalMissingFields.includes("lastName")?((0,s.uX)(),(0,s.Wv)(Ee,{key:1,label:e.$t("lastName")},{default:(0,s.k6)(()=>[(0,s.bF)(_e,{modelValue:e.user.lastName,"onUpdate:modelValue":t[5]||(t[5]=t=>e.user.lastName=t),required:""},null,8,["modelValue"])]),_:1},8,["label"])):(0,s.Q3)("",!0),ke.modalMissingFields.includes("email")?((0,s.uX)(),(0,s.Wv)(Ee,{key:2,label:"Email"},{default:(0,s.k6)(()=>[(0,s.bF)(_e,{modelValue:e.user.email,"onUpdate:modelValue":t[6]||(t[6]=t=>e.user.email=t),type:"email",required:""},null,8,["modelValue"])]),_:1})):(0,s.Q3)("",!0),ke.modalMissingFields.includes("phone")?((0,s.uX)(),(0,s.Wv)(Ee,{key:3,label:e.$t("phoneNumber")},{default:(0,s.k6)(()=>[(0,s.Lk)("div",h,[(0,s.bF)($e,{modelValue:ke.userPhoneCountry,"onUpdate:modelValue":[t[7]||(t[7]=e=>ke.userPhoneCountry=e),t[8]||(t[8]=e=>ke.userPhoneLocalNumber=null)],style:{"max-width":"165px"},required:""},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ce.countries().filter(e=>null!==e.p),e=>((0,s.uX)(),(0,s.CE)("option",{key:e.c,value:e.c},(0,a.v_)(e.n+" (+"+e.p+")"),9,g))),128))]),_:1},8,["modelValue"]),(0,s.bF)(_e,{modelValue:ke.userPhoneLocalNumber,"onUpdate:modelValue":t[9]||(t[9]=e=>ke.userPhoneLocalNumber=e),type:"tel",disabled:!ke.userPhoneCountry,required:"",placeholder:Ce.getPhonePlaceholder},null,8,["modelValue","disabled","placeholder"])])]),_:1},8,["label"])):(0,s.Q3)("",!0),ke.modalMissingFields.includes("profession")?((0,s.uX)(),(0,s.Wv)(Ee,{key:4,label:e.$t("profession")},{default:(0,s.k6)(()=>[(0,s.bF)(_e,{modelValue:e.user.profession,"onUpdate:modelValue":t[10]||(t[10]=t=>e.user.profession=t),required:""},null,8,["modelValue"])]),_:1},8,["label"])):(0,s.Q3)("",!0),ke.modalMissingFields.includes("dateBirth")?((0,s.uX)(),(0,s.Wv)(Ee,{key:5},{default:(0,s.k6)(()=>[(0,s.bF)(Fe,{modelValue:e.user.dateBirth,"onUpdate:modelValue":t[11]||(t[11]=t=>e.user.dateBirth=t),user:e.user,required:""},null,8,["modelValue","user"])]),_:1})):(0,s.Q3)("",!0),ke.modalMissingFields.includes("currentTown")||ke.modalMissingFields.includes("townCurrent")?((0,s.uX)(),(0,s.Wv)(Te,{key:6,modelValue:e.user.townCurrent,"onUpdate:modelValue":t[12]||(t[12]=t=>e.user.townCurrent=t),label:e.$t("townCurrent"),town:e.user.townCurrent},null,8,["modelValue","label","town"])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.tenant.customFields,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},[!Ce.profileCustomFieldValue(e["@id"])&&ke.modalMissingCustomFields.includes(e.id)?((0,s.uX)(),(0,s.Wv)(Se,{key:0,modelValue:ke.customFieldValues[e.id],"onUpdate:modelValue":[t=>ke.customFieldValues[e.id]=t,t=>ke.customFieldValues[e.id]=t],class:"mb-6",required:"",field:e},null,8,["modelValue","onUpdate:modelValue","field"])):(0,s.Q3)("",!0)],64))),128))]),(0,s.Lk)("div",f,[(0,s.Lk)("button",{disabled:ke.isLoading,class:"button is-primary is-rounded",onClick:t[13]||(t[13]=(...e)=>Ce.saveUserFields&&Ce.saveUserFields(...e))},(0,a.v_)(e.$t("save")),9,b),(0,s.Lk)("button",{disabled:ke.isLoading,class:"button is-default is-rounded ml-3",onClick:t[14]||(t[14]=e=>ke.isModalFieldsRequired=!1)},(0,a.v_)(e.$t("cancel")),9,y)])])],512),[[n.aG,ke.isModalFieldsRequired]]),(0,s.bF)(Pe,{id:"mark-as-signed-modal",modelValue:ke.showMarkAsSignedModal,"onUpdate:modelValue":t[20]||(t[20]=e=>ke.showMarkAsSignedModal=e),"has-modal-card":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",v,[(0,s.Lk)("header",k,[(0,s.Lk)("p",C,(0,a.v_)(e.$t("Mark contract as signed")),1),(0,s.Lk)("button",{class:"delete","aria-label":"close",onClick:t[15]||(t[15]=e=>ke.showMarkAsSignedModal=!1)})]),(0,s.Lk)("section",L,[(0,s.Lk)("div",w,[(0,s.bF)(Ee,{label:e.$t("Validity start date"),required:""},{default:(0,s.k6)(()=>[(0,s.bF)(Ae,{modelValue:ke.markAsSignedStartDate,"onUpdate:modelValue":t[16]||(t[16]=e=>ke.markAsSignedStartDate=e),editable:!0,"append-to-body":"",placeholder:e.$t("Select date")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(Ee,{label:e.$t("Validity end date"),message:e.$t("Leave empty if no end date")},{default:(0,s.k6)(()=>[(0,s.bF)(Ae,{modelValue:ke.markAsSignedEndDate,"onUpdate:modelValue":t[17]||(t[17]=e=>ke.markAsSignedEndDate=e),editable:!0,"append-to-body":"",placeholder:e.$t("No end date")},null,8,["modelValue","placeholder"])]),_:1},8,["label","message"]),(0,s.Lk)("div",_,[(0,s.Lk)("button",{class:"button is-primary is-rounded",disabled:!ke.markAsSignedStartDate,onClick:t[18]||(t[18]=(...e)=>Ce.confirmMarkAsSigned&&Ce.confirmMarkAsSigned(...e))},(0,a.v_)(e.$t("Confirm")),9,E),(0,s.Lk)("button",{class:"button is-default is-rounded ml-3",onClick:t[19]||(t[19]=e=>ke.showMarkAsSignedModal=!1)},(0,a.v_)(e.$t("Cancel")),1)])])])])]),_:1},8,["modelValue"]),(0,s.bF)(Ie,{modelValue:ke.isLoading,"onUpdate:modelValue":t[21]||(t[21]=e=>ke.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),Ce.signatureContractsCount>0&&Ce.signedCount<Ce.signatureContractsCount&&!i.userContract&&!i.isContact?((0,s.uX)(),(0,s.CE)("div",$,[(0,s.Lk)("span",F,[(0,s.Lk)("span",T,[(0,s.bF)(Le,{icon:"fa-light fa-signature"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Required documents")),1)]),(0,s.Lk)("span",S,[(0,s.Lk)("span",A,(0,a.v_)(Ce.signedCount),1),(0,s.Lk)("span",P,"/ "+(0,a.v_)(Ce.signatureContractsCount),1),(0,s.Lk)("span",I,(0,a.v_)(e.$t("signed")),1)])])):(0,s.Q3)("",!0),Ce.contractsToDisplay&&Ce.contractsToDisplay.length>0?((0,s.uX)(),(0,s.CE)("div",M,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ce.contractsToDisplay,n=>((0,s.uX)(),(0,s.CE)("div",{key:n.id,class:(0,a.C4)(["edoc-card card mb-4",Ce.getCardClass(n)])},[n?.id?((0,s.uX)(),(0,s.CE)("div",x,[(0,s.Lk)("div",N,[(0,s.Lk)("p",U,(0,a.v_)(n.name),1),n.hasSignature&&Ce.getAwaitingAdminContract(n)?((0,s.uX)(),(0,s.CE)("p",D,[(0,s.Lk)("span",X,(0,a.v_)(e.$t("Signed"))+" â "+(0,a.v_)(e.$t("awaiting administrator signature")),1)])):n.hasSignature&&Ce.isContractUnsigned(n)?((0,s.uX)(),(0,s.CE)("p",V,[(0,s.Lk)("span",R,(0,a.v_)(e.$t("Needs signature")),1)])):(0,s.Q3)("",!0),n.hasSignature&&e.tenant.settingFeatures.fees.requireContractForMembershipPurchase&&parseInt(e.tenant.settingFeatures.fees.membershipContractDocumentId)===n.id&&Ce.isContractUnsigned(n)&&!ke.isLoading?((0,s.uX)(),(0,s.CE)("p",O,(0,a.v_)(e.$t("There is no valid signed document agreement. Please sign a new one to be part of the community"))+". ",1)):(0,s.Q3)("",!0),!n.hasSignature||e.user.id!==Ce.currentItem.id||!Ce.canSignInAdvance(n)||Ce.isContractUnsigned(n)||Ce.hasDraftContract(n)||ke.isLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",Q,[(0,s.eW)((0,a.v_)(e.$t("Your contract expires in"))+" ",1),(0,s.Lk)("strong",null,(0,a.v_)(Ce.getContractExpiryInfo(n).daysUntilExpiry),1),(0,s.eW)(" "+(0,a.v_)(e.$t("days"))+". "+(0,a.v_)(e.$t("You can renew now to ensure continuity"))+". ",1)])),!n.hasSignature&&n.description?((0,s.uX)(),(0,s.CE)("p",B,(0,a.v_)(n.description),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",G,[n.hasSignature||i.isContact?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-light is-rounded",{"is-loading":ke.isDownloadingContract===n.id}]),onClick:e=>Ce.viewDocument(n,Ce.currentItem)},[(0,s.Lk)("span",j,[(0,s.bF)(Le,{icon:"fa-light fa-file-pdf"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Download PDF")),1)],10,W)),n.hasSignature&&e.user.id===Ce.currentItem.id&&!Ce.isContractUnsigned(n)&&Ce.hasUnsignCancellation(n)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"button is-small is-danger is-light is-rounded",onClick:e=>Ce.unsignContract(n)},[(0,s.Lk)("span",q,[(0,s.bF)(Le,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("unsignContract")),1)],8,z)):(0,s.Q3)("",!0),!n.hasSignature||e.user.id!==Ce.currentItem.id||!Ce.canSignInAdvance(n)||Ce.isContractUnsigned(n)||Ce.hasDraftContract(n)||ke.isLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[n.hasUpload?((0,s.uX)(),(0,s.Wv)(xe,{key:1,modelValue:ke.file,"onUpdate:modelValue":[t[22]||(t[22]=e=>ke.file=e),e=>Ce.uploadFile(n)]},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-small is-light is-rounded",{"is-loading":ke.isUploadingContract===n.id}])},[(0,s.Lk)("span",H,[(0,s.bF)(Le,{icon:"fa-light fa-upload"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Renew")),1)],2)]),_:2},1032,["modelValue","onUpdate:modelValue"])):((0,s.uX)(),(0,s.Wv)(Me,{key:0,to:{name:"DocumentPreview",params:{contractId:n.id},query:Ce.onboardingQueryString},class:(0,a.C4)(["button is-small is-light is-rounded",{"is-loading":ke.isUploadingContract===n.id}])},{default:(0,s.k6)(()=>[(0,s.Lk)("span",J,[(0,s.bF)(Le,{icon:"fa-light fa-rotate"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Renew")),1)]),_:1},8,["to","class"]))],64)),n.hasSignature&&e.user.id===Ce.currentItem.id&&Ce.isContractUnsigned(n)&&!Ce.hasDraftContract(n)&&!ke.isLoading?((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[n.hasUpload?((0,s.uX)(),(0,s.Wv)(xe,{key:1,modelValue:ke.file,"onUpdate:modelValue":[t[23]||(t[23]=e=>ke.file=e),e=>Ce.uploadFile(n)]},{default:(0,s.k6)(()=>[(0,s.Lk)("a",{class:(0,a.C4)(["button is-primary is-rounded",{"is-loading":ke.isUploadingContract===n.id}])},[(0,s.Lk)("span",Y,[(0,s.bF)(Le,{icon:"fa-light fa-upload"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("uploadFile")),1)],2)]),_:2},1032,["modelValue","onUpdate:modelValue"])):((0,s.uX)(),(0,s.Wv)(Me,{key:0,to:{name:"DocumentPreview",params:{contractId:n.id},query:Ce.onboardingQueryString},class:(0,a.C4)(["button is-primary is-rounded is-small",{"is-loading":ke.isUploadingContract===n.id}])},{default:(0,s.k6)(()=>[(0,s.Lk)("span",K,[(0,s.bF)(Le,{icon:"fa-light fa-signature"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Sign")),1)]),_:1},8,["to","class"]))],64)):(0,s.Q3)("",!0),n.hasSignature&&Ce.hasDraftContract(n)&&Ce.getDraftContract(n)?((0,s.uX)(),(0,s.Wv)(Me,{key:4,class:"button is-primary is-rounded is-small",to:{name:"DocumentPreviewUser",params:{contractUserId:Ce.getDraftContract(n).id},query:Ce.onboardingQueryString}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Z,[(0,s.bF)(Le,{icon:"fa-light fa-signature"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Sign")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0),e.isGranted("HR_TENANT")&&n.hasSignature&&!Ce.hasInfiniteSignedContract(n)?((0,s.uX)(),(0,s.Wv)(Ne,{key:5,label:e.$t("Only visible to admins"),position:"is-left",type:"is-dark",size:"is-small"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"button is-small is-rounded edoc-admin-btn",onClick:e=>Ce.openMarkAsSignedModal(n)},[(0,s.Lk)("span",te,[(0,s.bF)(Le,{icon:"fa-light fa-user-shield"})]),(0,s.Lk)("span",null,(0,a.v_)(Ce.isContractUnsigned(n)?e.$t("Mark as signed"):e.$t("Mark as signed again")),1
1)],8,ee)]),_:2},1032,["label"])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),n.hasSignature&&Ce.getHistoryEntries(n).length>0&&(e.isGranted("ADMIN_TENANT")||e.user.id===Ce.currentItem.id)?((0,s.uX)(),(0,s.CE)("div",ie,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ce.getHistoryEntries(n),t=>((0,s.uX)(),(0,s.CE)("div",{key:t.id,class:"edoc-history-item is-flex is-align-items-center py-3"},[t.canceledBy||!t.dateSignature?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["edoc-history-icon mr-3",Ce.getHistoryIconClass(t)])},[(0,s.bF)(Le,{icon:Ce.getHistoryIcon(t)},null,8,["icon"])],2)):(0,s.Q3)("",!0),(0,s.Lk)("div",se,[t.canceledBy?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",ae,(0,a.v_)(e.$t("Canceled")),1),(0,s.Lk)("span",ne,(0,a.v_)(t.canceledBy.fullName)+" · "+(0,a.v_)(e.$filters.format(t.dateCanceled)),1)],64)):"signed-user"===t.status?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("span",oe,(0,a.v_)(e.$t("Awaiting approval")),1),(0,s.Lk)("span",le,(0,a.v_)(e.$t("awaiting administrator signature")),1)],64)):!t.canceledBy&&t.dateSignature?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("span",re,(0,a.v_)(e.$t("Signed")),1),(0,s.Lk)("span",de,(0,a.v_)(e.$filters.format(t.dateValidityStart??t.dateSignature))+" â "+(0,a.v_)(t.dateValidityEnd?e.$filters.format(t.dateValidityEnd):"â"),1)],64)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",ce,[t.dateSignature&&!t.canceledBy?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-light is-rounded",{"is-loading":ke.isDownloadingContractUser===t.id}]),onClick:e=>Ce.viewDocumentEntry(t,n,Ce.currentItem)},[(0,s.Lk)("span",me,[(0,s.bF)(Le,{icon:"fa-light fa-file-pdf"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Download")),1)],10,ue)):(0,s.Q3)("",!0),e.user.id===Ce.currentItem.id&&!t.canceledBy&&t.enableSignatureCancellation?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"button is-ghost is-small is-rounded has-text-danger ml-2",onClick:e=>Ce.unsignContract(n)},(0,a.v_)(e.$t("unsignContract")),9,pe)):(0,s.Q3)("",!0)])]))),128))])):(0,s.Q3)("",!0)],2))),128))])):ke.isLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,a.C4)(i.isContact?"":"card p-5 mt-4")},[i.isContact?((0,s.uX)(),(0,s.CE)("p",he,(0,a.v_)(e.$t("No documents available")),1)):((0,s.uX)(),(0,s.CE)("div",ge,[(0,s.Lk)("span",fe,[(0,s.bF)(Le,{icon:"fa-light fa-file-contract"})]),(0,s.Lk)("span",be,(0,a.v_)(e.$t("No documents available")),1),(0,s.Lk)("span",ye,(0,a.v_)(e.$t("Documents will appear here once available")),1)]))],2))])}i(44114),i(20116),i(7588),i(18237),i(13579),i(14603),i(47566),i(98721);var ke=i(40834),Ce=i(19378),Le=i(53369),we=(i(28782),i(95256)),_e=i(48431),Ee=i(69213),$e=i(4416),Fe={props:["item","userContract","isContact"],data(){return{items:null,api_url:null,file:null,isUploadingContract:null,isDownloadingContract:null,isDownloadingContractUser:null,userContracts:{},contractFileUrl:[],showModal:!1,signaturePad:null,isModal:!1,isModalFieldsRequired:!1,modalMissingFields:[],modalMissingCustomFields:[],customFieldValues:{},currentContract:null,isLoading:!1,userPhoneCountry:null,userPhoneLocalNumber:null,showEditValidityModal:!1,dateValidityStart:null,dateValidityEnd:null,showMarkAsSignedModal:!1,markAsSignedStartDate:null,markAsSignedEndDate:null,contractToMarkAsSigned:null}},created(){this.loadUserContracts(),this.userContract||this.isContact?this.items=[]:this.loadItemsPage()},mounted(){let e=this.$refs.canvas;this.signaturePad=new Ee.A(e,{backgroundColor:"rgb(255, 255, 255)"}),this.userPhoneCountry=this.user.phoneCountry,this.userPhoneLocalNumber=this.user.phoneLocalNumber},computed:{...(0,ke.L8)(["isGranted","user","tenant"]),onboardingQueryString(){return"OnBoardingUser"===this.$route.name?{onboarding:1}:{}},contractsToDisplay(){let e=[];return this.userContract?e=e.concat([this.userContract]):this.items&&Array.isArray(this.items)&&(e=e.concat(this.items)),e.sort((e,t)=>{const i=e.hasSignature&&this.isContractUnsigned(e)?0:1,s=t.hasSignature&&this.isContractUnsigned(t)?0:1;return i-s}),e},signatureContractsCount(){return this.contractsToDisplay.filter(e=>e.hasSignature).length},signedCount(){return this.contractsToDisplay.filter(e=>e.hasSignature&&!this.hasUnsignedUserContracts(e)).length},currentItem(){return this.item||this.user},getPhonePlaceholder(){let e=we.Xr.find(e=>e.c===this.userPhoneCountry);return void 0!==e?e.s:""}},methods:{isContractUnsigned(e){return this.hasUnsignedUserContracts(e)},getLatestValidContract(e){if(!this.userContracts[e.id])return null;const t=this.userContracts[e.id].filter(e=>!e.canceledBy&&e.dateSignature);return 0===t.length?null:t[t.length-1]},getAwaitingAdminContract(e){return this.userContracts[e.id]?this.userContracts[e.id].find(e=>"signed-user"===e.status&&!e.canceledBy):null},getDraftContract(e){return this.userContracts[e.id]?this.userContracts[e.id].find(e=>!e.dateSignature&&!e.isLocked):null},getHistoryEntries(e){return this.userContracts[e.id]?this.userContracts[e.id].filter(e=>e.dateSignature||e.isLocked):[]},hasInfiniteSignedContract(e){return!!this.userContracts[e.id]&&this.userContracts[e.id].some(e=>!e.canceledBy&&e.dateSignature&&!e.dateValidityEnd)},hasUnsignCancellation(e){return!!this.userContracts[e.id]&&this.userContracts[e.id].some(e=>!e.canceledBy&&e.enableSignatureCancellation)},getCardClass(e){return e.hasSignature?this.isContractUnsigned(e)?"edoc-card--unsigned":"edoc-card--signed":"edoc-card--default"},hasDropdownItems(e){return!(!e.hasSignature||this.isContractUnsigned(e)||!this.getLatestValidContract(e)?.media?.contentUrl)||(!e.hasSignature||(!(!e.hasSignature||this.isContractUnsigned(e)||!this.getLatestValidContract(e)||this.getLatestValidContract(e)?.media?.contentUrl)||(!(!e.hasSignature||this.user.id!==this.currentItem.id||this.isContractUnsigned(e)||!this.hasUnsignCancellation(e))||!(!e.hasSignature||this.user.id!==this.currentItem.id||!this.canSignInAdvance(e)||this.isContractUnsigned(e)||this.hasDraftContract(e)||!this.getLatestValidContract(e)))))},getHistoryIcon(e){return e.canceledBy?"fa-light fa-ban":"signed-user"===e.status?"fa-light fa-clock":!e.canceledBy&&e.dateSignature?"fa-light fa-circle-check":"fa-light fa-file-pen"},getHistoryIconClass(e){return e.canceledBy?"edoc-history-icon--danger":"signed-user"===e.status?"edoc-history-icon--info":!e.canceledBy&&e.dateSignature?"edoc-history-icon--success":"edoc-history-icon--draft"},canSignInAdvance(e){if(!this.userContracts[e.id])return!1;const t=this.userContracts[e.id].filter(e=>!e.canceledBy&&e.dateValidityEnd&&new Date(e.dateValidityEnd)>new Date);if(0===t.length)return!1;const i=t.reduce((e,t)=>
1new Date(t.dateValidityEnd)>new Date(e.dateValidityEnd)?t:e),s=new Date(i.dateValidityEnd),a=new Date,n=new Date;return n.setDate(a.getDate()+60),s<=n&&s>=a},getContractExpiryInfo(e){if(!this.userContracts[e.id])return null;const t=this.userContracts[e.id].filter(e=>!e.canceledBy&&e.dateValidityEnd&&new Date(e.dateValidityEnd)>new Date);if(0===t.length)return null;const i=t.reduce((e,t)=>new Date(t.dateValidityEnd)>new Date(e.dateValidityEnd)?t:e);return{endDate:new Date(i.dateValidityEnd),daysUntilExpiry:Math.ceil((new Date(i.dateValidityEnd)-new Date)/864e5)}},viewDocumentEntry(e,t,i){this.isDownloadingContractUser=e.id,this.$http.plain.get("/view-contract-entry/"+e.id,{responseType:"blob"}).then(e=>{var s=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",t.name+"-"+i.fullName+".pdf"),document.body.appendChild(a),a.click()}).catch(e=>console.error(e)).finally(()=>{this.isDownloadingContractUser=null})},viewDocument(e,t){this.isDownloadingContract=e.id,this.$http.plain.get("/view-contracts/"+e.id+"/"+t.id,{responseType:"blob"}).then(i=>{var s=window.URL.createObjectURL(new Blob([i.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",e.name+"-"+t.fullName+".pdf"),document.body.appendChild(a),a.click()}).catch(e=>console.error(e)).finally(()=>{this.file=null,this.isDownloadingContract=null})},countries(){return we.Xr},mediaSrc:we.F9,hasUnsignedUserContracts(e){if(void 0===this.userContracts[e.id])return!0;for(let t of this.userContracts[e.id])if(!t.canceledBy&&t.dateSignature&&(!t.dateValidityEnd||new Date(t.dateValidityEnd)>new Date))return!1;return!0},hasDraftContract(e){return!!this.userContracts[e.id]&&this.userContracts[e.id].some(e=>!e.dateSignature&&!e.isLocked)},openMarkAsSignedModal(e){this.contractToMarkAsSigned=e,this.markAsSignedStartDate=null,this.markAsSignedEndDate=null,this.showMarkAsSignedModal=!0},confirmMarkAsSigned(){this.markAsSignedStartDate&&(this.markAsSignedEndDate&&this.markAsSignedStartDate>this.markAsSignedEndDate?this.$buefy.toast.open({message:this.$t("End date must be greater than the start date"),type:"is-danger",duration:5e3}):(this.isLoading=!0,this.$http.plain.post("/contract_users/mark_as_signed",{contract:this.contractToMarkAsSigned["@id"],dateValidityStart:this.markAsSignedStartDate,dateValidityEnd:this.markAsSignedEndDate||null,user:this.currentItem?.["@id"]||this.user["@id"]}).then(e=>{this.saveSuccess(),this.showMarkAsSignedModal=!1}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error marking contract as signed, please try again."),type:"is-danger",duration:5e3}),this.showMarkAsSignedModal=!1}).finally(()=>{this.isLoading=!1,this.contractToMarkAsSigned=null})))},signCheckRequiredFields(){let e=this.currentContract,t=["firstName","lastName","dateBirth","profession","address","email","phone","currentTown"],i=this.tenant.customFields,s=[],a=[];for(let n of t)switch(n){case"firstName":e.content.includes("{"+n+"}")&&!this.user.firstName&&s.push("firstName");break;case"lastName":e.content.includes("{"+n+"}")&&!this.user.lastName&&s.push("lastName");break;case"phone":!e.content.includes("{"+n+"}")||this.userPhoneCountry&&this.userPhoneLocalNumber||s.push("phone");break;case"address":e.content.includes("{"+n+"}")&&!this.user.address&&s.push("address");break;case"email":e.content.includes("{"+n+"}")&&!this.user.email&&s.push("email");break;case"dateBirth":e.content.includes("{"+n+"}")&&!this.user.dateBirth&&s.push("dateBirth");break;case"currentTown":e.content.includes("{"+n+"}")&&!this.user.townCurrent&&s.push("currentTown");break;case"profession":e.content.includes("{"+n+"}")&&!this.user.professionHeadline&&s.push("profession");break}for(let n of i)if(n&&e.content.includes("{custom_field_"+n.id+"}")){let e=this.user.customFieldValues.find(e=>e.field===n["@id"]);e&&(!1===e.value||e.value)||this.customFieldValues[n.id]||a.push(n.id)}return!s.length&&!a.length||(this.isModal=!1,this.isModalFieldsRequired=!0,this.modalMissingCustomFields=a,this.modalMissingFields=s,!1)},undo(){this.signaturePad.clear()},profileCustomFieldValue(e){let t=this.user.customFieldValues,i=t.find(t=>t.field===e);return!!i&&i.value},saveUserFields(){if(!this.signCheckRequiredFields())return;let e={rawUserCustomFieldsValues:this.customFieldValues,firstName:this.user.firstName,lastName:this.user.lastName,dateBirth:this.user.dateBirth,address:this.user.address,profession:this.user.profession,email:this.user.email,phoneCountry:this.userPhoneCountry,phoneNumber:this.userPhoneLocalNumber,townCurrent:this.user.townCurrent?this.user.townCurrent["@id"]:null};this.isLoading=!0,this.$http.plain.patch("/users/"+this.user.id,e).then(e=>{this.modalMissingCustomFields=[],this.modalMissingFields=[],this.isModalFieldsRequired=!1,this.isModal=!0,this.$store.commit("setCurrentUser",e.data)}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},save(e){let t=this.signaturePad.toDataURL();this.isLoading=!0,fetch(t).then(e=>e.blob()).then(t=>{let i=new File([t],"Signature_"+e.id+this.user.id+".png",{type:"image/png"}),s=new FormData;s.append("file",i),s.append("type","signature"),s.append("entity_id",e.id),this.isLoading=!0,this.$http.plain.post("/media_objects",s,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>{this.saveSuccess(),this.isModal=!1}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})})},unsignContract(e){this.isLoading=!0,this.$http.plain.post("/unsignContract/"+e.id+"/"+this.user.id,{responseType:"blob"}).then(e=>{this.saveSuccess()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},loadUserContracts(){this.userContracts={},this.isLoading=!0;let e="";e=this.isContact?"contact="+this.currentItem.id+"&isLocked=1":"user="+this.currentItem.id,this.$http.plain.get("/contract_users?"+e).then(e=>
1{e.data["hydra:member"].forEach(e=>{e.contract.hasSignature&&(void 0===this.userContracts[e.contract.id]&&(this.userContracts[e.contract.id]=[],this.isContact&&((0,$e.b)(this.items)||(this.items=[]),this.items.push(e.contract))),this.userContracts[e.contract.id].push(e))})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},loadItemsPage(){this.$http.plain.get("/my_contracts").then(e=>{this.items=e.data["hydra:member"]}).catch(e=>console.error(e))},uploadFile(e){if(!this.file)return;this.isUploadingContract=e.id;let t=new FormData;t.append("file",this.file),t.append("type","contract"),t.append("entity_id",e.id),this.isLoading=!0,this.$http.plain.post("/media_objects",t,{headers:{"Content-Type":"multipart/form-data"}}).then(t=>{void 0===this.userContracts[e.id]&&(this.userContracts[e.id]=[]),this.userContracts[e.id].push(t.data.contentUrl),this.saveSuccess()}).catch(e=>console.error(e)).finally(()=>{this.file=null,this.isUploadingContract=null})},saveSuccess(){this.$buefy.snackbar.open({message:this.$t("updatedSuccessfully")}),this.$emit("updateUser"),this.loadUserContracts()},error(e){console.error(e)},saveContractValidity(e){this.isLoading=!0,this.$http.plain.patch(`/contract_users/admin/${e}`,{dateValidityStart:this.dateValidityStart,dateValidityEnd:this.dateValidityEnd}).then(e=>{this.saveSuccess()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})}},components:{BirthdaySelect:Ce.A,TownAutocomplete:Le.A,CustomFieldWidget:_e.A}},Te=i(66262);const Se=(0,Te.A)(Fe,[["render",ve],["__scopeId","data-v-0d8ffda0"]]);var Ae=Se},46093:function(e,t,i){"use strict";i.d(t,{Mj:function(){return n},jM:function(){return a},xu:function(){return l}});const s=16;function a(e,t){if(!e||"undefined"===typeof window)return!1;const i=e.getBoundingClientRect(),a=t?.offsetWidth||320;return i.left+a>window.innerWidth-s}function n(e){const t=()=>a(e.$refs.pillContainer,e.$refs.dropdown);e.flipped=t(),e.$nextTick(()=>{e.flipped=t()})}const o=60;function l(e,t=o){if(!e)return;const i=e.querySelector('input:not([type="hidden"]):not([disabled]), textarea');i&&i.getClientRects().length>0?i.focus():t>0&&"function"===typeof requestAnimationFrame&&requestAnimationFrame(()=>l(e,t-1))}},48108:function(e,t,i){"use strict";i.d(t,{T:function(){return s},Z:function(){return a}});i(18111),i(13579);function s(e){const t=e&&Array.isArray(e.userRoles)?e.userRoles:[];return t.some(e=>e&&e.isAdmin&&!e.dateEnded&&e.unit)}function a(e,t){const i=e&&Array.isArray(e.userRoles)?e.userRoles:[];return i.some(e=>{if(!e||!e.isAdmin||e.dateEnded||!e.unit)return!1;const i="object"===typeof e.unit?e.unit.id:parseInt(String(e.unit).split("/").pop());return i===t})}},48266:function(e,t,i){"use strict";i.d(t,{A:function(){return pt}});var s=i(20641),a=i(90033),n=i(53751);const o={key:0},l={key:0,class:"invite-hero mb-4"},r={class:"conversion-ring"},d={width:"56",height:"56",viewBox:"0 0 56 56"},c=["stroke-dasharray","stroke-dashoffset"],u={class:"conversion-percent"},m={class:"is-flex-grow-1"},p={class:"invite-hero-title"},h={key:0,class:"invite-hero-sub"},g={key:1,class:"card p-5 mb-5"},f={class:"tabs-pill mb-4"},b={class:"tabs"},y={"data-pill-id":"inviteChannel"},v=["onClick"],k={class:"icon is-small"},C={class:"is-size-7 has-text-grey mb-3"},L={class:"referral-link-group"},w={class:"referral-link-display"},_=["aria-label"],E={class:"icon is-small"},$={class:"is-hidden-mobile"},F={class:"icon is-small"},T=["onClick"],S={class:"icon is-small"},A={class:"is-size-7 has-text-grey mb-3"},P=["aria-label","onClick"],I=["placeholder"],M={class:"is-flex is-align-items-center mt-4"},x=["disabled"],N={class:"icon is-small"},U={class:"card p-5 mb-4"},D={class:"is-flex is-justify-content-space-between is-align-items-center mb-3"},X={class:"has-text-weight-bold is-size-6 mb-0"},V={class:"icon is-small"},R={class:"tabs-pill mb-3"},O={class:"tabs"},Q={"data-pill-id":"invitationFilter"},B=["onClick"],G={class:"invitation-list"},W={class:"invite-row-info"},j={key:1,class:"invite-row-name"},z={key:2,class:"invite-row-sub"},q={class:"invite-row-date"},J={key:2,class:"tag is-rounded is-small invite-status-pending"},H={class:"icon is-small"},K=["title"],Y=["title","aria-label","onClick"],Z={key:0,class:"has-text-centered has-text-grey-light is-size-7 p-5"},ee={key:1,class:"has-text-centered mt-3"},te={key:1,class:"invite-empty"},ie={class:"invite-empty-icon"},se={class:"invite-empty-title"},ae={class:"invite-empty-text"},ne={class:"has-text-centered has-text-grey-light is-size-7 mt-5 mb-5"},oe={key:1},le={key:0,class:"card p-5 mb-5"},re={class:"is-flex is-align-items-center mb-4",style:{gap:"8px"}},de={class:"icon has-text-link"}
1,ce={class:"has-text-weight-bold is-size-6 mb-0"},ue={class:"mb-5"},me={key:0,class:"mt-4"},pe={class:"is-size-7 has-text-grey mb-2"},he={class:"buttons"},ge=["onClick"],fe={key:1,class:"icon-text tag is-rounded is-medium"},be=["disabled"],ye={class:"card p-5 mb-5"},ve={class:"is-flex is-align-items-center mb-4",style:{gap:"8px"}},ke={class:"icon has-text-success"},Ce={class:"has-text-weight-bold is-size-6 mb-0"},Le={key:0},we={class:"referral-entry mb-4"},_e={class:"is-flex is-align-items-center mb-3",style:{gap:"12px"}},Ee={class:"referral-answers"},$e={key:0,class:"referral-answer mb-3"},Fe={class:"is-size-7 has-text-weight-semibold has-text-grey mb-1"},Te={class:"referral-answer-text"},Se={key:1,class:"referral-answer mb-3"},Ae={class:"is-size-7 has-text-weight-semibold has-text-grey mb-1"},Pe={class:"referral-answer-text"},Ie={key:2,class:"referral-answer"},Me={class:"is-size-7 has-text-weight-semibold has-text-grey mb-1"},xe={class:"referral-answer-text"},Ne={key:0,class:"mt-2"},Ue={key:1,class:"has-text-grey-light is-size-7 is-italic"},De={class:"card p-5 mb-5"},Xe={class:"is-flex is-align-items-center mb-4",style:{gap:"8px"}},Ve={class:"icon has-text-link"},Re={class:"has-text-weight-bold is-size-6 mb-0"},Oe={key:0},Qe={class:"referral-entry mb-4"},Be={class:"is-flex is-align-items-center mb-3",style:{gap:"12px"}},Ge={class:"referral-answers"},We={key:0,class:"referral-answer mb-3"},je={class:"is-size-7 has-text-weight-semibold has-text-grey mb-1"},ze={class:"referral-answer-text"},qe={key:1,class:"referral-answer mb-3"},Je={class:"is-size-7 has-text-weight-semibold has-text-grey mb-1"},He={class:"referral-answer-text"},Ke={key:2,class:"referral-answer"},Ye={class:"is-size-7 has-text-weight-semibold has-text-grey mb-1"},Ze={class:"referral-answer-text"},et={key:0,class:"mt-2"},tt={key:1,class:"has-text-grey-light is-size-7 is-italic"};function it(e,t,i,it,st,at){const nt=(0,s.g2)("b-loading"),ot=(0,s.g2)("font-awesome-icon"),lt=(0,s.g2)("b-input"),rt=(0,s.g2)("LogoThumbnail"),dt=(0,s.g2)("router-link"),ct=(0,s.g2)("UserSearchAutocomplete"),ut=(0,s.g2)("b-field");return st.currentUser?((0,s.uX)(),(0,s.CE)("section",o,[(0,s.bF)(nt,{modelValue:st.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>st.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),at.isInviteModeEnabled?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["invitation-section",{"invitation-section--modal":i.onlyInvitations}])},[at.isOwnProfile&&at.invitationStats.sent>0?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("div",r,[((0,s.uX)(),(0,s.CE)("svg",d,[t[16]||(t[16]=(0,s.Lk)("circle",{cx:"28",cy:"28",r:"24",fill:"none",stroke:"var(--orgo-hr)","stroke-width":"4"},null,-1)),(0,s.Lk)("circle",{class:"conversion-arc",cx:"28",cy:"28",r:"24",fill:"none",stroke:"var(--bulma-success)","stroke-width":"4","stroke-linecap":"round","stroke-dasharray":at.circumference,"stroke-dashoffset":at.circumferenceOffset},null,8,c)])),(0,s.Lk)("span",u,(0,a.v_)(at.conversionRate)+"%",1)]),(0,s.Lk)("div",m,[(0,s.Lk)("p",p,(0,a.v_)(at.invitationStats.joined)+" "+(0,a.v_)(e.$t("out of"))+" "+(0,a.v_)(at.invitationStats.sent)+" "+(0,a.v_)(e.$t("invited people joined your community")),1),at.invitationStats.pending>0?((0,s.uX)(),(0,s.CE)("p",h,(0,a.v_)(at.invitationStats.pending)+" "+(0,a.v_)(e.$t("Pending")),1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),at.isOwnProfile?((0,s.uX)(),(0,s.CE)("div",g,[(0,s.Lk)("div",f,[(0,s.Lk)("nav",b,[(0,s.Lk)("ul",y,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.inviteChannels,e=>((0,s.uX)(),(0,s.CE)("li",{key:e.id,class:(0,a.C4)({"is-active":st.activeInviteTab===e.id})},[(0,s.Lk)("a",{onClick:t=>st.activeInviteTab=e.id},[(0,s.Lk)("span",k,[(0,s.bF)(ot,{icon:e.icon},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(e.label),1)],8,v)],2))),128))])])]),(0,s.bo)((0,s.Lk)("div",null,[(0,s.Lk)("p",C,(0,a.v_)(e.$t("Share with friends")),1),(0,s.Lk)("div",L,[(0,s.Lk)("div",w,(0,a.v_)(at.invitationUrlDisplay),1),(0,s.Lk)("button",{class:(0,a.C4)(["referral-copy-btn",{"is-copied":st.linkCopied}]),"aria-label":e.$t("Copy"),onClick:t[1]||(t[1]=(...e)=>at.handleCopyLink&&at.handleCopyLink(...e))},[(0,s.Lk)("span",E,[(0,s.bF)(ot,{icon:st.linkCopied?"fa-light fa-check":"fa-light fa-copy"},null,8,["icon"])]),(0,s.Lk)("span",$,(0,a.v_)(st.linkCopied?e.$t("Copied"):e.$t("Copy")),1)],10,_)]),st.canNativeShare?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-rounded is-fullwidth mt-4 is-hidden-tablet",onClick:t[2]||(t[2]=(...e)=>at.shareNative&&at.shareNative(...e))},[(0,s.Lk)("span",F,[(0,s.bF)(ot,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",{class:(0,a.C4)(["share-channels mt-4",{"is-hidden-mobile":st.canNativeShare}])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.shareChannels,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.id,class:(0,a.C4)(["button is-small is-rounded is-light share-channel-btn","share-channel-btn--"+e.id]),onClick:t=>at.shareVia(e.id)},[(0,s.Lk)("span",S,[(0,s.bF)(ot,{icon:e.icon},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(e.label),1)],10,T))),128))],2)],512),[[n.aG,"link"===st.activeInviteTab]]),(0,s.bo)((0,s.Lk)("div",null,[(0,s.Lk)("p",A,(0,a.v_)(e.$t("inviteUsersTextarea")),1),(0,s.Lk)("div",{class:"email-chips-input",onClick:t[5]||(t[5]=(...e)=>at.focusEmailInput&&at.focusEmailInput(...e))},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(st.emailChips,(t,i)=>((0,s.uX)(),(0,s.CE)("span",{key:i,class:"tag is-rounded is-link is-light email-chip"},[(0,s.eW)((0,a.v_)(t)+" ",1),(0,s.Lk)("button",{class:"delete is-small","aria-label":e.$t("delete"),onClick:(0,n.D$)(e=>at.removeEmailChip(i),["stop"])},null,8,P)]))),128)),(0,s.bo)((0,s.Lk)("input",{ref:"emailInput","onUpdate:modelValue":t[3]||(t[3]=e=>st.emailInputValue=e),type:"email",class:"email-chips-text-input",placeholder:0===st.emailChips.length?"[email protected]":"",onKeydown:t[4]||(t[4]=(...e)=>at.handleEmailKeyDown&&at.handleEmailKeyDown(...e))},null,40,I),[[n.Jo,st.emailInputValue]])]),(0,s.Lk)("div",M,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded is-small",{"is-loading":e.$store.state.isLoadingButton,"is-success":st.sendSuccess}
1]),disabled:0===st.emailChips.length&&(!st.inviteContent||!st.inviteContent.trim()),onClick:t[6]||(t[6]=(...e)=>at.save&&at.save(...e))},[(0,s.Lk)("span",N,[(0,s.bF)(ot,{icon:st.sendSuccess?"fa-light fa-check":"fa-light fa-paper-plane"},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(st.sendSuccess?e.$t("Invitations sent"):e.$t("sendInvitation")),1)],10,x),(0,s.Lk)("span",{class:(0,a.C4)(["is-size-7 ml-3",st.emailChips.length>=18?"has-text-warning":"has-text-grey-light"])},(0,a.v_)(st.emailChips.length)+"/20 "+(0,a.v_)(e.$t("addresses")),3)])],512),[[n.aG,"email"===st.activeInviteTab]])])):(0,s.Q3)("",!0),(0,s.Lk)("div",U,[(0,s.Lk)("div",D,[(0,s.Lk)("h3",X,(0,a.v_)(e.$t("Invitation history")),1),at.allInvitations.length>0?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"icon-text is-size-7 has-text-link",onClick:t[7]||(t[7]=(...e)=>at.refreshInvitations&&at.refreshInvitations(...e))},[(0,s.Lk)("span",V,[(0,s.bF)(ot,{icon:"fa-light fa-refresh"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Refresh")),1)])):(0,s.Q3)("",!0)]),at.allInvitations.length>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("div",R,[(0,s.Lk)("nav",O,[(0,s.Lk)("ul",Q,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.invitationTabs,e=>((0,s.uX)(),(0,s.CE)("li",{key:e.id,class:(0,a.C4)({"is-active":st.activeInvitationTab===e.id})},[(0,s.Lk)("a",{onClick:t=>at.selectInvitationTab(e.id)},[(0,s.eW)((0,a.v_)(e.label)+" ",1),(0,s.Lk)("span",{class:(0,a.C4)(["ml-1 has-text-weight-bold",st.activeInvitationTab===e.id?"has-text-link":""])},(0,a.v_)(e.count),3)],8,B)],2))),128))])])]),at.allInvitations.length>st.SEARCH_THRESHOLD?((0,s.uX)(),(0,s.Wv)(lt,{key:0,modelValue:st.invitationSearch,"onUpdate:modelValue":[t[8]||(t[8]=e=>st.invitationSearch=e),at.resetInvitationPaging],class:"mb-3",size:"is-small",rounded:"",icon:"magnifying-glass","icon-right":st.invitationSearch?"xmark":"","icon-right-clickable":"",placeholder:e.$t("Search"),onIconRightClick:at.clearInvitationSearch},null,8,["modelValue","icon-right","placeholder","onUpdate:modelValue","onIconRightClick"])):(0,s.Q3)("",!0),(0,s.Lk)("div",G,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(at.visibleInvitations,(t,i)=>((0,s.uX)(),(0,s.CE)("div",{key:t.code||t.id||i,class:"invite-row"},["joined"===t.type&&t.user?((0,s.uX)(),(0,s.Wv)(rt,{key:0,item:t.user,"is-type":"roundSmall"},null,8,["item"])):((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["invitation-avatar","avatar--"+t.type])},(0,a.v_)(at.getInitials(t.displayName||t.email)),3)),(0,s.Lk)("div",W,["joined"===t.type&&t.user?((0,s.uX)(),(0,s.Wv)(dt,{key:0,to:{name:"UserShow",params:{item:t.user.id}},class:"invite-row-name"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(t.displayName),1)]),_:2},1032,["to"])):((0,s.uX)(),(0,s.CE)("p",j,(0,a.v_)(t.displayName||t.email),1)),t.displayName&&t.email?((0,s.uX)(),(0,s.CE)("p",z,(0,a.v_)(t.email),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",q,(0,a.v_)(t.dateFormatted),1),"pending"===t.type?((0,s.uX)(),(0,s.CE)("span",J,[(0,s.Lk)("span",H,[(0,s.bF)(ot,{icon:"fa-light fa-clock"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Pending")),1)])):((0,s.uX)(),(0,s.CE)("span",{key:3,class:"invite-row-joined",title:e.$t("Joined")},[(0,s.bF)(ot,{icon:"fa-light fa-circle-check"})],8,K)),at.isOwnProfile&&"pending"===t.type&&t.code?((0,s.uX)(),(0,s.CE)("button",{key:4,class:"invite-row-action",title:e.$t("delete"),"aria-label":e.$t("delete"),onClick:e=>at.confirmDeleteInvitation(t)},[(0,s.bF)(ot,{icon:"fa-light fa-trash"})],8,Y)):(0,s.Q3)("",!0)]))),128)),0===at.filteredInvitations.length?((0,s.uX)(),(0,s.CE)("p",Z,(0,a.v_)(e.$t("No invitations found")),1)):(0,s.Q3)("",!0)]),at.hasMoreInvitations?((0,s.uX)(),(0,s.CE)("div",ee,[(0,s.Lk)("button",{class:"button is-small is-rounded is-light",onClick:t[9]||(t[9]=(...e)=>at.showMoreInvitations&&at.showMoreInvitations(...e))},(0,a.v_)(e.$t("Show more")),1)])):(0,s.Q3)("",!0)],64)):st.pendingInvitationsLoading?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",te,[(0,s.Lk)("span",ie,[(0,s.bF)(ot,{icon:"fa-light fa-paper-plane"})]),(0,s.Lk)("p",se,(0,a.v_)(e.$t("No invitations yet")),1),(0,s.Lk)("p",ae,(0,a.v_)(e.$t("Share with friends")),1)]))]),(0,s.Lk)("p",ne,(0,a.v_)(e.$t("Invitations expire after 30 days")),1)],2)):(0,s.Q3)("",!0),!i.onlyInvitations&&e.tenant.settingFeatures.referral.isActive?((0,s.uX)(),(0,s.CE)("div",oe,["ACTIVE"===st.currentUser.status&&e.isGranted("HR_LOCAL",st.currentUser.localCenter)?((0,s.uX)(),(0,s.CE)("div",le,[(0,s.Lk)("div",re,[(0,s.Lk)("span",de,[(0,s.bF)(ot,{icon:"fa-light fa-user-plus"})]),(0,s.Lk)("h3",ce,(0,a.v_)(e.$t("Choose person waiting for referral")),1)]),(0,s.Lk)("div",ue,[st.referredUser?((0,s.uX)(),(0,s.CE)("span",fe,[(0,s.Lk)("span",null,[(0,s.bF)(dt,{to:{name:"UserShow",params:{item:st.referredUser.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(st.referredUser.fullName),1)]),_:1},8,["to"])]),(0,s.Lk)("span",{class:"icon is-small ml-2 is-clickable",onClick:t[11]||(t[11]=(...e)=>at.clearReferredUser&&at.clearReferredUser(...e))},[(0,s.bF)(ot,{icon:"fa-light fa-xmark"})])])):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.bF)(ct,{modelValue:st.referredUser,"onUpdate:modelValue":[t[10]||(t[10]=e=>st.referredUser=e),at.setReferredUser],"exclude-current-user":!0,"only-awaiting-referral-status":!0,"show-local-center-filter-option":!1,label:e.$t("Search member")},null,8,["modelValue","label","onUpdate:modelValue"]),st.awaitingReferralUsers.length>0?((0,s.uX)(),(0,s.CE)("div",me,[(0,s.Lk)("p",pe,(0,a.v_)(e.$t("Latest awaiting referrals"))+":",1),(0,s.Lk)("div",he,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(st.awaitingReferralUsers,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.id,class:"button is-small is-rounded is-light",onClick:t=>at.setReferredUser(e)},(0,a.v_)(e.fullName),9,ge))),128))])])):(0,s.Q3)("",!0)],64))]),(0,s.bF)(ut,{label:e.tenant.settingForms.referral?.question1,class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(lt,{modelValue:st.answer1,"onUpdate:modelValue":t[12]||(t[12]=e=>st.answer1=e),type:"textarea",required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(ut,{label:e.tenant.settingForms.referral?.question2,class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(lt,{modelValue:st.answer2,"onUpdate:modelValue":t[13]||(t[13]=e=>st.answer2=e),type:"textarea",required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.bF)(ut,{label:e.tenant.settingForms.referral?.question3,class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(lt,{modelValue:st.answer3,"onUpdate:modelValue":t[14]||(t[14]=e=>st.answer3=e),type:"textarea",required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,s.Lk)("button",{class:"button is-primary is-rounded is-small mt-4",disabled:!st.answer1||!st.answer2||!st.answer3||!st.referredUser||!st.referralItemIri||st.isLoading,onClick:t[15]||(t[15]=(...e)=>at.createReferralUser&&at.createReferralUser(...e))},(0,a.v_)(e.$t("Submit referral")),9,be)])):(0,s.Q3)("",!0),(0,s.Lk)("div",ye,[(0,s.Lk)("div",ve,[(0,s.Lk)("span",ke,[(0,s.bF)(ot,{icon:"fa-light fa-arrow-down"})]),(0,s.Lk)("h3",Ce,(0,a.v_)(e.$t("Referred by")),1)]),st.referralsReceived?.length?((0,s.uX)(),(0,s.CE)("div",Le,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(st.referralsReceived,(t,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.id||i},[(0,s.Lk)("div",we,[(0,s.Lk)("div",_e,[(0,s.bF)(rt,{item:t.user,"is-type":"roundSmall"},null,8,["item"]),(0,s.bF)(dt,{to:{name:"UserShow",params:{item:t.user.id}},class:"has-text-weight-semibold"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(t.user.firstName+" "+t.user.lastName),1)]),_:2},1032,["to"])]),(0,s.Lk)("div",Ee,[e.tenant.settingForms.referral?.question1?((0,s.uX)(),(0,s.CE)("div",$e,[(0,s.Lk)("p",Fe,(0,a.v_)(e.tenant.settingForms.referral.question1),1),(0,s.Lk)("div",Te,(0,a.v_)(t.answer1),1)])):(0,s.Q3)("",!0),e.tenant.settingForms.referral?.question2?((0,s.uX)(),(0,s.CE)("div",Se,[(0,s.Lk)("p",Ae,(0,a.v_)(e.tenant.settingForms.referral.question2),1),(0,s.Lk)("div",Pe,(0,a.v_)(t.answer2),1)])):(0,s.Q3)("",!0),e.tenant.settingForms.referral?.question3?((0,s.uX)(),(0,s.CE)("div",Ie,[(0,s.Lk)("p",Me,(0,a.v_)(e.tenant.settingForms.referral.question3),1),(0,s.Lk)("div",xe,(0,a.v_)(t.answer3),1)])):(0,s.Q3)("",!0)])]),st.referralsReceived.length>1&&i!==st.referralsReceived.length-1?((0,s.uX)(),(0,s.CE)("hr",Ne)):(0,s.Q3)("",!0)],64))),128))])):null!=st.referralsReceived?((0,s.uX)(),(0,s.CE)("p",Ue,(0,a.v_)("*"+e.$t("No referrals received at this time")),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",De,[(0,s.Lk)("div",Xe,[(0,s.Lk)("span",Ve,[(0,s.bF)(ot,{icon:"fa-light fa-arrow-up"})]),(0,s.Lk)("h3",Re,(0,a.v_)(e.$t("Referrals given")),1)]),st.referralsGiven?.length?((0,s.uX)(),(0,s.CE)("div",Oe,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(st.referralsGiven,(t,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.id||i},[(0,s.Lk)("div",Qe,[(0,s.Lk)("div",Be,[(0,s.bF)(rt,{item:t.referral.user,"is-type":"roundSmall"},null,8,["item"]),(0,s.bF)(dt,{to:{name:"UserShow",params:{item:t.referral.user.id}},class:"has-text-weight-semibold"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(t.referral.user.firstName+" "+t.referral.user.lastName),1)]),_:2},1032,["to"])]),(0,s.Lk)("div",Ge,[e.tenant.settingForms.referral?.question1?((0,s.uX)(),(0,s.CE)("div",We,[(0,s.Lk)("p",je,(0,a.v_)(e.tenant.settingForms.referral.question1),1),(0,s.Lk)("div",ze,(0,a.v_)(t.answer1),1)])):(0,s.Q3)("",!0),e.tenant.settingForms.referral?.question2?((0,s.uX)(),(0,s.CE)("div",qe,[(0,s.Lk)("p",Je,(0,a.v_)(e.tenant.settingForms.referral.question2),1),(0,s.Lk)("div",He,(0,a.v_)(t.answer2),1)])):(0,s.Q3)("",!0),e.tenant.settingForms.referral?.question3?((0,s.uX)(),(0,s.CE)("div",Ke,[(0,s.Lk)("p",Ye,(0,a.v_)(e.tenant.settingForms.referral.question3),1),(0,s.Lk)("div",Ze,(0,a.v_)(t.answer3),1)])):(0,s.Q3)("",!0)])]),st.referralsGiven.length>1&&i!==st.referralsGiven.length-1?((0,s.uX)(),(0,s.CE)("hr",et)):(0,s.Q3)("",!0)],64))),128))])):null!==st.referralsGiven?((0,s.uX)(),(0,s.CE)("p",tt,(0,a.v_)(e.$t("No referrals given at this time")),1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)}i(44114),i(18111),i(22489),i(7588),i(61701);var st=i(40834),at=i(31823),nt=i(95439),ot=i(95256),lt=i(28994);const rt=10,dt=20;var ct={name:"ProfileReferralTab",components:{LogoThumbnail:at.A,UserSearchAutocomplete:nt.A},mixins:[lt.A],props:["givenUser","onlyInvitations"],data(){return{isLoading:!1,currentUser:null,referralsGiven:null,referralsReceived:null,referredUser:null,referralItemIri:null,answer1:"",answer2:"",answer3:"",awaitingReferralUsers:[],directReferrals:null,dataLoaded:!1,localCenter:!1,inv
1iteContent:null,pendingInvitations:[],pendingInvitationsLoading:!1,linkCopied:!1,emailChips:[],emailInputValue:"",sendSuccess:!1,activeInvitationTab:"all",activeInviteTab:"link",invitationSearch:"",visibleInvitationCount:rt,canNativeShare:"undefined"!==typeof navigator&&"function"===typeof navigator.share,SEARCH_THRESHOLD:dt}},computed:{...(0,st.L8)(["user","isGranted","tenant"]),isInviteModeEnabled(){return this.tenant.settingFeatures.users.hasUserInvitation&&this.isGranted(this.tenant.settingFeatures.users.whoCanSendUserInvitation)},isOwnProfile(){return!this.givenUser||this.givenUser.id===this.user?.id},invitationUrl(){if(!this.user||!this.tenant)return"";const e=window.location.protocol,t=this.tenant.appHost,i="app.orgo.space"===t?`?workspace=${this.tenant.slug}`:"";return`${e}//${t}/register/${this.user.id}${i}`},invitationUrlDisplay(){return this.invitationUrl.replace(/^https?:\/\//,"")},inviteChannels(){return[{id:"link",label:this.$t("Link"),icon:"fa-light fa-share-nodes"},{id:"email",label:this.$t("Invite by email"),icon:"fa-light fa-envelope"}]},shareChannels(){return[{id:"whatsapp",label:"WhatsApp",icon:"fa-brands fa-whatsapp"},{id:"email",label:"Email",icon:"fa-light fa-envelope"},{id:"messenger",label:"Messenger",icon:"fa-brands fa-facebook-messenger"}]},invitationStats(){const e=this.pendingInvitations?this.pendingInvitations.length:0,t=this.directReferrals?this.directReferrals.length:0;return{sent:e+t,joined:t,pending:e}},conversionRate(){return 0===this.invitationStats.sent?0:Math.round(this.invitationStats.joined/this.invitationStats.sent*100)},circumference(){return 2*Math.PI*24},circumferenceOffset(){return this.circumference-this.conversionRate/100*this.circumference},invitationTabs(){return[{id:"all",label:this.$t("All"),count:this.allInvitations.length},{id:"joined",label:this.$t("Joined"),count:this.invitationStats.joined},{id:"pending",label:this.$t("Pending"),count:this.invitationStats.pending}]},allInvitations(){const e=[];return this.directReferrals&&this.directReferrals.forEach(t=>{e.push({type:"joined",displayName:t.user.fullName,email:null,user:t.user,date:t.dateCreated||null,dateFormatted:t.dateCreated?this.$filters.format(t.dateCreated):"",code:null,id:t.id})}),this.pendingInvitations&&this.pendingInvitations.forEach(t=>{e.push({type:"pending",displayName:null,email:t.email,user:null,date:t.invitationDate||null,dateFormatted:t.invitationDate?this.$filters.format(t.invitationDate):"",code:t.code,localCenter:t.localCenter,id:t.code})}),e.sort((e,t)=>new Date(t.date||0)-new Date(e.date||0))},filteredInvitations(){let e=this.allInvitations;"all"!==this.activeInvitationTab&&(e=e.filter(e=>e.type===this.activeInvitationTab));const t=this.invitationSearch.trim().toLowerCase();return t&&(e=e.filter(e=>`${e.displayName||""} ${e.email||""}`.toLowerCase().includes(t))),e},hasMoreInvitations(){return this.filteredInvitations.length>this.visibleInvitationCount},visibleInvitations(){return this.filteredInvitations.slice(0,this.visibleInvitationCount)}},mounted(){this.currentUser=this.givenUser||this.user,this.onlyInvitations||(this.$route.query.localCenter&&this.user.localCenter&&this.isGranted("ADMIN_LOCAL")?(this.localCenter=!0,this.$store.commit("setCurrentGroup",this.user.localCenter)):this.$store.commit("setCurrentGroup","generalUnit")),this.loadReferralData()},methods:{loadReferralData(){this.dataLoaded||(this.dataLoaded=!0,!this.onlyInvitations&&this.tenant.settingFeatures.referral?.isActive&&(this.retrieveAwaitingReferrals(),this.retrieveReferralsGiven(),this.retrieveReferralsTaken()),this.tenant.settingFeatures.users.hasUserInvitation&&(this.retrieveDirectReferrals(),this.loadPendingInvitations()))},handleCopyLink(){(0,ot.lW)(this.invitationUrl),this.linkCopied=!0,this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-info",duration:500,actionText:null}),setTimeout(()=>{this.linkCopied=!1},2500)},shareVia(e){const t=this.$t("Join our community")+": "+this.invitationUrl;let i="";"whatsapp"===e?i="https://wa.me/?text="+encodeURIComponent(t):"email"===e?i="mailto:?subject="+encodeURIComponent(this.$t("Invitation"))+"&body="+encodeURIComponent(t):"messenger"===e&&(i="https://www.facebook.com/dialog/send?link="+encodeURIComponent(this.invitationUrl)+"&app_id=0&redirect_uri="+encodeURIComponent(window.location.href)),i&&window.open(i,"_blank")},shareNative(){this.canNativeShare&&navigator.share({title:this.$t("Invitation"),text:this.$t("Join our community"),url:this.invitationUrl}).catch(e=>{console.log(e)})},selectInvitationTab(e){this.activeInvitationTab=e,this.resetInvitationPaging(
1)},resetInvitationPaging(){this.visibleInvitationCount=rt},showMoreInvitations(){this.visibleInvitationCount+=rt},clearInvitationSearch(){this.invitationSearch="",this.resetInvitationPaging()},focusEmailInput(){this.$refs.emailInput?.focus()},handleEmailKeyDown(e){if(("Enter"===e.key||","===e.key||" "===e.key)&&this.emailInputValue.trim()){e.preventDefault();const t=this.emailInputValue.trim().replace(/,/g,"");t&&t.includes("@")&&!this.emailChips.includes(t)&&this.emailChips.length<20&&(this.emailChips.push(t),this.emailInputValue="")}"Backspace"===e.key&&!this.emailInputValue&&this.emailChips.length>0&&this.emailChips.pop()},removeEmailChip(e){this.emailChips.splice(e,1)},getInitials(e){return e?e.split(/[\s@]/).filter(Boolean).map(e=>e[0]).join("").substring(0,2).toUpperCase():"?"},save(){let e="";if(this.emailChips.length>0?e=this.emailChips.join(","):this.inviteContent&&this.inviteContent.trim()&&(e=this.inviteContent.trim()),!e)return;let t=e.split(",");if(t.length>20)this.$store.commit("setError",this.$t("invitationTooManyEmails"));else{let t={content:e};t.localCenter=this.localCenter,this.$http.plain.post("/send-email-invitation",t).then(e=>this.saveSuccess(e)).catch(e=>{console.error(e)})}},saveSuccess(e){this.sendSuccess=!0;const t=e.data,i=t.alreadyInvited||[],s=t.sent||[];if(s.length>0){const e=(new Date).toISOString();this.pendingInvitations=[...s.map(t=>({email:t,code:null,invitationDate:e,localCenter:null})),...this.pendingInvitations],this.activeInvitationTab="all",this.resetInvitationPaging()}i.length>0&&0===s.length?this.$buefy.snackbar.open({message:this.$t("invitationAlreadyInvited",{emails:i.join(", ")}),type:"is-warning"}):i.length>0&&s.length>0?this.$buefy.snackbar.open({message:this.$t("invitationPartiallySent",{emails:i.join(", ")}),type:"is-warning"}):this.$buefy.snackbar.open({message:this.$t("invitationSuccessfully")}),setTimeout(()=>{this.sendSuccess=!1,this.emailChips=[],this.inviteContent=null},3e3),this.loadPendingInvitations()},refreshInvitations(){this.loadPendingInvitations(),this.retrieveDirectReferrals()},loadPendingInvitations(){let e="/get-pending-invitations/"+this.currentUser.id+(this.localCenter?"?localCenter":"");this.pendingInvitationsLoading=!0,this.$http.plain.get(e).then(e=>{this.pendingInvitations=e.data}).catch(e=>{console.error(e)}).finally(()=>this.pendingInvitationsLoading=!1)},confirmDeleteInvitation(e){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" <b>"+e.email+"</b> ?",confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.revokeInvitation(e.code)})},revokeInvitation(e){this.pendingInvitationsLoading=!0,this.$http.plain.delete("/revoke-invitation/"+e).then(()=>this.loadPendingInvitations()).catch(e=>{console.error(e)}).finally(()=>{this.pendingInvitationsLoading=!1})},setReferredUser(e){this.referredUser=e,this.getReferralIdForUser()},clearReferredUser(){this.referredUser=null,this.referralItemIri=null},retrieveAwaitingReferrals(){this.$http.plain.get("/users?status=AWAITING_REFERRAL&itemsPerPage=10&order[id]=desc").then(e=>{this.awaitingReferralUsers=e.data["hydra:member"]}).catch(e=>{console.log(e)})},retrieveReferralsGiven(){this.isLoading=!0,this.$http.plain.get(`/referral_users?user=${this.currentUser.id}`).then(e=>{this.referralsGiven=e.data["hydra:member"]}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},retrieveReferralsTaken(){this.isLoading=!0,this.$http.plain.get(`/referral_users?referral.user=${this.currentUser.id}`).then(e=>{this.referralsReceived=e.data["hydra:member"]}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},getReferralIdForUser(){this.isLoading=!0,this.$http.plain.get(`/referrals?user=${this.referredUser.id}`).then(e=>{e.data["hydra:member"].length>0?this.referralItemIri=e.data["hydra:member"][0]["@id"]:(this.$buefy.toast.open({message:this.$t("No referral found"),duration:5e3,type:"is-danger"}),this.clearReferredUser())}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},createReferralUser(){if(this.isLoading=!0,!this.referralItemIri)return this.$buefy.toast.o
1pen({message:this.$t("Invalid Referral"),type:"is-danger",duration:5e3}),void(this.isLoading=!1);this.$http.plain.post("/referral_users",{user:this.currentUser["@id"],answer1:this.answer1,answer2:this.answer2,answer3:this.answer3,referral:this.referralItemIri}).then(e=>{this.referralsGiven.push(e.data),this.$buefy.toast.open({type:"is-success",duration:2e3,message:this.$t("updatedSuccessfully")}),this.referralsReceived=null,this.answer1="",this.answer2="",this.answer3="",this.referralItemIri=null,this.referredUser=null}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},retrieveDirectReferrals(){this.isLoading=!0,this.$http.plain.get(`/referrals?status=SUCCESS&referrer=${this.currentUser.id}`).then(e=>{this.directReferrals=e.data["hydra:member"]}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})}}},ut=i(66262);const mt=(0,ut.A)(ct,[["render",it],["__scopeId","data-v-2b621fc2"]]);var pt=mt},48431:function(e,t,i){"use strict";i.d(t,{A:function(){return O}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"custom-field-widget"},l={key:0,class:"is-flex is-align-items-center is-flex-wrap-wrap mb-2"},r={class:"label mb-0"},d={value:null},c=["value"],u={key:6},m={key:0,class:"box p-4 mb-4 custom-field-file-preview"},p={class:"is-flex is-align-items-center file-info-left"},h={class:"icon is-medium mr-3"},g={class:"file-name-container"},f={class:"has-text-weight-semibold file-name-text"},b={class:"is-size-7 has-text-grey"},y={class:"section"},v={class:"content has-text-centered"},k={class:"icon is-large"},C={key:0,class:"is-size-7 has-text-grey"},L={key:1,class:"is-size-7 has-text-grey"},w={key:1},_={key:2,class:"is-size-6-half is-italic"},E={class:"file-preview-content"},$={key:0,class:"has-text-centered is-fullwidth"},F=["src"],T=["src"],S=["data"],A={class:"is-flex is-align-items-center is-justify-content-center is-flex-direction-column"},P=["href"],I={key:3,class:"is-flex is-flex-direction-column is-align-items-center is-justify-content-center",style:{"min-height":"300px"}},M={class:"icon is-large mb-4"},x={class:"is-size-5 mb-4"},N={class:"mb-4"};function U(e,t,i,U,D,X){const V=(0,s.g2)("b-button"),R=(0,s.g2)("b-input"),O=(0,s.g2)("b-radio"),Q=(0,s.g2)("b-field"),B=(0,s.g2)("b-select"),G=(0,s.g2)("b-datepicker"),W=(0,s.g2)("b-switch"),j=(0,s.g2)("font-awesome-icon"),z=(0,s.g2)("b-upload"),q=(0,s.g2)("b-progress"),J=(0,s.g2)("b-checkbox"),H=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.CE)("div",o,["file"===i.field.fieldType&&X.fieldLabel?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("span",r,(0,a.v_)(X.fieldLabel),1),i.field.exampleMedia&&i.field.exampleMedia.downloadUrl?((0,s.uX)(),(0,s.Wv)(V,{key:0,tag:"a",href:i.field.exampleMedia.downloadUrl,type:"is-ghost",size:"is-small","icon-left":"fa-download",class:"ml-2 has-text-link"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Download example file")),1)]),_:1},8,["href"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.bF)(Q,{class:(0,a.C4)(i.isRequired?"required":""),label:"file"===i.field.fieldType?null:X.fieldLabel},{default:(0,s.k6)(()=>["input"===i.field.fieldType||"number"===i.field.fieldType?((0,s.uX)(),(0,s.Wv)(R,{key:0,id:"cf_"+i.field.id,ref:"custom_field_"+i.field.id,modelValue:D.fieldValue,"onUpdate:modelValue":[t[0]||(t[0]=e=>D.fieldValue=e),X.change],disabled:i.disabled,autocomplete:"off",type:"number"===i.field.fieldType?"number":"text",style:(0,a.Tr)("number"===i.field.fieldType?"width: 160px;":""),required:i.isRequired,rounded:i.isFilter,expanded:i.isFilter,size:i.isFilter?"is-small":""},null,8,["id","modelValue","disabled","type","style","required","rounded","expanded","size","onUpdate:modelValue"])):(0,s.Q3)("",!0),"textarea"===i.field.fieldType?((0,s.uX)(),(0,s.Wv)(R,{key:1,id:"cf_"+i.field.id,ref:"custom_field_"+i.field.id,modelValue:D.fieldValue,"onUpdate:modelValue":[t[1]||(t[1]=e=>D.fieldValue=e),X.change],required:i.isRequired,disabled:i.disabled,size:i.isFilter?"is-small":"",type:"textarea"},null,8,["id","modelValue","required","disabled","size","onUpdate:modelValue"])):(0,s.Q3)("",!0),"radio"===i.field.fieldType?((0,s.uX)(),(0,s.Wv)(Q,{key:2,grouped:"","group-multiline":""},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.field.fieldOptions.options,
1(e,n)=>((0,s.uX)(),(0,s.Wv)(O,{id:"cf_"+i.field.id+"_"+n,key:n,modelValue:D.fieldValue,"onUpdate:modelValue":[t[2]||(t[2]=e=>D.fieldValue=e),X.change],class:"field mr-4 mt-3","native-value":n,name:i.field.name,disabled:i.disabled,size:i.isFilter?"is-small":"",required:i.isRequired},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e),1)]),_:2},1032,["id","modelValue","native-value","name","disabled","size","required","onUpdate:modelValue"]))),128))]),_:1})):(0,s.Q3)("",!0),"dropdown"===i.field.fieldType?((0,s.uX)(),(0,s.Wv)(B,{key:3,id:"cf_"+i.field.id,modelValue:D.fieldValue,"onUpdate:modelValue":[t[3]||(t[3]=e=>D.fieldValue=e),X.change],required:i.isRequired,disabled:i.disabled,rounded:i.isFilter,expanded:i.isFilter,size:i.isFilter?"is-small":""},{default:(0,s.k6)(()=>[(0,s.Lk)("option",d,(0,a.v_)(i.showPlaceholder?e.$t(X.placeholder):"..."),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.field.fieldOptions?.options,(e,t)=>((0,s.uX)(),(0,s.CE)("option",{key:t,value:t},(0,a.v_)(e),9,c))),128))]),_:1},8,["id","modelValue","required","disabled","rounded","expanded","size","onUpdate:modelValue"])):(0,s.Q3)("",!0),"date"===i.field.fieldType?((0,s.uX)(),(0,s.Wv)(G,{key:4,id:"cf_"+i.field.id,modelValue:D.fieldValue,"onUpdate:modelValue":[t[4]||(t[4]=e=>D.fieldValue=e),X.change],required:i.isRequired,disabled:i.disabled,icon:"fa-calendar",size:i.isFilter?"is-small":"",placeholder:"Click to select"},null,8,["id","modelValue","required","disabled","size","onUpdate:modelValue"])):(0,s.Q3)("",!0),"boolean"===i.field.fieldType?((0,s.uX)(),(0,s.Wv)(W,{key:5,modelValue:D.fieldValue,"onUpdate:modelValue":[t[5]||(t[5]=e=>D.fieldValue=e),X.change],disabled:i.disabled,size:i.isFilter?"is-small":""},null,8,["modelValue","disabled","size","onUpdate:modelValue"])):(0,s.Q3)("",!0),"file"===i.field.fieldType?((0,s.uX)(),(0,s.CE)("div",u,[D.fileData?((0,s.uX)(),(0,s.CE)("div",m,[(0,s.Lk)("div",{class:(0,a.C4)(["is-flex is-align-items-center is-justify-content-space-between custom-field-file-info",{"is-clickable":!0}]),onClick:t[6]||(t[6]=(...e)=>X.openPreviewModal&&X.openPreviewModal(...e))},[(0,s.Lk)("div",p,[(0,s.Lk)("span",h,[(0,s.bF)(j,{icon:X.getFileIcon(D.fileData.mimeType),size:"lg"},null,8,["icon"])]),(0,s.Lk)("div",g,[(0,s.Lk)("p",f,(0,a.v_)(D.fileData.originalName),1),(0,s.Lk)("p",b,(0,a.v_)(X.formatFileSize(D.fileData.size)),1)])]),i.disabled?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(V,{key:0,size:"is-small","icon-left":"fa-trash",class:"is-rounded ml-2",onClick:(0,n.D$)(X.removeFile,["stop"])},null,8,["onClick"]))])])):(0,s.Q3)("",!0),D.fileData||i.disabled?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(z,{key:1,modelValue:D.uploadFile,"onUpdate:modelValue":[t[7]||(t[7]=e=>D.uploadFile=e),X.handleFileSelect],accept:i.field.fileConfig?.accept,loading:D.isUploading,"drag-drop":"",expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("section",y,[(0,s.Lk)("div",v,[(0,s.Lk)("p",null,[(0,s.Lk)("span",k,[(0,s.bF)(j,{icon:"fa-light fa-cloud-arrow-up",size:"2x"})])]),(0,s.Lk)("p",null,(0,a.v_)(e.$t("Drop your file here or click to upload")),1),i.field.fileConfig?((0,s.uX)(),(0,s.CE)("p",C,(0,a.v_)(X.getAllowedFormatsText()),1)):(0,s.Q3)("",!0),i.field.fileConfig?((0,s.uX)(),(0,s.CE)("p",L,(0,a.v_)(e.$t("Max size"))+": "+(0,a.v_)(X.formatFileSize(i.field.fileConfig.maxSize)),1)):(0,s.Q3)("",!0)])])]),_:1},8,["modelValue","accept","loading","onUpdate:modelValue"])),D.isUploading?((0,s.uX)(),(0,s.Wv)(q,{key:2,value:D.uploadProgress,"show-value":"",type:"is-primary",class:"mt-3"},null,8,["value"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),_:1},8,["class","label"]),"checkboxes"===i.field.fieldType?((0,s.uX)(),(0,s.CE)("section",w,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.field.fieldOptions.options,(e,n)=>((0,s.uX)(),(0,s.Wv)(Q,{key:"field_"+i.field.id+"_"+n,class:"mt-3"},{default:(0,s.k6)(()=>[(0,s.bF)(J,{id:"cf_"+i.field.id+"_"+n,modelValue:D.fieldValue,"onUpdate:modelValue":[t[8]||(t[8]=e=>D.fieldValue=e),X.change],"native-value":n,disabled:i.disabled,size:i.isFilter?"is-small":""},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e),1)]),_:2},1032,["id","modelValue","native-value","disabled","size","onUpdate:modelValue"])]),_:2},1024))),128))])):(0,s.Q3)("",!0),"textarea"===i.field.fieldType&&i.field.fieldOptions&&void 0!==i.field.fieldOptions.minLength?((0,s.uX)(),(0,s.CE)("p",_,(0,a.v_)(e.$t("Minimum characters")+", "+i.field.fieldOptions.minLength),1)):(0,s.Q3)("",!0),(0,s.bF)(H,{modelValue:D.isPreviewModalActive,"onUpdate:modelValue":t[14]||(t[14]=e=>D.isPreviewModalActive=e),"can-cancel":["escape","outside","x"],width:X.isPdfFile(D.fileData?.mimeType)?"98vw":"90vw",class:"file-preview-modal"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["file-preview-container",{"pdf-preview":D.fileData&&X.isPdfFile(D.fileData.mimeType)}]),onClick:t[13]||(t[13]=e=>D.isPreviewModalActive=!1)},[(0,s.Lk)("button",{class:"modal-close is-large",onClick:t[9]||(t[9]=e=>D.isPreviewModalActive=!1)}),(0,s.Lk)("div",E,[D.fileData?((0,s.uX)(),(0,s.CE)("div",$,[X.isImageFile(D.fileData.mimeType)?((0,s.uX)(),(0,s.CE)("img",{key:0,src:X.getFileUrl(),class:"preview-modal-image",style:{"max-height":"80vh","max-width":"100%",cursor:"pointer"}
1,onClick:t[10]||(t[10]=e=>D.isPreviewModalActive=!1)},null,8,F)):X.isVideoFile(D.fileData.mimeType)?((0,s.uX)(),(0,s.CE)("video",{key:1,src:X.getFileUrl(),controls:"",class:"preview-modal-video",style:{"max-height":"80vh","max-width":"100%"},onClick:t[11]||(t[11]=(0,n.D$)(()=>{},["stop"]))},null,8,T)):X.isPdfFile(D.fileData.mimeType)?((0,s.uX)(),(0,s.CE)("object",{key:2,data:X.getFileUrl(),type:"application/pdf",style:{width:"100%",height:"90vh"},onClick:t[12]||(t[12]=(0,n.D$)(()=>{},["stop"]))},[(0,s.Lk)("p",A,[(0,s.eW)((0,a.v_)(e.$t("pdfNotSupported"))+" ",1),(0,s.Lk)("a",{href:X.getFileUrl(),target:"_blank"},(0,a.v_)(e.$t("openPdf")),9,P)])],8,S)):((0,s.uX)(),(0,s.CE)("div",I,[(0,s.Lk)("span",M,[(0,s.bF)(j,{icon:X.getFileIcon(D.fileData.mimeType),size:"3x"},null,8,["icon"])]),(0,s.Lk)("h1",x,(0,a.v_)(D.fileData.originalName),1),(0,s.Lk)("p",N,(0,a.v_)(e.$t("notPreviewable")),1),(0,s.bF)(V,{type:"is-primary",class:"is-rounded",tag:"a",href:X.getFileUrl(),target:"_blank",download:""},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("downloadDocument")),1)]),_:1},8,["href"])]))])):(0,s.Q3)("",!0)])],2)]),_:1},8,["modelValue","width"])])}i(18111),i(22489),i(20116),i(7588),i(61701),i(14603),i(47566),i(98721);var D=i(40834),X={props:["field","initValue","customFieldValues","isAdmin","isRequired","disabled","hideFieldLabel","showPlaceholder","isFilter","hideVisibilityHint"],data(){let e=null;return"checkboxes"===this.field.fieldType&&(e=[]),{fieldValue:e,uploadFile:null,fileData:null,isUploading:!1,uploadProgress:0,isPreviewModalActive:!1,pendingFile:null,blobUrl:null}},watch:{customFieldValues:function(){this.customFieldValues&&0!==this.customFieldValues.length&&this.initCustomFieldValue()}},mounted(){this.change()},created(){this.initCustomFieldValue()},beforeUnmount(){this.blobUrl&&URL.revokeObjectURL(this.blobUrl)},methods:{change(){this.$emit("update:modelValue",this.fieldValue)},handleFileSelect(e){if(!e)return;const t=this.field.fileConfig?.maxSize||52428800;if(e.size>t)return this.$buefy.toast.open({message:this.$t("File size exceeds maximum allowed")+`: ${this.formatFileSize(t)}`,type:"is-danger",duration:5e3}),void(this.uploadFile=null);const i=this.field.fileConfig?.accept?.split(",")||[];if(i.length>0&&!i.includes(e.type))return this.$buefy.toast.open({message:this.$t("File type not allowed"),type:"is-danger",duration:5e3}),void(this.uploadFile=null);this.blobUrl&&URL.revokeObjectURL(this.blobUrl),this.pendingFile=e,this.blobUrl=URL.createObjectURL(e),this.fileData={originalName:e.name,mimeType:e.type,size:e.size,isPending:!0},this.fieldValue="PENDING_UPLOAD",this.$emit("pending-upload",{fieldId:this.field.id,upload:()=>this.uploadPendingFile()}),this.change(),this.uploadFile=null},async uploadPendingFile(){if(!this.pendingFile)return;const e=this.pendingFile,t=e.type,i=e.size,s=e.name;return this.isUploading=!0,this.uploadProgress=0,this.$http.plain.get("/s3-upload",{params:{type:"customfield",fileType:t,fileName:s}}).then(i=>{const{additionalData:s,newFileName:a,attributes:n}=i.data,o=new FormData;return Object.keys(s).forEach(e=>{o.append(e,s[e])}),o.append("Content-Type",t),o.append("file",e,a),fetch(n.action,{method:"POST",body:o}).then(e=>{if(200!==e.status&&204!==e.status)throw new Error("S3 upload failed");return a})}).then(e=>this.$http.plain.post("/medias",{contentUrl:e,mimeType:t,type:"customfield",size:i})).then(e=>{const t=e.data;this.blobUrl&&(URL.revokeObjectURL(this.blobUrl),this.blobUrl=null),this.fileData={id:t.id,contentUrl:t.contentUrl,originalName:t.originalName||s,mimeType:t.mimeType,size:t.size},this.fieldValue=t.id,this.pendingFile=null,this.change()}).catch(e=>{throw console.error(e),e}).finally(()=>{this.isUploading=!1,this.uploadProgress=0})},removeFile(){this.$buefy.dialog.confirm({message:this.$t("Are you sure you want to remove this file?"),cancelText:this.$t("cancel"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>{this.blobUrl&&(URL.revokeObjectURL(this.blobUrl),this.blobUrl=null),this.pendingFile=null,this.fileData=null,this.fieldValue=null,this.change()}})},formatFileSize(e){if(0===e)return"0 Bytes";const t=1024,i=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return Math.round(e/Math.pow(t,s)*100)/100+" "+i[s]},getFileIcon(e){return e?e.startsWith("image/")?"fa-light fa-file-image":e.startsWith("video/")?"fa-light fa-file-video":"application/pdf"===e?"fa-light fa-file-pdf":"fa-light fa-file":"fa-light fa-file"},getAllowedFormatsText(){if(!this.field.fileConfig?.allowedTypes)return"";const e={pdf:"PDF",image:this.$t("Images (PNG, JPG)"),video:this.$t("Videos (MP4, WebM)")},t=this.field.fileConfig.allowedTypes.map(t=>
1e[t]).filter(Boolean);return this.$t("Allowed formats")+": "+t.join(", ")},isImageFile(e){return e&&e.startsWith("image/")},isVideoFile(e){return e&&e.startsWith("video/")},isPdfFile(e){return"application/pdf"===e},getFileUrl(){return this.fileData?.isPending&&this.blobUrl?this.blobUrl:this.fileData?.contentUrl||""},openPreviewModal(){this.isPreviewModalActive=!0},initCustomFieldValue(){if(this.initValue)return void(this.fieldValue=this.initValue);let e=this.field;if(void 0===this.customFieldValues)return;let t=this.customFieldValues,i=t.find(t=>{if(t)return"object"===typeof t.field&&void 0!==t.field["@id"]?t.field["@id"]===e["@id"]:t.field===e["@id"]}),s=null;void 0!==i?(s=i.value,"checkboxes"===e.fieldType&&(s=JSON.parse(s),s||(s=[])),"date"===e.fieldType&&(s=new Date(s)),"boolean"===e.fieldType&&(s="1"===s||!0===s),"file"===e.fieldType&&(i.media?(this.fileData={id:i.media.id,contentUrl:i.media.contentUrl,originalName:i.media.originalName,mimeType:i.media.mimeType,size:i.media.size},s=i.media.id):this.fileData=null)):"checkboxes"===e.fieldType&&(s=[]),"checkboxes"!==e.fieldType||Array.isArray(s)||(console.warn("Checkbox field value was not an array, fixing:",s),s=[]),this.fieldValue=s,this.change()}},computed:{...(0,D.L8)(["tenant","user"]),fieldLabel(){return this.hideFieldLabel?null:this.label},placeholder(){return this.showPlaceholder?this.label:null},label(){if(this.hideVisibilityHint)return this.field.name;const e=this.field.visibility||"public";return"admin"===e?this.field.name+" ("+this.$t("admin only")+")":"user"===e?this.field.name+" ("+this.$t("user only")+")":this.field.name}},components:{}},V=i(66262);const R=(0,V.A)(X,[["render",U]]);var O=R},49282:function(e,t,i){"use strict";i.d(t,{A:function(){return E}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"speaker-card-content"},l={class:"speaker-left"},r={class:"speaker-avatar"},d={class:"speaker-info"},c={class:"speaker-name-row"},u={class:"speaker-name has-text-link has-text-weight-semibold"},m={key:0,class:"speaker-headline is-size-7 has-text-grey"},p={key:0,class:"speaker-right"},h={class:"speaker-actions"},g=["disabled","title"],f={class:"icon is-small"},b=["disabled","title"],y={class:"icon is-small"};function v(e,t,i,v,k,C){const L=(0,s.g2)("LogoThumbnail"),w=(0,s.g2)("BioText"),_=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{class:"speaker-card card",onClick:t[2]||(t[2]=(...e)=>C.handleNameClick&&C.handleNameClick(...e))},[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("div",r,[C.speakerItem?((0,s.uX)(),(0,s.Wv)(L,{key:0,item:C.speakerItem,"is-type":"large"===i.size?"roundLarge":"roundXMedium"},null,8,["item","is-type"])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",d,[(0,s.Lk)("div",c,[(0,s.Lk)("a",u,(0,a.v_)(C.speakerName),1)]),C.speakerRoleAndCompany?((0,s.uX)(),(0,s.CE)("div",m,(0,a.v_)(C.speakerRoleAndCompany),1)):(0,s.Q3)("",!0),C.speakerBio&&i.showBio?((0,s.uX)(),(0,s.Wv)(w,{key:1,bio:C.speakerBio,class:"mt-2 is-size-7"},null,8,["bio"])):(0,s.Q3)("",!0)])]),i.isEditable?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("div",h,[(0,s.Lk)("button",{class:"button is-small is-rounded is-white",disabled:i.isLoading,title:e.$t("Edit"),onClick:t[0]||(t[0]=(0,n.D$)(t=>e.$emit("edit",i.speaker),["stop"]))},[(0,s.Lk)("span",f,[(0,s.bF)(_,{icon:"fa-light fa-pen"})])],8,g),(0,s.Lk)("button",{class:"button is-small is-rounded is-white",disabled:i.isLoading,title:e.$t("Delete"),onClick:t[1]||(t[1]=(0,n.D$)(t=>e.$emit("delete",i.speaker),["stop"]))},[(0,s.Lk)("span",y,[(0,s.bF)(_,{icon:"fa-light fa-trash"})])],8,b)])])):(0,s.Q3)("",!0)])])}var k=i(31823),C=i(60560),L={name:"EventSpeakerCard",components:{LogoThumbnail:k.A,BioText:C.A},props:{speaker:{type:Object,required:!0},isEditable:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:e=>["small","medium","large"].includes(e)},showBio:{type:Boolean,default:!0}},emits:["delete","edit","click"],computed:{speakerItem(){const e=this.speaker.user,t=this.speaker.contact;if(e&&"object"===typeof e&&e.firstName)return{...e,"@type":"User"};if(t&&"object"===typeof t&&t.name)return{...t,"@type":"Contact"};const i=this.speaker.speakerName||"",s=i.trim().split(/\s+/);let a=this.speaker.id;const n=e||t;if(n&&"object"===typeof n)a=n.id||this.speaker.id;else if(n&&"string"===typeof n){const e=n.match(/\/(\d+)$/);e&&(a=parseInt(e[1]))}return{id:a,logo:this.speaker.speakerLogo||null,firstName:s[0]||"",lastName:s.slice(1).join(" ")||"",fullName:i,"@type":e?"User":"Contact"}},speakerName(){return this.speaker.speakerName?this.speaker.speakerName:this.speaker.user&&"object"===typeof this.speaker.user?this.speaker.user.fullName||`${this.speaker.user.firstName} ${this.speaker.user.lastName}`:this.speaker.contact&&"object"===typeof this.speaker.contact?this.speaker.contact.name:""},speakerBio(){return this.speaker.speakerBio?this.speaker.speakerBio:this.speaker.user&&"object"===typeof this.speaker.user?this.speaker.user.bio:this.speaker.contact&&"object"===typeof this.speaker.contact?this.speaker.contact.bio:null},speakerRole(){const e=this.speaker.user;if(e&&"object"===typeof e&&e.professionHeadline)return e.professionHeadline;const t=this.speaker.contact;return t&&"object"===typeof t&&t.role?t.role:e||t||!this.speaker.speakerHeadline?null:this.speaker.speakerHeadline},speakerCompany(){const e=this.speaker.user;if(e&&"object"===typeof e&&e.professionOrganisation)return e.professionOrganisation;const t=this.speaker.contact;return t&&"object"===typeof t&&t.organisation?t.organisation:null},speakerRoleAndCompany(){return[this.speakerRole,this.speakerCompany].filter(
1Boolean).join(", ")}},methods:{handleNameClick(){this.$emit("click",this.speaker)}}},w=i(66262);const _=(0,w.A)(L,[["render",v],["__scopeId","data-v-1c2fd5e2"]]);var E=_},49958:function(e,t,i){"use strict";i.d(t,{A:function(){return m}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"otp-code-input"},l=["onUpdate:modelValue","onInput","onKeydown"];function r(e,t,i,r,d,c){return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",{class:(0,a.C4)(["otp-inputs-container",{"is-centered":i.centered}])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(d.digits,(e,o)=>(0,s.bo)(((0,s.uX)(),(0,s.CE)("input",{key:o,ref_for:!0,ref:"otpInput"+o,"onUpdate:modelValue":e=>d.digits[o]=e,type:"text",inputmode:"numeric",pattern:"[0-9]*",autocomplete:"one-time-code",class:(0,a.C4)(["otp-input",{"is-danger":i.hasError,"is-small":"small"===i.size}]),onInput:e=>c.handleInput(o,e),onKeydown:e=>c.handleKeydown(o,e),onPaste:t[0]||(t[0]=(...e)=>c.handlePaste&&c.handlePaste(...e)),onFocus:t[1]||(t[1]=e=>e.target.select())},null,42,l)),[[n.Jo,d.digits[o]]])),128))],2)])}var d={name:"OtpCodeInput",props:{modelValue:{type:String,default:""},hasError:{type:Boolean,default:!1},size:{type:String,default:"normal",validator:e=>["small","normal"].includes(e)},autoFocus:{type:Boolean,default:!0},centered:{type:Boolean,default:!0}},emits:["update:modelValue","complete"],data(){return{digits:["","","","","",""],completeEmitted:!1}},computed:{code(){return this.digits.join("")}},watch:{modelValue:{immediate:!0,handler(e){e!==this.code&&this.setCodeFromValue(e)}},code(e){this.$emit("update:modelValue",e),6!==e.length||this.completeEmitted?e.length<6&&(this.completeEmitted=!1):(this.completeEmitted=!0,this.$emit("complete",e))}},mounted(){this.autoFocus&&this.$nextTick(()=>{this.focusFirst()})},methods:{setCodeFromValue(e){if(!e)return void(this.digits=["","","","","",""]);const t=e.replace(/\D/g,"").slice(0,6);for(let i=0;i<6;i++)this.digits[i]=t[i]||""},focusFirst(){const e=this.$refs.otpInput0;e&&e[0]&&e[0].focus()},focusInput(e){const t=this.$refs["otpInput"+e];t&&t[0]&&t[0].focus()},clear(){this.digits=["","","","","",""],this.completeEmitted=!1,this.$nextTick(()=>{this.focusFirst()})},handleInput(e,t){const i=(t.target.value||"").replace(/\D/g,"");if(i.length>1){const e=i.slice(0,6);for(let i=0;i<6;i++)this.digits[i]=e[i]||"";const t=Math.max(0,Math.min(e.length,6)-1);return void this.$nextTick(()=>{this.focusInput(t)})}this.digits[e]=i,i&&e<5&&this.$nextTick(()=>{this.focusInput(e+1)})},handleKeydown(e,t){"Backspace"===t.key&&!this.digits[e]&&e>0&&this.$nextTick(()=>{this.focusInput(e-1)}),"Enter"===t.key&&6===this.code.length&&(this.completeEmitted=!1,this.$nextTick(()=>{this.$emit("complete",this.code),this.completeEmitted=!0})),"ArrowLeft"===t.key&&e>0&&(t.preventDefault(),this.focusInput(e-1)),"ArrowRight"===t.key&&e<5&&(t.preventDefault(),this.focusInput(e+1))},handlePaste(e){e.preventDefault();const t=e.clipboardData.getData("text").replace(/\D/g,"").slice(0,6);for(let i=0;i<6;i++)this.digits[i]=t[i]||"";if(6===t.length)this.$nextTick(()=>{this.focusInput(5)});else{const e=Math.min(t.length,5);this.$nextTick(()=>{this.focusInput(e)})}}}},c=i(66262);const u=(0,c.A)(d,[["render",r],["__scopeId","data-v-1cf802d2"]]);var m=u},51300:function(e,t,i){"use strict";i.d(t,{A:function(){return Ts}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"o-mediumwidth"},l={class:"modal-card",style:{"max-width":"700px",width:"95vw"}},r={class:"modal-card-head"},d={class:"modal-card-title"},c={class:"modal-card-body"},u=["onClick"],m={class:"is-flex is-align-items-center"},p={key:0,class:"mr-4",style:{width:"80px",height:"80px","border-radius":"8px",overflow:"hidden","flex-shrink":"0"}},h=["src","alt"],g={key:1,class:"mr-4 is-flex is-align-items-center is-justify-content-center",style:{width:"80px",height:"80px",borderRadius:"8px",flexShrink:0,background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"}},f={style:{"min-width":"0",flex:"1"}},b={class:"is-size-5 has-text-weight-bold mb-1"},y={class:"tags mb-1"},v={key:0,class:"tag is-rounded is-small is-info is-light"},k={key:1,class:"tag is-rounded is-small is-success is-light"},C={key:2,class:"tag is-rounded is-small is-warning is-light"},L={key:3,class:"tag is-rounded is-small is-light"},w={key:4,class:"tag is-rounded is-small is-light"},_={key:0,class:"is-size-7 has-text-grey",style:{overflow:"hidden","text-overflow":"ellipsis",display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical"}},E=["onClick"],$={class:"icon is-small"},F={class:"modal-card-foot is-justify-content-space-between"},T={key:0,class:"modal-card",style:{"max-width":"700px",width:"95vw"}},S={class:"modal-card-head"},A={class:"modal-card-title"},P={class:"modal-card-body"},I={key:0,class:"mb-5"},M={class:"image is-16by9",style:{"border-radius":"10px",overflow:"hidden"}},x=["src","alt"],N={class:"tags mb-4"},U={key:0,class:"tag is-rounded is-info is-light"},D={key:1,class:"tag is-rounded is-success is-light"},X={key:2,class:"tag is-rounded is-warning is-light"},V={key:3,class:"tag is-rounded is-light"},R={key:4,class:"tag is-rounded is-light"},O={key:5,class:"tag is-rounded is-light"}
1,Q={key:1,class:"mb-5"},B={key:0,class:"mb-3"},G={class:"has-text-weight-semibold"},W={key:1,class:"mb-3"},j={class:"has-text-weight-semibold"},z={key:2,class:"mb-3"},q={class:"has-text-weight-semibold"},J={key:2,class:"content mb-5"},H={key:3,class:"mb-5"},K={class:"icon is-small mr-2"},Y={class:"has-text-weight-bold"},Z={class:"is-flex is-justify-content-space-between is-align-items-center"},ee={class:"has-text-weight-semibold"},te={key:0,class:"is-size-7 has-text-grey"},ie={class:"tags mt-1"},se={key:0,class:"tag is-rounded is-small is-light"},ae={key:1,class:"tag is-rounded is-small is-light"},ne={key:2,class:"tag is-rounded is-small is-info is-light"},oe={class:"has-text-weight-semibold"},le={key:0},re={key:1,class:"has-text-success"},de={key:4,class:"mb-5"},ce={class:"icon is-small mr-2"},ue={class:"has-text-weight-bold"},me={class:"has-text-weight-semibold"},pe={class:"tags mt-1"},he={class:"tag is-rounded is-small is-info is-light"},ge={key:0,class:"tag is-rounded is-small is-light"},fe={key:1,class:"tag is-rounded is-small is-light"},be={key:5,class:"mb-5"},ye={class:"has-text-weight-bold mb-3"},ve={class:"tags"},ke={key:6,class:"mb-3"},Ce={class:"has-text-weight-semibold"},Le={class:"modal-card-foot is-justify-content-flex-end"},we={class:"buttons"},_e={class:"columns"},Ee={class:"column is-one-third is-hidden-mobile"},$e={class:"event-cover-preview-wrapper"},Fe={key:0,class:"event-cover-preview"},Te=["src"],Se={key:1,class:"event-cover-placeholder"},Ae={class:"icon is-large has-text-grey-light"},Pe={class:"button is-small is-primary is-rounded is-fullwidth"},Ie={class:"icon is-small mr-1"},Me={class:"column is-two-thirds"},xe={class:"column"},Ne={key:0,class:"group-tag-wrapper"},Ue={class:"tag is-success is-rounded"},De={class:"column"},Xe={class:"event-type-label"},Ve={class:"icon-text"},Re={class:"icon is-small"},Oe=["value"],Qe={class:"custom-status-row"},Be={class:"is-small ml-2"},Ge={class:"has-text-grey-light"},We={class:"is-flex is-flex-direction-row"},je={key:0},ze={class:"ml-2 tag is-info is-rounded"},qe={key:1,class:"is-size-7 mb-0"},Je={class:"icon-text"},He={class:"icon is-small"},Ke={key:1,class:"mt-5"},Ye={key:2,class:"mt-5"},Ze=["value"],et={style:{margin:"30px 0 50px 0"}},tt={class:"event-datetime-timeline"},it={class:"datetime-row"},st={class:"timeline-indicator"},at={key:0,class:"connector"},nt={class:"datetime-label"},ot={class:"datetime-inputs"},lt=["value"],rt={key:0,class:"datetime-row"},dt={class:"datetime-label"},ct={class:"datetime-inputs"},ut=["value"],mt={key:1,class:"add-end-time-row"},pt={class:"icon is-small"},ht={class:"datetime-timezone-row"},gt={class:"timezone-display is-clickable"},ft={class:"icon is-small"},bt={class:"timezone-info"},yt={class:"timezone-offset"},vt={class:"timezone-city"},kt={class:"timezone-dropdown-content"},Ct={class:"timezone-list"},Lt={class:"timezone-list-header"},wt={class:"timezone-option"},_t={class:"has-text-grey"},Et={class:"timezone-list-header mt-3"},$t={class:"timezone-option"},Ft={class:"has-text-grey"},Tt={key:3,class:"help mt-2"},St={key:4,class:"card p-5 mt-5"},At={class:"columns is-mobile"},Pt={key:0,class:"column"},It={class:"has-text-weight-bold mb-4"},Mt={class:"option-cards"},xt={class:"icon"},Nt={class:"option-label"},Ut={class:"icon"},Dt={class:"option-label"},Xt={key:1,class:"column"},Vt={class:"has-text-weight-bold mb-4"},Rt={class:"option-cards"},Ot={class:"icon"},Qt={class:"option-label"},Bt={class:"icon"},Gt={class:"option-label"},Wt={key:0,class:"notification is-info is-light mt-3"},jt={class:"event-settings-section mt-5"},zt={class:"event-settings-section-header"},qt={class:"event-setting-row"},Jt={class:"has-text-weight-semibold"},Ht={class:"icon is-small has-text-grey-light"},Kt={key:0,class:"event-setting-row"},Yt={class:"has-text-weight-semibold"},Zt={class:"event-setting-description"},ei={class:"event-setting-row"},ti={class:"has-text-weight-semibold"},ii={class:"icon is-small has-text-grey-light"},si={class:"event-settings-section mt-5"},ai={class:"event-settings-section-header"},ni={class:"event-setting-row"},oi={class:"has-text-weight-semibold"},li={class:"event-setting-row"},ri={class:"has-text-weight-semibold"},di={class:"has-text-grey is-size-7"},ci={class:"event-setting-row"},ui={class:"has-text-weight-semibold"},mi={class:"has-text-grey is-size-7"},pi={key:0}
1,hi={key:1},gi={class:"event-setting-row"},fi={class:"has-text-weight-semibold"},bi={class:"card p-5 mt-5 mb-5"},yi={class:"icon is-small"},vi={key:5,class:"card p-5 mt-5"},ki={class:"icon is-small"},Ci={key:0},Li={class:"media"},wi={class:"media-left"},_i={class:"media-content"},Ei={class:"is-size-6"},$i={key:0,class:"has-text-grey"},Fi={class:"has-background-light p-2"},Ti={class:"media mt-2"},Si={class:"media-left"},Ai={class:"media-content"},Pi={class:"help mt-2"},Ii={key:6,class:"card p-4 mt-6 mb-6"},Mi={key:0,class:"my-3"},xi={class:"is-flex is-flex-wrap-wrap"},Ni=["src","alt","title"],Ui=["disabled"],Di={class:"icon-text"},Xi={class:"icon is-small"},Vi={key:1,class:"is-size-7 ml-1 mt-3 mb-5"},Ri={key:2,class:"is-size-7 mt-5"},Oi={class:"icon-text"},Qi={class:"icon is-small"},Bi={key:8,class:"field mt-5"},Gi={value:null},Wi=["value"],ji={class:"help"},zi={key:9,class:"field mt-5"},qi={class:"help"},Ji={key:0,class:"help"},Hi={key:10,class:"field mt-5"},Ki={class:"help"},Yi={class:"save-button-container mt-6"},Zi=["disabled"],es={key:11,class:"mobile-save-spacer"},ts={key:0,class:"cropper-overlay"},is={class:"cropper-header"},ss={class:"cropper-title"},as={class:"cropper-container"},ns={key:1,class:"cropper-loading"},os={class:"cropper-footer"},ls=["disabled"],rs=["disabled"];function ds(e,t,i,ds,cs,us){const ms=(0,s.g2)("b-loading"),ps=(0,s.g2)("font-awesome-icon"),hs=(0,s.g2)("b-modal"),gs=(0,s.g2)("b-upload"),fs=(0,s.g2)("b-field"),bs=(0,s.g2)("MyGroupsSelect"),ys=(0,s.g2)("router-link"),vs=(0,s.g2)("b-select"),ks=(0,s.g2)("b-input"),Cs=(0,s.g2)("b-dropdown-item"),Ls=(0,s.g2)("b-dropdown"),ws=(0,s.g2)("b-checkbox"),_s=(0,s.g2)("b-autocomplete"),Es=(0,s.g2)("EventMapPreview"),$s=(0,s.g2)("b-datepicker"),Fs=(0,s.g2)("b-tooltip"),Ts=(0,s.g2)("b-switch"),Ss=(0,s.g2)("TipTap"),As=(0,s.g2)("LogoThumbnail"),Ps=(0,s.g2)("b-tag"),Is=(0,s.g2)("b-taglist"),Ms=(0,s.g2)("ImageCropper"),xs=(0,s.gN)("safe-html");return(0,s.uX)(),(0,s.CE)("section",o,[(0,s.bF)(ms,{modelValue:cs.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>cs.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,s.bF)(hs,{"model-value":cs.showTemplatePickerModal,"has-modal-card":"","trap-focus":"","append-to-body":"","onUpdate:modelValue":t[5]||(t[5]=e=>cs.showTemplatePickerModal=!1)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",l,[(0,s.Lk)("header",r,[(0,s.Lk)("p",d,(0,a.v_)(e.$t("Choose a template")),1),(0,s.Lk)("button",{type:"button",class:"delete",onClick:t[1]||(t[1]=e=>cs.showTemplatePickerModal=!1)})]),(0,s.Lk)("section",c,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.eventTemplates,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.id,class:(0,a.C4)(["card p-4 mb-3 is-clickable template-picker-card",{"is-selected":cs.selectedTemplate&&cs.selectedTemplate.id===i.id}]),onClick:e=>us.selectTemplate(i)},[(0,s.Lk)("div",m,[i.logo?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("img",{src:i.logo,alt:i.name,style:{width:"100%",height:"100%","object-fit":"cover"}},null,8,h)])):((0,s.uX)(),(0,s.CE)("div",g,[(0,s.bF)(ps,{icon:"fa-light fa-calendar",style:{color:"white",opacity:"0.5","font-size":"1.5rem"}})])),(0,s.Lk)("div",f,[(0,s.Lk)("p",b,(0,a.v_)(i.name),1),(0,s.Lk)("div",y,[i.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",v,(0,a.v_)(e.$t("Ticket")),1)):((0,s.uX)(),(0,s.CE)("span",k,(0,a.v_)(e.$t("Free")),1)),i.isPublic?((0,s.uX)(),(0,s.CE)("span",C,(0,a.v_)(e.$t("Public")),1)):(0,s.Q3)("",!0),i.requiresRegistrationForm?((0,s.uX)(),(0,s.CE)("span",L,(0,a.v_)(e.$t("Registration Form")),1)):(0,s.Q3)("",!0),i.ticketTypes&&i.ticketTypes.length>0?((0,s.uX)(),(0,s.CE)("span",w,(0,a.v_)(i.ticketTypes.length)+" "+(0,a.v_)(e.$t("tickets")),1)):(0,s.Q3)("",!0)]),i.description?(0,s.bo)(((0,s.uX)(),(0,s.CE)("p",_,null,512)),[[xs,i.description]]):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:"ml-3",style:{"flex-shrink":"0"},onClick:t[2]||(t[2]=(0,n.D$)(()=>{},["stop"]))},[(0,s.Lk)("button",{class:"button is-small is-light is-rounded",onClick:e=>{cs.previewingTemplate=i,cs.previewTicketsExpanded=!1,cs.previewVouchersExpanded=!1}},[(0,s.Lk)("span",$,[(0,s.bF)(ps,{icon:"fa-light fa-eye"})])],8,E)])])],10,u))),128))]),(0,s.Lk)("footer",F,[(0,s.Lk)("button",{class:"button is-rounded",onClick:t[3]||(t[3]=(...e)=>us.clearTemplate&&us.clearTemplate(...e))},(0,a.v_)(e.$t("No template")),1),(0,s.Lk)("button",{class:"button is-primary is-rounded",onClick:t[4]||(t[4]=e=>cs.showTemplatePickerModal=!1)},(0,a.v_)(e.$t("Done")),1)])])]),_:1},8,["model-value"]),(0,s.bF)(hs,{"model-value":!!cs.previewingTemplate,"has-modal-card":"","trap-focus":"","append-to-body":"","onUpdate:modelValue":t[11]||(t[11]=e=>cs.previewingTemplate=null)},{default:(0,s.k6)(()=>[cs.previewingTemplate?((0,s.uX)(),(0,s.CE)("div",T,[(0,s.Lk)("header",S,[(0,s.Lk)("p",A,(0,a.v_)(cs.previewingTemplate.name),1),(0,s.Lk)("button",{type:"button",class:"delete",onClick:t[6]||(t[6]=e=>cs.previewingTemplate=null)})]),(0,s.Lk)("section",P,[cs.previewingTemplate.logo?((0,s.uX)(),(0,s.CE)("div",I,[(0,s.Lk)("figure",M,[(0,s.Lk)("img",{src:cs.previewingTemplate.logo,alt:cs.previewingTemplate.name,style:{"object-fit":"cover",width:"100%",height:"100%"}},null,8,x)])])):(0,s.Q3)("",!0),(0,s.Lk)("div",N,[cs.previewingTemplate.hasEventTicketing?((0,s.uX)(),(0,s.CE)("span",U,(0,a.v_)(e.$t("Paid")),1)):((0,s.uX)(),(0,s.CE)("span",D,(0,a.v_)(e.$t("Free")),1)),cs.previewingTemplate.isPublic?((0,s.uX)(),(0,s.CE)("span",X,(0,a.v_)(e.$t("Public")),1)):((0,s.uX)(),(0,s.CE)("span",V,(0,a.v_)(e.$t("Members only")),1)),cs.previewingTemplate.requiresRegistrationForm?((0,s.uX)(),(0,s.CE)("span",R,(0,a.v_)(e.$t("Registration Form")),1)):(0,s.Q3)("",!0),cs.previewingTemplate.settings&&cs.previewingTemplate.settings.enableSpeakers?((0,s.uX)(),(0,s.CE)("span",O,(0,a.v_)(e.$t("Speakers")),1)):(0,s.Q3)("",!0)]),cs.previewingTemplate.title||cs.previewingTemplate.location||cs.previewingTemplate.type?((0,s.uX)(),(0,s.CE)("div",Q,[cs.previewingTemplate.title?((0,s.uX)(),(0,s.CE)("div",B,[(0,s.Lk)("span",G,(0,a.v_)(e.$t("Event title"))+":",1),(0,s.eW)(" "+(0,a.v_)(cs.previewingTemplate.title),
11)])):(0,s.Q3)("",!0),cs.previewingTemplate.type?((0,s.uX)(),(0,s.CE)("div",W,[(0,s.Lk)("span",j,(0,a.v_)(e.$t("Event type"))+":",1),(0,s.eW)(" "+(0,a.v_)(cs.previewingTemplate.type.name||cs.previewingTemplate.type),1)])):(0,s.Q3)("",!0),cs.previewingTemplate.location?((0,s.uX)(),(0,s.CE)("div",z,[(0,s.Lk)("span",q,(0,a.v_)(e.$t("Location"))+":",1),(0,s.eW)(" "+(0,a.v_)(cs.previewingTemplate.location),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),cs.previewingTemplate.description?(0,s.bo)(((0,s.uX)(),(0,s.CE)("div",J,null,512)),[[xs,cs.previewingTemplate.description]]):(0,s.Q3)("",!0),cs.previewingTemplate.ticketTypes&&cs.previewingTemplate.ticketTypes.length>0?((0,s.uX)(),(0,s.CE)("div",H,[(0,s.Lk)("div",{class:"is-flex is-align-items-center is-clickable mb-3",onClick:t[7]||(t[7]=e=>cs.previewTicketsExpanded=!cs.previewTicketsExpanded)},[(0,s.Lk)("span",K,[(0,s.bF)(ps,{icon:cs.previewTicketsExpanded?"fa-light fa-chevron-down":"fa-light fa-chevron-right"},null,8,["icon"])]),(0,s.Lk)("p",Y,(0,a.v_)(e.$t("Tickets"))+" ("+(0,a.v_)(cs.previewingTemplate.ticketTypes.length)+")",1)]),cs.previewTicketsExpanded?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:0},(0,s.pI)(cs.previewingTemplate.ticketTypes,(t,i)=>((0,s.uX)(),(0,s.CE)("div",{key:i,class:"card p-4 mb-2"},[(0,s.Lk)("div",Z,[(0,s.Lk)("div",null,[(0,s.Lk)("p",ee,(0,a.v_)(t.name),1),t.description?((0,s.uX)(),(0,s.CE)("p",te,(0,a.v_)(t.description),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",ie,[t.maxSeats?((0,s.uX)(),(0,s.CE)("span",se,(0,a.v_)(t.maxSeats)+" "+(0,a.v_)(e.$t("seats")),1)):(0,s.Q3)("",!0),t.isRestricted?((0,s.uX)(),(0,s.CE)("span",ae,(0,a.v_)(e.$t("Members only")),1)):(0,s.Q3)("",!0),t.addons&&t.addons.length>0?((0,s.uX)(),(0,s.CE)("span",ne,(0,a.v_)(t.addons.length)+" "+(0,a.v_)(e.$t("add-ons")),1)):(0,s.Q3)("",!0)])]),(0,s.Lk)("span",oe,[t.price?((0,s.uX)(),(0,s.CE)("span",le,(0,a.v_)(e.$filters.money(t.price)),1)):((0,s.uX)(),(0,s.CE)("span",re,(0,a.v_)(e.$t("FREE")),1))])])]))),128)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),cs.previewingTemplate.voucherDefinitions&&cs.previewingTemplate.voucherDefinitions.length>0?((0,s.uX)(),(0,s.CE)("div",de,[(0,s.Lk)("div",{class:"is-flex is-align-items-center is-clickable mb-3",onClick:t[8]||(t[8]=e=>cs.previewVouchersExpanded=!cs.previewVouchersExpanded)},[(0,s.Lk)("span",ce,[(0,s.bF)(ps,{icon:cs.previewVouchersExpanded?"fa-light fa-chevron-down":"fa-light fa-chevron-right"},null,8,["icon"])]),(0,s.Lk)("p",ue,(0,a.v_)(e.$t("Vouchers"))+" ("+(0,a.v_)(cs.previewingTemplate.voucherDefinitions.length)+")",1)]),cs.previewVouchersExpanded?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:0},(0,s.pI)(cs.previewingTemplate.voucherDefinitions,(t,i)=>((0,s.uX)(),(0,s.CE)("div",{key:i,class:"card p-4 mb-2"},[(0,s.Lk)("p",me,[(0,s.Lk)("code",null,(0,a.v_)(t.code),1)]),(0,s.Lk)("div",pe,[(0,s.Lk)("span",he,(0,a.v_)("percentage"===t.discountType?t.discountValue+"%":e.$filters.money(t.discountValue)),1),t.maxUses?((0,s.uX)(),(0,s.CE)("span",ge,(0,a.v_)(e.$t("Max"))+" "+(0,a.v_)(t.maxUses)+" "+(0,a.v_)(e.$t("uses")),1)):(0,s.Q3)("",!0),t.maxTickets?((0,s.uX)(),(0,s.CE)("span",fe,(0,a.v_)(e.$t("Max"))+" "+(0,a.v_)(t.maxTickets)+" "+(0,a.v_)(e.$t("tickets per use")),1)):(0,s.Q3)("",!0)])]))),128)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),cs.previewingTemplate.settings&&cs.previewingTemplate.settings.registrationForm&&cs.previewingTemplate.settings.registrationForm.length>0?((0,s.uX)(),(0,s.CE)("div",be,[(0,s.Lk)("p",ye,(0,a.v_)(e.$t("Registration Form Fields")),1),(0,s.Lk)("div",ve,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.previewingTemplate.settings.registrationForm,(e,t)=>((0,s.uX)(),(0,s.CE)("span",{key:t,class:"tag is-rounded is-light"},(0,a.v_)(us.getFormFieldLabel(e,cs.previewingTemplate)),1))),128))])])):(0,s.Q3)("",!0),cs.previewingTemplate.maxCapacity?((0,s.uX)(),(0,s.CE)("div",ke,[(0,s.Lk)("span",Ce,(0,a.v_)(e.$t("Max capacity"))+":",1),(0,s.eW)(" "+(0,a.v_)(cs.previewingTemplate.maxCapacity),1)])):(0,s.Q3)("",!0)]),(0,s.Lk)("footer",Le,[(0,s.Lk)("div",we,[(0,s.Lk)("button",{class:"button is-rounded",onClick:t[9]||(t[9]=e=>cs.previewingTemplate=null)},(0,a.v_)(e.$t("Close")),1),(0,s.Lk)("button",{class:"button is-primary is-rounded",onClick:t[10
1]||(t[10]=e=>{us.selectTemplate(cs.previewingTemplate),cs.previewingTemplate=null})},(0,a.v_)(e.$t("Use this template")),1)])])])):(0,s.Q3)("",!0)]),_:1},8,["model-value"]),(0,s.Lk)("form",{onSubmit:t[53]||(t[53]=(0,n.D$)((...e)=>us.save&&us.save(...e),["prevent"]))},[(0,s.Lk)("div",_e,[(0,s.Lk)("div",Ee,[(0,s.Lk)("div",$e,[cs.pendingLogoPreview||us.logoSrc?((0,s.uX)(),(0,s.CE)("div",Fe,[(0,s.Lk)("img",{src:cs.pendingLogoPreview||us.logoSrc,class:"event-cover-image"},null,8,Te)])):((0,s.uX)(),(0,s.CE)("div",Se,[(0,s.Lk)("span",Ae,[(0,s.bF)(ps,{icon:"fa-light fa-image",size:"3x"})])])),(0,s.bF)(fs,{class:"file mt-3"},{default:(0,s.k6)(()=>[(0,s.bF)(gs,{modelValue:cs.pendingLogoFile,"onUpdate:modelValue":[t[12]||(t[12]=e=>cs.pendingLogoFile=e),us.onLogoFileSelected],accept:"image/png, image/jpeg, image/jpg",expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("a",Pe,[(0,s.Lk)("span",Ie,[(0,s.bF)(ps,{icon:"fa-light fa-image"})]),(0,s.Lk)("span",null,(0,a.v_)(cs.pendingLogoPreview||us.logoSrc?e.$t("Change image"):e.$t("Add image")),1)])]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})])]),(0,s.Lk)("div",Me,[(0,s.Lk)("div",{class:(0,a.C4)(["columns is-mobile mb-0",e.$isMobile()?"is-flex-direction-column":""])},[(0,s.Lk)("div",xe,[(0,s.bF)(fs,{label:e.$t("group")},{default:(0,s.k6)(()=>[us.unitName&&"published"===i.item.status?((0,s.uX)(),(0,s.CE)("div",Ne,[(0,s.Lk)("span",Ue,"# "+(0,a.v_)(us.unitName),1)])):((0,s.uX)(),(0,s.Wv)(bs,{key:1,modelValue:i.item.unit,"onUpdate:modelValue":[t[13]||(t[13]=e=>i.item.unit=e),t[14]||(t[14]=e=>i.item.unit=e)],item:i.item,"resolved-unit":cs.unit,namespace:"event"},null,8,["modelValue","item","resolved-unit"]))]),_:1},8,["label"])]),(0,s.Lk)("div",De,[(0,s.bF)(fs,null,{label:(0,s.k6)(()=>[(0,s.Lk)("span",Xe,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("eventType")),1),e.isGranted("ROLE_ADMIN_TENANT")?((0,s.uX)(),(0,s.Wv)(ys,{key:0,to:{name:"EventTypeList"},target:"_blank",class:"is-size-7 has-text-weight-normal manage-types-link"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ve,[(0,s.Lk)("span",Re,[(0,s.bF)(ps,{icon:"fa-light fa-cog"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Manage types")),1)])]),_:1})):(0,s.Q3)("",!0)])]),default:(0,s.k6)(()=>[cs.eventTypes&&cs.eventTypes.length>0?((0,s.uX)(),(0,s.Wv)(vs,{key:0,modelValue:i.item.type,"onUpdate:modelValue":[t[15]||(t[15]=e=>i.item.type=e),us.checkCustomEvent],expanded:""},{default:(0,s.k6)(()=>[t[56]||(t[56]=(0,s.Lk)("option",{value:null},"...",-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.eventTypes,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t["@id"]},[!t.createIsGrantedRole||e.isGranted(t.createIsGrantedRole)||t.id===parseInt(e.tenant.settingFeatures.events.trainingEventType)&&e.user.isTrainer?((0,s.uX)(),(0,s.CE)("option",{key:0,value:t["@id"]},(0,a.v_)(t.name),9,Oe)):(0,s.Q3)("",!0)],64))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])):(0,s.Q3)("",!0)]),_:1})])],2),(0,s.bF)(fs,{label:e.$t("title")},{default:(0,s.k6)(()=>[(0,s.bF)(ks,{ref:"titleInput",modelValue:i.item.name,"onUpdate:modelValue":t[16]||(t[16]=e=>i.item.name=e),required:""},null,8,["modelValue"])]),_:1},8,["label"]),e.tenant.settingFeatures.events.hasCustomStatuses?((0,s.uX)(),(0,s.Wv)(fs,{key:0,label:e.$t("Custom Status"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Qe,[cs.eventStatuses&&cs.eventStatuses.length>0?((0,s.uX)(),(0,s.Wv)(Ls,{key:0,"aria-role":"list"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",{type:"button",class:"button",style:(0,a.Tr)(us.getSelectedStatusButtonStyle())},[(0,s.eW)((0,a.v_)(us.getCustomStatusLabel())+" ",1),(0,s.Lk)("span",Be,[(0,s.bF)(ps,{icon:"fa-light fa-chevron-down"})])],4)]),default:(0,s.k6)(()=>[(0,s.bF)(Cs,{"aria-role":"listitem",onClick:t[17]||(t[17]=e=>us.setCustomStatus(null))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ge,(0,a.v_)(e.$t("None")),1)]),_:1}),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(us.sortedEventStatuses,t=>((0,s.uX)(),(0,s.Wv)(Cs,{key:t["@id"],"aria-role":"listitem",onClick:e=>us.setCustomStatus(t["@id"])},{default:(0,s.k6)(()=>[(0,s.Lk)("div",We,[(0,s.Lk)("span",{class:"tag is-rounded",style:(0,a.Tr)(us.getStatusColorStyle(t.color))},(0,a.v_)(t.name),5),t.isFinal?((0,s.uX)(),(0,s.CE)("div",je,[(0,s.Lk)("span",ze,(0,a.v_)(e.$t("Final")),1)])):(0,s.Q3)("",!0)])]),_:2},1032,["onClick"]))),128))]),_:1})):(0,s.Q3)("",!0),e.isGranted("ROLE_ADMIN_TENANT")?((0,s.uX)(),(0,s.CE)("p",qe,[(0,s.bF)(ys,{to:{name:"ModuleEventsEventStatuses"},target:"_blank"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Je,[(0,s.Lk)("span",He,[(0,s.bF)(ps,{icon:"fa-light fa-cog"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Manage event statuses"))+" â",1)])]),_:1})])):(0,s.Q3)("",!0)])]),_:1},8,["label"])):(0,s.Q3)("",!0),cs.showGeneralMeeting?((0,s.uX)(),(0,s.CE)("div",Ke,[(0,s.bF)(ws,{modelValue:i.item.isGeneralMeeting,"onUpdate:modelValue":t[18]||(t[18]=e=>i.item.isGeneralMeeting=e),disabled:"disabled"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("isGM")),1)]),_:1},8,["modelValue"]),(0,s.bF)(ws,{modelValue:i.item.isGeneralMeetingElection,"onUpdate:modelValue":t[19]||(t[19]=e=>i.item.isGeneralMeetingElection=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("isGMElection")),1)]),_:1},8,["modelValue"]),(0,s.bF)(ws,{modelValue:i.item.isGeneralMeetingEx,"onUpdate:modelValue":t[20]||(t[20]=e=>i.item.isGeneralMeetingEx=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("isGMExtraordinary")),1)]),_:1},8,["modelValue"])])):(0,s.Q3)("",!0),cs.showTraining?((0,s.uX)(),(0,s.CE)("div",Ye,[(0,s.bF)(fs,{label:e.$t("trainingType")},{default:(0,s.k6)(()=>[(0,s.bF)(vs,{modelValue:i.item.trainingType,"onUpdate:modelValue":t[21]||(t[21]=e=>i.item.trainingType=e)},{default:(0,s.k6)(()=>[t[57]||(t[57]=(0,s.Lk)("option",{value:null},"...",-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.trainingTypes,e=>((0,s.uX)(),(0,s.CE)("option",{key:e["@id"],value:e["@id"]},(0,a.v_)(e.name),9,Ze))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),t[58]||(t[58]=(0,s.Lk)("br",null,null,-1))])):(0,s.Q3)("",!0),(0,s.Lk)("div",et,[i.item.location&&!i.item.placesApiId?((0,s.uX)(),(0,s.Wv)(fs,{key:0,label:e.$t("location"),class:"mt-5"},{default:(0,s.k6)(()=>[i.item.location&&!i.item.placesApiId?((0,s.uX)(),(0,s.Wv)(ks,{key:0,modelValue:i.item.location,"onUpdate:modelValue":t[22]||(t[22]=e=>i.item.location=e),placeholder:e.$t("in person location...")},null,8,["modelValue","placeholder"])):(0,s.Q3)("",!0)]),_:1},8,["label"])):((0,s.uX)(),(0,s.Wv)(fs,{key:1,label:e.$t("location"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(_s,{modelValue:cs.selectedLocation,"onUpdate:modelValue":t[23]||(t[23]=e=>cs.selectedLocation=e),data:cs.placesAPIData,placeholder:e.$t("Location"),loading:cs.isFetching,clearable:!0,"clear-on-select":!1,onInput:us.getAsyncData,onFocus:us.onLocationFocus,onSelect:us.change},null,8,["modelValue","data","placeholder","loading","onInput","onFocus","onSelect"])]),_:1},8,["label"])),i.item.placeLatitude&&i.item.placeLongitude&&cs.selectedLocation?((0,s.uX)(),(0,s.Wv)(Es,{key:2,class:"mt-3","place-latitude":i.item.placeLatitude,"place-longitude":i.item.placeLongitude,"places-api-id":i.item.placesApiId},null,8,["place-latitude","place-longitude","places-api-id"])):(0,s.Q3)("",!0),(0,s.bF)(fs,{label:e.$t("onlineMeetup"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(ks,{modelValue:i.item.meet,"onUpdate:modelValue":t[24]||(t[24]=e=>i.item.meet=e),placeholder:e.$t("URL for Zoom/Meet/Teams or other service...")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),(0,s.Lk)("div",tt,[(0,s.Lk)("div",it,[(0,s.Lk)("div",st,[t[59]||(t[59]=(0,s.Lk)("span",{class:"bullet filled"},null,-1)),cs.hasEndDate?((0,s.uX)(),(0,s.CE)("span",at)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",nt,(0,a.v_)(e.$t("Start")),1),(0,s.Lk)("div",ot,[(0,s.bF)($s,{modelValue:i.item.dateTimeBegin,"onUpdate:modelValue":t[25]||(t[25]=e=>i.item.dateTimeBegin=e),placeholder:e.$t("Select date"),editable:"",required:"",class:"datetime-date-picker","date-formatter":us.formatDateShort},null,8,["modelValue","placeholder","date-formatter"]),(0,s.bF)(vs,{modelValue:i.item.timeBegin,"onUpdate:modelValue":t[26]||(t[26]=e=>i.item.timeBegin=e),class:"datetime-time-select"},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.timeOptions,e=>((0,s.uX)(),(0,s.CE)("option",{key:e,value:e},(0,a.v_)(e),9,lt))),128))]),_:1},8,["modelValue"])])]),cs.hasEndDate?((0,s.uX)(),(0,s.CE)("div",rt,[t[60]||(t[60]=(0,s.Lk)("div",{class:"timeline-indicator"},[(0,s.Lk)("span",{class:"bullet empty"})],-1)),(0,s.Lk)("div",dt,(0,a.v_)(e.$t("End")),1),(0,s.Lk)("div",ct,[(0,s.bF)($s,{modelValue:i.item.dateTimeEnd,"onUpdate:modelValue":t[27]||(t[27]=e=>i.item.dateTimeEnd=e),placeholder:e.$t("Select date"),editable:"",required:"","min-date":i.item.dateTimeBegin,class:"datetime-date-picker","date-formatter":us.formatDateShort},null,8,["modelValue","placeholder","min-date","date-formatter"]),(0,s.bF)(vs,{modelValue:i.item.timeEnd,"onUpdate:modelValue":t[28]||(t[28]=e=>i.item.timeEnd=e),class:"datetime-time-select"},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.timeOptions,e=>((0,s.uX)(),(0,s.CE)("option",{key:e,value:e},(0,a.v_)(e),9,ut))),128))]),_:1},8,["modelValue"]),(0,s.Lk)("a",{class:"remove-end-time-link",onClick:t[29]||(t[29]=(...e)=>us.removeEndTime&&us.removeEndTime(...e))},(0,a.v_)(e.$t("Remove end time")),1)])])):(0,s.Q3)("",!0),cs.hasEndDate?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",mt,[(0,s.Lk)("a",{class:"add-end-time-link",onClick:t[30]||(t[30]=(...e)=>us.addEndTime&&us.addEndTime(...e))},[(0,s.Lk)("span",pt,[(0,s.bF)(ps,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Add end time")),1)])])),(0,s.Lk)("div",ht,[(0,s.bF)(Ls,{ref:"timezoneDropdown",position:"is-bottom-left",class:"timezone-dropdown",onActiveChange:us.onTimezoneDropdownChange},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",gt,[(0,s.Lk)("span",ft,[(0,s.bF)(ps,{icon:"fa-light fa-globe"})]),(0,s.Lk)("div",bt,[(0,s.Lk)("span",yt,(0,a.v_)(us.formattedTimezoneOffset),1),(0,s.Lk)("span",vt,(0,a.v_)(us.formattedTimezoneCity),1)])])]),default:(0,s.k6)(()=>[(0,s.Lk)("div",kt,[(0,s.bF)(ks,{ref:"timezoneSearchInput",modelValue:cs.timezoneSearch,"onUpdate:modelValue":t[31]||(t[31]=e=>cs.timezoneSearch=e),placeholder:e.$t("Search for a timezone"),icon:"magnifying-glass",class:"timezone-search-input"},null,8,["modelValue","placeholder"]),(0,s.Lk)("div",Ct,[(0,s.Lk)("p",Lt,(0,a.v_)(e.$t("Popular Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(us.filteredPopularTimezones,e=>((0,s.uX)(),(0,s.Wv)(Cs,{key:e.value,onClick:t=>us.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",wt,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",_t,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128)),(0,s.Lk)("p",Et,(0,a.v_)(e.$t("All Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(us.filteredAllTimezones,e=>((0,s.uX)(),(0,s.Wv)(Cs,{key:e.value,onClick:t=>us.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",$t,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",Ft,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128))])])]),_:1},8,["onActiveChange"])])]),us.isPastEvent?((0,s.uX)(),(0,s.CE)("p",Tt,(0,a.v_)(e.$t("Past events are published immediately.")),1)):(0,s.Q3)("",!0),e.isGranted("EVENT_LOCAL")||us.canPostPublicByTenantSetting?((0,s.uX)(),(0,s.CE)("div",St,[(0,s.Lk)("div",At,[e.isGranted("FINANCIAL_TENANT")||e.isGranted("EVENT_TENANT")?((0,s.uX)(),(0,s.CE)("div",Pt,[(0,s.Lk)("p",It,(0,a.v_)(e.$t("Access")),1),(0,s.Lk)("div",Mt,[(0,s.Lk)("div",{class:(0,a.C4)(["option-card",{"is-selected":!i.item.hasEventTicketing}]),onClick:t[32]||(t[32]=e=>{i.item.hasEventTicketing=!1,us.updateAttendability()})},[(0,s.Lk)("span",xt,[(0,s.bF)(ps,{icon:"fa-light fa-handshake"})]),(0,s.Lk)("span",Nt,(0,a.v_)(e.$t("Free")),1)],2),e.tenant.settingFeatures.onlinePayments.isActive?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["option-card",{"is-selected":i.item.hasEventTicketing}]),onClick:t[33]||(t[33]=e=>{i.item.hasEventTicketing=!0,us.updateAttendability()})},[(0,s.Lk)("span",Ut,[(0,s.bF)(ps,{icon:"fa-light fa-money-bill-alt"})]),(0,s.Lk)("span",Dt,(0,a.v_)(e.$t("Paid")),1)],2)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),us.canPostPublicByTenantSetting?((0,s.uX)(),(0,s.CE)("div",Xt,[(0,s.Lk)("p",Vt,(0,a.v_)(e.$t("Audience")),1),(0,s.Lk)("div",Rt,[(0,s.Lk)("div",{class:(0,a.C4)(["option-card",{"is-selected":!i.item.isPublic}]),onClick:t[34]||(t[34]=e=>{i.item.isPublic=!1,us.updateAttendability()})},[(0,s.Lk)("span",Ot,[(0,s.bF)(ps,{icon:"fa-light fa-lock"})]),(0,s.Lk)("span",Qt,(0,a.v_)(e.$t("Members only")),1)],2),us.isSelectedUnitPrivate?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["option-card",{"is-selected":i.item.isPublic}]),onClick:t[35]||(t[35]=e=>{i.item.isPublic=!0,us.updateAttendability()})},[(0,s.Lk)("span",Bt,[(0,s.bF)(ps,{icon:"fa-light fa-globe"})]),(0,s.Lk)("span",Gt,(0,a.v_)(e.$t("Public")),1)],2))])])):(0,s.Q3)("",!0)]),i.item.sendAttendanceReminder&&e.tenant.settingFeatures.events.sendAttendanceReminder?((0,s.uX)(),(0,s.CE)("div",Wt,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("An email reminder will be sent to you 24 hours after the event to record attendance")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",jt,[(0,s.Lk)("div",zt,(0,a.v_)(e.$t("Registration")),1),(0,s.Lk)("div",qt,[(0,s.Lk)("div",null,[(0,s.Lk)("div",Jt,[(0,s.eW)((0,a.v_)(e.$t("Require registration form for members"))+" ",1),(0,s.bF)(Fs,{label:i.item.hasEventTicketing?e.$t("Paid events always require a registration form"):e.$t("When enabled, members must fill out a registration form instead of simple RSVP"),position:"is-top",multilined:"",size:"is-medium","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ht,[(0,s.bF)(ps,{icon:"fa-light fa-circle-info"})])]),_:1},8,["label"])])]),(0,s.bF)(Ts,{modelValue:i.item.requiresRegistrationForm,"onUpdate:modelValue":t[36]||(t[36]=e=>i.item.requiresRegistrationForm=e),disabled:i.item.hasEventTicketing},null,8,["modelValue","disabled"])]),i.item.hasEventTicketing?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Kt,[(0,s.Lk)("div",null,[(0,s.Lk)("div",Yt,(0,a.v_)(e.$t("Max capacity")),1),(0,s.Lk)("div",Zt,(0,a.v_)(e.$t("Leave empty for unlimited")),1)]),(0,s.bF)(ks,{modelValue:i.item.maxCapacity,"onUpdate:modelValue":t[37]||(t[37]=e=>i.item.maxCapacity=e),modelModifiers:{number:!0},type:"number",min:"1",class:"capacity-input",placeholder:e.$t("Unlimited")},null,8,["modelValue","placeholder"])])),(0,s.Lk)("div",ei,[(0,s.Lk)("div",null,[(0,s.Lk)("div",ti,[(0,s.eW)((0,a.v_)(e.$t("Close registrations"))+" ",1),(0,s.bF)(Fs,{label:e.$t("When enabled, no new registrations or ticket purchases will be accepted for this event"),position:"is-top",multilined:"",size:"is-medium","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ii,[(0,s.bF)(ps,{icon:"fa-light fa-circle-info"})])]),_:1},8,["label"])])]),(0,s.bF)(Ts,{modelValue:i.item.registrationManuallyClosed,"onUpdate:modelValue":t[38]||(t[38]=e=>i.item.registrationManuallyClosed=e)},null,8,["modelValue"])])]),(0,s.Lk)("div",si,[(0,s.Lk)("div",ai,(0,a.v_)(e.$t("Features")),1),(0,s.Lk)("div",ni,[(0,s.Lk)("div",null,[(0,s.Lk)("div",oi,(0,a.v_)(e.$t("Enable speakers")),1)]),(0,s.bF)(Ts,{modelValue:i.item.settings.enableSpeakers,"onUpdate:modelValue":t[39]||(t[39]=e=>i.item.settings.enableSpeakers=e)},null,8,["modelValue"])]),(0,s.Lk)("div",li,[(0,s.Lk)("div",null,[(0,s.Lk)("div",ri,(0,a.v_)(e.$t("Visibility of attendee list")),1),(0,s.Lk)("div",di,[i.item.hasPublicAttendeeList?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("List is visible to admins and event attendees")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(e.$t("List is visible to admins only")),1)],64))])]),(0,s.bF)(Ts,{modelValue:i.item.hasPublicAttendeeList,"onUpdate:modelValue":[t[40]||(t[40]=e=>i.item.hasPublicAttendeeList=e),us.onPublicAttendeeListChange]},null,8,["modelValue","onUpdate:modelValue"])]),(0,s.Lk)("div",ci,[(0,s.Lk)("div",null,[(0,s.Lk)("div",ui,(0,a.v_)(e.$t("Enable 1:1 networking")),1),(0,s.Lk)("div",mi,[(0,s.eW)((0,a.v_)(e.$t("Lets attendees book 15-minute meetings with each other inside the event app."))+" ",1),i.item.hasPublicAttendeeList?i.item.hasNetworking&&i.item.id?((0,s.uX)(),(0,s.CE)("span",hi,[(0,s.eW)((0,a.v_)(e.$t("Manage space
1s from the"))+" ",1),(0,s.Lk)("strong",null,(0,a.v_)(e.$t("Networking spaces")),1),(0,s.eW)(" "+(0,a.v_)(e.$t("tab in the sidebar.")),1)])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",pi,(0,a.v_)(e.$t("Requires the public attendee list to be enabled.")),1))])]),(0,s.bF)(Ts,{modelValue:i.item.hasNetworking,"onUpdate:modelValue":t[41]||(t[41]=e=>i.item.hasNetworking=e),disabled:!i.item.hasPublicAttendeeList},null,8,["modelValue","disabled"])]),(0,s.Lk)("div",gi,[(0,s.Lk)("div",null,[(0,s.Lk)("div",fi,(0,a.v_)(e.$t("Send reminder 1 hour before event starts")),1)]),(0,s.bF)(Ts,{modelValue:i.item.sendOneHourReminder,"onUpdate:modelValue":t[42]||(t[42]=e=>i.item.sendOneHourReminder=e)},null,8,["modelValue"])])])])):(0,s.Q3)("",!0),(0,s.Lk)("div",bi,[(0,s.Lk)("p",{class:"has-text-weight-semibold is-flex is-justify-content-space-between is-align-items-center is-clickable",onClick:t[43]||(t[43]=e=>cs.descriptionOpen=!cs.descriptionOpen)},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("description")),1),(0,s.Lk)("span",yi,[(0,s.bF)(ps,{icon:cs.descriptionOpen?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),cs.descriptionOpen?((0,s.uX)(),(0,s.Wv)(fs,{key:0,class:"mt-4"},{default:(0,s.k6)(()=>[(0,s.bF)(Ss,{ref:"tiptapEditor",modelValue:i.item.description,"onUpdate:modelValue":t[44]||(t[44]=e=>i.item.description=e),class:"mt-3"},null,8,["modelValue"])]),_:1})):(0,s.Q3)("",!0)]),e.tenant.settingFeatures.gamification.hasTiers&&e.isGranted("EVENT_TENANT")?((0,s.uX)(),(0,s.CE)("div",vi,[(0,s.Lk)("p",{class:"has-text-weight-semibold is-flex is-justify-content-space-between is-align-items-center is-clickable",onClick:t[45]||(t[45]=e=>cs.gamificationOpen=!cs.gamificationOpen)},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Gamification")),1),(0,s.Lk)("span",ki,[(0,s.bF)(ps,{icon:cs.gamificationOpen?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),cs.gamificationOpen?((0,s.uX)(),(0,s.CE)("div",Ci,[(0,s.bF)(fs,{label:e.$t("Points"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(ks,{"model-value":i.item.gamificationPoints,type:"number","onUpdate:modelValue":us.setGamificationPoints},null,8,["model-value","onUpdate:modelValue"])]),_:1},8,["label"]),e.tenant?.settingFeatures?.gamification?.hasEventBadge?((0,s.uX)(),(0,s.Wv)(fs,{key:0,label:e.$t("Award badge on event attendance"),class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",null,[(0,s.bF)(_s,{modelValue:cs.selectedBadgeName,"onUpdate:modelValue":t[46]||(t[46]=e=>cs.selectedBadgeName=e),placeholder:e.$t("Select a badge"),data:cs.filteredBadges,"dropdown-position":"bottom","open-on-focus":"",field:"name",autocomplete:"off",clearable:"",class:"badge-autocomplete",onSelect:us.selectBadge,onTyping:us.filterBadges},(0,s.eX)({default:(0,s.k6)(e=>[(0,s.Lk)("div",Li,[(0,s.Lk)("div",wi,[(0,s.bF)(As,{item:e.option,"is-type":"roundSmall"},null,8,["item"])]),(0,s.Lk)("div",_i,[(0,s.Lk)("div",Ei,(0,a.v_)(e.option.name),1),e.option.type?((0,s.uX)(),(0,s.CE)("small",$i,(0,a.v_)(e.option.type.name),1)):(0,s.Q3)("",!0)])])]),_:2},[i.item.badge?{name:"header",fn:(0,s.k6)(()=>[(0,s.Lk)("div",Fi,[(0,s.Lk)("div",Ti,[(0,s.Lk)("div",Si,[(0,s.bF)(As,{item:i.item.badge,"is-type":"roundSmall"},null,8,["item"])]),(0,s.Lk)("div",Ai,[(0,s.Lk)("strong",null,(0,a.v_)(i.item.badge.name),1)])])])]),key:"0"}:void 0]),1032,["modelValue","placeholder","data","onSelect","onTyping"]),(0,s.Lk)("p",Pi,(0,a.v_)(e.$t("Participants will receive this badge when marked as attended")),1)])]),_:1},8,["label"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.events.hasSDG?((0,s.uX)(),(0,s.CE)("div",Ii,[(0,s.Lk)("p",null,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("SDG"))+" (Sustainable Development Goals)",1)]),(0,s.bF)(fs,{class:"mt-3 mb-5"},{default:(0,s.k6)(()=>[(0,s.bF)(_s,{data:e.sdgGoals,field:"name","open-on-focus":"","clear-on-select":"",onSelect:us.saveSDG},null,8,["data","onSelect"])]),_:1}),i.item.sdg&&i.item.sdg.length?((0,s.uX)(),(0,s.CE)("div",Mi,[(0,s.bF)(fs,{grouped:"","group-multiline":"",class:"mt-5 mb-5"},{default:(0,s.k6)(()=>[(0,s.bF)(Is,null,{default:(0,s.k6)(()=>
1[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.item.sdg,t=>((0,s.uX)(),(0,s.Wv)(Ps,{key:t,closable:"",onClose:e=>us.removeSDG(t)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",null,(0,a.v_)(t+". "+e.$t("GOAL"+t)),1)]),_:2},1032,["onClose"]))),128))]),_:1})]),_:1}),(0,s.Lk)("div",xi,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.item.sdg,t=>((0,s.uX)(),(0,s.CE)("figure",{key:t,class:"mr-2 mb-2"},[(0,s.Lk)("img",{src:"https://orgostatic.s3.eu-central-1.amazonaws.com/sdg/E-WEB-Goal-"+(t<10?"0"+t:t)+".png",width:"85px",style:{"border-radius":"8px"},alt:t+". "+e.$t("GOAL"+t),title:t+". "+e.$t("GOAL"+t)},null,8,Ni)]))),128))])])):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"button is-primary is-rounded is-small",disabled:cs.isLoading||!i.item.name||i.item.description?.length<20,onClick:t[47]||(t[47]=(0,n.D$)((...e)=>us.generateSDGs&&us.generateSDGs(...e),["prevent"]))},[(0,s.Lk)("span",Di,[(0,s.Lk)("span",Xi,[(0,s.bF)(ps,{icon:"fa-light fa-stars"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Detect SDGs")),1)])],8,Ui),!i.item.name||i.item.description?.length<20?((0,s.uX)(),(0,s.CE)("p",Vi,(0,a.v_)(e.$t("SDG detection requires an event title and a 20+ character description")),1)):(0,s.Q3)("",!0),e.isGranted("ROLE_ADMIN_TENANT")?((0,s.uX)(),(0,s.CE)("p",Ri,[(0,s.Lk)("a",{onClick:t[48]||(t[48]=(...e)=>us.disableSDG&&us.disableSDG(...e))},[(0,s.Lk)("span",Oi,[(0,s.Lk)("span",Qi,[(0,s.bF)(ps,{icon:"fa-light fa-cog"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Disable SDG functionality")),1)])])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),e.tenant.settingFeatures.events.sendAttendanceReminder?((0,s.uX)(),(0,s.Wv)(fs,{key:7,class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(Ts,{modelValue:i.item.sendAttendanceReminder,"onUpdate:modelValue":t[49]||(t[49]=e=>i.item.sendAttendanceReminder=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Send attendance reminder 24 hours after event ends")),1)]),_:1},8,["modelValue"])]),_:1})):(0,s.Q3)("",!0),e.tenant.settingFeatures.events.restrictEventsByUserType&&(e.isGranted("EVENT_TENANT")||e.isGranted("ADMIN_TENANT"))?((0,s.uX)(),(0,s.CE)("div",Bi,[(0,s.bF)(fs,{label:e.$t("Restrict editing to user type")},{default:(0,s.k6)(()=>[(0,s.bF)(vs,{modelValue:i.item.allowedUserType,"onUpdate:modelValue":t[50]||(t[50]=e=>i.item.allowedUserType=e),expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("option",Gi,(0,a.v_)(e.$t("No restriction")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(cs.userTypeRoles,e=>((0,s.uX)(),(0,s.CE)("option",{key:e["@id"],value:e["@id"]},(0,a.v_)(e.name),9,Wi))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),(0,s.Lk)("p",ji,(0,a.v_)(e.$t("Only local users with this user type will be able to edit this event")),1)])):(0,s.Q3)("",!0),!i.item.id&&e.isGranted("EVENT_TENANT")&&!us.isSelectedUnitPrivate&&e.tenant.settingFeatures.events.propagateEventsAllToLocalCenters&&e.tenant.settingFeatures.localCenter.isActive?((0,s.uX)(),(0,s.CE)("div",zi,[(0,s.bF)(fs,null,{default:(0,s.k6)(()=>[(0,s.bF)(Ts,{modelValue:cs.propagateToLocalCenters,"onUpdate:modelValue":t[51]||(t[51]=e=>cs.propagateToLocalCenters=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Propagate event to all local centers")),1)]),_:1},8,["modelValue"])]),_:1}),(0,s.Lk)("p",qi,(0,a.v_)(e.$t("When enabled, this event will be automatically created as published for each active local center")),1),cs.propagateToLocalCenters?((0,s.uX)(),(0,s.CE)("p",Ji,(0,a.v_)(e.$t("Copies are published to every chapter right away. To test first, create the event without propagation.")),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),!i.item.id&&cs.propagateToLocalCenters&&(e.isGranted("EVENT_TENANT")||e.isGranted("EVENT_LOCAL"))?((0,s.uX)(),(0,s.CE)("div",Hi,[(0,s.bF)(fs,null,{default:(0,s.k6)(()=>[(0,s.bF)(Ts,{modelValue:cs.sendInvitesToMembers,"onUpdate:modelValue":t[52]||(t[52]=e=>cs.sendInvitesToMembers=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Send invites to members")),1)]),_:1},8,["modelValue"])]),_:1}),(0,s.Lk)("p",Ki,(0,a.v_)(e.$t("Invites will be sent to members of all local centers")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",Yi,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded is-fullwidth",{"is-loading":cs.isLoading}]),disabled:cs.isLoading,type:"submit"},(0,a.v_)(e.$t("save")),11,Zi)]),e.$isMobile()?((0,s.uX)(),(0,s.CE)("div",es)):(0,s.Q3)("",!0)])])],32),((0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[cs.showCropper?((0,s.uX)(),(0,s.CE)("div",ts,[(0,s.Lk)("div",{class:(0,a.C4)(["cropper-modal-card",{"is-mobile":e.$isMobile()}])},[(0,s.Lk)("div",is,[(0,s.Lk)("span",ss,(0,a.v_)(e.$t("moveAndScale")),1)]),(0,s.Lk)("div",as,[cs.cropperImageData?((0,s.uX)(),(0,s.Wv)(Ms,{key:0,ref:"cropper",src:cs.cropperImageData,"border-radius":12,"crop-size":.92,"output-type":"image/jpeg","output-quality":.9,onReady:us.onCropperReady},null,8,["src","onReady"])):(0,s.Q3)("",!0),cs.isCropperReady?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ns,[...t[61]||(t[61]=[(0,s.Lk)("span",{class:"loader"},null,-1)])]))]),(0,s.Lk)("div",os,[(0,s.Lk)("button",{type:"button",class:"cropper-btn cropper-btn-cancel",disabled:cs.isCropping,onClick:t[54]||(t[54]=(...e)=>us.cancelCrop&&us.cancelCrop(...e))},(0,a.v_)(e.$t("cancel")),9,ls),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["cropper-btn cropper-btn-confirm",{"is-loading":cs.isCropping}]),disabled:cs.isCropping||!cs.isCropperReady,onClick:t[55]||(t[55]=(...e)=>us.cropAndSave&&us.cropAndSave(...e))},(0,a.v_)(e.$t("choose")),11,rs)])],2)])):(0,s.Q3)("",!0)]))])}i(44114),i(18111),i(22489),i(20116),i(30531),i(7588),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var cs=i(65284),us=i(40834),ms=i(53719),ps=i(95093),hs=i.n(ps),gs=i(90957),fs=i(61273),bs=i(38221),ys=i.n(bs),vs=i(31823),ks=i(2594),Cs=i(53588),Ls=i(95256),ws=i(10997),_s=i(36049),Es={props:["item","saveSuccess","operation"],data(){return{eventTypes:null,eventStatuses:null,unit:this.$store.state.currentGroup,trainingTypes:null,isLoading:!1,eventTemplates:[],selectedTemplate:null,isLoadingTemplates:!1,showTemplatePickerModal:!1,previewingTemplate:null,previewTicketsExpanded:!1,previewVouchersExpanded:!1,showGeneralMeeting:!1,showTraining:!1,hasEndDate:!this.item?.id||this.item.dateTimeEnd&&this.item.dateTimeEnd!==this.item.dateTimeBegin,timeOptions:[],settingsOpenFields:!1,descriptionOpen:!1,gamificationOpen:!1,placeId:null,staticMapImageUrl:null,placesAPIData:null,placesAPIDataIDs:null,isFetching:!1,selectedLocation:null,googleMapsCoordinatesRedirect:null,badges:[],filteredBadges:[],selectedBadgeName:"",propagateToLocalCenters:!1,sendInvitesToMembers:!1,pendingLogoFile:null,pendingLogoPreview:null,
1showCropper:!1,cropperImageData:null,isCropperReady:!1,isCropping:!1,userTypeRoles:[],timezoneSearch:"",popularTimezones:[{value:"America/Los_Angeles",label:"Pacific Time - Los Angeles"},{value:"America/Chicago",label:"Central Time - Chicago"},{value:"America/Toronto",label:"Eastern Time - Toronto"},{value:"America/New_York",label:"Eastern Time - New York"},{value:"America/Sao_Paulo",label:"Brasilia Standard Time - São Paulo"},{value:"Europe/London",label:"United Kingdom Time - London"},{value:"Europe/Madrid",label:"Central European Time - Madrid"},{value:"Europe/Paris",label:"Central European Time - Paris"},{value:"Europe/Bucharest",label:"Eastern European Time - Bucharest"},{value:"Asia/Dubai",label:"Gulf Standard Time - Dubai"},{value:"Asia/Kolkata",label:"India Standard Time - Kolkata"},{value:"Asia/Singapore",label:"Singapore Standard Time - Singapore"},{value:"Asia/Tokyo",label:"Japan Standard Time - Tokyo"}]}},watch:{"item.hasEventTicketing":{handler(e){e&&(this.item.requiresRegistrationForm=!0)}},"item.unit":{handler(){this.isSelectedUnitPrivate&&this.item.isPublic&&(this.item.isPublic=!1)},immediate:!0},"item.dateTimeBegin":{handler(e){if(!e||!this.item.dateTimeEnd||!this.hasEndDate)return;const t=new Date(e),i=new Date(this.item.dateTimeEnd);if(i<t){let t=hs()(e).tz(this.item.timezone);this.item.dateTimeEnd=t.add(2,"hours").toDate(),this.item.timeEnd=hs()(this.item.dateTimeEnd).tz(this.item.timezone).format("HH:mm")}}}},mounted(){this.item.timezone||(this.item.timezone=this.user.timezone?this.user.timezone:this.tenant.timezone),this.item.timeBegin&&"string"===typeof this.item.timeBegin||(this.item.timeBegin=this.item.dateTimeBegin?hs()(this.item.dateTimeBegin).format("HH:mm"):null),this.item.dateTimeEnd?this.item.timeEnd&&"string"===typeof this.item.timeEnd||(this.item.timeEnd=hs()(this.item.dateTimeEnd).format("HH:mm")):this.item.timeEnd=null,this.item.location&&(this.selectedLocation=this.item.location),this.item.placesApiId&&(this.placeId=this.item.placesApiId,this.getStaticMapImage()),this.tenant?.settingFeatures?.gamification?.hasEventBadge&&(this.loadBadges(),this.item.badge&&(this.selectedBadgeName=this.item.badge.name)),"create"===this.operation&&setTimeout(()=>{if(this.$refs.titleInput?.$el){const e=this.$refs.titleInput.$el.querySelector("input");e&&e.focus()}},100),this.item.description&&this.item.description.length>0&&(this.descriptionOpen=!0)},created(){if(!this.item.id&&this.tenant.settingFeatures.gamification.hasTiers&&this.tenant.settingFeatures.gamification.pointRules.event.defaultPoints){const e=this.tenant.settingFeatures.gamification.pointRules.event.defaultPoints;this.item.gamificationPoints=e?parseInt(e,10):null}if(this.$route.query.unit||this.item.id||!this.unit){if(this.$route.query.unit){const e=this.$store.state.spaces[this.tenant.slug]?.myGroups||[],t=e.find(e=>e.id===parseInt(this.$route.query.unit));t?(this.unit=t,this.item.unit=t["@id"]):this.$http.plain.get("/units/"+this.$route.query.unit).then(e=>{this.unit=e.data,this.item.unit=this.unit["@id"]}
1).catch(e=>console.error(e))}}else this.item.unit=this.unit["@id"]?this.unit["@id"]:null;if("create"===this.operation&&(this.isLoadingTemplates=!0,this.$http.plain.get("/event_templates_for_create").then(e=>{this.eventTemplates=e.data["hydra:member"]||[],this.eventTemplates.length>0&&this.$emit("has-templates",!0)}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingTemplates=!1})),this.$http.plain.get("/event_types?tenantSlug="+this.tenant.slug).then(e=>{this.eventTypes=e.data["hydra:member"],this.checkCustomEvent()}).catch(e=>console.error(e)),this.$http.plain.get("/event_statuses").then(e=>{this.eventStatuses=e.data["hydra:member"]}).catch(e=>console.error(e)),this.tenant.settingFeatures.events.restrictEventsByUserType&&this.$http.plain.get("/roles?isUserType=1").then(e=>{this.userTypeRoles=e.data["hydra:member"]}).catch(e=>console.error(e)),!this.item.dateTimeBegin){let e=this.$route.query.dateBegin,t=hs()(new Date).seconds(0);e&&(t=hs()(new Date(e)).seconds(0)),t.minutes()>=30?this.item.dateTimeBegin=t.add(1,"hours").minutes(0).toDate():this.item.dateTimeBegin=t.minutes(30).toDate(),this.setDateTimeEnd(this.hasEndDate)}void 0===this.item?.sendAttendanceReminder&&this.tenant.settingFeatures.events.sendAttendanceReminder&&(this.item.sendAttendanceReminder=!0);const e=Array.from({length:24},(e,t)=>t<=9?"0"+t:t.toString()),t=["00","15","30","45"];this.timeOptions=e.flatMap(e=>t.map(t=>`${e}:${t}`))},methods:{setGamificationPoints(e){const t=parseInt(e,10);this.item.gamificationPoints=isNaN(t)?null:t},onPublicAttendeeListChange(e){!e&&this.item.hasNetworking&&(this.item.hasNetworking=!1)},createTemplateTicketsAndFields(e){const t=e.data.uuid,i=[];if(this.item._templateLogo&&this.item._templateId&&i.push(this.$http.plain.post(`/events/${t}/copy-template-logo`,{templateId:this.item._templateId}).catch(e=>{console.error(e)})),this.item._templateTicketTypes&&this.item._templateTicketTypes.length>0&&e.data.product){const t=e.data.product["@id"]||e.data.product,s=this.item._templateTicketTypes,a=[],n=s.map(e=>this.$http.plain.post("/product_prices",{product:t,name:e.name,price:e.price,maxSeats:e.maxSeats?parseInt(e.maxSeats,10):null,fullDescription:e.fullDescription||e.description||"",isRestricted:"members"===e.isRestricted||!0===e.isRestricted?"members":null,allowedFeeProductPrices:(e.allowedFeeProductPrices||[]).map(e=>"string"===typeof e?e:e["@id"]||`/api/v1/product_prices/${e.id}`),allowedLocalCenters:(e.allowedLocalCenters||[]).map(e=>"string"===typeof e?e:e["@id"]).filter(Boolean),displayNameOnPaymentPage:!0}));i.push(Promise.all(n).then(t=>{const i=[],n={},o=t.map(e=>e.data["@id"]);s.forEach((e,t)=>{e.key&&(n[e.key]=o[t])});const l=new Map;s.forEach((e,t)=>{(e.addons||[]).forEach(e=>{const i=e.key||"i"+t+"-"+e.name;l.has(i)||l.set(i,{addon:e,tickets:[]}),l.get(i).tickets.push(o[t])})}),l.forEach(({addon:e,tickets:t})=>{i.push(this.$http.plain.post("/product_price_addons",{productPrices:t,name:e.name,description:e.description||null,price:e.price||0,maxQuantityPerTicket:e.maxQuantityPerTicket||null,createsAttendee:e.createsAttendee||!1,maxTotal:e.maxTotal||null}).catch(t=>{console.error(t),a.push(this.$t("Add-on")+" "+e.name)}))});const r=this.item._templateVoucherDefinitions;if(r&&r.length>0){const t=e.data["@id"];r.forEach(e=>{const s="fixed"!==e.discountType,l={event:t,code:e.code,discountType:s?"percentage":"fixed",discountValue:String(e.discountValue||0),maxUses:e.maxUses||null,maxTickets:s&&e.maxTickets||null,maxDiscountAmount:s&&e.maxDiscountAmount?String(e.maxDiscountAmount):null,currency:s?null:(this.tenant.currency||"eur").toUpperCase(),isActive:void 0===e.isActive||!!e.isActive},r=(e.ticketKeys||[]).map(e=>n[e]).filter(Boolean),d=(e.allowedTicketIndices||[]).map(e=>o[e]).filter(Boolean),c=r.length?r:d;c.length&&(l.allowedTicketTypes=c),i.push(this.$http.plain.post("/event_vouchers",l).catch(t=>{console.error(t),a.push(this.$t("Voucher")+" "+e.code)}))})}return Promise.all(i)}).catch(e=>{console.error(e),a.push(this.$t("Tickets"))}).finally(()=>{a.length&&this.$buefy.toast.open({type:"is-danger",duration:8e3,message:this.$t("Some template items could not be created: {list}. Check the Tickets page.",{list:a.join(", ")})})}))}if(this.item._templateCustomFieldDefinitions&&this.item._templateCustomFieldDefinitions.length>0){const e=this.item._templateCustomFieldDefinitions.map(e=>{const i={name:e.label,fieldType:e.type};return e.fieldOptions&&e.fieldOptions.length>0&&(i.options=e.fieldOptions),this.$http.plain.post(`/events/${t}/custom-fields`,i).catch(e=>(console.error(e),null))});
1i.push(Promise.all(e).then(e=>{const i=e.filter(e=>e&&e.data).map(e=>e.data.id);return this.applyTemplateRegistrationForm(t,i)}).catch(e=>{console.error(e)}))}else this.item.settings?.registrationForm&&this.item.settings.registrationForm.length>0&&i.push(this.applyTemplateRegistrationForm(t,[]));return Promise.all(i).catch(e=>{console.error(e)})},applyTemplateRegistrationForm(e,t){const i=this.item.settings?.registrationForm;if(!i||0===i.length)return Promise.resolve();const s=i.map((e,i)=>{if("standard"===e.type)return{type:"standard",key:e.key,mandatory:e.mandatory,position:i};const s=t[e.customFieldIndex];return s?{type:"custom",customFieldId:s,mandatory:e.mandatory,position:i}:null}).filter(e=>null!==e);return 0===s.length?Promise.resolve():this.$http.plain.patch(`/events/${e}/registration-form`,{fields:s}).catch(e=>{console.error(e)})},getFormFieldLabel(e,t){const i={email:this.$t("Email"),name:this.$t("Name"),phone:this.$t("Phone"),organisation:this.$t("Organisation"),role:this.$t("Role"),town_current:this.$t("Town"),linkedin:this.$t("LinkedIn"),twitter:this.$t("X (Twitter)"),instagram:this.$t("Instagram"),company_identifier:this.$t("Company Identifier"),company_name:this.$t("Company Name"),company_address:this.$t("Company Address")};if("standard"===e.type&&e.key)return i[e.key]||e.key;if("custom"===e.type&&t.customFieldDefinitions){const i=t.customFieldDefinitions[e.customFieldIndex];if(i)return i.label}return e.label||this.$t("Custom field")},selectTemplate(e){this.selectedTemplate=e,this.applyTemplate(e),this.showTemplatePickerModal=!1,this.$emit("template-selected",e?e.name:null)},clearTemplate(){this.selectedTemplate=null;const e=this.item.timezone,t=this.item.unit;this.item.name="",this.item.type=null,this.item.location=null,this.item.placesApiId=null,this.item.placeLatitude=null,this.item.placeLongitude=null,this.selectedLocation="",this.placeId=null,this.staticMapImageUrl=null,Object.assign(this.item,{description:null,settings:{tenantLogo:!0,heroRadius:null,showTitle:!0,colorSelection:null,colorButton:null,disableSubscribe:!1,disableRegister:!1,lightThemeOnly:!1,isThankYouSingular:!1,enableSpeakers:!1,allowSendLinksLater:!1},isPublic:!0,hasEventTicketing:!1,hasPublicAttendeeList:!0,hasNetworking:!1,requiresRegistrationForm:!1,sendOneHourReminder:!1,maxCapacity:null,registrationFormText:null,_templateTicketTypes:null,_templateCustomFieldDefinitions:null,_templateVoucherDefinitions:null,_templateLogo:null}),this.item.timezone=e,this.item.unit=t,this.pendingLogoPreview=null,this.showTemplatePickerModal=!1,this.$emit("template-selected",null)},applyTemplate(e){e&&(e.title&&(this.item.name=e.title),e.location&&(this.item.location=e.location,this.selectedLocation=e.location,this.resolveTemplateLocation(e.location)),e.type&&(this.item.type=e.type["@id"]||e.type),e.description&&(this.item.description=e.description),e.settings&&(this.item.settings={...this.item.settings,...e.settings}),this.item.isPublic=e.isPublic,this.item.hasEventTicketing=e.hasEventTicketing,this.item.requiresRegistrationForm=e.requiresRegistrationForm,this.item.sendOneHourReminder=e.sendOneHourReminder??!1,this.item.maxCapacity=e.maxCapacity,this.item.registrationFormText=e.registrationFormText,this.item._templateTicketTypes=e.ticketTypes,this.item._templateCustomFieldDefinitions=e.customFieldDefinitions,this.item._templateVoucherDefinitions=e.voucherDefinitions,e.logo&&(this.pendingLogoPreview=e.logo,this.item._templateLogo=e.logo,this.item._templateId=e.id))},setCustomStatus(e){this.item.customStatus!==e&&(this.item.customStatus=e)},getCustomStatusLabel(){if(!this.item.customStatus)return this.$t("None");const e=this.sortedEventStatuses.find(e=>e["@id"]===this.item.customStatus);return e?e.name:this.$t("None")},getSelectedStatusButtonStyle(){if(!this.item.customStatus)return{};const e=this.sortedEventStatuses.find(e=>e["@id"]===this.item.customStatus);return e?.color?this.getStatusColorStyle(e.color):{}},getStatusColorStyle(e){if(!e)return{};const t="dark"===this.$store.state.theme;return{backgroundColor:`var(--${e}-${t?"800":"200"})`,color:`var(--${e}-${t?"200":"800"})`,borderColor:`var(--${e}-${t?"700":"300"})`}},disableSDG(){let e={...this.tenant.settingFeatures};return e.events.hasSDG=!1,this.isLoading=!0,this.$http.plain.patch("/tenants/"+this.tenant.id,{settingFeatures:e}).then(e=>
1{this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success"}),this.isLoading=!1}).catch(e=>console.error(e))},checkTimezone(){"object"===typeof this.item.timezone&&this.item.timezone.value&&(this.item.timezone=this.item.timezone.value)},saveSDG(e){e&&(this.item.sdg.push(e.id),this.item.sdg.sort((e,t)=>e-t),this.item.sdg=[...new Set(this.item.sdg)])},removeSDG(e){this.item.sdg=this.item.sdg.filter(t=>t!==e)},updateAttendability(){this.item.hasEventTicketing&&(this.item.requiresRegistrationForm=!0),this.item.isPublic&&(this.item.requiresRegistrationForm=!0)},save(){this.isLoading||(this.isLoading=!0,(0,Ls.gZ)(this,[{fieldName:"description",refName:"tiptapEditor"}],this.item).then(()=>{this.performSave()}).catch(e=>{console.error("Error uploading pending images:",e),this.isLoading=!1,this.$buefy.toast.open({message:this.$t("Failed to upload images"),type:"is-danger",duration:5e3})}))},performSave(){let e=this.item,t=(0,_s.dN)(e.dateTimeBegin,e.timeBegin,this.item.timezone);if(e.dateTimeBegin=t.clone().utc().toDate(),this.hasEndDate){let t=(0,_s.dN)(e.dateTimeEnd,e.timeEnd||e.timeBegin,this.item.timezone);e.dateTimeEnd=t.clone().utc().toDate()}else e.dateTimeEnd=null;let i={...e};i.maxCapacity||0===i.maxCapacity||(i.maxCapacity=null),delete i.timeBegin,delete i.timeEnd,delete i.logoFromAlbum,delete i.logo,"create"===this.operation&&(delete i["@id"],delete i["@type"],delete i["@context"],delete i.id,delete i.uuid);let s=this.$http.plain.post,a="/events";"update"===this.operation&&(s=this.$http.plain.patch,a+="/"+this.item.uuid),this.selectedLocation||(i.location=null,i.placesApiId=null),i.product&&(i.product=i.product["@id"]),i.badge&&i.badge["@id"]?i.badge=i.badge["@id"]:i.badge||(i.badge=null),i.unit&&i.unit["@id"]&&(i.unit=i.unit["@id"]),i.unit&&"string"===typeof i.unit&&i.unit.includes("/groups/")&&(i.unit=i.unit.replace("/groups/","/units/")),i.customStatus&&i.customStatus["@id"]&&(i.customStatus=i.customStatus["@id"]);const n="create"===this.operation&&this.propagateToLocalCenters,o="create"===this.operation&&this.sendInvitesToMembers,l=this.pendingLogoFile;n&&(i.propagateToLocalCenters=!0,o&&(i.sendInvitesToMembers=!0)),s(a,i).then(e=>{if(n&&e.data.redirectToEventListing)return o?this.$buefy.toast.open({message:this.$t("Event propagated to all local centers. Invites are being sent to members"),type:"is-success",duration:6e3}):this.$buefy.toast.open({message:this.$t("Event propagated to all local centers"),type:"is-success",duration:5e3}),this.$router.push({name:"EventList"}),null;const t=this.item.dateTimeBegin,i=this.item.dateTimeEnd,s=this.item._templateTicketTypes,a=this.item._templateCustomFieldDefinitions,r=this.item._templateLogo,d=this.item._templateId,c=this.item._templateVoucherDefinitions;return Object.assign(this.item,e.data),this.item.dateTimeBegin=t,this.item.dateTimeEnd=i,this.item._templateTicketTypes=s,this.item._templateCustomFieldDefinitions=a,this.item._templateLogo=r,this.item._templateId=d,this.item._templateVoucherDefinitions=c,l?this.uploadPendingLogo().then(()=>e).catch(()=>e):e}).then(e=>{if(!e)return;const t=this.createTemplateTicketsAndFields(e),i=()=>{this.saveSuccess(e),window.dispatchEvent(new CustomEvent("event-updated",{detail:{uuid:this.item.uuid}})),o&&(this.sendInvites(!1),this.$buefy.toast.open({message:this.$t("Invites are being sent to members"),type:"is-success",duration:5e3})),e.data.customStatus&&e.data.customStatus.isFinal&&this.showFinalStatusCongratulations()};if(t&&"function"===typeof t.then)return t.then(()=>i()).catch(()=>i());i()}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},setDateTimeEnd(e){if(e){let e=hs()(this.item.dateTimeBegin).tz(this.item.timezone);this.item.dateTimeEnd=e.add(2,"hours").toDate(),this.item.timeEnd=hs()(this.item.dateTimeEnd).tz(this.item.timezone).format("HH:mm")}else this.item.dateTimeEnd=null},checkCustomEvent(){this.tenant.settingFeatures.events.generalMeetingEventType&&(this.item.type&&this.item.type.id===parseInt(this.tenant.settingFeatures.events.generalMeetingEventType)?(this.showGeneralMeeting=!0,this.item.isGeneralMeeting=!0):(this.showGeneralMeeting=!1,this.item.isGeneralMeeting=!1,this.item.isGeneralMeetingEx=!1,this.item.isGeneralMeetingElection=!1)),this.tenant.settingFeatures.events.trainingEventType&&(this.item.type&&this.item.type.id===parseInt(this.tenant.settingFeatures.events.trainingEventType)?(this.showTraining=!0,this.trainingTypes||this.$http.plain.get("/training_types").then(e=>{this.trainingTypes=e.data["hydra:member"]}).catch(e=>console.error(e))):this.showTraining=!1)},showFinalStatusCongratulations(){this.$buefy.dialog.alert({title:this.$t("Congratulations!"),message:this.$t("Great work!\nYour event has wrapped up successfully."),type:"is-success",hasIcon:!0,icon:"check-circle",iconPack:"fal",ariaRole:"alertdialog",ariaModal:!0})},generateSDGs(){if(!this.item.name||!this.item.description||this.item.description.length<20)return this.$buefy.toast.o
1pen({message:this.$t("SDG detection requires an event title and a 20+ character description"),type:"is-danger"});this.isLoading=!0,this.$http.plain.post("/generate-event-sdgs",{eventTitle:this.item.name,eventDescription:this.item.description}).then(e=>{if(e.data.length){let t=e.data.split(",");this.item.sdg=[],t.forEach(e=>{let t={id:e};this.saveSDG(t)})}else this.$buefy.toast.open({message:this.$t("No SDG found with GPT"),type:"is-warning"})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},getStaticMapImage(){this.isLoading=!0,this.$http.plain.get("get-static-image/"+this.placeId).then(e=>{this.staticMapImageUrl=e.data.imageUrl,this.item.placeLatitude=e.data.latitude,this.item.placeLongitude=e.data.longitude,this.googleMapsCoordinatesRedirect=`https://www.google.com/maps/place/${this.item.placeLatitude},${this.item.placeLongitude}`}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},getAsyncData:ys()(function(e){if("object"===typeof e&&e?.key&&["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return;const t="string"===typeof e?e:this.selectedLocation;if(!t||t.length<3)return this.placesAPIData=[],void(this.placesAPIDataIDs=[]);this.isFetching=!0,this.$http.plain.get("/google-places-search/"+t).then(e=>{this.placesAPIData=[],this.placesAPIDataIDs=[];for(let t of e.data)this.placesAPIData.push(t.name),this.placesAPIDataIDs.push(t)}).catch(e=>{throw this.placesAPIData=[],this.placesAPIDataIDs=[],e}).finally(()=>{this.isFetching=!1})},300),onLocationFocus(){this.selectedLocation&&this.selectedLocation.length>=3&&this.getAsyncData(this.selectedLocation)},change(e){if(e){for(let t=0;t<this.placesAPIDataIDs.length;t++)this.placesAPIDataIDs[t].name===e&&(this.placeId=this.item.placesApiId=this.placesAPIDataIDs[t].placeId,this.staticMapImageUrl=null);this.item.location=this.selectedLocation=e,this.getStaticMapImage()}},resolveTemplateLocation(e){this.$http.plain.get("/google-places-search/"+e).then(e=>{if(e.data&&e.data.length>0){const t=e.data[0];this.placeId=this.item.placesApiId=t.placeId,this.item.location=t.name,this.selectedLocation=t.name,this.staticMapImageUrl=null,this.getStaticMapImage()}}).catch(e=>{console.error(e)})},async loadBadges(){try{const e=await this.$http.plain.get("/badges",{params:{tenantSlug:this.tenant.slug,"order[name]":"asc",pagination:!1}});this.badges=e.data["hydra:member"]||[],this.filteredBadges=this.badges}catch(e){console.error(e)}},filterBadges(e){this.filteredBadges=e?this.badges.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())):this.badges},selectBadge(e){e?(this.item.badge=e,this.selectedBadgeName=e.name):(this.item.badge=null,this.selectedBadgeName="")},handlePendingLogoUpload(e){if(!e)return this.pendingLogoPreview=null,void(this.pendingLogoFile=null);const t=52428800;if(e.size>t)return this.$buefy.toast.open({message:this.$t("File size exceeds maximum allowed size"),type:"is-danger"}),void(this.pendingLogoFile=null);const i=new FileReader;i.onload=e=>{this.pendingLogoPreview=e.target.result},i.readAsDataURL(e),"update"===this.operation&&this.item.id?this.uploadLogoImmediately(e):this.pendingLogoFile=e},uploadLogoImmediately(e){const t=new FormData;t.append("file",e),t.append("type","event"),t.append("entity_id",this.item.id),this.isLoading=!0,this.$http.plain.post("/media_objects",t,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>{this.item.logo=e.data.contentUrl,this.pendingLogoFile=null,this.pendingLogoPreview=null,this.$buefy.toast.open({message:this.$t("Image uploaded successfully"),type:"is-success",duration:2e3})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Failed to upload image"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},uploadPendingLogo(){if(!this.pendingLogoFile||!this.item.id)return Promise.resolve();const e=new FormData;return e.append("file",this.pendingLogoFile),e.append("type","event"),e.append("entity_id",this.item.id),this.$http.plain.post("/media_objects",e,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>{this.item.logo=e.data.contentUrl,this.pendingLogoFile=null,this.pendingLogoPreview=null}).catch(e=>{console.error(e);const t="ECONNABORTED"===e.code||e.message?.includes("timeout"),i="Network Error"===e.message,s=413===e.response?.status;let a="";throw a=t?this.$t("The upload timed out. Please try again with a smaller image."):i?this.$t("Network error. Please check your internet connection and try again."):s?this.$t("The image is too large. Please use a smaller image."):this.$t("Please try again by editing the event."),this.$buefy.toast.o
1pen({message:this.$t("Failed to upload image")+". "+a,type:"is-danger",duration:8e3}),e})},onLogoFileSelected(e){if(!e)return;const t=new FileReader;t.onload=e=>{this.cropperImageData=e.target.result,this.showCropper=!0,this.isCropperReady=!1},t.readAsDataURL(e)},onCropperReady(){this.isCropperReady=!0},cancelCrop(){this.showCropper=!1,this.cropperImageData=null,this.isCropperReady=!1,this.pendingLogoFile=null},cropAndSave(){this.$refs.cropper&&(this.isCropping=!0,this.$refs.cropper.crop().then(e=>{this.handlePendingLogoUpload(e),this.showCropper=!1,this.cropperImageData=null,this.isCropperReady=!1}).catch(e=>{console.error("Error during cropping:",e)}).finally(()=>{this.isCropping=!1}))},sendInvites(e=!1){return this.item.id?this.$http.plain.post(`/events/${this.item.uuid}/send-invites`,{propagated:e}).then(()=>{}).catch(e=>{throw console.error(e),this.$buefy.toast.open({message:this.$t("Failed to send invites"),type:"is-danger"}),e}):Promise.resolve()},formatDateShort(e){return e?hs()(e).format(this.$filters.datePattern("weekdayShort")):""},addEndTime(){this.hasEndDate=!0,this.setDateTimeEnd(!0)},removeEndTime(){this.hasEndDate=!1,this.setDateTimeEnd(!1)},selectTimezone(e){this.item.timezone=e,this.timezoneSearch="",this.$refs.timezoneDropdown&&(this.$refs.timezoneDropdown.isActive=!1)},onTimezoneDropdownChange(e){e&&this.$nextTick(()=>{this.$refs.timezoneSearchInput&&this.$refs.timezoneSearchInput.focus()})}},computed:{...(0,us.L8)(["tenant","user","isGranted","sdgGoals"]),isPastEvent(){return"create"===this.operation&&(0,_s.bK)({dateTimeBegin:this.item.dateTimeBegin,timeBegin:this.item.timeBegin,dateTimeEnd:this.hasEndDate?this.item.dateTimeEnd:null,timeEnd:this.item.timeEnd,timezone:this.item.timezone})},logoSrc(){return this.item?.logo?this.item.logo.includes("demo__")?this.item.logo.replace("demo__",""):this.item.logo:null},sortedEventStatuses(){return this.eventStatuses?[...this.eventStatuses].sort((e,t)=>(e.position||0)-(t.position||0)):[]},unitName(){return this.$route.query.generalUnit||this.item.id&&null==this.item.unit?this.tenant.name:this.unit&&this.unit["@id"]&&"Tenant"!==this.unit["@type"]?this.unit.name:null},isGroup(){return!(!this.unit||"Group"!==this.unit["@type"])},selectedUnit(){if(!this.unit){const e=this.$store.state.spaces[this.tenant.slug]?.myGroups||[];return e.find(e=>e["@id"]===this.item.unit)}return this.unit},isSelectedUnitPrivate(){return this.selectedUnit&&(!1===this.selectedUnit.isJoinable||null===this.selectedUnit.isJoinable)},canPostPublicByTenantSetting(){const e=this.tenant?.settingFeatures?.events?.whoCanPostPublic;return!!e&&this.isGranted(e)},formattedTimezoneOffset(){if(!this.item.timezone)return"";const e=hs().tz(this.item.timezone).format("Z");return`GMT${e}`},formattedTimezoneCity(){if(!this.item.timezone)return"";const e=this.item.timezone.split("/");return e[e.length-1].replace(/_/g," ")},filteredPopularTimezones(){const e=this.timezoneSearch.toLowerCase();return this.popularTimezones.map(e=>({...e,offset:`GMT${hs().tz(e.value).format("Z")}`})).filter(t=>!e||t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},allTimezones(){return hs().tz.names().map(e=>{const t=e.split("/"),i=t[t.length-1].replace(/_/g," "),s=t.length>1?t[0].replace(/_/g," "):"";return{value:e,label:`${s?s+" - ":""}${i}`,offset:`GMT${hs().tz(e).format("Z")}`}})},filteredAllTimezones(){const e=this.timezoneSearch.toLowerCase();return e?this.allTimezones.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e)).slice(0,30):this.allTimezones.slice(0,20)}},components:{TipTap:ms.A,FontAwesomeIcon:fs.gc,TimezoneSelect:gs.A,MyGroupsSelect:cs.A,LogoThumbnail:vs.A,LogoUpload:ks.A,ImageCropper:Cs.A,EventMapPreview:ws.A}},$s=i(66262);const Fs=(0,$s.A)(Es,[["render",ds]]);var Ts=Fs},51716:function(e,t,i){"use strict";i.d(t,{A:function(){return N}});var s=i(20641),a=i(90033);const n={class:"user-menu-items"},o={class:"icon-text"},l={class:"icon is-small"},r={class:"icon-text"},d={class:"icon is-small"},c={key:0,class:"tag is-warning is-light is-small is-rounded ml-auto"},u={class:"icon-text"},m={class:"icon is-small"},p={key:0,class:"tag is-danger is-light is-small is-rounded ml-auto"},h={class:"icon-text"},g={class:"icon is-small"},f={class:"ml-auto icon is-small"},b={class:"icon-text"},y={class:"icon is-small"},v={class:"icon-text"},k={class:"icon is-small"},C={class:"icon-text"},L={class:"icon is-small"},w={class:"icon-text"},_={class:"icon is-small"},E={class:"icon-text"},$={class:"icon is-small"}
1,F={key:6,class:"user-menu-divider"},T={class:"icon-text"},S={class:"icon is-small"};function A(e,t,i,A,P,I){const M=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("a",{class:"user-menu-item",onClick:t[0]||(t[0]=t=>e.$emit("navigate",{name:"UserShowMyProfile"}))},[(0,s.Lk)("span",o,[(0,s.Lk)("span",l,[(0,s.bF)(M,{icon:"fa-light fa-user"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("My Profile")),1)])]),e.isGrantedAdhesion(e.user)?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"user-menu-item",onClick:t[1]||(t[1]=t=>e.$emit("navigate",{name:"Adhesion"}))},[(0,s.Lk)("span",r,[(0,s.Lk)("span",d,[(0,s.bF)(M,{icon:"fa-light fa-signature"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("My Adhesion")),1)]),e.user.adhesionCompleted?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",c,(0,a.v_)(e.$t("To complete")),1))])):(0,s.Q3)("",!0),e.userTypeEligibleForFee&&e.user.feeTenantProductPrice?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"user-menu-item",onClick:t[2]||(t[2]=t=>e.$emit("open-fee"))},[(0,s.Lk)("span",u,[(0,s.Lk)("span",m,[(0,s.bF)(M,{icon:"fa-light fa-money-bill-alt"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("My Membership Fee")),1)]),e.user.isFeeActive?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(e.$t("Due")),1))])):(0,s.Q3)("",!0),t[10]||(t[10]=(0,s.Lk)("hr",{class:"user-menu-divider"},null,-1)),(0,s.Lk)("a",{class:"user-menu-item",onClick:t[3]||(t[3]=t=>e.$emit("open-theme"))},[(0,s.Lk)("span",h,[(0,s.Lk)("span",g,[(0,s.bF)(M,{icon:"fa-light fa-palette"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Theme")),1)]),(0,s.Lk)("span",f,[(0,s.bF)(M,{icon:"fa-light fa-chevron-right"})])]),(0,s.RG)(e.$slots,"language"),e.isGranted("ROLE_ADMIN_TENANT")&&!e.$store.state.permissionImpersonation.isActive?((0,s.uX)(),(0,s.CE)("a",{key:2,class:"user-menu-item",onClick:t[4]||(t[4]=t=>e.$emit("open-permission-impersonation"))},[(0,s.Lk)("span",b,[(0,s.Lk)("span",y,[(0,s.bF)(M,{icon:"fa-light fa-user-shield"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Permission Impersonation")),1)])])):(0,s.Q3)("",!0),e.tenant.settingFeatures?.support?.isActive?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"user-menu-item",onClick:t[5]||(t[5]=t=>e.$emit("navigate",{name:"IssueList"}))},[(0,s.Lk)("span",v,[(0,s.Lk)("span",k,[(0,s.bF)(M,{icon:"fa-light fa-circle-question"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Support")),1)])])):(0,s.Q3)("",!0),t[11]||(t[11]=(0,s.Lk)("hr",{class:"user-menu-divider"},null,-1)),(0,s.Lk)("a",{class:"user-menu-item",onClick:t[6]||(t[6]=t=>e.$emit("navigate",{name:"UserUpdate",params:{item:e.user.id},query:{tab:"settings"}}))},[(0,s.Lk)("span",C,[(0,s.Lk)("span",L,[(0,s.bF)(M,{icon:"fa-light fa-user-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Account settings")),1)])]),e.isGranted("ADMIN_TENANT")&&e.user.localCenter?((0,s.uX)(),(0,s.CE)("a",{key:4,class:"user-menu-item",onClick:t[7]||(t[7]=t=>e.$emit("navigate",{name:"LocalCenterUpdate",params:{item:e.user.localCenter.id}}))},[(0,s.Lk)("span",w,[(0,s.Lk)("span",_,[(0,s.bF)(M,{icon:"fa-light fa-landmark-flag"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Chapter settings")),1)])])):(0,s.Q3)("",!0),e.isGranted("ROLE_ADMIN_TENANT")?((0,s.uX)(),(0,s.CE)("a",{key:5,class:"user-menu-item",onClick:t[8]||(t[8]=t=>e.$emit("navigate",{name:"TenantUpdate"}))},[(0,s.Lk)("span",E,[(0,s.Lk)("span",$,[(0,s.bF)(M,{icon:"fa-light fa-cog"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("tenantSettings")),1)])])):(0,s.Q3)("",!0),e.isNativeApp?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("hr",F)),(0,s.RG)(e.$slots,"download"),t[12]||(t[12]=(0,s.Lk)("hr",{class:"user-menu-divider"},null,-1)),(0,s.Lk)("a",{class:(0,a.C4)(["user-menu-item has-text-danger",{"has-text-grey-light":e.$store.state.permissionImpersonation.isActive}]),onClick:t[9]||(t[9]=t=>!e.$store.state.permissionImpersonation.isActive&&e.$emit("sign-out"))},[(0,s.Lk)("span",T,[(0,s.Lk)("span",S,[(0,s.bF)(M,{icon:"fa-light fa-sign-out-alt"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("signOut")),1)])],2)])}var P=i(40834),I={name:"UserMenuItems",emits:["navigate","open-theme","open-fee","open-permission-impersonation","sign-out"],computed:{...(0,P.L8)(["user","tenant","isGranted","isGrantedAdhesion","userTypeEligibleForFee","isNativeApp"])}},M=i(66262);const x=(0,M.A)(I,[["render",A]]);var N=x},52959:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Vi}});i(44114);var s=i(20641),a=i(90033),n=i(53751);const o={class:"o-bigwidth"},l={key:0,class:"contact-edit-fullwidth"},r={key:0,class:"contact-edit-actions mb-4"},d={class:"icon is-small"},c={class:"contact-logo-upload mb-5"},u={key:1,class:"columns is-variable is-4"},m={class:"column is-one-third-desktop is-full-mobile"},p={class:"card p-4"},h={class:"is-flex is-justify-content-space-between is-align-items-center mb-4"},g={class:"title is-size-5 mb-0"},f={class:"icon is-small"},b={class:"contact-avatar mb-4"},y={class:"content"},v={key:0,class:"mb-4","data-test":"contact-middle-name"},k={class:"has-text-weight-semibold is-size-7 mb-1"},C={class:"mb-0"},L={key:1,class:"mb-4"},w={class:"has-text-weight-semibold is-size-7 mb-1"},_={class:"mb-4"},E={class:"has-text-weight-semibold is-size-7 mb-1"},$={key:0,class:"copy-field"},F={class:"mb-0"},T={key:1},S={class:"mb-4"},A={class:"has-text-weight-semibold is-size-7 mb-1"},P={key:0,class:"copy-field"},I={class:"mb-0"},M={key:1},x={key:2,class:"mb-4"},N={class:"has-text-weight-semibold is-size-7 mb-1"},U={key:3,class:"mb-3"},D={class:"has-text-weight-semibold is-size-7 mb-1"},X={key:4,class:"mb-3"},V={class:"has-text-weight-semibold is-size-7 mb-1"},R={key:5,class:"mb-3"},O={class:"has-text-weight-semibold is-size-7 mb-1"},Q={key:6,class:"mb-3"},B={class:"has-text-weight-semibold is-size-7 mb-1"},G={key:0,class:"has-text-grey"},W={key:7,class:"mb-3"},j={class:"has-text-weight-semibold is-size-7 mb-1"},z={class:"has-text-weight-bold has-text-dark mb-3"},q={key:0,class:"mb-3"},J={class:"has-text-weight-semibold is-size-7 mb-1"},H={key:1,class:"mb-3"},K={class:"has-text-weight-semibold is-size-7 mb-1"},Y={class:"has-text-weight-bold has-text-dark mb-3"},Z={key:0,class:"mb-3"},ee={class:"has-text-weight-semibold is-size-7 mb-1"},te={key:1,class:"mb-3"},ie={class:"has-text-weight-semibold is-size-7 mb-1"},se={key:2,class:"mb-3"},ae={class:"has-text-weight-semibold is-size-7 mb-1"},ne={key:3,class:"mb-3"},oe={class:"has-text-weight-semibold is-size-7 mb-1"},le={key:4,class:"mb-3"},re={class:"has-text-weight-semibold is-size-7 mb-1"},de={key:10,class:"mb-2"},ce={class:"mb-2"},ue={class:"tag is-rounded is-default is-small mr-2"},me={class:"mb-2"},pe={class:"tag is-rounded is-default is-small"},he={key:11,class:"mb-2"},ge={key:0,class:"card p-4 mb-4 is-hidden-tablet"},fe={class:"is-flex is-justify-content-space-between is-align-items-center mb-4"}
1,be={class:"title is-size-6 mb-0"},ye={class:"icon-text"},ve={class:"icon is-small"},ke=["title"],Ce={key:0,class:"has-text-centered py-4"},Le={key:1,class:"status-radio-group"},we=["onUpdate:modelValue","value","onChange"],_e={class:"status-radio-content"},Ee={class:"status-radio-label"},$e={key:0,class:"status-arrow","aria-hidden":"true"},Fe={class:"card p-4 mb-4"},Te={class:"title is-size-6 mb-4"},Se={class:"icon-text"},Ae={class:"icon is-small"},Pe={class:"content"},Ie={class:"mb-3"},Me={key:0,class:"tag is-rounded is-light"},xe={key:1,class:"tag is-rounded is-success"},Ne={key:2,class:"tag is-rounded is-default"},Ue={class:"card p-4 mb-4"},De={class:"title is-size-6 mb-4"},Xe={class:"icon-text"},Ve={class:"icon is-small"},Re={class:"content"},Oe={key:0,class:"social-links"},Qe=["href","title"],Be=["href","title"],Ge=["href","title"],We={key:1,class:"has-text-grey-light"},je={class:"card p-4 mb-4"},ze={class:"title is-size-6 mb-4"},qe={class:"icon-text"},Je={class:"icon is-small"},He={key:3,class:"card p-4 mb-4"},Ke={class:"title is-size-6 mb-4"},Ye={class:"icon-text"},Ze={class:"icon is-small"},et={class:"content"},tt={class:"has-text-weight-semibold is-size-7 mb-1"},it={class:"contact-action-buttons is-hidden-mobile mt-5 mb-6"},st={class:"icon is-small"},at={class:"icon is-small"},nt={class:"icon is-small"},ot={class:"column is-two-thirds-desktop is-full-mobile"},lt={class:"cards-container"},rt={key:0,class:"card p-4 mb-4 is-hidden-mobile"},dt={class:"is-flex is-justify-content-space-between is-align-items-center mb-4"},ct={class:"title is-size-6 mb-0"},ut={class:"icon-text"},mt={class:"icon is-small"},pt=["title"],ht={key:0,class:"has-text-centered py-4"},gt={key:1,class:"status-radio-group"},ft=["onUpdate:modelValue","value","onChange"],bt={class:"status-radio-content"},yt={class:"status-radio-label"},vt={key:0,class:"status-arrow","aria-hidden":"true"},kt={class:"card p-4 pb-5 mb-4"},Ct={class:"title is-size-6 mb-4"},Lt={class:"icon-text"},wt={class:"icon is-small"},_t={class:"card p-4 mb-4"},Et={class:"is-flex is-justify-content-space-between is-align-items-center mb-4"},$t={class:"title is-size-6 mb-0"},Ft={class:"icon-text"},Tt={class:"icon is-small"},St={key:0},At={class:"is-size-6 has-text-weight-semibold mb-3"},Pt={class:"orgo-table-wrap"},It={class:"tag is-rounded is-default"},Mt=["href"],xt={class:"icon-text"},Nt={class:"icon is-small"},Ut={key:0},Dt={class:"is-default tag is-rounded"},Xt={key:0,class:"tag is-default is-rounded"},Vt={key:1,class:"tag is-default is-rounded"},Rt={key:0,class:"tag is-rounded is-default"},Ot={key:1,class:"is-rounded is-default tag"},Qt={key:0,class:"tag is-small is-warning is-outlined is-rounded"},Bt={key:1,class:"tag is-small is-danger is-outlined is-rounded"},Gt={key:2,class:"tag is-small is-danger is-outlined is-rounded"},Wt={key:3},jt={class:"tag is-rounded is-default"},zt={key:4,class:"tag is-small is-success is-outlined is-rounded"},qt={key:5,class:"tag is-small is-default is-outlined is-rounded"},Jt=["onClick"],Ht={key:0,class:"is-flex is-justify-content-space-between is-align-items-center mb-3",style:{gap:"8px"}},Kt={class:"is-size-6 has-text-weight-semibold mb-0"},Yt={key:0,class:"orgo-profile-identity"},Zt={class:"orgo-profile-identity-label"},ei={class:"is-flex is-align-items-center"},ti={class:"company-logo-wrapper mr-4"},ii=["src"],si={class:"is-flex-grow-1"},ai={class:"has-text-grey is-size-7 mb-1"},ni={class:"has-text-weight-semibold is-size-5"},oi={class:"has-text-right"},li={class:"tag is-rounded is-primary is-light"},ri={class:"has-text-grey is-size-7 mt-1"},di={key:2,class:"card p-4 mb-4"},ci={class:"title is-size-6 mb-4"},ui={class:"icon-text"},mi={class:"icon is-small"},pi={class:"card p-4 mb-4"},hi={class:"title is-size-6 mb-4"},gi={class:"icon-text"},fi={class:"icon is-small"};function bi(e,t,i,bi,yi,vi){const ki=(0,s.g2)("b-loading"),Ci=(0,s.g2)("font-awesome-icon"),Li=(0,s.g2)("LogoUpload"),wi=(0,s.g2)("ContactForm"),_i=(0,s.g2)("LogoThumbnail"),Ei=(0,s.g2)("PersonalIdField"),$i=(0,s.g2)("BioText"),Fi=(0,s.g2)("router-link"),Ti=(0,s.g2)("UserTags"),Si=(0,s.g2)("EntityNotes"),Ai=(0,s.g2)("ProfileTimeline"),Pi=(0,s.g2)("ListEvent"),Ii=(0,s.g2)("b-button"),Mi=(0,s.g2)("b-table-column"),xi=(0,s.g2)("b-table"),Ni=(0,s.g2)("PaymentIdentityTag"),Ui=(0,s.g2)("Payments"),Di=(0,s.g2)("Contract"),Xi=(0,s.g2)("EmailLogList"),Vi=(0,s.g2)("SendCustomEmailModal");return(0,s.uX)(),(0,s.CE)("section",o,[(0,s.bF)(ki,{modelValue:yi.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>yi.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),yi.item&&yi.isEditing?((0,s.uX)(),(0,s.CE)("div",l,[i.inlineEditActions?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-small is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[1]||(t[1]=(...e)=>vi.saveAndCloseEdit&&vi.saveAndCloseEdit(...e))},[(0,s.Lk)("span",d,[(0,s.bF)(Ci,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("save")),1)],2),(0,s.Lk)("button",{class:"button is-light is-small is-rounded",onClick:t[2]||(t[2]=(...e)=>vi.cancelEdit&&vi.cancelEdit(...e))},(0,a.v_)(e.$t("Cancel")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",c,[(0,s.bF)(Li,{item:yi.item},null,8,["item"])]),(0,s.bF)(wi,{ref:"contactForm",item:yi.item},null,8,["item"])])):yi.item?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("div",m,[(0,s.Lk)("div",p,[(0,s.Lk)("div",h,[(0,s.Lk)("h2",g,(0,a.v_)(yi.item.name),1),(0,s.Lk)("button",{class:"button is-light is-rounded is-small",onClick:t[3]||(t[3]=(...e)=>vi.toggleEdit&&vi.toggleEdit(...e))},[(0,s.Lk)("span",f,[(0,s.bF)(Ci,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Edit")),1)])]),(0,s.Lk)("div",b,[(0,s.bF)(_i,{item:yi.item,"is-type":"roundLarge"},null,8,["item"])]),(0,s.Lk)("div",y,[yi.item.middleName?((0,s.uX)(),(0,s.CE)("div",v,[(0,s.Lk)("p",k,(0,a.v_)(e.$t("Middle name")),1),(0,s.Lk)("p",C,(0,a.v_)(yi.item.middleName),1)])):(0,s.Q3)("",!0),yi.item.hasPersonalIdNumber&&vi.canRevealPersonalId?((0,s.uX)(),(0,s.CE)("div",L,[(0,s.Lk)("p",w,(0,a.v_)(e.$t("Personal identification number")),1),(0,s.bF)(Ei,{"subject-type":"contact","subject-id":yi.item.id,"has-value":!0,"can-reveal":!0,readonly:"",class:"mb-0"},null,8,["subject-id"])])):(0,s.Q3)("",!0),(0,s.Lk)("div",_,[(0,s.Lk)("p",E,(0,a.v_)(e.$t("Email")),1),yi.item.email?((0,s.uX)(),(0,s.CE)("div",$,[(0,s.Lk)("p",F,(0,a.v_)(yi.item.email),1),(0,s.Lk)("button",{class:"copy-icon-btn",onClick:t[4]||(t[4]=e=>vi.copyToClipboard(yi.item.email,"Email"))},[(0,s.bF)(Ci,{icon:"fa-light fa-copy"})])])):((0,s.uX)(),(0,s.CE)("p",T,"-"))]),(0,s.Lk)("div",S,[(0,s.Lk)("p",A,(0,a.v_)(e.$t("phone")),1),yi.item.phone?((0,s.uX)(),(0,s.CE)("div",P,[(0,s.Lk)("p",I,(0,a.v_)(yi.item.phone),1),(0,s.Lk)("button",{class:"copy-icon-btn",onClick:t[5]||(t[5]=e=>vi.copyToClipboard(yi.item.phone,"Phone"))},[(0,s.bF)(Ci,{icon:"fa-light fa-copy"})])])):((0,s.uX)(),(0,s.CE)("p",M,"-"))]),yi.item.town?((0,s.uX)(),(0,s.CE)("div",x,[(0,s.Lk)("p",N,(0,a.v_)(e.$t("town")),1
1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.town.name),1)])):(0,s.Q3)("",!0),yi.item.country?((0,s.uX)(),(0,s.CE)("div",U,[(0,s.Lk)("p",D,(0,a.v_)(e.$t("country")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.country.name),1)])):(0,s.Q3)("",!0),e.contactChaptersEnabled&&yi.item.localCenter?((0,s.uX)(),(0,s.CE)("div",X,[(0,s.Lk)("p",V,(0,a.v_)(e.$t("Chapter")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.localCenter.name),1)])):(0,s.Q3)("",!0),yi.item.gender?((0,s.uX)(),(0,s.CE)("div",R,[(0,s.Lk)("p",O,(0,a.v_)(e.$t("gender")),1),(0,s.Lk)("p",null,(0,a.v_)(vi.getGenderLabel(yi.item.gender)),1)])):(0,s.Q3)("",!0),yi.item.dateBirth?((0,s.uX)(),(0,s.CE)("div",Q,[(0,s.Lk)("p",B,(0,a.v_)(e.$t("birthDay")),1),(0,s.Lk)("p",null,[(0,s.eW)((0,a.v_)(e.$filters.format(yi.item.dateBirth,"date"))+" ",1),yi.item.age?((0,s.uX)(),(0,s.CE)("span",G," ("+(0,a.v_)(yi.item.age)+" "+(0,a.v_)(e.$t("years"))+") ",1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),yi.item.bio?((0,s.uX)(),(0,s.CE)("div",W,[(0,s.Lk)("p",j,(0,a.v_)(e.$t("Bio")),1),(0,s.bF)($i,{bio:yi.item.bio},null,8,["bio"])])):(0,s.Q3)("",!0),yi.item.organisation||yi.item.role?((0,s.uX)(),(0,s.CE)(s.FK,{key:8},[t[21]||(t[21]=(0,s.Lk)("hr",{class:"mt-4 mb-3"},null,-1)),(0,s.Lk)("p",z,(0,a.v_)(e.$t("Professional Info")),1),yi.item.organisation?((0,s.uX)(),(0,s.CE)("div",q,[(0,s.Lk)("p",J,(0,a.v_)(e.$t("Current Organisation/Company")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.organisation),1)])):(0,s.Q3)("",!0),yi.item.role?((0,s.uX)(),(0,s.CE)("div",H,[(0,s.Lk)("p",K,(0,a.v_)(e.$t("Current role")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.role),1)])):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0),yi.item.companyIdentifier||yi.item.companyName||yi.item.companyAddress||yi.item.companyRegNo||yi.item.stripeCustomerId?((0,s.uX)(),(0,s.CE)(s.FK,{key:9},[t[22]||(t[22]=(0,s.Lk)("hr",{class:"mt-4 mb-3"},null,-1)),(0,s.Lk)("p",Y,(0,a.v_)(e.$t("Billing Details")),1),yi.item.companyIdentifier?((0,s.uX)(),(0,s.CE)("div",Z,[(0,s.Lk)("p",ee,(0,a.v_)(e.$t("Company identifier")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.companyIdentifier),1)])):(0,s.Q3)("",!0),yi.item.companyName?((0,s.uX)(),(0,s.CE)("div",te,[(0,s.Lk)("p",ie,(0,a.v_)(e.$t("Company name")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.companyName),1)])):(0,s.Q3)("",!0),yi.item.companyAddress?((0,s.uX)(),(0,s.CE)("div",se,[(0,s.Lk)("p",ae,(0,a.v_)(e.$t("Company address")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.companyAddress),1)])):(0,s.Q3)("",!0),yi.item.companyRegNo?((0,s.uX)(),(0,s.CE)("div",ne,[(0,s.Lk)("p",oe,(0,a.v_)(e.$t("Company commerce registry number")),1),(0,s.Lk)("p",null,(0,a.v_)(yi.item.companyRegNo),1)])):(0,s.Q3)("",!0),yi.item.stripeCustomerId?((0,s.uX)(),(0,s.CE)("div",le,[(0,s.Lk)("p",re,(0,a.v_)(e.$t("Stripe customer")),1),(0,s.Lk)("p",null,[(0,s.Lk)("a",{onClick:t[6]||(t[6]=(...e)=>vi.openStripeCustomer&&vi.openStripeCustomer(...e))},(0,a.v_)(yi.item.stripeCustomerId),1)])])):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0),t[23]||(t[23]=(0,s.Lk)("hr",null,null,-1)),yi.item.source?((0,s.uX)(),(0,s.CE)("div",de,[(0,s.Lk)("span",{class:(0,a.C4)(["tag is-rounded is-small",vi.getSourceTagClass(yi.item.source)])},(0,a.v_)(e.$t("contact_source"))+": "+(0,a.v_)(e.$t("contact_source_"+yi.item.source)),3)])):(0,s.Q3)("",!0),(0,s.Lk)("div",ce,[(0,s.Lk)("span",ue,(0,a.v_)(e.$t("Created at"))+": "+(0,a.v_)(e.$filters.format(yi.item.dateCreated,"dateTime")),1)]),(0,s.Lk)("div",me,[(0,s.Lk)("span",pe,(0,a.v_)(e.$t("Last update"))+": "+(0,a.v_)(e.$filters.format(yi.item.dateUpdated,"dateTime")),1)]),e.tenant.settingFeatures.identityValidation?.isActive&&e.isGranted("HR_ASSISTANT_TENANT")&&yi.item.identity?((0,s.uX)(),(0,s.CE)("div",he,[(0,s.Lk)("span",{class:(0,a.C4)(["tag is-rounded is-small",{"is-success":yi.item.identity.isValidated,"is-warning":"pending"===yi.item.identity.status}])},[(0,s.eW)((0,a.v_)(e.$t("Identity"))+": ",1),(0,s.bF)(Fi,{to:{name:"ValidateIdentityAdmin",params:{item:yi.item.identity.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(yi.item.identity.status))+" â",1)]),_:1},8,["to"])],2)])):(0,s.Q3)("",!0)])]),e.tenant.settingFeatures.contacts.hasStatuses?((0,s.uX)(),(0,s.CE)("div",ge,[(0,s.Lk)("div",fe,[(0,s.Lk)("h3",be,[(0,s.Lk)("span",ye,[(0,s.Lk)("span",ve,[(0,s.bF)(Ci,{icon:"fa-light fa-chart-pyramid"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Status")),1)])]),(0,s.Lk)("button",{class:"status-settings-btn",title:e.$t("Manage statuses"),onClick:t[7]||(t[7]=t=>e.$router.push({name:"ModuleContactsStatuses"}))},[(0,s.bF)(Ci,{icon:"fa-light fa-gear"})],8,ke)]),0===yi.statuses?.length?((0,s.uX)(),(0,s.CE)("div",Ce,[(0,s.Lk)("button",{class:"button is-rounded is-primary is-outlined",onClick:t[8]||(t[8]=t=>e.$router.push({name:"ModuleContactsStatuses"}))},(0,a.v_)(e.$t("No statuses. Manage Statuses"))+" â ",1)])):((0,s.uX)(),(0,s.CE)("div",Le,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(vi.statusOptions,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"m-"+(e.id??"none")},[(0,s.Lk)("label",{class:(0,a.C4)(["status-radio-item",{"is-selected":vi.isStatusSelected(e),"just-selected":yi.lastSelectedKey===(e.id??"none")}]),style:(0,a.Tr)(vi.isStatusSelected(e)&&e.color?"--status-ring-color: "+e.color:"")},[(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":e=>yi.item.status=e,type:"radio",value:e.value,class:"status-radio-input",onChange:t=>vi.onStatusSelected(e)},null,40,we),[[n.XL,yi.item.status]]),(0,s.Lk)("span",_e,[(0,s.Lk)("span",{class:(0,a.C4)(["status-preview",{"status-preview-empty":!e.color}]),style:(0,a.Tr)(e.color?"background-color: "+e.color:"")},null,6),(0,s.Lk)("span",Ee,(0,a.v_)(e.name),1)])],6),t<vi.statusOptions.length-1?((0,s.uX)(),(0,s.CE)("span",$e," â ")):(0,s.Q3)("",!0)],64))),128))]))])):(0,s.Q3)("",!0),(0,s.Lk)("div",Fe,[(0,s.Lk)("h3",Te,[(0,s.Lk)("span",Se,[(0,s.Lk)("span",Ae,[(0,s.bF)(Ci,{icon:"fa-light fa-newspaper"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Newsletter")),1)])]),(0,s.Lk)("div",Pe,[(0,s.Lk)("div",Ie,[null===yi.item.isNewsletterSubscribed?((0,s.uX)(),(0,s.CE)("span",Me,(0,a.v_)(e.$t("Not subscribed")),1)):(0,s.Q3)("",!0),!0===yi.item.isNewsletterSubscribed?((0,s.uX)(),(0,s.CE)("span",xe,(0,a.v_)(e.$t("Subscribed")),1)):(0,s.Q3)("",!0),!1===yi.item.isNewsletterSubscribed?((0,s.uX)(),(0,s.CE)("span",Ne,(0,a.v_)(e.$t("Unsubscribed")),1)):(0,s.Q3)("",!0)]),!0===yi.item.isNewsletterSubscribed?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-danger is-outlined is-rounded is-small",onClick:t[9]||(t[9]=(...e)=>vi.confirmUnsubscription&&vi.confirmUnsubscription(...e))},(0,a.v_)(e.$t("Unsubscribe")),1)):((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-success is-outlined is-rounded is-small",onClick:t[10
1]||(t[10]=(...e)=>vi.confirmSubscription&&vi.confirmSubscription(...e))},(0,a.v_)(e.$t("Subscribe")),1))])]),(0,s.Lk)("div",Ue,[(0,s.Lk)("h3",De,[(0,s.Lk)("span",Xe,[(0,s.Lk)("span",Ve,[(0,s.bF)(Ci,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Social profiles")),1)])]),(0,s.Lk)("div",Re,[yi.item.linkedin||yi.item.twitter||yi.item.instagram?((0,s.uX)(),(0,s.CE)("div",Oe,[vi.safeExternalUrl(yi.item.linkedin)?((0,s.uX)(),(0,s.CE)("a",{key:0,href:vi.safeExternalUrl(yi.item.linkedin),target:"_blank",class:"social-link-icon",rel:"noopener noreferrer",title:yi.item.linkedin},[(0,s.bF)(Ci,{icon:"fab fa-linkedin"})],8,Qe)):(0,s.Q3)("",!0),vi.safeExternalUrl(yi.item.twitter)?((0,s.uX)(),(0,s.CE)("a",{key:1,href:vi.safeExternalUrl(yi.item.twitter),target:"_blank",class:"social-link-icon",rel:"noopener noreferrer",title:yi.item.twitter},[(0,s.bF)(Ci,{icon:"fab fa-x-twitter"})],8,Be)):(0,s.Q3)("",!0),vi.safeExternalUrl(yi.item.instagram)?((0,s.uX)(),(0,s.CE)("a",{key:2,href:vi.safeExternalUrl(yi.item.instagram),target:"_blank",class:"social-link-icon",rel:"noopener noreferrer",title:yi.item.instagram},[(0,s.bF)(Ci,{icon:"fab fa-instagram"})],8,Ge)):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("p",We,(0,a.v_)(e.$t("No social profiles added")),1))])]),(0,s.Lk)("div",je,[(0,s.Lk)("h3",ze,[(0,s.Lk)("span",qe,[(0,s.Lk)("span",Je,[(0,s.bF)(Ci,{icon:"fa-light fa-tags"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Tags")),1)])]),(0,s.bF)(Ti,{item:yi.item,"is-user":!1},null,8,["item"])]),vi.canReadProfileActivity?((0,s.uX)(),(0,s.Wv)(Si,{key:1,"entity-type":"contact","entity-id":yi.item.id,onNoteAdded:t[11]||(t[11]=t=>e.$refs.contactTimeline.reload())},null,8,["entity-id"])):(0,s.Q3)("",!0),vi.canReadProfileActivity?((0,s.uX)(),(0,s.Wv)(Ai,{key:2,ref:"contactTimeline","entity-type":"contact","entity-id":yi.item.id},null,8,["entity-id"])):(0,s.Q3)("",!0),vi.customFieldsWithValues&&vi.customFieldsWithValues.length>0?((0,s.uX)(),(0,s.CE)("div",He,[(0,s.Lk)("h3",Ke,[(0,s.Lk)("span",Ye,[(0,s.Lk)("span",Ze,[(0,s.bF)(Ci,{icon:"fa-light fa-list-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Additional information")),1)])]),(0,s.Lk)("div",et,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(vi.customFieldsWithValues,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.field.id,class:"mb-3"},[(0,s.Lk)("p",tt,(0,a.v_)(e.field.name),1),(0,s.Lk)("p",null,(0,a.v_)(vi.getCustomFieldDisplayValue(e)),1)]))),128))])])):(0,s.Q3)("",!0),(0,s.Lk)("div",it,[vi.canSendEmail?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-light is-rounded is-small",onClick:t[12]||(t[12]=(...e)=>vi.openSendEmail&&vi.openSendEmail(...e))},[(0,s.Lk)("span",st,[(0,s.bF)(Ci,{icon:"fa-light fa-paper-plane"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Send an email")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"button is-light is-rounded is-small",onClick:t[13]||(t[13]=(...e)=>vi.createUserAccount&&vi.createUserAccount(...e))},[(0,s.Lk)("span",at,[(0,s.bF)(Ci,{icon:"fa-light fa-user-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Create user account")),1)]),(0,s.Lk)("button",{class:"button is-danger is-rounded is-small",onClick:t[14]||(t[14]=(...e)=>vi.confirmDelete&&vi.confirmDelete(...e))},[(0,s.Lk)("span",nt,[(0,s.bF)(Ci,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Delete contact")),1)])])]),(0,s.Lk)("div",ot,[(0,s.Lk)("div",lt,[e.tenant.settingFeatures.contacts.hasStatuses?((0,s.uX)(),(0,s.CE)("div",rt,[(0,s.Lk)("div",dt,[(0,s.Lk)("h3",ct,[(0,s.Lk)("span",ut,[(0,s.Lk)("span",mt,[(0,s.bF)(Ci,{icon:"fa-light fa-chart-pyramid"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Status")),1)])]),(0,s.Lk)("button",{class:"status-settings-btn",title:e.$t("Manage statuses"),onClick:t[15]||(t[15]=t=>e.$router.push({name:"ModuleContactsStatuses"}))},[(0,s.bF)(Ci,{icon:"fa-light fa-gear"})],8,pt)]),0===yi.statuses?.length?((0,s.uX)(),(0,s.CE)("div",ht,[(0,s.Lk)("button",{class:"button is-rounded is-primary is-outlined",onClick:t[16]||(t[16]=t=>e.$router.push({name:"ModuleContactsStatuses"}))},(0,a.v_)(e.$t("No statuses. Manage Statuses"))+" â ",1)])):((0,s.uX)(),(0,s.CE)("div",gt,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(vi.statusOptions,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id??"none"},[(0,s.Lk)("label",{class:(0,a.C4)(["status-radio-item",{"is-selected":vi.isStatusSelected(e),"just-selected":yi.lastSelectedKey===(e.id??"none")}]),style:(0,a.Tr)(vi.isStatusSelected(e)&&e.color?"--status-ring-color: "+e.color:"")},[(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":e=>yi.item.status=e,type:"radio",value:e.value,class:"status-radio-input",onChange:t=>vi.onStatusSelected(e)},null,40,ft),[[n.XL,yi.item.status]]),(0,s.Lk)("span",bt,[(0,s.Lk)("span",{class:(0,a.C4)(["status-preview",{"status-preview-empty":!e.color}]),style:(0,a.Tr)(e.color?"background-color: "+e.color:"")},null,6),(0,s.Lk)("span",yt,(0,a.v_)(e.name),1)])],6),t<vi.statusOptions.length-1?((0,s.uX)(),(0,s.CE)("span",vt," â ")):(0,s.Q3)("",!0)],64))),128))]))])):(0,s.Q3)("",!0),(0,s.Lk)("div",kt,[(0,s.Lk)("h3",Ct,[(0,s.Lk)("span",Lt,[(0,s.Lk)("span",wt,[(0,s.bF)(Ci,{icon:"fa-light fa-calendar"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Events")),1)])]),(0,s.bF)(Pi,{"is-user":!0,contact:yi.item.id},null,8,["contact"])]),(0,s.Lk)("div",_t,[(0,s.Lk)("div",Et,[(0,s.Lk)("h3",$t,[(0,s.Lk)("span",Ft,[(0,s.Lk)("span",Tt,[(0,s.bF)(Ci,{icon:"fa-light fa-credit-card"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Payments & Subscriptions")),1)])]),e.isGranted("FINANCIAL_TENANT")?((0,s.uX)(),(0,s.Wv)(Ii,{key:0,t
1ype:"is-primary",size:"is-small",class:"is-rounded","icon-left":"plus",onClick:vi.openRecordPayment},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Record payment")),1)]),_:1},8,["onClick"])):(0,s.Q3)("",!0)]),yi.subscriptions?.length>0?((0,s.uX)(),(0,s.CE)("div",St,[(0,s.Lk)("p",At,(0,a.v_)(e.$t("Subscriptions")),1),(0,s.Lk)("div",Pt,[(0,s.bF)(xi,{data:yi.subscriptions,"pagination-rounded":!0,striped:"",scrollable:"",class:"is-fullwidth mb-5"},{default:(0,s.k6)(()=>[(0,s.bF)(Mi,{label:"ID",sortable:"",field:"id"},{default:(0,s.k6)(e=>[(0,s.Lk)("span",It,(0,a.v_)(e.row.id),1)]),_:1}),e.tenant.stripeAccount?((0,s.uX)(),(0,s.Wv)(Mi,{key:0,label:"Stripe",sortable:"",field:"id"},{default:(0,s.k6)(t=>[(0,s.Lk)("a",{href:"https://dashboard.stripe.com/"+e.tenant.stripeAccount+"/subscriptions/"+t.row.stripeSubscriptionId,target:"_blank"},[(0,s.Lk)("span",xt,[(0,s.Lk)("span",Nt,[(0,s.bF)(Ci,{icon:"fa-light fa-arrow-up-right"})])])],8,Mt)]),_:1})):(0,s.Q3)("",!0),(0,s.bF)(Mi,{label:e.$t("product"),sortable:"",field:"createdAt"},{default:(0,s.k6)(e=>[e.row.product?((0,s.uX)(),(0,s.CE)("span",Ut,(0,a.v_)(e.row.product.name),1)):(0,s.Q3)("",!0)]),_:1},8,["label"]),(0,s.bF)(Mi,{label:e.$t("created"),sortable:"",field:"createdAt"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",Dt,(0,a.v_)(e.$filters.formatDateCool(t.row.createdAt)),1)]),_:1},8,["label"]),(0,s.bF)(Mi,{label:e.$t("amount")},{default:(0,s.k6)(t=>[t.row.customPriceValue?((0,s.uX)(),(0,s.CE)("span",Xt,(0,a.v_)(e.$filters.money(t.row.customPriceValue,t.row.currency)),1)):((0,s.uX)(),(0,s.CE)("span",Vt,(0,a.v_)(e.$filters.money(t.row.productPrice.price,t.row.currency)),1))]),_:1},8,["label"]),(0,s.bF)(Mi,{label:e.$t("Option"),sortable:"",field:"productOption.id"},{default:(0,s.k6)(e=>[e.row.productOption?((0,s.uX)(),(0,s.CE)("span",Rt,(0,a.v_)(e.row.productOption.name),1)):e.row.localCenterOption?((0,s.uX)(),(0,s.CE)("span",Ot,(0,a.v_)(e.row.localCenterOption.name),1)):(0,s.Q3)("",!0)]),_:1},8,["label"]),(0,s.bF)(Mi,{label:e.$t("status")},{default:(0,s.k6)(t=>["no_identity"===t.row.status?((0,s.uX)(),(0,s.CE)("span",Qt,[(0,s.bF)(Fi,{to:{name:"ValidateIdentityByUserOnPayment",params:{payment:t.row.uid}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("No identity upload")),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),"identity_pending"===t.row.status?((0,s.uX)(),(0,s.CE)("span",Bt,(0,a.v_)(e.$t("Identity validation pending")),1)):"identity_validated"===t.row.status?((0,s.uX)(),(0,s.CE)("span",Gt,[(0,s.bF)(Fi,{to:{name:"PaymentSubscriptionCheckoutRedirect",params:{item:t.row.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Waiting for subscription")),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),"active"===t.row.status&&(t.row.isSubscriptionInactive||t.row.isSubscriptionCanceled)?((0,s.uX)(),(0,s.CE)("span",Wt,[(0,s.Lk)("span",jt,(0,a.v_)(e.$t("Cancels on"))+" "+(0,a.v_)(e.$filters.format(t.row.currentPeriodEnd)),1)])):"active"===t.row.status?((0,s.uX)(),(0,s.CE)("span",zt,(0,a.v_)(e.$t("active")),1)):((0,s.uX)(),(0,s.CE)("span",qt,(0,a.v_)(e.$t(t.row.status)),1))]),_:1},8,["label"]),e.isGranted("ADMIN_TENANT")?((0,s.uX)(),(0,s.Wv)(Mi,{key:1,label:e.$t("action"),centered:""},{default:(0,s.k6)(t=>["active"!==t.row.status||t.row.isSubscriptionCanceled||t.row.isSubscriptionInactive?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-rounded is-small",onClick:e=>vi.confirmCancelSubscription(t.row.id)},(0,a.v_)(e.$t("Cancel")),9,Jt))]),_:1},8,["label"])):(0,s.Q3)("",!0)]),_:1},8,["data"])])])):(0,s.Q3)("",!0),(0,s.Lk)("div",null,[yi.subscriptions?.length>0||yi.contactIdentityPayment?((0,s.uX)(),(0,s.CE)("div",Ht,[(0,s.Lk)("p",Kt,(0,a.v_)(e.$t("payments")),1),yi.contactIdentityPayment?((0,s.uX)(),(0,s.CE)("span",Yt,[(0,s.Lk)("span",Zt,(0,a.v_)(e.$t("Identity"))+":",1),(0,s.bF)(Ni,{payment:yi.contactIdentityPayment},null,8,["payment"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.bF)(Ui,{ref:"contactPayments","filter-user":yi.item,contact:!0,"hide-record-action":!0,"hide-identity-summary":!0,onIdentitySummary:t[17]||(t[17]=e=>yi.contactIdentityPayment=e),onContactHasPayments:t[18]||(t[18]=e=>yi.contactHasPayments=!0)},null,8,["filter-user"])])]),yi.companyMembership?((0,s.uX)(),(0,s.Wv)(Fi,{key:1,to:{name:"CompanyShow",params:{uuid:yi.companyMembership.company.uuid}},class:"company-membership-card card mb-4"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",ei,[(0,s.Lk)("div",ti,[yi.companyMembership.company.logo?((0,s.uX)(),(0,s.CE)("img",{key:0,src:yi.companyMembership.company.logo,alt:"Company logo"},null,8,ii)):((0,s.uX)(),(0,s.Wv)(Ci,{key:1,icon:"fa-light fa-building",class:"company-logo-placeholder"}))]),(0,s.Lk)("div",si,[(0,s.Lk)("p",ai,(0,a.v_)(e.$t("Company Membership")),1),(0,s.Lk)("p",ni,(0,a.v_)(yi.companyMembership.company.name),1)]),(0,s.Lk)("div",oi,[(0,s.Lk)("span",li,(0,a.v_)(e.$t(yi.companyMembership.roles[0]||"Member")),1),(0,s.Lk)("p",ri,(0,a.v_)(e.$t("Since"))+" "+(0,a.v_)(e.$filters.format(yi.companyMembership.dateJoined||yi.companyMembership.dateCreated,"MMM YYYY")),1)])])]),_:1},8,["to"])):(0,s.Q3)("",!0),e.tenant.settingFeatures.eDocuments.isActive?((0,s.uX)(),(0,s.CE)("div",di,[(0,s.Lk)("h3",ci,[(0,s.Lk)("span",ui,[(0,s.Lk)("span",mi,[(0,s.bF)(Ci,{icon:"fa-light fa-file-contract"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("e-Documents")),1)])]),(0,s.bF)(Di,{"is-contact":!0,item:yi.item},null,8,["item"])])):(0,s.Q3)("",!0),(0,s.Lk)("div",pi,[(0,s.Lk)("h3",hi,[(0,s.Lk)("span",gi,[(0,s.Lk)("span",fi,[(0,s.bF)(Ci,{icon:"fa-light fa-envelope"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Email logs")),1)])]),(0,s.bF)(Xi,{contact:yi.item},null,8,["contact"])])])])])):(0,s.Q3)("",!0),vi.canSendEmail?((0,s.uX)(),(0,s.Wv)(Vi,{key:2,"is-open":yi.isEmailModalOpen,"recipient-type":"contact",recipient:yi.item,onClose:t[19]||(t[19]=e=>yi.isEmailModalOpen=!1),onSent:t[20]||(t[20]=t=>e.$refs.contactTimeline?.reload())},null,8,["is-open","recipient"])):(0,s.Q3)("",!0)])}i(18111),i(22489),i(20116),i(61701),i(18237);var yi=i(31830),vi=i(40834),ki=i(83016),Ci=i(72554),Li=i(21662),wi=i(57985),_i=i(15083),Ei=i(61273),$i=i(44917),Fi=i(29450),Ti=i(18256),Si=i(2594),Ai=i(31823),Pi=i(60560),Ii=i(22556),Mi=i(59905),xi=i(99914),Ni=i(95256),Ui={components:{SendCustomEmailModal:ki.A,EmailLogList:Fi["default"],Contract:$i.A,FontAwesomeIcon:Ei.gc,PersonalIdField:xi.A,ContactForm:yi.A,ListEvent:Li.A,Payments:wi.A,PaymentIdentityTag:_i.A,UserTags:Ti.A,LogoUpload:Si.A,LogoThumbnail:Ai.A,BioText:Pi.A,EntityNotes:Ii.A,ProfileTimeline:Mi.A},props:{contactId:{type:[Number,String],required:!0},inlineEditActions:{type:Boolean,default:!1}},emits:["refresh","deleted","user-created","open-stripe","edit-state-change"],data(){return{item:null,isEmailModalOpen:!1,subscriptions:[],isLoading:!1,contactHasPayments:!1,contactIdentityPayment:null,statuses:[],isInitialLoad:!0,isEditing:!1,companyMembership:null,isLoadingCompany:!1,lastSelectedKey:null}},computed:{...(0,vi.L8)(["tenant","user","isGranted","contactChaptersEnabled"]),canSendEmail(){return(0,Ci.y)(this.item,this.isGranted)},canRevealPersonalId(){return this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")},statusOptions(){return[{id:null,name:this.$t("No status"),color:null,value:null},...this.statuses.map(e=>({id:e.id,name:e.name,color:e.color,value:e}))]},canReadProfileActivity(){return!(!this.item?.id||!this.tenant?.settingFeatures?.users?.hasProfileActivity)&&(this.isGranted("HR_LOCAL",this.item.localCenter)||this.isGranted("FINANCIAL_LOCAL",this.item.localCenter))},customFieldsWithValues(){return this.item?.customFieldValues&&this.tenant?.customFields?this.item.customFieldValues.filter(e=>e.value&&""!==e.value).map(e=>{const t="object"===typeof e.field?e.field.id:parseInt(e.field.split("/").pop()),i=this.tenant.customFields.find(e=>e.id===t&&"profile"===e.discriminator);return i?{...e,field:i}:null}).filter(e=>null!==e):[]}},watch:{"item.status":{handler(e,t){this.item&&void 0!==t&&!this.isInitialLoad&&this.autoSave()},deep:!0},contactId:{immediate:!0,handler(e){e&&this.retrieve()}},isEditing(e){this.$emit("edit-state-change",e)}},created(){this.loadStatuses()}
1,methods:{safeExternalUrl:Ni.sX,openRecordPayment(){this.$refs.contactPayments?.openRecordPaymentModal()},getSourceTagClass(e){const t={manual:"is-info is-light",import:"is-warning is-light",form:"is-primary is-light",newsletter:"is-success is-light",event:"is-link is-light",donation:"is-danger is-light",stripe:"is-dark is-light",contract:"is-primary is-light",system:"is-light"};return t[e]||"is-light"},getGenderLabel(e){const t={f:this.$t("female"),m:this.$t("male"),n:this.$t("Other gender")};return t[e]||"-"},getCustomFieldDisplayValue(e){if(!e||!e.value)return"-";const t=e.field;if("boolean"===t.fieldType)return"1"===e.value||!0===e.value?this.$t("Yes"):this.$t("No");if("dropdown"===t.fieldType||"radio"===t.fieldType)return t.fieldOptions?.options?.[e.value]||e.value;if("checkboxes"===t.fieldType)try{const i=JSON.parse(e.value);return i.map(e=>t.fieldOptions?.options?.[e]||e).join(", ")||"-"}catch(i){return e.value}return"date"===t.fieldType?this.$filters.format(e.value,"date"):e.value},retrieve(){this.isLoading=!0,this.$http.plain.get("/contacts/"+this.contactId).then(e=>{this.item=e.data,this.$http.plain.get(`/contacts/${this.item.id}/profile_tags`).then(e=>{this.item.tags=e.data["hydra:member"]||[],this.$nextTick(()=>{this.isInitialLoad=!1})}),this.loadSubscriptions(),this.loadCompanyMembership()}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},openStripeCustomer(){this.item&&this.item.stripeCustomerId&&this.$emit("open-stripe",this.item.stripeCustomerId)},autoSave(){if(!this.item)return;let e={...this.item};delete e.stripeCustomerId,delete e.customFieldValues,delete e.tags,delete e.identity,e.country=e.town?.country["@id"]?e.town.country["@id"]:null,e.town=e.town?e.town["@id"]:null,e.status=e.status?e.status["@id"]||`/profile_statuses/${e.status.id}`:null,e.localCenter=e.localCenter?e.localCenter["@id"]||`/api/v1/local_centers/${e.localCenter.id}`:null,this.$http.plain.patch("/contacts/"+this.item.id,e).then(()=>{this.$buefy.toast.open({type:"is-success",message:this.$t("Status updated"),duration:2e3}),this.$emit("refresh")}).catch(e=>{console.error(e)})},loadStatuses(){this.$http.plain.get("/profile_statuses?tenant="+this.tenant.id+"&order[position]=asc").then(e=>{this.statuses=e.data["hydra:member"]}).catch(e=>{console.log(e)})},isStatusSelected(e){return null===e.id?null===this.item?.status:this.item?.status&&this.item.status.id===e.id},onStatusSelected(e){const t=e.id??"none";this.lastSelectedKey=t,setTimeout(()=>{this.lastSelectedKey===t&&(this.lastSelectedKey=null)},450)},loadSubscriptions(){this.isLoading=!0,this.$http.plain.get("/subscription_profiles_external?contact="+this.item.id).then(e=>{this.subscriptions=e.data["hydra:member"],this.subscriptions?.length>0&&!this.item.stripeCustomerId&&this.subscriptions[0].stripeCustomerId&&(this.item.stripeCustomerId=this.subscriptions[0].stripeCustomerId)}).catch(e=>{console.log(e)}).finally(()=>this.isLoading=!1)},loadCompanyMembership(){this.isLoadingCompany=!0,this.companyMembership=null,this.$http.plain.get("/company_users?contact="+this.item.id).then(e=>{const t=e.data["hydra:member"];t&&t.length>0&&(this.companyMembership=t[0])}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingCompany=!1})},toggleEdit(){this.isEditing=!0},cancelEdit(){this.isEditing=!1,this.retrieve()},saveAndCloseEdit(){this.isLoading=!0;const e=this.$refs.contactForm?.getPendingUploads?.()||[],t=e.length>0?e.reduce((e,t)=>e.then(()=>t.upload()),Promise.resolve()):Promise.resolve();t.then(()=>{this.$refs.contactForm?.clearPendingUploads?.();const{stripeCustomerId:e,logo:t,customFieldValues:i,tags:s,identity:a,...n}=this.item;return n.country=this.item.town?.country["@id"]?this.item.town.country["@id"]:null,n.town=n.town?n.town["@id"]:null,n.status=n.status?n.status["@id"]||`/profile_statuses/${n.status.id}`:null,n.localCenter=n.localCenter?n.localCenter["@id"]||`/api/v1/local_centers/${n.localCenter.id}`:null,n.rawContactCustomFieldsValues=this.$refs.contactForm?.getCustomFieldValues?.()||{},this.$http.plain.patch("/contacts/"+this.item.id,n)}).then(()=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}),this.isEditing=!1,this.retrieve(),this.$emit("refresh")}).catch(t=>{console.error(t),e.length>
10&&this.$buefy.toast.open({message:this.$t("Failed to upload file"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},openSendEmail(){this.isEmailModalOpen=!0},createUserAccount(){this.isLoading=!0,this.$http.plain.post("/member-register-by-admin",{dateBirth:this.item.dateBirth||null,gender:this.item.gender||null,dateJoined:this.item.dateCreated,dateJoinedFullMember:this.item.dateCreated,feeType:null,localCenter:null,phoneCountry:null,plainPassword:this.generateStrongPassword(8),status:"ACTIVE",email:this.item.email}).then(e=>{this.$buefy.toast.open({message:this.$t("Registered successfully"),type:"is-success",duration:6e3}),this.$emit("user-created",e.data.id)}).catch(e=>{console.log(e);const t=e.response?.data?.detail||e.response?.data?.message;let i=this.$t("An error occurred");"EMAIL_EXISTS"===t?i=this.$t("A user with this email already exists"):t&&(i=t),this.$buefy.toast.open({message:i,type:"is-danger",duration:5e3})}).finally(()=>{this.isLoading=!1})},generateStrongPassword(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-+=";let i="";for(let s=0;s<e;s++){const e=Math.floor(Math.random()*t.length);i+=t.charAt(e)}return i},confirmCancelSubscription(e){this.$buefy.dialog.confirm({title:this.$t("unsubscribe"),message:this.$t("Are you sure you want to unsubscribe?"),confirmText:this.$t("Unsubscribe"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>this.cancelSubscription(e)})},cancelSubscription(e){this.isLoading=!0,this.$http.plain.post("/connected/cancel-subscription/"+e).then(e=>{e.data&&this.$buefy.snackbar.open({message:this.$t("Unsubscribed")}),this.retrieve()}).catch(e=>{console.log(e)}).finally(()=>this.isLoading=!1)},confirmSubscription(){const e=!1===this.item.isNewsletterSubscribed;this.$buefy.dialog.confirm({title:this.$t("Subscribe to newsletter"),message:e?this.$t("%s previously unsubscribed. Subscribing them again will override their opt-out. Continue?").replace("%s",this.item.name):this.$t("Are you sure you want to subscribe %s to the newsletter?").replace("%s",this.item.name),confirmText:this.$t("Confirm"),cancelText:this.$t("cancel"),type:e?"is-warning":"is-success",onConfirm:()=>this.subscribeToNewsletter()})},subscribeToNewsletter(){this.isLoading=!0,this.$http.plain.get(`/contact/${this.item.id}/subscribe-to-newsletter`).then(()=>{this.retrieve(),this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success",duration:5e3})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},confirmUnsubscription(){this.$buefy.dialog.confirm({title:this.$t("Unsubscribe from newsletter"),message:this.$t("Are you sure you want to unsubscribe %s from the newsletter?").replace("%s",this.item.name),confirmText:this.$t("Confirm"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>this.unsubscribeFromNewsletter()})},unsubscribeFromNewsletter(){this.isLoading=!0,this.$http.plain.get(`/contact/${this.item.id}/unsubscribe-from-newsletter`).then(()=>{this.retrieve(),this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success",duration:5e3})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},async copyToClipboard(e,t){const i=await(0,Ni.bm)(e);i?this.$buefy.toast.open({message:this.$t(`${t} copied to clipboard`),type:"is-success",duration:2e3}):this.$buefy.toast.open({message:this.$t("Failed to copy to clipboard"),type:"is-danger",duration:2e3})},confirmDelete(){this.item&&this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+this.item.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deleteContact()})},deleteContact(){this.$http.plain.delete("/contacts/"+this.contactId).then(()=>{this.$buefy.toast.open(this.$t("deleted")),this.$emit("deleted")}).catch(e=>{console.error(e)})}}},Di=i(66262);const Xi=(0,Di.A)(Ui,[["render",bi],["__scopeId","data-v-7651be40"]]);var Vi=Xi},53369:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"mt-1"};function l(e,t,i,l,r,d){const c=(0,s.g2)("b-autocomplete"),u=(0,s.g2)("b-tooltip"),m=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.Wv)(m,{label:i.label,class:(0,a.C4)(i.isRequired?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(u,{active:r.showTooltip,label:e.$t("Please select a town from the dropdown"),position:"is-top",type:"is-dark",class:"is-fullwidth","append-to-body":"",always:r.showTooltip},{default:(0,s.k6)(()=>[(0,s.bF)(c,{modelValue:r.townName,"onUpdate:modelValue":t[1]||(t[1]=e=>r.townName=e),data:r.data,placeholder:i.placeholder||e.$t("Search for a town"),field:"nameWithCounty",loading:r.isFetching,disabled:i.isDisabled,clearable:!i.isDisabled,required:!!i.isRequired,size:i.isFilter?"is-small":"",rounded:i.isFilter,expanded:i.isFilter,icon:i.showMapIcon?"location-dot":null,"icon-pack":i.showMapIcon?"fa-light":null,onKeyup:d.handleKeyup,onFocus:t[2]||(t[2]=e=>r.showTooltip=!0),onBlur:t[3]||(t[3]=e=>r.showTooltip=!1),onSelect:d.change},{default:(0,s.k6)(({option:e})=>[(0,s.eW)((0,a.v_)(d.formatTownLabel(e)),1)]),footer:(0,s.k6)(()=>[(0,s.bo)((0,s.Lk)("div",o,[(0,s.bo)((0,s.Lk)("a",{onClick:t[0]||(t[0]=(...e)=>d.extendSearch&&d.extendSearch(...e))},(0,a.v_)(e.$t("Can't find it? Extend search"))+"... ",513),[[n.aG,!r.isFetching]]),(0,s.bo)((0,s.Lk)("span",null,(0,a.v_)(e.$t("Searching"))+"...",513),[[n.aG,r.isFetching]])],512),[[n.aG,r.showFooter]])]),_:1},8,["modelValue","data","placeholder","loading","disabled","clearable","required","size","rounded","expanded","icon","icon-pack","onKeyup","onSelect"])]),_:1},8,["active","label","always"])]),_:1},8,["label","class"])}i(44114),i(18111),i(81148),i(22489),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var r=i(38221),d=i.n(r),c=i(95256),u={props:["town","label","placeholder","isResultObject","isRequired","isDisabled","isFilter","showMapIcon"],data(){return{townName:null,data:[],isFetching:!1,showFooter:!1,showTooltip:!1,suppressedName:null}},watch:{town(e){this.setTownName(e)},townName(e){!e||e.length<3?this.data=[]:this.isProgrammaticName(e)||this.getAsyncData()}},created(){this.setTownName(this.town)},methods:{countryName:c.GL,formatTownLabel(e){if(!e)return"";const t=e=>e?String(e).normalize("NFD").replace(/[Ì-ͯ]/g,"").toLowerCase().trim():"",i=(e,t)=>
1{const i=new Set(t.split(/\s+/).filter(Boolean));return e.split(/\s+/).filter(Boolean).every(e=>i.has(e))},s=[],a=e=>{const a=t(e);return a?s.some(e=>i(a,e))?null:(s.push(a),e):null},n=a(e.name),o=e.county?a(e.county.name):null,l=e.county?a(e.county.state):null;let r=n||"";return o&&(r+=` (${o})`),l&&(r+=` - ${l}`),!this.resultsFromSameCountry&&e.country&&(r+=` (${(0,c.GL)(e.country)})`),r},setTownName(e){const t=e?e.nameWithCounty||this.formatTownLabel(e):null;t!==this.townName&&(this.suppressedName=t,this.townName=t)},isProgrammaticName(e){return e===this.suppressedName||this.data.some(t=>t.nameWithCounty===e)},getAsyncData:d()(function(){if(this.townName&&this.townName.length<3)return void(this.data=[]);this.isFetching=!0;let e="";if(""===this.townName||null===this.townName)return this.isFetching=!1,void(this.data=[]);this.$http.plain.get("/towns?name="+encodeURIComponent(this.townName)+e).then(e=>{this.data=[];let t=null;for(let i of e.data["hydra:member"])t&&t.name===i.name&&t.county&&i.county&&t.county.name===i.county.name||(this.data.push(i),t=i)}).catch(e=>{this.data=[],console.error(e)}).finally(()=>{this.isFetching=!1,this.showFooter=!0})},300),fetchData(){if(this.townName&&this.townName.length<3)return void(this.data=[]);this.isFetching=!0;let e="";if(""===this.townName||null===this.townName)return this.isFetching=!1,void(this.data=[]);this.$http.plain.get("/towns?name="+encodeURIComponent(this.townName)+e).then(e=>{this.data=[];let t=null;for(let i of e.data["hydra:member"])t&&t.name===i.name&&t.county&&i.county&&t.county.name===i.county.name||(this.data.push(i),t=i)}).catch(e=>{this.data=[],console.error(e)}).finally(()=>{this.isFetching=!1})},handleKeyup(e){["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key)||this.getAsyncData()},change(e){let t=null;return t=this.isResultObject?e||null:e?e["@id"]:null,this.$emit("update:modelValue",t),this.showFooter=!1,this.showTooltip=!1,!1},extendSearch(){this.$http.plain.post("/towns/extend-search",{townName:this.townName}).then(e=>{this.fetchData()}).catch(e=>{console.error(e)})}},computed:{resultsFromSameCountry(){let e=[];for(let t of this.data)if(e.includes(t.country)||e.push(t.country),e.length>1)return!1;return!0}}},m=i(66262);const p=(0,m.A)(u,[["render",l]]);var h=p},53588:function(e,t,i){"use strict";i.d(t,{A:function(){return u}});var s=i(20641),a=i(90033);const n={ref:"canvas",class:"crop-canvas"},o={class:"crop-overlay"};function l(e,t,i,l,r,d){return(0,s.uX)(),(0,s.CE)("div",{ref:"container",class:"image-cropper",onMousedown:t[0]||(t[0]=(...e)=>d.onMouseDown&&d.onMouseDown(...e)),onTouchstart:t[1]||(t[1]=(...e)=>d.onTouchStart&&d.onTouchStart(...e))},[(0,s.Lk)("canvas",n,null,512),(0,s.Lk)("div",o,[(0,s.Lk)("div",{class:"crop-area",style:(0,a.Tr)(d.cropAreaStyle)},null,4)])],544)}var r={name:"ImageCropper",props:{src:{type:String,required:!0},outputType:{type:String,default:"image/png"},outputQuality:{type:Number,default:.9},borderRadius:{type:Number,default:24},cropSize:{type:Number,default:.92}},emits:["ready"],data(){return{image:null,ctx:null,scale:1,minScale:1,maxScale:4,offsetX:0,offsetY:0,isDragging:!1,lastX:0,lastY:0,lastTouchDist:0}},computed:{cropAreaStyle(){return{width:100*this.cropSize+"%",borderRadius:`${this.borderRadius}px`}}},mounted(){this.loadImage(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd),this.$refs.container.addEventListener("wheel",this.onWheel,{passive:!1})},beforeUnmount(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),this.$refs.container?.removeEventListener("wheel",this.onWheel)},methods:{loadImage(){this.image=new Image,this.image.crossOrigin="anonymous",this.image.onload=()=>{this.initCanvas(),this.$emit("ready")},this.image.onerror=()=>
1{console.error("Failed to load image"),this.$buefy.toast.open({message:this.$t("Failed to load image"),type:"is-danger"})},this.image.src=this.src},initCanvas(){const e=this.$refs.container,t=this.$refs.canvas,i=Math.min(e.clientWidth,e.clientHeight);t.width=i,t.height=i,this.ctx=t.getContext("2d");const s=i*this.cropSize,a=Math.min(this.image.width,this.image.height);this.minScale=s/a,this.scale=this.minScale,this.maxScale=5*this.minScale,this.offsetX=(i-this.image.width*this.scale)/2,this.offsetY=(i-this.image.height*this.scale)/2,this.draw()},draw(){if(!this.ctx||!this.image)return;const e=this.$refs.canvas;this.ctx.clearRect(0,0,e.width,e.height),this.drawCheckerboard(),this.ctx.drawImage(this.image,this.offsetX,this.offsetY,this.image.width*this.scale,this.image.height*this.scale)},drawCheckerboard(){const e=this.$refs.canvas,t=20;for(let i=0;i<e.width;i+=t)for(let s=0;s<e.height;s+=t)this.ctx.fillStyle=(i+s)/t%2===0?"#333":"#444",this.ctx.fillRect(i,s,t,t)},constrainPosition(){const e=this.$refs.canvas,t=e.width*this.cropSize,i=(e.width-t)/2,s=this.image.width*this.scale,a=this.image.height*this.scale,n=i+t-s,o=i,l=i+t-a,r=i;this.offsetX=Math.max(n,Math.min(o,this.offsetX)),this.offsetY=Math.max(l,Math.min(r,this.offsetY))},onMouseDown(e){this.isDragging=!0,this.lastX=e.clientX,this.lastY=e.clientY},onMouseMove(e){if(!this.isDragging)return;const t=e.clientX-this.lastX,i=e.clientY-this.lastY;this.offsetX+=t,this.offsetY+=i,this.constrainPosition(),this.draw(),this.lastX=e.clientX,this.lastY=e.clientY},onMouseUp(){this.isDragging=!1},onTouchStart(e){1===e.touches.length?(this.isDragging=!0,this.lastX=e.touches[0].clientX,this.lastY=e.touches[0].clientY):2===e.touches.length&&(this.lastTouchDist=this.getTouchDist(e.touches))},onTouchMove(e){if(e.preventDefault(),1===e.touches.length&&this.isDragging){const t=e.touches[0].clientX-this.lastX,i=e.touches[0].clientY-this.lastY;this.offsetX+=t,this.offsetY+=i,this.constrainPosition(),this.draw(),this.lastX=e.touches[0].clientX,this.lastY=e.touches[0].clientY}else if(2===e.touches.length){const t=this.getTouchDist(e.touches),i=t/this.lastTouchDist;this.zoom(i,this.getCenterPoint(e.touches)),this.lastTouchDist=t}},onTouchEnd(){this.isDragging=!1},getTouchDist(e){const t=e[0].clientX-e[1].clientX,i=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+i*i)},getCenterPoint(e){const t=this.$refs.canvas.getBoundingClientRect();return{x:(e[0].clientX+e[1].clientX)/2-t.left,y:(e[0].clientY+e[1].clientY)/2-t.top}},onWheel(e){e.preventDefault(),e.stopPropagation();const t=this.$refs.canvas.getBoundingClientRect(),i={x:e.clientX-t.left,y:e.clientY-t.top},s=e.deltaY>0?.9:1.1;this.zoom(s,i)},zoom(e,t){const i=this.scale,s=Math.max(this.minScale,Math.min(this.maxScale,this.scale*e));if(s===i)return;const a=s/i;this.offsetX=t.x-(t.x-this.offsetX)*a,this.offsetY=t.y-(t.y-this.offsetY)*a,this.scale=s,this.constrainPosition(),this.draw()},crop(){return new Promise((e,t)=>{const i=this.$refs.canvas,s=i.width*this.cropSize,a=(i.width-s)/2,n=800,o=document.createElement("canvas");o.width=n,o.height=n;const l=o.getContext("2d"),r=(a-this.offsetX)/this.scale,d=(a-this.offsetY)/this.scale,c=s/this.scale;l.drawImage(this.image,r,d,c,c,0,0,n,n),o.toBlob(i=>{if(!i)return void t(new Error("Failed to create blob"));const s="image/png"===this.outputType?"png":"jpg",a=new File([i],`cropped.${s}`,{type:this.outputType});e(a)},this.outputType,this.outputQuality)})}}},d=i(66262);const c=(0,d.A)(r,[["render",l],["__scopeId","data-v-1764a53e"]]);var u=c},53719:function(e,t,i){"use strict";i.d(t,{A:function(){return ee}});var s=i(20641),a=i(90033);const n={class:"editor-wrapper"},o={key:0,class:"tiptap-toolbar"},l=["disabled"],r=["disabled"],d={class:"toolbar-button with-dropdown",type:"button"},c={class:"dropdown-label"},u={class:"toolbar-button",type:"button",title:"Highlight Color"},m={class:"color-palette-dropdown"},p={class:"color-grid"},h=["title","onClick"];function g(e,t,i,g,f,b){const y=(0,s.g2)("font-awesome-icon"),v=(0,s.g2)("b-dropdown-item"),k=(0,s.g2)("b-dropdown"),C=(0,s.g2)("EditorContent"),L=(0,s.g2)("TipTapImageUploadModal");return(0,s.uX)(),(0,s.CE)("div",n,[f.editor&&i.isEditable?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:"toolbar-button",disabled:!f.editor.can().undo(),type:"button",title:"Undo",onClick:t[0]||(t[0]=(...e)=>b.undo&&b.undo(...e))},[(0,s.bF)(y,{icon:"fa-light fa-undo"})],8,l),(0,s.Lk)("button",{class:"toolbar-button",disabled:!f.editor.can().redo(),type:"button",title:"Redo",onClick:t[1]||(t[1]=(...e)=>b.redo&&b.redo(...e))},[(0,s.bF)(y,{icon:"fa-light fa-redo"})],8,r),t[31]||(t[31]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("bold")}]),type:"button",title:"Bold",onClick:t[2]||(t[2]=(...e)=>b.toggleBold&&b.toggleBold(...e))},[(0,s.bF)(y,{icon:"fa-light fa-bold"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("italic")}]),type:"button",title:"Italic",onClick:t[3]||(t[3]=(...e)=>b.toggleItalic&&b.toggleItalic(...e))},[(0,s.bF)(y,{icon:"fa-light fa-italic"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("underline")}]),type:"button",title:"Underline",onClick:t[4]||(t[4]=(...e)=>b.toggleUnderline&&b.toggleUnderline(...e))},[(0,s.bF)(y,{icon:"fa-light fa-underline"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("strike")}
1]),type:"button",title:"Strikethrough",onClick:t[5]||(t[5]=(...e)=>b.toggleStrikethrough&&b.toggleStrikethrough(...e))},[(0,s.bF)(y,{icon:"fa-light fa-strikethrough"})],2),t[32]||(t[32]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.bF)(k,{"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",d,[(0,s.Lk)("span",c,(0,a.v_)(b.getCurrentHeading()),1),(0,s.bF)(y,{icon:"fa-light fa-chevron-down",class:"dropdown-icon"})])]),default:(0,s.k6)(()=>[(0,s.bF)(v,{"aria-role":"listitem",class:(0,a.C4)({"is-active":!f.editor.isActive("heading")}),onClick:t[6]||(t[6]=e=>b.setParagraph())},{default:(0,s.k6)(()=>[...t[25]||(t[25]=[(0,s.Lk)("span",null,"Paragraph",-1)])]),_:1},8,["class"]),(0,s.bF)(v,{"aria-role":"listitem",class:(0,a.C4)({"is-active":f.editor.isActive("heading",{level:1})}),onClick:t[7]||(t[7]=e=>b.setHeading(1))},{default:(0,s.k6)(()=>[...t[26]||(t[26]=[(0,s.Lk)("span",{class:"heading-preview h1"},"H1 Heading 1",-1)])]),_:1},8,["class"]),(0,s.bF)(v,{"aria-role":"listitem",class:(0,a.C4)({"is-active":f.editor.isActive("heading",{level:2})}),onClick:t[8]||(t[8]=e=>b.setHeading(2))},{default:(0,s.k6)(()=>[...t[27]||(t[27]=[(0,s.Lk)("span",{class:"heading-preview h2"},"H2 Heading 2",-1)])]),_:1},8,["class"]),(0,s.bF)(v,{"aria-role":"listitem",class:(0,a.C4)({"is-active":f.editor.isActive("heading",{level:3})}),onClick:t[9]||(t[9]=e=>b.setHeading(3))},{default:(0,s.k6)(()=>[...t[28]||(t[28]=[(0,s.Lk)("span",{class:"heading-preview h3"},"H3 Heading 3",-1)])]),_:1},8,["class"]),(0,s.bF)(v,{"aria-role":"listitem",class:(0,a.C4)({"is-active":f.editor.isActive("heading",{level:4})}),onClick:t[10]||(t[10]=e=>b.setHeading(4))},{default:(0,s.k6)(()=>[...t[29]||(t[29]=[(0,s.Lk)("span",{class:"heading-preview h4"},"H4 Heading 4",-1)])]),_:1},8,["class"])]),_:1}),t[33]||(t[33]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("bulletList")}]),type:"button",title:"Bullet List",onClick:t[11]||(t[11]=(...e)=>b.toggleBulletList&&b.toggleBulletList(...e))},[(0,s.bF)(y,{icon:"fa-light fa-list-ul"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("orderedList")}]),type:"button",title:"Ordered List",onClick:t[12]||(t[12]=(...e)=>b.toggleOrderedList&&b.toggleOrderedList(...e))},[(0,s.bF)(y,{icon:"fa-light fa-list-ol"})],2),(0,s.Lk)("button",{class:"toolbar-button",type:"button",title:"Indent",onClick:t[13]||(t[13]=(...e)=>b.increaseIndent&&b.increaseIndent(...e))},[(0,s.bF)(y,{icon:"fa-light fa-indent"})]),(0,s.Lk)("button",{class:"toolbar-button",type:"button",title:"Outdent",onClick:t[14]||(t[14]=(...e)=>b.decreaseIndent&&b.decreaseIndent(...e))},[(0,s.bF)(y,{icon:"fa-light fa-outdent"})]),t[34]||(t[34]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive({textAlign:"left"})}]),type:"button",title:"Align Left",onClick:t[15]||(t[15]=(...e)=>b.alignLeft&&b.alignLeft(...e))},[(0,s.bF)(y,{icon:"fa-light fa-align-left"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive({textAlign:"center"})}]),type:"button",title:"Align Center",onClick:t[16]||(t[16]=(...e)=>b.alignCenter&&b.alignCenter(...e))},[(0,s.bF)(y,{icon:"fa-light fa-align-center"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive({textAlign:"right"})}]),type:"button",title:"Align Right",onClick:t[17]||(t[17]=(...e)=>b.alignRight&&b.alignRight(...e))},[(0,s.bF)(y,{icon:"fa-light fa-align-right"})],2),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive({textAlign:"justify"})}]),type:"button",title:"Align Justify",onClick:t[18]||(t[18]=(...e)=>b.alignJustify&&b.alignJustify(...e))},[(0,s.bF)(y,{icon:"fa-light fa-align-justify"})],2),t[35]||(t[35]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("link")}]),type:"button",title:"Add Link",onClick:t[19]||(t[19]=(...e)=>b.addLink&&b.addLink(...e))},[(0,s.bF)(y,{icon:"fa-light fa-link"})],2),(0,s.Lk)("button",{class:"toolbar-button",type:"button",title:"Add Image",onClick:t[20]||(t[20]=(...e)=>b.addImage&&b.addImage(...e))},[(0,s.bF)(y,{icon:"fa-light fa-image"})]),(0,s.Lk)("button",{class:(0,a.C4)(["toolbar-button",{"is-active":f.editor.isActive("blockquote")}]),type:"button",title:"Blockquote",onClick:t[21]||(t[21]=(...e)=>b.toggleBlockquote&&b.toggleBlockquote(...e))},[(0,s.bF)(y,{icon:"fa-light fa-quote-right"})],2),(0,s.Lk)("button",{class:"toolbar-button",type:"button",title:"Horizontal Rule",onClick:t[22]||(t[22]=(...e)=>b.insertHorizontalRule&&b.insertHorizontalRule(...e))},[(0,s.bF)(y,{icon:"fa-light fa-minus"})]),t[36]||(t[36]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.bF)(k,{"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",u,[(0,s.bF)(y,{icon:"fa-light fa-highlighter"})])]),default:(0,s.k6)(()=>[(0,s.bF)(v,{"aria-role":"listitem",custom:"",paddingless:""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",m,[(0,s.Lk)("div",p,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(f.highlightColors,e=>((0,s.uX)(),(0,s.CE)("button",{key:e,class:(0,a.C4)(["color-option",{"is-active":b.isHighlightActive(e)}]),style:(0,a.Tr)({backgroundColor:e}),title:e,onClick:t=>
1b.setBackgroundColor(e)},null,14,h))),128))]),(0,s.bF)(v,{"aria-role":"listitem",onClick:t[23]||(t[23]=e=>b.setBackgroundColor(null))},{default:(0,s.k6)(()=>[(0,s.bF)(y,{icon:"fa-light fa-ban",class:"mr-2"}),t[30]||(t[30]=(0,s.Lk)("span",null,"Remove Highlight",-1))]),_:1})])]),_:1})]),_:1}),t[37]||(t[37]=(0,s.Lk)("span",{class:"toolbar-separator"},null,-1)),(0,s.Lk)("button",{class:"toolbar-button",type:"button",title:"Clear Formatting",onClick:t[24]||(t[24]=(...e)=>b.clearFormatting&&b.clearFormatting(...e))},[(0,s.bF)(y,{icon:"fa-light fa-eraser"})])])):(0,s.Q3)("",!0),(0,s.bF)(C,{editor:f.editor,class:(0,a.C4)({"editor-content p-2":i.isEditable})},null,8,["editor","class"]),(0,s.bF)(L,{ref:"imageUploadModal"},null,512)])}i(44114),i(18111),i(22489),i(7588),i(61701),i(14603),i(47566),i(98721);var f=i(45442),b=i(14905),y=i(7417),v=i(27846),k=i(94341),C=i(84460),L=i(37594),w=i(63165),_=i(18049),E=i(81036),$=i(1073),F=i(43873),T=F.CU.create({name:"placeholderMark",inclusive:!1,addAttributes(){return{id:{default:null},class:{default:null},style:{default:null},"data-placeholder":{default:null},"data-action":{default:null}}},parseHTML(){return[{tag:"span[data-placeholder]",getAttrs:e=>{const t=e instanceof HTMLElement?e:null;return t?{id:t.getAttribute("id"),class:t.getAttribute("class"),style:t.getAttribute("style"),"data-placeholder":t.getAttribute("data-placeholder"),"data-action":t.getAttribute("data-action")}:{}}}]},renderHTML({HTMLAttributes:e}){return["span",(0,F.KV)(e),0]}}),S=i(94589);const A=S._V.extend({addOptions(){return{...this.parent?.(),isEditable:!0}},addAttributes(){return{...this.parent?.(),width:{default:null,parseHTML:e=>e.style.width||null,renderHTML:e=>{const{width:t}=e;return t?{style:`width: ${t}`}:{}}},alignment:{default:null,parseHTML:e=>e.getAttribute("data-alignment")||null,renderHTML:e=>{const{alignment:t}=e;return t?{"data-alignment":t}:{}}},"data-pending-upload":{default:null,parseHTML:e=>e.getAttribute("data-pending-upload")||null,renderHTML:e=>{const t=e["data-pending-upload"];return t?{"data-pending-upload":t}:{}}}}},addCommands(){return{...this.parent?.(),setImageAlign:e=>({chain:t})=>t().updateAttributes("image",{alignment:e}).run()}},addNodeView(){return({node:e,getPos:t,editor:i})=>{const s=document.createElement("div");s.classList.add("resizable-image-container");const a=document.createElement("img");a.src=e.attrs.src,e.attrs.width&&(a.style.width=e.attrs.width),e.attrs["data-pending-upload"]&&a.setAttribute("data-pending-upload",e.attrs["data-pending-upload"]),s.appendChild(a);const n=document.createElement("div");n.classList.add("resize-handle"),n.style.display="none",s.appendChild(n);const o=this.options.isEditable,l=e=>{s.style.float="",s.style.display="",s.style.margin="",s.style.justifyContent="",a.style.display="block",s.style.display="table","center"===e?s.style.margin="0 auto":"left"===e?s.style.margin="0":"right"===e&&(s.style.marginLeft="auto",s.style.marginRight="0")};return l(e.attrs.alignment),o&&(a.addEventListener("click",()=>{const{state:e,view:s}=i,a=t(),n=e.tr.setSelection(i.state.selection.constructor.near(e.doc.resolve(a)));s.dispatch(n)}),n.addEventListener("mousedown",s=>{const{state:n}=i,o=n.selection;if(!(o.from<=t()&&o.to>=t()+e.nodeSize))return;s.preventDefault();const l=s.clientX,r=a.offsetWidth,d=t=>{const s=t.clientX-l,a=Math.max(50,r+s)+"px";i.chain().focus().updateAttributes(e.type.name,{width:a}).run()},c=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",c)})),{dom:s,update:t=>t.type===e.type&&(t.attrs.src!==e.attrs.src&&(a.src=t.attrs.src),t.attrs.width!==e.attrs.width&&(a.style.width=t.attrs.width||"auto"),t.attrs.alignment!==e.attrs.alignment&&l(t.attrs.alignment),e=t,!0),selectNode(){o&&(s.classList.add("is-selected"),n.style.display="block")},deselectNode(){o&&(s.classList.remove("is-selected"),n.style.display="none")}}}}});A.configure({isEditable:!1});var P=i(61273);const I={class:"card"},M={class:"card-content is-flex is-flex-direction-column is-align-items-center"},x={class:"title is-4"},N={class:"upload-area"},U={class:"icon is-large"},D={class:"mt-3"},X={class:"is-size-7 has-text-grey mt-2"},V={key:0,class:"image mt-4"},R=["src"],O={class:"buttons mt-4"};function Q(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon"),d=(0,s.g2)("b-upload"),c=(0,s.g2)("b-button"),u=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.Wv)(u,{modelValue:o.isActive,"onUpdate:modelValue":t[1]||(t[1]=e=>o.isActive=e),width:640,scroll:"keep"},{default:(0,s.k6)(()=>
1[(0,s.Lk)("div",I,[(0,s.Lk)("div",M,[(0,s.Lk)("p",x,(0,a.v_)(e.$t("Upload Image")),1),(0,s.bF)(d,{modelValue:o.selectedFile,"onUpdate:modelValue":[t[0]||(t[0]=e=>o.selectedFile=e),l.previewImage],"drag-drop":"",accept:"image/*"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",N,[(0,s.Lk)("span",U,[(0,s.bF)(r,{icon:"fa-light fa-cloud-upload",size:"3x"})]),(0,s.Lk)("p",D,(0,a.v_)(e.$t("Click or drag image here")),1),(0,s.Lk)("p",X,(0,a.v_)(e.$t("Maximum file size"))+": "+(0,a.v_)(o.maxSizeMB)+"MB",1)])]),_:1},8,["modelValue","onUpdate:modelValue"]),o.previewUrl?((0,s.uX)(),(0,s.CE)("figure",V,[(0,s.Lk)("img",{src:o.previewUrl,style:{"max-height":"300px",width:"auto",margin:"0 auto",display:"block"}},null,8,R)])):(0,s.Q3)("",!0),(0,s.Lk)("div",O,[(0,s.bF)(c,{class:"is-rounded",disabled:o.isUploading,onClick:l.cancel},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Cancel")),1)]),_:1},8,["disabled","onClick"]),(0,s.bF)(c,{type:"is-primary",class:"is-rounded",loading:o.isUploading,disabled:!o.selectedFile,onClick:l.uploadAndInsert},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Insert Image")),1)]),_:1},8,["loading","disabled","onClick"])])])])]),_:1},8,["modelValue"])}var B=i(28782),G={name:"TipTapImageUploadModal",data(){return{isActive:!1,selectedFile:null,previewUrl:null,isUploading:!1,callback:null,maxSizeMB:Math.round(B.w3/1024/1024)}},beforeUnmount(){this.previewUrl&&URL.revokeObjectURL(this.previewUrl)},methods:{open(e){this.isActive=!0,this.callback=e,this.selectedFile=null,this.previewUrl=null},previewImage(){if(this.selectedFile){if(this.selectedFile.size>B.w3)return this.$buefy.toast.open({message:this.$t("File size exceeds maximum allowed size"),type:"is-danger",duration:5e3}),void(this.selectedFile=null);this.previewUrl=URL.createObjectURL(this.selectedFile)}},uploadAndInsert(){this.selectedFile&&(this.callback&&this.callback(this.selectedFile),this.isActive=!1)},uploadToS3(e){return this.$http.plain.get(`/s3-upload?fileType=${e.type}&fileName=${e.name}&type=tiptapimage`).then(t=>{const i=new FormData;for(const[e,s]of Object.entries(t.data.additionalData))i.append(e,s);return i.append("Content-type",e.type),i.append("acl","public-read"),i.append("file",e,t.data.newFileName),fetch(B.ze+"/",{method:"POST",body:i}).then(e=>{if(200!==e.status&&204!==e.status)throw new Error("S3 upload failed");return{url:B.ze+"/media/tiptapimage/"+t.data.newFileName}})})},cancel(){this.isActive=!1,this.previewUrl&&URL.revokeObjectURL(this.previewUrl)}}},W=i(66262);const j=(0,W.A)(G,[["render",Q],["__scopeId","data-v-42d0a387"]]);var z=j,q=i(53751);const J={name:"TipTap",components:{FontAwesomeIcon:P.gc,EditorContent:f.$Z,TipTapImageUploadModal:z},props:{modelValue:{type:String,required:!1,default:""},isEditable:{type:Boolean,required:!1,default:!0},hasPlaceholders:{type:Boolean,required:!1,default:!1},initialHeight:{type:String,required:!1,default:"200px"}},data(){return{editor:null,highlightColors:["#fff9c4","#c1f5c1","#b8dff8","#ffc0cb","#e6ccff"],pendingUploads:new Map,nextTempId:1}},computed:{editorMinHeight(){return this.modelValue&&""!==this.modelValue.trim()&&"<p></p>"!==this.modelValue&&"<p> </p>"!==this.modelValue||!this.isEditable?"auto":this.initialHeight}},watch:{modelValue(e){this.editor&&e!==this.editor.getHTML()&&this.editor.commands.setContent(e)}},mounted(){this.editor=new f.KE({editable:this.isEditable,extensions:[T,b.W.configure({bold:!1,hardBreak:$.A.configure({keepMarks:!1}),blockquote:!1}),_.Ay.configure({keepOnSplit:!1}),E.A.configure({levels:[1,2,3,4],HTMLAttributes:{class:"has-text-weight-bold"}}),k.A.configure({types:["heading","paragraph"]}),y.xJ,A.configure({isEditable:this.isEditable}),v.Ay.configure({multicolor:!0}),C.Ay.configure({openOnClick:!1,HTMLAttributes:{class:"has-text-link"}}),L.A,w.Ay.configure({HTMLAttributes:{class:"blockquote"}})],content:this.modelValue,editorProps:{handleDrop:(e,t,i,s)=>{if(!s&&t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length){const i=Array.from(t.dataTransfer.files),s=i.filter(e=>e.type.startsWith("image/"));if(s.length>0)return t.preventDefault(),this.uploadAndInsertImages(s,e.state.selection.from),!0}return!1},handlePaste:(e,t,i)=>{const s=t.clipboardData&&t.clipboardData.items;if(s){const i=[];for(let e=0;e<s.length;e++)if(s[e].type.startsWith("image/")){const t=s[e].getAsFile();t&&i.push(t)}if(i.length>0)return t.preventDefault(),this.uploadAndInsertImages(i,e.state.selection.from),!0}return!1}},onCreate:({editor:e})=>{let t=e.getHTML().replace(/<p><\/p>/g,"<p> </p>");this.$emit("update:modelValue",t),this.isEditable&&this.$nextTick(()=>{e.commands.focus()})},onUpdate:({editor:e})=>{let t=e.getHTML().replace(/<p><\/p>/g,"<p> </p>");this.$emit("update:modelValue",t)}})},beforeUnmount(){this.editor.destroy()},methods:{getCurrentHeading(){return this.editor.isActive("heading",{level:1})?"H1":this.editor.isActive("heading",{level:2})?"H2":this.editor.isActive("heading",{level:3})?"H3":this.editor.isActive("heading",{level:4})?"H4":"Paragraph"},toggleBold(){this.editor.chain().focus().toggleBold().run()},toggleItalic(){this.editor.chain().focus().toggleItalic().run()},toggleUnderline(){this.editor.chain().focus().toggleUnderline().run()},toggleStrikethrough(){this.editor.chain().focus().toggleStrike().run()},setParagraph(){this.editor.chain().focus().setParagraph().run()},setHeading(e){this.editor.chain().focus().toggleHeading({level:e}).run()},isHighlightActive(e){return this.editor&&this.editor.isActive("highlight",{color:e})}
1,setBackgroundColor(e){e?this.editor.chain().focus().setHighlight({color:e}).run():this.editor.chain().focus().unsetHighlight().run()},alignLeft(){this.editor.isActive("image")?this.editor.chain().focus().setImageAlign("left").run():this.editor.chain().focus().setTextAlign("left").run()},alignCenter(){this.editor.isActive("image")?this.editor.chain().focus().setImageAlign("center").run():this.editor.chain().focus().setTextAlign("center").run()},alignRight(){this.editor.isActive("image")?this.editor.chain().focus().setImageAlign("right").run():this.editor.chain().focus().setTextAlign("right").run()},alignJustify(){this.editor.chain().focus().setTextAlign("justify").run()},toggleBulletList(){this.editor.chain().focus().toggleBulletList().run()},toggleOrderedList(){this.editor.chain().focus().toggleOrderedList().run()},increaseIndent(){this.editor.chain().focus().sinkListItem("listItem").run()},decreaseIndent(){this.editor.chain().focus().liftListItem("listItem").run()},addLink(){const e=this.editor.getAttributes("link").href,t=prompt("Enter the URL",e||"");null!==t&&(""===t?this.editor.chain().focus().unsetLink().run():this.editor.chain().focus().setLink({href:t}).run())},addImage(){this.$refs.imageUploadModal.open(e=>{const t="temp-"+this.nextTempId++,i=URL.createObjectURL(e);this.pendingUploads.set(t,{file:e,blobUrl:i}),this.editor.chain().focus().setImage({src:i,width:"300px","data-pending-upload":t}).run()})},uploadAndInsertImages(e,t){e.forEach(e=>{const i="temp-"+this.nextTempId++,s=URL.createObjectURL(e);this.pendingUploads.set(i,{file:e,blobUrl:s}),this.editor.chain().focus().insertContentAt(t,{type:"image",attrs:{src:s,width:"300px","data-pending-upload":i}}).run()})},uploadPendingImages(){if(0===this.pendingUploads.size)return Promise.resolve(this.editor.getHTML());const e=this.editor.getHTML(),t=new DOMParser,i=t.parseFromString(e,"text/html"),s=Array.from(i.querySelectorAll("img[data-pending-upload]")),a=s.map(e=>{const t=e.getAttribute("data-pending-upload"),i=this.pendingUploads.get(t);return i?this.$refs.imageUploadModal.uploadToS3(i.file).then(s=>{e.src=s.url,e.removeAttribute("data-pending-upload"),URL.revokeObjectURL(i.blobUrl),this.pendingUploads.delete(t)}).catch(t=>{console.error("Error uploading image:",t),e.remove()}):Promise.resolve()});return Promise.all(a).then(()=>{const e=i.body.innerHTML;return this.editor.commands.setContent(e),e})},addTable(){this.editor.chain().focus().insertTable({rows:3,cols:3}).run()},toggleBlockquote(){this.editor.chain().focus().toggleBlockquote().run()},undo(){this.editor.chain().focus().undo().run()},redo(){this.editor.chain().focus().redo().run()},insertHorizontalRule(){this.editor.chain().focus().setHorizontalRule().run()},clearFormatting(){this.editor.chain().focus().clearNodes().run(),this.editor.chain().focus().unsetAllMarks().run()},onSliderChange(e){const t=e.target.value;this.editor.chain().focus().updateAttributes("image",{width:`${t}px`}).run()}}},H=()=>{(0,q.$9)(e=>({v32fd4822:e.editorMinHeight}))},K=J.setup;J.setup=K?(e,t)=>(H(),K(e,t)):H;var Y=J;const Z=(0,W.A)(Y,[["render",g]]);var ee=Z},53755:function(e,t,i){"use strict";i.d(t,{A:function(){return w}});var s=i(20641),a=i(90033);const n={key:0,class:"remove-link"},o=["href"],l=["src"],r={key:1,class:"og-meta-footer px-4 py-3"},d={key:0,class:"is-size-7 has-text-grey"},c={key:1,class:"has-text-weight-semibold og-meta-title"},u=["href"],m=["href"],p=["src"],h={key:0,class:"media-content"},g={class:"content p-3"},f={key:0,class:"is-size-7 has-text-grey embed-provider"},b={key:1,class:"is-size-6-half pt-1"},y=["href"];function v(e,t,i,v,k,C){return i.embed?((0,s.uX)(),(0,s.CE)("section",{key:0,class:(0,a.C4)(["o-cmedia",{"comment-width my-4":i.isComment,"discuss-og-fullwidth":!i.isComment}])},[(0,s.Lk)("div",null,[i.writeMode?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("button",{class:"delete",onClick:t[0]||(t[0]=(...e)=>i.resetEmbedLink&&i.resetEmbedLink(...e))})])):(0,s.Q3)("",!0),i.isComment?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[i.embed.image&&!k.imageBroken?((0,s.uX)(),(0,s.CE)("a",{key:0,href:i.embed.url,target:"_blank"},[(0,s.Lk)("img",{src:i.embed.image,onError:t[2]||(t[2]=e=>k.imageBroken=!0)},null,40,p)],8,m)):(0,s.Q3)("",!0)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[i.embed.image&&!k.imageBroken?((0,s.uX)(),(0,s.CE)("a",{key:0,href:i.embed.url,target:"_blank"},[(0,s.Lk)("img",{class:"og-fullwidth-image",src:i.embed.image,onError:t[1]||(t[1]=e=>k.imageBroken=!0)},null,40,l)],8,o)):(0,s.Q3)("",!0),i.embed.title||i.embed.url?((0,s.uX)(),(0,s.CE)("div",r,[i.embed.url?((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(C.getURL(i.embed.url)),1)):(0,s.Q3)("",!0),i.embed.title?((0,s.uX)(),(0,s.CE)("span",c,[(0,s.Lk)("a",{href:i.embed.url,target:"_blank"},(0,a.v_)(i.embed.title),9,u)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)],64))]),i.isComment?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.Lk)("div",g,[i.embed.url?((0,s.uX)(),(0,s.CE)("span",f,(0,a.v_)(C.getURL(i.embed.url)),1)):(0,s.Q3)("",!0),t[3]||(t[3]=(0,s.Lk)("br",null,null,-1)),i.embed.title?((0,s.uX)(),(0,s.CE)("span",b,[(0,s.Lk)("a",{href:i.embed.url,target:"_blank"},(0,a.v_)(i.embed.title),9,y)])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)],2)):(0,s.Q3)("",!0)}i(14603),i(47566),i(98721);var k={props:["embed","resetEmbedLink","isComment","writeMode"],data(){return{imageBroken:!1}},methods:{getURL(e){let t=new URL(e);return t.hostname.toLowerCase()}}},C=i(66262);const L=(0,C.A)(k,[["render",v]]);var w=L},54148:function(e,t,i){"use strict";i.d(t,{Sf:function(){return a},j5:function(){return n},mh:function(){return s}});i(18111),i(22489),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);function s(e,t,i){if(!e||!t||!t.length)return null;if(i&&i[e])return i[e];const s=t.indexOf(e);if(-1===s)return null;const a=Math.round(360*s/t.length);return`hsl(${a}, 65%, 48%)`}function a(e){if(!e)return"#3273dc";const t=e.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);if(!t)return"#3273dc";let i=parseInt(t[1])/360,s=parseInt(t[2])/100,a=parseInt(t[3])/100;const n=(e,t,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e);let o,l,r;if(0===s)o=l=r=a;else{const e=a<.5?a*(1+s):a+s-a*s,t=2*a-e;
1o=n(t,e,i+1/3),l=n(t,e,i),r=n(t,e,i-1/3)}const d=e=>{const t=Math.round(255*e).toString(16);return 1===t.length?"0"+t:t};return"#"+d(o)+d(l)+d(r)}function n(e){const t=(e||[]).map(e=>e&&e.location).filter(e=>e&&e.trim());return[...new Set(t)].sort((e,t)=>e.localeCompare(t))}},54481:function(e,t,i){"use strict";i.d(t,{Wq:function(){return o},Yx:function(){return l},xy:function(){return a}});const s="US",a=e=>e?.country?.code===s,n={long:{us:"MMM D, YYYY",intl:"Do MMM YYYY"},dateTime:{us:"MMM D, YYYY HH:mm",intl:"D MMM YYYY HH:mm"},shortDate:{us:"MMM D",intl:"D MMM"},shortDateTime:{us:"MMM D, HH:mm",intl:"D MMM, HH:mm"},weekdayShort:{us:"ddd, MMM D",intl:"ddd, D MMM"},weekdayLong:{us:"dddd, MMMM D",intl:"dddd, D MMMM"},monthDay:{us:"MMMM D",intl:"D MMMM"},monthDayYear:{us:"MMMM D, YYYY",intl:"MMMM Do YYYY"},numeric:{us:"MM/DD/YYYY",intl:"DD.MM.YYYY"},time:{us:"HH:mm",intl:"HH:mm"},date:{us:"MMM D, YYYY",intl:"D MMM YYYY"},longDateTime:{us:"MMMM D, YYYY, HH:mm",intl:"D MMMM YYYY, HH:mm"},weekdayShortYear:{us:"ddd, MMM D, YYYY",intl:"ddd, D MMM YYYY"},weekdayLongYear:{us:"dddd, MMMM D, YYYY",intl:"dddd D MMMM YYYY"}},o=(e,t)=>{const i=n[e];return i?t?i.us:i.intl:e},l=(Object.keys(n),["DD.MM.YYYY","D.M.YYYY","MM/DD/YYYY","M/D/YYYY","YYYY-MM-DD"])},55318:function(e,t,i){"use strict";i.d(t,{CS:function(){return f},K9:function(){return r},WH:function(){return g},u_:function(){return h}});i(44114);var s=i(59772),a=i(43464),n=i(36049);const o={execute(){(0,n.ut)()||"accept"===localStorage.getItem("vue-cookie-accept-decline-myPanel1")&&(window.dataLayer=window.dataLayer||[],l()||c(),u(),d())}};function l(){return"website"===s.A.currentRoute.value?.meta?.layout}function r(){const e=a.M.state.tenant?.settingFeatures?.integrations;return!!e?.facebookPixelId||(!(!e?.isActive||!e.googleAnalyticsId&&!e.googleTagManagerId)||!l())}function d(e=null,t=null){a.M.state.tenant?.settingFeatures?.integrations?.facebookPixelId&&(window.fbq||(function(e,t,i,s,a,n,o){e.fbq||(a=e.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},e._fbq||(e._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.queue=[],n=t.createElement(i),n.async=!0,n.src=s,o=t.getElementsByTagName(i)[0],o.parentNode.insertBefore(n,o))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),fbq("init",a.M.state.tenant?.settingFeatures?.integrations?.facebookPixelId),fbq("track","PageView")))}function c(){let e="UA-148594957-1";if(document.getElementById(`ga-script-${e}`))return;let t=document.createElement("script");function i(){dataLayerOrgo.push(arguments)}t.id=`ga-script-${e}`,t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.dataLayerOrgo=window.dataLayerOrgo||[],window.orgoGtag=i,i("js",new Date),i("config",e)}function u(e=null,t=null){if(!a.M.state.tenant?.settingFeatures?.integrations?.isActive)return;const i=a.M.state.tenant?.settingFeatures?.integrations,s=i.googleAnalyticsId,n=i.googleTagManagerId;n?m(n):s&&p(s,e,t)}function m(e){if(document.getElementById(`gtm-script-${e}`))return;let t=document.createElement("script");t.id=`gtm-script-${e}`,t.async=!0,t.src=`https://www.googletagmanager.com/gtm.js?id=${e}`,document.head.appendChild(t),window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":(new Date).getTime(),event:"gtm.js"})}function p(e,t=null,i=null){if(document.getElementById(`ga-script-${e}`))return;let s=document.createElement("script");function a(){dataLayer.push(arguments)}s.id=`ga-script-${e}`,s.async=!0,s.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(s),window.dataLayer=window.dataLayer||[],window.gtag=a,a("js",new Date),a("config",e),t&&i?a("event",t,i):a("send","pageview")}function h(e,t){window.gtag&&window.gtag("event",e,t)}function g(e,t){window.dataLayer&&window.dataLayer.push({event:e,...t})}function f(e,t){window.fbq&&fbq("track",e,t)}t.Ay=o},55657:function(e,t,i){"use strict";i.d(t,{om:function(){return p},Yp:function(){return m},zV:function(){return n},x8:function(){return o},c_:function(){return g},V2:function(){return b},cc:function(){return f},g5:function(){return y},i0:function(){return v},l0:function(){return u}});var s=i(28782);const a={ABW:[12.423,-70.066,12.614,-69.896],AFG:[29.392,60.486,38.456,74.891],AGO:[-18.02,11.743,-4.431,24.047],AIA:[18.171,-63.16,18.27,-62.98],ALA:[60.012,19.519,60.406,20.611],ALB:[39.654,19.281,42.648,21.031],AND:[42.437,1.415,42.643,1.74],ARE:[22.624,51.568,26.063,56.388],ARG:[-55.032,-73.576,-21.803,-53.671],ARM:[38.878,43.439,41.291,46.585],ASM:[-14.36,-170.821,-14.257,-170.568],ATA:[-89.999,-180,-60.521,180],ATF:[-49.705,68.77,-48.661,70.555],ATG:[16.997,-61.887,17.714,-61.686],AUS:[-43.612,112.908,-10.052,153.617],AUT:[46.4,9.524,49.001,17.147],AZE:[38.411,44.768,41.891,50.366],BDI:[-4.456,29.014,-2.313,30.811],BEL:[49.511,2.525,51.491,6.364],BEN:[6.217,.78,12.384,3.834],BFA:[9.425,-5.524,15.07,2.389],BGD:[20.792,88.023,26.572,92.632],BGR:[41.244,22.344,44.238,28.585],BHR:[25.807,50.452,26.241,50.61],BHS:[20.937,-78.986,26.94,-72.747],BIH:[42.56,15.737,45.277,19.584],BLM:[17.875,-62.875,17.922,-62.8],BLR:[51.265,23.175,56.146,32.706],BLZ:[15.891,-89.237,18.477,-87.789],BMU:[32.26,-64.863,32.387,-64.668],BOL:[-22.889,-69.646,-9.712,-57.496],BRA:[-33.742,-74.002,5.258,-34.805],BRB:[13.062,-59.647,13.318,-59.428],BRN:[4.038,114.064,5.022,115.327],BTN:[26.702,88.739,28.311,92.083],BWA:[-2
16.852,19.977,-17.794,29.365],CAF:[2.27,14.431,10.996,27.403],CAN:[41.675,-141.002,83.116,-52.654],CHE:[45.83,5.97,47.776,10.455],CHL:[-55.89,-75.708,-17.506,-66.436],CHN:[18.218,73.607,53.547,134.752],CIV:[4.351,-8.604,10.724,-2.506],CMR:[1.676,8.533,13.079,16.183],COD:[-13.454,12.214,5.312,31.274],COG:[-5.004,11.13,3.685,18.622],COK:[-21.25,-159.842,-21.186,-159.737],COL:[-4.236,-79.025,12.432,-66.876],COM:[-12.368,43.227,-11.368,44.527],CPV:[14.818,-25.342,17.194,-22.682],CRI:[8.071,-85.908,11.189,-82.564],CUB:[19.855,-84.887,23.19,-74.137],CUW:[12.045,-69.159,12.38,-68.751],CYM:[19.272,-81.419,19.385,-81.107],CYN:[35,32.713,35.662,34.556],CYP:[34.57,32.301,35.173,34.05],CZE:[48.576,12.09,51.029,18.832],DEU:[47.279,5.858,55.059,15.017],DJI:[10.941,41.765,12.709,43.41],DMA:[15.227,-61.481,15.633,-61.251],DNK:[54.629,8.121,57.737,15.137],DOM:[17.636,-72,19.914,-68.339],DZA:[18.988,-8.683,37.092,11.968],ECU:[-4.991,-80.963,1.455,-75.25],EGY:[21.995,24.703,31.655,36.871],ERI:[12.38,36.427,18.005,43.117],ESH:[20.806,-17.099,27.656,-8.682],ESP:[36.026,-9.235,43.765,4.322],EST:[57.528,21.854,59.639,28.151],ETH:[3.456,33.013,14.852,47.978],FIN:[59.826,20.622,70.062,31.534],FJI:[-19.152,177.183,-16.169,180],FLK:[-52.308,-61.145,-51.27,-57.792],FRA:[41.385,-4.762,51.097,9.551],FRO:[61.414,-7.423,62.356,-6.406],FSM:[6.791,158.128,6.978,158.335],GAB:[-3.916,8.703,2.3,14.474],GBR:[50.021,-8.145,60.832,1.747],GEO:[41.07,39.978,43.57,46.673],GGY:[49.429,-2.646,49.507,-2.512],GHA:[4.762,-3.236,11.167,1.187],GIN:[7.216,-15.051,12.674,-7.681],GMB:[13.064,-16.825,13.812,-13.827],GNB:[10.94,-16.712,12.68,-13.674],GNQ:[.96,8.434,3.758,11.335],GRC:[34.934,19.646,41.744,28.232],GRD:[12.008,-61.782,12.237,-61.607],GRL:[59.815,-72.818,83.6,-11.426],GTM:[13.737,-92.235,17.816,-88.228],GUM:[13.258,144.649,13.622,144.941],GUY:[1.204,-61.391,8.549,-56.483],HKG:[22.195,113.839,22.565,114.335],HMD:[-53.185,73.251,-52.966,73.838],HND:[12.979,-89.363,16.514,-83.158],HRV:[42.433,13.517,46.535,19.401],HTI:[18.039,-74.478,20.092,-71.645],HUN:[45.767,16.093,48.552,22.877],IDN:[-10.909,95.207,5.907,140.976],IMN:[54.059,-4.785,54.407,-4.338],IND:[6.749,68.165,35.496,97.339],IOT:[-7.435,72.35,-7.22,72.499],IRL:[51.474,-10.39,55.36,-6.027],IRN:[25.102,44.023,39.769,63.305],IRQ:[29.064,38.774,37.372,48.546],ISL:[63.407,-24.476,66.523,-13.57],ISR:[29.477,34.245,33.416,35.888],ITA:[36.688,6.628,47.082,18.486],JAM:[17.715,-78.34,18.522,-76.211],JEY:[49.17,-2.236,49.266,-2.01],JOR:[29.19,34.951,33.372,39.293],JPN:[26.095,127.653,45.51,145.833],KAS:[35.11,76.767,35.662,77.799],KAZ:[40.619,46.609,55.39,87.323],KEN:[-4.692,33.903,5.492,41.884],KGZ:[39.208,69.229,43.24,80.246],KHM:[10.411,102.32,14.705,107.605],KIR:[1.732,-159.409,3.924,-157.176],KNA:[17.101,-62.839,17.403,-62.532],KOR:[33.215,126.008,38.623,130.934],KOS:[41.866,20.029,43.261,21.752],KWT:[28.533,46.531,30.08,48.442],LAO:[13.921,100.115,22.495,107.653],LBN:[33.076,35.109,34.679,36.585],LBR:[4.351,-11.508,8.538,-7.4],LBY:[19.497,9.31,33.182,25.15],LCA:[13.718,-61.073,14.093,-60.887],LIE:[47.057,9.479,47.271,9.611],LKA:[5.949,79.713,9.813,81.874],LSO:[-30.631,27.057,-28.582,29.391],LTU:[53.893,20.9,56.411,26.776],LUX:[49.445,5.725,50.167,6.487],LVA:[55.668,21.015,58.063,28.202],MAC:[22.196,113.479,22.246,113.548],MAF:[18.069,-63.123,18.115,-63.009],MAR:[21.421,-17.003,35.93,-1.066],MCO:[43.732,7.378,43.771,7.439],MDA:[45.45,26.619,48.478,30.131],MDG:[-25.571,43.265,-12.08,50.483],MDV:[3.229,73.382,3.29,73.443],MEX:[14.545,-118.401,32.715,-86.755],MHL:[7.069,171.036,7.172,171.394],MKD:[40.85,20.449,42.358,23.004],MLI:[10.143,-12.281,24.996,4.235],MLT:[35.82,14.18,36.076,14.566],MMR:[9.875,92.18,28.51,101.147],MNE:[41.869,18.436,43.533,20.348],MNG:[41.596,87.743,52.117,119.898],MNP:[14.111,145.152,15.265,145.822],MOZ:[-26.849,30.232,-10.464,40.845],MRT:[14.745,-17.064,27.286,-4.823],MSR:[16.681,-62.223,16.81,-62.148],MUS:[-20.513,57.318,-19.99,57.792],MWI:[-17.127,32.67,-9.395,35.893],MYS:[.862,109.539,7.352,119.256],NAM:[-28.939,11.733,-16.968,25.259],NCL:[-22.661,164.041,-20.142,168.139],NER:[11.696,.164,23.518,15.963],NFK:[-29.096,167.906,-29.014,167.99],NGA:[4.277,2.686,13.873,14.62],NIC:[10.735,-87.67,15.008,-83.158],NIU:[-19.138,-169.948,-18.966,-169.793],NLD:[50.75,3.35,53.475,7.197],NOR:[58.021,4.799,71.142,30.961],NPL:[26.36,80.052,30.388,88.162],NRU:[-.551,166.907,-.489,166.958],NZL:[-47.259,166.478,-34.429,178.536],OMN:[16.648,51.978,26.356,59.838],PAK:[23.753,60.843,37.037,77.049],PAN:[7.22,-83.027,9.598,-77.196],PCN:[-24.413,-128.35,-24.323,-128.29],PER:[-18.346,-81.337,-.042,-68.685],PHL:[5.06,116.97,20.841,126.582],PLW:[7.361,134.506,7.712,134.66],PNG:[-11.631,140.862,-1.353,155.958],POL:[49.021,14.129,54.838,24.106],PRI:[17.947,-67.264,18.522,-65.295],PRK:[37.725,124.349,42.998,130.687],PRT:[37.005,-9.475,42.137,-6.212],PRY:[-27.554,-62.651,-19.286,-54.242],PSE:[31.208,34.198,32.534,35.572],PYF:[-17.862,-151.485,-16.74,-149.151],QAT:[24.565,50.755,26.153,51.609],ROU:[43.671,20.242,48.263,29.706],RUS:[41.213,27.352,81.854,180],RWA:[-2.809,28.858,-1.067,30.877],SAU:[16.372,34.616,32.125,55.641],SDN:[8.666,21.825,22.202,38.609],SEN:[12.328,-17.536,16.679,-11.382],SGP:[1.265,103.65,1.447,103.996],SGS:[-54.867,-38.017,-53.984,-35.799],SHN:[-16.004,-5.783,-15.906,-5.66],SLB:[-11.832,155.678,-6.609,162.373],SLE:[6.907,-13.293,9.997,-10.283],SLV:[13.164,-90.105,14.431,-87.715],SMR:[43.894,12.397,43.99,12.515],SOL:[7.997,42.656,11.5,48.939],SOM:[-1.695,40.979,11.984,51.385],SPM:[46.795,-56.387,47.099,-56.255],SRB:[42.248,18.839,46.161,22.977],SSD:[3.491,24.147,12.223,35.268],STP:[.047,6.468,1.699,7.452],SUR:[1.842,-58.054,5.993,-53.99],SVK:[47.77,16.863,49.598,22.539],SVN:[45.428,13.378,46.863,16.516],SWE:[55.346,11.147,69.037,24.155],SWZ:[-27.306,30.789,-25.743,32.113],SXM:[18.019,-63.125,18.069,-63.011],SYC:[-4.786,55.383,-4.559,55.543],SYR:[32.3
117,35.764,37.297,42.359],TCA:[21.752,-72.342,21.952,-71.637],TCD:[7.475,13.448,23.445,23.98],TGO:[6.089,-.09,11.116,1.778],THA:[5.637,97.374,20.424,105.641],TJK:[36.694,67.358,41.035,75.119],TKM:[35.171,52.494,42.778,66.629],TLS:[-9.512,124.036,-8.14,127.296],TON:[-21.451,-175.362,-21.068,-174.913],TTO:[10.069,-61.906,11.325,-60.525],TUN:[30.229,7.5,37.34,11.534],TUR:[35.831,25.669,42.093,44.817],TUV:[-8.535,179.196,-8.466,179.217],TWN:[21.925,118.287,25.275,121.929],TZA:[-11.716,29.323,-.995,40.464],UGA:[-1.47,29.562,4.22,34.976],UKR:[45.234,22.132,52.354,40.126],URY:[-34.933,-58.438,-30.107,-53.126],USA:[24.63,-124.71,49.37,-66.987],UZB:[37.172,55.976,45.555,73.137],VAT:[41.898,12.428,41.906,12.439],VCT:[13.142,-61.277,13.359,-61.124],VEN:[.688,-73.366,12.178,-59.832],VGB:[18.399,-64.695,18.446,-64.545],VIR:[17.702,-65.024,18.385,-64.58],VNM:[8.583,102.127,23.345,109.445],VUT:[-20.242,166.527,-13.709,169.896],WLF:[-14.325,-178.194,-14.232,-178.044],WSM:[-14.047,-172.779,-13.465,-171.454],YEM:[12.319,42.549,18.996,54.511],ZAF:[-34.786,16.448,-22.146,32.886],ZMB:[-18.042,21.979,-8.194,33.662],ZWE:[-22.402,25.224,-15.643,33.007]},n="geographic",o="political",l="choropleth",r='© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',d=`${r} © <a href="https://carto.com/">CARTO</a>`,c={[n]:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:r},[o]:{carto:"rastertiles/voyager"},[l]:{carto:"rastertiles/light_nolabels"}};function u(e){const t=c[e];if(!t)throw new Error(`Unknown basemap style "${e}" - use one of the TILE_* constants in utils/mapView.js`);if(t.url)return{url:t.url,attribution:t.attribution};const i=String(s.v0||"").trim(),a=i?`?key=${encodeURIComponent(i)}`:"";return{url:`https://{s}.basemaps.cartocdn.com/${t.carto}/{z}/{x}/{y}{r}.png${a}`,attribution:d}}const m={zoomSnap:.5,zoomDelta:.5},p=[12,12],h={pinch:7,wheel:33};function g(e){const t=e?.getContainer?.();t&&!e._orgoZoomSpeedAttached&&(e._orgoZoomSpeedAttached=!0,t.addEventListener("wheel",t=>{e.options.wheelPxPerZoomLevel=t.ctrlKey?h.pinch:h.wheel},{capture:!0,passive:!0}))}function f(e,t,i=p){const s=e.options.zoomSnap;e.options.zoomSnap=0;try{e.fitBounds(t,{padding:i,animate:!1})}finally{e.options.zoomSnap=s}}function b(e){const t=a[String(e?.iso3||"").toUpperCase()];return t?{south:t[0],west:t[1],north:t[2],east:t[3]}:null}function y(e,t,{padding:i=p}={}){if(!e||!t)return!1;const s=b(t);if(s)return f(e,[[s.south,s.west],[s.north,s.east]],i),!0;const[a,n]=String(t.geoLatLong||"").split(","),o=parseFloat(a),l=parseFloat(n);return!(!Number.isFinite(o)||!Number.isFinite(l))&&(e.setView([o,l],parseInt(t.mapZoom)||6),!0)}function v(e,t){return!(!e||!t||t.isInternational)&&y(e,t.country)}},56178:function(e,t,i){"use strict";i.d(t,{H7:function(){return c},KX:function(){return r},WP:function(){return m},Yg:function(){return u},mW:function(){return l},tk:function(){return h},ux:function(){return f},v7:function(){return p},wu:function(){return g},xX:function(){return d}});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(14603),i(47566),i(98721);const s=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/msword","application/vnd.ms-powerpoint","application/vnd.ms-excel"],a={pdf:{icon:"fa-file-pdf",color:"red"},image:{icon:"fa-file-image",color:"orangered"},archive:{icon:"fa-file-archive",color:"mediumpurple"},audio:{icon:"fa-file-audio",color:"rebeccapurple"},video:{icon:"fa-video",color:"rebeccapurple"},word:{icon:"fa-file-word",color:"dodgerblue"},ppt:{icon:"fa-file-powerpoint",color:"deepskyblue"},excel:{icon:"fa-file-excel",color:"green"},csv:{icon:"fa-file-csv",color:"green"},text:{icon:"fa-file-lines",color:"grey"},file:{icon:"fa-file",color:"grey"}},n=["publishing","unpublishing"];function o(e){return n.includes(e)}function l(...e){const t=new Set;for(const i of e)if(Array.isArray(i))for(const e of i)e&&o(e.shareState)&&t.add(e.id);return[...t]}function r(...e){const t=new Set;for(const i of e)if(Array.isArray(i))for(const e of i)e&&e.media&&"PENDING"===e.media.thumbnailStatus&&t.add(e.id);return[...t]}function d(e){if(!e)return null;const t=e.mimeType;return void 0===t?"file":t.includes("image")?"image":t.includes("audio")?"audio":t.includes("pdf")?"pdf":t.includes("video")?"video":t.includes("presentation")?"ppt":t.includes("word")?"word":t.includes("spreadsheet")?"excel":t.includes("csv")?"csv":t.includes("zip")||t.includes("rar")?"archive":t.includes("text")?"text":"file"}function c(e){return!(!e||!e.mimeType)&&s.includes(e.mimeType.toLowerCase())}function u(e,t=null){return"doc"===t?{icon:"fa-file-lines",color:"dodgerblue"}:e&&"folder"!==t?a[d(e)]||a.file:{icon:"fa-folder",color:"grey"}}function m(e){if(!e)return"";if(e.originalName)return e.originalName;if(!e.contentUrl)return"";try{const t=new URL(e.contentUrl),i=decodeURIComponent(t.pathname.split("/").pop()||"");return i.replace(/-[a-f0-9]{16,}(\.[^.]+)$/i,"$1")||i}catch(t){const i=e.contentUrl.split("/").pop()||"";return i.replace(/-[a-f0-9]{16,}(\.[^.]+)$/i,"$1")||i}}function p(e){if(!e)return"0 Bytes";const t=1024,i=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(e)/Math.log(t));return Math.round(e/Math.pow(t,s)*100)/100+" "+i[s]}function h(e){return"pdf"===d(e)}function g(e){return"image"===d(e)}function f(){if("undefined"===typeof navigator)return!1;const e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),i=/Safari/.test(e)&&!/CriOS|FxiOS|EdgiOS/.test(e);return t&&i}},56810:function(e,t,i){"use strict";i.d(t,{A:function(){return b}});i(44114);var s=i(20641),a=i(90033);const n={class:"event-hosted-by"},o={class:"has-text-weight-semibold mb-1 has-text-grey is-size-7 is-uppercase"},l=["src","alt"],r={key:1,class:"has-text-weight-semibold"},d={class:"host-avatar mr-1"},c={key:0,class:"is-size-7 has-text-grey"};function u(e,t,i,u,m,p){const h=(0,s.g2)("LogoThumbnail");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("p",o,(0,a.v_)(e.$t("Hosted by")),1),t[1]||(t[1]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),i.showTenant&&e.tenant?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"is-flex is-align-items-center mb-3 is-clickable",onClick:t[0]||(t[0]=t=>e.$router.push({name:"PublicEventsList",query:{workspace:e.tenant.slug,upcoming:1}}))},[e.tenantLogo?((0,s.uX)(),(0,s.CE)("img",{key:0,src:e.tenantLogo,alt:e.tenant.shortName||e.tenant.name,class:"hosted-by-tenant-logo"},null,8,l)):((0,s.uX)(),(0,s.CE)("span",r,(0,a.v_)(e.tenant.shortName||e.tenant.name),1))])):(0,s.Q3)("",!0),i.owner?((0,s.uX)(),(0,s.Wv)((0,s.$y)(i.linkable&&!i.clickable?"router-link":"div"),{key:1,to:i.linkable&&!i.clickable?{name:"UserShow",params:{item:i.owner.id}}:null,class:(0,a.C4)({"is-flex is-align-items-center":!0,"mt-3":i.showTenant&&e.tenant,"is-clickable":i.clickable}),onClick:p.onOwnerClick},{default:(0,s.k6)(()=>[(0,s.Lk)("span",d,[(0,s.bF)(h,{item:i.owner,"is-type":i.compact?"roundSmall":"roundMedium"},null,8,["item","is-type"])]),(0,s.Lk)("div",null,[(0,s.Lk)("span",{class:(0,a.C4)(["is-size-6-half",{"has-text-weight-semibold":!i.showTenant}])},(0,a.v_)(i.owner.fullName),3),i.showCreatedDate&&i.createdAt?((0,s.uX)(),(0,s.CE)("div",c,(0,a.v_)(e.$t("Created"))+": "+(0,a.v_)(p.formatCreatedDate(i.createdAt)),1)):(0,s.Q3)("",!0)])]),_:1},8,["to","class","onClick"])):(0,s.Q3)("",!0)])}var m=i(40834),p=i(31823),h={name:"EventHostedBy",components:{LogoThumbnail:p.A},props:{owner:{type:Object,default:null},createdAt:{type:String,default:null},showTenant:{type:Boolean,default:!1},showCreatedDate:{type:Boolean,default:!1},linkable:{type:Boolean,default:!0},compact:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1}},emits:["owner-click"],computed:{...(0,m.L8)(["tenant","tenantLogo"])},methods:{formatCreatedDate(e){if(!e)return"";const t=new Date(e);return t.toLocaleDateString(this.$i18n.locale,{year:"numeric",month:"long",day:"numeric"})},onOwnerClick(){this.clickable&&this.owner&&this.$emit("owner-click",this.owner)}}},g=i(66262);const f=(0,g.A)(h,[["render",u],["__scopeId","data-v-b2bbf3b6"]]);var b=f},57027:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033);const n={class:"o-user-card-photo"},o={class:"o-user-card-body"},l={class:"o-user-card-name"},r={class:"o-user-card-badges"},d={key:1,class:"icon-text tag supporter-tag is-rounded"},c={class:"icon is-small"},u={key:0,class:"o-user-card-type"},m={class:"o-user-card-meta"},p={class:"o-user-card-affiliation"};function h(e,t,i,h,g,f){const b=(0,s.g2)("LogoThumbnail"),y=(0,s.g2)("b-tag"),v=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.Wv)((0,s.$y)(i.href?"a":"div"),{href:i.href||null,class:"o-user-card",onClick:f.onClick},{default:(0,s.k6)(()=>[(0,s.Lk)("div",n,[(0,s.bF)(b,{item:f.thumbnailItem,"is-type":"cardCover"},null,8,["item"])]),(0,s.Lk)("div",o,[(0,s.Lk)("p",l,[(0,s.Lk)("strong",null,(0,a.v_)(i.member.fullName),1),(0,s.Lk)("span",r,[f.isMinor?((0,s.uX)(),(0,s.Wv)(y,{key:0,size:"is-small",type:"is-warning is-light",rounded:"",class:"minor-tag",title:e.$t("Under 18")},{default:(0,s.k6)(()=>[...t[0]||(t[0]=[(0,s.eW)(" <18 ",-1)])]),_:1},8,["title"])):(0,s.Q3)("",!0),f.showsSupporterBadge?((0,s.uX)(),(0,s.CE)("span",d,[(0,s.Lk)("span",c,[(0,s.bF)(v,{icon:"fa-light fa-hand-heart"})])])):(0,s.Q3)("",!0)])]),f.showsType?((0,s.uX)(),(0,s.CE)("span",u,[i.member.type.options?.bgcolor?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"pill-option-swatch",style:(0,a.Tr)({backgroundColor:i.member.type.options.bgcolor})}
1,null,4)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(i.member.type.name),1)])):(0,s.Q3)("",!0),(0,s.Lk)("p",m,(0,a.v_)(f.location),1),(0,s.Lk)("p",p,(0,a.v_)(f.affiliation),1)])]),_:1},8,["href","onClick"])}var g=i(40834),f=i(31823),b=i(95256),y={name:"MemberDirectoryCard",components:{LogoThumbnail:f.A},props:{member:{type:Object,required:!0},showsMeta:{type:Boolean,default:!0},href:{type:String,default:null},showsMinorTag:{type:Boolean,default:!0}},emits:["open"],computed:{...(0,g.L8)(["tenant"]),thumbnailItem(){return this.member["@type"]?this.member:(0,b.z7)(this.member)},showsSupporterBadge(){return!(!this.tenant?.settingFeatures?.onlinePayments?.subscriptionSupportProductId||!this.member.isSupporter)},showsType(){return!(!this.member.type||!this.tenant?.settingFeatures?.users?.hasUserTypes)},isMinor(){return this.showsMinorTag&&(0,b.dG)(this.member.age)},location(){return this.showsMeta?(0,b.D2)(this.member.townCurrent,this.tenant):null},affiliation(){return this.showsMeta?(0,b.mF)(this.member,this.tenant):null}},methods:{onClick(e){!this.href||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(e.preventDefault(),this.$emit("open"))}}},v=i(66262);const k=(0,v.A)(y,[["render",h],["__scopeId","data-v-0b6de605"]]);var C=k},57320:function(e,t,i){"use strict";i.d(t,{A:function(){return p}});var s=i(20641),a=i(90033);const n={class:"view-toggle"},o={class:"buttons has-addons"},l={class:"icon is-small"},r={class:"icon is-small"};function d(e,t,i,d,c,u){const m=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",o,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-small",{"is-primary":!i.isGallery}]),onClick:t[0]||(t[0]=t=>e.$emit("toggle"))},[(0,s.Lk)("span",l,[(0,s.bF)(m,{icon:"fa-light fa-bars"})])],2),(0,s.Lk)("button",{class:(0,a.C4)(["button is-small",{"is-primary":i.isGallery}]),onClick:t[1]||(t[1]=t=>e.$emit("toggle"))},[(0,s.Lk)("span",r,[(0,s.bF)(m,{icon:"fa-light fa-grid-2"})])],2)])])}var c={name:"ViewToggle",props:{isGallery:{type:Boolean,default:!1}},emits:["toggle"]},u=i(66262);const m=(0,u.A)(c,[["render",d],["__scopeId","data-v-3e4167d0"]]);var p=m},57985:function(e,t,i){"use strict";i.d(t,{A:function(){return li}});i(44114);var s=i(20641),a=i(90033),n=i(53751);const o={class:"o-maxwidth"},l={key:1,class:"mb-4 is-flex is-justify-content-space-between is-align-items-center"},r={class:"title mt-1"},d={key:0},c={key:1},u={key:0},m={key:1},p={key:2,class:"count-tile-row mb-4"},h=["onClick"],g={class:"count-tile-label"},f={class:"count-tile-value"},b={class:"modal-card record-payment-modal"},y={class:"modal-card-head"},v={class:"record-payment-heading"},k={class:"modal-card-title"},C={key:0,class:"record-payment-subtitle"},L={class:"modal-card-body pt-0"},w={class:"record-payment-mode-toggle"},_=["value"],E={value:null},$=["value"],F={class:"field has-addons mb-0"},T={class:"control is-expanded"},S={class:"control"},A={class:"button is-static is-rounded"},P={class:"modal-card-foot"},I={key:3,class:"is-flex is-flex-wrap-wrap is-align-items-center pb-3",style:{gap:"8px"}},M={class:"list-filter-pill"},x={class:"pill-label"},N={class:"pill-value is-full"},U={class:"pill-label"},D={class:"pill-dropdown"},X={class:"pill-dropdown-header"},V={class:"pill-input-body"},R={class:"pill-input-label"},O=["placeholder"],Q={class:"pill-input-label"},B=["placeholder"],G={class:"list-filter-pill"},W={class:"pill-label"},j={class:"pill-value"},z={class:"pill-label"},q={class:"pill-dropdown"},J={class:"pill-dropdown-header"},H={class:"pill-input-body"},K=["placeholder"],Y={key:0,class:"list-filter-pill"},Z={class:"pill-label"},ee={class:"pill-value"},te={class:"pill-label"},ie={class:"pill-dropdown"},se={class:"pill-dropdown-header"},ae={class:"pill-input-body"},ne=["placeholder"],oe={class:"list-filter-pill"},le={key:4,class:"mb-3 is-flex is-flex-wrap-wrap is-align-items-center",style:{gap:"8px"}},re={key:2,class:"orgo-profile-identity ml-auto"},de={class:"orgo-profile-identity-label"},ce={key:5,class:"list-empty-state"},ue={class:"list-empty-state-icon"},me={class:"list-empty-state-message"},pe={key:6,class:"orgo-table-wrap"},he={class:"orgo-amount-cell"},ge=["aria-label","onClick"],fe={class:"orgo-amount fs-14"},be={class:"orgo-amount-value"},ye={key:0,class:"tag is-small is-success is-rounded"},ve=["onClick"],ke={key:1},Ce={key:1,class:"tag is-small is-default is-rounded"},Le={key:2,class:"tag is-small is-info is-rounded"},we={key:3,class:"tag is-small is-danger is-rounded"},_e={key:4,class:"tag is-small is-danger is-rounded"},Ee={key:0},$e={class:"icon-text"},Fe={class:"icon is-small"},Te={class:"nowrap"},Se={class:"icon-text"},Ae={class:"icon is-small"},Pe={class:"nowrap"},Ie={class:"icon-text"},Me={class:"icon is-small"},xe={class:"nowrap"},Ne={key:0,class:"mr-2 fs-14"},Ue={key:1,class:"mr-2 fs-14"},De={key:2,class:"fs-14"},Xe={key:0,class:"fs-14 nowrap"},Ve={key:1,class:"fs-14 nowrap"},Re={key:2,class:"fs-14 nowrap"},Oe={key:0,class:"tag is-small is-default is-rounded"},Qe={key:1,class:"tag is-default is-small is-rounded"},Be={class:"nowrap fs-14"},Ge={key:0,class:"tag is-rounded is-warning is-light is-small ml-1"},We={key:0},je={key:1,class:"tag is-rounded is-default is-small ml-2"},ze={key:2,class:"tag is-rounded is-default is-small ml-2"},qe={key:0,class:"tag is-small is-default is-rounded"},Je={key:0,class:"tag is-warning is-rounded"},He={key:1,class:"tag is-small is-default is-rounded"},Ke={key:2,class:"tag is-rounded is-warning ml-1"},Ye={class:"orgo-table-action-btn"},Ze={class:"icon-text"},et={class:"icon is-small mr-2"}
1,tt={class:"icon-text"},it={class:"icon is-small mr-2"},st={class:"icon-text"},at={class:"icon is-small mr-2"},nt={class:"icon-text"},ot={class:"icon is-small mr-2"},lt={class:"icon-text"},rt={class:"icon is-small mr-2"},dt={class:"icon-text"},ct={class:"icon is-small mr-2"},ut={class:"icon-text"},mt={class:"icon is-small mr-2"},pt={class:"orgo-payment-detail"},ht={class:"orgo-payment-detail-label"},gt={class:"orgo-payment-detail-period"},ft={class:"orgo-payment-detail-amount orgo-amount"},bt={class:"orgo-amount-value"};function yt(e,t,i,yt,vt,kt){const Ct=(0,s.g2)("UserProducts"),Lt=(0,s.g2)("b-switch"),wt=(0,s.g2)("b-select"),_t=(0,s.g2)("b-field"),Et=(0,s.g2)("b-input"),$t=(0,s.g2)("b-datepicker"),Ft=(0,s.g2)("b-button"),Tt=(0,s.g2)("b-modal"),St=(0,s.g2)("b-loading"),At=(0,s.g2)("ListFilterPillDate"),Pt=(0,s.g2)("ListFilterPillNumber"),It=(0,s.g2)("font-awesome-icon"),Mt=(0,s.g2)("list-filter-pill"),xt=(0,s.g2)("ListFilterPill"),Nt=(0,s.g2)("PaymentIdentityTag"),Ut=(0,s.g2)("b-table-column"),Dt=(0,s.g2)("router-link"),Xt=(0,s.g2)("b-dropdown-item"),Vt=(0,s.g2)("b-dropdown"),Rt=(0,s.g2)("b-table");return(0,s.uX)(),(0,s.CE)("section",o,[i.filterUser?.id&&"User"===i.filterUser?.["@type"]&&!e.isNativeAppIos?((0,s.uX)(),(0,s.Wv)(Ct,{key:0,"donation-product-only":!0,"filter-user":i.filterUser?.id!==e.user.id?i.filterUser:null,onUpdateUser:t[0]||(t[0]=t=>e.$emit("updateUser"))},null,8,["filter-user"])):(0,s.Q3)("",!0),i.filterUser||!vt.item&&!kt.isAllPayments?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("h2",r,[(0,s.eW)((0,a.v_)(e.$t("payments"))+" ",1),vt.item?((0,s.uX)(),(0,s.CE)("span",d,"- "+(0,a.v_)(vt.item.name),1)):(0,s.Q3)("",!0),!e.isGranted("FINANCIAL_TENANT")&&vt.item?.organisation?((0,s.uX)(),(0,s.CE)("span",c,[t[37]||(t[37]=(0,s.eW)(" - ",-1)),e.isGranted("FINANCIAL_PARENT_LOCAL")&&e.user.localCenterParent?((0,s.uX)(),(0,s.CE)("span",u,(0,a.v_)(e.$t("LP"))+" "+(0,a.v_)(e.user.localCenterParent.name),1)):((0,s.uX)(),(0,s.CE)("span",m,(0,a.v_)(e.$t("LC"))+" "+(0,a.v_)(e.user.localCenter.name),1))])):(0,s.Q3)("",!0)])])),i.filterUser||!vt.item&&!kt.isAllPayments?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",p,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(kt.statusCountTiles,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.key,class:(0,a.C4)(["count-tile",{"is-active":vt.filters.status===e.value}]),onClick:t=>kt.onPillStatusChange(e.value)},[(0,s.Lk)("span",g,(0,a.v_)(e.label),1),(0,s.Lk)("span",f,(0,a.v_)(kt.formatCount(vt.statusCounts[e.key])),1)],10,h))),128))])),(0,s.bF)(Tt,{modelValue:vt.isRecordPaymentModalOpen,"onUpdate:modelValue":t[9]||(t[9]=e=>vt.isRecordPaymentModalOpen=e),"has-modal-card":"","trap-focus":"","append-to-body":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",b,[(0,s.Lk)("header",y,[(0,s.Lk)("div",v,[(0,s.Lk)("p",k,(0,a.v_)(e.$t("Record payment")),1),i.filterUser?((0,s.uX)(),(0,s.CE)("p",C,(0,a.v_)(e.$t("For"))+" "+(0,a.v_)(i.filterUser.fullName||i.filterUser.name),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("button",{type:"button",class:"delete",onClick:t[1]||(t[1]=e=>vt.isRecordPaymentModalOpen=!1)})]),(0,s.Lk)("section",L,[(0,s.Lk)("div",w,[(0,s.bF)(Lt,{modelValue:vt.recordPayment.isCustomItem,"onUpdate:modelValue":t[2]||(t[2]=e=>vt.recordPayment.isCustomItem=e)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Custom item")),1)]),_:1},8,["modelValue"])]),vt.recordPayment.isCustomItem?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(_t,{key:0,label:e.$t("product"),class:"mb-4"},{default:(0,s.k6)(()=>[(0,s.bF)(wt,{modelValue:vt.recordPayment.productUuid,"onUpdate:modelValue":[t[3]||(t[3]=e=>vt.recordPayment.productUuid=e),kt.onRecordProductChange],expanded:"",placeholder:e.$t("Select product")},{default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(vt.products,e=>((0,s.uX)(),(0,s.CE)("option",{key:e.uuid,value:e.uuid},(0,a.v_)(e.name),9,_))),128))]),_:1},8,["modelValue","placeholder","onUpdate:modelValue"])]),_:1},8,["label"])),vt.recordPayment.isCustomItem?((0,s.uX)(),(0,s.Wv)(_t,{key:1,label:e.$t("Item name"),class:"mb-4"},{default:(0,s.k6)(()=>[(0,s.bF)(Et,{modelValue:vt.recordPayment.customName,"onUpdate:modelValue":t[4]||(t[4]=e=>vt.recordPayment.customName=e),placeholder:e.$t("Item name"),maxlength:"255","has-counter"
1:!1,required:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):(0,s.Q3)("",!0),!vt.recordPayment.isCustomItem&&vt.recordPaymentPrices.length?((0,s.uX)(),(0,s.Wv)(_t,{key:2,label:e.$t("Price"),class:"mb-4"},{default:(0,s.k6)(()=>[(0,s.bF)(wt,{modelValue:vt.recordPayment.priceId,"onUpdate:modelValue":[t[5]||(t[5]=e=>vt.recordPayment.priceId=e),kt.onRecordPriceChange],expanded:"",placeholder:e.$t("No price")},{default:(0,s.k6)(()=>[(0,s.Lk)("option",E,(0,a.v_)(e.$t("No price")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(vt.recordPaymentPrices,t=>((0,s.uX)(),(0,s.CE)("option",{key:t["@id"],value:t.id},(0,a.v_)(e.$filters.money(t.price,t.currency))+" - "+(0,a.v_)(t.name),9,$))),128))]),_:1},8,["modelValue","placeholder","onUpdate:modelValue"])]),_:1},8,["label"])):(0,s.Q3)("",!0),(0,s.bF)(_t,{label:e.$t("Amount"),class:"mb-4"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",F,[(0,s.Lk)("div",T,[(0,s.bF)(Et,{modelValue:vt.recordPayment.amount,"onUpdate:modelValue":t[6]||(t[6]=e=>vt.recordPayment.amount=e),type:"number",step:"0.01",min:"0",expanded:"",disabled:!kt.recordPaymentAllowsCustomAmount,required:""},null,8,["modelValue","disabled"])]),(0,s.Lk)("div",S,[(0,s.Lk)("span",A,(0,a.v_)(kt.recordPaymentCurrencySymbol),1)])])]),_:1},8,["label"]),(0,s.bF)(_t,{label:e.$t("Payment date")},{default:(0,s.k6)(()=>[(0,s.bF)($t,{modelValue:vt.recordPayment.paymentDate,"onUpdate:modelValue":t[7]||(t[7]=e=>vt.recordPayment.paymentDate=e),"append-to-body":"",placeholder:e.$t("Select date"),icon:"calendar"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),(0,s.Lk)("footer",P,[(0,s.bF)(Ft,{class:"is-rounded",onClick:t[8]||(t[8]=e=>vt.isRecordPaymentModalOpen=!1)},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("cancel")),1)]),_:1}),(0,s.bF)(Ft,{type:"is-primary",class:"is-rounded ml-1",loading:vt.isRecordingPayment,disabled:!kt.isRecordPaymentValid,onClick:kt.submitRecordPayment},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Record payment")),1)]),_:1},8,["loading","disabled","onClick"])])])]),_:1},8,["modelValue"]),(0,s.bF)(St,{modelValue:vt.isLoading,"onUpdate:modelValue":t[10]||(t[10]=e=>vt.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),i.filterUser||!vt.item&&!kt.isAllPayments?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",I,[(0,s.bF)(At,{label:e.$t("Date"),from:vt.filters.paymentsDateBegin,to:vt.filters.paymentsDateEnd,"onUpdate:from":t[11]||(t[11]=e=>{vt.filters.paymentsDateBegin=e,kt.filterItems(!0)}),"onUpdate:to":t[12]||(t[12]=e=>{vt.filters.paymentsDateEnd=e,kt.filterItems(!0)})},null,8,["label","from","to"]),(0,s.bF)(Pt,{label:e.$t("amount"),operator:vt.filters.amountOperator,from:vt.filters.amountFrom,to:vt.filters.amountTo,"onUpdate:operator":t[13]||(t[13]=e=>vt.filters.amountOperator=e),"onUpdate:from":t[14]||(t[14]=e=>vt.filters.amountFrom=e),"onUpdate:to":t[15]||(t[15]=e=>vt.filters.amountTo=e),onApply:t[16]||(t[16]=e=>kt.filterItems(!0))},null,8,["label","operator","from","to"]),(0,s.Lk)("div",M,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":kt.hasIdFilter}]),onClick:t[18]||(t[18]=(0,n.D$)(e=>kt.togglePill("ids"),["stop"]))},[kt.hasIdFilter?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[17]||(t[17]=(0,n.D$)((...e)=>kt.clearIdFilters&&kt.clearIdFilters(...e),["stop"]))},[(0,s.bF)(It,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",x,(0,a.v_)(e.$t("ID")),1),t[38]||(t[38]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",N,(0,a.v_)(kt.idFilterLabel),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(It,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",U,(0,a.v_)(e.$t("ID")),1)],64))],2),(0,s.bo)((0,s.Lk)("div",D,[(0,s.Lk)("div",X,(0,a.v_)(e.$t("ID")),1),(0,s.Lk)("div",V,[(0,s.Lk)("label",R,(0,a.v_)(e.$t("Payment ID")),1),(0,s.bo)((0,s.Lk)("input",{ref:"idsInput","onUpdate:modelValue":t[19]||(t[19]=e=>vt.filters.id=e),class:"pill-text-input mb-3",placeholder:e.$t("Payment ID"),onInput:t[20]||(t[20]=(...e)=>kt.getAsyncData&&kt.getAsyncData(...e)),onClick:t[21]||(t[21]=(0,n.D$)(()=>{},["stop"]))},null,40,O),[[n.Jo,vt.filters.id]]),(0,s.Lk)("label",Q,(0,a.v_)(e.$t("User ID")),1),(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":t[22]||(t[22]=e=>vt.filters.user=e),class:"pill-text-input",placeholder:e.$t("User ID"),onInput:t[23]||(t[23]=(...e)=>kt.getAsyncData&&kt.getAsyncData(...e)),onClick:t[24]||(t[24]=(0,n.D$)(()=>{},["stop"]))},null,40,B),[[n.Jo,vt.filters.user]])])],512),[[n.aG,"ids"===vt.openPill]])]),(0,s.Lk)("div",G,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":vt.filters.name}]),onClick:t[26]||(t[26]=(0,n.D$)(e=>kt.togglePill("name"),["stop"]))},[vt.filters.name?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[25]||(t[25]=(0,n.D$)(e=>kt.clearPillFilter("name"),["stop"]))},[(0,s.bF)(It,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",W,(0,a.v_)(e.$t("Name")),1),t[39]||(t[39]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",j,(0,a.v_)(vt.filters.name),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(It,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",z,(0,a.v_)(e.$t("Name")),1)],64))],2),(0,s.bo)((0,s.Lk)("div",q,[(0,s.Lk)("div",J,(0,a.v_)(e.$t("Name")),1),(0,s.Lk)("div",H,[(0,s.bo)((0,s.Lk)("input",{ref:"nameInput","onUpdate:modelValue":t[27]||(t[27]=e=>vt.filters.name=e),class:"pill-text-input",placeholder:e.$t("Name"),onInput:t[28]||(t[28]=(...e)=>kt.filterItemsByWord&&kt.filterItemsByWord(...e)),onClick:t[29]||(t[29]=(0,n.D$)(()=>{},["stop"]))},null,40,K),[[n.Jo,vt.filters.name]])])],512),[[n.aG,"name"===vt.openPill]])]),e.isGranted("FINANCIAL_TENANT")?((0,s.uX)(),(0,s.CE)("div",Y,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":vt.filters.email}]),onClick:t[31]||(t[31]=(0,n.D$)(e=>kt.togglePill("email"),["stop"]))},[vt.filters.email?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[30]||(t[30]=(0,n.D$)(e=>kt.clearPillFilter("email"),["stop"]))},[(0,s.bF)(It,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",Z,(0,a.v_)(e.$t("Email")),1),t[40]||(t[40]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",ee,(0,a.v_)(vt.filters.email),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(It,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",te,(0,a.v_)(e.$t("Email")),1)],64))],2),(0,s.bo)((0,s.Lk)("div",ie,[(0,s.Lk)("div",se,(0,a.v_)(e.$t("Email")),1),(0,s.Lk)("div",ae,[(0,s.bo)((0,s.Lk)("input",{ref:"emailInput","onUpdate:modelValue":t[32]||(t[32]=e=>vt.filters.email=e),class:"pill-text-input",placeholder:e.$t("Email"),onInput:t[33]||(t[33]=(...e)=>kt.getAsyncData&&kt.getAsyncData(...e)),onClick:t[34]||(t[34]=(0,n.D$)(()=>{},["stop"]))},null,40,ne),[[n.Jo,vt.filters.email]])])],512),[[n.aG,"email"===vt.openPill]])])):(0,s.Q3)("",!0),(0,s.bF)(Mt,{label:e.$t("Status"),options:kt.statusPillOptions,"model-value":vt.filters.status,"onUpdate:modelValue":kt.onPillStatusChange},null,8,["label","options","model-value","onUpdate:modelValue"]),(0,s.bF)(Mt,{label:e.$t("t
1ype"),options:kt.typePillOptions,"model-value":vt.filters.type,"onUpdate:modelValue":kt.onPillTypeChange},null,8,["label","options","model-value","onUpdate:modelValue"]),kt.isAllPayments?((0,s.uX)(),(0,s.Wv)(Mt,{key:1,label:e.$t("Product"),options:kt.productPillOptions,"model-value":vt.filters.product,"onUpdate:modelValue":kt.onPillProductChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),kt.showUserLocalCenterFilter?((0,s.uX)(),(0,s.Wv)(Mt,{key:2,label:e.$t("localCenter"),options:kt.userLocalCenterPillOptions,"model-value":vt.filters.userLocalCenter,"onUpdate:modelValue":kt.onPillUserLocalCenterChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),vt.item&&vt.item.productOptions&&vt.item.productOptions.length>0&&e.isGranted("FINANCIAL_TENANT")?((0,s.uX)(),(0,s.Wv)(Mt,{key:3,label:e.$t("Option"),options:kt.optionPillOptions,"model-value":vt.filters.option,"onUpdate:modelValue":kt.onPillOptionChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),kt.tenantHasIdentityValidation&&kt.userIsValidator?((0,s.uX)(),(0,s.Wv)(Mt,{key:4,label:e.$t("Identity"),options:kt.identityPillOptions,"model-value":vt.filters.identity,"onUpdate:modelValue":kt.onPillIdentityChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),vt.item&&vt.item.hasLocalCenterOption&&e.isGranted("FINANCIAL_TENANT")?((0,s.uX)(),(0,s.Wv)(Mt,{key:5,label:e.$t("localCenters"),options:kt.localCenterPillOptions,"model-value":vt.filters.localCenter,"onUpdate:modelValue":kt.onPillLocalCenterChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),kt.tenantHasIdentityValidation&&kt.userIsValidator?((0,s.uX)(),(0,s.Wv)(Mt,{key:6,label:e.$t("Reminded"),options:kt.remindedPillOptions,"model-value":vt.filters.reminded,"onUpdate:modelValue":kt.onPillRemindedChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),(0,s.Lk)("div",oe,[(0,s.Lk)("button",{class:"pill-trigger",onClick:t[35]||(t[35]=(...e)=>kt.refreshList&&kt.refreshList(...e))},[(0,s.bF)(It,{icon:"fa-light fa-refresh"})])])])),kt.showProductTypeFilter||kt.canRecordPayment||kt.showIdentitySummary?((0,s.uX)(),(0,s.CE)("div",le,[kt.canRecordPayment?((0,s.uX)(),(0,s.Wv)(Ft,{key:0,type:"is-primary",size:"is-small",class:"is-rounded","icon-left":"plus",onClick:kt.openRecordPaymentModal},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Record payment")),1)]),_:1},8,["onClick"])):(0,s.Q3)("",!0),kt.showProductTypeFilter?((0,s.uX)(),(0,s.Wv)(xt,{key:1,label:e.$t("product"),options:kt.productTypePillOptions,"model-value":vt.filters.productType,"onUpdate:modelValue":kt.onPillProductTypeChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,s.Q3)("",!0),kt.showIdentitySummary?((0,s.uX)(),(0,s.CE)("span",re,[(0,s.Lk)("span",de,(0,a.v_)(e.$t("Identity"))+":",1),(0,s.bF)(Nt,{payment:kt.memberIdentityPayment},null,8,["payment"])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),vt.items&&0===vt.items.length?((0,s.uX)(),(0,s.CE)("div",ce,[(0,s.Lk)("span",ue,[(0,s.bF)(It,{icon:"fa-light fa-receipt"})]),(0,s.Lk)("span",me,(0,a.v_)(e.$t("No payments yet")),1)])):(0,s.Q3)("",!0),(vt.item||i.filterUser||kt.isAllPayments)&&vt.items&&vt.items.length>0?((0,s.uX)(),(0,s.CE)("div",pe,[(0,s.bF)(Rt,{data:kt.groupedItems,paginated:vt.isMoreThanOnePage,"pagination-rounded":"","backend-pagination":"",narrowed:!1,"mobile-cards":!1,total:vt.itemsTotal,"per-page":vt.itemsPerPage,"current-page":vt.itemsPageCurrent,scrollable:!0,striped:"","backend-sorting":"",detailed:"","detail-key":"id","show-detail-icon":!1,"opened-detailed":vt.openedDetails,"default-sort-direction":vt.defaultSortOrder,"default-sort":[vt.sortField,vt.sortOrder],onPageChange:kt.changeListPage,onSort:kt.onSort},{detail:(0,s.k6)(t=>[(0,s.Lk)("div",pt,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(kt.paymentDetailRows(t.row),t=>((0,s.uX)(),(0,s.CE)("div",{key:t.id,class:"orgo-payment-detail-row"},[(0,s.Lk)("span",ht,[t._isVatLine?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("VAT"))+(0,a.v_)(t._vatRate?" ("+t._vatRate+"%)":""),1)],64)):t.isRegistrationFee?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(e.$t("Registration fee (one-time)")),1)],64)):t.isDonation?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.eW)((0,a.v_)(t.price&&t.price.name||e.$t("Donation")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[(0,s.eW)((0,a.v_)(t.price&&t.price.name||(t.product?t.product.name:"")),1)],64))]),(0,s.Lk)("span",gt,[t._isVatLine||t.isDonation||t.isRegistrationFee||!t.product||"fee"!==t.product.type||!t.periodStart?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$filters.format(t.periodStart))+" - "+(0,a.v_)(e.$filters.format(t.periodEnd)),1)],64))]),(0,s.Lk)("span",ft,[(0,s.Lk)("span",bt,(0,a.v_)(e.$filters.money(t.amount,t.currency)),1)])]))),128))])]),default:(0,s.k6)(()=>[(0,s.bF)(Ut,{label:e.$t("amount"),sortable:"",field:"amount","cell-class":"orgo-cell-numeric","header-class":"orgo-cell-numeric"},{default:(0,s.k6)(t=>[(0,s.Lk)("span",he,[t.row._isGroup?((0,s.uX)(),(0,s.CE)("button",{key:0,t
1ype:"button",class:"orgo-group-toggle","aria-label":e.$t("Show details"),onClick:(0,n.D$)(e=>kt.toggleGroup(t.row),["stop"])},[(0,s.bF)(It,{icon:vt.openedDetails.includes(t.row.id)?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])],8,ge)):(0,s.Q3)("",!0),(0,s.Lk)("span",fe,[(0,s.Lk)("span",be,(0,a.v_)(e.$filters.money(t.row.amount,t.row.currency)),1)])])]),_:1},8,["label"]),kt.showIdentityColumn?((0,s.uX)(),(0,s.Wv)(Ut,{key:0,label:e.$t("Identity")},{default:(0,s.k6)(e=>[(0,s.bF)(Nt,{payment:e.row},null,8,["payment"])]),_:1},8,["label"])):(0,s.Q3)("",!0),(0,s.bF)(Ut,{label:e.$t("status"),sortable:"",field:"status"},{default:(0,s.k6)(t=>["success"===t.row.status?((0,s.uX)(),(0,s.CE)("span",ye,[e.tenant.settingFeatures.onlinePayments.hasPdfProof?((0,s.uX)(),(0,s.CE)("a",{key:0,onClick:e=>kt.viewDocument(t.row)},(0,a.v_)(e.$t("paid")),9,ve)):((0,s.uX)(),(0,s.CE)("span",ke,(0,a.v_)(e.$t("paid")),1))])):(0,s.Q3)("",!0),"open"===t.row.status?((0,s.uX)(),(0,s.CE)("span",Ce,(0,a.v_)(e.$t("open")),1)):(0,s.Q3)("",!0),"pending_accept"===t.row.status?((0,s.uX)(),(0,s.CE)("span",Le,(0,a.v_)(e.$t("on-hold")),1)):(0,s.Q3)("",!0),"refunded"===t.row.status?((0,s.uX)(),(0,s.CE)("span",we,(0,a.v_)(e.$t("refunded")),1)):(0,s.Q3)("",!0),"canceled"===t.row.status?((0,s.uX)(),(0,s.CE)("span",_e,(0,a.v_)(e.$t("canceled")),1)):(0,s.Q3)("",!0)]),_:1},8,["label"]),!i.filterUser&&vt.item&&vt.item.abTesting?((0,s.uX)(),(0,s.Wv)(Ut,{key:1,label:"A/B"},{default:(0,s.k6)(e=>[e.row.abTesting?((0,s.uX)(),(0,s.CE)("span",Ee,(0,a.v_)(String.fromCharCode(e.row.abTesting+64)),1)):(0,s.Q3)("",!0)]),_:1})):(0,s.Q3)("",!0),i.filterUser?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Ut,{key:2,label:e.$t("name")},{default:(0,s.k6)(t=>[t.row.user?((0,s.uX)(),(0,s.Wv)(Dt,{key:0,class:"fs-14",target:"_blank",to:{name:"UserShow",params:{item:t.row.user.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",$e,[(0,s.Lk)("span",Fe,[(0,s.bF)(It,{icon:"fa-light fa-user"})]),(0,s.Lk)("span",Te,(0,a.v_)(t.row.user.fullName),1)])]),_:2},1032,["to"])):t.row.contact?((0,s.uX)(),(0,s.Wv)(Dt,{key:1,class:"fs-14",to:{name:"ContactShow",params:{item:t.row.contact.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Se,[(0,s.Lk)("span",Ae,[(0,s.bF)(It,{icon:"fa-light fa-user-slash"})]),(0,s.Lk)("span",Pe,(0,a.v_)(t.row.contact.name),1)])]),_:2},1032,["to"])):t.row.invoice?((0,s.uX)(),(0,s.Wv)(Dt,{key:2,class:"fs-14",to:{name:"InvoiceShow",params:{item:t.row.invoice.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ie,[(0,s.Lk)("span",Me,[(0,s.bF)(It,{icon:"fa-light fa-file-invoice"})]),(0,s.Lk)("span",xe,(0,a.v_)(t.row.invoice.invoicedFor||e.$t("Invoice")+" #"+t.row.invoice.id),1)])]),_:2},1032,["to"])):(0,s.Q3)("",!0)]),_:1},8,["label"])),i.filterUser?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Ut,{key:3,label:e.$t("From"),"cell-class":"nowrap"},{default:(0,s.k6)(t=>[!i.filterUser&&e.tenant.settingFeatures.localCenter.isActive&&t.row.user&&t.row.user.localCenter?((0,s.uX)(),(0,s.CE)("span",Ne,(0,a.v_)(t.row.user.localCenter.name.length>20?t.row.user.localCenter.name.substring(0,20)+"...":t.row.user.localCenter.name),1)):(0,s.Q3)("",!0),t.row.contact&&t.row.contact.town?((0,s.uX)(),(0,s.CE)("span",Ue,(0,a.v_)(t.row.contact.town.name),1)):(0,s.Q3)("",!0),t.row.contact&&t.row.contact.country?((0,s.uX)(),(0,s.CE)("span",De,(0,a.v_)(t.row.contact.country.name),1)):(0,s.Q3)("",!0)]),_:1},8,["label"])),(0,s.bF)(Ut,{label:e.$t("date"),sortable:"",field:"id"},{default:(0,s.k6)(t=>[t.row.stripePaymentDate?((0,s.uX)(),(0,s.CE)("span",Xe,(0,a.v_)(e.$filters.formatDateCool(t.row.stripePaymentDate)),1)):t.row.dateCreated?((0,s.uX)(),(0,s.CE)("span",Ve,(0,a.v_)(e.$filters.formatDateCool(t.row.dateCreated)),1)):t.row.manualFeePayment&&t.row.manualFeePayment.dateModified?((0,s.uX)(),(0,s.CE)("span",Re,(0,a.v_)(e.$filters.formatDateCool(t.row.manualFeePayment.dateModified,!0)),1)):(0,s.Q3)("",!0)]),_:1},8,["label"]),vt.item&&(vt.item.productOptions&&vt.item.productOptions.length>0||vt.item.hasLocalCenterOption)&&e.isGranted("FINANCIAL_TENANT")?((0,s.uX)(),(0,s.Wv)(Ut,{key:4,label:e.$t("Option"),sortable:"",field:"productOption.id"},{default:(0,s.k6)(e=>[e.row.productOption?((0,s.uX)(),(0,s.CE)("span",Oe,(0,a.v_)(e.row.productOption.name.length>20?e.row.productOption.name.substring(0,20)+"...":e.row.productOption.name),1)):(0,s.Q3)("",!0),e.row.localCenterOption?((0,s.uX)(),(0,s.CE)("span",Qe,(0,a.v_)(e.row.localCenterOption.name.length>20?e.row.localCenterOption.name.substring(0,20)+"...":e.row.localCenterOption.name),1)):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),i.filterUser||kt.isAllPayments?((0,s.uX)(),(0,s.Wv)(Ut,{key:5,label:e.$t("product")},{default:(0,s.k6)(t=>[(0,s.Lk)("span",Be,[(0,s.eW)((0,a.v_)(t.row.product?t.row.product.name:t.row.invoice?e.$t("Invoice"):null)+" ",1),t.row.isRegistrationFee?((0,s.uX)(),(0,s.CE)("span",Ge,(0,a.v_)(e.$t("Registration fee (one-time)")),1)):(0,s.Q3)("",!0)])]),_:1},8,["label"])):(0,s.Q3)("",!0),vt.item&&"fee"===vt.item.type||i.filterUser?((0,s.uX)(),(0,s.Wv)(Ut,{key:6,label:e.$t("period")},{default:(0,s.k6)(t=>[t.row.isRegistrationFee?((0,s.uX)(),(0,s.CE)("span",We)):!t.row.product||"fee"!==t.row.product.type||t.row.price&&t.row.price.isLifetime||!t.row.periodStart||!t.row.periodEnd?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",je,(0,a.v_)(e.$filters.format(t.row.periodStart))+" - "+(0,a.v_)(e.$filters.format(t.row.periodEnd)),1)),!t.row.isRegistrationFee&&t.row.product&&"fee"===t.row.product.type&&t.row.price&&t.row.price.isLifetime&&t.row.periodStart?((0,s.uX)(),(0,s.CE)("span",ze,(0,a.v_)(e.$filters.format(t.row.periodStart))+" - "+(0,a.v_)(e.$t("Lifetime")),1)):(0,s.Q3)("",!0)]),_:1},8,["label"])):(0,s.Q3)("",!0),vt.item?.hasConfidentialityEnabled?((0,s.uX)(),(0,s.Wv)(Ut,{key:7,label:e.$t("Confi.")},{default:(0,s.k6)(t=>[t.row.isPublic?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",qe,(0,a.v_)(e.$t("yes")),1))]),_:1},8,["label"])):(0,s.Q3)("",!0),(0,s.bo)((0,s.bF)(Ut,{label:e.$t("t
1ype")},{default:(0,s.k6)(t=>[t.row.subscriptionProfile?((0,s.uX)(),(0,s.CE)("span",Je,[(0,s.bF)(Dt,{to:{name:"ProductSubscribers",params:{item:t.row.product.uuid},query:{id:t.row.subscriptionProfile.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("subscription")),1)]),_:1},8,["to"])])):((0,s.uX)(),(0,s.CE)("span",He,(0,a.v_)(e.$t("one-time")),1)),t.row.invoice?.id?((0,s.uX)(),(0,s.CE)("span",Ke,[(0,s.bF)(Dt,{to:{name:"InvoiceShow",params:{item:t.row.invoice.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Invoice")),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0)]),_:1},8,["label"]),[[n.aG,vt.item&&vt.item.hasSubscription&&vt.item.hasOneTimePayment]]),(0,s.bF)(Ut,{width:"48px"},{default:(0,s.k6)(i=>[(0,s.Lk)("div",{class:"orgo-table-actions",onClick:t[36]||(t[36]=(0,n.D$)(()=>{},["stop"]))},[(0,s.bF)(Vt,{position:"is-bottom-left","append-to-body":"","aria-role":"list"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",Ye,[(0,s.bF)(It,{icon:"fa-light fa-ellipsis-vertical"})])]),default:(0,s.k6)(()=>["success"===i.row.status&&i.row.stripePaymentId?((0,s.uX)(),(0,s.Wv)(Xt,{key:0,"aria-role":"listitem",onClick:e=>kt.refundPayment(i.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ze,[(0,s.Lk)("span",et,[(0,s.bF)(It,{icon:"fa-light fa-rotate-left"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Refund")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),kt.canGenerateInvoice(i.row)?((0,s.uX)(),(0,s.Wv)(Xt,{key:1,"aria-role":"listitem",onClick:e=>kt.generateInvoice(i.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",tt,[(0,s.Lk)("span",it,[(0,s.bF)(It,{icon:"fa-light fa-file-invoice"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Generate Invoice")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),kt.tenantHasIdentityValidation&&"pending_accept"===i.row.status&&i.row.identity&&"pending"===i.row.identity.status?((0,s.uX)(),(0,s.Wv)(Xt,{key:2,"aria-role":"listitem",onClick:t=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:i.row.identity.id}})},{default:(0,s.k6)(()=>[(0,s.Lk)("span",st,[(0,s.Lk)("span",at,[(0,s.bF)(It,{icon:"fa-light fa-id-card"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Validate identity")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),kt.tenantHasIdentityValidation&&"pending_accept"===i.row.status&&i.row.identity&&i.row.identity.isValidated?((0,s.uX)(),(0,s.Wv)(Xt,{key:3,"aria-role":"listitem",onClick:e=>kt.acceptPayment(i.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",nt,[(0,s.Lk)("span",ot,[(0,s.bF)(It,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Accept")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),kt.tenantHasIdentityValidation&&"pending_accept"===i.row.status&&i.row.stripePaymentId?((0,s.uX)(),(0,s.Wv)(Xt,{key:4,"aria-role":"listitem",onClick:e=>kt.cancelPayment(i.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",lt,[(0,s.Lk)("span",rt,[(0,s.bF)(It,{icon:"fa-light fa-ban"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Cancel & refund")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),e.tenant.stripeAccount&&(i.row.stripePaymentId||i.row.stripeInvoiceId)?((0,s.uX)(),(0,s.Wv)(Xt,{key:5,"aria-role":"listitem",onClick:e=>kt.openStripe(i.row)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",dt,[(0,s.Lk)("span",ct,[(0,s.bF)(It,{icon:"fa-light fa-arrow-up-right"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Open in Stripe")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),(0,s.bF)(Xt,{"aria-role":"listitem",onClick:e=>kt.copyToClipboardAndSnackbar(String(i.row.id))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ut,[(0,s.Lk)("span",mt,[(0,s.bF)(It,{icon:"fa-light fa-copy"})]),(0,s.Lk)("span",null,"Payment ID: "+(0,a.v_)(i.row.id),1)])]),_:2},1032,["onClick"])]),_:2},1024)])]),_:1})]),_:1},8,["data","paginated","total","per-page","current-page","opened-detailed","default-sort-direction","default-sort","onPageChange","onSort"])])):(0,s.Q3)("",!0)])}i(18111),i(22489),i(20116),i(7588),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(14603),i(47566),i(98721);var vt=i(37440),kt=i(95256);i(18237);function Ct(e){const t=[];return(e||[]).forEach(e=>{const i=Number(e.vatAmount)||0,s=(Number(e.amount)||0)-i;t.push({...e,amount:s}),i>0&&t.push({id:"vat_"+e.id,_isVatLine:!0,_vatRate:s>0?parseFloat((i/s*100).toFixed(2)):null,amount:i,currency:e.currency})}),t}function Lt(e,t,i=null){if(!e||!t)return e;const s=new Map,a=[];
1return e.forEach(e=>{const t=e.stripePaymentId||"single-"+e.id;s.has(t)||(s.set(t,[]),a.push(t)),s.get(t).push(e)}),a.flatMap(e=>{const t=s.get(e);if(1===t.length||i&&i.has(e))return t;const a=t.find(e=>!e.isDonation&&!e.isRegistrationFee)||t[0],n=t.reduce((e,t)=>e+(Number(t.amount)||0),0);return[{...a,amount:n,_isGroup:!0,_details:t}]})}var wt=i(40834),_t=i(38221),Et=i.n(_t),$t=i(6650),Ft=i(43432),Tt=i(64601);const St={ref:"pillContainer",class:"list-filter-pill"},At={class:"pill-label"},Pt={class:"pill-value is-full"},It={class:"pill-label"},Mt={class:"pill-dropdown-header"},xt={class:"pill-number-body"},Nt={class:"select is-small is-fullwidth mb-3"},Ut=["value"],Dt={class:"pill-number-inputs"},Xt=["placeholder"],Vt={class:"pill-number-separator"},Rt=["placeholder"],Ot={class:"pill-dropdown-apply"};function Qt(e,t,i,o,l,r){const d=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",St,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":r.hasSelection}]),onClick:t[1]||(t[1]=(0,n.D$)((...e)=>r.toggleDropdown&&r.toggleDropdown(...e),["stop"]))},[r.hasSelection?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>r.clearSelection&&r.clearSelection(...e),["stop"]))},[(0,s.bF)(d,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",At,(0,a.v_)(e.displayLabel),1),t[11]||(t[11]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",Pt,(0,a.v_)(r.selectionLabel),1),(0,s.bF)(d,{icon:"fa-light fa-chevron-down",class:"pill-chevron"})],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(d,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",It,(0,a.v_)(e.displayLabel),1)],64))],2),(0,s.bo)((0,s.Lk)("div",{ref:"dropdown",class:(0,a.C4)(["pill-dropdown",{"is-align-right":r.isAlignedRight}])},[(0,s.Lk)("div",Mt,(0,a.v_)(i.filterTitle||e.$t("Filter by")+": "+e.displayLabel),1),(0,s.Lk)("div",xt,[(0,s.Lk)("div",Nt,[(0,s.bo)((0,s.Lk)("select",{"onUpdate:modelValue":t[2]||(t[2]=e=>l.pendingOperator=e),onClick:t[3]||(t[3]=(0,n.D$)(()=>{},["stop"]))},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(r.operatorOptions,e=>((0,s.uX)(),(0,s.CE)("option",{key:e.value,value:e.value},(0,a.v_)(e.label),9,Ut))),128))],512),[[n.u1,l.pendingOperator]])]),(0,s.Lk)("div",Dt,[(0,s.bo)((0,s.Lk)("input",{ref:"fromInput","onUpdate:modelValue":t[4]||(t[4]=e=>l.pendingFrom=e),class:"pill-text-input",type:"number",step:"0.01",placeholder:i.unit||e.$t("Value"),onKeyup:t[5]||(t[5]=(0,n.jR)((...e)=>r.apply&&r.apply(...e),["enter"])),onClick:t[6]||(t[6]=(0,n.D$)(()=>{},["stop"]))},null,40,Xt),[[n.Jo,l.pendingFrom]]),"between"===l.pendingOperator?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",Vt,(0,a.v_)(e.$t("and")),1),(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":t[7]||(t[7]=e=>l.pendingTo=e),class:"pill-text-input",type:"number",step:"0.01",placeholder:i.unit||e.$t("Value"),onKeyup:t[8]||(t[8]=(0,n.jR)((...e)=>r.apply&&r.apply(...e),["enter"])),onClick:t[9]||(t[9]=(0,n.D$)(()=>{},["stop"]))},null,40,Rt),[[n.Jo,l.pendingTo]])],64)):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",Ot,[(0,s.Lk)("button",{class:"button is-small is-primary is-rounded is-fullwidth",onClick:t[10]||(t[10]=(0,n.D$)((...e)=>r.apply&&r.apply(...e),["stop"]))},(0,a.v_)(e.$t("apply")),1)])],2),[[n.aG,l.isOpen]])],512)}var Bt=i(46093),Gt=i(28906),Wt={name:"ListFilterPillNumber",mixins:[Gt.A],props:{label:{type:String,required:!0},operator:{type:String,default:"eq"},from:{type:[String,Number],default:null},to:{type:[String,Number],default:null},unit:{type:String,default:null},filterTitle:{type:String,default:null},align:{type:String,default:"left"}},emits:["update:operator","update:from","update:to","apply","open"],data(){return{isOpen:!1,flipped:!1,pendingOperator:this.operator||"eq",pendingFrom:this.from,pendingTo:this.to}},computed:{isAlignedRight(){return"right"===this.align||this.flipped},operatorOptions(){return[{value:"eq",label:this.$t("is equal to")},{value:"between",label:this.$t("is between")},{value:"gt",label:this.$t("is greater than")},{value:"lt",label:this.$t("is less than")}]},hasSelection(){return null!==this.from&&""!==this.from},selectionLabel(){if(!this.hasSelection)return"";const e=this.from;return"between"===this.operator?null!==this.to&&""!==this.to?e+" â "+this.to:"⥠"+e:"gt"===this.operator?"> "+e:"lt"===this.operator?"< "+e:"= "+e}},watch:{operator(e){this.pendingOperator=e||"eq"},from(e){this.pendingFrom=e},to(e){this.pendingTo=e}},mounted(){document.addEventListener("click",this.onClickOutside),this.unregisterPill=(0,vt.f)(this.close)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside),this.unregisterPill&&this.unregisterPill()},methods:{toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&((0,vt.r)(this.close),(0,Bt.Mj)(this),this.resetPending(),this.$emit("open"),this.$nextTick(()=>(0,Bt.xu)(this.$refs.dropdown)))},open(){this.isOpen||this.toggleDropdown()},close(){this.isOpen=!1},resetPending(){this.pendingOperator=this.operator||"eq",this.pendingFrom=this.from,this.pendingTo=this.to},apply(){const e=""===this.pendingFrom?null:this.pendingFrom,t="between"===this.pendingOperator&&""!==this.pendingTo?this.pendingTo:null;this.$emit("update:operator",this.pendingOperator),this.$emit("update:from",e),this.$emit("update:to",t),this.$emit("apply"),this.isOpen=!1},clearSelection(){this.$emit("update:from",null),this.$emit("update:to",null),this.$emit("apply"),this.isOpen=!1},onClickOutside(e){this.isOpen&&this.$refs.pillContainer&&!this.$refs.pillContainer.contains(e.target)&&(this.isOpen=!1)}}},jt=i(66262);
1const zt=(0,jt.A)(Wt,[["render",Qt]]);var qt=zt,Jt=i(15083),Ht=i(61273),Kt=i(95093),Yt=i.n(Kt),Zt=i(59213);const ei="type:",ti=e=>"event"===e.type&&e.eventName||e.name||"",ii=20,si=30,ai=10;var ni={props:["filterUser","contact","hideRecordAction","hideIdentitySummary"],data(){const e="ProductPayments"===this.$route.name?this.$route.query:{};return{isLocal:e.isLocalSettings,items:null,openedDetails:[],item:null,localCenters:[],products:[],filterProducts:[],archivedFilterProducts:[],itemId:0!=this.$route.params.item?this.$route.params.item:null,filters:{localCenter:e.localCenter?parseInt(e.localCenter):null,userLocalCenter:e.userLocalCenter?parseInt(e.userLocalCenter):null,option:e.option?parseInt(e.option):null,product:e.product??null,name:e.name?e.name:null,type:e.type?e.type:null,status:e.status?e.status:null,noIdentity:!!e.noIdentity,identity:e.identity??null,user:e.user?e.user:null,id:e.id?e.id:null,productType:e.productType??null,paymentsDateBegin:e.paymentsDateBegin?new Date(e.paymentsDateBegin):null,paymentsDateEnd:e.paymentsDateEnd?new Date(e.paymentsDateEnd):null,reminded:e.reminded??null,email:e.email?e.email:null,amountOperator:e.amountOperator?e.amountOperator:"eq",amountFrom:e.amountFrom??null,amountTo:e.amountTo??null},itemsTotal:null,statusCounts:{},statusCountsKey:null,isMoreThanOnePage:!1,itemsPageCurrent:e.page?parseInt(e.page):1,itemsPerPage:null,isLoading:!1,sortField:e.sortField?e.sortField:"stripePaymentDate",sortOrder:e.sortOrder?e.sortOrder:"desc",defaultSortOrder:"desc",openPill:null,isRecordPaymentModalOpen:!1,isRecordingPayment:!1,recordPaymentPrices:[],recordPaymentProduct:null,recordPayment:{isCustomItem:!1,customName:"",productUuid:null,priceId:null,amount:null,paymentDate:new Date}}},watch:{memberIdentityPayment:{immediate:!0,handler(e){this.$emit("identity-summary",e)}},filterUser(e){e&&!this.items&&this.initLoad()},$route(e,t){if(!t||t.name!==e.name||"ProductPayments"!==e.name)return;const i=e.query.page?parseInt(e.query.page):1;i!==this.itemsPageCurrent&&(this.itemsPageCurrent=i),this.loadItemsPage()}},mounted(){document.addEventListener("click",this.closePills),this.unregisterPill=(0,vt.f)(this.closeOwnPill)},beforeUnmount(){document.removeEventListener("click",this.closePills),this.unregisterPill&&this.unregisterPill()},created(){"ProductPayments"===this.$route.name&&"fees"===this.$route.query.subtab&&(this.filters.productType="fee"),this.initLoad()},computed:{...(0,wt.L8)(["isGranted","tenant","user","isNativeAppIos"]),isAllPayments(){return 0===parseInt(this.$route.params.item)},groupedItems(){return Lt(this.items,"stripePaymentDate"===this.sortField,this.partialChargeKeys)},partialChargeKeys(){return this.partialChargeKeysFor(this.items||[],this.itemsTotal,this.itemsPerPage)},queryLink(){return this.isLocal?{isLocalSettings:1}:{}},userIsValidator(){return this.isGranted("HR_ASSISTANT_LOCAL")||this.isGranted("FINANCIAL_LOCAL")},showIdentityColumn(){return this.tenantHasIdentityValidation&&this.userIsValidator&&!this.filterUser},memberIdentityPayment(){if(!this.tenantHasIdentityValidation||!this.userIsValidator||!this.filterUser)return null;if(this.filterUser.identity)return{identity:this.filterUser.identity};const e=this.items||[];return e.find(e=>e.identity)||e[0]||null},showIdentitySummary(){return!!this.memberIdentityPayment&&!this.hideIdentitySummary},statusLabel(){const e={open:this.$t("open"),success:this.$t("paid"),refunded:this.$t("refunded"),pending_accept:this.$t("on-hold")};return e[this.filters.status]||this.filters.status},typeLabel(){const e={onetime:this.$t("one-time"),subscription:this.$t("subscription")};return e[this.filters.type]||this.filters.type},optionLabel(){if(!this.item||!this.item.productOptions)return"";const e=this.item.productOptions.find(e=>e.id===this.filters.option);return e?e.name.length>15?e.name.substring(0,15)+"...":e.name:""},identityLabel(){const e={validated:this.$t("Identity validated"),pending:this.$t("Identity pending validation"),rejected:this.$t("Identity rejected"),notSent:this.$t("Identity not sent")};return e[this.filters.identity]||this.filters.identity},localCenterLabel(){const e=this.localCenters.find(e=>e.id===this.filters.localCenter);if(!e)return"";const t=this.localCenterNameSelector(e,this.tenant);return t.length>15?t.substring(0,15)+"...":t}
1,remindedLabel(){const e={0:this.$t("Not reminded"),1:this.$t("Reminded")+this.$t(" x1"),2:this.$t("Reminded")+this.$t(" x2"),3:this.$t("Reminded")+this.$t(" x3")};return e[this.filters.reminded]||""},statusPillOptions(){return[{value:"open",label:(0,kt.ND)(this.$t("open"))},{value:"success",label:(0,kt.ND)(this.$t("paid"))},{value:"refunded",label:(0,kt.ND)(this.$t("refunded"))},{value:"pending_accept",label:(0,kt.ND)(this.$t("on-hold"))}]},statusCountTiles(){return[{key:"all",value:null,label:this.$t("All")},...this.statusPillOptions.map(e=>({key:e.value,value:e.value,label:e.label}))]},hasIdFilter(){return!!this.filters.id||!!this.filters.user},idFilterLabel(){const e=[];return this.filters.id&&e.push("#"+this.filters.id),this.filters.user&&e.push(this.$t("User ID")+" "+this.filters.user),e.join(" · ")},canRecordPayment(){return!!this.filterUser&&!this.hideRecordAction&&this.isGranted("FINANCIAL_TENANT")},showProductTypeFilter(){return!!this.filterUser&&!this.contact&&(this.isMoreThanOnePage||!!this.filters.productType)},productTypePillOptions(){return[{value:null,label:this.$t("All")},{value:"donation",label:(0,kt.ND)(this.$t("donation"))},{value:"fee",label:this.$t("fee")},{value:"event",label:this.$t("event")}]},typePillOptions(){return[{value:"onetime",label:this.$t("one-time")},{value:"subscription",label:this.$t("subscription")}]},optionPillOptions(){return this.item&&this.item.productOptions?this.item.productOptions.map(e=>({value:e.id,label:e.name})):[]},identityPillOptions(){return[{value:"validated",label:this.$t("Identity validated")},{value:"pending",label:this.$t("Identity pending validation")},{value:"rejected",label:this.$t("Identity rejected")},{value:"notSent",label:this.$t("Identity not sent")}]},localCenterPillOptions(){return this.localCenters.filter(e=>e.isStripeEligible).map(e=>({value:e.id,label:this.localCenterNameSelector(e,this.tenant)}))},showUserLocalCenterFilter(){return this.isAllPayments&&this.isGranted("FINANCIAL_TENANT")&&this.tenant.settingFeatures.localCenter.isActive&&this.localCenters.length>0},userLocalCenterPillOptions(){return this.localCenters.map(e=>({value:e.id,label:this.localCenterNameSelector(e,this.tenant)}))},productPillOptions(){const e=e=>e.map(e=>({value:e.uuid,label:ti(e)})).sort((e,t)=>e.label.localeCompare(t.label)),t=t=>e(this.filterProducts.filter(e=>t(e.type)));return[{label:null,options:[{value:null,label:this.$t("All")},{value:ei+"donation",label:(0,kt.ND)(this.$t("donation"))},{value:ei+"fee",label:(0,kt.ND)(this.$t("fee"))}]},{label:this.$t("Products"),options:t(e=>"event"!==e&&"fee"!==e)},{label:this.$t("Membership fees"),options:t(e=>"fee"===e)},{label:this.$t("Events"),options:t(e=>"event"===e)},{label:this.$t("Archived"),options:e(this.archivedFilterProducts)}].filter(e=>null===e.label||e.options.length)},productFilterType(){const e=this.filters.product;return"string"===typeof e&&e.startsWith(ei)?e.slice(ei.length):null},remindedPillOptions(){return[{value:"0",label:this.$t("Not reminded")},{value:"1",label:this.$t("Reminded")+this.$t(" x1")},{value:"2",label:this.$t("Reminded")+this.$t(" x2")},{value:"3",label:this.$t("Reminded")+this.$t(" x3")}]},tenantHasIdentityValidation(){return this.tenant.settingFeatures.identityValidation.isActive&&this.tenant.settingFeatures.identityValidation.onlinePayments},recordPaymentAllowsCustomAmount(){if(this.recordPayment.isCustomItem)return!0;const e=this.recordPaymentProduct;return!e||(!!e.hasCustomPriceValue||0===this.recordPaymentPrices.length)},recordPaymentCurrencySymbol(){const e=this.recordPaymentPrices.find(e=>e.id===this.recordPayment.priceId);return e&&e.currency?(0,kt.S1)(e.currency):this.tenant.currencySymbol},isRecordPaymentValid(){return parseFloat(this.recordPayment.amount)>0&&(this.recordPayment.isCustomItem?this.recordPayment.customName.trim().length>0:!!this.recordPayment.productUuid&&(this.recordPaymentAllowsCustomAmount||!!this.recordPayment.priceId))}},methods:{filter:Zt.filter,localCenterNameSelector:kt.Hc,sortLocalCenters:kt.KN,paymentDetailRows(e){return Ct(e._details)},toggleGroup(e){const t=this.openedDetails.indexOf(e.id);-1===t?this.openedDetails.push(e.id):this.openedDetails.splice(t,1)},initLoad(){const e=this.filterUser?.localCenter;(this.isGranted("FINANCIAL_LOCAL",e)||this.isGranted("HR_LOCAL",e)||this.filterUser&&this.filterUser.id===this.user.id)&&(this.filterUser?(this.filters.user=this.filterUser.id,this.loadProducts(),this.loadItemsPage()):this.retrieveProduct())},closeOwnPill(){this.openPill=null},togglePill(e){this.openPill===e?this.openPill=null:((0,vt.r)(this.closeOwnPill),this.openPill=e,this.$nextTick(()=>{const t=this.$refs[e+"Input"];t&&t.focus()}))},closePills(e){if(this.openPill){const t=this.$el.querySelectorAll(".list-filter-pill");let i=!1;t.forEach(t=>{t.contains(e.target)&&(i=!0)}),i||(this.openPill=null)}},clearPillFilter(e){this.filters[e]=null,this.openPill=null,this.filterItems(!0)},clearIdFilters(){this.filters.id=null,this.filters.user=null,this.openPill=null,this.filterItems(!0)},onPillStatusChange(e){this.filters.status=e,this.filterItems(!0)},onPillTypeChange(e){this.filters.type=e,this.filterItems(!0)},onPillOptionChange(e){this.filters.option=e,this.filterItems(!0)},onPillIdentityChange(e){this.filters.identity=e,this.filterItems(!0)},onPillLocalCenterChange(e){this.filters.localCenter=e,this.filterItems(!0)},onPillUserLocalCenterChange(e){this.filters.userLocalCenter=e,this.filterItems(!0)},onPillProductTypeChange(e){this.filters.productType=e,this.itemsPageCurrent=1,this.filterItems(!0)},onPillProductChange(e){this.filters.product=e,this.filterItems(!0)},onPillRemindedChange(e){this.filters.reminded=e,this.filterItems(!0)},getAsyncData:Et()(function(){this.filterItems(!0)},600),copyToClipboardAndSnackbar(e){(0,kt.lW)(e),this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-info",duration:500,actionText:null})},openStripe(e){let t;e.stripePaymentId?t="https://dashboard.stripe.com/"+this.tenant.stripeAccount+"/payments/"+e.stripePaymentId:e.stripeInvoiceId&&(t="https://dashboard.stripe.com/"+this.tenant.stripeAccount+"/invoices/"+e.stripeInvoiceId),t&&window.open(t,"_blank")},filterItems(e=!1){let t={};this.filters.id,t={id:this.filters.id,...t},t=this.filters.status?{status:this.filters.status}:{...t},t=this.filters.name?{name:this.filters.name,...t}:{...t},t=this.filters.user?{user:this.filters.user,...t}:{...t},t=this.filters.type?{type:this.filters.type,...t}:{...t},t=this.filters.noIdentity?{noIdentity:1,...t}:{...t},t=this.filters.localCenter?{localCenter:this.filters.localCenter,...t}:{...t},t=this.filters.userLocalCenter?{userLocalCenter:this.filters.userLocalCenter,...t}:{...t},t=this.filters.option?{option:this.filters.option,...t}:{...t},t=this.filters.product?{product:this.filters.product,...t}:{...t},t=this.filters.identity?{identity:this.filters.identity,...t}:{...t},t=this.filters.paymentsDateBegin?{paymentsDateBegin:this.filters.paymentsDateBegin,...t}:{...t},t=this.filters.paymentsDateEnd?{paymentsDateEnd:this.filters.paymentsDateEnd,...t}:{...t},t=this.filters.reminded?{reminded:this.filters.reminded,...t}:{...t},t=this.filters.email?{email:this.filters.email,...t}:{...t},t=this.filters.productType?{productType:this.filters.productType,...t}:{...t},t=this.filters.amountFrom?{amountOperator:this.filters.amountOperator,amountFrom:this.filters.amountFrom,...t}:{...t},t=this.filters.amountTo?{amountTo:this.filters.amountTo,...t}:{...t},t={page:e?1:this.itemsPageCurrent,...t},t=this.sortField?{sortField:this.sortField,...t}:{...t},t=this.sortOrder?{sortOrder:this.sortOrder,...t}:{...t},this.filterUser||this.contact?(e&&(this.itemsPageCurrent=1),this.loadItemsPage()):this.$router.push({name:"ProductPayments",params:{item:this.item?this.item.uuid:0},query:{...t}})},retrieveProduct(){if(this.isLoading=!0,!this.itemId)return this.loadProducts(),this.isGranted("FINANCIAL_TENANT")&&this.tenant.settingFeatures.localCenter.isActive&&this.loadLocalCenters(),this.loadItemsPage();this.$http.plain.get("/products/"+this.itemId,{}).then(e=>(this.item=e.data,this.item.hasLocalCenterOption&&this.loadLocalCenters(),this.loadItemsPage())).c
1atch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},productShowQuery(e){return e.localCenter?{isLocalSettings:1}:{}},getFiltersQueryString(e=!0){let t="";if(this.filterUser||!this.$route.params.item||this.isAllPayments||(t+="&product.uuid="+this.$route.params.item),this.isAllPayments&&this.filters.product&&(t+=this.productFilterType?"&product.type="+this.productFilterType:"&product.uuid="+this.filters.product),this.filterUser&&this.filters.productType&&(t+="&product.type="+this.filters.productType),this.filters.identity&&(t+="&identity="+this.filters.identity),this.filters.paymentsDateBegin&&(t+="&stripePaymentDate[after]="+Yt()(this.filters.paymentsDateBegin).format("YYYY-MM-DD")),this.filters.paymentsDateEnd&&(t+="&stripePaymentDate[before]="+Yt()(this.filters.paymentsDateEnd).add(1,"day").format("YYYY-MM-DD")),"0"===this.filters.reminded?t+="&exists[identityReminderSent]=0&exists[identityReminder2Sent]=0&exists[identityReminder3Sent]=0":"1"===this.filters.reminded?t+="&exists[identityReminderSent]=1&exists[identityReminder2Sent]=0":"2"===this.filters.reminded?t+="&exists[identityReminder2Sent]=1&exists[identityReminder3Sent]=0":"3"===this.filters.reminded&&(t+="&exists[identityReminder3Sent]=1"),this.filters.email&&(t+="&user.email="+this.filters.email),this.item){let e="fee"===this.item.type?"&userLocalCenter=":"&localCenter=";this.item.localCenter||this.isGranted("FINANCIAL_TENANT")?this.filters.localCenter&&(t+=e+this.filters.localCenter):this.isGranted("FINANCIAL_PARENT_LOCAL")&&this.user.localCenterParent?t+=e+this.user.localCenterParent.id:t+=e+this.user.localCenter.id}if(this.isAllPayments&&this.filters.userLocalCenter&&(t+="&userLocalCenter="+this.filters.userLocalCenter),this.filters.noIdentity&&(t+="&exists[identity]=false"),this.filters.option&&(t+="&productOption="+this.filters.option),this.filters.user&&!this.contact&&(t+="&user="+this.filters.user),this.filters.user&&this.contact&&(t+="&contact="+this.filters.user),this.filters.name&&(t+="&user.fullName="+this.filters.name),this.filters.id&&(t+="&id="+this.filters.id),e&&this.filters.status&&(t+="&status="+this.filters.status),null!==this.filters.amountFrom&&""!==this.filters.amountFrom){const e=encodeURIComponent(this.filters.amountFrom);"gt"===this.filters.amountOperator?t+="&amount[gt]="+e:"lt"===this.filters.amountOperator?t+="&amount[lt]="+e:"between"===this.filters.amountOperator?t+=null!==this.filters.amountTo&&""!==this.filters.amountTo?"&amount[between]="+e+".."+encodeURIComponent(this.filters.amountTo):"&amount[gte]="+e:t+="&amount="+e}return this.filters.type&&("subscription"===this.filters.type?t+="&exists[subscriptionProfile]=1":"onetime"===this.filters.type&&(t+="&exists[subscriptionProfile]=0")),t},getOrderQueryString(){let e="&order["+this.sortField+"]="+this.sortOrder;return e},changeListPage(e){this.itemsPageCurrent=e,this.filterItems(!1)},acceptPayment(e){this.isLoading=!0,this.$http.plain.patch("/product-payment/"+e.id+"/accept",{}).then(e=>{this.invalidateStatusCounts(),this.loadItemsPage()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},cancelPayment(e){this.$buefy.dialog.confirm({title:this.$t("Cancel"),message:this.$t("Cancel")+" "+this.$filters.money(e.amount,e.currency)+"?",confirmText:this.$t("yes"),type:"is-danger",onConfirm:()=>{this.isLoading=!0,this.$http.plain.patch("/product-payment/"+e.id+"/cancel",{}).then(e=>{this.invalidateStatusCounts(),this.loadItemsPage()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})}})},refundPayment(e){let t=e.user?e.user.fullName:e.contact.name;this.$buefy.dialog.confirm({title:this.$t("Refund"),message:this.$t("Refund")+" "+this.$filters.money(e.amount,e.currency)+" - "+t+"?",confirmText:this.$t("yes"),type:"is-danger",onConfirm:()=>{this.isLoading=!0,this.$http.plain.patch("/product-payment/"+e.id+"/refund",{}).then(e=>{this.invalidateStatusCounts(),this.loadItemsPage()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})}})},canGenerateInvoice(e){return this.isGranted("ADMIN_TENANT")&&this.tenant?.settingFeatures?.invoices?.isActive&&"success"===e.status&&!e.invoice&&!e.isRegistrationFee&&"fee"===e.product?.type},generateInvoice(e){let t=e.user?e.user.fullName:e.company?e.company.name:e.contact?e.contact.name:"";this.$buefy.dialog.confirm({title:this.$t("Generate Invoice"),message:this.$t("Generate a paid invoice for")+" "+this.$filters.money(e.amount,e.currency)+" - "+t+"?",confirmText:this.$t("Generate"),type:"is-info",onConfirm:()=>{this.isLoading=!0,this.$http.plain.patch("/product-payment/"+e.id+"/generate-invoice",{}).then(e=>{e.data.invoice?this.$router.push({name:"InvoiceUpdate",params:{item:e.data.invoice.id}}):this.loadItemsPage()}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})}})},openRecordPaymentModal(){this.recordPayment={isCustomItem:!1,customName:"",productUuid:null,priceId:null,amount:null,paymentDate:new Date},this.recordPaymentPrices=[],this.recordPaymentProduct=null,this.isRecordPaymentModalOpen=!0},onRecordProductChange(e){this.recordPayment.priceId=null,this.recordPayment.amount=null,this.recordPaymentPrices=[],this.recordPaymentProduct=null,e&&this.$http.plain.get("/products/"+e).then(e=>{this.recordPaymentProduct=e.data,this.recordPaymentPrices=(e.data.productPrices||[]).filter(e=>e&&!e.isArchived)}).catch(e=>console.error(e))},onRecordPriceChange(){this.recomputeRecordAmount()},recomputeRecordAmount(){if(this.recordPaymentAllowsCustomAmount)return;const e=this.recordPaymentPrices.find(e=>e.id===this.recordPayment.priceId);this.recordPayment.amount=e?e.price:null},submitRecordPayment(){if(!this.isRecordPaymentValid)return;this.isRecordingPayment=!0;const e=this.contact?{contact:this.filterUser.id,amount:parseFloat(this.recordPayment.amount)}:{user:this.filterUser.id,amount:parseFloat(this.recordPayment.amount)};this.recordPayment.isCustomItem?e.customProductName=this.recordPayment.customName.trim():(e.product=this.recordPayment.productUuid,this.recordPayment.priceId&&(e.price=this.recordPayment.priceId)),this.recordPayment.paymentDate&&(e.paymentDate=Yt()(this.recordPayment.paymentDate).format("YYYY-MM-DD")),this.$http.plain.post("/product-payment/record",e).then(()=>
1{this.$buefy.toast.open({message:this.$t("Payment recorded"),type:"is-success"}),this.isRecordPaymentModalOpen=!1,this.invalidateStatusCounts(),this.loadItemsPage(),this.$emit("update-user")}).catch(e=>{this.$buefy.toast.open({message:e.response?.data?.message||this.$t("error_creating"),type:"is-danger"})}).finally(()=>{this.isRecordingPayment=!1})},loadLocalCenters(){return this.$http.plain.get("/local_centers_all?isActive=1&tenant="+this.tenant.id).then(e=>{this.localCenters=(0,kt.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>console.error(e))},loadProducts(){return this.$http.plain.get("/my-products?pagination=false").then(e=>{const t=e.data["hydra:member"]||[];this.filterProducts=t,this.products=t.filter(e=>"event"!==e.type&&"fee"!==e.type&&"membership"!==e.type),this.isAllPayments&&this.loadArchivedFilterProducts()}).catch(e=>console.error(e))},loadArchivedFilterProducts(){return this.$http.plain.get("/my-products?pagination=false&exists[isArchived]=1").then(e=>{this.archivedFilterProducts=e.data["hydra:member"]||[]}).catch(e=>console.error(e))},formatCount(e){return void 0===e||null===e?"â":e.toLocaleString()},invalidateStatusCounts(){this.statusCountsKey=null},refreshList(){this.invalidateStatusCounts(),this.loadItemsPage()},loadStatusCounts(){if(this.filterUser)return;const e=this.getFiltersQueryString(!1);if(e===this.statusCountsKey)return;this.statusCountsKey=e;const t=this.statusCountTiles.map(t=>this.$http.plain.get("/product_payments?itemsPerPage=1&page=1"+e+(t.value?"&status="+t.value:"")).then(e=>({key:t.key,total:e.data["hydra:totalItems"]})).catch(e=>(console.error(e),{key:t.key,total:null})));Promise.all(t).then(e=>{const t={};e.forEach(e=>{t[e.key]=e.total}),this.statusCounts=t})},partialChargeKeysFor(e,t,i){const s=new Set;if(0===e.length)return s;this.itemsPageCurrent>1&&e[0].stripePaymentId&&s.add(e[0].stripePaymentId);const a=null!==t&&i&&this.itemsPageCurrent*i>=t,n=e[e.length-1];return!a&&n.stripePaymentId&&s.add(n.stripePaymentId),s},loadItemsPage(e=ii){this.items=null,this.isLoading=!0;let t=this.getOrderQueryString(),i=this.getFiltersQueryString();return this.loadStatusCounts(),this.$http.plain.get("/product_payments?itemsPerPage="+e+"&page="+this.itemsPageCurrent+t+i).then(t=>{const i=t.data["hydra:member"],s=t.data["hydra:totalItems"];if(e===ii){const t=Lt(i,"stripePaymentDate"===this.sortField,this.partialChargeKeysFor(i,s,e));if(t.length<ai&&t.length<i.length)return this.loadItemsPage(si)}this.items=i,this.openedDetails=[],this.itemsTotal=s,this.itemsPerPage=e,this.isMoreThanOnePage=void 0!==t.data["hydra:view"]["hydra:first"],this.itemsTotal&&this.$emit("contactHasPayments")}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.filterItems(!0)},viewDocument(e){this.isLoading=!0,this.$http.plain.get("/product-payment/"+e.id+"/proof",{responseType:"blob"}).then(t=>{var i=window.URL.createObjectURL(new Blob([t.data])),s=document.createElement("a");s.href=i,s.setAttribute("download","Anexa3_"+e.id+"_"+e.identity.lastName+"_"+e.identity.firstName+".pdf"),document.body.appendChild(s),s.click()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},filterItemsByWord:Et()(function(){this.filterItems(!0)},400),error(e){console.error(e)}},components:{FontAwesomeIcon:Ht.gc,UserProducts:$t["default"],ListFilterPill:Ft.A,ListFilterPillDate:Tt.A,ListFilterPillNumber:qt,PaymentIdentityTag:Jt.A}};const oi=(0,jt.A)(ni,[["render",yt],["__scopeId","data-v-4dbff754"]]);var li=oi},58065:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Y}});var s=i(20641),a=i(90033);const n={class:"o-minwidth"},o={class:"icon-text"},l={class:"icon is-small"},r={key:0,class:"vote-list vote-list-skeleton"},d={key:2},c={key:0,class:"level is-mobile"},u={class:"level-left"},m={class:"level-item"},p={class:"title"},h={class:"level-right"},g={class:"level-item"},f={class:"icon is-small"},b={key:1,class:"vote-list-filters mb-4"},y={key:2,class:"has-text-centered py-6"},v={class:"icon is-large has-text-grey-light mb-3"},k={class:"has-text-grey is-size-5"},C={key:3,class:"vote-list"},L=["disabled"],w=["disabled"],_={class:"icon is-small"},E=["disabled"],$=["disabled"],F={class:"icon is-small"};function T(e,t,i,T,S,A){const P=(0,s.g2)("font-awesome-icon"),I=(0,s.g2)("MobileViewHeader"),M=(0,s.g2)("Vote
1CollectionCardSkeleton"),x=(0,s.g2)("b-loading"),N=(0,s.g2)("b-input"),U=(0,s.g2)("b-button"),D=(0,s.g2)("b-dropdown-item"),X=(0,s.g2)("b-dropdown"),V=(0,s.g2)("b-checkbox"),R=(0,s.g2)("VoteCollectionCard"),O=(0,s.g2)("b-pagination"),Q=(0,s.g2)("CreateContent"),B=(0,s.g2)("ItemViewModal"),G=(0,s.g2)("UpdateContent");return(0,s.uX)(),(0,s.CE)("section",n,[(0,s.bF)(I,{title:e.$t("Voting"),"back-route":{name:"Dashboard"}},{actions:(0,s.k6)(()=>[e.isGranted("HR_TENANT")&&!i.hideCreate?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-rounded is-small",onClick:t[0]||(t[0]=(...e)=>A.openCreateModal&&A.openCreateModal(...e))},[(0,s.Lk)("span",o,[(0,s.Lk)("span",l,[(0,s.bF)(P,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Create")),1)])])):(0,s.Q3)("",!0)]),_:1},8,["title"]),null===S.items?((0,s.uX)(),(0,s.CE)("div",r,[((0,s.uX)(),(0,s.CE)(s.FK,null,(0,s.pI)(5,e=>(0,s.bF)(M,{key:"vote-skeleton-"+e})),64))])):(0,s.Q3)("",!0),null!==S.items?((0,s.uX)(),(0,s.Wv)(x,{key:1,modelValue:S.isLoading,"onUpdate:modelValue":t[1]||(t[1]=e=>S.isLoading=e),"is-full-page":!1},null,8,["modelValue"])):(0,s.Q3)("",!0),S.items?((0,s.uX)(),(0,s.CE)("div",d,[i.eventUuid||e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("div",u,[(0,s.Lk)("div",m,[(0,s.Lk)("h2",p,(0,a.v_)(e.$t("Voting")),1)])]),(0,s.Lk)("div",h,[(0,s.Lk)("div",g,[e.isGranted("HR_TENANT")&&!i.hideCreate?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-rounded is-small",onClick:t[2]||(t[2]=(...e)=>A.openCreateModal&&A.openCreateModal(...e))},[(0,s.Lk)("span",f,[(0,s.bF)(P,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("create"))+" "+(0,a.v_)(e.$t("Voting")),1)])):(0,s.Q3)("",!0)])])])),S.items&&(S.items.length>0||A.hasActiveFilter)&&!i.hideFilters?((0,s.uX)(),(0,s.CE)("div",b,[(0,s.bF)(N,{modelValue:S.searchKeyword,"onUpdate:modelValue":[t[3]||(t[3]=e=>S.searchKeyword=e),A.onSearchInput],class:"vote-list-search",placeholder:e.$t("Search by title or question"),icon:"magnifying-glass","icon-right":S.searchKeyword?"xmark":"","icon-right-clickable":"",rounded:"",size:"is-small",onIconRightClick:A.clearSearch},null,8,["modelValue","placeholder","icon-right","onUpdate:modelValue","onIconRightClick"]),(0,s.bF)(X,{modelValue:S.filterStatus,"onUpdate:modelValue":[t[4]||(t[4]=e=>S.filterStatus=e),A.onStatusChange],"aria-role":"list",class:"vote-list-status-filter"},{trigger:(0,s.k6)(({active:e})=>[(0,s.bF)(U,{class:"is-rounded is-small","icon-right":e?"chevron-up":"chevron-down"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(A.statusLabel),1)]),_:1},8,["icon-right"])]),default:(0,s.k6)(()=>[(0,s.bF)(D,{value:"","aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("All statuses")),1)]),_:1}),(0,s.bF)(D,{value:"live","aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Live")),1)]),_:1}),(0,s.bF)(D,{value:"draft","aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Draft")),1)]),_:1}),(0,s.bF)(D,{value:"upcoming","aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("upcoming")),1)]),_:1}),(0,s.bF)(D,{value:"closed","aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Finished")),1)]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"]),(0,s.bF)(V,{modelValue:S.isArchivedFilter,"onUpdate:modelValue":[t[5]||(t[5]=e=>S.isArchivedFilter=e),A.onArchivedToggle],size:"is-small",class:"vote-list-archived-filter"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Archived")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])])):(0,s.Q3)("",!0),S.items&&0===S.items.length?((0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("span",v,[(0,s.bF)(P,{icon:"fa-light fa-box-ballot",style:{"font-size":"3rem"}})]),(0,s.Lk)("p",k,(0,a.v_)(e.$t("No voting event available")),1)])):(0,s.Q3)("",!0),S.items&&S.items.length>0?((0,s.uX)(),(0,s.CE)("div",C,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(S.items,e=>((0,s.uX)(),(0,s.Wv)(R,{key:e.id,row:e,onClick:A.goToVote,onEventClick:A.goToEvent,onEdit:A.openUpdateModal},null,8,["row","onClick","onEventClick","onEdit"]))),128))])):(0,s.Q3)("",!0),S.isMoreThanOnePage?((0,s.uX)(),(0,s.Wv)(O,{key:4,paginated:S.itemsTotal>30,"pagination-rounded":"","backend-pagination":"",total:S.itemsTotal,"per-page":S.itemsPerPage,onPageChange:A.changeListPage},null,8,["paginated","total","per-page","onPageChange"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.bF)(B,{modelValue:S.isCreateModalVisible,"onUpdate:modelValue":t[9]||(t[9]=e=>S.isCreateModalVisible=e),title:e.$t("create")+" "+e.$t("Voting"),"modal-width":800,"scroll-container-id":"voteCreateModalBody","hide-header-close":!0,onClose:A.closeCreateModal},{actions:(0,s.k6)(()=>[(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-small is-rounded",{"is-loading":S.createFormState.isPublishing||S.createFormState.isBootstrapping}]),disabled:S.createFormState.isPublishing||S.createFormState.isBootstrapping,onClick:t[6]||(t[6]=(...e)=>A.triggerVoteSaveDraft&&A.triggerVoteSaveDraft(...e))},(0,a.v_)(e.$t("Save")),11,L),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-small is-primary is-rounded ml-1",{"is-loading":S.createFormState.isPublishing||S.createFormState.isBootstrapping}]),disabled:!S.createFormState.canSubmit||S.createFormState.isPublishing||S.createFormState.isBootstrapping||!1===S.createFormState.isEditable,onClick:t[7]||(t[7]=(...e)=>A.triggerVotePublish&&A.triggerVotePublish(...e))},[(0,s.Lk)("span",_,[(0,s.bF)(P,{icon:"fa-light fa-square-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Publish")),1)],10,w)]),default:(0,s.k6)(()=>[S.isCreateModalVisible?((0,s.uX)(),(0,s.Wv)(Q,{key:0,ref:"voteCreateContent","event-id":i.eventUuid,onCreated:A.handleVoteCreated,onPublished:A.handleVotePublished,onStateChange:t[8]||(t[8]=e=>S.createFormState=e),onClose:A.closeCreateModal,onCancel:A.closeCreateModal},null,8,["event-id","onCreated","onPublished","onClose","onCancel"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","title","onClose"]),(0,s.bF)(B,{modelValue:S.isUpdateModalVisible,"onUpdate:modelValue":t[13]||(t[13]=e=>S.isUpdateModalVisible=e),title:S.selectedVoteForUpdate?S.selectedVoteForUpdate.name:e.$t("settings"),"modal-width":800,"scroll-container-id":"voteUpdateModalBody","hide-header-close":!0,onClose:A.closeUpdateModal},{actions:(0,s.k6)(()=>[(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-small is-rounded",{"is-loading":S.updateFormState.isPublishing||S.updateFormState.isBootstrapping}]),disabled:S.updateFormState.isPublishing||S.updateFormState.isBootstrapping,onClick:t[10
1]||(t[10]=(...e)=>A.triggerVoteUpdateSaveDraft&&A.triggerVoteUpdateSaveDraft(...e))},(0,a.v_)(e.$t("Save")),11,E),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-small is-primary is-rounded ml-1",{"is-loading":S.updateFormState.isPublishing||S.updateFormState.isBootstrapping}]),disabled:!S.updateFormState.canSubmit||S.updateFormState.isPublishing||S.updateFormState.isBootstrapping||!1===S.updateFormState.isEditable,onClick:t[11]||(t[11]=(...e)=>A.triggerVoteUpdatePublish&&A.triggerVoteUpdatePublish(...e))},[(0,s.Lk)("span",F,[(0,s.bF)(P,{icon:"fa-light fa-square-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Publish")),1)],10,$)]),default:(0,s.k6)(()=>[S.selectedVoteIdForUpdate?((0,s.uX)(),(0,s.Wv)(G,{key:0,ref:"voteUpdateContent","vote-id":S.selectedVoteIdForUpdate,onLoaded:A.handleUpdateVoteLoaded,onUpdated:A.handleVoteUpdated,onPublished:A.handleVotePublished,onStateChange:t[12]||(t[12]=e=>S.updateFormState=e),onClose:A.closeUpdateModal,onDeleted:A.handleVoteDeleted,onArchived:A.handleVoteArchived,onCancel:A.closeUpdateModal},null,8,["vote-id","onLoaded","onUpdated","onPublished","onClose","onDeleted","onArchived","onCancel"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","title","onClose"])])}i(44114),i(18111),i(22489),i(7588);var S=i(40834),A=i(95093),P=i.n(A),I=i(81084),M=i(80762),x=i(39004);const N={class:"card vote-row vote-row-skeleton","aria-hidden":"true"},U={class:"vote-row-status-col"},D={class:"vote-row-content"},X={class:"vote-row-header"},V={class:"vote-row-meta"},R={class:"vote-row-stats"},O={class:"participation-display"},Q={class:"participation-header"};function B(e,t,i,a,n,o){const l=(0,s.g2)("b-skeleton");return(0,s.uX)(),(0,s.CE)("div",N,[(0,s.Lk)("div",U,[(0,s.bF)(l,{width:"64px",height:"22px",animated:""})]),t[0]||(t[0]=(0,s.Lk)("div",{class:"vote-row-separator"},null,-1)),(0,s.Lk)("div",D,[(0,s.Lk)("div",X,[(0,s.bF)(l,{width:"60%",height:"20px",animated:""})]),(0,s.Lk)("div",V,[(0,s.bF)(l,{width:"40%",height:"14px",animated:""})])]),(0,s.Lk)("div",R,[(0,s.Lk)("div",O,[(0,s.Lk)("div",Q,[(0,s.bF)(l,{width:"40%",height:"14px",animated:""}),(0,s.bF)(l,{width:"30%",height:"14px",animated:""})]),(0,s.bF)(l,{width:"100%",height:"6px",animated:""})])])])}var G={name:"VoteCollectionCardSkeleton"},W=i(66262);const j=(0,W.A)(G,[["render",B],["__scopeId","data-v-033a88a3"]]);var z=j,q=i(66733),J=i(82920),H={components:{MobileViewHeader:I.A,ItemViewModal:M.A,VoteCollectionCard:x.A,VoteCollectionCardSkeleton:z,CreateContent:q.A,UpdateContent:J.A},props:["eventUuid","eventId","hideCreate","excludeDraft","hideFilters"],data(){return{isLocal:this.$route.query.isLocalSettings,items:null,filters:{},localCenter:null,itemsTotal:null,itemsPageCurrent:1,isMoreThanOnePage:!1,itemsPerPage:null,isLoading:!1,sortField:"dateStart",sortOrder:"desc",defaultSortOrder:"desc",timezone:null,isCreateModalVisible:!1,isUpdateModalVisible:!1,selectedVoteIdForUpdate:null,selectedVoteForUpdate:null,createFormState:{canSubmit:!1,isPublishing:!1,isBootstrapping:!1,isEditable:!0},updateFormState:{canSubmit:!0,isPublishing:!1,isBootstrapping:!1,isEditable:!0},filterStatus:"",isArchivedFilter:!1,searchKeyword:"",searchDebounceTimer:null}},computed:{...(0,S.L8)(["isGranted","tenant","user"]),hasActiveFilter(){return""!==this.filterStatus||this.isArchivedFilter||""!==this.searchKeyword.trim()},statusLabel(){const e={live:this.$t("Live"),draft:this.$t("Draft"),upcoming:this.$t("upcoming"),closed:this.$t("Finished")};return e[this.filterStatus]||this.$t("All statuses")}},created(){this.timezone=this.user.timezone?this.user.timezone:this.tenant.timezone,this.loadItemsPage()},mounted(){this.loadLocalCenter()},methods:{filterItems(){this.loadItemsPage()},onStatusChange(){this.isArchivedFilter=!1,this.itemsPageCurrent=1,this.loadItemsPage()},onArchivedToggle(e){e&&(this.filterStatus=""),this.itemsPageCurrent=1,this.loadItemsPage()},onSearchInput(){this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),this.searchDebounceTimer=setTimeout(()=>{this.itemsPageCurrent=1,this.loadItemsPage()},400)},clearSearch(){this.searchKeyword="",this.itemsPageCurrent=1,this.loadItemsPage()},getFiltersQueryString(){let e="";e=this.eventId?"&event="+this.eventId+"&myVotes=1":this.eventUuid?"&event="+this.eventUuid:"&myVotes=1",this.isArchivedFilter?e+="&isArchived=true":(this.filterStatus&&(e+="&status="+encodeURIComponent(this.filterStatus)),e+="&isArchived=false");const t=this.searchKeyword.trim();return""!==t&&(e+="&keyword="+encodeURIComponent(t)),e},getOrderQueryString(){return"&order["+this.sortField+"]="+this.sortOrder},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.loadItemsPage()},loadLocalCenter(){this.user.localCenter&&this.$http.plain.get("/local_centers/"+this.user.localCenter.id).then(e=>{this.localCenter=e.data}).catch(e=>console.error(e))},loadItemsPage(){this.isLoading=!0;let e=this.getOrderQueryString(),t=this.getFiltersQueryString();this.$http.plain.get("/vote_collections?page="+this.itemsPageCurrent+e+t).then(e=>{let t=e.data["hydra:member"];this.excludeDraft&&(t=t.filter(e=>"draft"!==e.status)),this.items=t,1===this.itemsPageCurrent&&(this.itemsTotal=e.data["hydra:totalItems"],this.itemsPerPage=e.data["hydra:member"].length),this.isMoreThanOnePage=void 0!==e.data["hydra:view"]["hydra:first"],this.items.forEac
1h(e=>{e.dateStart&&(e.dateStart=P()(e.dateStart).utc().format("YYYY-MM-DDTHH:mm")),e.dateEnd&&(e.dateEnd=P()(e.dateEnd).utc().format("YYYY-MM-DDTHH:mm")),this.convertTimezones(e)})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.loadItemsPage()},saveSuccess(){this.$buefy.snackbar.open({message:this.$t("createdSuccessfully")}),this.filterItems()},convertTimezones(e){e.dateStart&&(e.dateStart=P()(e.dateStart).tz(this.timezone).format("YYYY-MM-DDTHH:mm")),e.dateEnd&&(e.dateEnd=P()(e.dateEnd).tz(this.timezone).format("YYYY-MM-DDTHH:mm"))},voteShowLocation(e){const t={name:"VoteShow",params:{item:e}};return this.eventUuid&&(t.query={eventUuid:this.eventUuid}),t},goToVote(e){this.$router.push(this.voteShowLocation(e.id))},goToEvent(e){e&&e.uuid&&this.$router.push({name:"EventShow",params:{item:e.uuid}})},openCreateModal(){this.isCreateModalVisible=!0},closeCreateModal(){this.isCreateModalVisible=!1},handleVoteCreated(e){this.closeCreateModal(),this.$router.push(this.voteShowLocation(e))},openUpdateModal(e){this.selectedVoteIdForUpdate=e.id,this.selectedVoteForUpdate=e,this.isUpdateModalVisible=!0},closeUpdateModal(){this.isUpdateModalVisible=!1,this.selectedVoteIdForUpdate=null,this.selectedVoteForUpdate=null},handleUpdateVoteLoaded(e){this.selectedVoteForUpdate=e},handleVoteUpdated(e){this.closeUpdateModal(),this.$router.push(this.voteShowLocation(e))},handleVoteDeleted(){this.closeUpdateModal(),this.loadItemsPage()},handleVoteArchived(){this.closeUpdateModal(),this.loadItemsPage()},handleVotePublished(e){this.closeCreateModal(),this.closeUpdateModal(),this.$router.push(this.voteShowLocation(e))},triggerVoteSaveDraft(){this.$refs.voteCreateContent?.saveDraftAndClose()},triggerVotePublish(){this.$refs.voteCreateContent?.publishAndClose()},triggerVoteUpdateSaveDraft(){this.$refs.voteUpdateContent?.saveDraftAndClose()},triggerVoteUpdatePublish(){this.$refs.voteUpdateContent?.publishAndClose()}}};const K=(0,W.A)(H,[["render",T],["__scopeId","data-v-0dfb2247"]]);var Y=K},58511:function(e,t,i){"use strict";i.d(t,{Ky:function(){return a},Vb:function(){return n}});const s={Alabama:"AL",Alaska:"AK",Arizona:"AZ",Arkansas:"AR",California:"CA",Colorado:"CO",Connecticut:"CT",Delaware:"DE","District of Columbia":"DC",Florida:"FL",Georgia:"GA",Hawaii:"HI",Idaho:"ID",Illinois:"IL",Indiana:"IN",Iowa:"IA",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Maine:"ME",Maryland:"MD",Massachusetts:"MA",Michigan:"MI",Minnesota:"MN",Mississippi:"MS",Missouri:"MO",Montana:"MT",Nebraska:"NE",Nevada:"NV","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM","New York":"NY","North Carolina":"NC","North Dakota":"ND",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Puerto Rico":"PR","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Vermont:"VT","Virgin Islands":"VI",Virginia:"VA",Washington:"WA","West Virginia":"WV",Wisconsin:"WI",Wyoming:"WY"},a=Object.keys(s);function n(e){const t=String(e||"").trim();if(s[t])return s[t];const i=t.toUpperCase();return Object.values(s).includes(i)?i:null}},59333:function(e,t,i){"use strict";i.d(t,{IP:function(){return o},RF:function(){return n},_1:function(){return a}});var s=i(61486);const a=["Dashboard","DashboardAlias"];function n({bootResolved:e,routeMeta:t,user:i}){return!e&&(!t?.anonymous&&!i?.id)}function o(e,t){if("admin.orgo.space"===t)return{name:"AdminLogin"};if((0,s.zk)(t))return{path:"/"};const i=e?.settingFeatures?.users?.anonymousHomepage;return"string"===typeof i&&i.trim().startsWith("/")?{path:i.trim()}:{name:"Login"}}},59772:function(e,t,i){"use strict";i.d(t,{A:function(){return tO}});var s=i(14511),a=i(43464),n=i(60259),o=i(91495),l=i(61486),r=i(99357),d=i(14470),c=(i(44114),i(20641)),u=i(90033),m=i(53751);const p={class:"adhesion-page"},h={class:"adhesion-header"},g={class:"adhesion-header-inner"},f={key:0,class:"adhesion-header-actions"},b=["disabled"],y={class:"icon is-small"},v={class:"adhesion-header-top mt-1"},k={class:"adhesion-page-heading"},C={class:"adhesion-page-title"},L={key:0},w={key:1,class:"adhesion-status-pill adhesion-status-sent"},_={key:2,class:"adhesion-status-pill adhesion-status-rejected"},E={key:3,class:"adhesion-status-pill adhesion-status-pending"},$={key:4,class:"adhesion-status-pill adhesion-status-pending"},F={class:"adhesion-header-logo"},T={class:"adhesion-main"},S={key:0,class:"step-card active-step open"},A={class:"step-header"},P={class:"step-title-text"},I={key:0},M={key:1},x={class:"step-body"},N={class:"icon is-small mr-1"},U={class:"step-title-text"},D={class:"step-body"},X={class:"mb-4"},V={class:"adhesion-label"},R={key:0,class:"adhesion-upload-preview"},O={class:"adhesion-upload-thumb"},Q=["src"],B={class:"adhesion-upload-info"},G={class:"adhesion-upload-name"},W={class:"adhesion-upload-hint"},j={class:"adhesion-uz-icon"},z={class:"adhesion-uz-title"},q={key:0,class:"mb-4"},J=["src"],H={class:"mt-2"},K={key:2,class:"mb-4"},Y={class:"adhesion-label"},Z={key:0,class:"adhesion-upload-preview"},ee={class:"adhesion-upload-thumb"},te=["src"],ie={class:"adhesion-upload-info"},se={class:"adhesion-upload-name"},ae={class:"adhesion-upload-hint"},ne={class:"adhesion-uz-icon"},oe={class:"adhesion-uz-title"},le={key:2,class:"mt-4"},re=["src"],de={class:"mt-2"},ce={class:"adhesion-privacy-hint is-size-7"},ue={class:"adhesion-btn-group"},me=["disabled"],pe={class:"step-title-text"},he={class:"step-body"},ge={key:0,class:"adhesion-step-hint mb-4"},fe={key:1,class:"adhesion-callout adhesion-callout-blue mb-4"},be={class:"adhesion-callout-icon"},ye={class:"adhesion-btn-group mt-5"},ve=["disabled"],ke={class:"step-title-text"},Ce=["disabled"],Le={class:"step-body"},we={key:0},_e={key:0,class:"adhesion-signature-block"},Ee={class:"adhesion-step-hint mb-3"},$e={class:"adhesion-signature-canvas-wrap"},Fe={id:"canvas",ref:"canvas"},Te={class:"adhesion-signature-actions"},Se=["disabled"],Ae={key:1,class:"mb-4"},Pe=["href"],Ie={key:0},Me={key:1},xe={class:"mb-4"},Ne={key:0,class:"is-size-6"},Ue={class:"adhesion-upload-zone"},De={class:"adhesion-uz-icon"},Xe={class:"adhesion-uz-title"},Ve={key:0,class:"mb-4"},Re=["href"],Oe={key:0},Qe={class:"adhesion-btn-group"},Be=["disabled"],Ge={class:"step-title-text"},We={class:"step-body"},je={key:0,class:"adhesion-callout adhesion-callout-amber"},ze={class:"adhesion-callout-icon"},qe={class:"adhesion-review-box mb-4"},Je={key:0,class:"adhesion-review-header"},He={class:"adhesion-review-title"},Ke={class:"adhesion-review-row"},Ye={class:"adhesion-rr-label"},Ze={class:"adhesion-rr-value"},et={key:1,class:"adhesion-review-row"},tt={class:"adhesion-rr-label"},it={class:"adhesion-rr-value"},st={class:"adhesion-review-row"},at={class:"adhesion-rr-label"},nt={class:"adhesion-rr-value"},ot={key:2,class:"adhesion-review-row"},lt={class:"adhesion-rr-label"},rt={class:"adhesion-review-row"},dt={class:"adhesion-rr-label"},ct={class:"adhesion-btn-group"},ut=["disabled"],mt={class:"icon is-small mr-1"},pt={class:"step-title-text"},ht={class:"step-body"},gt={class:"adhesion-step-hint mb-4"},ft={key:0,class:"mb-4"},bt={class:"tag is-success is-rounded mb-3"},yt={class:"icon is-small mr-1"},vt=["href"],kt={class:"icon is-small mr-1"},Ct={class:"icon is-small mr-1"},Lt={key:1,class:"mt-4"},wt={key:6,class:"adhesion-final-msg"},_t={class:"adhesion-fm-icon"},Et={class:"adhesion-fm-sub"},$t={class:"footer-links has-text-centered mt-5 is-size-7"},Ft=["href"],Tt=["href"];function St(e,t,i,s,a,n){const o=(0,c.g2)("font-awesome-icon"),l=(0,c.g2)("router-link"),r=(0,c.g2)("UserTypeThumbnail"),d=(0,c.g2)("OrgoLogo"),St=(0,c.g2)("b-loading"),At=(0,c.g2)("b-upload"),Pt=(0,c.g2)("b-switch"),It=(0,c.g2)("AdhesionForm"),Mt=(0,c.g2)("VideoRecorder");return(0,c.uX)(),(0,c.CE)("div",p,[(0,c.Lk)("header",h,[(0,c.Lk)("div",g,[a.member&&e.isGranted("HR_LOCAL",a.member.localCenter)?((0,c.uX)(),(0,c.CE)("div",f,[a.item&&["duplicated","rejected"].includes(a.item.status)&&e.isGranted("HR_LOCAL",a.member.localCenter)?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-primary is-passive is-small is-rounded mt-3",{"is-loading":a.isLoading}]),disabled:a.isLoading,onClick:t[0]||(t[0]=(...e)=>n.reopen&&n.reopen(...e))},(0,u.v_)(e.$t("Reopen")),11,b)):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL",a.member.localCenter)&&a.member.id!==e.user.id?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-small is-rounded is-light mt-3",onClick:t[1]||(t[1]=t=>e.$router.push({name:"Adhesions",query:{uid:a.member.id}}))},[(0,c.Lk)("span",y,[(0,c.bF)(o,{icon:"fa-light fa-chevron-left"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Adhesion Admin")),1)])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),(0,c.Lk)("div",v,[(0,c.Lk)("div",k,[(0,c.Lk)("span",C,[(0,c.eW)((0,u.v_)(e.$t("Adhesion"))+" "+(0,u.v_)(e.tenant.name)+" ",1),a.member&&a.member.id!==e.user.id?((0,c.uX)(),(0,c.CE)("span",L,[t[28]||(t[28]=(0,c.eW)(" - ",-1)),(0,c.bF)(l,{to:{name:"UserShow",params:{item:a.member.id}},target:"_blank"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(a.member.fullName),1)]),_:1},8,["to"])])):(0,c.Q3)("",!0)]),e.$route.query.u&&a.member?((0,c.uX)(),(0,c.Wv)(r,{key:0,"user-type":a.member.type,"is-small":!0,class:"ml-2"},null,8,["user-type"])):(0,c.Q3)("",!0),a.item&&"success"===a.item.status?((0,c.uX)(),(0,c.CE)("span",w,[(0,c.bF)(o,{icon:"fa-light fa-circle-check"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Adhesion success")),1)])):a.item&&"rejected"===a.item.status?((0,c.uX)(),(0,c.CE)("span",_,(0,u.v_)(e.$t("Adhesion rejected")),1)):a.item&&"interviewed"===a.item.status?((0,c.uX)(),(0,c.CE)("span",E,(0,u.v_)(e.$t("Interviewed")),1)):a.item&&"new"!==a.item.status?((0,c.uX)(),(0,c.CE)("span",$,(0,u.v_)(e.$t(e.adhesionStatusLabel(n.adhesion.status))),1)):(0,c.Q3)("",!0)]),(0,c.Lk)("div",F,[(0,c.bF)(d)])])])]),(0,c.bF)(St,{modelValue:a.isLoading,"onUpdate:modelValue":t[2]||(t[2]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("main",T,[!a.item&&a.member?((0,c.uX)(),(0,c.CE)("div",S,[(0,c.Lk)("div",A,[(0,c.Lk)("div",P,[a.member.id!==e.user.id?((0,c.uX)(),(0,c.CE)("span",I,(0,u.v_)(e.$t("Complete the adherence process for"))+" "+(0,u.v_)(a.member.fullName),1)):((0,c.uX)(),(0,c.CE)("span",M,
1(0,u.v_)(e.$t("Complete the adherence process for"))+" "+(0,u.v_)(a.member.fullName),1))])]),(0,c.Lk)("div",x,[t[29]||(t[29]=(0,c.Lk)("div",{class:"step-divider"},null,-1)),(0,c.Lk)("button",{class:"adhesion-btn adhesion-btn-primary",onClick:t[3]||(t[3]=(...e)=>n.createAdhesion&&n.createAdhesion(...e))},[(0,c.Lk)("span",N,[(0,c.bF)(o,{icon:"fa-light fa-play"})]),(0,c.eW)(" "+(0,u.v_)(e.$t("Start adherence")),1)])])])):(0,c.Q3)("",!0),a.member&&a.item&&n.requiresIdentityVerification?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)(["step-card",n.stepCardClass(1)])},[(0,c.Lk)("div",{class:"step-header",onClick:t[4]||(t[4]=e=>n.toggleStep(1))},[(0,c.bF)(o,{icon:"fa-light fa-circle-check",class:(0,u.C4)(["step-check-icon",{"is-completed":n.isStepCompleted(1)}])},null,8,["class"]),(0,c.Lk)("div",U,(0,u.v_)(e.$t("Upload identity scan image")),1),n.isStepCompleted(1)?((0,c.uX)(),(0,c.CE)("span",{key:0,class:(0,u.C4)(["step-status-tag",n.stepTagClass(1)])},(0,u.v_)(n.stepTagText(1)),3)):(0,c.Q3)("",!0)]),(0,c.bo)((0,c.Lk)("div",D,[t[33]||(t[33]=(0,c.Lk)("div",{class:"step-divider"},null,-1)),(0,c.Lk)("div",X,[(0,c.Lk)("label",V,[(0,c.eW)((0,u.v_)(e.$t("Front document"))+" ",1),t[30]||(t[30]=(0,c.Lk)("span",{class:"adhesion-req"},"*",-1))]),a.member.identity&&a.member.identity.hasUploadedDocument?((0,c.uX)(),(0,c.CE)("div",R,[(0,c.Lk)("div",O,[(0,c.Lk)("img",{src:n.mediaSrc(a.member.identity.media),onClick:t[5]||(t[5]=e=>a.viewIdDocument=!a.viewIdDocument)},null,8,Q)]),(0,c.Lk)("div",B,[(0,c.Lk)("div",G,(0,u.v_)(e.$t("Identity document")),1),(0,c.Lk)("div",W,(0,u.v_)(e.$t("Uploaded")),1)])])):(0,c.Q3)("",!0),!n.isAdhesionStatusNew||a.member.identity&&a.member.identity.validated?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(At,{key:1,modelValue:a.fileId,"onUpdate:modelValue":[t[6]||(t[6]=e=>a.fileId=e),n.uploadFileId],disabled:a.isUploadingId,class:"adhesion-upload-zone-wrap"},{default:(0,c.k6)(()=>[(0,c.Lk)("div",{class:(0,u.C4)(["adhesion-upload-zone",{"is-loading-upload":a.isUploadingId}])},[(0,c.Lk)("div",j,[(0,c.bF)(o,{icon:"fa-light fa-camera"})]),(0,c.Lk)("div",z,(0,u.v_)(e.$t(a.member.identity&&a.member.identity.hasUploadedDocument?"Change image ID":"Choose image ID")),1),t[31]||(t[31]=(0,c.Lk)("div",{class:"adhesion-uz-hint"},"JPG, PNG â max 10 MB",-1))],2)]),_:1},8,["modelValue","disabled","onUpdate:modelValue"]))]),a.member&&a.member.identity&&a.member.identity.hasUploadedDocument&&a.viewIdDocument?((0,c.uX)(),(0,c.CE)("div",q,[(0,c.Lk)("img",{src:n.mediaSrc(a.member.identity.media),class:"adhesion-id-preview-img",style:(0,u.Tr)({transform:`rotate(${a.deg}deg)`})},null,12,J),(0,c.Lk)("div",H,[(0,c.Lk)("button",{class:"adhesion-btn-link",onClick:t[7]||(t[7]=(...e)=>n.rotation&&n.rotation(...e))},[(0,c.bF)(o,{icon:"fa-light fa-rotate-right"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Rotate")),1)])])])):(0,c.Q3)("",!0),a.member.identity&&a.member.identity.hasUploadedDocument&&n.isAdhesionStatusNew?((0,c.uX)(),(0,c.Wv)(Pt,{key:1,modelValue:a.hasIdentityMediaBack,"onUpdate:modelValue":t[8]||(t[8]=e=>a.hasIdentityMediaBack=e),size:"is-small",class:"mt-4 mb-4"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Document has information on the backside")),1)]),_:1},8,["modelValue"])):(0,c.Q3)("",!0),a.hasIdentityMediaBack&&a.member.identity&&a.member.identity.hasUploadedDocument?((0,c.uX)(),(0,c.CE)("div",K,[(0,c.Lk)("label",Y,(0,u.v_)(e.$t("Back document")),1),a.member.identity.mediaBack?((0,c.uX)(),(0,c.CE)("div",Z,[(0,c.Lk)("div",ee,[(0,c.Lk)("img",{src:n.mediaSrc(a.member.identity.mediaBack),onClick:t[9]||(t[9]=e=>a.viewIdDocumentBack=!a.viewIdDocumentBack)},null,8,te)]),(0,c.Lk)("div",ie,[(0,c.Lk)("div",se,(0,u.v_)(e.$t("Back side")),1),(0,c.Lk)("div",ae,(0,u.v_)(e.$t("Uploaded")),1)])])):(0,c.Q3)("",!0),n.isAdhesionStatusNew&&!a.member.identity?.validated?((0,c.uX)(),(0,c.Wv)(At,{key:1,modelValue:a.fileBackId,"onUpdate:modelValue":[t[10]||(t[10]=e=>a.fileBackId=e),n.uploadFileBackId],disabled:a.isUploadingId,class:"adhesion-upload-zone-wrap"},{default:(0,c.k6)(()=>[(0,c.Lk)("div",{class:(0,u.C4)(["adhesion-upload-zone",{"is-loading-upload":a.isUploadingId}])},[(0,c.Lk)("div",ne,[(0,c.bF)(o,{icon:"fa-light fa-camera"})]),(0,c.Lk)("div",oe,(0,u.v_)(e.$t(a.member.identity.mediaBack?"Change ID back image":"Upload ID back image")),1),t[32]||(t[32]=(0,c.Lk)("div",{class:"adhesion-uz-hint"},"JPG, PNG â max 10 MB",-1))],2)]),_:1},8,["modelValue","disabled","onUpdate:modelValue"])):(0,c.Q3)("",!0),a.member.identity.mediaBack&&a.viewIdDocumentBack?((0,c.uX)(),(0,c.CE)("div",le,[(0,c.Lk)("img",{src:n.mediaSrc(a.member.identity.mediaBack),class:"adhesion-id-preview-img",style:(0,u.Tr)({transform:`rotate(${a.deg}deg)`})},null,12,re),(0,c.Lk)("div",de,[(0,c.Lk)("button",{class:"adhesion-btn-link",onClick:t[11]||(t[11]=(...e)=>n.rotation&&n.rotation(...e))},[(0,c.bF)(o,{icon:"fa-light fa-rotate-right"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Rotate")),1)])])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),(0,c.bF)(St,{modelValue:a.isUploadingId,"onUpdate:modelValue":t[12]||(t[12]=e=>a.isUploadingId=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("p",ce,[(0,c.bF)(o,{icon:"fa-light fa-lock",class:""}),(0,c.eW)(" "+(0,u.v_)(e.$t("The document is stored securely and used exclusively for identity verification in accordance with the law.")),1)]),(0,c.Lk)("div",ue,[(0,c.Lk)("button",{class:"adhesion-btn adhesion-btn-primary",disabled:!a.member.identity||!a.member.identity.hasUploadedDocument,onClick:t[13]||(t[13]=e=>n.completeStep(1))},(0,u.v_)(e.$t("Continue"))+" â ",9,me)])],512),[[m.aG,1===a.openStepIndex]])],2)):(0,c.Q3)("",!0),a.item&&a.member&&(a.member.identity||!n.requiresIdentityVerification)?((0,
1c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)(["step-card",n.stepCardClass(2)])},[(0,c.Lk)("div",{class:"step-header",onClick:t[14]||(t[14]=e=>n.toggleStep(2))},[(0,c.bF)(o,{icon:"fa-light fa-circle-check",class:(0,u.C4)(["step-check-icon",{"is-completed":n.isStepCompleted(2)}])},null,8,["class"]),(0,c.Lk)("div",pe,(0,u.v_)(e.$t("Complete the adhesion profile form")),1),(0,c.Lk)("span",{class:(0,u.C4)(["step-status-tag",n.stepTagClass(2)])},(0,u.v_)(n.stepTagText(2)),3)]),(0,c.bo)((0,c.Lk)("div",he,[t[34]||(t[34]=(0,c.Lk)("div",{class:"step-divider"},null,-1)),n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("p",ge,(0,u.v_)(e.$t("You need to complete the adhesion form in order to sign it and send it"))+". ",1)):(0,c.Q3)("",!0),n.isAdhesionStatusNew?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",fe,[(0,c.Lk)("span",be,[(0,c.bF)(o,{icon:"fa-light fa-lock"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("The adhesion has been sent and can no longer be modified.")),1)])),a.item?((0,c.uX)(),(0,c.Wv)(It,{key:2,"adhesion-id":a.item.id,onSaved:n.onFormSaved},null,8,["adhesion-id","onSaved"])):(0,c.Q3)("",!0),(0,c.Lk)("div",ye,[(0,c.Lk)("button",{class:"adhesion-btn adhesion-btn-primary",disabled:!n.checkAdhesionFormComplete,onClick:t[15]||(t[15]=e=>n.completeStep(2))},(0,u.v_)(e.$t("Continue"))+" â ",9,ve)])],512),[[m.aG,2===a.openStepIndex]])],2)):(0,c.Q3)("",!0),a.item&&a.member&&(a.member.identity||!n.requiresIdentityVerification)?((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,u.C4)(["step-card",n.stepCardClass(3)])},[(0,c.Lk)("div",{class:"step-header",onClick:t[17]||(t[17]=e=>n.toggleStep(3))},[(0,c.bF)(o,{icon:"fa-light fa-circle-check",class:(0,u.C4)(["step-check-icon",{"is-completed":n.isStepCompleted(3)}])},null,8,["class"]),(0,c.Lk)("div",ke,(0,u.v_)(e.$t("Adhesion signature")),1),n.isAdhesionStatusNew&&!n.adhesionIsComplete?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-light is-small is-rounded adhesion-preview-btn",{"is-loading":a.isDownloading}]),disabled:!n.checkAdhesionFormComplete||a.isDownloading,onClick:t[16]||(t[16]=(0,m.D$)((...e)=>n.viewDocument&&n.viewDocument(...e),["stop"]))},[(0,c.bF)(o,{icon:"fa-light fa-file-pdf",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Download unsigned adhesion")),1)],10,Ce)):(0,c.Q3)("",!0),(0,c.Lk)("span",{class:(0,u.C4)(["step-status-tag",n.stepTagClass(3)])},(0,u.v_)(n.stepTagText(3)),3)]),(0,c.bo)((0,c.Lk)("div",Le,[t[35]||(t[35]=(0,c.Lk)("div",{class:"step-divider"},null,-1)),a.member.id===e.user.id&&n.hasInAppSignature?((0,c.uX)(),(0,c.CE)("div",we,[n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("div",_e,[(0,c.Lk)("p",Ee,(0,u.v_)(e.$t("Sign in the rectangle below")),1),(0,c.Lk)("div",$e,[(0,c.Lk)("canvas",Fe,null,512)]),(0,c.Lk)("div",Te,[(0,c.Lk)("button",{class:(0,u.C4)(["adhesion-btn adhesion-btn-primary",{"is-loading":a.isLoading}]),disabled:a.isLoading,onClick:t[18]||(t[18]=(...e)=>n.saveSignature&&n.saveSignature(...e))},[(0,c.bF)(o,{icon:"fa-light fa-signature",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Sign")),1)],10,Se),a.isLoading?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"adhesion-btn adhesion-btn-outline",onClick:t[19]||(t[19]=(...e)=>n.undoSignature&&n.undoSignature(...e))},[(0,c.bF)(o,{icon:"fa-light fa-rotate-left",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("clear")),1)]))])])):(0,c.Q3)("",!0),!a.isUploadingSigned&&a.item.hasUploadedDocument?((0,c.uX)(),(0,c.CE)("div",Ae,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.medias,(t,i)=>((0,c.uX)(),(0,c.CE)("a",{key:"adhesion_doc_"+i,class:"adhesion-inline-btn button is-light is-small is-rounded mr-3",href:n.mediaSrc(t),target:"_blank"},[(0,c.bF)(o,{icon:"fa-light fa-address-card",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Download signed adhesion"))+" ",1),a.item.medias.length>1?((0,c.uX)(),(0,c.CE)("span",Ie,(0,u.v_)(e.$t("file"))+" "+(0,u.v_)(i+1),1)):(0,c.Q3)("",!0)],8,Pe))),128))])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.member.id===e.user.id&&n.hasInAppSignature?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",Me,[(0,c.Lk)("div",xe,[a.isUploadingSigned&&a.item.medias.length>0?((0,c.uX)(),(0,c.CE)("p",Ne,(0,u.v_)(e.$t("Uploading"))+"... ",1)):(0,c.Q3)("",!0),n.isAdhesionStatusNew?((0,c.uX)(),(0,c.Wv)(At,{key:1,modelValue:a.filesAdhesion,"onUpdate:modelValue":[t[20]||(t[20]=e=>a.filesAdhesion=e),n.uploadFilesAdhesion],multiple:"",class:"adhesion-upload-zone-wrap","drag-drop":"",disabled:!n.checkAdhesionFormComplete},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Ue,[(0,c.Lk)("div",De,[(0,c.bF)(o,{icon:"fa-light fa-folder-open"})]),(0,c.Lk)("div",Xe,(0,u.v_)(e.$t(a.item.hasUploadedDocument?"Change signed adhesion":"Choose signed adhesion")),1)])]),_:1},8,["modelValue","disabled","onUpdate:modelValue"])):(0,c.Q3)("",!0)]),!a.isUploadingSigned&&a.item.hasUploadedDocument?((0,c.uX)(),(0,c.CE)("div",Ve,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.medias,(t,i)=>
1((0,c.uX)(),(0,c.CE)("a",{key:"adhesion_doc_"+i,class:"adhesion-inline-btn button is-light is-small is-rounded mr-3",href:n.mediaSrc(t),target:"_blank"},[(0,c.bF)(o,{icon:"fa-light fa-address-card",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Download signed adhesion"))+" ",1),a.item.medias.length>1?((0,c.uX)(),(0,c.CE)("span",Oe,(0,u.v_)(e.$t("file"))+" "+(0,u.v_)(i+1),1)):(0,c.Q3)("",!0)],8,Re))),128))])):(0,c.Q3)("",!0)])),(0,c.Lk)("div",Qe,[(0,c.Lk)("button",{class:"adhesion-btn adhesion-btn-primary",disabled:!a.item.hasUploadedDocument,onClick:t[21]||(t[21]=e=>n.completeStep(3))},(0,u.v_)(e.$t("Continue"))+" â ",9,Be)])],512),[[m.aG,3===a.openStepIndex]])],2)):(0,c.Q3)("",!0),a.item&&a.member&&(a.member.identity||!n.requiresIdentityVerification)?((0,c.uX)(),(0,c.CE)("div",{key:4,class:(0,u.C4)(["step-card",n.stepCardClass(4)])},[(0,c.Lk)("div",{class:"step-header",onClick:t[22]||(t[22]=e=>n.toggleStep(4))},[(0,c.bF)(o,{icon:"fa-light fa-circle-check",class:(0,u.C4)(["step-check-icon",{"is-completed":n.isStepCompleted(4)}])},null,8,["class"]),(0,c.Lk)("div",Ge,(0,u.v_)(e.$t("Send adhesion")),1),(0,c.Lk)("span",{class:(0,u.C4)(["step-status-tag",n.stepTagClass(4)])},(0,u.v_)(n.stepTagText(4)),3)]),(0,c.bo)((0,c.Lk)("div",We,[t[36]||(t[36]=(0,c.Lk)("div",{class:"step-divider"},null,-1)),n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("div",je,[(0,c.Lk)("span",ze,[(0,c.bF)(o,{icon:"fa-light fa-triangle-exclamation"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("By sending the adhesion you confirm that all information is correct. The adhesion will be verified by your local organization.")),1)])):(0,c.Q3)("",!0),(0,c.Lk)("div",qe,[n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("div",Je,[(0,c.Lk)("span",He,(0,u.v_)(e.$t("Adhesion summary")),1),(0,c.Lk)("button",{class:"adhesion-btn-link",onClick:t[23]||(t[23]=e=>a.openStepIndex=2)},(0,u.v_)(e.$t("Edit")),1)])):(0,c.Q3)("",!0),(0,c.Lk)("div",Ke,[(0,c.Lk)("span",Ye,(0,u.v_)(e.$t("Name")),1),(0,c.Lk)("span",Ze,(0,u.v_)(a.member.fullName||"â"),1)]),a.member.identity&&a.member.identity.idTown?((0,c.uX)(),(0,c.CE)("div",et,[(0,c.Lk)("span",tt,(0,u.v_)(e.$t("Town")),1),(0,c.Lk)("span",it,(0,u.v_)(a.member.identity.idTown.name||"â"),1)])):(0,c.Q3)("",!0),(0,c.Lk)("div",st,[(0,c.Lk)("span",at,(0,u.v_)(e.$t("Email")),1),(0,c.Lk)("span",nt,(0,u.v_)(a.member.email||"â"),1)]),n.requiresIdentityVerification?((0,c.uX)(),(0,c.CE)("div",ot,[(0,c.Lk)("span",lt,(0,u.v_)(e.$t("Identity document")),1),(0,c.Lk)("span",{class:(0,u.C4)(["adhesion-rr-value",{"has-text-success":a.member.identity&&a.member.identity.hasUploadedDocument}])},(0,u.v_)(a.member.identity&&a.member.identity.hasUploadedDocument?"â "+e.$t("Uploaded"):"â"),3)])):(0,c.Q3)("",!0),(0,c.Lk)("div",rt,[(0,c.Lk)("span",dt,(0,u.v_)(e.$t("Signature")),1),(0,c.Lk)("span",{class:(0,u.C4)(["adhesion-rr-value",{"has-text-success":a.item.hasUploadedDocument}])},(0,u.v_)(a.item.hasUploadedDocument?"â "+e.$t("Signed"):"â"),3)])]),(0,c.Lk)("div",ct,[n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["adhesion-btn adhesion-btn-green",{"is-loading":a.isSending}]),disabled:a.isSending||!n.adhesionIsComplete,onClick:t[24]||(t[24]=(...e)=>n.send&&n.send(...e))},[(0,c.Lk)("span",mt,[(0,c.bF)(o,{icon:"fa-light fa-paper-plane"})]),(0,c.eW)(" "+(0,u.v_)(e.$t("Send adhesion")),1)],10,ut)):(0,c.Q3)("",!0),n.isAdhesionStatusNew?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:1,class:"adhesion-btn adhesion-btn-primary",onClick:t[25]||(t[25]=e=>a.openStepIndex=5)},(0,u.v_)(e.$t("Continue"))+" â ",1))])],512),[[m.aG,4===a.openStepIndex]])],2)):(0,c.Q3)("",!0),a.item&&a.member&&(a.member.identity||!n.requiresIdentityVerification)&&n.adhesionHasVideoFeature?((0,c.uX)(),(0,c.CE)("div",{key:5,class:(0,u.C4)(["step-card",n.stepCardClass(5)])},[(0,c.Lk)("div",{class:"step-header",onClick:t[26]||(t[26]=e=>n.toggleStep(5))},[(0,c.bF)(o,{icon:"fa-light fa-circle-check",class:(0,u.C4)(["step-check-icon",{"is-completed":n.isStepCompleted(5)}])},null,8,["class"]),(0,c.Lk)("div",pt,(0,u.v_)(e.$t("Video recording")),1),(0,c.Lk)("span",{class:(0,u.C4)(["step-status-tag",n.stepTagClass(5)])},(0,u.v_)(n.stepTagText(5)),3)]),(0,c.bo)((0,c.Lk)("div",ht,[t[39]||(t[39]=(0,c.Lk)("div",{class:"step-divider"},null,-1)),(0,c.Lk)("p",gt,[(0,c.eW)((0,u.v_)(e.$t("Record a short video answering the questions below. This helps us verify your identity and commitment."))+" ",1),t[37]||(t[37]=(0,c.Lk)("br",null,null,-1)),t[38]||(t[38]=(0,c.Lk)("br",null,null,-1)),(0,c.eW)(" "+(0,u.v_)(e.$t("On screen you will find 6 questions. Answer each one in turn, then press the next question to continue. The total time allocated is approximately 5 minutes. Be natural and honest, there are no wrong answers.")),1)]),a.item.hasVideo&&!a.showVideoRecorder?((0,c.uX)(),(0,c.CE)("div",ft,[(0,c.Lk)("span",bt,[(0,c.Lk)("span",yt,[(0,c.bF)(o,{icon:"fa-light fa-circle-check"}
1)]),(0,c.eW)(" "+(0,u.v_)(e.$t("Video recorded")),1)]),(0,c.Lk)("div",null,[a.item.videoMedia?((0,c.uX)(),(0,c.CE)("a",{key:0,class:"button is-light is-small is-rounded mr-3",href:n.mediaSrc(a.item.videoMedia),target:"_blank"},[(0,c.Lk)("span",kt,[(0,c.bF)(o,{icon:"fa-light fa-play"})]),(0,c.eW)(" "+(0,u.v_)(e.$t("Watch video")),1)],8,vt)):(0,c.Q3)("",!0),n.canReRecordVideo?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-light is-small is-rounded",onClick:t[27]||(t[27]=e=>a.showVideoRecorder=!0)},[(0,c.Lk)("span",Ct,[(0,c.bF)(o,{icon:"fa-light fa-rotate-left"})]),(0,c.eW)(" "+(0,u.v_)(e.$t("Record again")),1)])):(0,c.Q3)("",!0)])])):(0,c.Q3)("",!0),!a.item.hasVideo||a.showVideoRecorder?((0,c.uX)(),(0,c.CE)("div",Lt,[(0,c.bF)(Mt,{"adhesion-id":a.item.id,questions:n.videoQuestions,"max-duration":300,onUploaded:n.onVideoUploaded},null,8,["adhesion-id","questions","onUploaded"])])):(0,c.Q3)("",!0)],512),[[m.aG,5===a.openStepIndex]])],2)):(0,c.Q3)("",!0),!a.item||!a.member||!a.member.identity&&n.requiresIdentityVerification||"new"===a.item.status||n.adhesionHasVideoFeature&&!a.item.hasVideo?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",wt,[(0,c.Lk)("div",_t,[(0,c.bF)(o,{icon:"fa-light fa-party-horn"})]),(0,c.Lk)("div",Et,(0,u.v_)(e.$t("Your adhesion has been sent successfully. You will be contacted by the local organization soon.")),1)])),(0,c.Lk)("div",$t,[e.tenant?.urlGDPR?((0,c.uX)(),(0,c.CE)("a",{key:0,href:e.tenant.urlGDPR,target:"_blank",class:"mr-4"},(0,u.v_)(e.$t("Privacy")),9,Ft)):e.tenant?((0,c.uX)(),(0,c.Wv)(l,{key:1,to:{name:"PrivacyTenantMember"},target:"_blank",class:"mr-4"},{default:(0,c.k6)(()=>
1[(0,c.eW)((0,u.v_)(e.$t("Privacy")),1)]),_:1})):(0,c.Q3)("",!0),e.tenant?.urlTerms?((0,c.uX)(),(0,c.CE)("a",{key:2,href:e.tenant.urlTerms,target:"_blank"},(0,u.v_)(e.$t("Terms")),9,Tt)):e.tenant?((0,c.uX)(),(0,c.Wv)(l,{key:3,to:{name:"TermsTenantMember"},target:"_blank"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Terms")),1)]),_:1})):(0,c.Q3)("",!0)])])])}i(18111),i(22489),i(20116),i(61701),i(14603),i(47566),i(98721);var At=i(71537),Pt=i(19378),It=i(48431),Mt=i(53369),xt=i(69133);const Nt={class:"video-recorder"},Ut={key:0,class:"has-text-centered"},Dt={key:0,class:"questions-preview mb-5"},Xt={class:"question-preview-number"},Vt={class:"has-text-weight-semibold is-size-6-half"},Rt={key:0,class:"question-description"},Ot={key:1,class:"native-app-recording-gate"},Qt={class:"notification is-light is-size-7 mb-4"},Bt=["href"],Gt={class:"icon is-small"},Wt={class:"icon is-small"},jt={class:"is-size-7 mt-3"},zt={class:"notification is-light is-size-7 mb-4"},qt={class:"icon is-small"},Jt={key:1,class:"has-text-centered p-5"},Ht={class:"is-size-7 mt-3"},Kt={key:2,class:"notification is-danger is-light is-size-7"},Yt={key:3,class:"questions-preview mb-4"},Zt={class:"question-preview-number"},ei={class:"has-text-weight-semibold is-size-6-half"},ti={key:0,class:"question-description"},ii={key:4,class:"video-container"},si={ref:"preview",class:"video-preview",autoplay:"",muted:"",playsinline:""},ai=["src"],ni={key:1,class:"question-overlay"},oi={class:"question-text has-text-weight-semibold"},li={key:0,class:"question-overlay-description"},ri={class:"question-counter is-size-7"},di={key:5,class:"has-text-centered mt-4"},ci={class:"is-size-7 has-text-danger has-text-weight-semibold ml-2"},ui={key:6,class:"buttons is-centered mt-4"},mi={class:"icon is-small"},pi={class:"icon is-small"},hi={class:"icon is-small"},gi={class:"icon is-small"},fi=["disabled"],bi={class:"icon is-small"};function yi(e,t,i,s,a,n){const o=(0,c.g2)("font-awesome-icon"),l=(0,c.g2)("b-loading");return(0,c.uX)(),(0,c.CE)("div",Nt,[a.stream||a.error||a.isRequestingCamera?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",Ut,[i.questions.length>0?((0,c.uX)(),(0,c.CE)("div",Dt,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.questions,(e,t)=>((0,c.uX)(),(0,c.CE)("div",{key:t,class:"question-preview-item has-text-left"},[(0,c.Lk)("span",Xt,(0,u.v_)(t+1),1),(0,c.Lk)("div",null,[(0,c.Lk)("span",Vt,(0,u.v_)(e.title),1),e.description?((0,c.uX)(),(0,c.CE)("p",Rt,(0,u.v_)(e.description),1)):(0,c.Q3)("",!0)])]))),128))])):(0,c.Q3)("",!0),n.isNativeAppRecordingBlocked?((0,c.uX)(),(0,c.CE)("div",Ot,[(0,c.Lk)("p",Qt,[(0,c.bF)(o,{icon:"fa-light fa-video",class:"mr-1"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Video recording is not available in the app. Continue in your browser to record your video.")),1)]),n.browserRecordingUrl?((0,c.uX)(),(0,c.CE)("a",{key:0,class:"button is-primary is-rounded",href:n.browserRecordingUrl},[(0,c.Lk)("span",Gt,[(0,c.bF)(o,{icon:"fa-light fa-arrow-up-right-from-square"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Continue in browser")),1)],8,Bt)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.Lk)("button",{class:"button is-primary is-rounded",onClick:t[0]||(t[0]=(...e)=>n.copyPageLink&&n.copyPageLink(...e))},[(0,c.Lk)("span",Wt,[(0,c.bF)(o,{icon:"fa-light fa-copy"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Copy page link")),1)]),(0,c.Lk)("p",jt,(0,u.v_)(e.$t("Open the copied link in your browser to record your video.")),1)],64))])):((0,c.uX)(),(0,c.CE)(c.FK,{key:2},[(0,c.Lk)("p",zt,[(0,c.bF)(o,{icon:"fa-light fa-video",class:"mr-1"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Your browser will ask for permission to use the camera and microphone.")),1)]),(0,c.Lk)("button",{class:"button is-primary is-rounded",onClick:t[1]||(t[1]=(...e)=>n.requestCamera&&n.requestCamera(...e))},[(0,c.Lk)("span",qt,[(0,c.bF)(o,{icon:"fa-light fa-video"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Start recording")),1)])],64))])),a.isRequestingCamera?((0,c.uX)(),(0,c.CE)("div",Jt,[(0,c.bF)(l,{"is-full-page":!1,active:!0}),(0,c.Lk)("p",Ht,(0,u.v_)(e.$t("Waiting for camera access...")),1)])):(0,c.Q3)("",!0),a.error?((0,c.uX)(),(0,c.CE)("div",Kt,[(0,c.Lk)("p",null,(0,u.v_)(a.error),1),(0,c.Lk)("button",{class:"button is-small is-rounded is-danger mt-3",onClick:t[2]||(t[2]=(...e)=>n.retry&&n.retry(...e))}
1,(0,u.v_)(e.$t("Try again")),1)])):(0,c.Q3)("",!0),a.stream&&!a.error&&!a.isRecording&&!a.recordedUrl&&i.questions.length>0?((0,c.uX)(),(0,c.CE)("div",Yt,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.questions,(e,t)=>((0,c.uX)(),(0,c.CE)("div",{key:"cam-q-"+t,class:"question-preview-item has-text-left"},[(0,c.Lk)("span",Zt,(0,u.v_)(t+1),1),(0,c.Lk)("div",null,[(0,c.Lk)("span",ei,(0,u.v_)(e.title),1),e.description?((0,c.uX)(),(0,c.CE)("p",ti,(0,u.v_)(e.description),1)):(0,c.Q3)("",!0)])]))),128))])):(0,c.Q3)("",!0),a.stream&&!a.error?((0,c.uX)(),(0,c.CE)("div",ii,[(0,c.bo)((0,c.Lk)("video",si,null,512),[[m.aG,!a.recordedUrl]]),a.recordedUrl?((0,c.uX)(),(0,c.CE)("video",{key:0,ref:"playback",class:"video-preview",src:a.recordedUrl,controls:"",playsinline:""},null,8,ai)):(0,c.Q3)("",!0),a.isRecording&&i.questions.length>0?((0,c.uX)(),(0,c.CE)("div",ni,[(0,c.Lk)("p",oi,(0,u.v_)(i.questions[a.currentQuestionIndex].title),1),i.questions[a.currentQuestionIndex].description?((0,c.uX)(),(0,c.CE)("p",li,(0,u.v_)(i.questions[a.currentQuestionIndex].description),1)):(0,c.Q3)("",!0),(0,c.Lk)("p",ri,(0,u.v_)(a.currentQuestionIndex+1)+" / "+(0,u.v_)(i.questions.length),1)])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.isRecording?((0,c.uX)(),(0,c.CE)("div",di,[t[8]||(t[8]=(0,c.Lk)("span",{class:"recording-indicator"},null,-1)),(0,c.Lk)("span",ci,(0,u.v_)(n.formattedDuration),1)])):(0,c.Q3)("",!0),a.stream&&!a.error?((0,c.uX)(),(0,c.CE)("div",ui,[a.isRecording||a.recordedUrl?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-primary is-rounded",onClick:t[3]||(t[3]=(...e)=>n.startRecording&&n.startRecording(...e))},[(0,c.Lk)("span",mi,[(0,c.bF)(o,{icon:"fa-light fa-circle"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Start recording")),1)])),a.isRecording?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-danger is-rounded",onClick:t[4]||(t[4]=(...e)=>n.stopRecording&&n.stopRecording(...e))},[(0,c.Lk)("span",pi,[(0,c.bF)(o,{icon:"fa-light fa-stop"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Stop recording")),1)])):(0,c.Q3)("",!0),a.isRecording&&i.questions.length>0&&a.currentQuestionIndex<i.questions.length-1?((0,c.uX)(),(0,c.CE)("button",{key:2,class:"button is-light is-rounded",onClick:t[5]||(t[5]=(...e)=>n.nextQuestion&&n.nextQuestion(...e))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Next question")),1),(0,c.Lk)("span",hi,[(0,c.bF)(o,{icon:"fa-light fa-arrow-right"})])])):(0,c.Q3)("",!0),a.recordedUrl&&!a.isUploading?((0,c.uX)(),(0,c.CE)("button",{key:3,class:"button is-light is-rounded",onClick:t[6]||(t[6]=(...e)=>n.retake&&n.retake(...e))},[(0,c.Lk)("span",gi,[(0,c.bF)(o,{icon:"fa-light fa-rotate-left"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Record again")),1)])):(0,c.Q3)("",!0),a.recordedUrl?((0,c.uX)(),(0,c.CE)("button",{key:4,class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.isUploading}]),disabled:a.isUploading,onClick:t[7]||(t[7]=(...e)=>n.upload&&n.upload(...e))},[(0,c.Lk)("span",bi,[(0,c.bF)(o,{icon:"fa-light fa-cloud-arrow-up"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Upload video")),1)],10,fi)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])}i(7588);var vi=i(40834),ki=i(28782),Ci={name:"VideoRecorder",props:{questions:{type:Array,default:()=>[]},adhesionId:{type:[Number,String],required:!0},maxDuration:{type:Number,default:300}},data(){return{stream:null,mediaRecorder:null,chunks:[],recordedBlob:null,recordedUrl:null,isRecording:!1,isUploading:!1,isRequestingCamera:!1,error:null,currentQuestionIndex:0,duration:0,durationInterval:null,mimeType:null,permissionStatus:null}},computed:{...(0,vi.L8)(["tenant"]),formattedDuration(){let e=Math.floor(this.duration/60),t=this.duration%60;return String(e).padStart(2,"0")+":"+String(t).padStart(2,"0")},isNativeAppRecordingBlocked(){const e=navigator.userAgent;return e.includes("orgo-app")&&!/orgo-app\/\d/.test(e)},browserRecordingUrl(){const e=this.tenant?.appHost;return e&&e!==window.location.hostname?"https://"+e+window.location.pathname+window.location.search:null}},mounted(){this.detectMimeType(),this.isNativeAppRecordingBlocked||this.watchCameraPermission()},beforeUnmount(){this.cleanup()},methods:{detectMimeType(){let e=["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm","video/mp4"];for(let t of e)if("undefined"!==typeof MediaRecorder&&MediaRecorder.isTypeSupp
1orted(t))return void(this.mimeType=t);this.mimeType="video/webm"},watchCameraPermission(){navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"camera"}).then(e=>{this.permissionStatus=e,e.onchange=()=>{"granted"!==e.state||this.stream||this.isRecording||this.requestCamera()}}).catch(()=>{})},retry(){window.location.reload()},copyPageLink(){const e=window.location.href;let t;if(navigator.clipboard&&navigator.clipboard.writeText)t=navigator.clipboard.writeText(e);else{let i=document.createElement("textarea");i.value=e,document.body.appendChild(i),i.select(),t=document.execCommand("copy")?Promise.resolve():Promise.reject(new Error("copy failed")),document.body.removeChild(i)}t.then(()=>{this.$buefy.toast.open({message:this.$t("Link copied"),type:"is-success"})}).catch(()=>{this.$buefy.toast.open({message:this.$t("Could not copy the link"),type:"is-danger"})})},requestCamera(){this.isNativeAppRecordingBlocked||(this.error=null,navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?(this.isRequestingCamera=!0,navigator.mediaDevices.getUserMedia({video:{facingMode:"user",width:{ideal:1280},height:{ideal:720}},audio:!0}).then(e=>{this.stream=e,this.isRequestingCamera=!1,this.$nextTick(()=>{this.$refs.preview&&(this.$refs.preview.srcObject=e),this.$el.scrollIntoView({behavior:"smooth",block:"start"})})}).catch(e=>{this.isRequestingCamera=!1,"NotAllowedError"===e.name?this.error=this.$t("Camera access denied. Please allow camera access in your browser settings and try again."):"NotFoundError"===e.name?this.error=this.$t("No camera found on this device."):this.error=this.$t("Could not access camera")+": "+e.message})):this.error=this.$t("Your browser does not support video recording"))},startRecording(){this.chunks=[],this.recordedBlob=null,this.recordedUrl=null,this.currentQuestionIndex=0,this.duration=0,this.mediaRecorder=new MediaRecorder(this.stream,{mimeType:this.mimeType}),this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.chunks.push(e.data)},this.mediaRecorder.onstop=()=>{this.mimeType.includes("mp4");let e=this.mimeType.includes("mp4")?"video/mp4":"video/webm";this.recordedBlob=new Blob(this.chunks,{type:e}),this.recordedUrl=URL.createObjectURL(this.recordedBlob),clearInterval(this.durationInterval)},this.mediaRecorder.start(1e3),this.isRecording=!0,this.durationInterval=setInterval(()=>{this.duration++,this.duration>=this.maxDuration&&this.stopRecording()},1e3)},stopRecording(){this.mediaRecorder&&"inactive"!==this.mediaRecorder.state&&this.mediaRecorder.stop(),this.isRecording=!1,clearInterval(this.durationInterval)},nextQuestion(){this.currentQuestionIndex<this.questions.length-1&&this.currentQuestionIndex++},retake(){this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl),this.recordedBlob=null,this.recordedUrl=null,this.chunks=[],this.duration=0,this.currentQuestionIndex=0,this.$nextTick(()=>{this.$refs.preview&&this.stream&&(this.$refs.preview.srcObject=this.stream)})},upload(){if(!this.recordedBlob)return;this.isUploading=!0;let e=this.mimeType.includes("mp4")?"mp4":"webm",t=this.mimeType.includes("mp4")?"video/mp4":"video/webm",i="adhesion_video_"+this.adhesionId+"_"+Date.now()+"."+e;this.$http.plain.get("/s3-upload?fileType="+t+"&fileName="+i+"&type=adhesionvideo").then(e=>{let i=new FormData;for(const[t,s]of Object.entries(e.data.additionalData))i.append(t,s);return i.append("Content-type",t),i.append("acl","public-read"),i.append("file",this.recordedBlob,e.data.newFileName),fetch(ki.ze+"/",{method:"POST",body:i}).then(i=>{if(200===i.status||204===i.status)return this.$http.plain.post("/adhesion/"+this.adhesionId+"/upload-video",{contentUrl:e.data.newFileName,fileMimeType:t,fileSize:this.recordedBlob.size}).then(e=>{this.$emit("uploaded",e.data)})})}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Video upload failed"),type:"is-danger"})}).finally(()=>{this.isUploading=!1})},cleanup(){this.permissionStatus&&(this.permissionStatus.onchange=null),this.stream&&this.stream.getTracks().forEach(e=>e.stop()),this.recordedUrl&&URL.revokeObjectURL(this.recordedUrl),clearInterval(this.durationInterval)}}},Li=i(66262);const wi=(0,Li.A)(Ci,[["render",yi],["__scopeId","data-v-70694d52"]]);var _i=wi;const Ei={class:"mb-5"},$i={class:"title"},Fi=["disabled"],Ti={key:0,class:"is-size-6-half mb-5 has-text-success is-italic"},Si={class:"adhesion-form-row"},Ai={key:1,class:"adhesion-form-row mt-5"},Pi={class:"adhesion-form-row mt-5"},Ii={class:"adhesion-form-row mt-5"},Mi={class:"is-flex"},xi={class:"mr-1"},Ni={key:5,class:"mt-5 mb-5 p-5 bg-grey"},Ui={key:1,class:"is-size-7 mb-6"},Di={key:6,class:"mt-5 mb-5 p-5 bg-grey social-profiles"},Xi={key:0,class:"mb-5"},Vi={class:"is-flex"},Ri={class:"mt-2"},Oi={key:1,class:"mb-5"},Qi={class:"is-flex"},Bi={class:"mt-2"},Gi={key:2,class:"mb-5"},Wi={class:"is-flex"},ji={class:"mt-2"},zi={key:3,class:"mb-5"},qi={class:"is-flex"},Ji={class:"mt-2"},Hi={key:4,class:"mb-5"},Ki={class:"is-flex"},Yi={class:"mt-2"},Zi={key:5,class:"mb-5"},es={class:"is-flex mb-5"},ts={class:"mt-2"},is=["value"],ss={key:0,class:"mt-5 mb-5 p-5 bg-grey"},as={key:3,class:"mt-5 mb-5 p-5 bg-grey"},ns=["disabled"];function os(e,t,i,s,a,n){const o=(0,c.g2)("OrgoLogo"),l=(0,c.g2)("b-loading"),r=(0,c.g2)("b-input"),d=(0,c.g2)("b-field"),p=(0,c.g2)("PhoneNumber"),h=(0,c.g2)("BirthdaySelect"),g=(0,c.g2)("b-radio"),f=(0,c.g2)("TownAutocomplete"),b=(0,c.g2)("MapLocationSelector"),y=(0,c.g2)("b-checkbox"),v=(0,c.g2)("b-select"),k=(0,c.g2)("ProfessionJobList"),C=(0,c.g2)("ProfessionIndustryList"),L=(0,c.g2)("Education"),w=(0,c.g2)("Certifications"),_=(0,c.g2)("ExperienceHistory"),E=(0,c.g2)("LocalCenterSelect"),$=(0,c.g2)("CustomFieldWidget"),F=(0,c.g2)("FeePriceSelector");return(0,c.uX)(),(0,c.CE)("div",{class:(0,u.C4)(n.isStandalone?"o-minwidth p-5 mb-6":"adhesion-form-embedded"),style:(0,u.Tr)(n.isStandalone&&e.$store.state.isIframe?"margin-left: 0.75rem; margin-right: 0.75rem":"")},[n.isStandalone?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("div",Ei,[(0,c.bF)(o)]),(0,c.Lk)("h2",$i,(0,u.v_)(e.$t("Adhesion form")),1),t[57]||(t[57]=(0,c.Lk)("hr",{class:"mb-5"},null,-1))],64)):(0,c.Q3)("",!0),(0,c.bF)(l,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),a.adhesionUserFields?((0,c.uX)(),(0,c.CE)("form",{key:1,class:"form-save",onSubmit:t[56]||(t[56]=(0,m.D$)((...e)=>n.save&&n.save(...e),["prevent"]))},[(0,c.Lk)("fieldset",{disabled:!n.isAdhesionStatusNew},[a.adhesionUserFields.includes("first_name")&&n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("p",Ti,(0,u.v_)(e.$t("Please complete the first and last name exactly as it appears on your ID document")),1)):(0,c.Q3)("",!0),(0,c.Lk)("div",Si,[a.adhesionUserFields.includes("first_name")?((0,c.uX)(),(0,c.Wv)(d,{key:0,label:e.$t("firstName"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("first_name")}
1),expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.firstName,"onUpdate:modelValue":t[1]||(t[1]=e=>a.firstName=e),type:"text",required:a.adhesionUserFieldsMandatory.includes("first_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("middle_name")?((0,c.uX)(),(0,c.Wv)(d,{key:1,label:e.$t("Middle name"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("middle_name")}),expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.middleName,"onUpdate:modelValue":t[2]||(t[2]=e=>a.middleName=e),type:"text",required:a.adhesionUserFieldsMandatory.includes("middle_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("last_name")?((0,c.uX)(),(0,c.Wv)(d,{key:2,label:e.$t("lastName"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("last_name")}),expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.lastName,"onUpdate:modelValue":t[3]||(t[3]=e=>a.lastName=e),type:"text",required:a.adhesionUserFieldsMandatory.includes("last_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)]),a.adhesionUserFields.includes("personal_id_number")||a.adhesionUserFields.includes("address")?((0,c.uX)(),(0,c.CE)("div",Ai,[a.adhesionUserFields.includes("personal_id_number")&&n.canWritePersonalId?((0,c.uX)(),(0,c.Wv)(d,{key:0,label:e.$t("Personal identification number"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("personal_id_number")&&!a.hasPersonalIdOnFile}),message:a.hasPersonalIdOnFile?e.$t("Already provided. Leave blank to keep it unchanged."):"",expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.personalIdNumber,"onUpdate:modelValue":t[4]||(t[4]=e=>a.personalIdNumber=e),type:"text",required:a.adhesionUserFieldsMandatory.includes("personal_id_number")&&!a.hasPersonalIdOnFile},null,8,["modelValue","required"])]),_:1},8,["label","class","message"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("address")?((0,c.uX)(),(0,c.Wv)(d,{key:1,label:e.$t("Address"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("address")}),expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.address,"onUpdate:modelValue":t[5]||(t[5]=e=>a.address=e),type:"text",required:a.adhesionUserFieldsMandatory.includes("address")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),(0,c.Lk)("div",Pi,[(0,c.bF)(d,{label:e.$t("Email"),class:(0,u.C4)({required:!0}),expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{type:"text",disabled:!0,value:a.email,required:!0},null,8,["value"])]),_:1},8,["label"]),a.adhesionUserFields.includes("phoneNumber")?((0,c.uX)(),(0,c.Wv)(p,{key:0,modelValue:a.phone,"onUpdate:modelValue":t[6]||(t[6]=e=>a.phone=e),"is-required":a.adhesionUserFieldsMandatory.includes("phoneNumber")},null,8,["modelValue","is-required"])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",Ii,[n.privateDateAccess&&a.adhesionUserFields.includes("personalNumber")?((0,c.uX)(),(0,c.Wv)(d,{key:0,label:e.$t("Personal number"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("personalNumber")}),expanded:""},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.personalNumber,"onUpdate:modelValue":t[7]||(t[7]=e=>a.personalNumber=e),required:a.adhesionUserFieldsMandatory.includes("personalNumber")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),n.privateDateAccess&&a.adhesionUserFields.includes("id_serial_number")?((0,c.uX)(),(0,c.Wv)(d,{key:1,label:e.$t("Id serial & number"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("id_serial_number")})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Mi,[(0,c.Lk)("div",xi,[(0,c.bF)(r,{modelValue:a.idSerial,"onUpdate:modelValue":t[8]||(t[8]=e=>a.idSerial=e),style:{width:"100px"},placeholder:e.$t("Serial")},null,8,["modelValue","placeholder"])]),(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.idNumber,"onUpdate:modelValue":t[9]||(t[9]=e=>a.idNumber=e),required:a.adhesionUserFieldsMandatory.includes("id_serial_number"),placeholder:e.$t("Number")},null,8,["modelValue","required","placeholder"])])])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)]),n.privateDateAccess&&a.adhesionUserFields.includes("birthday")?((0,c.uX)(),(0,c.Wv)(d,{key:2,class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(h,{modelValue:a.dateBirth,"onUpdate:modelValue":t[10]||(t[10]=e=>a.dateBirth=e),"is-required":a.adhesionUserFieldsMandatory.includes("birthday")},null,8,["modelValue","is-required"])]),_:1})):(0,c.Q3)("",!0),a.adhesionUserFields.includes("gender")?((0,c.uX)(),(0,c.Wv)(d,{key:3,class:(0,u.C4)(["mt-5",{required:a.adhesionUserFieldsMandatory.includes("gender")}]),label:e.$t("gender")},null,8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("gender")?((0,c.uX)(),(0,c.Wv)(d,{key:4,grouped:""},{default:(0,c.k6)(()=>[(0,c.bF)(g,{modelValue:a.gender,"onUpdate:modelValue":t[11]||(t[11]=e=>a.gender=e),"native-value":"f",name:"gender",required:a.adhesionUserFieldsMandatory.includes("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("female")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(g,{modelValue:a.gender,"onUpdate:modelValue":t[12]||(t[12]=e=>a.gender=e),"native-value":"m",name:"gender",required:a.adhesionUserFieldsMandatory.includes("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("male")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(g,{modelValue:a.gender,"onUpdate:modelValue":t[13]||(t[13]=e=>a.gender=e),"native-value":"n",name:"gender",required:a.adhesionUserFieldsMandatory.includes("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("other")),1)]),_:1},8,["modelValue","required"])]),_:1})):(0,c.Q3)("",!0),a.adhesionUserFields.includes("town_current")||a.adhesionUserFields.includes("address_street")?((0,c.uX)(),(0,c.CE)("div",Ni,[a.adhesionUserFields.includes("town_current")?((0,c.uX)(),(0,c.Wv)(f,{key:0,modelValue:a.townCurrent,"onUpdate:modelValue":[t[14]||(t[14]=e=>a.townCurrent=e),t[15]||(t[15]=e=>a.townCurrent=e)],label:e.$t("Town on the identity document"),town:a.townCurrent,"is-result-object":!0,"is-required":a.adhesionUserFieldsMandatory.includes("town_current")},null,8,["modelValue","label","town","is-required"])):(0,c.Q3)("",!0),a.item&&"new"===a.item.status?((0,c.uX)(),(0,c.CE)("p",Ui,(0,u.v_)(e.$t("townAutocompleteExplanation")),1)):(0,c.Q3)("",!0),a.adhesionUserFields.includes("map_location")?((0,c.uX)(),(0,c.Wv)(b,{key:2,modelValue:a.mapLocation,"onUpdate:modelValue":t[16]||(t[16]=e=>a.mapLocation=e),label:e.$t("Location on members map"),placeholder:e.$t("Location"),"is-required":a.adhesionUserFieldsMandatory.includes("map_location"),class:"mt-5"},null,8,["modelValue","label","placeholder","is-required"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("facebook")||a.adhesionUserFields.includes("linkedin")||a.adhesionUserFields.includes("twitter")||a.adhesionUserFields.includes("instagram")?((0,c.uX)(),(0,c.CE)("div",Di,[a.adhesionUserFields.includes("facebook")?((0,c.uX)(),(0,c.CE)("div",Xi,[(0,c.bF)(d,{label:e.$t("profileFacebook"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("facebook")})},null,8,["label","class"]),(0,c.Lk)("div",Vi,[(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.profileFacebook,"onUpdate:modelValue":t[17]||(t[17]=e=>a.profileFacebook=e),class:"socialInput",placeholder:"https://...",disabled:a.profileFacebookNot,required:a.adhesionUserFieldsMandatory.includes("facebook"),onBlur:t[18]||(t[18]=e=>n.trimSocial())},null,8,["modelValue","disabled","required"])]),(0,c.Lk)("div",Ri,[(0,c.bF)(y,{modelValue:a.profileFacebookNot,"onUpdate:modelValue":[t[19]||(t[19]=e=>a.profileFacebookNot=e),t[20]||(t[20]=e=>n.changeSocialProfile("facebook"))],class:"ml-5"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I don't have a profile")),1)]),_:1},8,["modelValue"])])])])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("twitter")?((0,c.uX)(),(0,c.CE)("div",Oi,[(0,c.bF)(d,{label:e.$t("profileTwitter"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("twitter")})},null,8,["label","class"]),(0,c.Lk)("div",Qi,[(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.profileTwitter,"onUpdate:modelValue":t[21]||(t[21]=e=>a.profileTwitter=e),class:"socialInput",placeholder:"https://...",disabled:a.profileTwitterNot,required:a.adhesionUserFieldsMandatory.includes("twitter"),onBlur:t[22]||(t[22]=e=>n.trimSocial())},null,8,["modelValue","disabled","required"])]),(0,c.Lk)("div",Bi,[(0,c.bF)(y,{modelValue:a.profileTwitterNot,"onUpdate:modelValue":[t[23]||(t[23]=e=>a.profileTwitterNot=e),t[24]||(t[24]=e=>n.changeSocialProfile("twitter"))],class:"ml-5"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I don't have a profile")),1)]),_:1},8,["modelValue"])])])])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("linkedin")?((0,c.uX)(),(0,c.CE)("div",Gi,[(0,c.bF)(d,{label:e.$t("profileLinkedin"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("linkedin")})},null,8,["label","class"]),(0,c.Lk)("div",Wi,[(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.profileLinkedin,"onUpdate:modelValue":t[25]||(t[25]=e=>a.profileLinkedin=e),class:"socialInput",placeholder:"https://...",disabled:a.profileLinkedinNot,required:a.adhesionUserFieldsMandatory.includes("linkedin"),onBlur:t[26]||(t[26]=e=>n.trimSocial())},null,8,["modelValue","disabled","required"])]),(0,c.Lk)("div",ji,[(0,c.bF)(y,{modelValue:a.profileLinkedinNot,"onUpdate:modelValue":[t[27]||(t[27]=e=>a.profileLinkedinNot=e),t[28]||(t[28]=e=>n.changeSocialProfile("linkedin"))],class:"ml-5"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I don't have a profile")),1)]),_:1},8,["modelValue"])])])])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("instagram")?((0,c.uX)(),(0,c.CE)("div",zi,[(0,c.bF)(d,{label:e.$t("profileInstagram"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("instagram")})},null,8,["label","class"]),(0,c.Lk)("div",qi,[(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.profileInstagram,"onUpdate:modelValue":t[29]||(t[29]=e=>a.profileInstagram=e),disabled:a.profileInstagramNot,class:"socialInput",placeholder:"https://...",required:a.adhesionUserFieldsMandatory.includes("instagram"),onBlur:t[30]||(t[30]=e=>n.trimSocial())},null,8,["modelValue","disabled","required"])]),(0,c.Lk)("div",Ji,[(0,c.bF)(y,{modelValue:a.profileInstagramNot,"onUpdate:modelValue":[t[31]||(t[31]=e=>a.profileInstagramNot=e),t[32]||(t[32]=e=>n.changeSocialProfile("instagram"))],class:"ml-5"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I don't have a profile")),1)]),_:1},8,["modelValue"])])])])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("telegram")?((0,c.uX)(),(0,c.CE)("div",Hi,[(0,c.bF)(d,{label:e.$t("profileTelegram"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("telegram")})},null,8,["label","class"]),(0,c.Lk)("div",Ki,[(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.profileTelegram,"onUpdate:modelValue":t[33]||(t[33]=e=>a.profileTelegram=e),disabled:a.profileTelegramNot,placeholder:"https://...",class:"socialInput",required:a.adhesionUserFieldsMandatory.includes("telegram"),onBlur:t[34]||(t[34]=e=>n.trimSocial())},null,8,["modelValue","disabled","required"])]),(0,c.Lk)("div",Yi,[(0,c.bF)(y,{modelValue:a.profileTelegramNot,"onUpdate:modelValue":[t[35]||(t[35]=e=>a.profileTelegramNot=e),t[36]||(t[36]=e=>n.changeSocialProfile("telegram"))],class:"ml-5"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I don't have a profile")),1)]),_:1},8,["modelValue"])])])])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("tiktok")?((0,c.uX)(),(0,c.CE)("div",Zi,[(0,c.bF)(d,{label:e.$t("profileTiktok"),
1class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("tiktok")})},null,8,["label","class"]),(0,c.Lk)("div",es,[(0,c.Lk)("div",null,[(0,c.bF)(r,{modelValue:a.profileTiktok,"onUpdate:modelValue":t[37]||(t[37]=e=>a.profileTiktok=e),placeholder:"https://...",class:"socialInput",disabled:a.profileTiktokNot,required:a.adhesionUserFieldsMandatory.includes("tiktok"),readonly:a.profileTiktokNot,onBlur:t[38]||(t[38]=e=>n.trimSocial())},null,8,["modelValue","disabled","required","readonly"])]),(0,c.Lk)("div",ts,[(0,c.bF)(y,{modelValue:a.profileTiktokNot,"onUpdate:modelValue":[t[39]||(t[39]=e=>a.profileTiktokNot=e),t[40]||(t[40]=e=>n.changeSocialProfile("tiktok"))],class:"ml-5"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I don't have a profile")),1)]),_:1},8,["modelValue"])])])])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("user_type")?((0,c.uX)(),(0,c.Wv)(d,{key:6,label:e.$t("userType"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("user_type")})},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.userType,"onUpdate:modelValue":t[41]||(t[41]=e=>a.userType=e),required:a.adhesionUserFieldsMandatory.includes("user_t
1ype")},{default:(0,c.k6)(()=>[t[58]||(t[58]=(0,c.Lk)("option",{value:null},"...",-1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.userTypes,e=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e["@id"]},[e?((0,c.uX)(),(0,c.CE)("option",{key:0,value:e["@id"]},(0,u.v_)(e.name),9,is)):(0,c.Q3)("",!0)],64))),128))]),_:1},8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],8,Fi),a.adhesionUserFields.includes("profession_industry")||a.adhesionUserFields.includes("profession_job")?((0,c.uX)(),(0,c.CE)("div",ss,[a.adhesionUserFields.includes("profession_expertise")?((0,c.uX)(),(0,c.Wv)(d,{key:0,label:e.$t("Profession expertise"),class:(0,u.C4)([{required:a.adhesionUserFieldsMandatory.includes("profession_expertise")},"mt-5 mb-5"])},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.professionExpertise,"onUpdate:modelValue":t[42]||(t[42]=e=>a.professionExpertise=e),"display-total":!1,"get-total":!1,type:"autocomplete","is-expertise":!0,"is-job":!1,required:a.adhesionUserFieldsMandatory.includes("profession_expertise")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFieldsMandatory.includes("profession_expertise")&&a.professionExpertise&&431===a.professionExpertise.id?((0,c.uX)(),(0,c.Wv)(r,{key:1,modelValue:a.professionExpertiseOther,"onUpdate:modelValue":t[43]||(t[43]=e=>a.professionExpertiseOther=e),placeholder:e.$t("Fill other option"),required:a.professionExpertise&&431===a.professionExpertise.id},null,8,["modelValue","placeholder","required"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("profession_job")?((0,c.uX)(),(0,c.Wv)(d,{key:2,label:e.$t("Profession job"),class:(0,u.C4)([{required:a.adhesionUserFieldsMandatory.includes("profession_job")},"mt-5 mb-5"])},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.professionJob,"onUpdate:modelValue":t[44]||(t[44]=e=>a.professionJob=e),"display-total":!1,"get-total":!1,type:"autocomplete","is-expertise":!1,"is-job":!0,required:a.adhesionUserFieldsMandatory.includes("profession_job")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("profession_headline")&&(!a.adhesionUserFieldsMandatory.includes("profession_job")||a.professionJob&&431===a.professionJob.id)?((0,c.uX)(),(0,c.Wv)(d,{key:3,label:e.$t(a.professionJob&&431===a.professionJob.id?"":"professionHeadline"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("profession_headline")||a.professionJob&&431===a.professionJob.id})},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.professionHeadline,"onUpdate:modelValue":t[45]||(t[45]=e=>a.professionHeadline=e),placeholder:e.$t("Fill other option"),required:a.adhesionUserFieldsMandatory.includes("profession_headline")||a.professionJob&&431===a.professionJob.id},null,8,["modelValue","placeholder","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("profession_sector")?((0,c.uX)(),(0,c.Wv)(d,{key:4,label:e.$t("Profession sector"),class:(0,u.C4)({"mt-5":!0,required:a.adhesionUserFieldsMandatory.includes("profession_sector")}),grouped:""},{default:(0,c.k6)(()=>[(0,c.bF)(g,{modelValue:a.professionSector,"onUpdate:modelValue":t[46]||(t[46]=e=>a.professionSector=e),"native-value":"public",name:"professionSector",required:a.adhesionUserFieldsMandatory.includes("profession_sector")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Public")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(g,{modelValue:a.professionSector,"onUpdate:modelValue":t[47]||(t[47]=e=>a.professionSector=e),"native-value":"private",name:"professionSector",required:a.adhesionUserFieldsMandatory.includes("profession_sector")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Private")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(g,{modelValue:a.professionSector,"onUpdate:modelValue":t[48]||(t[48]=e=>a.professionSector=e),"native-value":"ngo",name:"professionSector",required:a.adhesionUserFieldsMandatory.includes("profession_sector")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Non-governmental")),1)]),_:1},8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("profession_
1industry")?((0,c.uX)(),(0,c.Wv)(d,{key:5,label:e.$t("professionIndustry"),class:(0,u.C4)([{required:a.adhesionUserFieldsMandatory.includes("profession_industry")},"mt-5 mb-5"])},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.professionIndustry,"onUpdate:modelValue":t[49]||(t[49]=e=>a.professionIndustry=e),"display-total":!1,"get-total":!1,type:"autocomplete","is-rectangle":!0,"is-medium-size":!0,required:a.adhesionUserFieldsMandatory.includes("profession_industry")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("education_status")?((0,c.uX)(),(0,c.Wv)(L,{key:1,modelValue:a.education,"onUpdate:modelValue":t[50]||(t[50]=e=>a.education=e),"is-required":a.adhesionUserFieldsMandatory.includes("education_status"),class:(0,u.C4)([{required:a.adhesionUserFieldsMandatory.includes("education_status")},"mt-4 mb-5 p-5 bg-grey"]),item:a.item?a.item.user:null,disabled:!n.isAdhesionStatusNew},null,8,["modelValue","is-required","class","item","disabled"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("certification")?((0,c.uX)(),(0,c.Wv)(d,{key:2,label:e.$t("Certifications"),class:"mt-5 mb-5 p-5 bg-grey",item:a.item?a.item.user:null},{default:(0,c.k6)(()=>[(0,c.bF)(w,{item:a.item?a.item.user:null,disabled:!n.isAdhesionStatusNew,"is-required":a.adhesionUserFieldsMandatory.includes("certification")},null,8,["item","disabled","is-required"])]),_:1},8,["label","item"])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("experience_history")?((0,c.uX)(),(0,c.CE)("div",as,[(0,c.bF)(d,{label:e.$t("Have you ever been a party member in the past?"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("experience_history")})},{default:(0,c.k6)(()=>[(0,c.bF)(g,{modelValue:a.hasExperienceHistory,"onUpdate:modelValue":t[51]||(t[51]=e=>a.hasExperienceHistory=e),class:"mt-4 mb-4 mr-5",disabled:!n.isAdhesionStatusNew,"native-value":!0},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("yes")),1)]),_:1},8,["modelValue","disabled"]),(0,c.bF)(g,{modelValue:a.hasExperienceHistory,"onUpdate:modelValue":t[52]||(t[52]=e=>a.hasExperienceHistory=e),class:"mt-4 mb-4",disabled:!n.isAdhesionStatusNew,"native-value":!1},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("no")),1)]),_:1},8,["modelValue","disabled"])]),_:1},8,["label","class"]),a.hasExperienceHistory?((0,c.uX)(),(0,c.Wv)(_,{key:0,modelValue:a.experienceHistory,"onUpdate:modelValue":t[53]||(t[53]=e=>a.experienceHistory=e),item:a.item?a.item.user:null,disabled:!n.isAdhesionStatusNew,"is-required":a.adhesionUserFieldsMandatory.includes("experience_history")},null,8,["modelValue","item","disabled","is-required"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.adhesionUserFields.includes("local_center")?((0,c.uX)(),(0,c.Wv)(E,{key:4,modelValue:a.localCenter,"onUpdate:modelValue":t[54]||(t[54]=e=>a.localCenter=e),label:e.$t("Local center where i want to be active"),"local-centers":a.localCenters,"is-required":a.adhesionUserFieldsMandatory.includes("local_center"),class:"mt-5 mb-6",style:{"max-width":"415px"}},null,8,["modelValue","label","local-centers","is-required"])):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.customFields,e=>((0,c.uX)(),(0,c.CE)(c.FK,{key:"cf-"+e.id},[e&&a.adhesionCustomFields.includes(e.id)?((0,c.uX)(),(0,c.CE)("div",{key:0,class:(0,u.C4)({"bg-grey p-5 mb-6":n.hasConditionedField(e)})},[e.conditionedField?(0,c.Q3)("",!0):(0,c.bo)(((0,c.uX)(),(0,c.Wv)($,{key:0,modelValue:a.userCustomFieldsValues[e.id],"onUpdate:modelValue":[t=>a.userCustomFieldsValues[e.id]=t,t=>a.userCustomFieldsValues[e.id]=t],class:"mb-6",disabled:n.isCustomFieldReadonly(e),"is-required":a.adhesionCustomFieldsMandatory.includes(e.id)||n.isEnabledConditionedField(e),"custom-field-values":a.item&&a.item.user?a.item.user.customFieldValues:[],field:e,onPendingUpload:n.handlePendingUpload},null,8,["modelValue","onUpdate:modelValue","disabled","is-required","custom-field-values","field","onPendingUpload"])),[[m.aG,n.isAvailable(e)]]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.customFields,t=>((0,c.uX)(),(0,c.CE)(c.FK,{key:"conditioned_"+t.id},[t&&t.conditionedField&&t.conditionedField.id===e.id?(0,c.bo)(((0,c.uX)(),(0,c.Wv)($,{key:0,modelValue:a.userCustomFieldsValues[t.id],"onUpdate:modelValue":[e=>a.userCustomFieldsValues[t.id]=e,e=>
1a.userCustomFieldsValues[t.id]=e],class:"mb-6",disabled:n.isCustomFieldReadonly(t),"is-required":a.adhesionCustomFieldsMandatory.includes(t.id)||n.isEnabledConditionedField(t),"custom-field-values":a.item&&a.item.user?a.item.user.customFieldValues:[],field:t,onPendingUpload:n.handlePendingUpload},null,8,["modelValue","onUpdate:modelValue","disabled","is-required","custom-field-values","field","onPendingUpload"])),[[m.aG,n.isAvailable(t)]]):(0,c.Q3)("",!0)],64))),128))],2)):(0,c.Q3)("",!0)],64))),128)),a.adhesionUserFields.includes("fee_price")&&a.feeTenantProduct?((0,c.uX)(),(0,c.Wv)(d,{key:5,label:e.$t("Fee type"),class:(0,u.C4)({required:a.adhesionUserFieldsMandatory.includes("fee_price")})},{default:(0,c.k6)(()=>[(0,c.bF)(F,{modelValue:a.feePrice,"onUpdate:modelValue":t[55]||(t[55]=e=>a.feePrice=e),prices:a.feeTenantProduct.productPrices,selectable:n.isAdhesionStatusNew,"show-age-restrictions":!0,"user-birthdate":a.dateBirth,"is-required":a.adhesionUserFieldsMandatory.includes("fee_price")},null,8,["modelValue","prices","selectable","user-birthdate","is-required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),n.isAdhesionStatusNew?((0,c.uX)(),(0,c.CE)("button",{key:6,class:(0,u.C4)(["button is-success is-fullwidth mt-5",{"is-loading":e.$store.state.isLoadingButton}]),disabled:e.$store.state.isLoadingButton,type:"submit"},(0,u.v_)(e.$t("save")),11,ns)):(0,c.Q3)("",!0)],32)):(0,c.Q3)("",!0)],6)}const ls=["value"];function rs(e,t,i,s,a,n){const o=(0,c.g2)("b-select"),l=(0,c.g2)("b-input"),r=(0,c.g2)("b-field");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(r,{label:e.$t("phoneNumber"),class:(0,u.C4)(["mb-5",{required:i.isRequired}])},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.phoneCountry,"onUpdate:modelValue":[t[0]||(t[0]=e=>a.phoneCountry=e),t[1]||(t[1]=e=>a.phoneNumber=null)],disabled:i.disabled,style:{"max-width":"160px"}},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.countries.filter(e=>null!==e.p),e=>((0,c.uX)(),(0,c.CE)("option",{key:e.c,value:e.c},(0,u.v_)(e.n+" (+"+e.p+")"),9,ls))),128))]),_:1},8,["modelValue","disabled"]),(0,c.bF)(l,{modelValue:a.phoneNumber,"onUpdate:modelValue":[t[2]||(t[2]=e=>a.phoneNumber=e),n.emit],type:"tel",required:i.isRequired,disabled:!a.phoneCountry||i.disabled,placeholder:n.getPhonePlaceholder},null,8,["modelValue","required","disabled","placeholder","onUpdate:modelValue"])]),_:1},8,["label","class"])])}var ds=i(95256),cs={props:["isRequired","modelValue","disabled"],data(){return{phoneNumber:this.modelValue?this.modelValue.number:null,phoneCountry:this.modelValue?this.modelValue.country:null,countries:ds.Xr}},watch:{modelValue:function(e){this.phoneNumber=this.modelValue?this.modelValue.number:null,this.phoneCountry=this.modelValue?this.modelValue.country:null}},created(){this.initPhoneCountry()},methods:{initPhoneCountry(){if(!this.phoneCountry&&this.tenant.country){let e=this.countries.find(e=>e.v===this.tenant.country.id);this.phoneCountry=e?e.c:null}},emit(){this.$emit("update:modelValue",{country:this.phoneCountry,number:this.phoneNumber})}},computed:{...(0,vi.L8)(["tenant","user"]),getPhonePlaceholder(){let e=this.countries.find(e=>e.c===this.phoneCountry);return void 0!==e?e.s:""}},components:{}};const us=(0,Li.A)(cs,[["render",rs],["__scopeId","data-v-35be87a8"]]);var ms=us,ps=i(83806),hs=i(10097);const gs={key:0},fs=["value"],bs={key:2,class:"orgo-table-wrap"};function ys(e,t,i,s,a,n){const o=(0,c.g2)("b-autocomplete"),l=(0,c.g2)("b-select"),r=(0,c.g2)("b-field"),d=(0,c.g2)("b-checkbox"),m=(0,c.g2)("b-table-column"),p=(0,c.g2)("b-table");return a.industries?((0,c.uX)(),(0,c.CE)("section",gs,["autocomplete"===i.type?((0,c.uX)(),(0,c.Wv)(o,{key:0,modelValue:a.industrySearch,"onUpdate:modelValue":t[0]||(t[0]=e=>a.industrySearch=e),data:n.filteredIndustries,"open-on-focus":!0,"dropdown-position":"bottom",field:"display",expanded:!0,class:(0,u.C4)(i.required?"required":""),loading:a.isLoading,required:!!i.required,onSelect:n.change},null,8,["modelValue","data","class","loading","required","onSelect"])):(0,c.Q3)("",!0),"select"===i.type?((0,c.uX)(),(0,c.Wv)(r,{key:1,label:e.$t("Profession job"),class:(0,u.C4)(i.required?"required":"")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{"model-value":i.modelValue,"onUpdate:modelValue":n.change},{default:(0,c.k6)(()=>[t[3]||(t[3]=(0,c.Lk)("option",{value:null},"...",-1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.industries,e=>((0,c.uX)(),(0,c.CE)("option",{key:e["@id"],value:e["@id"]},(0,u.v_)(e.display),9,fs))),128))]),_:1},8,["model-value","onUpdate:modelValue"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),"table"===i.type||"table_selector"===i.type?((0,c.uX)(),(0,c.CE)("div",bs,[(0,c.bF)(p,{data:a.industries,"default-sort":"total","default-sort-direction":"DESC"},{default:(0,c.k6)(()=>["table_selector"===i.type?((0,c.uX)(),(0,c.Wv)(m,{key:0},{default:(0,c.k6)(i=>[(0,c.bF)(d,{modelValue:a.industriesSelected,"onUpdate:modelValue":[t[1]||(t[1]=e=>a.industriesSelected=e),t[2]||(t[2]=t=>e.$emit("update:modelValue",a.industriesSelected))],"native-value":i.row.id},null,8,["modelValue","native-value"])]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(m,{label:e.$t("total"),sortable:"",field:"total"},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.total),1)]),_:1},8,["label"]),(0,c.bF)(m,{label:e.$t("title"),sortable:"",field:"value"},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.display),1)]),_:1},8,["label"])]),_:1},8,["data"])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)}const vs=[{"@id":"/api/v1/profession_jobs/431","@type":"ProfessionJob",id:431,isJob:!0,isExpertise:!0,translation:{en:"- other -",ro:"- alta -"}},{"@id":"/api/v1/profession_jobs/1","@type":"ProfessionJob",id:1,isJob:!0,isExpertise:!1,translation:{en:"absolvent învÄÈÄmânt preuniversitar fÄrÄ atestat profesional",ro:"absolvent învÄÈÄmânt preuniversitar fÄrÄ atestat profesional"}},{"@id":"/api/v1/profession_jobs/2","@type":"ProfessionJob",id:2,isJob:!0,isExpertise:!1,translation:{en:"actor",ro:"actor"}},{"@id":"/api/v1/profession_jobs/3","@type":"ProfessionJob",id:3,isJob:!0,isExpertise:!1,translation:{en:"administrator",ro:"administrator"}},{"@id":"/api/v1/profession_jobs/432","@type":"ProfessionJob",id:432,isJob:!0,isExpertise:!1,translation:{en:"adminstrator de sistem",ro:"adminstrator de sistem"}},{"@id":"/api/v1/profession_jobs/4","@type":"ProfessionJob",id:4,isJob:!0,isExpertise:!1,translation:{en:"agent comercial",ro:"agent comercial"}},{"@id":"/api/v1/profession_jobs/407","@type":"ProfessionJob",id:407,isJob:null,isExpertise:!0,translation:{en:"agent conducÄtori câini de serviciu",ro:"agent conducÄtori câini de serviciu"}},{"@id":"/api/v1/profession_jobs/408","@type":"ProfessionJob",id:408,isJob:null,isExpertise:!0,translation:{en:"agent control acces",ro:"agent control acces"}},{"@id":"/api/v1/profession_jobs/5","@type":"ProfessionJob",id:5,isJob:!0,isExpertise:!1,translation:{en:"agent de asigurare",ro:"agent de asigurare"}},{"@id":"/api/v1/profession_jobs/433","@type":"ProfessionJob",id:433,isJob:!0,isExpertise:!1,translation:{en:"agent de interventi",ro:"agent de interventi"}},{"@id":"/api/v1/profession_jobs/411","@type":"ProfessionJob",id:411,isJob:null,isExpertise:!0,translation:{en:"agent de intervenÅ£ie pazÄ Åi ordine",ro:"agent de intervenÅ£ie pazÄ Åi ordine"}},{"@id":"/api/v1/profession_jobs/396","@type":"ProfessionJob",id:396,isJob:null,isExpertise:!0,translation:{en:"agent de securitate",ro:"agent de securitate"}},{"@id":"/api/v1/profession_jobs/409","@type":"ProfessionJob",id:409,isJob:null,isExpertise:!0,translation:{en:"agent de securitate incinte",ro:"agent de securitate incinte"}},{"@id":"/api/v1/profession_jobs/6","@type":"ProfessionJob",id:6,isJob:!0,isExpertise:!1,translation:{en:"agent fiscal",ro:"agent fiscal"}},{"@id":"/api/v1/profession_jobs/410","@type":"ProfessionJob",id:410,isJob:null,isExpertise:!0,translation:{en:"agent gardÄ de corp",ro:"agent gardÄ de corp"}},{"@id":"/api/v1/profession_jobs/7","@type":"ProfessionJob",id:7,isJob:!0,isExpertise:!1,translation:{en:"agent orientare profesionala a somerilor",ro:"agent orientare profesionala a somerilor"}},{"@id":"/api/v1/profession_jobs/8","@type":"ProfessionJob",id:8,isJob:!0,isExpertise:!1,translation:{en:"agent paza si ordine",ro:"agent paza si ordine"}},{"@id":"/api/v1/profession_jobs/9","@type":"ProfessionJob",id:9,isJob:!0,isExpertise:!1,translation:{en:"agent postal",ro:"agent postal"}},{"@id":"/api/v1/profession_jobs/412","@type":"ProfessionJob",id:412,isJob:null,isExpertise:!0,translation:{en:"agent transport valori",ro:"agent transport valori"}},{"@id":"/api/v1/profession_jobs/434","@type":"ProfessionJob",id:434,isJob:!0,isExpertise:!1,translation:{en:"agent turism",ro:"agent turism"}},{"@id":"/api/v1/profession_jobs/435","@type":"ProfessionJob",id:435,isJob:!0,isExpertise:!1,translation:{en:"agent vanzari",ro:"agent vanzari"}},{"@id":"/api/v1/profession_jobs/10","@type":"ProfessionJob",id:10,isJob:!0,isExpertise:!1,translation:{en:"agricultor",ro:"agricultor"}},{"@id":"/api/v1/profession_jobs/369","@type":"ProfessionJob",id:369,isJob:null,isExpertise:!0,translation:{en:"ajutor ofiÅ£er mecanic",ro:"ajutor ofiÅ£er mecanic"}},{"@id":"/api/v1/profession_jobs/11","@type":"ProfessionJob",id:11,isJob:!0,isExpertise:!1,translation:{en:"AMC-ist",ro:"AMC-ist"}},{"@id":"/api/v1/profession_jobs/12","@type":"ProfessionJob",id:12,isJob:!0,isExpertise:!1,translation:{en:"analist",ro:"analist"}},{"@id":"/api/v1/profession_jobs/436","@type":"ProfessionJob",id:436,isJob:!0,isExpertise:!1,translation:{en:"analist business",ro:"analist business"}},{"@id":"/api/v1/profession_jobs/437","@type":"ProfessionJob",id:437,isJob:!0,isExpertise:!1,translation:{en:"analist date",ro:"analist date"}},{"@id":"/api/v1/profession_jobs/438","@type":"ProfessionJob",id:438,isJob:!0,isExpertise:!1,translation:{en:"analist financiar",ro:"analist financiar"}},{"@id":"/api/v1/profession_jobs/439","@type":"ProfessionJob",id:439,isJob:!0,isExpertise:!1,translation:{en:"analist it",ro:"analist it"}},{"@id":"/api/v1/profession_jobs/13","@type":"ProfessionJob",id:13,isJob:!0,isExpertise:!1,translation:{en:"anchetator politie",ro:"anchetator politie"}},{"@id":"/api/v1/profession_jobs/14","@type":"ProfessionJob",id:14,isJob:!0,isExpertise:!1,translation:{en:"animator socio-educativ",ro:"animator socio-educativ"}},{"@id":"/api/v1/profession_jobs/15","@type":"ProfessionJob",id:15,isJob:!0,isExpertise:!1,translation:{en:"anticar",ro:"anticar"}},{"@id":"/api/v1/profession_jobs/16","@type":"ProfessionJob",id:16,isJob:!0,isExpertise:!0,translation:{en:"antrenor",ro:"antrenor"}},{"@id":"/api/v1/profession_jobs/17","@type":"ProfessionJob",id:17,isJob:!0,isExpertise:!1,translation:{en:"antrenor de fotbal profesionist",ro:"antrenor de fotbal profesionist"}},{"@id":"/api/v1/profession_jobs/18","@type":"ProfessionJob",id:18,isJob:!0,isExpertise:!1,translation:{en:"antrenor federatie sportiva",ro:"antrenor federatie sportiva"}},{"@id":"/api/v1/profession_jobs/440","@type":"ProfessionJob",id:440,isJob:!0,isExpertise:!1,translation:{en:"antreprenor",ro:"antreprenor"}},{"@id":"/api/v1/profession_jobs/19","@type":"ProfessionJob",id:19,isJob:!0,isExpertise:!1,translation:{en:"antreprenor servicii funerare",ro:"antreprenor servicii funerare"}},{"@id":"/api/v1/profession_jobs/20","@type":"ProfessionJob",id:20,isJob:!0,isExpertise:!1,translation:{en:"apicultor",ro:"apicultor"}},{"@id":"/api/v1/profession_jobs/21","@type":"ProfessionJob",id:21,isJob:!0,isExpertise:!1,translation:{en:"aplicator de detalii la produse din ceramica",ro:"aplicator de detalii la produse din ceramica"}},{"@id":"/api/v1/profession_jobs/22","@type":"ProfessionJob",id:22,isJob:!0,isExpertise:!1,translation:{en:"aprod",ro:"aprod"}},{"@id":"/api/v1/profession_jobs/23","@type":"ProfessionJob",id:23,isJob:!0,isExpertise:!1,translation:{en:"arboricultor",ro:"arboricultor"}},{"@id":"/api/v1/profession_jobs/24","@type":"ProfessionJob",id:24,isJob:!0,isExpertise:!1,translation:{en:"argintar",ro:"argintar"}},{"@id":"/api/v1/profession_jobs/441","@type":"ProfessionJob",id:441,isJob:!0,isExpertise:!1,translation:{en:"arhitect",ro:"arhitect"}},{"@id":"/api/v1/profession_jobs/442","@type":"ProfessionJob",id:442,isJob:!0,isExpertise:!1,translation:{en:"arhitect aplicatii web",ro:"arhitect aplicatii web"}},{"@id":"/api/v1/profession_jobs/25","@type":"ProfessionJob",id:25,isJob:!0,isExpertise:!1,translation:{en:"arhitect cladiri",ro:"arhitect cladiri"}},{"@id":"/api/v1/profession_jobs/26","@type":"ProfessionJob",id:26,isJob:!0,isExpertise:!1,translation:{en:"arhitect urbanism, peisagistica si amenajarea teritoriului",ro:"arhitect urbanism, peisagistica si amenajarea teritoriului"}},{"@id":"/api/v1/profession_jobs/27","@type":"ProfessionJob",id:27,isJob:!0,isExpertise:!1,translation:{en:"arhitect-restaurari",ro:"arhitect-restaurari"}},{"@id":"/api/v1/profession_jobs/28","@type":"ProfessionJob",id:28,isJob:!0,isExpertise:!0,translation:{en:"arhivar",ro:"arhivar"}},{"@id":"/api/v1/profession_jobs/29","@type":"ProfessionJob",id:29,isJob:!0,isExpertise:!1,translation:{en:"arhivar notariat",ro:"arhivar notariat"}}
1,{"@id":"/api/v1/profession_jobs/310","@type":"ProfessionJob",id:310,isJob:null,isExpertise:!0,translation:{en:"arhivist",ro:"arhivist"}},{"@id":"/api/v1/profession_jobs/30","@type":"ProfessionJob",id:30,isJob:!0,isExpertise:!1,translation:{en:"armurier",ro:"armurier"}},{"@id":"/api/v1/profession_jobs/415","@type":"ProfessionJob",id:415,isJob:null,isExpertise:!0,translation:{en:"artificier",ro:"artificier"}},{"@id":"/api/v1/profession_jobs/443","@type":"ProfessionJob",id:443,isJob:!0,isExpertise:!1,translation:{en:"artist",ro:"artist"}},{"@id":"/api/v1/profession_jobs/31","@type":"ProfessionJob",id:31,isJob:!0,isExpertise:!1,translation:{en:"artist circ",ro:"artist circ"}},{"@id":"/api/v1/profession_jobs/32","@type":"ProfessionJob",id:32,isJob:!0,isExpertise:!1,translation:{en:"artist liric",ro:"artist liric"}},{"@id":"/api/v1/profession_jobs/33","@type":"ProfessionJob",id:33,isJob:!0,isExpertise:!1,translation:{en:"artist plastic",ro:"artist plastic"}},{"@id":"/api/v1/profession_jobs/34","@type":"ProfessionJob",id:34,isJob:!0,isExpertise:!1,translation:{en:"arzator produse ceramice",ro:"arzator produse ceramice"}},{"@id":"/api/v1/profession_jobs/35","@type":"ProfessionJob",id:35,isJob:!0,isExpertise:!1,translation:{en:"arzator produse din sticla",ro:"arzator produse din sticla"}},{"@id":"/api/v1/profession_jobs/36","@type":"ProfessionJob",id:36,isJob:!0,isExpertise:!1,translation:{en:"asamblator montator articole marochinarie",ro:"asamblator montator articole marochinarie"}},{"@id":"/api/v1/profession_jobs/37","@type":"ProfessionJob",id:37,isJob:!0,isExpertise:!1,translation:{en:"asamblor articole de sport",ro:"asamblor articole de sport"}},{"@id":"/api/v1/profession_jobs/38","@type":"ProfessionJob",id:38,isJob:!0,isExpertise:!1,translation:{en:"asamblor biciclete",ro:"asamblor biciclete"}},{"@id":"/api/v1/profession_jobs/39","@type":"ProfessionJob",id:39,isJob:!0,isExpertise:!1,translation:{en:"asamblor jucarii",ro:"asamblor jucarii"}},{"@id":"/api/v1/profession_jobs/40","@type":"ProfessionJob",id:40,isJob:!0,isExpertise:!1,translation:{en:"ascutitor scule, instrumente medicale si obiecte de uz casnic",ro:"ascutitor scule, instrumente medicale si obiecte de uz casnic"}},{"@id":"/api/v1/profession_jobs/41","@type":"ProfessionJob",id:41,isJob:!0,isExpertise:!1,translation:{en:"asfaltator",ro:"asfaltator"}},{"@id":"/api/v1/profession_jobs/42","@type":"ProfessionJob",id:42,isJob:!0,isExpertise:!1,translation:{en:"asistent de nutritie",ro:"asistent de nutritie"}},{"@id":"/api/v1/profession_jobs/43","@type":"ProfessionJob",id:43,isJob:!0,isExpertise:!1,translation:{en:"asistent farmacist",ro:"asistent farmacist"}},{"@id":"/api/v1/profession_jobs/421","@type":"ProfessionJob",id:421,isJob:null,isExpertise:!0,translation:{en:"asistent maternal",ro:"asistent maternal"}},{"@id":"/api/v1/profession_jobs/303","@type":"ProfessionJob",id:303,isJob:null,isExpertise:!0,translation:{en:"asistent medical",ro:"asistent medical"}},{"@id":"/api/v1/profession_jobs/44","@type":"ProfessionJob",id:44,isJob:!0,isExpertise:!1,translation:{en:"asistent medical fizioterapie",ro:"asistent medical fizioterapie"}},{"@id":"/api/v1/profession_jobs/45","@type":"ProfessionJob",id:45,isJob:!0,isExpertise:!1,translation:{en:"asistent medical generalist",ro:"asistent medical generalist"}},{"@id":"/api/v1/profession_jobs/420","@type":"ProfessionJob",id:420,isJob:null,isExpertise:!0,translation:{en:"asistent personal",ro:"asistent personal"}},{"@id":"/api/v1/profession_jobs/419","@type":"ProfessionJob",id:419,isJob:null,isExpertise:!0,translation:{en:"asistent personal profesionist",ro:"asistent personal profesionist"}},{"@id":"/api/v1/profession_jobs/47","@type":"ProfessionJob",id:47,isJob:!0,isExpertise:!0,translation:{en:"asistent social",ro:"asistent social"}},{"@id":"/api/v1/profession_jobs/46","@type":"ProfessionJob",id:46,isJob:!0,isExpertise:!1,translation:{en:"asistent social nivel mediu",ro:"asistent social nivel mediu"}},{"@id":"/api/v1/profession_jobs/48","@type":"ProfessionJob",id:48,isJob:!0,isExpertise:!1,translation:{en:"asistent universitar",ro:"asistent universitar"}},{"@id":"/api/v1/profession_jobs/49","@type":"ProfessionJob",id:49,isJob:!0,isExpertise:!0,translation:{en:"asistent veterinar",ro:"asistent veterinar"}},{"@id":"/api/v1/profession_jobs/50","@type":"ProfessionJob",id:50,isJob:!0,isExpertise:!1,translation:{en:"asistenta puericultura",ro:"asistenta puericultura"}},{"@id":"/api/v1/profession_jobs/51","@type":"ProfessionJob",id:51,isJob:!0,isExpertise:!1,translation:{en:"astrolog",ro:"astrolog"}},{"@id":"/api/v1/profession_jobs/444","@type":"ProfessionJob",id:444,isJob:!0,isExpertise:!1,translation:{en:"auditor",ro:"auditor"}},{"@id":"/api/v1/profession_jobs/344","@type":"ProfessionJob",id:344,isJob:null,isExpertise:!0,translation:{en:"auditor de evaluare de impact de siguranÅ£Ä rutierÄ",ro:"auditor de evaluare de impact de siguranÅ£Ä rutierÄ"}},{"@id":"/api/v1/profession_jobs/339","@type":"ProfessionJob",id:339,isJob:null,isExpertise:!0,translation:{en:"auditor de securitate a aviaÅ£iei civile",ro:"auditor de securitate a aviaÅ£iei civile"}},{"@id":"/api/v1/profession_jobs/343","@type":"ProfessionJob",id:343,isJob:null,isExpertise:!0,translation:{en:"auditor de siguranÅ£Ä rutierÄ",ro:"auditor de siguranÅ£Ä rutierÄ"}},{"@id":"/api/v1/profession_jobs/294","@type":"ProfessionJob",id:294,isJob:null,isExpertise:!0,translation:{en:"auditor energetic pentru clÄdiri",ro:"auditor energetic pentru clÄdiri"}},{"@id":"/api/v1/profession_jobs/285","@type":"ProfessionJob",id:285,isJob:null,isExpertise:!0,translation:{en:"auditor financiar",ro:"auditor financiar"}},{"@id":"/api/v1/profession_jobs/52","@type":"ProfessionJob",id:52,isJob:!0,isExpertise:!0,translation:{en:"avocat",ro:"avocat"}},{"@id":"/api/v1/profession_jobs/53","@type":"ProfessionJob",id:53,isJob:!0,isExpertise:!1,translation:{en:"baby sitter",ro:"baby sitter"}},{"@id":"/api/v1/profession_jobs/54","@type":"ProfessionJob",id:54,isJob:!0,isExpertise:!1,translation:{en:"balerin",ro:"balerin"}},{"@id":"/api/v1/profession_jobs/55","@type":"ProfessionJob",id:55,isJob:!0,isExpertise:!1,translation:{en:"barman",ro:"barman"}},{"@id":"/api/v1/profession_jobs/56","@type":"ProfessionJob",id:56,isJob:!0,isExpertise:!1,translation:{en:"betonist",ro:"betonist"}},{"@id":"/api/v1/profession_jobs/57","@type":"ProfessionJob",id:57,isJob:!0,isExpertise:!1,translation:{en:"bibliograf",ro:"bibliograf"}},{"@id":"/api/v1/profession_jobs/58","@type":"ProfessionJob",id:58,isJob:!0,isExpertise:!1,translation:{en:"bibliotecar cu studii superioare",ro:"bibliotecar cu studii superioare"}},{"@id":"/api/v1/profession_jobs/59","@type":"ProfessionJob",id:59,isJob:!0,isExpertise:!1,translation:{en:"bijutier",ro:"bijutier"}},{"@id":"/api/v1/profession_jobs/60","@type":"ProfessionJob",id:60,isJob:!0,isExpertise:!1,translation:{en:"biochimist",ro:"biochimist"}},{"@id":"/api/v1/profession_jobs/300","@type":"ProfessionJob",id:300,isJob:null,isExpertise:!0,translation:{en:"biochimist în sistemul sanitar",ro:"biochimist în sistemul sanitar"}},{"@id":"/api/v1/profession_jobs/61","@type":"ProfessionJob",id:61,isJob:!0,isExpertise:!1,translation:{en:"bioenergetician",ro:"bioenergetician"}},{"@id":"/api/v1/profession_jobs/445","@type":"ProfessionJob",id:445,isJob:!0,isExpertise:!1,translation:{en:"bioinginer",ro:"bioinginer"}},{"@id":"/api/v1/profession_jobs/62","@type":"ProfessionJob",id:62,isJob:!0,isExpertise:!1,translation:{en:"biolog",ro:"biolog"}},{"@id":"/api/v1/profession_jobs/301","@type":"ProfessionJob",id:301,isJob:null,isExpertise:!0,translation:{en:"biolog în sistemul sanitar",ro:"biolog în sistemul sanitar"}},{"@id":"/api/v1/profession_jobs/63","@type":"ProfessionJob",id:63,isJob:!0,isExpertise:!1,translation:{en:"blanar- confectioner îmbracaminte din blana, dupa comanda",ro:"blanar- confectioner îmbracaminte din blana, dupa comanda"}},{"@id":"/api/v1/profession_jobs/64","@type":"ProfessionJob",id:64,isJob:!0,isExpertise:!1,translation:{en:"bobinator",ro:"bobinator"}},{"@id":"/api/v1/profession_jobs/424","@type":"ProfessionJob",id:424,isJob:null,isExpertise:!0,translation:{en:"bonÄ",ro:"bonÄ"}},{"@id":"/api/v1/profession_jobs/65","@type":"ProfessionJob",id:65,isJob:!0,isExpertise:!1,translation:{en:"brancardier",ro:"brancardier"}},{"@id":"/api/v1/profession_jobs/66","@type":"ProfessionJob",id:66,isJob:!0,isExpertise:!1,translation:{en:"brichetator carbune",ro:"brichetator carbune"}},{"@id":"/api/v1/profession_jobs/67","@type":"ProfessionJob",id:67,isJob:!0,isExpertise:!1,translation:{en:"brigadier silvic",ro:"brigadier silvic"}},{"@id":"/api/v1/profession_jobs/68","@type":"ProfessionJob",id:68,isJob:!0,isExpertise:!1,translation:{en:"broker",ro:"broker"}},{"@id":"/api/v1/profession_jobs/69","@type":"ProfessionJob",id:69,isJob:!0,isExpertise:!1,translation:{en:"broker imobiliar",ro:"broker imobiliar"}},{"@id":"/api/v1/profession_jobs/70","@type":"ProfessionJob",id:70,isJob:!0,isExpertise:!1,translation:{en:"broker marfuri",ro:"broker marfuri"}},{"@id":"/api/v1/profession_jobs/71","@type":"ProfessionJob",id:71,isJob:!0,isExpertise:!1,translation:{en:"broker valori (cambist)",ro:"broker valori (cambist)"}},{"@id":"/api/v1/profession_jobs/72","@type":"ProfessionJob",id:72,isJob:!0,isExpertise:!1,translation:{en:"brutar",ro:"brutar"}},{"@id":"/api/v1/profession_jobs/73","@type":"ProfessionJob",id:73,isJob:!0,isExpertise:!1,translation:{en:"bucatar",ro:"bucatar"}},{"@id":"/api/v1/profession_jobs/446","@type":"ProfessionJob",id:446,isJob:!0,isExpertise:!1,translation:{en:"business analyst",ro:"business analyst"}},{"@id":"/api/v1/profession_jobs/447","@type":"ProfessionJob",id:447,isJob:!0,isExpertise:!1,translation:{en:"business developer",ro:"business developer"}},{"@id":"/api/v1/profession_jobs/74","@type":"ProfessionJob",id:74,isJob:!0,isExpertise:!1,translation:{en:"cabanier",ro:"cabanier"}},{"@id":"/api/v1/profession_jobs/75","@type":"ProfessionJob",id:75,isJob:!0,isExpertise:!1,translation:{en:"cablator frânghii",ro:"cablator frânghii"}},{"@id":"/api/v1/profession_jobs/448","@type":"ProfessionJob",id:448,isJob:!0,isExpertise:!1,translation:{en:"cadru didactic",ro:"cadru didactic"}},{"@id":"/api/v1/profession_jobs/290","@type":"ProfessionJob",id:290,isJob:null,isExpertise:!0,translation:{en:"cadru didactic învÄÅ£Ämânt preuniversitar",ro:"cadru didactic învÄÅ£Ämânt preuniversitar"}},{"@id":"/api/v1/profession_jobs/76","@type":"ProfessionJob",id:76,isJob:!0,isExpertise:!1,translation:{en:"calcatoreasa lenjerie",ro:"calcatoreasa lenjerie"}},{"@id":"/api/v1/profession_jobs/77","@type":"ProfessionJob",id:77,isJob:!0,isExpertise:!1,translation:{en:"cambist (broker valori)",ro:"cambist (broker valori)"}},{"@id":"/api/v1/profession_jobs/78","@type":"ProfessionJob",id:78,isJob:!0,isExpertise:!1,translation:{en:"camerista hotel",ro:"camerista hotel"}},{"@id":"/api/v1/profession_jobs/79","@type":"ProfessionJob",id:79,isJob:!0,isExpertise:!1,translation:{en:"camionagiu",ro:"camionagiu"}},{"@id":"/api/v1/profession_jobs/95","@type":"ProfessionJob",id:95,isJob:!0,isExpertise:!1,translation:{en:"cântaret",ro:"cântaret"}},{"@id":"/api/v1/profession_jobs/80","@type":"ProfessionJob",id:80,isJob:!0,isExpertise:!1,translation:{en:"cantonier",ro:"cantonier"}},{"@id":"/api/v1/profession_jobs/81","@type":"ProfessionJob",id:81,isJob:!0,isExpertise:!1,translation:{en:"cap de masa (cazinou)",ro:"cap de masa (cazinou)"}},{"@id":"/api/v1/profession_jobs/82","@type":"ProfessionJob",id:82,isJob:!0,isExpertise:!1,translation:{en:"capelan",ro:"capelan"}},{"@id":"/api/v1/profession_jobs/372","@type":"ProfessionJob",id:372,isJob:null,isExpertise:!0,translation:{en:"cÄpitan fluvial categoria A",ro:"cÄpitan fluvial categoria A"}},{"@id":"/api/v1/profession_jobs/373","@type":"ProfessionJob",id:373,isJob:null,isExpertise:!0,translation:{en:"cÄpitan fluvial categoria B",ro:"cÄpitan fluvial categoria B"}},{"@id":"/api/v1/profession_jobs/83","@type":"ProfessionJob",id:83,isJob:!0,isExpertise:!1,translation:{en:"capitan nava maritima si fluviala",ro:"capitan nava maritima si fluviala"}},{"@id":"/api/v1/profession_jobs/84","@type":"ProfessionJob",id:84,isJob:!0,isExpertise:!1,translation:{en:"capitan port",ro:"capitan port"}},{"@id":"/api/v1/profession_jobs/353","@type":"ProfessionJob",id:353,isJob:null,isExpertise:!0,translation:{en:"cÄpitan portuar",ro:"cÄpitan portuar"}},{"@id":"/api/v1/profession_jobs/85","@type":"ProfessionJob",id:85,isJob:!0,isExpertise:!1,translation:{en:"capitan secund",ro:"capitan secund"}},{"@id":"/api/v1/profession_jobs/86","@type":"ProfessionJob",id:86,isJob:!0,isExpertise:!1,translation:{en:"capitan sef port",ro:"capitan sef port"}},{"@id":"/api/v1/profession_jobs/87","@type":"ProfessionJob",id:87,isJob:!0,isExpertise:!1,translation:{en:"caraus",ro:"caraus"}},{"@id":"/api/v1/profession_jobs/88","@type":"ProfessionJob",id:88,isJob:!0,isExpertise:!1,translation:{en:"caricaturist",ro:"caricaturist"}},{"@id":"/api/v1/profession_jobs/89","@type":"ProfessionJob",id:89,isJob:!0,isExpertise:!1,translation:{en:"caricaturist (studii superioare)",ro:"caricaturist (studii superioare)"}},{"@id":"/api/v1/profession_jobs/90","@type":"ProfessionJob",id:90,isJob:!0,isExpertise:!1,translation:{en:"carmangier",ro:"carmangier"}},{"@id":"/api/v1/profession_jobs/91","@type":"ProfessionJob",id:91,isJob:!0,isExpertise:!1,translation:{en:"cartograf",ro:"cartograf"}},{"@id":"/api/v1/profession_jobs/92","@type":"ProfessionJob",id:92,isJob:!0,isExpertise:!1,translation:{en:"cartonagist",ro:"cartonagist"}},{"@id":"/api/v1/profession_jobs/93","@type":"ProfessionJob",id:93,isJob:!0,isExpertise:!1,translation:{en:"cascador",ro:"cascador"}},{"@id":"/api/v1/profession_jobs/94","@type":"ProfessionJob",id:94,isJob:!0,isExpertise:!1,translation:{en:"casier",ro:"casier"}},{"@id":"/api/v1/profession_jobs/96","@type":"ProfessionJob",id:96,isJob:!0,isExpertise:!1,translation:{en:"ceasornicar",ro:"ceasornicar"}},{"@id":"/api/v1/profession_jobs/97","@type":"ProfessionJob",id:97,isJob:!0,isExpertise:!1,translation:{en:"cenzor",ro:"cenzor"}},{"@id":"/api/v1/profession_jobs/98","@type":"ProfessionJob",id:98,isJob:!0,isExpertise:!1,translation:{en:"cercetator",ro:"cercetator"}},{"@id":"/api/v1/profession_jobs/99","@type":"ProfessionJob",id:99,isJob:!0,isExpertise:!1,translation:{en:"chimist",ro:"chimist"}},{"@id":"/api/v1/profession_jobs/302","@type":"ProfessionJob",id:302,isJob:null,isExpertise:!0,translation:{en:"chimist în sistemul sanitar",ro:"chimist în sistemul sanitar"}},{"@id":"/api/v1/profession_jobs/100","@type":"ProfessionJob",id:100,isJob:!0,isExpertise:!1,translation:{en:"cizmar-confectioner încaltaminte",ro:"cizmar-confectioner încaltaminte"}},{"@id":"/api/v1/profession_jobs/101","@type":"ProfessionJob",id:101,isJob:!0,isExpertise:!1,translation:{en:"clovn",ro:"clovn"}},{"@id":"/api/v1/profession_jobs/102","@type":"ProfessionJob",id:102,isJob:!0,isExpertise:!1,translation:{en:"coafor",ro:"coafor"}},{"@id":"/api/v1/profession_jobs/103","@type":"ProfessionJob",id:103,isJob:!0,isExpertise:!1,translation:{en:"cofetar",ro:"cofetar"}},{"@id":"/api/v1/profession_jobs/104","@type":"ProfessionJob",id:104,isJob:!0,isExpertise:!1,translation:{en:"cojocar",ro:"cojocar"}},{"@id":"/api/v1/profession_jobs/105","@type":"ProfessionJob",id:105,isJob:!0,isExpertise:!1,translation:{en:"colector si preparator faina, sânge, carne, oase",ro:"colector si preparator faina, sânge, carne, oase"}},{"@id":"/api/v1/profession_jobs/327","@type":"ProfessionJob",id:327,isJob:null,isExpertise:!0,translation:{en:"comandant",ro:"comandant"}},{"@id":"/api/v1/profession_jobs/106","@type":"ProfessionJob",id:106,isJob:!0,isExpertise:!1,translation:{en:"comandant detasament zbor",ro:"comandant detasament zbor"}},{"@id":"/api/v1/profession_jobs/108","@type":"ProfessionJob",id:108,isJob:!0,isExpertise:!1,translation:{en:"comandant însotitor de bord",ro:"comandant însotitor de bord"}},{"@id":"/api/v1/profession_jobs/107","@type":"ProfessionJob",id:107,isJob:!0,isExpertise:!1,translation:{en:"comandant instructor",ro:"comandant instructor"}}
1,{"@id":"/api/v1/profession_jobs/109","@type":"ProfessionJob",id:109,isJob:!0,isExpertise:!1,translation:{en:"comandant nava",ro:"comandant nava"}},{"@id":"/api/v1/profession_jobs/110","@type":"ProfessionJob",id:110,isJob:!0,isExpertise:!1,translation:{en:"comandant port flota",ro:"comandant port flota"}},{"@id":"/api/v1/profession_jobs/111","@type":"ProfessionJob",id:111,isJob:!0,isExpertise:!1,translation:{en:"combainier agricol",ro:"combainier agricol"}},{"@id":"/api/v1/profession_jobs/112","@type":"ProfessionJob",id:112,isJob:!0,isExpertise:!1,translation:{en:"comentator politic",ro:"comentator politic"}},{"@id":"/api/v1/profession_jobs/113","@type":"ProfessionJob",id:113,isJob:!0,isExpertise:!1,translation:{en:"comentator publicist",ro:"comentator publicist"}},{"@id":"/api/v1/profession_jobs/114","@type":"ProfessionJob",id:114,isJob:!0,isExpertise:!1,translation:{en:"comisar",ro:"comisar"}},{"@id":"/api/v1/profession_jobs/115","@type":"ProfessionJob",id:115,isJob:!0,isExpertise:!1,translation:{en:"comisar garda financiara",ro:"comisar garda financiara"}},{"@id":"/api/v1/profession_jobs/116","@type":"ProfessionJob",id:116,isJob:!0,isExpertise:!1,translation:{en:"concert maestru",ro:"concert maestru"}},{"@id":"/api/v1/profession_jobs/390","@type":"ProfessionJob",id:390,isJob:null,isExpertise:!0,translation:{en:"conducÄtor auto care efectueazÄ transport rutier cu vehicule având mase Åi/sau dimensiuni de gabarit depÄÅite",ro:"conducÄtor auto care efectueazÄ transport rutier cu vehicule având mase Åi/sau dimensiuni de gabarit depÄÅite"}},{"@id":"/api/v1/profession_jobs/388","@type":"ProfessionJob",id:388,isJob:null,isExpertise:!0,translation:{en:"conducÄtor auto care efectueazÄ transport rutier de mÄrfuri cu vehicule a cÄror masÄ maximÄ autorizatÄ este mai mare de 3,5 tone",ro:"conducÄtor auto care efectueazÄ transport rutier de mÄrfuri cu vehicule a cÄror masÄ maximÄ autorizatÄ este mai mare de 3,5 tone"}},{"@id":"/api/v1/profession_jobs/391","@type":"ProfessionJob",id:391,isJob:null,isExpertise:!0,translation:{en:"conducÄtor auto care efectueazÄ transport rutier în regim de taxi",ro:"conducÄtor auto care efectueazÄ transport rutier în regim de taxi"}},{"@id":"/api/v1/profession_jobs/389","@type":"ProfessionJob",id:389,isJob:null,isExpertise:!0,translation:{en:"conducÄtor auto care efectueazÄ transport rutier public de persoane",ro:"conducÄtor auto care efectueazÄ transport rutier public de persoane"}},{"@id":"/api/v1/profession_jobs/342","@type":"ProfessionJob",id:342,isJob:null,isExpertise:!0,translation:{en:"conducÄtor de atelier din domeniul reparaÅ£iilor Åi/sau reglÄrilor funcÅ£ionale a vehiculelor rutiere, dezmembrÄrii vehiculelor scoase din uz, precum Åi în domeniul înlocuirii de Åasiuri/caroserii ale vehiculelor",ro:"conducÄtor de atelier din domeniul reparaÅ£iilor Åi/sau reglÄrilor funcÅ£ionale a vehiculelor rutiere, dezmembrÄrii vehiculelor scoase din uz, precum Åi în domeniul înlocuirii de Åasiuri/caroserii ale vehiculelor"}},{"@id":"/api/v1/profession_jobs/384","@type":"ProfessionJob",id:384,isJob:null,isExpertise:!0,translation:{en:"conducÄtor de atelier din domeniul reparaÅ£iilor Åi/sau reglÄrilor funcÅ£ionale a vehiculelor rutiere, dezmembrÄrii vehiculelor scoase din uz, precum Åi în domeniul înlocuirii de Åasiuri/caroserii ale vehiculelor",ro:"conducÄtor de atelier din domeniul reparaÅ£iilor Åi/sau reglÄrilor funcÅ£ionale a vehiculelor rutiere, dezmembrÄrii vehiculelor scoase din uz, precum Åi în domeniul înlocuirii de Åasiuri/caroserii ale vehiculelor"}},{"@id":"/api/v1/profession_jobs/387","@type":"ProfessionJob",id:387,isJob:null,isExpertise:!0,translation:{en:"conducÄtor de autovehicule care transportÄ mÄrfuri periculoase",ro:"conducÄtor de autovehicule care transportÄ mÄrfuri periculoase"}},{"@id":"/api/v1/profession_jobs/377","@type":"ProfessionJob",id:377,isJob:null,isExpertise:!0,translation:{en:"conducÄtor de ÅalupÄ fluvialÄ",ro:"conducÄtor de ÅalupÄ fluvialÄ"}},{"@id":"/api/v1/profession_jobs/364","@type":"ProfessionJob",id:364,isJob:null,isExpertise:!0,translation:{en:"conducÄtor de ÅalupÄ maritimÄ",ro:"conducÄtor de ÅalupÄ maritimÄ"}},{"@id":"/api/v1/profession_jobs/117","@type":"ProfessionJob",id:117,isJob:!0,isExpertise:!1,translation:{en:"conductor tren",ro:"conductor tren"}},{"@id":"/api/v1/profession_jobs/118","@type":"ProfessionJob",id:118,isJob:!0,isExpertise:!1,translation:{en:"conferentiar universitar",ro:"conferentiar universitar"}},{"@id":"/api/v1/profession_jobs/119","@type":"ProfessionJob",id:119,isJob:!0,isExpertise:!1,translation:{en:"conservator arhiva",ro:"conservator arhiva"}},{"@id":"/api/v1/profession_jobs/120","@type":"ProfessionJob",id:120,isJob:!0,isExpertise:!1,translation:{en:"conservator opere de arta si monumente istorice",ro:"conservator opere de arta si monumente istorice"}},{"@id":"/api/v1/profession_jobs/306","@type":"ProfessionJob",id:306,isJob:null,isExpertise:!0,translation:{en:"consilier de probaÅ£iune",ro:"consilier de probaÅ£iune"}},{"@id":"/api/v1/profession_jobs/386","@type":"ProfessionJob",id:386,isJob:null,isExpertise:!0,translation:{en:"consilier de siguranÅ£Ä pe
1ntru transportul rutier al mÄrfurilor periculoase",ro:"consilier de siguranÅ£Ä pentru transportul rutier al mÄrfurilor periculoase"}},{"@id":"/api/v1/profession_jobs/286","@type":"ProfessionJob",id:286,isJob:null,isExpertise:!0,translation:{en:"consilier în proprietate industrialÄ",ro:"consilier în proprietate industrialÄ"}},{"@id":"/api/v1/profession_jobs/305","@type":"ProfessionJob",id:305,isJob:null,isExpertise:!0,translation:{en:"consilier juridic",ro:"consilier juridic"}},{"@id":"/api/v1/profession_jobs/121","@type":"ProfessionJob",id:121,isJob:!0,isExpertise:!1,translation:{en:"constructor",ro:"constructor"}},{"@id":"/api/v1/profession_jobs/122","@type":"ProfessionJob",id:122,isJob:!0,isExpertise:!1,translation:{en:"constructor cai ferate",ro:"constructor cai ferate"}},{"@id":"/api/v1/profession_jobs/123","@type":"ProfessionJob",id:123,isJob:!0,isExpertise:!1,translation:{en:"constructor claviatura",ro:"constructor claviatura"}},{"@id":"/api/v1/profession_jobs/124","@type":"ProfessionJob",id:124,isJob:!0,isExpertise:!1,translation:{en:"constructor linii tramvai",ro:"constructor linii tramvai"}},{"@id":"/api/v1/profession_jobs/125","@type":"ProfessionJob",id:125,isJob:!0,isExpertise:!1,translation:{en:"constructor montator de structuri metalice",ro:"constructor montator de structuri metalice"}},{"@id":"/api/v1/profession_jobs/126","@type":"ProfessionJob",id:126,isJob:!0,isExpertise:!1,translation:{en:"constructor reparator de acordeoane si armonici",ro:"constructor reparator de acordeoane si armonici"}},{"@id":"/api/v1/profession_jobs/127","@type":"ProfessionJob",id:127,isJob:!0,isExpertise:!1,translation:{en:"constructor reparator de alte instrumente muzicale (suflat, percutie)",ro:"constructor reparator de alte instrumente muzicale (suflat, percutie)"}},{"@id":"/api/v1/profession_jobs/449","@type":"ProfessionJob",id:449,isJob:!0,isExpertise:!1,translation:{en:"consultant afaceri europene",ro:"consultant afaceri europene"}},{"@id":"/api/v1/profession_jobs/450","@type":"ProfessionJob",id:450,isJob:!0,isExpertise:!1,translation:{en:"consultant de business",ro:"consultant de business"}},{"@id":"/api/v1/profession_jobs/405","@type":"ProfessionJob",id:405,isJob:null,isExpertise:!0,translation:{en:"consultant de securitate; Åef turÄ",ro:"consultant de securitate; Åef turÄ"}},{"@id":"/api/v1/profession_jobs/451","@type":"ProfessionJob",id:451,isJob:!0,isExpertise:!1,translation:{en:"consultant finantari",ro:"consultant finantari"}},{"@id":"/api/v1/profession_jobs/289","@type":"ProfessionJob",id:289,isJob:null,isExpertise:!0,translation:{en:"consultant fiscal",ro:"consultant fiscal"}},{"@id":"/api/v1/profession_jobs/452","@type":"ProfessionJob",id:452,isJob:!0,isExpertise:!1,translation:{en:"consultant hr",ro:"consultant hr"}},{"@id":"/api/v1/profession_jobs/453","@type":"ProfessionJob",id:453,isJob:!0,isExpertise:!1,translation:{en:"consultant it",ro:"consultant it"}},{"@id":"/api/v1/profession_jobs/454","@type":"ProfessionJob",id:454,isJob:!0,isExpertise:!1,translation:{en:"consultant software",ro:"consultant software"}},{"@id":"/api/v1/profession_jobs/455","@type":"ProfessionJob",id:455,isJob:!0,isExpertise:!1,translation:{en:"consultant transformare organizationala",ro:"consultant transformare organizationala"}},{"@id":"/api/v1/profession_jobs/128","@type":"ProfessionJob",id:128,isJob:!0,isExpertise:!1,translation:{en:"contabil",ro:"contabil"}},{"@id":"/api/v1/profession_jobs/288","@type":"ProfessionJob",id:288,isJob:null,isExpertise:!0,translation:{en:"contabil autorizat",ro:"contabil autorizat"}},{"@id":"/api/v1/profession_jobs/129","@type":"ProfessionJob",id:129,isJob:!0,isExpertise:!1,translation:{en:"controlor calitate",ro:"controlor calitate"}},{"@id":"/api/v1/profession_jobs/456","@type":"ProfessionJob",id:456,isJob:!0,isExpertise:!1,translation:{en:"coordonator",ro:"coordonator"}},{"@id":"/api/v1/profession_jobs/457","@type":"ProfessionJob",id:457,isJob:!0,isExpertise:!1,translation:{en:"copywriter",ro:"copywriter"}},{"@id":"/api/v1/profession_jobs/130","@type":"ProfessionJob",id:130,isJob:!0,isExpertise:!1,translation:{en:"corector editura presa",ro:"corector editura presa"}},{"@id":"/api/v1/profession_jobs/131","@type":"ProfessionJob",id:131,isJob:!0,isExpertise:!1,translation:{en:"coregraf",ro:"coregraf"}},{"@id":"/api/v1/profession_jobs/132","@type":"ProfessionJob",id:132,isJob:!0,isExpertise:!1,translation:{en:"corepetitor",ro:"corepetitor"}}
1,{"@id":"/api/v1/profession_jobs/133","@type":"ProfessionJob",id:133,isJob:!0,isExpertise:!1,translation:{en:"corespondent presa",ro:"corespondent presa"}},{"@id":"/api/v1/profession_jobs/134","@type":"ProfessionJob",id:134,isJob:!0,isExpertise:!1,translation:{en:"corespondent radio",ro:"corespondent radio"}},{"@id":"/api/v1/profession_jobs/135","@type":"ProfessionJob",id:135,isJob:!0,isExpertise:!1,translation:{en:"corist",ro:"corist"}},{"@id":"/api/v1/profession_jobs/136","@type":"ProfessionJob",id:136,isJob:!0,isExpertise:!1,translation:{en:"cosmetician",ro:"cosmetician"}},{"@id":"/api/v1/profession_jobs/137","@type":"ProfessionJob",id:137,isJob:!0,isExpertise:!1,translation:{en:"crainic radio",ro:"crainic radio"}},{"@id":"/api/v1/profession_jobs/138","@type":"ProfessionJob",id:138,isJob:!0,isExpertise:!1,translation:{en:"crainic televiziune",ro:"crainic televiziune"}},{"@id":"/api/v1/profession_jobs/139","@type":"ProfessionJob",id:139,isJob:!0,isExpertise:!1,translation:{en:"critic de arta",ro:"critic de arta"}},{"@id":"/api/v1/profession_jobs/140","@type":"ProfessionJob",id:140,isJob:!0,isExpertise:!1,translation:{en:"critic literar",ro:"critic literar"}},{"@id":"/api/v1/profession_jobs/141","@type":"ProfessionJob",id:141,isJob:!0,isExpertise:!1,translation:{en:"critic muzical",ro:"critic muzical"}},{"@id":"/api/v1/profession_jobs/142","@type":"ProfessionJob",id:142,isJob:!0,isExpertise:!1,translation:{en:"croitor",ro:"croitor"}},{"@id":"/api/v1/profession_jobs/143","@type":"ProfessionJob",id:143,isJob:!0,isExpertise:!1,translation:{en:"curier",ro:"curier"}},{"@id":"/api/v1/profession_jobs/458","@type":"ProfessionJob",id:458,isJob:!0,isExpertise:!1,translation:{en:"cyber security analyst",ro:"cyber security analyst"}},{"@id":"/api/v1/profession_jobs/144","@type":"ProfessionJob",id:144,isJob:!0,isExpertise:!1,translation:{en:"dansator",ro:"dansator"}},{"@id":"/api/v1/profession_jobs/459","@type":"ProfessionJob",id:459,isJob:!0,isExpertise:!1,translation:{en:"data scientist",ro:"data scientist"}},{"@id":"/api/v1/profession_jobs/145","@type":"ProfessionJob",id:145,isJob:!0,isExpertise:!1,translation:{en:"decorator interioare",ro:"decorator interioare"}},{"@id":"/api/v1/profession_jobs/146","@type":"ProfessionJob",id:146,isJob:!0,isExpertise:!1,translation:{en:"depanator de aparataj electric",ro:"depanator de aparataj electric"}},{"@id":"/api/v1/profession_jobs/147","@type":"ProfessionJob",id:147,isJob:!0,isExpertise:!1,translation:{en:"desenator",ro:"desenator"}},{"@id":"/api/v1/profession_jobs/460","@type":"ProfessionJob",id:460,isJob:!0,isExpertise:!1,translation:{en:"designer",ro:"designer"}},{"@id":"/api/v1/profession_jobs/148","@type":"ProfessionJob",id:148,isJob:!0,isExpertise:!1,translation:{en:"designer industrial",ro:"designer industrial"}},{"@id":"/api/v1/profession_jobs/149","@type":"ProfessionJob",id:149,isJob:!0,isExpertise:!1,translation:{en:"designer vestimentar",ro:"designer vestimentar"}},{"@id":"/api/v1/profession_jobs/150","@type":"ProfessionJob",id:150,isJob:!0,isExpertise:!0,translation:{en:"detectiv particular",ro:"detectiv particular"}},{"@id":"/api/v1/profession_jobs/151","@type":"ProfessionJob",id:151,isJob:!0,isExpertise:!1,translation:{en:"dietetician",ro:"dietetician"}},{"@id":"/api/v1/profession_jobs/461","@type":"ProfessionJob",id:461,isJob:!0,isExpertise:!1,translation:{en:"director",ro:"director"}},{"@id":"/api/v1/profession_jobs/400","@type":"ProfessionJob",id:400,isJob:null,isExpertise:!0,translation:{en:"director departament securitate",ro:"director departament securitate"}},{"@id":"/api/v1/profession_jobs/295","@type":"ProfessionJob",id:295,isJob:null,isExpertise:!0,translation:{en:"diriginte de Åantier",ro:"diriginte de Åantier"}},{"@id":"/api/v1/profession_jobs/152","@type":"ProfessionJob",id:152,isJob:!0,isExpertise:!1,translation:{en:"dirijor",ro:"dirijor"}},{"@id":"/api/v1/profession_jobs/406","@type":"ProfessionJob",id:406,isJob:null,isExpertise:!0,translation:{en:"dispecer centru de alarmÄ",ro:"dispecer centru de alarmÄ"}},{"@id":"/api/v1/profession_jobs/394","@type":"ProfessionJob",id:394,isJob:null,isExpertise:!0,translation:{en:"dispecer de trafic",ro:"dispecer de trafic"}},{"@id":"/api/v1/profession_jobs/462","@type":"ProfessionJob",id:462,isJob:!0,isExpertise:!1,translation:{en:"doctor/medic",ro:"doctor/medic"}},{"@id":"/api/v1/profession_jobs/153","@type":"ProfessionJob",id:153,isJob:!0,isExpertise:!1,translation:{en:"dresor",ro:"dresor"}},{"@id":"/api/v1/profession_jobs/463","@type":"ProfessionJob",id:463,isJob:!0,isExpertise:!0,translation:{en:"economist",ro:"economist"}},{"@id":"/api/v1/profession_jobs/464","@type":"ProfessionJob",id:464,isJob:!0,isExpertise:!1,translation:{en:"editor",ro:"editor"}},{"@id":"/api/v1/profession_jobs/154","@type":"ProfessionJob",id:154,isJob:!0,isExpertise:!1,translation:{en:"editorialist",ro:"editorialist"}},{"@id":"/api/v1/profession_jobs/155","@type":"ProfessionJob",id:155,isJob:!0,isExpertise:!1,translation:{en:"educatoare",ro:"educatoare"}},{"@id":"/api/v1/profession_jobs/465","@type":"ProfessionJob",id:465,isJob:!0,isExpertise:!1,translation:{en:"educator",ro:"educator"}},{"@id":"/api/v1/profession_jobs/365","@type":"ProfessionJob",id:365,isJob:null,isExpertise:!0,translation:{en:"electrician",ro:"electrician"}},{"@id":"/api/v1/profession_jobs/156","@type":"ProfessionJob",id:156,isJob:!0,isExpertise:!1,translation:{en:"electrician ",ro:"electrician "}},{"@id":"/api/v1/profession_jobs/382","@type":"ProfessionJob",id:382,isJob:null,isExpertise:!0,translation:{en:"electrician de bord",ro:"electrician de bord"}},{"@id":"/api/v1/profession_jobs/157","@type":"ProfessionJob",id:157,isJob:!0,isExpertise:!1,translation:{en:"electromecanic auto",ro:"electromecanic auto"}},{"@id":"/api/v1/profession_jobs/158","@type":"ProfessionJob",id:158,isJob:!0,isExpertise:!1,translation:{en:"electronist",ro:"electronist"}},{"@id":"/api/v1/profession_jobs/312","@type":"ProfessionJob",id:312,isJob:null,isExpertise:!0,translation:{en:"evaluator autorizat",ro:"evaluator autorizat"}},{"@id":"/api/v1/profession_jobs/404","@type":"ProfessionJob",id:404,isJob:null,isExpertise:!0,translation:{en:"evaluator de risc efracÅ£ie",ro:"evaluator de risc efracÅ£ie"}},{"@id":"/api/v1/profession_jobs/466","@type":"ProfessionJob",id:466,isJob:!0,isExpertise:!1,translation:{en:"evaluator proiecte",ro:"evaluator proiecte"}},{"@id":"/api/v1/profession_jobs/467","@type":"ProfessionJob",id:467,isJob:!0,isExpertise:!1,translation:{en:"event manager",ro:"event manager"}},{"@id":"/api/v1/profession_jobs/287","@type":"ProfessionJob",id:287,isJob:null,isExpertise:!0,translation:{en:"expert contabil",ro:"expert contabil"}},{"@id":"/api/v1/profession_jobs/308","@type":"ProfessionJob",id:308,isJob:null,isExpertise:!0,translation:{en:"expert criminalist",ro:"expert criminalist"}},{"@id":"/api/v1/profession_jobs/468","@type":"ProfessionJob",id:468,isJob:!0,isExpertise:!1,translation:{en:"expert fiscal",ro:"expert fiscal"}},{"@id":"/api/v1/profession_jobs/292","@type":"ProfessionJob",id:292,isJob:null,isExpertise:!0,translation:{en:"expert tehnic atestat",ro:"expert tehnic atestat"}},{"@id":"/api/v1/profession_jobs/307","@type":"ProfessionJob",id:307,isJob:null,isExpertise:!0,translation:{en:"expert tehnic judiciar",ro:"expert tehnic judiciar"}},{"@id":"/api/v1/profession_jobs/159","@type":"ProfessionJob",id:159,isJob:!0,isExpertise:!1,translation:{en:"factor postal",ro:"factor postal"}},{"@id":"/api/v1/profession_jobs/160","@type":"ProfessionJob",id:160,isJob:!0,isExpertise:!1,translation:{en:"faiantar",ro:"faiantar"}},{"@id":"/api/v1/profession_jobs/161","@type":"ProfessionJob",id:161,isJob:!0,isExpertise:!1,translation:{en:"farmacist",ro:"farmacist"}},{"@id":"/api/v1/profession_jobs/162","@type":"ProfessionJob",id:162,isJob:!0,isExpertise:!1,translation:{en:"femeie de serviciu",ro:"femeie de serviciu"}},{"@id":"/api/v1/profession_jobs/163","@type":"ProfessionJob",id:163,isJob:!0,isExpertise:!1,translation:{en:"filolog",ro:"filolog"}},{"@id":"/api/v1/profession_jobs/164","@type":"ProfessionJob",id:164,isJob:!0,isExpertise:!1,translation:{en:"filozof",ro:"filozof"}},{"@id":"/api/v1/profession_jobs/366","@type":"ProfessionJob",id:366,isJob:null,isExpertise:!0,translation:{en:"fitter",ro:"fitter"}},{"@id":"/api/v1/profession_jobs/165","@type":"ProfessionJob",id:165,isJob:!0,isExpertise:!1,translation:{en:"fizician",ro:"fizician"}},{"@id":"/api/v1/profession_jobs/469","@type":"ProfessionJob",id:469,isJob:!0,isExpertise:!1,translation:{en:"fizioterapeut",ro:"fizioterapeut"}},{"@id":"/api/v1/profession_jobs/470","@type":"ProfessionJob",id:470,isJob:!0,isExpertise:!1,translation:{en:"formator",ro:"formator"}},{"@id":"/api/v1/profession_jobs/166","@type":"ProfessionJob",id:166,isJob:!0,isExpertise:!1,translation:{en:"fotograf",ro:"fotograf"}},{"@id":"/api/v1/profession_jobs/471","@type":"ProfessionJob",id:471,isJob:!0,isExpertise:!1,translation:{en:"freelancer",ro:"freelancer"}},{"@id":"/api/v1/profession_jobs/167","@type":"ProfessionJob",id:167,isJob:!0,isExpertise:!1,translation:{en:"frizer",ro:"frizer"}},{"@id":"/api/v1/profession_jobs/472","@type":"ProfessionJob",id:472,isJob:!0,isExpertise:!1,translation:{en:"functionar administrativ",ro:"functionar administrativ"}},{"@id":"/api/v1/profession_jobs/473","@type":"ProfessionJob",id:473,isJob:!0,isExpertise:!1,translation:{en:"functionar banca",ro:"functionar banca"}},{"@id":"/api/v1/profession_jobs/168","@type":"ProfessionJob",id:168,isJob:!0,isExpertise:!1,translation:{en:"gardian public",ro:"gardian public"}},{"@id":"/api/v1/profession_jobs/169","@type":"ProfessionJob",id:169,isJob:!0,isExpertise:!1,translation:{en:"geofizician",ro:"geofizician"}},{"@id":"/api/v1/profession_jobs/170","@type":"ProfessionJob",id:170,isJob:!0,isExpertise:!1,translation:{en:"geograf",ro:"geograf"}},{"@id":"/api/v1/profession_jobs/326","@type":"ProfessionJob",id:326,isJob:null,isExpertise:!0,translation:{en:"geograf cu specializarea cartografie",ro:"geograf cu specializarea cartografie"}},{"@id":"/api/v1/profession_jobs/171","@type":"ProfessionJob",id:171,isJob:!0,isExpertise:!1,translation:{en:"geolog",ro:"geolog"}},{"@id":"/api/v1/profession_jobs/474","@type":"ProfessionJob",id:474,isJob:!0,isExpertise:!1,translation:{en:"gestionar",ro:"gestionar"}},{"@id":"/api/v1/profession_jobs/475","@type":"ProfessionJob",id:475,isJob:!0,isExpertise:!1,translation:{en:"gestionar depozit",ro:"gestionar depozit"}},{"@id":"/api/v1/profession_jobs/172","@type":"ProfessionJob",id:172,isJob:!0,isExpertise:!1,translation:{en:"ghid",ro:"ghid"}},{"@id":"/api/v1/profession_jobs/395","@type":"ProfessionJob",id:395,isJob:null,isExpertise:!0,translation:{en:"ghid de turism",ro:"ghid de turism"}},{"@id":"/api/v1/profession_jobs/173","@type":"ProfessionJob",id:173,isJob:!0,isExpertise:!1,translation:{en:"grafician",ro:"grafician"}},{"@id":"/api/v1/profession_jobs/476","@type":"ProfessionJob",id:476,isJob:!0,isExpertise:!1,translation:{en:"graphic designer",ro:"graphic designer"}},{"@id":"/api/v1/profession_jobs/174","@type":"ProfessionJob",id:174,isJob:!0,isExpertise:!0,translation:{en:"grefier",ro:"grefier"}},{"@id":"/api/v1/profession_jobs/175","@type":"ProfessionJob",id:175,isJob:!0,isExpertise:!1,translation:{en:"gropar",ro:"gropar"}},{"@id":"/api/v1/profession_jobs/176","@type":"ProfessionJob",id:176,isJob:!0,isExpertise:!1,translation:{en:"gunoier",ro:"gunoier"}},{"@id":"/api/v1/profession_jobs/177","@type":"ProfessionJob",id:177,isJob:!0,isExpertise:!1,translation:{en:"guvernanta",ro:"guvernanta"}},{"@id":"/api/v1/profession_jobs/178","@type":"ProfessionJob",id:178,isJob:!0,isExpertise:!1,translation:{en:"guvernator",ro:"guvernator"}}
1,{"@id":"/api/v1/profession_jobs/179","@type":"ProfessionJob",id:179,isJob:!0,isExpertise:!1,translation:{en:"hidrolog",ro:"hidrolog"}},{"@id":"/api/v1/profession_jobs/180","@type":"ProfessionJob",id:180,isJob:!0,isExpertise:!1,translation:{en:"impresar",ro:"impresar"}},{"@id":"/api/v1/profession_jobs/181","@type":"ProfessionJob",id:181,isJob:!0,isExpertise:!1,translation:{en:"infirmiera",ro:"infirmiera"}},{"@id":"/api/v1/profession_jobs/182","@type":"ProfessionJob",id:182,isJob:!0,isExpertise:!1,translation:{en:"inginer",ro:"inginer"}},{"@id":"/api/v1/profession_jobs/477","@type":"ProfessionJob",id:477,isJob:!0,isExpertise:!1,translation:{en:"inginer agronom",ro:"inginer agronom"}},{"@id":"/api/v1/profession_jobs/478","@type":"ProfessionJob",id:478,isJob:!0,isExpertise:!1,translation:{en:"inginer alimentar",ro:"inginer alimentar"}},{"@id":"/api/v1/profession_jobs/479","@type":"ProfessionJob",id:479,isJob:!0,isExpertise:!1,translation:{en:"inginer auto",ro:"inginer auto"}},{"@id":"/api/v1/profession_jobs/480","@type":"ProfessionJob",id:480,isJob:!0,isExpertise:!1,translation:{en:"inginer aviatie",ro:"inginer aviatie"}},{"@id":"/api/v1/profession_jobs/481","@type":"ProfessionJob",id:481,isJob:!0,isExpertise:!1,translation:{en:"inginer biotehnolog",ro:"inginer biotehnolog"}},{"@id":"/api/v1/profession_jobs/314","@type":"ProfessionJob",id:314,isJob:null,isExpertise:!0,translation:{en:"inginer cadastru",ro:"inginer cadastru"}},{"@id":"/api/v1/profession_jobs/482","@type":"ProfessionJob",id:482,isJob:!0,isExpertise:!1,translation:{en:"inginer calculatoare",ro:"inginer calculatoare"}},{"@id":"/api/v1/profession_jobs/316","@type":"ProfessionJob",id:316,isJob:null,isExpertise:!0,translation:{en:"inginer cartograf",ro:"inginer cartograf"}},{"@id":"/api/v1/profession_jobs/483","@type":"ProfessionJob",id:483,isJob:!0,isExpertise:!1,translation:{en:"inginer centrale nucleare",ro:"inginer centrale nucleare"}},{"@id":"/api/v1/profession_jobs/484","@type":"ProfessionJob",id:484,isJob:!0,isExpertise:!1,translation:{en:"inginer cercetare dezvoltare",ro:"inginer cercetare dezvoltare"}},{"@id":"/api/v1/profession_jobs/485","@type":"ProfessionJob",id:485,isJob:!0,isExpertise:!1,translation:{en:"inginer confectii textile",ro:"inginer confectii textile"}},{"@id":"/api/v1/profession_jobs/486","@type":"ProfessionJob",id:486,isJob:!0,isExpertise:!1,translation:{en:"inginer constructor",ro:"inginer constructor"}},{"@id":"/api/v1/profession_jobs/338","@type":"ProfessionJob",id:338,isJob:null,isExpertise:!0,translation:{en:"inginer de recepÅ£ie Åi control aeronave",ro:"inginer de recepÅ£ie Åi control aeronave"}},{"@id":"/api/v1/profession_jobs/487","@type":"ProfessionJob",id:487,isJob:!0,isExpertise:!1,translation:{en:"inginer de sistem",ro:"inginer de sistem"}},{"@id":"/api/v1/profession_jobs/488","@type":"ProfessionJob",id:488,isJob:!0,isExpertise:!1,translation:{en:"inginer electric",ro:"inginer electric"}},{"@id":"/api/v1/profession_jobs/489","@type":"ProfessionJob",id:489,isJob:!0,isExpertise:!1,translation:{en:"inginer electromecanic",ro:"inginer electromecanic"}},{"@id":"/api/v1/profession_jobs/313","@type":"ProfessionJob",id:313,isJob:null,isExpertise:!0,translation:{en:"inginer geodez",ro:"inginer geodez"}},{"@id":"/api/v1/profession_jobs/490","@type":"ProfessionJob",id:490,isJob:!0,isExpertise:!1,translation:{en:"inginer horticol",ro:"inginer horticol"}},{"@id":"/api/v1/profession_jobs/491","@type":"ProfessionJob",id:491,isJob:!0,isExpertise:!1,translation:{en:"inginer it",ro:"inginer it"}},{"@id":"/api/v1/profession_jobs/492","@type":"ProfessionJob",id:492,isJob:!0,isExpertise:!1,translation:{en:"inginer mecanic",ro:"inginer mecanic"}},{"@id":"/api/v1/profession_jobs/493","@type":"ProfessionJob",id:493,isJob:!0,isExpertise:!1,translation:{en:"inginer naval",ro:"inginer naval"}},{"@id":"/api/v1/profession_jobs/494","@type":"ProfessionJob",id:494,isJob:!0,isExpertise:!1,translation:{en:"inginer petrolist",ro:"inginer petrolist"}},{"@id":"/api/v1/profession_jobs/495","@type":"ProfessionJob",id:495,isJob:!0,isExpertise:!1,translation:{en:"inginer programator",ro:"inginer programator"}},{"@id":"/api/v1/profession_jobs/496","@type":"ProfessionJob",id:496,isJob:!0,isExpertise:!1,translation:{en:"inginer proiectant",ro:"inginer proiectant"}},{"@id":"/api/v1/profession_jobs/183","@type":"ProfessionJob",id:183,isJob:!0,isExpertise:!1,translation:{en:"inginer silvic",ro:"inginer silvic"}},{"@id":"/api/v1/profession_jobs/399","@type":"ProfessionJob",id:399,isJob:null,isExpertise:!0,translation:{en:"inginer sisteme de securitate",ro:"inginer sisteme de securitate"}},{"@id":"/api/v1/profession_jobs/315","@type":"ProfessionJob",id:315,isJob:null,isExpertise:!0,translation:{en:"inginer topograf",ro:"inginer topograf"}},{"@id":"/api/v1/profession_jobs/317","@type":"ProfessionJob",id:317,isJob:null,isExpertise:!0,translation:{en:"inginer topograf minier",ro:"inginer topograf minier"}},{"@id":"/api/v1/profession_jobs/190","@type":"ProfessionJob",id:190,isJob:!0,isExpertise:!1,translation:{en:"îngrijitoare",ro:"îngrijitoare"}},{"@id":"/api/v1/profession_jobs/191","@type":"ProfessionJob",id:191,isJob:!0,isExpertise:!1,translation:{en:"însotitor",ro:"însotitor"}},{"@id":"/api/v1/profession_jobs/192","@type":"ProfessionJob",id:192,isJob:!0,isExpertise:!1,translation:{en:"însotitor de bord",ro:"însotitor de bord"}},{"@id":"/api/v1/profession_jobs/403","@type":"ProfessionJob",id:403,isJob:null,isExpertise:!0,translation:{en:"inspector de securitate",ro:"inspector de securitate"}},{"@id":"/api/v1/profession_jobs/345","@type":"ProfessionJob",id:345,isJob:null,isExpertise:!0,translation:{en:"inspector de siguranÅ£Ä rutierÄ",ro:"inspector de siguranÅ£Ä rutierÄ"}},{"@id":"/api/v1/profession_jobs/347","@type":"ProfessionJob",id:347,isJob:null,isExpertise:!0,translation:{en:"inspector ITP",ro:"inspector ITP"}},{"@id":"/api/v1/profession_jobs/383","@type":"ProfessionJob",id:383,isJob:null,isExpertise:!0,translation:{en:"inspector ITP",ro:"inspector ITP"}},{"@id":"/api/v1/profession_jobs/497","@type":"ProfessionJob",id:497,isJob:!0,isExpertise:!1,translation:{en:"instalator",ro:"instalator"}},{"@id":"/api/v1/profession_jobs/184","@type":"ProfessionJob",id:184,isJob:!0,isExpertise:!1,translation:{en:"instalator apa, canal",ro:"instalator apa, canal"}},{"@id":"/api/v1/profession_jobs/185","@type":"ProfessionJob",id:185,isJob:!0,isExpertise:!1,translation:{en:"instalator frigotehnist",ro:"instalator frigotehnist"}},{"@id":"/api/v1/profession_jobs/186","@type":"ProfessionJob",id:186,isJob:!0,isExpertise:!1,translation:{en:"instalator încalzire centrala si gaze",ro:"instalator încalzire centrala si gaze"}},{"@id":"/api/v1/profession_jobs/392","@type":"ProfessionJob",id:392,isJob:null,isExpertise:!0,translation:{en:"instructor de conducere auto",ro:"instructor de conducere auto"}},{"@id":"/api/v1/profession_jobs/413","@type":"ProfessionJob",id:413,isJob:null,isExpertise:!0,translation:{en:"instructor în poligonul de tir",ro:"instructor în poligonul de tir"}},{"@id":"/api/v1/profession_jobs/414","@type":"ProfessionJob",id:414,isJob:null,isExpertise:!0,translation:{en:"instructor în poligonul de tragere",ro:"instructor în poligonul de tragere"}},{"@id":"/api/v1/profession_jobs/187","@type":"ProfessionJob",id:187,isJob:!0,isExpertise:!1,translation:{en:"interpret",ro:"interpret"}},{"@id":"/api/v1/profession_jobs/311","@type":"ProfessionJob",id:311,isJob:null,isExpertise:!0,translation:{en:"interpret limbaj mimico-gestual",ro:"interpret limbaj mimico-gestual"}},{"@id":"/api/v1/profession_jobs/429","@type":"ProfessionJob",id:429,isJob:null,isExpertise:!0,translation:{en:"interpret limbaj specific persoanei cu surdocecitate",ro:"interpret limbaj specific persoanei cu surdocecitate"}},{"@id":"/api/v1/profession_jobs/298","@type":"ProfessionJob",id:298,isJob:null,isExpertise:!0,translation:{en:"interpret Åi traducÄtor autorizat",ro:"interpret Åi traducÄtor autorizat"}},{"@id":"/api/v1/profession_jobs/423","@type":"ProfessionJob",id:423,isJob:null,isExpertise:!0,translation:{en:"interpret Åi traducÄtor autorizat",ro:"interpret Åi traducÄtor autorizat"}},{"@id":"/api/v1/profession_jobs/193","@type":"ProfessionJob",id:193,isJob:!0,isExpertise:!1,translation:{en:"învatator",ro:"învatator"}},{"@id":"/api/v1/profession_jobs/188","@type":"ProfessionJob",id:188,isJob:!0,isExpertise:!1,translation:{en:"istoric",ro:"istoric"}},{"@id":"/api/v1/profession_jobs/189","@type":"ProfessionJob",id:189,isJob:!0,isExpertise:!1,translation:{en:"istoriograf",ro:"istoriograf"}},{"@id":"/api/v1/profession_jobs/498","@type":"ProfessionJob",id:498,isJob:!0,isExpertise:!1,translation:{en:"it consultant",ro:"it consultant"}},{"@id":"/api/v1/profession_jobs/499","@type":"ProfessionJob",id:499,isJob:!0,isExpertise:!1,translation:{en:"it quality assurance",ro:"it quality assurance"}},{"@id":"/api/v1/profession_jobs/500","@type":"ProfessionJob",id:500,isJob:!0,isExpertise:!1,translation:{en:"it sales",ro:"it sales"}},{"@id":"/api/v1/profession_jobs/501","@type":"ProfessionJob",id:501,isJob:!0,isExpertise:!1,translation:{en:"it service management",ro:"it service management"}},{"@id":"/api/v1/profession_jobs/502","@type":"ProfessionJob",id:502,isJob:!0,isExpertise:!1,translation:{en:"it support manager",ro:"it support manager"}},{"@id":"/api/v1/profession_jobs/503","@type":"ProfessionJob",id:503,isJob:!0,isExpertise:!1,translation:{en:"it support specialist",ro:"it support specialist"}},{"@id":"/api/v1/profession_jobs/504","@type":"ProfessionJob",id:504,isJob:!0,isExpertise:!1,translation:{en:"it system administrator",ro:"it system administrator"}},{"@id":"/api/v1/profession_jobs/194","@type":"ProfessionJob",id:194,isJob:!0,isExpertise:!1,translation:{en:"judecator",ro:"judecator"}},{"@id":"/api/v1/profession_jobs/505","@type":"ProfessionJob",id:505,isJob:!0,isExpertise:!1,translation:{en:"junior python developer",ro:"junior python developer"}},{"@id":"/api/v1/profession_jobs/195","@type":"ProfessionJob",id:195,isJob:!0,isExpertise:!1,translation:{en:"jurisconsult",ro:"jurisconsult"}},{"@id":"/api/v1/profession_jobs/506","@type":"ProfessionJob",id:506,isJob:!0,isExpertise:!1,translation:{en:"jurist",ro:"jurist"}},{"@id":"/api/v1/profession_jobs/507","@type":"ProfessionJob",id:507,isJob:!0,isExpertise:!1,translation:{en:"key account manager",ro:"key account manager"}},{"@id":"/api/v1/profession_jobs/508","@type":"ProfessionJob",id:508,isJob:!0,isExpertise:!1,translation:{en:"kinetoterapeut",ro:"kinetoterapeut"}},{"@id":"/api/v1/profession_jobs/196","@type":"ProfessionJob",id:196,isJob:!0,isExpertise:!1,translation:{en:"laborant",ro:"laborant"}},{"@id":"/api/v1/profession_jobs/509","@type":"ProfessionJob",id:509,isJob:!0,isExpertise:!1,translation:{en:"learning consultant",ro:"learning consultant"}},{"@id":"/api/v1/profession_jobs/346","@type":"ProfessionJob",id:346,isJob:null,isExpertise:!0,translation:{en:"lector pentru pregÄtirea Åi perfecÅ£ionarea profesionalÄ a personalului de specialitate din domeniul transporturilor rutiere",ro:"lector pentru pregÄtirea Åi perfecÅ£ionarea profesionalÄ a personalului de specialitate din domeniul transporturilor rutiere"}},{"@id":"/api/v1/profession_jobs/197","@type":"ProfessionJob",id:197,isJob:!0,isExpertise:!1,translation:{en:"lector universitar",ro:"lector universitar"}},{"@id":"/api/v1/profession_jobs/510","@type":"ProfessionJob",id:510,isJob:!0,isExpertise:!1,translation:{en:"legumicultor",ro:"legumicultor"}},{"@id":"/api/v1/profession_jobs/511","@type":"ProfessionJob",id:511,isJob:!0,isExpertise:!1,translation:{en:"liber profesionist",ro:"liber profesionist"}},{"@id":"/api/v1/profession_jobs/198","@type":"ProfessionJob",id:198,isJob:!0,isExpertise:!1,translation:{en:"librar",ro:"librar"}},{"@id":"/api/v1/profession_jobs/199","@type":"ProfessionJob",id:199,isJob:!0,isExpertise:!1,translation:{en:"logoped",ro:"logoped"}},{"@id":"/api/v1/profession_jobs/512","@type":"ProfessionJob",id:512,isJob:!0,isExpertise:!1,translation:{en:"lucrator comercial",ro:"lucrator comercial"}},{"@id":"/api/v1/profession_jobs/200","@type":"ProfessionJob",id:200,isJob:!0,isExpertise:!1,translation:{en:"macaragiu",ro:"macaragiu"}},{"@id":"/api/v1/profession_jobs/201","@type":"ProfessionJob",id:201,isJob:!0,isExpertise:!1,translation:{en:"macelar",ro:"macelar"}},{"@id":"/api/v1/profession_jobs/202","@type":"ProfessionJob",id:202,isJob:!0,isExpertise:!1,translation:{en:"magaziner",ro:"magaziner"}},{"@id":"/api/v1/profession_jobs/513","@type":"ProfessionJob",id:513,isJob:!0,isExpertise:!1,translation:{en:"magazioner",ro:"magazioner"}},{"@id":"/api/v1/profession_jobs/203","@type":"ProfessionJob",id:203,isJob:!0,isExpertise:!1,translation:{en:"magistrat",ro:"magistrat"}},{"@id":"/api/v1/profession_jobs/514","@type":"ProfessionJob",id:514,isJob:!0,isExpertise:!1,translation:{en:"maistru electrician",ro:"maistru electrician"}},{"@id":"/api/v1/profession_jobs/515","@type":"ProfessionJob",id:515,isJob:!0,isExpertise:!1,translation:{en:"maistru energetician",ro:"maistru energetician"}},{"@id":"/api/v1/profession_jobs/516","@type":"ProfessionJob",id:516,isJob:!0,isExpertise:!1,translation:{en:"maistru in constructii",ro:"maistru in constructii"}},{"@id":"/api/v1/profession_jobs/517","@type":"ProfessionJob",id:517,isJob:!0,isExpertise:!1,translation:{en:"maistru mecanic",ro:"maistru mecanic"}},{"@id":"/api/v1/profession_jobs/518","@type":"ProfessionJob",id:518,isJob:!0,isExpertise:!1,translation:{en:"manager comercial",ro:"manager comercial"}},{"@id":"/api/v1/profession_jobs/398","@type":"ProfessionJob",id:398,isJob:null,isExpertise:!0,translation:{en:"manager de securitate",ro:"manager de securitate"}},{"@id":"/api/v1/profession_jobs/385","@type":"ProfessionJob",id:385,isJob:null,isExpertise:!0,translation:{en:"manager de transport",ro:"manager de transport"}},{"@id":"/api/v1/profession_jobs/519","@type":"ProfessionJob",id:519,isJob:!0,isExpertise:!1,translation:{en:"manager financiar",ro:"manager financiar"}},{"@id":"/api/v1/profession_jobs/520","@type":"ProfessionJob",id:520,isJob:!0,isExpertise:!1,translation:{en:"manager it",ro:"manager it"}},{"@id":"/api/v1/profession_jobs/521","@type":"ProfessionJob",id:521,isJob:!0,isExpertise:!1,translation:{en:"manager logistica",ro:"manager logistica"}},{"@id":"/api/v1/profession_jobs/522","@type":"ProfessionJob",id:522,isJob:!0,isExpertise:!1,translation:{en:"manager proiect",ro:"manager proiect"}},{"@id":"/api/v1/profession_jobs/523","@type":"ProfessionJob",id:523,isJob:!0,isExpertise:!1,translation:{en:"manager proiect informatic",ro:"manager proiect informatic"}},{"@id":"/api/v1/profession_jobs/524","@type":"ProfessionJob",id:524,isJob:!0,isExpertise:!1,translation:{en:"manager recrutare",ro:"manager recrutare"}},{"@id":"/api/v1/profession_jobs/525","@type":"ProfessionJob",id:525,isJob:!0,isExpertise:!1,translation:{en:"manager resurse umane",ro:"manager resurse umane"}},{"@id":"/api/v1/profession_jobs/526","@type":"ProfessionJob",id:526,isJob:!0,isExpertise:!1,translation:{en:"manager sistem informatic",ro:"manager sistem informatic"}},{"@id":"/api/v1/profession_jobs/527","@type":"ProfessionJob",id:527,isJob:!0,isExpertise:!1,translation:{en:"manager transport marfa",ro:"manager transport marfa"}},{"@id":"/api/v1/profession_jobs/528","@type":"ProfessionJob",id:528,isJob:!0,isExpertise:!1,translation:{en:"manager turism",ro:"manager turism"}},{"@id":"/api/v1/profession_jobs/529","@type":"ProfessionJob",id:529,isJob:!0,isExpertise:!1,translation:{en:"manager vanzari",ro:"manager vanzari"}},{"@id":"/api/v1/profession_jobs/530","@type":"ProfessionJob",id:530,isJob:!0,isExpertise:!1,translation:{en:"manager zonal",ro:"manager zonal"}},{"@id":"/api/v1/profession_jobs/204","@type":"ProfessionJob",id:204,isJob:!0,isExpertise:!1,translation:{en:"manechin",ro:"manechin"}},{"@id":"/api/v1/profession_jobs/205","@type":"ProfessionJob",id:205,isJob:!0,isExpertise:!1,translation:{en:"manichiurist",ro:"manichiurist"}},{"@id":"/api/v1/profession_jobs/531","@type":"ProfessionJob",id:531,isJob:!0,isExpertise:!1,translation:{en:"manichiurista",ro:"manichiurista"}},{"@id":"/api/v1/profession_jobs/206","@type":"ProfessionJob",id:206,isJob:!0,isExpertise:!1,translation:{en:"manipulant marfuri",ro:"manipulant marfuri"}},{"@id":"/api/v1/profession_jobs/379","@type":"ProfessionJob",id:379,isJob:null,is
1Expertise:!0,translation:{en:"marinar",ro:"marinar"}},{"@id":"/api/v1/profession_jobs/380","@type":"ProfessionJob",id:380,isJob:null,isExpertise:!0,translation:{en:"marinar stagiar",ro:"marinar stagiar"}},{"@id":"/api/v1/profession_jobs/532","@type":"ProfessionJob",id:532,isJob:!0,isExpertise:!1,translation:{en:"marketing manager",ro:"marketing manager"}},{"@id":"/api/v1/profession_jobs/533","@type":"ProfessionJob",id:533,isJob:!0,isExpertise:!1,translation:{en:"marketing online",ro:"marketing online"}},{"@id":"/api/v1/profession_jobs/207","@type":"ProfessionJob",id:207,isJob:!0,isExpertise:!1,translation:{en:"maseur",ro:"maseur"}},{"@id":"/api/v1/profession_jobs/208","@type":"ProfessionJob",id:208,isJob:!0,isExpertise:!1,translation:{en:"matematician",ro:"matematician"}},{"@id":"/api/v1/profession_jobs/376","@type":"ProfessionJob",id:376,isJob:null,isExpertise:!0,translation:{en:"mecanic",ro:"mecanic"}},{"@id":"/api/v1/profession_jobs/209","@type":"ProfessionJob",id:209,isJob:!0,isExpertise:!1,translation:{en:"mecanic auto",ro:"mecanic auto"}},{"@id":"/api/v1/profession_jobs/210","@type":"ProfessionJob",id:210,isJob:!0,isExpertise:!1,translation:{en:"mecanic aviatie",ro:"mecanic aviatie"}},{"@id":"/api/v1/profession_jobs/393","@type":"ProfessionJob",id:393,isJob:null,isExpertise:!0,translation:{en:"mecanic locomotivÄ",ro:"mecanic locomotivÄ"}},{"@id":"/api/v1/profession_jobs/349","@type":"ProfessionJob",id:349,isJob:null,isExpertise:!0,translation:{en:"mecanic navigant",ro:"mecanic navigant"}},{"@id":"/api/v1/profession_jobs/381","@type":"ProfessionJob",id:381,isJob:null,isExpertise:!0,translation:{en:"mecanic stagiar",ro:"mecanic stagiar"}},{"@id":"/api/v1/profession_jobs/309","@type":"ProfessionJob",id:309,isJob:null,isExpertise:!0,translation:{en:"mediator",ro:"mediator"}},{"@id":"/api/v1/profession_jobs/211","@type":"ProfessionJob",id:211,isJob:!0,isExpertise:!1,translation:{en:"medic stomatolog",ro:"medic stomatolog"}},{"@id":"/api/v1/profession_jobs/212","@type":"ProfessionJob",id:212,isJob:!0,isExpertise:!1,translation:{en:"medic veterinar",ro:"medic veterinar"}},{"@id":"/api/v1/profession_jobs/213","@type":"ProfessionJob",id:213,isJob:!0,isExpertise:!1,translation:{en:"menajera",ro:"menajera"}},{"@id":"/api/v1/profession_jobs/214","@type":"ProfessionJob",id:214,isJob:!0,isExpertise:!1,translation:{en:"mestesugar",ro:"mestesugar"}},{"@id":"/api/v1/profession_jobs/215","@type":"ProfessionJob",id:215,isJob:!0,isExpertise:!1,translation:{en:"meteorolog",ro:"meteorolog"}},{"@id":"/api/v1/profession_jobs/336","@type":"ProfessionJob",id:336,isJob:null,isExpertise:!0,translation:{en:"meteorolog aeronautic prognozist",ro:"meteorolog aeronautic prognozist"}},{"@id":"/api/v1/profession_jobs/350","@type":"ProfessionJob",id:350,isJob:null,isExpertise:!0,translation:{en:"meteorolog aeronautic tehnician",ro:"meteorolog aeronautic tehnician"}},{"@id":"/api/v1/profession_jobs/534","@type":"ProfessionJob",id:534,isJob:!0,isExpertise:!1,translation:{en:"militar",ro:"militar"}},{"@id":"/api/v1/profession_jobs/535","@type":"ProfessionJob",id:535,isJob:!0,isExpertise:!1,translation:{en:"misionar",ro:"misionar"}},{"@id":"/api/v1/profession_jobs/216","@type":"ProfessionJob",id:216,isJob:!0,isExpertise:!1,translation:{en:"moasa",ro:"moasa"}},{"@id":"/api/v1/profession_jobs/217","@type":"ProfessionJob",id:217,isJob:!0,isExpertise:!1,translation:{en:"modista",ro:"modista"}},{"@id":"/api/v1/profession_jobs/430","@type":"ProfessionJob",id:430,isJob:null,isExpertise:!0,translation:{en:"monitor de schi, snowboard Åi sporturi de alunecare pe zÄpadÄ",ro:"monitor de schi, snowboard Åi sporturi de alunecare pe zÄpadÄ"}},{"@id":"/api/v1/profession_jobs/218","@type":"ProfessionJob",id:218,isJob:!0,isExpertise:!1,translation:{en:"montator",ro:"montator"}},{"@id":"/api/v1/profession_jobs/219","@type":"ProfessionJob",id:219,isJob:!0,isExpertise:!1,translation:{en:"morar",ro:"morar"}},{"@id":"/api/v1/profession_jobs/362","@type":"ProfessionJob",id:362,isJob:null,isExpertise:!0,translation:{en:"motorist",ro:"motorist"}},{"@id":"/api/v1/profession_jobs/220","@type":"ProfessionJob",id:220,isJob:!0,isExpertise:!1,translation:{en:"muncitor ",ro:"muncitor "}},{"@id":"/api/v1/profession_jobs/221","@type":"ProfessionJob",id:221,isJob:!0,isExpertise:!1,translation:{en:"muzeograf",ro:"muzeograf"}},{"@id":"/api/v1/profession_jobs/222","@type":"ProfessionJob",id:222,isJob:!0,isExpertise:!1,translation:{en:"muzician",ro:"muzician"}},{"@id":"/api/v1/profession_jobs/223","@type":"ProfessionJob",id:223,isJob:!0,isExpertise:!1,translation:{en:"naphtolator la imprimerie",ro:"naphtolator la imprimerie"}},{"@id":"/api/v1/profession_jobs/536","@type":"ProfessionJob",id:536,isJob:!0,isExpertise:!1,translation:{en:"navigator",ro:"navigator"}},{"@id":"/api/v1/profession_jobs/224","@type":"ProfessionJob",id:224,isJob:!0,isExpertise:!1,translation:{en:"navigator aviatie civila",ro:"navigator aviatie civila"}},{"@id":"/api/v1/profession_jobs/225","@type":"ProfessionJob",id:225,isJob:!0,isExpertise:!1,translation:{en:"navigator sol",ro:"navigator sol"}},{"@id":"/api/v1/profession_jobs/226","@type":"ProfessionJob",id:226,isJob:!0,isExpertise:!1,translation:{en:"notar",ro:"notar"}}
1,{"@id":"/api/v1/profession_jobs/537","@type":"ProfessionJob",id:537,isJob:!0,isExpertise:!1,translation:{en:"notar public",ro:"notar public"}},{"@id":"/api/v1/profession_jobs/227","@type":"ProfessionJob",id:227,isJob:!0,isExpertise:!1,translation:{en:"ofiter",ro:"ofiter"}},{"@id":"/api/v1/profession_jobs/324","@type":"ProfessionJob",id:324,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er artilerie (cu adeverinÅ£a de echivalare a studiilor în domeniul topografiei Åi cadastrului funciar)",ro:"ofiÅ£er artilerie (cu adeverinÅ£a de echivalare a studiilor în domeniul topografiei Åi cadastrului funciar)"}},{"@id":"/api/v1/profession_jobs/325","@type":"ProfessionJob",id:325,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er cartograf",ro:"ofiÅ£er cartograf"}},{"@id":"/api/v1/profession_jobs/335","@type":"ProfessionJob",id:335,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er electrician",ro:"ofiÅ£er electrician"}},{"@id":"/api/v1/profession_jobs/360","@type":"ProfessionJob",id:360,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er electrician maritim aspirant",ro:"ofiÅ£er electrician maritim aspirant"}},{"@id":"/api/v1/profession_jobs/357","@type":"ProfessionJob",id:357,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er electrician portuar",ro:"ofiÅ£er electrician portuar"}},{"@id":"/api/v1/profession_jobs/538","@type":"ProfessionJob",id:538,isJob:!0,isExpertise:!1,translation:{en:"ofiter maritim",ro:"ofiter maritim"}},{"@id":"/api/v1/profession_jobs/334","@type":"ProfessionJob",id:334,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er mecanic",ro:"ofiÅ£er mecanic"}},{"@id":"/api/v1/profession_jobs/359","@type":"ProfessionJob",id:359,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er mecanic maritim aspirant",ro:"ofiÅ£er mecanic maritim aspirant"}},{"@id":"/api/v1/profession_jobs/356","@type":"ProfessionJob",id:356,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er mecanic portuar",ro:"ofiÅ£er mecanic portuar"}},{"@id":"/api/v1/profession_jobs/330","@type":"ProfessionJob",id:330,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er mecanic secund",ro:"ofiÅ£er mecanic secund"}},{"@id":"/api/v1/profession_jobs/333","@type":"ProfessionJob",id:333,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er punte",ro:"ofiÅ£er punte"}},{"@id":"/api/v1/profession_jobs/358","@type":"ProfessionJob",id:358,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er punte maritim aspirant",ro:"ofiÅ£er punte maritim aspirant"}},{"@id":"/api/v1/profession_jobs/354","@type":"ProfessionJob",id:354,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er punte portuar",ro:"ofiÅ£er punte portuar"}},{"@id":"/api/v1/profession_jobs/328","@type":"ProfessionJob",id:328,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er punte secund",ro:"ofiÅ£er punte secund"}},{"@id":"/api/v1/profession_jobs/323","@type":"ProfessionJob",id:323,isJob:null,isExpertise:!0,translation:{en:"ofiÅ£er topograf",ro:"ofiÅ£er topograf"}},{"@id":"/api/v1/profession_jobs/228","@type":"ProfessionJob",id:228,isJob:!0,isExpertise:!1,translation:{en:"operator",ro:"operator"}},{"@id":"/api/v1/profession_jobs/539","@type":"ProfessionJob",id:539,isJob:!0,isExpertise:!1,translation:{en:"operator calculator",ro:"operator calculator"}},{"@id":"/api/v1/profession_jobs/229","@type":"ProfessionJob",id:229,isJob:!0,isExpertise:!1,translation:{en:"optician",ro:"optician"}},{"@id":"/api/v1/profession_jobs/230","@type":"ProfessionJob",id:230,isJob:!0,isExpertise:!1,translation:{en:"optometrician",ro:"optometrician"}},{"@id":"/api/v1/profession_jobs/540","@type":"ProfessionJob",id:540,isJob:!0,isExpertise:!1,translation:{en:"optometrist",ro:"optometrist"}},{"@id":"/api/v1/profession_jobs/541","@type":"ProfessionJob",id:541,isJob:!0,isExpertise:!1,translation:{en:"ospatar",ro:"ospatar"}},{"@id":"/api/v1/profession_jobs/231","@type":"ProfessionJob",id:231,isJob:!0,isExpertise:!1,translation:{en:"padurar",ro:"padurar"}},{"@id":"/api/v1/profession_jobs/232","@type":"ProfessionJob",id:232,isJob:!0,isExpertise:!1,translation:{en:"parasutist",ro:"parasutist"}},{"@id":"/api/v1/profession_jobs/233","@type":"ProfessionJob",id:233,isJob:!0,isExpertise:!1,translation:{en:"patron",ro:"patron"}},{"@id":"/api/v1/profession_jobs/234","@type":"ProfessionJob",id:234,isJob:!0,isExpertise:!1,translation:{en:"paznic",ro:"paznic"}},{"@id":"/api/v1/profession_jobs/235","@type":"ProfessionJob",id:235,isJob:!0,isExpertise:!1,translation:{en:"pedagog scolar",ro:"pedagog scolar"}},{"@id":"/api/v1/profession_jobs/236","@type":"ProfessionJob",id:236,isJob:!0,isExpertise:!1,translation:{en:"pedichiurist",ro:"pedichiurist"}},{"@id":"/api/v1/profession_jobs/237","@type":"ProfessionJob",id:237,isJob:!0,isExpertise:!1,translation:{en:"peisagist floricultor",ro:"peisagist floricultor"}},{"@id":"/api/v1/profession_jobs/337","@type":"ProfessionJob",id:337,isJob:null,isExpertise:!0,translation:{en:"personal aeronautic pentru protecÅ£ia navigaÅ£iei aeriene Åi telecomunicaÅ£ii aeronautice (PNA-TC)",ro:"personal aeronautic pentru protecÅ£ia navigaÅ£iei aeriene Åi telecomunicaÅ£ii aeronautice (PNA-TC)"}},{"@id":"/api/v1/profession_jobs/351","@type":"ProfessionJob",id:351,isJob:null,isExpertise:!0,translation:{en:"personal aeronautic pentru protecÅ£ia navigaÅ£iei aeriene Åi telecomunicaÅ£ii aeronautice (PNA-TC)",ro:"personal aeronautic pentru protecÅ£ia navigaÅ£iei aeriene Åi telecomunicaÅ£ii aeronautice (PNA-TC)"}},{"@id":"/api/v1/profession_jobs/340","@type":"ProfessionJob",id:340,isJob:null,isExpertise:!0,translation:{en:"personal tehnic aeronautic",ro:"personal tehnic aeronautic"}},{"@id":"/api/v1/profession_jobs/348","@type":"ProfessionJob",id:348,isJob:null,isExpertise:!0,translation:{en:"personal tehnic aeronautic",ro:"personal tehnic aeronautic"}},{"@id":"/api/v1/profession_jobs/238","@type":"ProfessionJob",id:238,isJob:!0,isExpertise:!1,translation:{en:"pescar în ape interioare si de coasta",ro:"pescar în ape interioare si de coasta"}},{"@id":"/api/v1/profession_jobs/239","@type":"ProfessionJob",id:239,isJob:!0,isExpertise:!1,translation:{en:"pictor",ro:"pictor"}},{"@id":"/api/v1/profession_jobs/240","@type":"ProfessionJob",id:240,isJob:!0,isExpertise:!1,translation:{en:"pilot",ro:"pilot"}},{"@id":"/api/v1/profession_jobs/352","@type":"ProfessionJob",id:352,isJob:null,isExpertise:!0,translation:{en:"pilot aeronave",ro:"pilot aeronave"}}
1,{"@id":"/api/v1/profession_jobs/331","@type":"ProfessionJob",id:331,isJob:null,isExpertise:!0,translation:{en:"pilot maritim",ro:"pilot maritim"}},{"@id":"/api/v1/profession_jobs/370","@type":"ProfessionJob",id:370,isJob:null,isExpertise:!0,translation:{en:"pilot maritim",ro:"pilot maritim"}},{"@id":"/api/v1/profession_jobs/332","@type":"ProfessionJob",id:332,isJob:null,isExpertise:!0,translation:{en:"pilot maritim aspirant",ro:"pilot maritim aspirant"}},{"@id":"/api/v1/profession_jobs/371","@type":"ProfessionJob",id:371,isJob:null,isExpertise:!0,translation:{en:"pilot maritim aspirant",ro:"pilot maritim aspirant"}},{"@id":"/api/v1/profession_jobs/416","@type":"ProfessionJob",id:416,isJob:null,isExpertise:!0,translation:{en:"pirotehnist pentru focuri de artificii",ro:"pirotehnist pentru focuri de artificii"}},{"@id":"/api/v1/profession_jobs/241","@type":"ProfessionJob",id:241,isJob:!0,isExpertise:!1,translation:{en:"piscicultor",ro:"piscicultor"}},{"@id":"/api/v1/profession_jobs/242","@type":"ProfessionJob",id:242,isJob:!0,isExpertise:!1,translation:{en:"poet",ro:"poet"}},{"@id":"/api/v1/profession_jobs/243","@type":"ProfessionJob",id:243,isJob:!0,isExpertise:!1,translation:{en:"politolog",ro:"politolog"}},{"@id":"/api/v1/profession_jobs/367","@type":"ProfessionJob",id:367,isJob:null,isExpertise:!0,translation:{en:"pompagiu",ro:"pompagiu"}},{"@id":"/api/v1/profession_jobs/244","@type":"ProfessionJob",id:244,isJob:!0,isExpertise:!1,translation:{en:"pompier",ro:"pompier"}},{"@id":"/api/v1/profession_jobs/245","@type":"ProfessionJob",id:245,isJob:!0,isExpertise:!1,translation:{en:"portar",ro:"portar"}},{"@id":"/api/v1/profession_jobs/542","@type":"ProfessionJob",id:542,isJob:!0,isExpertise:!1,translation:{en:"postas",ro:"postas"}},{"@id":"/api/v1/profession_jobs/297","@type":"ProfessionJob",id:297,isJob:null,isExpertise:!0,translation:{en:"practician în insolvenÅ£Ä",ro:"practician în insolvenÅ£Ä"}},{"@id":"/api/v1/profession_jobs/543","@type":"ProfessionJob",id:543,isJob:!0,isExpertise:!1,translation:{en:"preot",ro:"preot"}},{"@id":"/api/v1/profession_jobs/246","@type":"ProfessionJob",id:246,isJob:!0,isExpertise:!1,translation:{en:"prezentator moda",ro:"prezentator moda"}},{"@id":"/api/v1/profession_jobs/247","@type":"ProfessionJob",id:247,isJob:!0,isExpertise:!1,translation:{en:"prezentator radio",ro:"prezentator radio"}},{"@id":"/api/v1/profession_jobs/248","@type":"ProfessionJob",id:248,isJob:!0,isExpertise:!1,translation:{en:"prezentator televiziune",ro:"prezentator televiziune"}},{"@id":"/api/v1/profession_jobs/544","@type":"ProfessionJob",id:544,isJob:!0,isExpertise:!1,translation:{en:"process engineer",ro:"process engineer"}},{"@id":"/api/v1/profession_jobs/545","@type":"ProfessionJob",id:545,isJob:!0,isExpertise:!1,translation:{en:"product manager",ro:"product manager"}},{"@id":"/api/v1/profession_jobs/341","@type":"ProfessionJob",id:341,isJob:null,isExpertise:!0,translation:{en:"profesor de legislaÅ£ie rutierÄ",ro:"profesor de legislaÅ£ie rutierÄ"}},{"@id":"/api/v1/profession_jobs/249","@type":"ProfessionJob",id:249,isJob:!0,isExpertise:!1,translation:{en:"profesor în învatamântul gimnazial",ro:"profesor în învatamântul gimnazial"}},{"@id":"/api/v1/profession_jobs/250","@type":"ProfessionJob",id:250,isJob:!0,isExpertise:!1,translation:{en:"profesor în învatamântul liceal, postliceal, profesional si de maistri",ro:"profesor în învatamântul liceal, postliceal, profesional si de maistri"}},{"@id":"/api/v1/profession_jobs/251","@type":"ProfessionJob",id:251,isJob:!0,isExpertise:!1,translation:{en:"profesor în învatamântul prescolar",ro:"profesor în învatamântul prescolar"}},{"@id":"/api/v1/profession_jobs/252","@type":"ProfessionJob",id:252,isJob:!0,isExpertise:!1,translation:{en:"profesor în învatamântul primar",ro:"profesor în învatamântul primar"}},{"@id":"/api/v1/profession_jobs/253","@type":"ProfessionJob",id:253,isJob:!0,isExpertise:!1,translation:{en:"profesor universitar",ro:"profesor universitar"}},{"@id":"/api/v1/profession_jobs/546","@type":"ProfessionJob",id:546,isJob:!0,isExpertise:!1,translation:{en:"professional it digital marketing",ro:"professional it digital marketing"}},{"@id":"/api/v1/profession_jobs/547","@type":"ProfessionJob",id:547,isJob:!0,isExpertise:!1,translation:{en:"programator ai",ro:"programator ai"}},{"@id":"/api/v1/profession_jobs/548","@type":"ProfessionJob",id:548,isJob:!0,isExpertise:!1,translation:{en:"programator cnc",ro:"programator cnc"}},{"@id":"/api/v1/profession_jobs/549","@type":"ProfessionJob",id:549,isJob:!0,isExpertise:!1,translation:{en:"programator servicii web",ro:"programator servicii web"}},{"@id":"/api/v1/profession_jobs/550","@type":"ProfessionJob",id:550,isJob:!0,isExpertise:!0,translation:{en:"programator software",ro:"programator software"}},{"@id":"/api/v1/profession_jobs/255","@type":"ProfessionJob",id:255,isJob:!0,isExpertise:!1,translation:{en:"proiectant",ro:"proiectant"}},{"@id":"/api/v1/profession_jobs/401","@type":"ProfessionJob",id:401,isJob:null,isExpertise:!0,translation:{en:"proiectant sisteme de securitate",ro:"proiectant sisteme de securitate"}},{"@id":"/api/v1/profession_jobs/551","@type":"ProfessionJob",id:551,isJob:!0,isExpertise:!1,translation:{en:"project manager",ro:"project manager"}},{"@id":"/api/v1/profession_jobs/256","@type":"ProfessionJob",id:256,isJob:!0,isExpertise:!1,translation:{en:"psiholog",ro:"psiholog"}},{"@id":"/api/v1/profession_jobs/299","@type":"ProfessionJob",id:299,isJob:null,isExpertise:!0,translation:{en:"psiholog (inclusiv alte persoane atestate în psi
1hoterapie, psihopedagogie specialÄ sau psihologie judiciarÄ - evaluarea comportamentului simulat prin tehnicÄ poligraf)",ro:"psiholog (inclusiv alte persoane atestate în psihoterapie, psihopedagogie specialÄ sau psihologie judiciarÄ - evaluarea comportamentului simulat prin tehnicÄ poligraf)"}},{"@id":"/api/v1/profession_jobs/257","@type":"ProfessionJob",id:257,isJob:!0,isExpertise:!1,translation:{en:"psihopedagog",ro:"psihopedagog"}},{"@id":"/api/v1/profession_jobs/552","@type":"ProfessionJob",id:552,isJob:!0,isExpertise:!1,translation:{en:"quality manager",ro:"quality manager"}},{"@id":"/api/v1/profession_jobs/258","@type":"ProfessionJob",id:258,isJob:!0,isExpertise:!1,translation:{en:"redactor",ro:"redactor"}},{"@id":"/api/v1/profession_jobs/553","@type":"ProfessionJob",id:553,isJob:!0,isExpertise:!1,translation:{en:"referent contabil",ro:"referent contabil"}},{"@id":"/api/v1/profession_jobs/554","@type":"ProfessionJob",id:554,isJob:!0,isExpertise:!1,translation:{en:"referent financiar ",ro:"referent financiar "}},{"@id":"/api/v1/profession_jobs/555","@type":"ProfessionJob",id:555,isJob:!0,isExpertise:!1,translation:{en:"referent specialist",ro:"referent specialist"}},{"@id":"/api/v1/profession_jobs/259","@type":"ProfessionJob",id:259,isJob:!0,isExpertise:!1,translation:{en:"regizor",ro:"regizor"}},{"@id":"/api/v1/profession_jobs/556","@type":"ProfessionJob",id:556,isJob:!0,isExpertise:!1,translation:{en:"regizor artistic",ro:"regizor artistic"}},{"@id":"/api/v1/profession_jobs/260","@type":"ProfessionJob",id:260,isJob:!0,isExpertise:!1,translation:{en:"reporter",ro:"reporter"}},{"@id":"/api/v1/profession_jobs/557","@type":"ProfessionJob",id:557,isJob:!0,isExpertise:!1,translation:{en:"reprezentant medical ",ro:"reprezentant medical "}},{"@id":"/api/v1/profession_jobs/558","@type":"ProfessionJob",id:558,isJob:!0,isExpertise:!1,translation:{en:"reprezentant portofoliu bancar",ro:"reprezentant portofoliu bancar"}},{"@id":"/api/v1/profession_jobs/559","@type":"ProfessionJob",id:559,isJob:!0,isExpertise:!1,translation:{en:"reprezentant tehnic",ro:"reprezentant tehnic"}},{"@id":"/api/v1/profession_jobs/560","@type":"ProfessionJob",id:560,isJob:!0,isExpertise:!1,translation:{en:"reprezentant vanzari",ro:"reprezentant vanzari"}},{"@id":"/api/v1/profession_jobs/293","@type":"ProfessionJob",id:293,isJob:null,isExpertise:!0,translation:{en:"responsabil tehnic cu execuÅ£ia",ro:"responsabil tehnic cu execuÅ£ia"}},{"@id":"/api/v1/profession_jobs/261","@type":"ProfessionJob",id:261,isJob:!0,isExpertise:!0,translation:{en:"restaurator",ro:"restaurator"}},{"@id":"/api/v1/profession_jobs/561","@type":"ProfessionJob",id:561,isJob:!0,isExpertise:!1,translation:{en:"revizor auto",ro:"revizor auto"}},{"@id":"/api/v1/profession_jobs/562","@type":"ProfessionJob",id:562,isJob:!0,isExpertise:!1,translation:{en:"sales manager",ro:"sales manager"}},{"@id":"/api/v1/profession_jobs/417","@type":"ProfessionJob",id:417,isJob:null,isExpertise:!0,translation:{en:"salvator montan",ro:"salvator montan"}},{"@id":"/api/v1/profession_jobs/262","@type":"ProfessionJob",id:262,isJob:!0,isExpertise:!0,translation:{en:"scafandru",ro:"scafandru"}},{"@id":"/api/v1/profession_jobs/563","@type":"ProfessionJob",id:563,isJob:!0,isExpertise:!1,translation:{en:"scenarist film si tv",ro:"scenarist film si tv"}},{"@id":"/api/v1/profession_jobs/263","@type":"ProfessionJob",id:263,isJob:!0,isExpertise:!1,translation:{en:"scriitor",ro:"scriitor"}},{"@id":"/api/v1/profession_jobs/564","@type":"ProfessionJob",id:564,isJob:!0,isExpertise:!1,translation:{en:"scrum master",ro:"scrum master"}},{"@id":"/api/v1/profession_jobs/264","@type":"ProfessionJob",id:264,isJob:!0,isExpertise:!1,translation:{en:"sculptor",ro:"sculptor"}},{"@id":"/api/v1/profession_jobs/265","@type":"ProfessionJob",id:265,isJob:!0,isExpertise:!1,translation:{en:"secretara",ro:"secretara"}},{"@id":"/api/v1/profession_jobs/565","@type":"ProfessionJob",id:565,isJob:!0,isExpertise:!1,translation:{en:"security officer",ro:"security officer"}},{"@id":"/api/v1/profession_jobs/566","@type":"ProfessionJob",id:566,isJob:!0,isExpertise:!1,translation:{en:"security operator",ro:"security operator"}},{"@id":"/api/v1/profession_jobs/378","@type":"ProfessionJob",id:378,isJob:null,isExpertise:!0,translation:{en:"Åef de echipaj fluvial",ro:"Åef de echipaj fluvial"}},{"@id":"/api/v1/profession_jobs/363","@type":"ProfessionJob",id:363,isJob:null,isExpertise:!0,translation:{en:"Åef de echipaj maritim",ro:"Åef de echipaj maritim"}},{"@id":"/api/v1/profession_jobs/402","@type":"ProfessionJob",id:402,isJob:null,isExpertise:!0,translation:{en:"Åef formaÅ£ie pazÄ Åi ordine",ro:"Åef formaÅ£ie pazÄ Åi ordine"}},{"@id":"/api/v1/profession_jobs/329","@type":"ProfessionJob",id:329,isJob:null,isExpertise:!0,translation:{en:"Åef mec
1anic",ro:"Åef mecanic"}},{"@id":"/api/v1/profession_jobs/375","@type":"ProfessionJob",id:375,isJob:null,isExpertise:!0,translation:{en:"Åef mecanic fluvial",ro:"Åef mecanic fluvial"}},{"@id":"/api/v1/profession_jobs/355","@type":"ProfessionJob",id:355,isJob:null,isExpertise:!0,translation:{en:"Åef mecanic portuar",ro:"Åef mecanic portuar"}},{"@id":"/api/v1/profession_jobs/397","@type":"ProfessionJob",id:397,isJob:null,isExpertise:!0,translation:{en:"Åef obiectiv",ro:"Åef obiectiv"}},{"@id":"/api/v1/profession_jobs/368","@type":"ProfessionJob",id:368,isJob:null,isExpertise:!0,translation:{en:"Åef timonier maritim",ro:"Åef timonier maritim"}},{"@id":"/api/v1/profession_jobs/567","@type":"ProfessionJob",id:567,isJob:!0,isExpertise:!1,translation:{en:"senior project manager",ro:"senior project manager"}},{"@id":"/api/v1/profession_jobs/568","@type":"ProfessionJob",id:568,isJob:!0,isExpertise:!1,translation:{en:"service engineer",ro:"service engineer"}},{"@id":"/api/v1/profession_jobs/266","@type":"ProfessionJob",id:266,isJob:!0,isExpertise:!1,translation:{en:"sociolog",ro:"sociolog"}},{"@id":"/api/v1/profession_jobs/267","@type":"ProfessionJob",id:267,isJob:!0,isExpertise:!1,translation:{en:"sofer",ro:"sofer"}},{"@id":"/api/v1/profession_jobs/569","@type":"ProfessionJob",id:569,isJob:!0,isExpertise:!1,translation:{en:"sofer profesionist",ro:"sofer profesionist"}},{"@id":"/api/v1/profession_jobs/570","@type":"ProfessionJob",id:570,isJob:!0,isExpertise:!1,translation:{en:"software architect",ro:"software architect"}},{"@id":"/api/v1/profession_jobs/571","@type":"ProfessionJob",id:571,isJob:!0,isExpertise:!1,translation:{en:"software developer",ro:"software developer"}},{"@id":"/api/v1/profession_jobs/572","@type":"ProfessionJob",id:572,isJob:!0,isExpertise:!1,translation:{en:"software qa analyst",ro:"software qa analyst"}},{"@id":"/api/v1/profession_jobs/573","@type":"ProfessionJob",id:573,isJob:!0,isExpertise:!1,translation:{en:"software web engineer",ro:"software web engineer"}},{"@id":"/api/v1/profession_jobs/268","@type":"ProfessionJob",id:268,isJob:!0,isExpertise:!1,translation:{en:"solist instrumentist",ro:"solist instrumentist"}},{"@id":"/api/v1/profession_jobs/269","@type":"ProfessionJob",id:269,isJob:!0,isExpertise:!1,translation:{en:"solist vocal",ro:"solist vocal"}},{"@id":"/api/v1/profession_jobs/574","@type":"ProfessionJob",id:574,isJob:!0,isExpertise:!1,translation:{en:"solution architect",ro:"solution architect"}},{"@id":"/api/v1/profession_jobs/575","@type":"ProfessionJob",id:575,isJob:!0,isExpertise:!1,translation:{en:"somer",ro:"somer"}},{"@id":"/api/v1/profession_jobs/270","@type":"ProfessionJob",id:270,isJob:!0,isExpertise:!1,translation:{en:"sora medicala",ro:"sora medicala"}},{"@id":"/api/v1/profession_jobs/576","@type":"ProfessionJob",id:576,isJob:!0,isExpertise:!1,translation:{en:"specialist achizitii/ contracte ",ro:"specialist achizitii/ contracte "}},{"@id":"/api/v1/profession_jobs/577","@type":"ProfessionJob",id:577,isJob:!0,isExpertise:!1,translation:{en:"specialist arii protejate",ro:"specialist arii protejate"}},{"@id":"/api/v1/profession_jobs/578","@type":"ProfessionJob",id:578,isJob:!0,isExpertise:!1,translation:{en:"specialist comunicare si relatii publice",ro:"specialist comunicare si relatii publice"}},{"@id":"/api/v1/profession_jobs/579","@type":"ProfessionJob",id:579,isJob:!0,isExpertise:!1,translation:{en:"specialist comunitati si evenimente",ro:"specialist comunitati si evenimente"}},{"@id":"/api/v1/profession_jobs/580","@type":"ProfessionJob",id:580,isJob:!0,isExpertise:!1,translation:{en:"specialist in managementul riscului",ro:"specialist in managementul riscului"}},{"@id":"/api/v1/profession_jobs/581","@type":"ProfessionJob",id:581,isJob:!0,isExpertise:!1,translation:{en:"specialist in stiintele comunicarii",ro:"specialist in stiintele comunicarii"}},{"@id":"/api/v1/profession_jobs/582","@type":"ProfessionJob",id:582,isJob:!0,isExpertise:!1,translation:{en:"specialist in turism",ro:"specialist in turism"}},{"@id":"/api/v1/profession_jobs/583","@type":"ProfessionJob",id:583,isJob:!0,isExpertise:!1,translation:{en:"specialist it",ro:"specialist it"}},{"@id":"/api/v1/profession_jobs/584","@type":"ProfessionJob",id:584,isJob:!0,isExpertise:!1,translation:{en:"specialist licitatii",ro:"specialist licitatii"}},{"@id":"/api/v1/profession_jobs/585","@type":"ProfessionJob",id:585,isJob:!0,isExpertise:!1,translation:{en:"specialist logistica",ro:"specialist logistica"}},{"@id":"/api/v1/profession_jobs/586","@type":"ProfessionJob",id:586,isJob:!0,isExpertise:!1,translation:{en:"specialist marketing",ro:"specialist marketing"}},{"@id":"/api/v1/profession_jobs/587","@type":"ProfessionJob",id:587,isJob:!0,isExpertise:!1,translation:{en:"specialist marketing online (content marketing si seo)",ro:"specialist marketing online (content marketing si seo)"}},{"@id":"/api/v1/profession_jobs/588","@type":"ProfessionJob",id:588,isJob:!0,isExpertise:!1,translation:{en:"specialist politici europene",ro:"specialist politici europene"}},{"@id":"/api/v1/profession_jobs/589","@type":"ProfessionJob",id:589,isJob:!0,isExpertise:!1,translation:{en:"specialist relatii sociale",ro:"specialist relatii sociale"}}
1,{"@id":"/api/v1/profession_jobs/590","@type":"ProfessionJob",id:590,isJob:!0,isExpertise:!1,translation:{en:"specialist resurse umane",ro:"specialist resurse umane"}},{"@id":"/api/v1/profession_jobs/591","@type":"ProfessionJob",id:591,isJob:!0,isExpertise:!1,translation:{en:"specialist seo",ro:"specialist seo"}},{"@id":"/api/v1/profession_jobs/592","@type":"ProfessionJob",id:592,isJob:!0,isExpertise:!1,translation:{en:"specialist suport it",ro:"specialist suport it"}},{"@id":"/api/v1/profession_jobs/271","@type":"ProfessionJob",id:271,isJob:!0,isExpertise:!1,translation:{en:"statistician",ro:"statistician"}},{"@id":"/api/v1/profession_jobs/272","@type":"ProfessionJob",id:272,isJob:!0,isExpertise:!1,translation:{en:"stewardesa",ro:"stewardesa"}},{"@id":"/api/v1/profession_jobs/593","@type":"ProfessionJob",id:593,isJob:!0,isExpertise:!1,translation:{en:"sticlar",ro:"sticlar"}},{"@id":"/api/v1/profession_jobs/594","@type":"ProfessionJob",id:594,isJob:!0,isExpertise:!1,translation:{en:"stomatolog",ro:"stomatolog"}},{"@id":"/api/v1/profession_jobs/273","@type":"ProfessionJob",id:273,isJob:!0,isExpertise:!1,translation:{en:"subinginer",ro:"subinginer"}},{"@id":"/api/v1/profession_jobs/319","@type":"ProfessionJob",id:319,isJob:null,isExpertise:!0,translation:{en:"subinginer cadastru",ro:"subinginer cadastru"}},{"@id":"/api/v1/profession_jobs/321","@type":"ProfessionJob",id:321,isJob:null,isExpertise:!0,translation:{en:"subinginer cartograf",ro:"subinginer cartograf"}},{"@id":"/api/v1/profession_jobs/318","@type":"ProfessionJob",id:318,isJob:null,isExpertise:!0,translation:{en:"subinginer geodez",ro:"subinginer geodez"}},{"@id":"/api/v1/profession_jobs/320","@type":"ProfessionJob",id:320,isJob:null,isExpertise:!0,translation:{en:"subinginer topograf",ro:"subinginer topograf"}},{"@id":"/api/v1/profession_jobs/322","@type":"ProfessionJob",id:322,isJob:null,isExpertise:!0,translation:{en:"subinginer topograf minier",ro:"subinginer topograf minier"}},{"@id":"/api/v1/profession_jobs/595","@type":"ProfessionJob",id:595,isJob:!0,isExpertise:!1,translation:{en:"supervizor constructii",ro:"supervizor constructii"}},{"@id":"/api/v1/profession_jobs/596","@type":"ProfessionJob",id:596,isJob:!0,isExpertise:!1,translation:{en:"sustainability risk analyst ",ro:"sustainability risk analyst "}},{"@id":"/api/v1/profession_jobs/597","@type":"ProfessionJob",id:597,isJob:!0,isExpertise:!1,translation:{en:"system administrator",ro:"system administrator"}},{"@id":"/api/v1/profession_jobs/598","@type":"ProfessionJob",id:598,isJob:!0,isExpertise:!1,translation:{en:"system software engineer",ro:"system software engineer"}},{"@id":"/api/v1/profession_jobs/275","@type":"ProfessionJob",id:275,isJob:!0,isExpertise:!1,translation:{en:"tâmplar universal",ro:"tâmplar universal"}},{"@id":"/api/v1/profession_jobs/274","@type":"ProfessionJob",id:274,isJob:!0,isExpertise:!1,translation:{en:"tapiter",ro:"tapiter"}},{"@id":"/api/v1/profession_jobs/599","@type":"ProfessionJob",id:599,isJob:!0,isExpertise:!1,translation:{en:"taximetrist",ro:"taximetrist"}},{"@id":"/api/v1/profession_jobs/600","@type":"ProfessionJob",id:600,isJob:!0,isExpertise:!1,translation:{en:"team leader",ro:"team leader"}},{"@id":"/api/v1/profession_jobs/601","@type":"ProfessionJob",id:601,isJob:!0,isExpertise:!1,translation:{en:"technician aeronave",ro:"technician aeronave"}},{"@id":"/api/v1/profession_jobs/602","@type":"ProfessionJob",id:602,isJob:!0,isExpertise:!1,translation:{en:"tehnician aparatura medicala",ro:"tehnician aparatura medicala"}},{"@id":"/api/v1/profession_jobs/603","@type":"ProfessionJob",id:603,isJob:!0,isExpertise:!1,translation:{en:"tehnician automatist",ro:"tehnician automatist"}},{"@id":"/api/v1/profession_jobs/425","@type":"ProfessionJob",id:425,isJob:null,isExpertise:!0,translation:{en:"tehnician cadastru",ro:"tehnician cadastru"}},{"@id":"/api/v1/profession_jobs/427","@type":"ProfessionJob",id:427,isJob:null,isExpertise:!0,translation:{en:"tehnician cartograf",ro:"tehnician cartograf"}},{"@id":"/api/v1/profession_jobs/604","@type":"ProfessionJob",id:604,isJob:!0,isExpertise:!1,translation:{en:"tehnician de aviatie",ro:"tehnician de aviatie"}},{"@id":"/api/v1/profession_jobs/605","@type":"ProfessionJob",id:605,isJob:!0,isExpertise:!1,translation:{en:"tehnician de management strategic",ro:"tehnician de management strategic"}},{"@id":"/api/v1/profession_jobs/606","@type":"ProfessionJob",id:606,isJob:!0,isExpertise:!1,translation:{en:"tehnician de patr
1imoniu cultural",ro:"tehnician de patrimoniu cultural"}},{"@id":"/api/v1/profession_jobs/304","@type":"ProfessionJob",id:304,isJob:null,isExpertise:!0,translation:{en:"tehnician dentar",ro:"tehnician dentar"}},{"@id":"/api/v1/profession_jobs/607","@type":"ProfessionJob",id:607,isJob:!0,isExpertise:!1,translation:{en:"tehnician electronist",ro:"tehnician electronist"}},{"@id":"/api/v1/profession_jobs/608","@type":"ProfessionJob",id:608,isJob:!0,isExpertise:!1,translation:{en:"tehnician energetic",ro:"tehnician energetic"}},{"@id":"/api/v1/profession_jobs/609","@type":"ProfessionJob",id:609,isJob:!0,isExpertise:!1,translation:{en:"tehnician in constructii lucrari publice",ro:"tehnician in constructii lucrari publice"}},{"@id":"/api/v1/profession_jobs/610","@type":"ProfessionJob",id:610,isJob:!0,isExpertise:!1,translation:{en:"tehnician in refrigerare si climatizare",ro:"tehnician in refrigerare si climatizare"}},{"@id":"/api/v1/profession_jobs/611","@type":"ProfessionJob",id:611,isJob:!0,isExpertise:!1,translation:{en:"tehnician in transporturi",ro:"tehnician in transporturi"}},{"@id":"/api/v1/profession_jobs/612","@type":"ProfessionJob",id:612,isJob:!0,isExpertise:!1,translation:{en:"tehnician in turism",ro:"tehnician in turism"}},{"@id":"/api/v1/profession_jobs/613","@type":"ProfessionJob",id:613,isJob:!0,isExpertise:!1,translation:{en:"tehnician it",ro:"tehnician it"}},{"@id":"/api/v1/profession_jobs/614","@type":"ProfessionJob",id:614,isJob:!0,isExpertise:!1,translation:{en:"tehnician mecanic",ro:"tehnician mecanic"}},{"@id":"/api/v1/profession_jobs/615","@type":"ProfessionJob",id:615,isJob:!0,isExpertise:!1,translation:{en:"tehnician operator tehnica de calcul",ro:"tehnician operator tehnica de calcul"}},{"@id":"/api/v1/profession_jobs/616","@type":"ProfessionJob",id:616,isJob:!0,isExpertise:!1,translation:{en:"tehnician prelucrari mecanice",ro:"tehnician prelucrari mecanice"}},{"@id":"/api/v1/profession_jobs/617","@type":"ProfessionJob",id:617,isJob:!0,isExpertise:!1,translation:{en:"tehnician retele telecomunicatii",ro:"tehnician retele telecomunicatii"}},{"@id":"/api/v1/profession_jobs/618","@type":"ProfessionJob",id:618,isJob:!0,isExpertise:!1,translation:{en:"tehnician robotica",ro:"tehnician robotica"}},{"@id":"/api/v1/profession_jobs/619","@type":"ProfessionJob",id:619,isJob:!0,isExpertise:!1,translation:{en:"tehnician silvic",ro:"tehnician silvic"}},{"@id":"/api/v1/profession_jobs/620","@type":"ProfessionJob",id:620,isJob:!0,isExpertise:!1,translation:{en:"tehnician telecomunicatii",ro:"tehnician telecomunicatii"}},{"@id":"/api/v1/profession_jobs/426","@type":"ProfessionJob",id:426,isJob:null,isExpertise:!0,translation:{en:"tehnician topograf",ro:"tehnician topograf"}},{"@id":"/api/v1/profession_jobs/428","@type":"ProfessionJob",id:428,isJob:null,isExpertise:!0,translation:{en:"tehnician topograf minier",ro:"tehnician topograf minier"}},{"@id":"/api/v1/profession_jobs/418","@type":"ProfessionJob",id:418,isJob:null,isExpertise:!0,translation:{en:"tehnician veterinar",ro:"tehnician veterinar"}},{"@id":"/api/v1/profession_jobs/276","@type":"ProfessionJob",id:276,isJob:!0,isExpertise:!1,translation:{en:"tehnoredactor",ro:"tehnoredactor"}},{"@id":"/api/v1/profession_jobs/621","@type":"ProfessionJob",id:621,isJob:!0,isExpertise:!1,translation:{en:"telecomunicatii",ro:"telecomunicatii"}},{"@id":"/api/v1/profession_jobs/622","@type":"ProfessionJob",id:622,isJob:!0,isExpertise:!1,translation:{en:"terapeut osteopat",ro:"terapeut osteopat"}},{"@id":"/api/v1/profession_jobs/623","@type":"ProfessionJob",id:623,isJob:!0,isExpertise:!1,translation:{en:"test analyst",ro:"test analyst"}},{"@id":"/api/v1/profession_jobs/624","@type":"ProfessionJob",id:624,isJob:!0,isExpertise:!1,translation:{en:"test dev.",ro:"test dev."}},{"@id":"/api/v1/profession_jobs/625","@type":"ProfessionJob",id:625,isJob:!0,isExpertise:!1,translation:{en:"test manager automotive",ro:"test manager automotive"}},{"@id":"/api/v1/profession_jobs/374","@type":"ProfessionJob",id:374,isJob:null,isExpertise:!0,translation:{en:"timonier fluvial",ro:"timonier fluvial"}},{"@id":"/api/v1/profession_jobs/361","@type":"ProfessionJob",id:361,isJob:null,isExpertise:!0,translation:{en:"timonier maritim",ro:"timonier maritim"}},{"@id":"/api/v1/profession_jobs/626","@type":"ProfessionJob",id:626,isJob:!0,isExpertise:!1,translation:{en:"topograf",ro:"topograf"}},{"@id":"/api/v1/profession_jobs/277","@type":"ProfessionJob",id:27
17,isJob:!0,isExpertise:!1,translation:{en:"traducator",ro:"traducator"}},{"@id":"/api/v1/profession_jobs/627","@type":"ProfessionJob",id:627,isJob:!0,isExpertise:!1,translation:{en:"trainer",ro:"trainer"}},{"@id":"/api/v1/profession_jobs/278","@type":"ProfessionJob",id:278,isJob:!0,isExpertise:!1,translation:{en:"translator",ro:"translator"}},{"@id":"/api/v1/profession_jobs/296","@type":"ProfessionJob",id:296,isJob:null,isExpertise:!0,translation:{en:"urbanist",ro:"urbanist"}},{"@id":"/api/v1/profession_jobs/628","@type":"ProfessionJob",id:628,isJob:!0,isExpertise:!1,translation:{en:"ux designer",ro:"ux designer"}},{"@id":"/api/v1/profession_jobs/279","@type":"ProfessionJob",id:279,isJob:!0,isExpertise:!1,translation:{en:"vânator",ro:"vânator"}},{"@id":"/api/v1/profession_jobs/629","@type":"ProfessionJob",id:629,isJob:!0,isExpertise:!1,translation:{en:"vanzari",ro:"vanzari"}},{"@id":"/api/v1/profession_jobs/280","@type":"ProfessionJob",id:280,isJob:!0,isExpertise:!1,translation:{en:"vânzator",ro:"vânzator"}},{"@id":"/api/v1/profession_jobs/630","@type":"ProfessionJob",id:630,isJob:!0,isExpertise:!1,translation:{en:"vba developer",ro:"vba developer"}},{"@id":"/api/v1/profession_jobs/291","@type":"ProfessionJob",id:291,isJob:null,isExpertise:!0,translation:{en:"verificator de proiect atestat",ro:"verificator de proiect atestat"}},{"@id":"/api/v1/profession_jobs/631","@type":"ProfessionJob",id:631,isJob:!0,isExpertise:!1,translation:{en:"videograf",ro:"videograf"}},{"@id":"/api/v1/profession_jobs/632","@type":"ProfessionJob",id:632,isJob:!0,isExpertise:!1,translation:{en:"virtual customers assistant",ro:"virtual customers assistant"}},{"@id":"/api/v1/profession_jobs/281","@type":"ProfessionJob",id:281,isJob:!0,isExpertise:!1,translation:{en:"viticultor",ro:"viticultor"}},{"@id":"/api/v1/profession_jobs/633","@type":"ProfessionJob",id:633,isJob:!0,isExpertise:!1,translation:{en:"vopsitor auto",ro:"vopsitor auto"}},{"@id":"/api/v1/profession_jobs/634","@type":"ProfessionJob",id:634,isJob:!0,isExpertise:!1,translation:{en:"web analyst",ro:"web analyst"}},{"@id":"/api/v1/profession_jobs/635","@type":"ProfessionJob",id:635,isJob:!0,isExpertise:!1,translation:{en:"web designer",ro:"web designer"}},{"@id":"/api/v1/profession_jobs/636","@type":"ProfessionJob",id:636,isJob:!0,isExpertise:!1,translation:{en:"web developer",ro:"web developer"}},{"@id":"/api/v1/profession_jobs/282","@type":"ProfessionJob",id:282,isJob:!0,isExpertise:!1,translation:{en:"ziarist",ro:"ziarist"}},{"@id":"/api/v1/profession_jobs/283","@type":"ProfessionJob",id:283,isJob:!0,isExpertise:!1,translation:{en:"zidar cosuri fabrica",ro:"zidar cosuri fabrica"}},{"@id":"/api/v1/profession_jobs/284","@type":"ProfessionJob",id:284,isJob:!0,isExpertise:!1,translation:{en:"zugrav, vopsitor",ro:"zugrav, vopsitor"}}];var ks={props:["type","isExpertise","isJob","modelValue","displayTotal","getTotal","status","localCenter","required","industriesSelectedValue"],data(){return{industriesSelected:this.industriesSelectedValue?this.industriesSelectedValue:[],industries:null,industriesCount:[],industrySearch:null,isLoading:!1}},computed:{filteredIndustries(){if(!this.industries)return[];let e=this.industries.map(e=>{const t=this.getTranslatedValue(e);return{...e,title:t,display:t}});return this.industrySearch?e.filter(e=>e.title.toString().toLowerCase().indexOf(this.industrySearch.toLowerCase())>=0):e}},watch:{modelValue:function(e){this.modelValue?this.industrySearch=this.getTranslatedValue(this.modelValue):this.industrySearch=""}},created(){this.modelValue&&(this.industrySearch=this.getTranslatedValue(this.modelValue)),this.getTotal?this.loadIndustries():this.retrieveIndustries()},methods:{getTranslatedValue(e){return(0,ds.KO)(e,this.$t,this.$i18n.locale)},loadIndustries(){let e=void 0!==this.localCenter?this.localCenter:"0",t=void 0!==this.status?this.status:"ACTIVE";this.$http.plain.get("/users/profession-job-count/"+e+"/"+t).then(e=>{this.industriesCount=e.data,this.retrieveIndustries()}).catch(e=>{console.error(e)})},retrieveIndustries(){let e=[];for(let t of vs){let i=this.getTranslatedValue(t),s=i;if(this.getTotal){let e=this.industriesCount.find(e=>parseInt(e.tid)===t.id);void 0!==e?(this.displayTotal&&(s+=" - "+e.nu),t.total=parseInt(e.nu)):(this.displayTotal&&(s+=" - 0"),t.total=0)}this.isExpertise&&this.isExpertise!==t.isExpertise||this.isJob&&this.isJob!==t.isJob||e.push({"@id":t["@id"],id:t.id,total:t.total,title:i,display:s,name:t.name,tenant:t.tenant,translation:t.translation})}e.sort(function(e,t){return e.title.localeCompare(t.title)}),this.industries=e},change(e){let t=e||null;this.$emit("update:modelValue",t)}}};const Cs=(0,Li.A)(ks,[["render",ys]]);var Ls=Cs;const ws={value:null},_s=["value"],Es={key:0},$s={key:1}
1,Fs={key:2};function Ts(e,t,i,s,a,n){const o=(0,c.g2)("b-select"),l=(0,c.g2)("b-field"),r=(0,c.g2)("EducationIndustryList");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(l,{label:e.$t("Education status"),class:(0,u.C4)(["mb-5",{required:i.isRequired}])},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.data.educationStatus,"onUpdate:modelValue":[t[0]||(t[0]=e=>a.data.educationStatus=e),n.changeStatus],disabled:i.disabled},{default:(0,c.k6)(()=>[(0,c.Lk)("option",ws,(0,u.v_)(e.$t("Education level"))+"...",1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.educationStatuses,t=>((0,c.uX)(),(0,c.CE)("option",{key:t,value:t},(0,u.v_)(e.$t(t)),9,_s))),128))]),_:1},8,["modelValue","disabled","onUpdate:modelValue"])]),_:1},8,["label","class"]),["DOCTORAL","POSTDOCTORAL"].includes(a.data.educationStatus)?((0,c.uX)(),(0,c.CE)("div",Es,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("DOCTORAL")),1),(0,c.bF)(r,{key:"edu_doc",modelValue:a.data.educationPhd,"onUpdate:modelValue":[t[1]||(t[1]=e=>a.data.educationPhd=e),n.emit],"display-total":!1,"get-total":!1,disabled:i.disabled,type:"autocomplete",class:"mb-4"},null,8,["modelValue","disabled","onUpdate:modelValue"])])):(0,c.Q3)("",!0),["DOCTORAL","MASTER"].includes(a.data.educationStatus)?((0,c.uX)(),(0,c.CE)("div",$s,[(0,c.eW)((0,u.v_)(e.$t("MASTER"))+" ",1),(0,c.bF)(r,{key:"edu_master",modelValue:a.data.educationMaster,"onUpdate:modelValue":[t[2]||(t[2]=e=>a.data.educationMaster=e),n.emit],"display-total":!1,disabled:i.disabled,"get-total":!1,class:"mb-4",type:"autocomplete"},null,8,["modelValue","disabled","onUpdate:modelValue"])])):(0,c.Q3)("",!0),["DOCTORAL","MASTER","UNIVERSITY","UNIVERSITY-DEGREE"].includes(a.data.educationStatus)?((0,c.uX)(),(0,c.CE)("div",Fs,[(0,c.eW)((0,u.v_)(e.$t(["DOCTORAL","MASTER","UNIVERSITY-DEGREE"].includes(a.data.educationStatus)?"UNIVERSITY-DEGREE":"UNIVERSITY"))+" ",1),(0,c.bF)(r,{key:"edu_univ",modelValue:a.data.educationUniversity,"onUpdate:modelValue":[t[3]||(t[3]=e=>a.data.educationUniversity=e),n.emit],"display-total":!1,"get-total":!1,disabled:i.disabled,class:"mb-4",type:"autocomplete"},null,8,["modelValue","disabled","onUpdate:modelValue"])])):(0,c.Q3)("",!0)])}const Ss={key:0},As=["value"],Ps={key:2,class:"orgo-table-wrap"};function Is(e,t,i,s,a,n){const o=(0,c.g2)("b-autocomplete"),l=(0,c.g2)("b-select"),r=(0,c.g2)("b-field"),d=(0,c.g2)("b-checkbox"),m=(0,c.g2)("b-table-column"),p=(0,c.g2)("b-table");return a.industries?((0,c.uX)(),(0,c.CE)("section",Ss,["autocomplete"===i.type?((0,c.uX)(),(0,c.Wv)(o,{key:0,modelValue:a.industrySearch,"onUpdate:modelValue":t[0]||(t[0]=e=>a.industrySearch=e),placeholder:e.$t("Education industry"),data:n.filteredIndustries,"open-on-focus":!0,"dropdown-position":"bottom",disabled:i.disabled,field:"display",expanded:!0,class:(0,u.C4)(i.required?"required":""),loading:a.isLoading,required:!!i.required,onSelect:n.change},null,8,["modelValue","placeholder","data","disabled","class","loading","required","onSelect"])):(0,c.Q3)("",!0),"select"===i.type?((0,c.uX)(),(0,c.Wv)(r,{key:1,label:e.$t("Education industry"),class:(0,u.C4)(i.required?"required":"")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{"model-value":i.modelValue,disabled:i.disabled,"onUpdate:modelValue":n.change},{default:(0,c.k6)(()=>[t[3]||(t[3]=(0,c.Lk)("option",{value:null},"...",-1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.industries,e=>((0,c.uX)(),(0,c.CE)("option",{key:e["@id"],value:e["@id"]},(0,u.v_)(e.name),9,As))),128))]),_:1},8,["model-value","disabled","onUpdate:modelValue"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),"table"===i.type||"table_selector"===i.type?((0,c.uX)(),(0,c.CE)("div",Ps,[(0,c.bF)(p,{data:a.industries},{default:(0,c.k6)(()=>["table_selector"===i.type?((0,c.uX)(),(0,c.Wv)(m,{key:0},{default:(0,c.k6)(i=>[(0,c.bF)(d,{modelValue:a.industriesSelected,"onUpdate:modelValue":[t[1]||(t[1]=e=>a.industriesSelected=e),t[2]||(t[2]=t=>e.$emit("update:modelValue",a.industriesSelected))],"native-value":i.row.id},null,8,["modelValue","native-value"])]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(m,{label:e.$t("title"),sortable:"",field:"value"},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.display),1)]),_:1},8,["label"]),(0,c.bF)(m,{label:e.$t("total"),sortable:"",field:"total"},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.total),1)]),_:1},8,["label"])]),_:1},8,["data"])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)}var Ms={props:["type","modelValue","displayTotal","disabled","getTotal","status","localCenter","required","industriesSelectedValue"],data(){return{industriesSelected:this.industriesSelectedValue?this.industriesSelectedValue:[],industries:null,industriesCount:[],industrySearch:null,isLoading:!1}},computed:{filteredIndustries(){if(!this.industries)return[];let e=this.industries.map(e=>{const t=this.getTranslatedValue(e);return{...e,title:t,display:t}});return this.industrySearch?e.filter(e=>e.title.toString().toLowerCase().indexOf(this.industrySearch.toLowerCase())>=0):e}},watch:{modelValue:function(e){this.modelValue?this.industrySearch=this.getTranslatedValue(this.modelValue):this.industrySearch=""}},created(){this.modelValue&&(this.industrySearch=this.getTranslatedValue(this.modelValue)),this.getTotal?this.loadIndustries():this.industries||this.retrieveIndustries()},methods:{getTranslatedValue(e){return(0,ds.KO)(e,this.$t,this.$i18n.locale)},loadIndustries(){let e=void 0!==this.localCenter?this.localCenter:"0",t=void 0!==this.status?this.status:"ACTIVE";this.$http.plain.get("/users/profession-count/"+e+"/"+t).then(e=>{this.industriesCount=e.data,this.industries||this.retrieveIndustries()}).catch(e=>{console.error(e)})},retrieveIndustries(){this.$http.plain.get("/education_industries").then(e=>{let t=[];for(let i of e.data["hydra:member"]){let e=this.getTranslatedValue(i),s=e;if(this.getTotal){let e=this.industriesCount.find(e=>parseInt(e.tid)===i.id);void 0!==e?(this.displayTotal&&(s+=" - "+e.nu),i.total=parseInt(e.nu)):(this.displayTotal&&(s+=" - 0"),i.total=0)}t.push({"@id":i["@id"],id:i.id,total:i.total,title:e,display:s,name:i.name,tenant:i.tenant,translation:i.translation})}t.sort(function(e,t){return e.title.localeCompare(t.title)}),this.industries=t})},change(e){let t=e||null;this.$emit("update:modelValue",t)}}};const xs=(0,Li.A)(Ms,[["render",Is]]);var Ns=xs,Us={props:["isRequired","item","modelValue","disabled"],data(){return{educationStatuses:["PRIMARY","SECONDARY","HIGHSCHOOL","UNIVERSITY","UNIVERSITY-DEGREE","MASTER","DOCTORAL","POSTDOCTORAL"],data:{...this.init()}}},watch:{item:function(){this.data={...this.init()}}},created(){},methods:{changeStatus(e){"HIGHSCHOOL"===e?(this.data.educationMaster=null,this.data.educationPhd=null,this.data.educationUniversity=null):"UNIVERSITY"===e||"UNIVERSITY-DEGREE"===e?(this.data.educationPhd=null,this.data.educationMaster=null):"MASTER"===e?this.data.educationPhd=null:(this.data.educationMaster=null,this.data.educationPhd=null,this.data.educationUniversity=null),this.emit
1()},emit(){this.$emit("update:modelValue",this.data)},init(){return{educationStatus:this.item&&this.item.educationStatus?this.item.educationStatus:null,educationMaster:this.item&&this.item.educationMaster?this.item.educationMaster:null,educationPhd:this.item&&this.item.educationPhd?this.item.educationPhd:null,educationUniversity:this.item&&this.item.educationUniversity?this.item.educationUniversity:null}}},computed:{...(0,vi.L8)(["tenant","user"])},components:{EducationIndustryList:Ns}};const Ds=(0,Li.A)(Us,[["render",Ts],["__scopeId","data-v-3a091570"]]);var Xs=Ds;const Vs={class:"mt-5"},Rs={key:1,class:"orgo-table-wrap"},Os=["onClick"],Qs=["onClick"],Bs=["onClick"],Gs={key:0},Ws={class:"level-left ml-3"};function js(e,t,i,s,a,n){const o=(0,c.g2)("b-button"),l=(0,c.g2)("b-input"),r=(0,c.g2)("b-table-column"),d=(0,c.g2)("EducationIndustryList"),p=(0,c.g2)("font-awesome-icon"),h=(0,c.g2)("b-table");return(0,c.uX)(),(0,c.CE)("section",Vs,[i.disabled?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(o,{key:0,size:"is-small",type:"is-primary",class:(0,u.C4)([{"is-loading":a.isLoadingAdd},"mb-4 is-rounded"]),"icon-left":"fa-plus",onClick:n.newItemAdd},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("add")),1)]),_:1},8,["class","onClick"])),a.items.length>0?((0,c.uX)(),(0,c.CE)("div",Rs,[(0,c.bF)(h,{data:a.items},{default:(0,c.k6)(()=>[(0,c.bF)(r,{label:e.$t("title")},{default:(0,c.k6)(e=>[a.showEditRow!==e.index?((0,c.uX)(),(0,c.CE)("span",{key:0,onClick:t=>a.showEditRow=e.index},(0,u.v_)(e.row.name),9,Os)):(0,c.Q3)("",!0),a.showEditRow===e.index?((0,c.uX)(),(0,c.Wv)(l,{key:1,modelValue:a.items[e.index].name,"onUpdate:modelValue":t=>a.items[e.index].name=t,loading:a.isLoadingEdit,onKeyup:(0,m.jR)(n.hideEditRow,["esc"])},null,8,["modelValue","onUpdate:modelValue","loading","onKeyup"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(r,{label:e.$t("Issuer")},{default:(0,c.k6)(e=>[a.showEditRow!==e.index?((0,c.uX)(),(0,c.CE)("span",{key:0,onClick:t=>a.showEditRow=e.index},(0,u.v_)(e.row.issuer),9,Qs)):(0,c.Q3)("",!0),a.showEditRow===e.index?((0,c.uX)(),(0,c.Wv)(l,{key:1,modelValue:a.items[e.index].issuer,"onUpdate:modelValue":t=>a.items[e.index].issuer=t,loading:a.isLoadingEdit,onKeyup:(0,m.jR)(n.hideEditRow,["esc"])},null,8,["modelValue","onUpdate:modelValue","loading","onKeyup"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(r,{label:e.$t("Year obtained"),sortable:"",field:"year"},{default:(0,c.k6)(e=>[a.showEditRow!==e.index?((0,c.uX)(),(0,c.CE)("span",{key:0,onClick:t=>a.showEditRow=e.index},(0,u.v_)(e.row.year),9,Bs)):(0,c.Q3)("",!0),a.showEditRow===e.index?((0,c.uX)(),(0,c.Wv)(l,{key:1,modelValue:a.items[e.index].year,"onUpdate:modelValue":t=>a.items[e.index].year=t,type:"number",style:{width:"86px"},loading:a.isLoadingEdit,onKeyup:(0,m.jR)(n.hideEditRow,["esc"])},null,8,["modelValue","onUpdate:modelValue","loading","onKeyup"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(r,{label:e.$t("Education industry")},{default:(0,c.k6)(e=>[a.showEditRow!==e.index&&e.row.educationIndustry?((0,c.uX)(),(0,c.CE)("span",Gs,(0,u.v_)(n.getTranslatedValue(e.row.educationIndustry)),1)):(0,c.Q3)("",!0),a.showEditRow===e.index?((0,c.uX)(),(0,c.Wv)(d,{key:1,modelValue:a.items[e.index].educationIndustry,"onUpdate:modelValue":t=>a.items[e.index].educationIndustry=t,loading:a.isLoadingEdit,"display-total":!1,"get-total":!1,type:"autocomplete"},null,8,["modelValue","onUpdate:modelValue","loading"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),i.disabled?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(r,{key:0},{default:(0,c.k6)(t=>[(0,c.Lk)("div",Ws,[a.showEditRow!==t.index?((0,c.uX)(),(0,c.Wv)(o,{key:0,class:"is-small is-primary is-rounded",onClick:e=>a.showEditRow=t.index},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("edit")),1)]),_:1},8,["onClick"])):(0,c.Q3)("",!0),a.showEditRow===t.index?((0,c.uX)(),(0,c.Wv)(o,{key:1,class:(0,u.C4)(["is-small is-primary is-rounded",{"is-loading":a.isLoadingEdit}]),onClick:e=>n.updateItem(a.items[t.index],t.index)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("save")),1)]),_:1},8,["class","onClick"])):(0,c.Q3)("",!0),a.showEditRow!==t.index||a.isLoadingEdit?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(o,{key:2,class:"is-white ml-3 is-rounded",onClick:n.hideEditRow},{default:(0,c.k6)(()=>[(0,c.bF)(p,{icon:"fa-light fa-trash"})]),_:1},8,["onClick"])),a.showEditRow!==t.index?((0,c.uX)(),(0,c.Wv)(o,{key:3,class:(0,u.C4)([{"is-loading":a.isLoadingRemove},"is-white ml-1 is-rounded"]),onClick:e=>n.removeItem(t.row,t.index)},{default:(0,c.k6)(()=>[(0,c.bF)(p,{icon:"fa-light fa-trash"})]),_:1},8,["class","onClick"])):(0,c.Q3)("",!0)])]),_:1}))]),_:1},8,["data"])])):(0,c.Q3)("",!0)])}var zs=i(61273),qs={props:["isRequired","modelValue","disabled","item"],data(){return{showEditRow:null,isLoading:!1,isLoadingAdd:!1,isLoadingEdit:!1,isLoadingRemove:!1,items:[],newItem:{name:null,issuer:null,year:null,educationIndustry:null}}},watch:{item:function(){this.loadItems()}},created(){this.loadItems()},methods:{getTranslatedValue(e){return(0,ds.KO)(e,this.$t,this.$i18n.locale)},newItemAdd(){let e={...this.newItem};this.items.push(e),this.showEditRow=this.items.length-1},hideEditRow(){this.showEditRow=null},loadItems(){this.item&&this.$http.plain.get("/certifications?user="+this.item.id).then(e=>{this.items=e.data["hydra:member"]}).catch(e=>console.error(e)).finally(()=>{this.isLoadingAdd=!1})},updateItem(e){let t={...e};t.name&&(this.isLoadingEdit=!0,t.year=parseInt(t.year),t.educationIndustry=t.educationIndustry?t.educationIndustry["@id"]:null,t.id?this.$http.plain.patch("/certifications/"+t.id,{...t}).then(e=>{this.saveSuccess()}).catch(e=>console.error(e)).finally(()=>{this.showEditRow=null,this.isLoadingEdit=!1}):this.$http.plain.post("/certifications",{...t}).then(e=>{this.loadItems()}).catch(e=>console.error(e)).finally(()=>{this.showEditRow=null,this.isLoadingEdit=!1}))},removeItem(e,t){e.id?(this.isLoadingRemove=!0,this.$http.plain.delete("/certifications").then(e=>{this.items.splice(t,1)}).catch(e=>console.error(e)).finally(()=>{this.showEditRow=null,this.isLoadingRemove=!1})):this.items.splice(t,1)},saveSuccess(){return this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})},emit(){this.$emit("update:modelValue",{})}},computed:{...(0,vi.L8)(["tenant","user"])},components:{FontAwesomeIcon:zs.gc,EducationIndustryList:Ns}};const Js=(0,Li.A)(qs,[["render",js],["__scopeId","data-v-6139389a"]]);var Hs=Js;const Ks={class:"eh-section"},Ys={key:0,class:"eh-card-display"},Zs={class:"eh-card-content"},ea={class:"eh-card-main"},ta={class:"eh-entity"},ia={key:0,class:"eh-position"},sa={key:0,class:"eh-years"},aa={key:0},na={key:1},oa={key:0,class:"eh-card-actions"},la=["title","onClick"],ra=["title","disabled","onClick"],da={key:1,class:"eh-card-form"},ca={class:"eh-form-grid"},ua={class:"eh-form-grid"},ma={class:"eh-form-actions"},pa=["disabled","onClick"],ha=["disabled","onClick"],ga=["disabled"];function fa(e,t,i,s,a,n){const o=(0,c.g2)("font-awesome-icon"),l=(0,c.g2)("b-input"),r=(0,c.g2)("b-field");
1return(0,c.uX)(),(0,c.CE)("section",Ks,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.items,(t,s)=>((0,c.uX)(),(0,c.CE)("div",{key:"eh-"+s,class:(0,u.C4)(["eh-card",{"eh-card-editing":a.showEditRow===s}])},[a.showEditRow!==s?((0,c.uX)(),(0,c.CE)("div",Ys,[(0,c.Lk)("div",Zs,[(0,c.Lk)("div",ea,[(0,c.Lk)("span",ta,(0,u.v_)(t.entity||"â"),1),t.position?((0,c.uX)(),(0,c.CE)("span",ia,(0,u.v_)(t.position),1)):(0,c.Q3)("",!0)]),t.yearBegin?((0,c.uX)(),(0,c.CE)("div",sa,[(0,c.eW)((0,u.v_)(t.yearBegin)+" ",1),t.yearEnd?((0,c.uX)(),(0,c.CE)("span",aa,"â "+(0,u.v_)(t.yearEnd),1)):((0,c.uX)(),(0,c.CE)("span",na,"â "+(0,u.v_)(e.$t("Present")),1))])):(0,c.Q3)("",!0)]),i.disabled?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",oa,[(0,c.Lk)("button",{class:"eh-action-btn",title:e.$t("edit"),onClick:e=>a.showEditRow=s},[(0,c.bF)(o,{icon:"fa-light fa-pen"})],8,la),(0,c.Lk)("button",{class:"eh-action-btn eh-action-danger",title:e.$t("delete"),disabled:a.isLoadingRemove,onClick:e=>n.removeItem(t,s)},[(0,c.bF)(o,{icon:"fa-light fa-trash"})],8,ra)]))])):(0,c.Q3)("",!0),a.showEditRow===s?((0,c.uX)(),(0,c.CE)("div",da,[(0,c.Lk)("div",ca,[(0,c.bF)(r,{label:e.$t("Experience entity")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.items[s].entity,"onUpdate:modelValue":e=>a.items[s].entity=e,placeholder:e.$t("Experience entity"),required:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),(0,c.bF)(r,{label:e.$t("Experience position")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.items[s].position,"onUpdate:modelValue":e=>a.items[s].position=e,placeholder:e.$t("Experience position"),required:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"])]),(0,c.Lk)("div",ua,[(0,c.bF)(r,{label:e.$t("Experience begin")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.items[s].yearBegin,"onUpdate:modelValue":e=>a.items[s].yearBegin=e,type:"number",placeholder:e.$t("Experience begin"),required:""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),(0,c.bF)(r,{label:e.$t("Experience end")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.items[s].yearEnd,"onUpdate:modelValue":e=>a.items[s].yearEnd=e,type:"number",placeholder:e.$t("Experience end")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"])]),(0,c.Lk)("div",ma,[(0,c.Lk)("button",{class:(0,u.C4)(["eh-btn eh-btn-primary",{"is-loading":a.isLoadingEdit}]),disabled:a.isLoadingEdit||!a.items[s].entity,onClick:e=>n.updateItem(a.items[s],s)},[(0,c.bF)(o,{icon:"fa-light fa-check",class:"mr-1"}),(0,c.eW)(" "+(0,u.v_)(e.$t("save")),1)],10,pa),(0,c.Lk)("button",{class:"eh-btn eh-btn-ghost",disabled:a.isLoadingEdit,onClick:e=>n.cancelEdit(t,s)},(0,u.v_)(e.$t("cancel")),9,ha)])])):(0,c.Q3)("",!0)],2))),128)),i.disabled?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"eh-add-btn",disabled:a.isLoadingAdd,onClick:t[0]||(t[0]=(...e)=>n.newItemAdd&&n.newItemAdd(...e))},[(0,c.bF)(o,{icon:"fa-light fa-plus",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("add")),1)],8,ga))])}var ba={props:["isRequired","modelValue","disabled","item"],data(){return{showEditRow:null,isLoading:!1,isLoadingAdd:!1,isLoadingEdit:!1,isLoadingRemove:!1,items:[],newItem:{entity:null,position:null,yearBegin:null,yearEnd:null}}},watch:{item:function(){this.loadItems()}},created(){this.loadItems()},methods:{newItemAdd(){let e={...this.newItem};this.items.push(e),this.showEditRow=this.items.length-1},cancelEdit(e,t){e.id||this.items.splice(t,1),this.showEditRow=null},loadItems(){this.item&&this.$http.plain.get("/experience_histories?user="+this.item.id).then(e=>{this.items=e.data["hydra:member"],this.emit(),0===this.items.length&&this.newItemAdd()}).catch(e=>console.error(e)).finally(()=>{this.isLoadingAdd=!1})},updateItem(e){let t={...e};this.isLoadingEdit=!0,t.yearBegin=parseInt(t.yearBegin),t.yearEnd=parseInt(t.yearEnd),t.id?this.$http.plain.patch("/experience_histories/"+t.id,{...t}).then(e=>{this.loadItems(),this.saveSuccess()}).catch(e=>console.error(e)).finally(()=>{this.showEditRow=null,this.isLoadingEdit=!1}):(t.user=this.item["@id"],this.$http.plain.post("/experience_histories",{...t}).then(e=>{this.loadItems(),this.showEditRow=null}).catch(e=>console.error(e)).finally(()=>{this.isLoadingEdit=!1}))},removeItem(e,t){if(!e.id)return this.items.splice(t,1),void(this.showEditRow=null);this.isLoadingRemove=!0,this.$http.plain.delete("/experience_histories/"+e.id).then(e=>{this.loadItems()}).catch(e=>console.error(e)).finally(()=>{this.showEditRow=null,this.isLoadingRemove=!1})},saveSuccess(){return this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})},emit(){this.$emit("update:modelValue",this.items)}},computed:{...(0,vi.L8)(["tenant","user"])},components:{}};const ya=(0,Li.A)(ba,[["render",fa],["__scopeId","data-v-34d34c16"]]);var va=ya,ka=i(29025),Ca=i(6648),La={props:{adhesionId:{type:[Number,String],default:null}},emits:["saved"],data(){return{isLoading:!1,item:null,locale:this.$i18n.locale,iframeThankYou:!1,firstName:null,lastName:null,email:null,gender:null,error:"",dateBirth:null,localCenter:null,customFields:[],userCustomFieldsValues:{},pendingUploads:[],userTypes:[],localCenters:[],profileFacebook:null,profileTwitter:null,profileLinkedin:null,profileInstagram:null,profileTelegram:null,profileTiktok:null,profileFacebookNot:null,profileTwitterNot:null,profileLinkedinNot:null,profileInstagramNot:null,profileTelegramNot:null,profileTiktokNot:null,professionSector:null,professionHeadline:null,professionExpertiseOther:null,professionIndustry:null,professionJob:null,professionExpertise:null,hasExperienceHistory:null,experienceHistory:[],feeTenantProduct:null,feePrice:null,phone:{},education:{educationStatus:null,educationPhd:null,educationMaster:null,educationUniversity:null}
1,addressStreet:null,addressDetails:null,townFrom:null,townCurrent:null,mapLocation:null,userType:null,personalNumber:null,middleName:null,personalIdNumber:null,hasPersonalIdOnFile:!1,address:null,idSerial:null,idNumber:null,adhesionUserFields:[],adhesionUserFieldsMandatory:[],adhesionCustomFields:[],adhesionCustomFieldsMandatory:[]}},created(){this.tenant.settingFeatures.adhesion.isActive||this.$router.push({name:"Dashboard"}),this.retrieve()},methods:{localCenterNameSelector:ds.Hc,sortLocalCenters:ds.KN,handlePendingUpload(e){this.pendingUploads=this.pendingUploads.filter(t=>t.fieldId!==e.fieldId),this.pendingUploads.push(e)},trimSocial(){this.profileFacebook=this.profileFacebook?this.profileFacebook.trim():null,this.profileLinkedin=this.profileLinkedin?this.profileLinkedin.trim():null,this.profileInstagram=this.profileInstagram?this.profileInstagram.trim():null,this.profileTwitter=this.profileTwitter?this.profileTwitter.trim():null,this.profileTelegram=this.profileTelegram?this.profileTelegram.trim():null,this.profileTiktok=this.profileTiktok?this.profileTiktok.trim():null},changeSocialProfile(e){"tiktok"===e?this.profileTiktok=this.profileTiktokNot?"":null:"telegram"===e?this.profileTelegram=this.profileTelegramNot?"":null:"facebook"===e?this.profileFacebook=this.profileFacebookNot?"":null:"instagram"===e?this.profileInstagram=this.profileInstagramNot?"":null:"linkedin"===e?this.profileLinkedin=this.profileLinkedinNot?"":null:"twitter"===e&&(this.profileTwitter=this.profileTwitterNot?"":null)},loadFeeTenantProduct(){this.tenant.settingFeatures.fees.productUuid&&(this.isLoading=!0,this.$http.plain.get("/products/"+this.tenant.settingFeatures.fees.productUuid).then(e=>{this.feeTenantProduct=e.data}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1))},retrieve(){let e=this.adhesionId||(this.$route.params.item&&"0"!==this.$route.params.item?this.$route.params.item:null)||(this.user.adhesion?this.user.adhesion.id:null);if(e){this.isLoading=!0,this.$http.plain.get("/adhesion/"+e).then(e=>{let t=e.data.user;this.mapUserDataToAdhesion(e.data,t)}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1}),this.customFields=this.tenant.customFields,this.userTypes=this.tenant.roles.filter(e=>e.isUserType),this.adhesionUserFields=this.tenant.settingForms.adhesionForm.adhesionUserFields,this.adhesionCustomFields=this.tenant.settingForms.adhesionForm.adhesionCustomFields,this.tenant.settingForms.adhesionForm.adhesionCustomFieldsMandatory&&(this.adhesionCustomFieldsMandatory=this.tenant.settingForms.adhesionForm.adhesionCustomFieldsMandatory),this.tenant.settingForms.adhesionForm.adhesionUserFieldsMandatory&&(this.adhesionUserFieldsMandatory=this.tenant.settingForms.adhesionForm.adhesionUserFieldsMandatory);for(let[e,t]of this.customFields.entries())"string"===typeof t.fieldOptions&&t.fieldOptions&&(this.customFields[e].fieldOptions=t.fieldOptions),this.adhesionCustomFields.includes(t.id)&&void 0===this.userCustomFieldsValues[t.id]&&"checkboxes"===t.fieldType&&(this.userCustomFieldsValues[t.id]=[]);this.adhesionUserFields.includes("local_center")&&this.$http.plain.get("/local-centers-public?isActive=1&tenantSlug="+this.tenant.slug).then(e=>{this.localCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>console.error(e)).finally(()=>{}),this.adhesionUserFields.includes("fee_price")&&this.loadFeeTenantProduct()}else this.$router.push({name:"Adhesion"})},mapUserDataToAdhesion(e,t){if(this.item=e,this.firstName=t.identity?t.identity.firstName:t.firstName,this.lastName=t.identity?t.identity.lastName:t.lastName,this.gender=t.gender,this.email=t.email,this.dateBirth=t.dateBirth,this.localCenter=t.localCenter?t.localCenter["@id"]:null,t.phoneCountry&&t.phoneLocalNumber)this.phone={country:t.phoneCountry,number:t.phoneLocalNumber};else if(t.phoneNumber){const e=t.phoneNumber.replace(/\s+/g,""),i=e.startsWith("0")&&!e.startsWith("00"),s=e.startsWith("+")?e.substring(1):e.replace(/^00/,"");let a=null,n=s;if(i){let t=this.tenant.country?ds.Xr.find(e=>e.v===this.tenant.country.id):null;a=t||null,n=e.substring(1)}else for(let t=4;t>=1;t--){const e=s.substring(0,t),i=ds.Xr.filter(e=>null!==e.p).find(t=>String(t.p)===e);if(i){a=i,n=s.substring(t);break}}this.phone={country:a?a.c:null,number:n}}else this.phone={country:null,number:null};this.addressStreet=t.identity?t.identity.addressStreet:null,this.addressDetail
1s=t.identity?t.identity.addressDetails:null,this.profileFacebook=t.profileFacebook,this.profileTwitter=t.profileTwitter,this.profileLinkedin=t.profileLinkedin,this.profileTiktok=t.profileTiktok,this.profileInstagram=t.profileInstagram,this.profileTelegram=t.profileTelegram,this.profileFacebookNot=""===t.profileFacebook||null===t.profileFacebook,this.profileTwitterNot=""===t.profileTwitter||null===t.profileTwitter,this.profileLinkedinNot=""===t.profileLinkedin||null===t.profileLinkedin,this.profileInstagramNot=""===t.profileInstagram||null===t.profileInstagram,this.profileTelegramNot=""===t.profileTelegram||null===t.profileTelegram,this.profileTiktokNot=""===t.profileTiktok||null===t.profileTiktok,this.professionHeadline=t.professionHeadline,this.professionExpertiseOther=t.professionExpertiseOther,this.professionSector=t.professionSector,this.professionIndustry=t.professionIndustry,this.professionJob=t.professionJob,this.professionExpertise=t.professionExpertise,this.userType=t.userType,this.townFrom=t.townFrom,this.feePrice=t.feeTenantProductPrice?t.feeTenantProductPrice["@id"]:null,this.personalNumber=t.identity?t.identity.personalNumber:null,this.middleName=t.middleName??null,this.address=t.address??null,this.hasPersonalIdOnFile=!0===t.hasPersonalIdNumber,this.idSerial=t.identity?t.identity.idSerial:null,this.idNumber=t.identity?t.identity.idNumber:null,this.employeeStatus=t.employeeStatus,this.hasExperienceHistory=t.hasExperienceHistory,this.townCurrent=t.identity?t.identity.idTown:null,this.mapLocation=t.mapLatitude||t.mapLongitude||t.mapPlaceName?{latitude:t.mapLatitude,longitude:t.mapLongitude,placeName:t.mapPlaceName}:null,this.education={educationStatus:t.educationStatus,educationPhd:t.educationPhd,educationMaster:t.educationMaster,educationUniversity:t.educationUniversity}},async save(){if(this.pendingUploads.length>0){this.$store.state.isLoadingButton=!0;try{for(const e of this.pendingUploads)await e.upload();this.pendingUploads=[]}catch(t){return console.log(t),this.$buefy.toast.open({message:this.$t("Failed to upload file"),type:"is-danger",duration:5e3}),void(this.$store.state.isLoadingButton=!1)}}if(!0!==this.checkSocialMediaInputs())return;if(!this.checkCustomFieldsValidations())return;if(!this.checkProfessionValidations())return;if(this.adhesionUserFieldsMandatory.includes("id_serial_number")&&""===this.idNumber)return void this.$buefy.toast.open({message:this.$t("ID number is required")+"("+this.$t("Please fill in the form")+")",type:"is-danger",duration:5e3});if(this.adhesionUserFieldsMandatory.includes("experience_history")&&(null===this.hasExperienceHistory||void 0===this.hasExperienceHistory))return void this.$buefy.toast.open({message:this.$t("Have you ever been a party member in the past?")+"("+this.$t("Please fill in the form")+")",type:"is-danger",duration:5e3});let e={firstName:this.firstName,lastName:this.lastName,gender:this.gender,dateBirth:this.dateBirth,localCenter:this.localCenter,phone:this.phone,hobby:this.hobby,feePrice:this.feePrice,personalNumber:this.personalNumber,middleName:this.middleName,address:this.address,personalIdNumber:this.personalIdNumber?this.personalIdNumber:null,idSerial:this.idSerial,idNumber:this.idNumber,addressStreet:this.addressStreet,addressDetails:this.addressDetails,hasExperienceHistory:this.hasExperienceHistory,addressDetail:this.addressDetail,profileFacebook:this.profileFacebook,profileTwitter:this.profileTwitter,profileLinkedin:this.profileLinkedin,profileTiktok:this.profileTiktok,profileInstagram:this.profileInstagram,profileTelegram:this.profileTelegram,professionHeadline:this.professionHeadline,professionExpertiseOther:this.professionExpertiseOther,professionSector:this.professionSector,professionIndustry:this.professionIndustry?this.professionIndustry["@id"]:null,professionJob:this.professionJob?this.professionJob["@id"]:null,professionExpertise:this.professionExpertise?this.professionExpertise["@id"]:null,type:this.userType,townFrom:this.townFrom,townCurrent:this.townCurrent&&this.townCurrent.id?this.townCurrent["@id"]:this.townCurrent,mapLatitude:this.mapLocation?.latitude?String(this.mapLocation.latitude):null,mapLongitude:this.mapLocation?.longitude?String(this.mapLocation.longitude):null,mapPlaceName:this.mapLocation?.placeName||null,education:{educationStatus:this.education.educationStatus,educationPhd:this.education.educationPhd?this.education.educationPhd["@id"]:null,educationMaster:this.education.educationMaster?this.education.educationMaster["@i
1d"]:null,educationUniversity:this.education.educationUniversity?this.education.educationUniversity["@id"]:null},rawUserCustomFieldsValues:this.userCustomFieldsValues};this.$http.plain.patch("/adhesion/update/"+this.item.id,e).then(e=>this.saveSuccessful(e)).catch(e=>this.saveFailed(e))},checkProfessionValidations(){return!this.adhesionUserFieldsMandatory.includes("profession_expertise")||!this.professionExpertise||431!==this.professionExpertise.id||this.professionExpertiseOther&&0!==this.professionExpertiseOther.length?!(this.adhesionUserFieldsMandatory.includes("profession_job")&&this.professionJob&&431===this.professionJob.id&&(!this.professionHeadline||0===this.professionHeadline.length))||(this.$buefy.toast.open({message:this.$t("Please fill in the other profession job"),type:"is-danger",duration:4e3}),!1):(this.$buefy.toast.open({message:this.$t("Please fill in the other profession expertise"),type:"is-danger",duration:4e3}),!1)},checkCustomFieldsValidations(){let e=!0;for(let t of this.adhesionCustomFieldsMandatory){let i=this.tenant.customFields.find(e=>e.id===t);if(i&&i.fieldOptions&&void 0!==i.fieldOptions.minLength){let s=this.userCustomFieldsValues[t];(!s||s.length<i.fieldOptions.minLength)&&(this.$buefy.toast.open({message:this.$t("Minimum characters needed")+"("+i.fieldOptions.minLength+"): "+i.name,type:"is-danger",duration:4e3}),e=!1)}}return e},checkRequired(){!this.idSerial||this.idSerial.trim()},checkSocialMediaInputs(){let e=!0;return this.adhesionUserFields.includes("tiktok")&&!this.profileTiktokNot&&this.profileTiktok.length<3&&(e="tiktok"),this.adhesionUserFields.includes("facebook")&&!this.profileFacebookNot&&this.profileFacebook.length<3&&(e="facebook"),this.adhesionUserFields.includes("linkedin")&&!this.profileLinkedinNot&&this.profileLinkedin.length<3&&(e="linkedin"),this.adhesionUserFields.includes("twitter")&&!this.profileTwitterNot&&this.profileTwitter.length<3&&(e="twitter"),this.adhesionUserFields.includes("instagram")&&!this.profileInstagramNot&&this.profileInstagram.length<3&&(e="instagram"),this.adhesionUserFields.includes("telegram")&&!this.profileTelegramNot&&this.profileTelegram.length<3&&(e="telegram"),!0!==e&&this.$buefy.toast.open({message:this.$t("Social media profile not set correctly")+"| "+e,type:"is-danger"}),e},saveSuccessful(e){if(this.$buefy.toast.open({type:"is-success",message:this.$t("updatedSuccessfully")}),this.item=e.data,this.$emit("saved",e.data),e.data.user.id===this.user.id){let t=this.user;t.adhesion=e.data,t.identity=e.data.identity,a.M.commit("setCurrentUser",t),this.isStandalone&&this.$router.push({name:"Adhesion"})}},saveFailed(e){console.log(e);let t=this.$t("An error occurred");e.response&&e.response.data&&e.response.data.detail&&(t=e.response.data.detail),this.$buefy.toast.open({message:t,type:"is-danger",duration:5e3})},checkForm(){return!0},isAvailable(e){const t=e.visibility||"public";if("admin"===t){if(!this.isGranted("HR_LOCAL",this.item?.user?.localCenter))return!1}else if("user"===t){const e=this.item&&a.M.state.currentUser.id===this.item.user.id;if(!e&&!this.isGranted("HR_LOCAL",this.item?.user?.localCenter))return!1}return!e.conditionedField||this.isEnabledConditionedField(e)},isEnabledConditionedField(e){if(!e.conditionedField)return!1;let t=e.conditionedField.id,i=this.userCustomFieldsValues[t];return i===e.conditionedValue||!1===i&&"0"===e.conditionedValue||!0===i&&"1"===e.conditionedValue},hasConditionedField(e){for(let t of this.tenant.customFields)if(t.conditionedField&&t.conditionedField.id===e.id)return!0;return!1},isCustomFieldReadonly(e){return!this.isAdhesionStatusNew&&!("admin"===e.visibility&&this.item&&this.isGranted("HR_LOCAL",this.item.user.localCenter)&&this.isAdminEditableStatus)}},computed:{...(0,vi.L8)(["tenant","user","isGranted"]),isStandalone(){return"AdhesionForm"===this.$route.name},isAdminEditableStatus(){return this.item&&["new"].includes(this.item.status)},isAdhesionStatusNew(){return!this.item||this.item&&"new"===this.item.status},privateDateAccess(){return!this.item||this.isGranted("HR_LOCAL",this.item.user.localCenter)||this.item&&this.item.user.id===this.user.id},canWritePersonalId(){return!this.item||this.item&&this.item.user.id===this.user.id||this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")}},components:{BirthdaySelect:Pt.A,CustomFieldWidget:It.A,TownAutocomplete:Mt.A,MapLocationSelector:ps.A,OrgoLogo:At.A,PhoneNumber:ms,ProfessionIndustryList:hs.A,ProfessionJobList:Ls,ExperienceHistory:va,Education:Xs,Certifications:Hs,LocalCenterSelect:ka.A,FeePriceSelector:Ca.A}};const wa=(0,Li.A)(La,[["render",os]]);var _a=wa,Ea=i(69213),$a={data(){return{userId:this.$route.query.u,item:null,member:null,viewIdDocument:!1,viewIdDocumentBack:!1,fileId:null,filesAdhesion:null,signaturePad:null,isLoading:!1,isDownloading:!1,isUploadingSigned:!1,isUploadingId:!1,isSending:!1,hasIdentityMedia
1Back:!1,fileBackId:null,deg:0,showVideoRecorder:!1,openStepIndex:null}},watch:{openStepIndex(e){3===e&&this.$nextTick(()=>{this.initSignaturePad()})}},mounted(){this.initSignaturePad()},created(){if(this.tenant.settingFeatures.adhesion.isActive||this.$router.push({name:"Dashboard"}),this.userId&&!this.isGranted("HR_LOCAL"))return this.$router.push({name:"Dashboard"});this.retrieve()},methods:{mediaSrc:ds.F9,initSignaturePad(){let e=this.$refs.canvas;e&&(this.signaturePad||(this.signaturePad=new Ea.A(e,{backgroundColor:"rgb(255, 255, 255)",penColor:"rgb(19,34,124)",maxWidth:2.2})),this.resizeCanvas())},resizeCanvas(){let e=this.$refs.canvas;if(!e||!this.signaturePad)return;let t=e.parentElement,i=t?t.clientWidth-4:520;e.width=Math.min(i,640),e.height=Math.round(.45*e.width),this.signaturePad.clear()},isStepCompleted(e){return 1===e?!this.requiresIdentityVerification||this.member&&this.member.identity&&this.member.identity.hasUploadedDocument:2===e?this.checkAdhesionFormComplete:3===e?this.item&&this.item.hasUploadedDocument:4===e?this.item&&"new"!==this.item.status:5===e&&(this.item&&this.item.hasVideo)},isStepLocked(e){return 1!==e&&(2===e?!this.member||this.requiresIdentityVerification&&(!this.member.identity||!this.member.identity.hasUploadedDocument):3===e?!this.checkAdhesionFormComplete:4===e?!this.adhesionIsComplete&&(!this.item||"new"===this.item.status):5!==e||(!this.item||"new"===this.item.status))},isStepActive(e){return!this.isStepLocked(e)&&!this.isStepCompleted(e)},stepCardClass(e){return this.isStepCompleted(e)?"step-card-completed":this.isStepLocked(e)?"step-card-locked":this.openStepIndex===e?"step-card-active":""},stepTagClass(e){return this.isStepCompleted(e)?"step-tag-done":this.isStepLocked(e)?"step-tag-locked":this.openStepIndex===e?"step-tag-active":""},stepTagText(e){return this.isStepCompleted(e)?this.$t("Completed"):this.isStepLocked(e)?this.$t("Locked"):this.openStepIndex===e?this.$t("Current step"):""},toggleStep(e){this.isStepLocked(e)||this.openStepIndex!==e&&(this.openStepIndex=e)},completeStep(e){let t=e+1;t<=5&&(this.openStepIndex=t,this.$nextTick(()=>{let e=document.querySelector(".step-card-active, .step-card:nth-child("+(t+1)+")");e&&e.scrollIntoView({behavior:"smooth",block:"start"})}))},onFormSaved(e){this.retrieve()},reopen(){this.isLoading=!0,this.$http.plain.patch("/adhesion/"+this.item.id+"/status",{status:"new"}).then(e=>{this.item=e.data,this.saveSuccessful(e)}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},checkAdhesionComplete(){this.adhesionIsComplete&&this.$buefy.dialog.confirm({title:this.$t("Send adhesion"),message:this.$t("Send adhesion confirmation"),confirmText:this.$t("send"),cancelText:this.$t("I will send later"),type:"is-primary",onConfirm:()=>this.send()})},retrieve(e=!1){if(this.isLoading=!0,this.userId)return this.$http.plain.get("/users/"+this.userId).then(t=>{this.member=t.data;const i=this.member.localCenter&&this.member.localCenter.ancestors;return Array.isArray(i)&&i.length?this.member.localCenter.parent=i[0]:this.member.localCenterParent&&this.member.localCenter&&this.member.localCenterParent.id!==this.member.localCenter.id&&(this.member.localCenter.parent=this.member.localCenterParent),this.isGranted("HR_LOCAL",this.member.localCenter)?(this.hasIdentityMediaBack=!!this.member.identity?.mediaBack,this.item=t.data.adhesion,e||this.determineOpenStep(),this.checkAdhesionComplete()):(this.$buefy.toast.open({message:this.$t("Access Denied, you will be redirected to your adhesion"),type:"is-danger"}),this.$router.push({name:"Adhesion"}))}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1});{let t=this.$store.state.impersonatedAs?"/user-identity/"+this.$store.state.impersonatedAs.id:"/user-identity/"+this.user.id;return this.$http.plain.get(t).then(t=>{this.item=t.data.adhesion,this.member=t.data;const i=this.member.localCenter&&this.member.localCenter.ancestors;return Array.isArray(i)&&i.length?this.member.localCenter.parent=i[0]:this.member.localCenterParent&&this.member.localCenter&&this.member.localCenterParent.id!==this.member.localCenter.id&&(this.member.localCenter.parent=this.member.localCenterParent),this.hasIdentityMedia
1Back=!!this.member.identity?.mediaBack,this.item&&this.item.id&&"new"!==this.item.status?this.$http.plain.get("/adhesion/"+this.item.id).then(t=>{this.item=t.data,e||this.determineOpenStep()}).catch(e=>console.log(e)):e||this.determineOpenStep(),this.checkAdhesionComplete()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})}},determineOpenStep(){this.member&&this.item&&(!this.requiresIdentityVerification||this.member.identity&&this.member.identity.hasUploadedDocument)?this.checkAdhesionFormComplete?this.item.hasUploadedDocument?"new"===this.item.status?this.openStepIndex=4:this.adhesionHasVideoFeature&&!this.item.hasVideo?this.openStepIndex=5:this.openStepIndex=6:this.openStepIndex=3:this.openStepIndex=2:this.openStepIndex=1},createAdhesion(){this.isLoading=!0,this.$http.plain.post("/adhesion/create",{userId:this.userId}).then(e=>{this.item=e.data}).catch(e=>this.saveFailed(e)).finally(()=>{this.isLoading=!1})},send(){this.isSending=!0,this.$http.plain.patch("/adhesion/"+this.item.id+"/send",{}).then(e=>{if(this.item=e.data,!this.userId){let t=this.user;t.adhesion=e.data,a.M.commit("setCurrentUser",t)}this.saveSuccessful(e),this.openStepIndex=5}).catch(e=>this.saveFailed(e)).finally(()=>{this.isSending=!1})},saveSuccessful(e){this.$buefy.toast.open({type:"is-success",message:this.$t("updatedSuccessfully")})},saveFailed(e){console.error(e)},undoSignature(){this.signaturePad.clear()},saveSignature(){let e=this.signaturePad.toDataURL();this.isLoading=!0,fetch(e).then(e=>e.blob()).then(e=>{let t=new File([e],"adhesion_"+this.item.id+"_"+this.user.id+".png",{type:"image/png"}),i=new FormData;i.append("file",t),i.append("type","signatureadhesion"),i.append("entity_id",this.item.id),this.isLoading=!0,this.$http.plain.post("/media_objects",i,{headers:{"Content-Type":"multipart/form-data"}}).then(e=>(this.saveSuccessful(),this.retrieve())).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})})},viewDocument(){this.isDownloading=!0,this.$http.plain.get("/adhesion/"+this.item.id+"/pdf",{responseType:"blob"}).then(e=>{var t=window.URL.createObjectURL(new Blob([e.data])),i=document.createElement("a");i.href=t,i.setAttribute("download",this.$t("Adhesion")+"-"+this.member.fullName+".pdf"),document.body.appendChild(i),i.click(),i.remove(),window.URL.revokeObjectURL(t)}).catch(e=>console.error(e)).finally(()=>{this.file=null,this.isDownloading=!1})},async uploadFilesAdhesion(){this.checkUploadSize();let e=this.filesAdhesion;if(!e.length)return;this.isUploadingSigned=!0;let t=[];for(let i of this.item.medias)t.push(i.id);for await(let i of e)await this.signS3AndUploadAdhesion(i,t);this.retrieve(),this.filesAdhesion=[],this.isUploadingSigned=!1},async signS3AndUploadAdhesion(e,t){const i=e.type,s=e.size,a=e.name;await this.$http.plain.get("/s3-upload?fileType="+i+"&fileName="+a+"&type=adhesion").then(a=>{let n=new FormData;for(const[e,t]of Object.entries(a.data.additionalData))n.append(e,t);return n.append("Content-type",i),n.append("acl","public-read"),n.append("file",e,a.data.newFileName),fetch(ki.ze+"/",{method:"POST",body:n}).then(e=>{200!==e.status&&204!==e.status||this.$http.plain.post("/adhesion/"+this.item.id+"/upload-signed",{contentUrl:a.data.newFileName,fileMimeType:i,fileSize:s,oldMedias:t}).then(e=>{this.item=e.data,this.item.id===this.user.id&&(this.$store.state.currentUser["adhesion"]=e.data)})})}).catch(e=>console.error(e)).finally(()=>{this.file=null,this.isUploadingSigned=!1})},uploadFileId(){if(!this.fileId)return;this.isUploadingId=!0;const e=this.fileId.type,t=this.fileId.size;return this.$http.plain.get("/s3-upload?fileType="+this.fileId.type+"&fileName="+this.fileId.name+"&type=identity").then(i=>{let s=new FormData;for(const[e,t]of Object.entries(i.data.additionalData))s.append(e,t);return s.append("Content-type",this.fileId.type),s.append("acl","public-read"),s.append("file",this.fileId,i.data.newFileName),fetch(ki.ze+"/",{method:"POST",body:s}).then(s=>{if(200===s.status||204===s.status)return this.$http.plain.post("/adhesion/"+this.item.id+"/upload-id",{contentUrl:i.data.newFileName,fileMimeType:e,fileSize:t}).then(e=>{this.retrieve(!0),this.saveSuccessful()})})}).catch(e=>console.error(e)).finally(()=>{this.fileId=null,this.isUploadingId=!1})},uploadFileBackId(){if(!this.fileBackId)return;this.isUploadingId=!0;const e=this.fileBackId.type,t=this.fileBackId.size;return this.$http.plain.get("/s3-upload?fileType="+this.fileBackId.type+"&fileName="+this.fileBackId.name+"&type=identity").then(i=>{let s=new FormData;for(const[e,t]of Object.entries(i.data.additionalData))s.append(e,t);return s.append("Content-type",this.fileBackId.type),s.append("acl","public-read"),s.append("file",this.fileBackId,i.data.newFileName),fetch(ki.ze+"/",{method:"POST",body:s}).then(s=>{if(200===s.status||204===s.status)return this.$http.plain.post("/identity/"+this.member.identity.id+"/update-document",{contentUrl:i.data.newFileName,fileMimeType:e,fileSize:t,mediaBack:!0}).then(e=>{this.retrieve(!0),this.saveSuccessful()})})}).catch(e=>console.error(e)).finally(()=>{this.fileId=null,this.isUploadingId=!1})},checkUploadSize(){let e=0;for(let t of this.filesAdhesion)e+=t.size;e>
1ki.w3&&(this.$buefy.toast.open({duration:7e3,message:this.$t("selectedFiles")+": "+this.formatBytes(e)+". "+this.$t("errorMaxFileSize"),type:"is-danger"}),this.filesAdhesion=[]),this.filesAdhesion.length>5&&(this.$buefy.toast.open({duration:7e3,message:this.$t("Maximum 5 files"),type:"is-danger"}),this.filesAdhesion=[])},rotation(){this.deg+=90},onVideoUploaded(e){this.item=e,this.showVideoRecorder=!1,this.$buefy.toast.open({type:"is-success",message:this.$t("Video uploaded successfully")})}},computed:{...(0,vi.L8)(["tenant","isGranted","adhesionStatusLabel","user"]),adhesion(){return this.item},identity(){return this.member&&this.member.identity},isAdhesionStatusNew(){return!this.item||this.item&&"new"===this.item.status},checkAdhesionFormComplete(){if(!this.member)return!1;for(let e of this.tenant.settingForms.adhesionForm.adhesionCustomFieldsMandatory){let t=this.tenant.customFields.find(t=>t.id===e);if(!t)continue;let i=this.member.customFieldValues.find(e=>e.field.id===t.id);if(!i||""===i.value||null===i.value)return!1}return!0},adhesionIsComplete(){let e=!this.requiresIdentityVerification||this.member&&this.member.identity&&this.member.identity.hasUploadedDocument;return this.isAdhesionStatusNew&&this.member&&e&&(this.checkAdhesionFormComplete||this.user.id!==this.member.id)&&this.member.adhesion&&this.member.adhesion.hasUploadedDocument},isAdhesionStatusSent(){return this.item&&"pending"===this.item.status},canReRecordVideo(){return this.item&&["new","pending"].includes(this.item.status)},adhesionHasVideoFeature(){return!!this.tenant?.settingFeatures?.adhesion?.hasVideo},requiresIdentityVerification(){return!1!==this.tenant?.settingFeatures?.adhesion?.hasIdentityVerification},hasInAppSignature(){return!1!==this.tenant?.settingFeatures?.adhesion?.hasInAppSignature},videoQuestions(){let e=this.tenant.settingFeatures?.adhesion?.videoQuestions;return e&&"string"===typeof e?e.split("|").filter(e=>e.trim()).map(e=>{let t=e.trim().split("\n");return{title:t[0].trim(),description:t.slice(1).join("\n").trim()}}):[{title:this.$t("Please introduce yourself: your name, age, and city of residence."),description:""},{title:this.$t("Why do you want to join our organization?"),description:""},{title:this.$t("What skills or experience can you bring to our team?"),description:""}]}},components:{BirthdaySelect:Pt.A,CustomFieldWidget:It.A,TownAutocomplete:Mt.A,UserTypeThumbnail:xt.A,VideoRecorder:_i,OrgoLogo:At.A,ProfessionIndustryList:hs.A,AdhesionForm:_a}};const Fa=(0,Li.A)($a,[["render",St]]);var Ta=Fa;const Sa={class:"modal-card",style:{width:"auto"}},Aa={class:"modal-card-body"},Pa=["value"],Ia={class:"level-left mt-6"},Ma={class:"level"},xa={class:"level-left"},Na={class:"level-item"},Ua={class:"title"},Da={class:"level-item ml-5"},Xa={class:"level-item ml-2"},Va={key:0,class:"level-item ml-3"},Ra={class:"local-center-filter-label"},Oa={class:"dropdown-item-search"},Qa={key:0},Ba={class:"level-right"},Ga={key:0,class:"mr-5 has-text-weight-semibold"},Wa=["disabled"],ja={class:"icon-text"},za={key:0,class:"buttons my-3"},qa={key:1,class:"orgo-table-wrap"},Ja={class:"is-size-7 nowrap"},Ha={class:"is-size-6-half nowrap has-text-weight-semibold mr-1"},Ka={class:"is-size-6-half nowrap has-text-weight-semibold"},Ya={class:"is-size-6-half has-text-weight-semibold bulma-has-text-grey-dark"},Za={class:"cropString is-size-6-half has-text-weight-semibold"},en={key:0,class:"tag is-small is-default is-rounded mr-1"},tn={key:1,class:"mt-2"},sn={class:"tag is-light is-small is-rounded"},an={key:0,class:"tag is-small is-default is-rounded mr-1"},nn={key:1,class:"mt-2"},on={class:"tag is-light is-small is-rounded"},ln=["href"],rn={class:"icon-text"},dn={class:"icon is-small"},cn={key:0,class:"ml-1"},un=["href"],mn={class:"icon is-small"},pn={key:1,class:"tag is-small is-light is-rounded"},hn=["disabled","onClick"],gn=["onClick"],fn={key:2,class:"tag is-clickable is-danger is-rounded pl-4 pr-4"},bn={key:0,slot:"trigger",class:"button is-small is-default is-rounded"},yn={class:"icon is-small ml-1"},vn={key:1,slot:"trigger",class:"button is-small is-success is-rounded"},kn={class:"icon is-small ml-1"},Cn={key:2,slot:"trigger",class:"button is-small is-success is-rounded"},Ln={class:"icon is-small ml-1"},wn={key:3,slot:"trigger",class:"button is-small is-danger is-rounded"},_n={class:"icon is-small ml-1"},En={key:4,slot:"trigger",class:"button is-small is-warning is-rounded"},$n={class:"icon is-small ml-1"},Fn={key:5,slot:"trigger",class:"button is-small is-warning is-rounded"},Tn={class:"icon is-small ml-1"},Sn={key:6,slot:"trigger",class:"button is-small is-danger is-rounded"},An={class:"icon is-small ml-1"},Pn={key:7,slot:"trigger",class:"button is-small is-warning is-rounded"},In={class:"icon is-small ml-1"},Mn={class:"tag is-small is-default is-rounded"},xn={class:"tag is-small is-warning is-rounded"},Nn={class:"tag is-small is-default is-rounded"},Un={class:"tag is-small is-primary is-rounded"},Dn={class:"tag is-small is-primary is-rounded"},Xn={class:"tag is-small is-primary is-rounded"},Vn={class:"tag is-small is-success is-rounded"},Rn={class:"tag is-small is-success is-rounded"},On={class:"tag is-small is-success is-rounded"},Qn={key:0,class:"mt-2"},Bn={class:"tag is-small is-rounded is-danger"},Gn=["onClick"],Wn=["onClick"];function jn(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("b-select"),r=(0,c.g2)("b-field"),d=(0,c.g2)("b-modal"),m=(0,c.g2)("b-input"),p=(0,c.g2)("b-button"),h=(0,c.g2)("b-dropdown-item"),g=(0,c.g2)("b-dropdown"),f=(0,c.g2)("font-awesome-icon"),b=(0,c.g2)("router-link"),y=(0,c.g2)("b-table-column"),v=(0,c.g2)("UserTypeThumbnail"),k=(0,c.g2)("b-table"),C=(0,c.g2)("AdhesionLogs"),L=(0,c.g2)("ItemViewModal");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.bF)(d,{modelValue:n.isChangeToDraftModal,"onUpdate:modelValue":t[4]||(t[4]=e=>n.isChangeToDraftModal=e)},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Sa,[(0,c.Lk)("section",Aa,[e.tenant.settingFeatures.adhesion.changeToDraftReasons?((0,c.uX)(),(0,c.Wv)(r,{key:0,label:e.$t("Reason draft")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.changeToDraftReasons,"onUpdate:modelValue":t[1]||(t[1]=e=>a.changeToDraftReasons=e),multiple:"","native-size":"8"},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.tenant.settingFeatures.adhesion.changeToDraftReasons.split("|"),(e,t)=>((0,c.uX)(),(0,c.CE)("option",{key:t,value:e},(0,u.v_)(e),9,Pa))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.Lk)("div",Ia,[(0,c.Lk)("button",{class:"button is-primary is-rounded",onClick:t[2]||(t[2]=e=>n.changeStatus(a.isChangeToDraft))},(0,u.v_)(e.$t("send")),1),(0,c.Lk)("button",{class:"button is-default is-rounded ml-2",onClick:t[3]||(t[3]=(...e)=>n.loadItems&&n.loadItems(...e))},(0,u.v_)(e.$t("cancel")),1)])])])]),_:1},8,["modelValue"]),(0,c.Lk)("div",null,[(0,c.Lk)("div",Ma,[(0,c.Lk)("div",xa,[(0,c.Lk)("div",Na,[(0,c.Lk)("h2",Ua,(0,u.v_)(e.$t("Adhesions")),1)]),(0,c.Lk)("div",Da,[(0,c.bF)(m,{modelValue:a.filters.name,"onUpdate:modelValue":t[5]||(t[5]=e=>a.filters.name=e),disabled:a.isLoading,size:"is-small",style:{"max-width":"120px"},placeholder:e.$t("name"),onKeyup:n.getAsyncData},null,8,["modelValue","disabled","placeholder","onKeyup"])]),(0,c.Lk)("div",Xa,[(0,c.bF)(m,{modelValue:a.filters.uid,"onUpdate:modelValue":t[6]||(t[6]=e=>a.filters.uid=e),disabled:a.isLoading,size:"is-small",style:{"max-width":"100px"},placeholder:e.$t("User ID"),onKeyup:n.getAsyncData},null,8,["modelValue","disabled","placeholder","onKeyup"])]),e.isGranted("HR_PARENT_LOCAL")&&a.localCenters&&a.localCenters.length>0?((0,c.uX)(),(0,c.CE)("div",Va,[(0,c.bF)(g,{position:"is-bottom-right","aria-role":"list",class:"local-center-filter-dropdown",rounded:"",onActiveChange:n.onLocalCenterDropdownToggle},{trigger:(0,c.k6)(()=>[(0,c.bF)(p,{class:"button is-small is-default is-rounded local-center-filter-trigger","icon-right":"chevron-down",size:"is-small",disabled:a.isLoading},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Ra,(0,u.v_)(n.getSelectedLocalCenterName()||e.$t("Chapter")),1)]),_:1},8,["disabled"])]),default:(0,c.k6)(()=>[(0,c.Lk)("div",Oa,[(0,c.bF)(m,{ref:"localCenterSearchInput",modelValue:a.localCenterSearch,"onUpdate:modelValue":t[7]||(t[7]=e=>a.localCenterSearch=e),placeholder:e.$t("Search")+"...",size:"is-small",icon:"magnifying-glass","icon-pack":"fa-light"},null,8,["modelValue","placeholder"])]),(0,c.bF)(h,{value:null,"aria-role":"listitem",class:(0,u.C4)({"is-active":null===a.filters.localCenter}),onClick:t[8]||(t[8]=e=>n.onLocalCenterFilterSelect(null))},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All")),1)]),_:1},8,["class"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.filteredLocalCenters,t=>((0,c.uX)(),(0,c.Wv)(h,{key:t.id,value:t.id,"aria-role":"listitem",class:(0,u.C4)({"is-active":a.filters.localCenter===t.id}),onClick:e=>n.onLocalCenterFilterSelect(t)},{default:(0,c.k6)(()=>[e.tenant.settingFeatures.localCenter.hasParent&&t.parent?((0,c.uX)(),(0,c.CE)("span",Qa,"    â ")):(0,c.Q3)("",!0),(0,c.eW)(" "+(0,u.v_)(n.localCenterNameSelector(t,e.tenant)),1)]),_:2},1032,["value","class","onClick"]))),128))]),_:1},8,["onActiveChange"])])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",Ba,[a.itemsTotal?((0,c.uX)(),(0,c.CE)("span",Ga,(0,u.v_)(a.itemsTotal)+" "+(0,u.v_)(e.$t("records")),1)):(0,c.Q3)("",!0),(0,c.Lk)("button",{disabled:a.isLoading,class:"button is-small is-rounded is-light",onClick:t[9]||(t[9]=(...e)=>n.refresh&&n.refresh(...e))},[(0,c.Lk)("span",ja,[(0,c.bF)(f,{icon:"fa-light fa-refresh"}),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Refresh")),1)])],8,Wa)])]),a.totals&&a.totals.length>0&&!a.filters.uid?((0,c.uX)(),(0,c.CE)("div",za,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-small is-rounded",null===a.filters.status?"is-primary":"is-default"]),onClick:t[10
1]||(t[10]=e=>n.filterStatus(null))},(0,u.v_)(e.$t("All")),3),n.totalShow("new")?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-default is-rounded",onClick:t[11]||(t[11]=e=>n.filterStatus("new"))},(0,u.v_)(e.$t("Initiated"))+" ("+(0,u.v_)(n.totalShow("new"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("pending")?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-small is-warning is-rounded",onClick:t[12]||(t[12]=e=>n.filterStatus("pending"))},(0,u.v_)(e.$t("pending"))+" ("+(0,u.v_)(n.totalShow("pending"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("validated")?((0,c.uX)(),(0,c.CE)("button",{key:2,class:"button is-small is-info is-rounded",onClick:t[13]||(t[13]=e=>n.filterStatus("validated"))},(0,u.v_)(e.$t("Adhesion form validated"))+" ("+(0,u.v_)(n.totalShow("validated"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("interviewed")?((0,c.uX)(),(0,c.CE)("button",{key:3,class:"button is-small is-info is-rounded",onClick:t[14]||(t[14]=e=>n.filterStatus("interviewed"))},(0,u.v_)(e.$t("Interviewed"))+" ("+(0,u.v_)(n.totalShow("interviewed"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("background_checked")?((0,c.uX)(),(0,c.CE)("button",{key:4,class:"button is-small is-info is-rounded",onClick:t[15]||(t[15]=e=>n.filterStatus("background_checked"))},(0,u.v_)(e.$t("Background checked"))+" ("+(0,u.v_)(n.totalShow("background_checked"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("canceled")?((0,c.uX)(),(0,c.CE)("button",{key:5,class:"button is-small is-success is-rounded",onClick:t[16]||(t[16]=e=>n.filterStatus("canceled"))},(0,u.v_)(e.$t("Adhesion canceled"))+" ("+(0,u.v_)(n.totalShow("canceled"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("success")?((0,c.uX)(),(0,c.CE)("button",{key:6,class:"button is-small is-success is-rounded",onClick:t[17]||(t[17]=e=>n.filterStatus("success"))},(0,u.v_)(e.$t("Adhesion success"))+" ("+(0,u.v_)(n.totalShow("success"))+") ",1)):(0,c.Q3)("",!0),n.totalShow("rejected")?((0,c.uX)(),(0,c.CE)("button",{key:7,class:"button is-small is-success is-rounded",onClick:t[18]||(t[18]=e=>n.filterStatus("rejected"))},(0,u.v_)(e.$t("Adhesion rejected"))+" ("+(0,u.v_)(n.totalShow("rejected"))+") ",1)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.items?((0,c.uX)(),(0,c.CE)("div",qa,[(0,c.bF)(k,{data:a.items,paginated:"","pagination-rounded":"","backend-pagination":"",total:a.itemsTotal,"per-page":a.itemsPerPage,"current-page":a.itemsPageCurrent,hoverable:"","mobile-cards":!1,"backend-sorting":"","default-sort-direction":a.defaultSortOrder,"default-sort":[a.sortField,a.sortOrder],onPageChange:n.changeListPage,onSort:n.onSort},{default:(0,c.k6)(()=>[(0,c.bF)(y,{label:e.$t("ID"),sortable:"",field:"id"},{default:(0,c.k6)(e=>[(0,c.bF)(b,{to:{name:"AdhesionForm",params:{item:e.row.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Ja,(0,u.v_)(e.row.id),1)]),_:2},1032,["to"])]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Profile"),sortable:"",field:"user.lastName"},{default:(0,c.k6)(e=>[(0,c.bF)(b,{class:"is-size-6",target:"_blank",to:{name:"UserShow",params:{item:e.row.user.id}}},{default:(0,c.k6)(()=>[(0,c.bF)(v,{class:"mr-2","user-type":e.row.user.type,"is-small":!0},null,8,["user-type"]),(0,c.Lk)("span",Ha,(0,u.v_)(e.row.user.lastName),1),(0,c.Lk)("span",Ka,(0,u.v_)(e.row.user.firstName),1)]),_:2},1032,["to"])]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("age"),sortable:"",field:"user.dateBirth"},{default:(0,c.k6)(e=>[(0,c.Lk)("span",Ya,(0,u.v_)(e.row.user.age),1)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Chapter"),sortable:"",field:"user.localCenter.name"},{default:(0,c.k6)(e=>[(0,c.Lk)("div",Za,[e.row.user.localCenter?((0,c.uX)(),(0,c.Wv)(b,{key:0,target:"_blank",to:{name:"LocalCenterShow",params:{item:e.row.user.localCenter.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.row.user.localCenter.name),1)]),_:2},1032,["to"])):(0,c.Q3)("",!0)])]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Sent date"),sortable:"",field:"sentDate"},{default:(0,c.k6)(t=>[t.row.sentDate?((0,c.uX)(),(0,c.CE)("span",en,(0,u.v_)(e.$filters.formatDateCool(t.row.sentDate)),1)):(0,c.Q3)("",!0),t.row.sentByOtherData&&"new"!==t.row.status?((0,c.uX)(),(0,c.CE)("p",tn,[(0,c.Lk)("span",sn,[(0,c.bF)(b,{to:{name:"UserShow",params:{item:t.row.sentByOtherData.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(t.row.sentByOtherData.fullName),1)]),_:2},1032,["to"])])])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Updated"),sortable:"",field:"updatedDate"},{default:(0,c.k6)(t=>[t.row.updatedDate?((0,c.uX)(),(0,c.CE)("span",an,(0,u.v_)(e.$filters.formatDateCool(t.row.updatedDate)),1)):(0,c.Q3)("",!0),t.row.sentByOtherData&&"new"===t.row.status?((0,c.uX)(),(0,c.CE)("p",nn,[(0,c.Lk)("span",on,[(0,c.bF)(b,{to:{name:"UserShow",params:{item:t.row.sentByOtherData.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(t.row.sentByOtherData.fullName),1)]),_:2},1032,["to"])])])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Signed document")},{default:(0,c.k6)(t=>[t.row.hasUploadedDocument?((0,c.uX)(!0),(0,c.CE)(c.FK,{key:0},(0,c.pI)(t.row.medias,(i,s)=>((0,c.uX)(),(0,c.CE)("a",{key:i.id||s,target:"_blank",class:"button is-small is-light is-rounded",href:n.mediaSrc(i,"adhesion")},[(0,c.Lk)("span",rn,[(0,c.Lk)("span",dn,[(0,c.bF)(f,{icon:"fa-light fa-file"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("download")),1),t.row.medias.length>1?((0,c.uX)(),(0,c.CE)("span",cn,(0,u.v_)(s+1),1)):(0,c.Q3)("",!0)])],8,ln))),128)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Video")},{default:(0,c.k6)(t=>[t.row.hasVideo&&t.row.videoMedia?((0,c.uX)(),(0,c.CE)("a",{key:0,href:n.mediaSrc(t.row.videoMedia),target:"_blank",class:"button is-small is-light is-rounded"},[(0,c.Lk)("span",mn,[(0,c.bF)(f,{icon:"fa-light fa-video"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Video")),1)],8,un)):"new"!==t.row.status?((0,c.uX)(),(0,c.CE)("span",pn," - ")):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("Identity")},{default:(0,c.k6)(t=>[t.row.user.identity&&t.row.user.identity.hasUploadedDocument&&"pending"===t.row.user.identity.status?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-rounded is-light",disabled:a.isLoading,onClick:i=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:t.row.user.identity.id},query:{adhesion:!0}})},(0,u.v_)(e.$t("Validate"))+" â ",9,hn)):t.row.user.identity&&t.row.user.identity.isValidated?((0,c.uX)(),(0,c.CE)("span",{key:1,class:"tag is-cl
1ickable is-success is-rounded is-small pl-4 pr-4",onClick:i=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:t.row.user.identity.id}})},(0,u.v_)(e.$t("validated")),9,gn)):t.row.user.identity&&"rejected"===t.row.user.identity.status?((0,c.uX)(),(0,c.CE)("span",fn,[(0,c.bF)(b,{to:{name:"ValidateIdentityAdmin",params:{item:t.row.user.identity.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("rejected")),1)]),_:1},8,["to"])])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("status")},{default:(0,c.k6)(i=>[(0,c.bF)(g,{modelValue:a.items[i.index].status,"onUpdate:modelValue":[e=>a.items[i.index].status=e,e=>n.changeStatus(i.index)],hoverable:"","append-to-body":"","aria-role":"list",position:"is-bottom-left",class:"adhesionStatusDropdown"},{trigger:(0,c.k6)(({active:t,toggle:s})=>["new"===i.row.status?((0,c.uX)(),(0,c.CE)("span",bn,[(0,c.eW)((0,u.v_)(e.$t("Initiated"))+" ",1),(0,c.Lk)("span",yn,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):"success"===i.row.status?((0,c.uX)(),(0,c.CE)("span",vn,[(0,c.eW)((0,u.v_)(e.$t("Adhesion success"))+" ",1),(0,c.Lk)("span",kn,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):"interviewed"===i.row.status?((0,c.uX)(),(0,c.CE)("span",Cn,[(0,c.eW)((0,u.v_)(e.$t("Interviewed"))+" ",1),(0,c.Lk)("span",Ln,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):"rejected"===i.row.status?((0,c.uX)(),(0,c.CE)("span",wn,[(0,c.eW)((0,u.v_)(e.$t("Adhesion rejected"))+" ",1),(0,c.Lk)("span",_n,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):"duplicated"===i.row.status?((0,c.uX)(),(0,c.CE)("span",En,[(0,c.eW)((0,u.v_)(e.$t("Duplicated"))+" ",1),(0,c.Lk)("span",$n,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):"validated"===i.row.status?((0,c.uX)(),(0,c.CE)("span",Fn,[(0,c.eW)((0,u.v_)(e.$t("Adhesion form validated"))+" ",1),(0,c.Lk)("span",Tn,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):"canceled"===i.row.status?((0,c.uX)(),(0,c.CE)("span",Sn,[(0,c.eW)((0,u.v_)(e.$t("Adhesion canceled"))+" ",1),(0,c.Lk)("span",An,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])])):((0,c.uX)(),(0,c.CE)("span",Pn,[(0,c.eW)((0,u.v_)(e.$t(a.items[i.index].status))+" ",1),(0,c.Lk)("span",In,[(0,c.bF)(f,{icon:"fa-light fa-chevron-down"})])]))]),default:(0,c.k6)(()=>[(0,c.bF)(h,{"aria-role":"listitem",value:null},{default:(0,c.k6)(()=>[...t[20]||(t[20]=[(0,c.eW)(" ... ",-1)])]),_:1}),(0,c.bF)(h,{"aria-role":"listitem",value:"new"},{default:(0,c.k6)(()=>[t[21]||(t[21]=(0,c.eW)(" â ",-1)),(0,c.Lk)("span",Mn,(0,u.v_)(e.$t("Initiated")),1)]),_:1}),n.canSetStatus(i.row,"pending")?((0,c.uX)(),(0,c.Wv)(h,{key:0,"aria-role":"listitem",value:"pending"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",xn,(0,u.v_)(e.$t("pending")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"duplicated")?((0,c.uX)(),(0,c.Wv)(h,{key:1,"aria-role":"listitem",value:"duplicated"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Nn,(0,u.v_)(e.$t("Duplicated")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"validated")?((0,c.uX)(),(0,c.Wv)(h,{key:2,"aria-role":"listitem",value:"validated"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Un,(0,u.v_)(e.$t("Adhesion form validated")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"background_checked")?((0,c.uX)(),(0,c.Wv)(h,{key:3,"aria-role":"listitem",value:"background_checked"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Dn,(0,u.v_)(e.$t("Background checked")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"interviewed")?((0,c.uX)(),(0,c.Wv)(h,{key:4,"aria-role":"listitem",value:"interviewed"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Xn,(0,u.v_)(e.$t("Interviewed")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"canceled")?((0,c.uX)(),(0,c.Wv)(h,{key:5,"aria-role":"listitem",value:"canceled"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Vn,(0,u.v_)(e.$t("Adhesion canceled")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"rejected")?((0,c.uX)(),(0,c.Wv)(h,{key:6,"aria-role":"listitem",value:"rejected"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Rn,(0,u.v_)(e.$t("Adhesion rejected")),1)]),_:1})):(0,c.Q3)("",!0),n.canSetStatus(i.row,"success")?((0,c.uX)(),(0,c.Wv)(h,{key:7,"aria-role":"listitem",value:"success"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",On,(0,u.v_)(e.$t("Adhesion success")),1)]),_:1})):(0,c.Q3)("",!0)]),_:2},1032,["modelValue","onUpdate:modelValue"]),"ACTIVE"!==i.row.user.status?((0,c.uX)(),(0,c.CE)("p",Qn,[(0,c.Lk)("span",Bn,(0,u.v_)(e.$t("member"))+": "+(0,u.v_)(e.$t(i.row.user.status)),1)])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(y,{label:e.$t("...")},{default:(0,c.k6)(t=>["new"!==t.row.status?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-rounded is-white is-small",{"is-primary":!t.row.hasSummary,"is-success":t.row.hasSummary}]),onClick:e=>n.openLogsModal(t.row.id,0)},(0,u.v_)(e.$t("Conclusions")),11,Gn)):(0,c.Q3)("",!0),(0,c.Lk)("button",{class:"button is-rounded is-white is-small ml-1",onClick:e=>n.openLogsModal(t.row.id,1)},(0,u.v_)(e.$t("Log")),9,Wn)]),_:1},8,["label"])]),_:1},8,["data","total","per-page","current-page","default-sort-direction","default-sort","onPageChange","onSort"])])):(0,c.Q3)("",!0)]),(0,c.bF)(L,{modelValue:a.isLogsModalVisible,"onUpdate:modelValue":t[19]||(t[19]=e=>a.isLogsModalVisible=e),title:e.$t("Adhesion"),"maximize-route":a.logsModalAdhesionId?{name:"AdhesionLogs",params:{item:a.logsModalAdhesionId},query:{tab:1===a.logsModalTab?"logs":"conclusions"}}:null,"modal-width":900},{default:(0,c.k6)(()=>[a.logsModalAdhesionId?((0,c.uX)(),(0,c.Wv)(C,{key:a.logsModalAdhesionId+"-"+a.logsModalTab,"adhesion-id":a.logsModalAdhesionId,"is-embedded":!0,"initial-tab":a.logsModalTab},null,8,["adhesion-id","initial-tab"])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title","maximize-route"])])}var zn=i(38221),qn=i.n(zn),Jn=i(80762),Hn=i(7757);const Kn=["pending","validated","background_checked","interviewed"];function Yn(e,{hasReviewSteps:t=!0,hasFlexibleReviewSteps:i=!1}={}){return t&&!i&&["rejected","success"].includes(e)}function Zn(e,t,{hasReviewSteps:i=!0,hasFlexibleReviewSteps:s=!1,identityValidated:a=!1,hasIdentityVerification:n=!0}={}){const o=i&&s;if(o){if(["validated","background_checked"].includes(t))return Kn.includes(e);if("interviewed"===t)return[...Kn,"success","rejected"].includes(e);if(["success","rejected"].includes(t))return[...Kn,t].includes(e)}switch(t){case"new":return!0;
1case"pending":return["pending","new"].includes(e);case"duplicated":return["new","pending","duplicated"].includes(e);case"validated":return i&&["pending","validated"].includes(e)&&(!n||a);case"background_checked":return i&&["validated","background_checked"].includes(e);case"interviewed":return i&&["interviewed","background_checked","validated","success","rejected"].includes(e);case"canceled":return["pending","validated","background_checked","interviewed","canceled"].includes(e);case"rejected":return["background_checked","interviewed","rejected"].includes(e)||!i&&Kn.includes(e);case"success":return["interviewed","success"].includes(e)||!i&&Kn.includes(e);default:return!1}}var eo={data(){return{items:null,totals:null,isChangeToDraft:null,changeToDraftReasons:[],localCenters:null,localCenterSearch:"",filters:{localCenter:this.$route.query.localCenter?parseInt(this.$route.query.localCenter):null,name:this.$route.query.name?this.$route.query.name:null,status:this.$route.query.status?this.$route.query.status:null,uid:this.$route.query.uid?this.$route.query.uid:null},itemsTotal:null,itemsPageCurrent:this.$route.query.page?parseInt(this.$route.query.page):1,itemsPerPage:20,isLoading:!1,sortField:this.$store.state.listValues.adhesion.sortField,sortOrder:this.$store.state.listValues.adhesion.sortOrder,defaultSortOrder:"desc",isLogsModalVisible:!1,logsModalAdhesionId:null,logsModalTab:0}},created(){this.tenant.settingFeatures.adhesion.isActive||this.isGranted("HR_LOCAL")||this.$router.push({name:"Dashboard"}),this.isGranted("HR_PARENT_LOCAL")&&this.loadLocalCenters(),this.loadItems()},computed:{...(0,vi.L8)(["isGranted","tenant","user"]),isChangeToDraftModal(){return null!==this.isChangeToDraft},queryLink(){return this.isLocal?{isLocalSettings:1}:{}},filteredLocalCenters(){if(!this.localCenters)return[];if(!this.localCenterSearch)return this.localCenters;const e=this.localCenterSearch.toLowerCase();return this.localCenters.filter(t=>(0,ds.Hc)(t,this.tenant).toLowerCase().includes(e))},hasAdhesionReviewSteps(){return!1!==this.tenant?.settingFeatures?.adhesion?.hasReviewSteps},hasAdhesionIdentityVerification(){return!1!==this.tenant?.settingFeatures?.adhesion?.hasIdentityVerification},hasAdhesionFlexibleReviewSteps(){return!0===this.tenant?.settingFeatures?.adhesion?.hasFlexibleReviewSteps}},methods:{sortLocalCenters:ds.KN,canSetStatus(e,t){return Zn(e.status,t,{hasReviewSteps:this.hasAdhesionReviewSteps,hasFlexibleReviewSteps:this.hasAdhesionFlexibleReviewSteps,identityValidated:!!e.user?.identity?.isValidated,hasIdentityVerification:this.hasAdhesionIdentityVerification})},localCenterNameSelector:ds.Hc,mediaSrc:ds.F9,openLogsModal(e,t){this.logsModalAdhesionId=e,this.logsModalTab=t,this.isLogsModalVisible=!0},getAsyncData:qn()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return!1;this.filterItems()},400),loadLocalCenters(){let e="?isActive=1&tenantSlug="+this.tenant.slug;return this.isGranted("HR_PARENT_LOCAL")&&!this.isGranted("HR_TENANT")&&(this.user.localCenterParent?e+="&parent="+this.user.localCenterParent.id:this.user.localCenter?.isParent&&(e+="&parent="+this.user.localCenter.id)),this.$http.plain.get("/local-centers-public"+e).then(t=>{e.includes("parent")&&(this.user.localCenterParent?t.data["hydra:member"].push(this.user.localCenterParent):this.user.localCenter&&t.data["hydra:member"].push(this.user.localCenter)),this.localCenters=(0,ds.KN)(t.data["hydra:member"],this.tenant)}).catch(e=>console.error(e))},getSelectedLocalCenterName(){if(!this.filters.localCenter||!this.localCenters)return null;const e=this.localCenters.find(e=>e.id===this.filters.localCenter);return e?(0,ds.Hc)(e,this.tenant):null},onLocalCenterDropdownToggle(e){e?this.$nextTick(()=>{this.$refs.localCenterSearchInput&&this.$refs.localCenterSearchInput.focus()}):this.localCenterSearch=""},onLocalCenterFilterSelect(e){this.filters.localCenter=e?e.id:null,this.localCenterSearch="",this.filterItems(!0)},filterStatus(e){this.filters.status=e,this.filterItems(!0)},totalShow(e){let t=this.totals.find(t=>t.status===e);return t?t.total:null},changeStatus(e){if("new"!==this.items[e].status||null!==this.isChangeToDraft)return this.isChangeToDraft=null,Yn(this.items[e].status,{hasReviewSteps:this.hasAdhesionReviewSteps,hasFlexibleReviewSteps:this.hasAdhesionFlexibleReviewSteps}
1)&&!this.items[e].hasSummary?(this.$buefy.toast.open({message:this.$t("You need to add interview in background conclusions"),type:"is-danger",duration:7e3}),this.loadItems()):["canceled"].includes(this.items[e].status)&&!this.items[e].hasCancelSummary?(this.$buefy.toast.open({message:this.$t("You need to add cancel reason"),type:"is-danger",duration:7e3}),this.loadItems()):void this.$buefy.dialog.confirm({title:this.$t("Change status"),message:this.$t("Are you sure you want to change adhesion status for")+" "+this.items[e].user.fullName+"?",confirmText:this.$t("yes"),type:"is-primary",onCancel:()=>{this.loadItems()},onConfirm:()=>{if(void 0===this.items[e].status)return;if(null===this.items[e].status)return this.$buefy.toast.open({message:this.$t("Status can not be set with null value."),type:"is-danger"}),this.loadItems();this.isLoading=!0;let t="/adhesion/"+this.items[e].id+"/status",i={status:this.items[e].status,changeToDraftReasons:this.changeToDraftReasons};"pending"===this.items[e].status&&(t="/adhesion/"+this.items[e].id+"/send",i={}),this.$http.plain.patch(t,i).then(t=>{this.items[e]=t.data,this.saveSuccessful(t)}).catch(e=>{console.error(e)}).finally(()=>(this.isLoading=!1,this.loadItems()))}});this.isChangeToDraft=e},saveSuccessful(e){this.$buefy.toast.open({type:"is-success",message:this.$t("updatedSuccessfully")})},filterItems(e=!1){e&&(this.itemsPageCurrent=1);let t={};t=this.filters.status?{status:this.filters.status}:{...t},t=this.filters.name?{name:this.filters.name,...t}:{...t},t=this.filters.uid?{uid:this.filters.uid,...t}:{...t},t=this.filters.localCenter?{localCenter:this.filters.localCenter,...t}:{...t},t={page:this.itemsPageCurrent,...t},this.$router.push({name:"Adhesions",query:{...t}}).catch(()=>{}),this.loadItems()},productShowQuery(e){return e.localCenter?{isLocalSettings:1}:{}},getFiltersQueryString(){let e="";return this.filters.status&&(e+="&status="+this.filters.status),this.filters.uid&&(e+="&user.id="+this.filters.uid),this.filters.localCenter?e+="&onlyLocalCenter="+this.filters.localCenter:this.isGranted("HR_TENANT")||(this.isGranted("HR_PARENT_LOCAL")&&this.user.localCenterParent?e+="&localCenter="+this.user.localCenterParent.id:e+="&localCenter="+this.user.localCenter.id),this.filters.name&&(e+="&user.fullName="+this.filters.name),e},getOrderQueryString(){return"&order["+this.sortField+"]="+this.sortOrder},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.filterItems(!1)},refresh(){this.$store.commit("resetListValuesAdhesion"),this.itemsPageCurrent=1,this.loadItems()},loadItems(){this.isChangeToDraft=null,this.changeToDraftReasons=[],this.isLoading=!0;let e=this.getOrderQueryString(),t=this.getFiltersQueryString();this.$http.plain.get("/adhesions?page="+this.itemsPageCurrent+e+t).then(e=>(this.items=e.data["hydra:member"],this.itemsTotal=e.data["hydra:totalItems"],this.$http.plain.get("/adhesion-totals?"+t).then(e=>{this.totals=e.data}))).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.$store.state.listValues.adhesion.sortField=e,this.$store.state.listValues.adhesion.sortOrder=t,this.loadItems()},error(e){console.error(e)}},components:{UserTypeThumbnail:xt.A,ItemViewModal:Jn.A,AdhesionLogs:Hn["default"]}};const to=(0,Li.A)(eo,[["render",jn]]);var io=to;const so={key:0,class:"column"},ao={key:0,class:"title"},no={key:1,class:"mt-5 is-size-5"},oo={key:0,class:"title is-size-4 mb-5"},lo={key:1,class:"is-size-5 mb-5"},ro={key:1,class:"level-right"},co={key:2,class:"mb-5"},uo={class:"has-text-dark"},mo={key:0,class:"icon-text ml-0 mr-1"},po={class:"is-small ml-0 mr-1 has-text-dark"},ho={class:"has-text-dark"},go={key:0,class:"control"},fo={class:"has-text-dark"},bo={key:0,class:"has-text-dark"},yo={key:1,class:"has-text-dark"},vo={class:"level mt-5"},ko={key:1,class:"payment-page-product pp-v2"},Co={key:0,class:"pp-v2-nav"},Lo={class:"pp-v2-nav-logo"},wo={class:"pp-v2-nav-right"},_o={key:0,class:"pp-v2-hero-video"},Eo=["src"],$o=["src","alt"],Fo={class:"pp-v2-left"},To={key:0,class:"pp-v2-card pp-v2-campaign"},So={key:0,class:"pp-v2-campaign-title"},Ao={key:0},Po={key:1},Io={key:2},Mo={key:3},xo={key:1,class:"pp-v2-progress"},No={class:"pp-v2-progress-row"},Uo={class:"pp-v2-progress-amt"},Do={class:"pp-v2-progress-goal"},Xo={class:"pp-v2-progress-track"},Vo={class:"pp-v2-progress-sub"},Ro={key:0}
1,Oo={key:1},Qo={key:2,class:"pp-v2-progress-ring-row"},Bo={class:"pp-v2-ring"},Go={width:"48",height:"48",viewBox:"0 0 48 48"},Wo=["stroke-dashoffset"],jo={id:"ppProgressGrad",x1:"0",y1:"0",x2:"1",y2:"1"},zo=["stop-color"],qo=["stop-color"],Jo={class:"pp-v2-ring-pct"},Ho={class:"pp-v2-ring-raised"},Ko={class:"pp-v2-ring-label"},Yo={class:"pp-v2-ring-goal"},Zo={key:1,class:"pp-v2-card pp-v2-campaign"},el={key:0,class:"pp-v2-campaign-title"},tl={key:0},il={key:1},sl={key:1,class:"pp-v2-hr"},al={key:2,class:"pp-v2-story-body"},nl={key:0,class:"is-flex"},ol={key:2,class:"pp-v2-card pp-v2-card-inner"},ll={class:"has-text-centered has-text-dark has-text-weight-semibold py-5"},rl={key:0,class:"pp-v2-card pp-v2-story pp-v2-story-grid"},dl={class:"pp-v2-story-title"},cl={class:"pp-v2-story-body"},ul={key:0,class:"is-flex"},ml={class:"icon-text has-text-weight-semibold"},pl={class:"is-small"},hl={key:1,id:"commentsList",class:"pp-v2-card pp-v2-support pp-v2-support-grid"},gl={class:"pp-v2-card-inner"},fl={class:"pp-v2-support-header"},bl={class:"pp-v2-section-title"},yl={class:"pp-v2-badge"},vl={class:"pp-v2-support-hint"},kl={class:"pp-v2-support-av"},Cl={class:"pp-v2-support-name"},Ll={class:"pp-v2-support-meta"},wl={key:0,class:"pp-v2-support-text"},_l={key:0,class:"is-flex"},El={class:"icon-text"},$l={class:"is-small mt-1 ml-1"},Fl={class:"pp-v2-right"},Tl={key:"payment",class:"inline-payment-step"},Sl={key:0,class:"mb-4"},Al={class:"icon is-small"},Pl={key:1,class:"has-text-centered py-6 payment-processing-container"},Il={class:"processing-animation"},Ml={class:"processing-circle"},xl={class:"processing-checkmark"},Nl={class:"mt-5 has-text-grey-dark has-text-weight-semibold is-size-5"},Ul={class:"is-size-7 has-text-grey mt-2"},Dl={key:2,class:"pp-v2-success"},Xl={class:"pp-v2-success-hero"},Vl={class:"pp-v2-success-icon-wrap"},Rl={class:"pp-v2-success-confetti"},Ol={class:"pp-v2-success-hero-title"},Ql={class:"pp-v2-success-summary"},Bl={class:"pp-v2-success-summary-row"},Gl={class:"pp-v2-success-summary-label"},Wl={class:"pp-v2-success-amount"},jl={key:0,class:"pp-v2-success-freq"},zl={class:"pp-v2-success-confirmed"},ql={class:"pp-v2-success-desc"},Jl={class:"pp-v2-success-receipt"},Hl={class:"pp-v2-success-receipt-icon"},Kl={class:"has-text-weight-semibold"},Yl={key:0},Zl={class:"pp-v2-success-impact"},er={class:"pp-v2-success-impact-title"},tr={class:"pp-v2-success-impact-desc"},ir={key:3,class:"has-text-centered py-6"},sr={class:"mb-4"},ar={class:"icon is-large has-text-danger",style:{"font-size":"4rem"}},nr={class:"title is-4 mb-3"},or={class:"has-text-grey mb-3"},lr={class:"buttons is-centered"},rr={key:4},dr={class:"amount-summary mb-5",style:{position:"relative"}},cr={class:"pp-v2-summary-row"},ur={class:"pp-v2-summary-label"},mr={class:"pp-v2-summary-value"},pr={class:"pp-v2-summary-row pp-v2-summary-row--fee"},hr={class:"pp-v2-summary-label pp-v2-fee-label"},gr={class:"pp-v2-summary-value"},fr={class:"pp-v2-summary-row pp-v2-summary-row--total"},br={class:"pp-v2-summary-label"},yr={class:"pp-v2-summary-value"},vr={key:0,class:"is-size-7 mb-4 has-text-centered",style:{background:"#fff3cd",padding:"8px 12px","border-radius":"8px",color:"#856404"}},kr={key:1,class:"notification is-danger is-light mb-4"},Cr=["disabled"],Lr={class:"is-size-7 has-text-centered mt-4"},wr={class:"icon-text is-justify-content-center"},_r={class:"icon is-small"},Er={key:"loading",class:"py-6"},$r={key:"form"},Fr={class:"pp-v2-donate-header"},Tr={key:0,class:"mb-4"},Sr={class:"pp-v2-freq"},Ar={class:"is-size-7 mt-2 has-text-centered pp-v2-boost-text"},Pr={class:"pp-v2-amounts"},Ir=["onClick"],Mr={key:0},xr={key:1,class:"pp-v2-custom"},Nr={class:"pp-v2-custom-currency"},Ur={class:"pp-v2-custom-symbol"},Dr={class:"pp-v2-custom-code"},Xr=["value"],Vr={key:2,class:"pp-v2-cover-fee mt-3 p-2",style:{position:"relative"}},Rr={class:"pp-v2-cover-fee-amount"},Or={key:3,class:"mt-5 mb-5"},Qr={class:"pp-v2-donate-header mb-2"},Br={key:0,class:"pp-v2-select-wrap"},Gr=["value"],Wr={value:"",disabled:""},jr=["value"],zr={key:0,value:"local-center"},qr={class:"pp-v2-select-arrow"},Jr={key:1,class:"pp-v2-select-wrap mt-3"},Hr={value:null},Kr=["value"],Yr={class:"pp-v2-select-arrow"},Zr={key:4,class:"mt-4"},ed={class:"mb-3"},td={key:0,class:"mb-3"},id={class:"mb-3"},sd={key:1,class:"mb-3"},ad={key:2,class:"mb-3"},nd={key:3,class:"mb-3"},od={key:5,class:"mb-3"},ld={key:6,class:"mb-1 p-2"},rd={class:"mt-2"},dd={class:"pp-v2-options p-2"},cd={key:0,class:"mb-3",style:{position:"relative"}}
1,ud={key:0,class:"pp-v2-info-popover"},md=["href"],pd={key:1},hd={key:1,class:"mb-3"},gd={key:2,class:"mb-3"},fd=["href"],bd={key:3,class:"mb-3"},yd={key:1,class:"is-size-7"},vd={key:4,class:"mb-3"},kd={key:7,class:"is-size-7 has-text-weight-semibold mb-3"},Cd={href:"https://stripe.com/en-ro/pricing",target:"_blank"},Ld={key:8,class:"is-size-7 mb-4"},wd=["disabled"],_d=["disabled"],Ed={key:0,class:"pp-v2-donations"},$d={class:"pp-v2-donations-header"},Fd={class:"pp-v2-donations-icon"},Td={class:"pp-v2-donations-count"},Sd={key:0,class:"pp-v2-just-donated"},Ad={style:{color:"#a90194"}},Pd={class:"has-text-weight-semibold"},Id={key:1},Md={class:"pp-v2-d-info"},xd={class:"pp-v2-d-name"},Nd={class:"pp-v2-d-meta"},Ud={class:"pp-v2-d-amount"},Dd={class:"pp-v2-donations-actions"},Xd={class:"pp-v2-secure"},Vd={key:3,class:"pp-v2-sticky"},Rd={class:"pp-v2-sticky-info"},Od={class:"pp-v2-sticky-raised"},Qd={class:"pp-v2-sticky-sub"},Bd={class:"pp-v2-dm-header"},Gd={class:"pp-v2-dm-title-row"},Wd={class:"pp-v2-dm-title"},jd={key:0,class:"pp-v2-dm-badge"},zd={class:"pp-v2-dm-tabs"},qd={class:"pp-v2-dm-content"},Jd={key:0,class:"pp-v2-dm-hint"},Hd={class:"pp-v2-dm-avatar"},Kd={class:"pp-v2-dm-info"},Yd={class:"pp-v2-dm-name"},Zd={class:"pp-v2-dm-meta"},ec={class:"pp-v2-dm-amount"},tc={class:"pp-v2-dm-date"},ic={key:0,class:"pp-v2-dm-footer"},sc={class:"pp-v2-footer"},ac=["href"],nc={key:5,class:"mt-5 mb-6"};function oc(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("font-awesome-icon"),r=(0,c.g2)("b-radio-button"),d=(0,c.g2)("b-input"),p=(0,c.g2)("b-field"),h=(0,c.g2)("OrgoLogo"),g=(0,c.g2)("TipTap"),f=(0,c.g2)("b-button"),b=(0,c.g2)("b-checkbox"),y=(0,c.g2)("PaymentLoadingAnimation"),v=(0,c.g2)("b-modal"),k=(0,c.g2)("ShareUrlModal");return(0,c.uX)(),(0,c.CE)(c.FK,null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),a.item&&a.isWidget?((0,c.uX)(),(0,c.CE)("section",{key:0,class:(0,u.C4)([{"o-bigwidth p-5":"popup"===a.widgetType,"o-smallwidth":"vertical"===a.widgetType},"payment-page-product"])},[(0,c.Lk)("div",{class:(0,u.C4)({columns:"popup"===a.widgetType})},["popup"===a.widgetType?((0,c.uX)(),(0,c.CE)("div",so,[(0,c.Lk)("div",{class:(0,u.C4)({"mr-5":!e.$isMobile()})},[a.widgetOffTitle?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("p",ao,(0,u.v_)(a.item.settings.widgetTitle),1)),a.widgetOffDescription?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("p",no,(0,u.v_)(a.item.settings.widgetDescription),1))],2)])):(0,c.Q3)("",!0),a.item&&!a.item.isArchived?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)({column:"popup"===a.widgetType,"p-5 pb-6 card-dotted":"vertical"===a.widgetType})},["vertical"===a.widgetType?((0,c.uX)(),(0,c.CE)("div",{key:0,class:(0,u.C4)({"ml-1":!e.$isMobile()})},[a.widgetOffTitle?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("p",oo,(0,u.v_)(a.item.settings.widgetTitle),1)),a.widgetOffDescription?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("p",lo,(0,u.v_)(a.item.settings.widgetDescription),1))],2)):(0,c.Q3)("",!0),"popup"===a.widgetType?((0,c.uX)(),(0,c.CE)("div",ro,[(0,c.Lk)("button",{class:"button is-rounded is-ghost is-large",onClick:t[1]||(t[1]=(...e)=>n.removeIframeWidget&&n.removeIframeWidget(...e))},[(0,c.bF)(l,{icon:"fa-light fa-xmark"})])])):(0,c.Q3)("",!0),n.showPaymentTypeToggle?((0,c.uX)(),(0,c.CE)("section",co,[(0,c.Lk)("div",{class:(0,u.C4)({"is-flex is-flex-wrap-wrap":!e.$isMobile()})},[(0,c.bF)(r,{modelValue:a.paymentType,"onUpdate:modelValue":t[2]||(t[2]=e=>a.paymentType=e),size:"is-medium",class:(0,u.C4)(["is-fullwidth-mobile",{"mr-2 ":!e.$isMobile(),"mb-2":e.$isMobile()}]),type:"is-warning","native-value":"one"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",uo,(0,u.v_)(e.$t("One time")),1)]),_:1},8,["modelValue","class"]),(0,c.bF)(r,{modelValue:a.paymentType,"onUpdate:modelValue":t[3]||(t[3]=e=>a.paymentType=e),size:"is-medium",class:"is-fullwidth-mobile",type:"is-warning","native-value":"subscription"},{default:(0,c.k6)(()=>[a.item&&e.tenant.settingFeatures.onlinePayments.subscriptionSupportProductId===a.item.uuid?((0,c.uX)(),(0,c.CE)("span",mo,[(0,c.Lk)("span",po,[(0,c.bF)(l,{icon:"fa-light fa-hand-heart"})])])):(0,c.Q3)("",!0),(0,c.Lk)("span",ho,(0,u.v_)(e.$t("Monthly recurring")),1)]),_:1},8,["modelValue"])],2)])):(0,c.Q3)("",!0),(0,c.bF)(p,{class:"paymentPageCustomInput"},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.productPrices,(i,s)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:i.id}
1,[i&&!i.isArchived&&n.paymentTypeVisible(i)?((0,c.uX)(),(0,c.CE)("p",go,[i.currency!==a.currency||a.item.abTestingEnabled&&a.item.productPriceVariations&&!(a.item.productPriceVariations&&a.abTestingVariationId&&i.productPriceVariationValues?.find(e=>e.productPriceVariation.id===a.abTestingVariationId)&&"donation"===a.item.type&&("subscription"===a.paymentType&&!a.atLeastOnePriceForSubscriptionAndAbTesting||"subscription"!==a.paymentType&&!a.atLeastOnePriceForOneTimeAndAbTesting))?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(r,{key:i.priceStripeId,modelValue:a.priceId,"onUpdate:modelValue":[t[4]||(t[4]=e=>a.priceId=e),e=>a.paymentValue=i.price],size:"is-medium",class:(0,u.C4)([{"ml-1 mr-1":!e.$isMobile()},"is-fullwidth-mobile mb-2"]),type:"is-warning",outlined:"","native-value":i.id,onClick:n.cancelCustomPriceInput},{default:(0,c.k6)(()=>[i.displayNameOnPaymentPage?((0,c.uX)(),(0,c.CE)("span",{key:0,class:(0,u.C4)([{"mr-2":!e.$isMobile()},"has-text-dark"])},(0,u.v_)(i.name),3)):(0,c.Q3)("",!0),(0,c.Lk)("span",fo,(0,u.v_)(e.$filters.money(i.price,i.currency)),1)]),_:2},1032,["modelValue","class","native-value","onUpdate:modelValue","onClick"]))])):(0,c.Q3)("",!0)],64))),128)),a.item.hasCustomPriceValue?((0,c.uX)(),(0,c.Wv)(r,{key:0,modelValue:a.priceId,"onUpdate:modelValue":t[6]||(t[6]=e=>a.priceId=e),"native-value":null,type:"is-warning",class:(0,u.C4)([{"ml-1":!e.$isMobile()},"invisible-text-input is-fullwidth-mobile"]),size:"is-medium",onClick:n.enableCustomPriceInput},{default:(0,c.k6)(()=>[a.isCustomPriceInputActive?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("span",bo,(0,u.v_)(e.$t("Another amount")),1)),(0,c.bo)((0,c.bF)(d,{ref:"customPriceValueInput",modelValue:a.customPriceValue,"onUpdate:modelValue":t[5]||(t[5]=e=>a.customPriceValue=e),onInput:n.updatePaymentValueFromCustom,onChange:n.checkMinMaxCustom},null,8,["modelValue","onInput","onChange"]),[[m.aG,a.isCustomPriceInputActive]]),a.isCustomPriceInputActive?((0,c.uX)(),(0,c.CE)("span",yo,(0,u.v_)(n.currencySymbol(a.currency)),1)):(0,c.Q3)("",!0)]),_:1},8,["modelValue","class","onClick"])):(0,c.Q3)("",!0)]),_:1}),(0,c.Lk)("div",vo,[(0,c.Lk)("button",{class:"btn_donate button is-primary is-medium is-rounded",onClick:t[7]||(t[7]=(...e)=>n.navigateFromWidgetToOrgo&&n.navigateFromWidgetToOrgo(...e))},(0,u.v_)(e.$t("Continue"))+" â ",1),(0,c.Lk)("img",{src:"/img/cards.png",alt:"",width:"200px",class:(0,u.C4)([{"ml-5":!e.$isMobile()},"mt-3"]),style:{"border-radius":"10px"}},null,2)])],2)):(0,c.Q3)("",!0)],2)],2)):a.item&&!a.isWidget?((0,c.uX)(),(0,c.CE)("section",ko,[a.item.logo&&(n.isMobileView?!0===a.item.settings.tenantLogoMobile:!1!==a.item.settings.tenantLogo)?((0,c.uX)(),(0,c.CE)("nav",Co,[(0,c.Lk)("div",Lo,[(0,c.bF)(h,{class:"pp-v2-nav-logo-mark"})]),(0,c.Lk)("div",wo,[(0,c.Lk)("button",{class:"pp-v2-nav-share",onClick:t[8]||(t[8]=e=>a.showShareModal=!0)},[(0,c.bF)(l,{icon:"fa-light fa-share-nodes"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Share")),1)]),(0,c.Lk)("button",{class:"pp-v2-nav-donate",onClick:t[9]||(t[9]=(...e)=>n.scrollToForm&&n.scrollToForm(...e))},(0,u.v_)(e.$t("Donate")),1)])])):(0,c.Q3)("",!0),a.item.logo||a.item.heroVideoUrl?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)(["pp-v2-hero",{"pp-v2-hidden-mobile":"form"!==a.paymentStep}])},[a.item.heroVideoUrl?((0,c.uX)(),(0,c.CE)("div",_o,[(0,c.Lk)("iframe",{src:n.getYouTubeEmbedUrl(a.item.heroVideoUrl),frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",style:{width:"100%",height:"100%",border:"none"}},null,8,Eo)])):a.item.logo?((0,c.uX)(),(0,c.CE)("img",{key:1,class:"pp-v2-hero-bg",src:n.logoPublicUrl(a.item.logo,"product"),alt:a.item.name},null,8,$o)):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),e.tenant?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)(["pp-v2-grid",{"pp-v2-grid--sidebar":a.item.settings.newestAndTopDonationSection||a.item.settings.commentSection,"pp-v2-grid--no-hero":!a.item.logo&&!a.item.heroVideoUrl,"pp-v2-grid--has-video":a.item.heroVideoUrl,"pp-v2-grid--payment":"form"!==a.paymentStep}])},[(0,c.Lk)("div",{class:(0,u.C4)(["pp-v2-left-col",{"pp-v2-hidden-mobile":"form"!==a.paymentStep}])},[(0,c.Lk)("div",Fo,[a.item.goalValue?((0,c.uX)(),(0,c.CE)("div",To,[a.isIframe||(n.isMobileView?!1===a.item.settings.showTitleMobile:!1===a.item.settings.showTitle)?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("h1",So,[n.currencies.length>1&&"en"===e.$i18n.locale?((0,c.uX)(),(0,c.CE)("span",Ao,(0,u.v_)(a.item.nameEn),1)):((0,c.uX)(),(0,c.CE)("span",Po,(0,u.v_)(a.item.name),1)),n.localCenterOption?((0,c.uX)(),(0,c.CE)("span",Io," - "+(0,u.v_)(e.$t(n.localCenterOption.isParent?"The parent chapter":"The chapter"))+" "+(0,u.v_)(n.localCenterOption.name),1)):(0,c.Q3)("",!0),n.selectedOption&&e.$route.query.optionId?((0,c.uX)(),(0,c.CE)("span",Mo,"- "+(0,u.v_)(n.selectedOption.name),1)):(0,c.Q3)("",!0)])),e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",xo,[(0,c.Lk)("div",No,[(0,c.Lk)("span",Uo,(0,u.v_)(e.$filters.money(Math.round(a.productTotal?.onetime_total||0))),1),(0,c.Lk)("span",Do,["nd"!==e.tenant?.slug?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.eW)((0,u.v_)(e.$t("raised of"))+" "+(0,u.v_)(e.$filters.money(Math.round(a.item.goalValue||0)))+" "+(0,u.v_)(e.$t("goal")),1)],64)):(0,c.Q3)("",!0)])]),(0,c.Lk)("div",Xo,[(0,c.Lk)("div",{class:"pp-v2-progress-fill",style:(0,u.Tr)({width:Math.min(parseInt(parseInt(a.productTotal?.onetime_total||0)/parseInt(a.item.goalValue)*100),100)+"%"})},null,4)]),(0,c.Lk)("div",Vo,[(0,c.Lk)("span",null,(0,u.v_)(a.productTotal?.onetime_payments_count||0)+" "+(0,u.v_)(e.$t("donations")),1),a.item.maxDate?((0,c.uX)(),(0,c.CE)("span",Ro,(0,u.v_)(e.$filters.format(a.item.maxDate)),1)):((0,c.uX)(),(0,c.CE)("span",Oo,(0,u.v_)(Math.min(parseInt(parseInt(a.productTotal?.onetime_total||0)/parseInt(a.item.goalValue)*100),100))+"%",1)
1)])])),e.$isMobile()?((0,c.uX)(),(0,c.CE)("div",Qo,[(0,c.Lk)("div",Bo,[((0,c.uX)(),(0,c.CE)("svg",Go,[t[58]||(t[58]=(0,c.Lk)("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:"var(--pp-surface-tertiary, #F0F1F5)","stroke-width":"4"},null,-1)),(0,c.Lk)("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:"url(#ppProgressGrad)","stroke-width":"4","stroke-linecap":"round","stroke-dasharray":119.4,"stroke-dashoffset":119.4-119.4*Math.min(parseInt(parseInt(a.productTotal?.onetime_total||0)/parseInt(a.item.goalValue)*100),100)/100,style:{transform:"rotate(-90deg)","transform-origin":"center"}},null,8,Wo),(0,c.Lk)("defs",null,[(0,c.Lk)("linearGradient",jo,[(0,c.Lk)("stop",{offset:"0%","stop-color":n.progressGradientStart},null,8,zo),(0,c.Lk)("stop",{offset:"100%","stop-color":n.progressGradientEnd},null,8,qo)])])])),(0,c.Lk)("div",Jo,(0,u.v_)(Math.min(parseInt(parseInt(a.productTotal?.onetime_total||0)/parseInt(a.item.goalValue)*100),100))+"%",1)]),(0,c.Lk)("div",null,[(0,c.Lk)("div",Ho,[(0,c.eW)((0,u.v_)(e.$filters.money(Math.round(a.productTotal?.onetime_total||0)))+" ",1),(0,c.Lk)("span",Ko,(0,u.v_)(e.$t("raised")),1)]),(0,c.Lk)("div",Yo,(0,u.v_)(e.$t("of"))+" "+(0,u.v_)(e.$filters.money(Math.round(a.item.goalValue||0)))+" ⢠"+(0,u.v_)(a.productTotal?.onetime_payments_count)+" "+(0,u.v_)(e.$t("donations")),1)])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.item.goalValue?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",Zo,[a.isIframe||(n.isMobileView?!1===a.item.settings.showTitleMobile:!1===a.item.settings.showTitle)?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("h1",el,[n.currencies.length>1&&"en"===e.$i18n.locale?((0,c.uX)(),(0,c.CE)("span",tl,(0,u.v_)(a.item.nameEn),1)):((0,c.uX)(),(0,c.CE)("span",il,(0,u.v_)(a.item.name),1))])),a.item.description?((0,c.uX)(),(0,c.CE)("hr",sl)):(0,c.Q3)("",!0),a.item.description?((0,c.uX)(),(0,c.CE)("div",al,[(0,c.bF)(g,{modelValue:n.truncatedDescription,"onUpdate:modelValue":t[10]||(t[10]=e=>n.truncatedDescription=e),"is-editable":!1},null,8,["modelValue"]),n.isLongText?((0,c.uX)(),(0,c.CE)("div",nl,[a.showMoreDescription?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"pp-v2-show-more",onClick:t[11]||(t[11]=(...e)=>n.toggleShowMoreDescription&&n.toggleShowMoreDescription(...e))},[(0,c.eW)((0,u.v_)(e.$t("Show more"))+" ",1),(0,c.bF)(l,{icon:"fa-light fa-chevron-down",class:"pp-v2-show-more-icon"})]))])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])),a.item?.isArchived?((0,c.uX)(),(0,c.CE)("div",ol,[(0,c.Lk)("p",ll,(0,u.v_)(e.$t(a.item.isDonation?"Payments disabled for this campaign":"Payments disabled for this product"))+".",1)])):(0,c.Q3)("",!0)]),a.item.goalValue&&a.item.description?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",rl,[(0,c.Lk)("h2",dl,(0,u.v_)(e.$t("About this campaign")),1),(0,c.Lk)("div",cl,[(0,c.bF)(g,{modelValue:n.truncatedDescription,"onUpdate:modelValue":t[12]||(t[12]=e=>n.truncatedDescription=e),"is-editable":!1},null,8,["modelValue"]),n.isLongText?((0,c.uX)(),(0,c.CE)("div",ul,[a.showMoreDescription?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"unstyled-button",onClick:t[13]||(t[13]=(...e)=>n.toggleShowMoreDescription&&n.toggleShowMoreDescription(...e))},[(0,c.Lk)("span",ml,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Show more")),1),(0,c.Lk)("span",pl,[(0,c.bF)(l,{icon:"fa-light fa-angle-down"})])])]))])):(0,c.Q3)("",!0)])],512)),[[m.aG,!(e.$isMobile()&&"form"!==a.paymentStep)]]):(0,c.Q3)("",!0),a.item.settings.commentSection&&a.totalComments?(0,c.bo)(((0,c.uX)(),(0,c.CE)("section",hl,[(0,c.Lk)("div",gl,[(0,c.Lk)("div",fl,[(0,c.Lk)("h2",bl,(0,u.v_)(e.$t("Words of support")),1),(0,c.Lk)("span",yl,(0,u.v_)(a.totalComments),1)]),(0,c.Lk)("p",vl,(0,u.v_)(e.$t("Please donate to share words of support.")),1),t[59]||(t[59]=(0,c.Lk)("hr",{class:"pp-v2-hr"},null,-1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.commentSection,(t,i)=>((0,c.uX)(),(0,c.CE)("div",{key:"comment_"+i,class:"pp-v2-support-item"},[(0,c.Lk)("div",kl,[(0,c.bF)(l,{icon:"fa-light fa-hand-holding-heart"})]),(0,c.Lk)("div",null,[(0,c.Lk)("div",Cl,(0,u.v_)(t.memberName),1),(0,c.Lk)("div",Ll,(0,u.v_)(e.$filters.money(t.amount,t.currency))+" ⢠"+(0,u.v_)(t.paymentDate),1),t.comment?((0,c.uX)(),(0,c.CE)("div",wl,(0,u.v_)(t.comment),1)):(0,c.Q3)("",!0)])]))),128)),n.hasMoreComments?((0,
1c.uX)(),(0,c.CE)("div",_l,[(0,c.bF)(f,{loading:a.isLoadingComments,class:"button is-light is-small is-rounded is-fullwidth mt-4 has-text-weight-semibold",onClick:n.loadMoreComments},{default:(0,c.k6)(()=>[(0,c.Lk)("span",El,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("More comments")),1),(0,c.Lk)("span",$l,[(0,c.bF)(l,{icon:"fa-light fa-angle-down"})])])]),_:1},8,["loading","onClick"])])):(0,c.Q3)("",!0)])],512)),[[m.aG,!(e.$isMobile()&&"form"!==a.paymentStep)]]):(0,c.Q3)("",!0)],2),(0,c.Lk)("div",Fl,[(0,c.Lk)("div",{id:"paymentForm",class:(0,u.C4)({"pp-v2-donate-card":!e.$isMobile()||"form"===a.paymentStep})},[(0,c.bF)(m.eB,{name:"slide-payment",mode:"out-in"},{default:(0,c.k6)(()=>["form"!==a.paymentStep?((0,c.uX)(),(0,c.CE)("div",Tl,["payment"===a.paymentStep?((0,c.uX)(),(0,c.CE)("div",Sl,[(0,c.Lk)("button",{class:"button is-ghost is-small",onClick:t[14]||(t[14]=(...e)=>n.goBackToForm&&n.goBackToForm(...e))},[(0,c.Lk)("span",Al,[(0,c.bF)(l,{icon:"fa-light fa-chevron-left"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Donation")),1)])])):(0,c.Q3)("",!0),"processing"===a.paymentStep?((0,c.uX)(),(0,c.CE)("div",Pl,[(0,c.Lk)("div",Il,[(0,c.Lk)("div",Ml,[(0,c.Lk)("div",xl,[(0,c.bF)(l,{icon:"fa-light fa-check"})])]),t[60]||(t[60]=(0,c.Lk)("div",{class:"processing-rings"},[(0,c.Lk)("div",{class:"ring ring-1"}),(0,c.Lk)("div",{class:"ring ring-2"}),(0,c.Lk)("div",{class:"ring ring-3"})],-1))]),(0,c.Lk)("p",Nl,(0,u.v_)(e.$t("Processing your payment"))+"...",1),(0,c.Lk)("p",Ul,(0,u.v_)(e.$t("Please do not close this window")),1)])):"success"===a.paymentStep?((0,c.uX)(),(0,c.CE)("div",Dl,[(0,c.Lk)("div",Xl,[(0,c.Lk)("div",Vl,[t[61]||(t[61]=(0,c.Lk)("div",{class:"pp-v2-success-circle"},[(0,c.Lk)("svg",{class:"pp-v2-success-check",viewBox:"0 0 52 52"},[(0,c.Lk)("circle",{class:"pp-v2-success-check-circle",cx:"26",cy:"26",r:"25",fill:"none"}),(0,c.Lk)("path",{class:"pp-v2-success-check-path",fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8"})])],-1)),(0,c.Lk)("div",Rl,[((0,c.uX)(),(0,c.CE)(c.FK,null,(0,c.pI)(12,e=>(0,c.Lk)("span",{key:e,class:"pp-v2-confetti-dot",style:(0,u.Tr)({"--i":e})},null,4)),64))])]),(0,c.Lk)("h3",Ol,(0,u.v_)(e.$t("Thank you for your donation!")),1)]),(0,c.Lk)("div",Ql,[(0,c.Lk)("div",Bl,[(0,c.Lk)("div",null,[(0,c.Lk)("div",Gl,(0,u.v_)(e.$t("Your donation")),1),(0,c.Lk)("div",Wl,[(0,c.eW)((0,u.v_)(e.$filters.money(n.inlinePaymentTotalAmount,a.currency))+" ",1),"subscription"===a.paymentType?((0,c.uX)(),(0,c.CE)("span",jl," / "+(0,u.v_)(e.$t("month")),1)):(0,c.Q3)("",!0)])]),(0,c.Lk)("div",zl,[(0,c.bF)(l,{icon:"fa-light fa-check"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Confirmed")),1)])])]),(0,c.Lk)("p",ql,(0,u.v_)(e.$t("Your generosity means the world to us. Every contribution brings us closer to our goal and helps create real, lasting impact in our community.")),1),(0,c.Lk)("div",Jl,[(0,c.Lk)("div",Hl,[(0,c.bF)(l,{icon:"fa-light fa-shield-check"})]),(0,c.Lk)("div",null,[(0,c.Lk)("span",Kl,(0,u.v_)(e.$t("Your receipt")),1),(0,c.eW)(" "+(0,u.v_)(e.$t("has been sent to your email."))+" ",1),e.user.id?((0,c.uX)(),(0,c.CE)("span",Yl,(0,u.v_)(e.$t("You can always access your donation history in your account.")),1)):(0,c.Q3)("",!0)])]),t[62]||(t[62]=(0,c.Lk)("hr",{class:"pp-v2-success-divider"},null,-1)),(0,c.Lk)("div",Zl,[(0,c.Lk)("h4",er,(0,u.v_)(e.$t("Multiply your impact")),1),(0,c.Lk)("p",tr,(0,u.v_)(e.$t("Every share can inspire others to give. Help us reach more people.")),1)]),(0,c.Lk)("button",{class:"pp-v2-success-share",onClick:t[15]||(t[15]=e=>a.showShareModal=!0)},[(0,c.bF)(l,{icon:"fa-light fa-share-nodes"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Share this campaign")),1)]),(0,c.Lk)("button",{class:"pp-v2-success-back",onClick:t[16]||(t[16]=(...e)=>n.resetPaymentStep&&n.resetPaymentStep(...e))},[(0,c.bF)(l,{icon:"fa-light fa-chevron-left"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Back to campaign")),1)])])):"error"===a.paymentStep?((0,c.uX)(),(0,c.CE)("div",ir,[(0,c.Lk)("div",sr,[(0,c.Lk)("span",ar,[(0,c.bF)(l,{icon:"fa-light fa-times-circle"})])]),(0,c.Lk)("h3",nr,(0,u.v_)(e.$t("Payment Failed")),1),(0,c.Lk)("p",or,(0,u.v_)(a.paymentErrorMessage||e.$t("An error occurred while processing your payment.")),1),(0,c.Lk)("div",lr,[(0,c.Lk)("button",{class:"button is-primary is-rounded",onClick:t[17]||(t[17]=(...e)=>n.retryPayment&&n.retryPayment(...e))}
1,(0,u.v_)(e.$t("Try Again")),1),(0,c.Lk)("button",{class:"button is-light is-rounded",onClick:t[18]||(t[18]=(...e)=>n.goBackToForm&&n.goBackToForm(...e))},(0,u.v_)(e.$t("Cancel")),1)])])):"payment"===a.paymentStep?((0,c.uX)(),(0,c.CE)("div",rr,[(0,c.Lk)("div",dr,[(0,c.Lk)("div",cr,[(0,c.Lk)("span",ur,(0,u.v_)(e.$t("Your donation")),1),(0,c.Lk)("span",mr,(0,u.v_)(e.$filters.money(a.paymentValue||0,a.currency)),1)]),(0,c.Lk)("div",pr,[(0,c.Lk)("label",hr,[(0,c.bF)(b,{modelValue:a.coverProcessingFees,"onUpdate:modelValue":t[19]||(t[19]=e=>a.coverProcessingFees=e),size:"is-small",onChange:n.onInlinePaymentCoverFeesToggle},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Cover the processing fee")),1)]),_:1},8,["modelValue","onChange"])]),(0,c.Lk)("span",gr,(0,u.v_)(e.$filters.money(n.processingFeeForDisplay,a.currency)),1)]),t[64]||(t[64]=(0,c.Lk)("hr",{class:"pp-v2-summary-divider"},null,-1)),(0,c.Lk)("div",fr,[(0,c.Lk)("span",br,[(0,c.eW)((0,u.v_)(e.$t("Total due"))+" ",1),"subscription"===a.paymentType?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.eW)("/ "+(0,u.v_)(e.$t("month")),1)],64)):(0,c.Q3)("",!0)]),(0,c.Lk)("span",yr,(0,u.v_)(e.$filters.money(n.inlinePaymentTotalAmount,a.currency)),1)]),(0,c.bF)(m.F,{name:"heart-float",tag:"div",class:"floating-hearts-container"},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.floatingHearts,e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:"floating-heart",style:(0,u.Tr)({left:e.left+"px",animationDelay:e.delay+"s"})},[...t[63]||(t[63]=[(0,c.Lk)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,c.Lk)("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z",fill:"#FF69B4",stroke:"#FF1493","stroke-width":"1"})],-1)])],4))),128))]),_:1})]),e.tenant.demo?((0,c.uX)(),(0,c.CE)("p",vr," Demo 4242 4242 4242 4242, any future expiring date and any CVV number to make a test payment. ")):(0,c.Q3)("",!0),t[65]||(t[65]=(0,c.Lk)("div",{id:"inline-payment-element",class:"mb-4"},null,-1)),a.paymentErrorMessage?((0,c.uX)(),(0,c.CE)("div",kr,[(0,c.Lk)("button",{class:"delete",onClick:t[20]||(t[20]=e=>a.paymentErrorMessage=null)}),(0,c.eW)(" "+(0,u.v_)(a.paymentErrorMessage),1)])):(0,c.Q3)("",!0),(0,c.Lk)("button",{class:(0,u.C4)(["pp-v2-cta btn_donate",{"is-loading":a.isPaymentProcessing}]),disabled:a.isPaymentProcessing||!a.isPaymentElementReady||!a.isPaymentElementComplete,onClick:t[21]||(t[21]=(...e)=>n.confirmStripePayment&&n.confirmStripePayment(...e))},[(0,c.eW)((0,u.v_)(e.$t("Pay"))+" "+(0,u.v_)(e.$filters.money(n.inlinePaymentTotalAmount,a.currency))+" ",1),"subscription"===a.paymentType?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.eW)("/ "+(0,u.v_)(e.$t("month")),1)],64)):(0,c.Q3)("",!0)],10,Cr),(0,c.Lk)("p",Lr,[(0,c.Lk)("span",wr,[(0,c.Lk)("span",_r,[(0,c.bF)(l,{icon:"fa-light fa-shield-check"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Secure donation via"))+" Stripe",1)])])])):((0,c.uX)(),(0,c.CE)("div",Er,[(0,c.bF)(y)]))])):((0,c.uX)(),(0,c.CE)("div",$r,[(0,c.Lk)("div",Fr,[(0,c.bF)(l,{icon:"fa-light fa-shield-check",class:"has-text-success"}),(0,c.eW)(" "+(0,u.v_)(e.$t(a.item.isDonation?"Secure donation":"Secure payment")),1)]),n.showPaymentTypeToggle?((0,c.uX)(),(0,c.CE)("section",Tr,[(0,c.Lk)("div",Sr,[(0,c.Lk)("button",{class:(0,u.C4)(["pp-v2-freq-btn",{active:"one"===a.paymentType}]),onClick:t[22]||(t[22]=e=>a.paymentType="one")},(0,u.v_)(e.$t("Give once")),3),(0,c.Lk)("button",{class:(0,u.C4)(["pp-v2-freq-btn",{active:"subscription"===a.paymentType}]),onClick:t[23]||(t[23]=e=>a.paymentType="subscription")},[(0,c.eW)((0,u.v_)(e.$t("Monthly"))+" ",1),t[66]||(t[66]=(0,c.Lk)("span",{class:"pp-v2-heart-pulse"},"â¥",-1))],2)]),(0,c.Lk)("p",Ar,[(0,c.eW)((0,u.v_)(e.$t("Boost your impact by giving monthly"))+" ",1),t[67]||(t[67]=(0,c.Lk)("span",null,"â",-1))])])):(0,c.Q3)("",!0),(0,c.Lk)("div",Pr,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.productPrices,(t,i)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:t.id},[t&&!t.isArchived&&n.paymentTypeVisible(t)&&t.currency===a.currency&&(!a.item.abTestingEnabled||!a.item.productPriceVariations||a.item.productPriceVariations&&a.abTestingVariationId&&t.productPriceVariationValues?.find(e=>e.productPriceVariation.id===a.abTestingVariationId)&&"donation"===a.item.type&&("subscription"===a.paymentType&&!a.atLeastOnePriceForSubscriptionAndAbTesting||"subscription"!==a.paymentType&&!a.atLeastOnePriceForOneTimeAndAbTesting))?((0,
1c.uX)(),(0,c.CE)("button",{key:t.priceStripeId,class:(0,u.C4)(["pp-v2-amt",{active:a.priceId===t.id}]),onClick:e=>n.selectPrice(t)},[t.displayNameOnPaymentPage?((0,c.uX)(),(0,c.CE)("span",Mr,(0,u.v_)(t.name)+"Â ",1)):(0,c.Q3)("",!0),(0,c.eW)(" "+(0,u.v_)(e.$filters.money(t.price,t.currency)),1)],10,Ir)):(0,c.Q3)("",!0)],64))),128))]),a.item.hasCustomPriceValue?((0,c.uX)(),(0,c.CE)("div",xr,[(0,c.Lk)("div",Nr,[(0,c.Lk)("div",Ur,(0,u.v_)(n.currencySymbol(a.currency)),1),(0,c.Lk)("div",Dr,(0,u.v_)(a.currency?.toUpperCase()),1)]),(0,c.Lk)("input",{ref:"customPriceValueInput",value:null!==a.customPriceValue&&void 0!==a.customPriceValue?a.customPriceValue:0,type:"text",class:"pp-v2-custom-input",onFocus:t[24]||(t[24]=(...e)=>n.onCustomAmountFocus&&n.onCustomAmountFocus(...e)),onInput:t[25]||(t[25]=e=>{a.customPriceValue=e.target.value,n.onCustomPriceInput()}),onChange:t[26]||(t[26]=(...e)=>n.checkMinMaxCustom&&n.checkMinMaxCustom(...e))},null,40,Xr)])):(0,c.Q3)("",!0),n.showCoverFeesOption?((0,c.uX)(),(0,c.CE)("div",Vr,[(0,c.bF)(b,{modelValue:a.coverProcessingFees,"onUpdate:modelValue":t[27]||(t[27]=e=>a.coverProcessingFees=e),size:"is-small",onChange:n.onCoverFeesToggle},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Cover the processing fee")),1)]),_:1},8,["modelValue","onChange"]),(0,c.Lk)("span",Rr,(0,u.v_)(e.$filters.money(n.processingFeeForDisplay,a.currency)),1),(0,c.bF)(m.F,{name:"heart-float",tag:"div",class:"floating-hearts-container"},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.floatingHearts,e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:"floating-heart",style:(0,u.Tr)({left:e.left+"px",animationDelay:e.delay+"s"})},[...t[68]||(t[68]=[(0,c.Lk)("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,c.Lk)("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z",fill:"#FF69B4",stroke:"#FF1493","stroke-width":"1"})],-1)])],4))),128))]),_:1})])):(0,c.Q3)("",!0),a.item.hasLocalCenterOption||a.item.productOptions&&a.item.productOptions.length>0?(0,c.bo)(((0,c.uX)(),(0,c.CE)("section",Or,[(0,c.Lk)("div",Qr,[(0,c.bF)(l,{icon:"fa-light fa-hand-holding-heart",class:"has-text-success"}),(0,c.eW)(" "+(0,u.v_)(e.$t(a.item.isDonation?"Designate to":"Option")),1)]),a.item.productOptions&&a.item.productOptions.length>0&&!e.$route.query.localCenter?((0,c.uX)(),(0,c.CE)("div",Br,[(0,c.Lk)("select",{class:"pp-v2-select",value:a.productOption,onChange:t[28]||(t[28]=e=>n.selectProductOption("local-center"===e.target.value?"local-center":parseInt(e.target.value)))},[(0,c.Lk)("option",Wr,(0,u.v_)(e.$t("Select an option")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.sortedProductOptions,e=>((0,c.uX)(),(0,c.CE)(c.FK,null,[e.isArchived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("option",{key:e.id,value:e.id},(0,u.v_)(e.name),9,jr))],64))),256)),a.item.hasLocalCenterOption?((0,c.uX)(),(0,c.CE)("option",zr,(0,u.v_)(e.$t("Support chapter")),1)):(0,c.Q3)("",!0)],40,Gr),(0,c.Lk)("span",qr,[(0,c.bF)(l,{icon:"fa-light fa-chevron-down"})])])):(0,c.Q3)("",!0),"local-center"!==a.productOption&&a.item.productOptions&&0!==a.item.productOptions.length||!a.item.hasLocalCenterOption||!a.localCenters?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",Jr,[(0,c.bo)((0,c.Lk)("select",{"onUpdate:modelValue":t[29]||(t[29]=e=>a.localCenterOptionId=e),class:"pp-v2-select"},[(0,c.Lk)("option",Hr,(0,u.v_)(e.$t("Choose chapter"))+"...",1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.localCenters,t=>((0,c.uX)(),(0,c.CE)(c.FK,{key:t["@id"]},[t?((0,c.uX)(),(0,c.CE)("option",{key:0,value:t.id},(0,u.v_)((e.tenant.settingFeatures.localCenter.hasParent&&t.parent?"Â Â â ":"")+n.localCenterNameSelector(t,e.tenant)),9,Kr)):(0,c.Q3)("",!0)],64))),128))],512),[[m.u1,a.localCenterOptionId]]),(0,c.Lk)("span",Yr,[(0,c.bF)(l,{icon:"fa-light fa-chevron-down"})])]))],512)),[[m.aG,!e.$route.query.localCenter&&!e.$route.query.optionId]]):(0,c.Q3)("",!0),e.user.id&&"donation"!==a.item?.type?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("section",Zr,[(0,c.Lk)("div",ed,[(0,c.bF)(p,{label:e.$t("firstName")+" *"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.firstName,"onUpdate:modelValue":t[30]||(t[30]=e=>a.firstName=e),autocomplete:"given-name",required:""},null,8,["modelValue"])]),_:1},8,["label"])]),n.requiredDonorFields.middleName?((0,c.uX)(),(0,c.CE)("div",td,[(0,c.bF)(p,{label:e.$t("Middle name")+" *"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.middleName,"onUpdate:modelValue":t[31]||(t[31]=e=>a.middleName=e),autocomplete:"additional-name",required:""},null,8,["modelValue"])]),_:1},8,["label"])])):(0,c.Q3)("",!0),(0,c.Lk)("div",id,[(0,c.bF)(p,{label:e.$t("lastName")+" *"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.lastName,"onUpdate:modelValue":t[32]||(t[32]=e=>a.lastName=e),autocomplete:"family-name",required:""},null,8,["modelValue"])]),_:1},8,["label"])]),e.user.id?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",sd,[(0,c.bF)(p,{label:e.$t("Email")+" *"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.email,"onUpdate:modelValue":t[33]||(t[33]=e=>a.email=e),type:"email",required:""},null,8,["modelValue"])]),_:1},8,["label"])])),e.tenant.settingFeatures["onlinePayments"]["checkoutCollectPhone"]?((0,c.uX)(),(0,c.CE)("div",ad,[(0,c.bF)(p,{label:e.$t("Phone number (optional)")},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.phone,"onUpdate:modelValue":t[34]||(t[34]=e=>a.phone=e)},null,8,["modelValue"])]),_:1},8,["label"])])):(0,c.Q3)("",!0),n.requiredDonorFields.personalIdNumber?((0,c.uX)(),(0,c.CE)("div",nd,[(0,c.bF)(p,{label:e.$t("Personal identification number")+" *",message:e.user.id&&e.user.hasPersonalIdNumber?e.$t("A number is stored on your profile; enter it again to confirm or update it."):e.$t("Required by law for donation records. Stored encrypted.")},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.personalIdNumber,"onUpdate:modelValue":t[35]||(t[35]=e=>a.personalIdNumber=e),autocomplete:"off",required:""},null,8,["modelValue"])]),_:1},8,["label","message"])])):(0,c.Q3)("",!0)])),a.item.settings.requireFullAddress?((0,c.uX)(),(0,c.CE)("div",od,[(0,c.bF)(p,{label:e.$t("Full address")+" *"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.fullAddress,"onUpdate:modelValue":t[36]||(t[36]=e=>a.fullAddress=e)},null,8,["modelValue"])]),_:1},8,["label"])])):(0,c.Q3)("",!0),a.item.settings.commentSection&&"donation"===a.item.type?((0,c.uX)(),(0,c.CE)("div",ld,[(0,c.bF)(b,{modelValue:a.showCommentBox,"onUpdate:modelValue":t[37]||(t[37]=e=>a.showCommentBox=e)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Share a message of support")),1)]),_:1},8,["modelValue"]),(0,c.bo)((0,c.Lk)("div",rd,[(0,c.bF)(d,{ref:"commentInput",modelValue:a.comment,"onUpdate:modelValue":t[38]||(t[38]=e=>a.comment=e),type:"textarea",placeholder:e.$t("Please share your words of support"),rows:"3"},null,8,["modelValue","placeholder"])],512),[[m.aG,a.showCommentBox]])])):(0,c.Q3)("",!0),(0,c.Lk)("div",dd,[a.item.hasConfidentialityEnabled&&"donation"===a.item.type?((0,c.uX)(),(0,c.CE)("div",cd,[(0,c.bF)(b,{modelValue:a.isConfidential,"onUpdate:modelValue":t[40]||(t[40]=e=>a.isConfidential=e)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Don't display my name publicly."))+" ",1),(0,c.Lk)("span",{class:"pp-v2-info-trigger",onClick:t[39]||(t[39]=(0,m.D$)(e=>a.showConfidentialityInfo=!a.showConfidentialityInfo,["prevent","stop"]))},[(0,c.bF)(l,{icon:"fa-light fa-circle-info"})])]),_:1},8,["modelValue"]),a.showConfidentialityInfo?((0,c.uX)(),(0,c.CE)("div",ud,[(0,c.Lk)("button",{class:"pp-v2-info-close",onClick:t[41]||(t[41]=e=>a.showConfidentialityInfo=!1)},[(0,c.bF)(l,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("p",null,[(0,c.eW)((0,u.v_)(e.$t("confidentialityTooltipPart1",{tenantName:e.tenant.name}))+" ",1),e.tenant.urlGDPR?((0,c.uX)(),(0,c.CE)("a",{key:0,href:e.tenant.urlGDPR,target:"_blank",class:"pp-v2-info-link"},(0,u.v_)(e.$t("Privacy Notice")),9,md)):((0,c.uX)(),(0,c.CE)("span",pd,(0,u.v_)(e.$t("Privacy Notice")),1)),t[69]||(t[69]=(0,c.eW)(" . ",-1))])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),n.isDonatingForPolitics?((0,c.uX)(),(0,c.CE)("div",hd,[(0,c.bF)(b,{modelValue:a.isPrivateMoney,"onUpdate:modelValue":t[42]||(t[42]=e=>a.isPrivateMoney=e),class:"required-checkbox"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I declare the donation is from private funds"))+" ",1),t[70]||(t[70]=(0,c.Lk)("span",{class:"has-text-danger"},"Â *",-1))]),_:1},8,["modelValue"])])):(0,c.Q3)("",!0),n.isConfidentialityMandatory?((0,c.uX)(),(0,c.CE)("div",gd,[(0,c.bF)(b,{modelValue:a.acceptedConfidentiality,"onUpdate:modelValue":t[43]||(t[43]=e=>a.acceptedConfidentiality=e),class:"required-checkbox"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("agreeGDPR"))+" ",1),(0,c.Lk)("a",{href:e.tenant.urlGDPR,target:"_blank"},(0,u.v_)(e.tenant.urlGDPR),9,fd)]),_:1},8,["modelValue"])])):(0,c.Q3)("",!0),void 0===a.item.settings.disableSubscribe||!1===a.item.settings.disableSubscribe?((0,c.uX)(),(0,c.CE)("div",bd,[n.autoSubscribeNewsletter?((0,c.uX)(),(0,c.CE)("p",yd,(0,u.v_)(e.$t("By continuing, you will be subscribed to our newsletter. You can unsubscribe at any time.")),1)):((0,c.uX)(),(0,c.Wv)(b,{key:0,modelValue:a.isNewsletter,"onUpdate:modelValue":t[44]||(t[44]=e=>a.isNewsletter=e)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I want to subscribe to the newsletter")),1)]),_:1},8,["modelValue"]))])):(0,c.Q3)("",!0),e.user.id||!e.tenant.settingFeatures.onlinePayments["hasCreateAccountForExternalProfiles"]||void 0!==a.item.settings.disableRegister&&!1!==a.item.settings.disableRegister?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",vd,[(0,c.bF)(b,{modelValue:a.isCreateAccount,"onUpdate:modelValue":t[45]||(t[45]=e=>a.isCreateAccount=e)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("I want to create an user account on the online community"))+" "+(0,u.v_)(e.tenant.name),1)]),_:1},8,["modelValue"])]))]),n.isDonatingForPolitics&&a.paymentValue&&!a.coverProcessingFees&&!a.item?.
1isArchived?((0,c.uX)(),(0,c.CE)("div",kd,[(0,c.eW)((0,u.v_)(e.$t("The donation amount will be %%, with the remaining %% representing the fee charged by the payment processor (Stripe). These amounts are approximate estimates, and the final costs may vary depending on the applicable fee schedule, which can be consulted").replace("%%",e.$filters.money(a.paymentValue-n.processingFeeForDisplay,a.currency)).replace("%%",e.$filters.money(n.processingFeeForDisplay,a.currency)))+" ",1),(0,c.Lk)("a",Cd,(0,u.v_)(e.$t("here")),1),t[71]||(t[71]=(0,c.eW)(" . ",-1))])):(0,c.Q3)("",!0),"preper"===e.tenant.slug&&"donation"===a.item.type?((0,c.uX)(),(0,c.CE)("p",Ld," * Prin alegerea expresÄ a opÈiunii de confidenÈialitate identitatea donatorului nu va fi raportatÄ la Autoritatea ElectoralÄ PermanentÄ Èi nici fÄcutÄ publicÄ, în situaÈia în care donaÈia se situeazÄ Ã®n limita sumei anuale de 10 salarii de bazÄ minime brute pe ÈarÄ (33.000 lei), conform Legii 334/2006 privind finanÈarea partidelor politice Èi a campaniilor electorale. ")):(0,c.Q3)("",!0),a.identityMandatoryAnonymous||a.item?.isArchived?a.identityMandatoryAnonymous&&!a.item?.isArchived?((0,c.uX)(),(0,c.CE)("button",{key:10,class:"pp-v2-cta btn_donate",disabled:a.isLoading||a.priceId<=0&&!a.customPriceValue||!e.user.id&&!n.isValidEmail(a.email)||!n.isDonorIdentityComplete||n.isConfidentialityMandatory&&!a.acceptedConfidentiality||n.isDonatingForPolitics&&!a.isPrivateMoney,onClick:t[47]||(t[47]=(...e)=>n.createSubscriptionPending&&n.createSubscriptionPending(...e))},[(0,c.eW)((0,u.v_)(e.$t(a.item.isDonation?"Donate":"Continue"))+" ",1),(0,c.bF)(l,{icon:"fa-light fa-arrow-right"})],8,_d)):(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:9,class:"pp-v2-cta btn_donate",disabled:a.isLoading||a.priceId<=0&&!a.customPriceValue||!e.user.id&&!n.isValidEmail(a.email)||!n.isDonorIdentityComplete||n.isDonatingForPolitics&&!a.isPrivateMoney||n.isConfidentialityMandatory&&!a.acceptedConfidentiality||a.item.settings.requireFullAddress&&a.fullAddress?.length<5,onClick:t[46]||(t[46]=(...e)=>n.openPaymentModal&&n.openPaymentModal(...e))},(0,u.v_)(e.$t(a.item.isDonation?"Donate now":"Continue")),9,wd))]))]),_:1}),(0,c.bo)((0,c.Lk)("button",{class:"pp-v2-share",onClick:t[48]||(t[48]=e=>a.showShareModal=!0)},[(0,c.bF)(l,{icon:"fa-light fa-share-nodes"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Share")),1)],512),[[m.aG,"form"===a.paymentStep]]),a.item.settings.newestAndTopDonationSection&&(a.latestPayments?.length||a.topPayments?.length)?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",Ed,[(0,c.Lk)("div",$d,[(0,c.Lk)("div",Fd,[(0,c.bF)(l,{icon:"fa-light fa-arrow-trend-up"})]),(0,c.Lk)("span",Td,(0,u.v_)(a.donationPaymentsCount||a.productTotal?.onetime_payments_count||a.latestPayments.length)+" "+(0,u.v_)(e.$t(a.donationPaymentsCount||a.productTotal?.onetime_payments_count?"recent donations":"donations")),1)]),a.justDonatedCount&&a.latestPayments&&a.latestPayments.length?((0,c.uX)(),(0,c.CE)("div",Sd,[(0,c.bF)(l,{class:"fa-beat",style:{color:"#a90194"},icon:"fa-light fa-hand-holding-heart"}),(0,c.Lk)("span",Ad,[(0,c.Lk)("span",Pd,(0,u.v_)(a.justDonatedCount)+" "+(0,u.v_)(e.$t("persons just made a donation")),1)])])):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.latestPayments.slice(0,5),(t,i)=>((0,c.uX)(),(0,c.CE)("div",{key:"don_"+i,class:"pp-v2-d-item"},[(0,c.Lk)("div",{class:(0,u.C4)(["pp-v2-d-av",{"pp-v2-d-av--anon":!t.memberName||"Anonymous"===t.memberName||"Anonim"===t.memberName}])},[t.memberName&&"Anonymous"!==t.memberName&&"Anonim"!==t.memberName?((0,c.uX)(),(0,c.CE)("span",Id,(0,u.v_)(t.memberName.charAt(0).toUpperCase()),1)):((0,c.uX)(),(0,c.Wv)(l,{key:0,icon:"fa-light fa-hand-holding-heart"}))],2),(0,c.Lk)("div",Md,[(0,c.Lk)("div",xd,(0,u.v_)(t.memberName),1),(0,c.Lk)("div",Nd,[(0,c.Lk)("span",Ud,(0,u.v_)(e.$filters.money(t.amount,t.currency)),1),(0,c.eW)(" ⢠"+(0,u.v_)(t.paymentDate),1)])])]))),128)),(0,c.Lk)("div",Dd,[(0,c.Lk)("button",{class:"pp-v2-donations-btn",onClick:t[49]||(t[49]=e=>n.showModal("latest"))},(0,u.v_)(e.$t("See all")),1),a.topPayments.length>0?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"pp-v2-donations-btn",onClick:t[50]||(t[50]=e=>n.showModal("top"))},[(0,c.bF)(l,{icon:"fa-light fa-star"}),(0,c.eW)(" "+(0,u.v_)(e.$t("See top")),1)])):(0,c.Q3)("",!0)])],512)),[[m.aG,"form"===a.paymentStep]]):(0,c.Q3)("",!0),(0,c.bo)((0,c.Lk)("div",Xd,[(0,c.bF)(l,{icon:"fa-light fa-lock"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Secure donation via"))+" Stripe ",1)],512),[[m.aG,"form"===a.paymentStep]])],2)])],2)):(0,c.Q3)("",!0),e.$isMobile()&&a.item.goalValue&&a.productTotal&&a.productTotal.onetime_total&&!a.item.isArchived&&"form"===a.paymentStep?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",Vd,[(0,c.Lk)("div",Rd,[(0,c.Lk)("div",Od,(0,u.v_)(e.$filters.money(Math.round(a.productTotal?.onetime_total||0))),1),(0,c.Lk)("div",Qd,(0,u.v_)(e.$t("of"))+" "+(0,u.v_)(e.$filters.money(Math.round(a.item.goalValue||0))),1)]),(0,c.Lk)("button",{class:"pp-v2-sticky-btn btn_donate",onClick:t[51]||(t[51]=(...e)=>n.scrollToForm&&n.scrollToForm(...e))},(0,u.v_)(e.$t("Donate")),1)],512)),[[m.aG,a.showScrollDonateButton]]):(0,c.Q3)("",!0),(0,c.bF)(v,{modelValue:a.isDonationsModalActive,"onUpdate:modelValue":t[56]||(t[56]=e=>a.isDonationsModalActive=e),"has-modal-card":"",width:640,scroll:"keep","full-screen":e.$isMobile()},{default:(0,c.k6)(()=>[(0,c.Lk)("div",{class:(0,u.C4)(["card pp-v2-donations-modal",{fill_screen:e.$isMobile()}])},[(0,c.Lk)("header",Bd,[(0,c.Lk)("div",Gd,[(0,c.Lk)("h2",Wd,(0,u.v_)(e.$t("Donations")),1),a.donationPaymentsCount?((0,c.uX)(),(0,c.CE)("span",jd,(0,u.v_)(a.donationPaymentsCount>1e3?(a.donationPaymentsCount/1e3).toFixed(1)+"K":a.donationPaymentsCount),1)):(0,c.Q3)("",!0),(0,c.Lk)("button",{class:"pp-v2-dm-close","aria-label":"close",onClick:t[52]||(t[52]=e=>a.isDonationsModalActive=!1)},[(0,c.bF)(l,{icon:"fa-light fa-xmark"})])]),(0,c.Lk)("div",zd,[(0,c.Lk)("button",{class:(0,u.C4)(["pp-v2-dm-tab",{active:"latest"===a.donationsModalTab}]),onClick:t[53]||(t[53]=e=>a.donationsModalTab="latest")},(0,u.v_)(e.$t("All")),3),a.topPayments.length>0?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["pp-v2-dm-tab",{active:"top"===a.donationsModalTab}]),onClick:t[54]||(t[54]=e=>a.donationsModalTab="top")},(0,u.v_)(e.$t("Top")),3)):(0,c.Q3)("",!0)])]),(0,c.Lk)("div",qd,["top"===a.donationsModalTab&&a.topPayments.length>0?((0,c.uX)(),(0,c.CE)("p",Jd,(0,u.v_)(e.$t("Top donations for this campaign")),1)):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)("top"===a.donationsModalTab?a.topPayments:a.latestPayments,(t,i)=>((0,c.uX)(),(0,c.CE)("div",{key:a.donationsModalTab+"_"+i,class:"pp-v2-dm-item"},[(0,c.Lk)("div",Hd,[(0,c.Lk)("span",null,(0,u.v_)(t.memberName?t.memberName.charAt(0).toUpperCase():"?"),1)]),(0,c.Lk)("div",Kd,[(0,c.Lk)("div",Yd,(0,u.v_)(t.memberName),1),(0,c.Lk)("div",Zd,[(0,c.Lk)("span",ec,(0,u.v_)(e.$filters.money(t.amount,t.currency)),1),(0,c.Lk)("span",tc,"⢠"+(0,u.v_)(t.paymentDate),1)])])]))),128)),"latest"===a.donationsModalTab&&a.latestPayments?.length<a.donationPaymentsCount?((0,c.uX)(),(0,c.Wv)(f,{key:1,class:"button is-light is-rounded is-small is-fullwidth mt-3 mb-3",loading:a.isLoadingPayments,onClick:n.loadMorePayments},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("See more")),1)]),_:1},8,["loading","onClick"])):(0,c.Q3)("",!0)]),a.item?.isArchived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",ic,[(0,c.Lk)("button",{class:"pp-v2-dm-donate btn_donate",onClick:t[55]||(t[55]=e=>{a.isDonationsModalActive=!1,n.scrollToForm()})},(0,u.v_)(e.$t("Donate now")),1)]))],2)]),_:1},8,["modelValue","full-screen"]),a.item&&e.tenant?(0,c.bo)(((0,c.uX)(),(0,c.Wv)(k,{key:4,modelValue:a.showShareModal,"onUpdate:modelValue":t[57]||(t[57]=e=>a.showShareModal=e),"product-i-r-i":"/api/v1/products/"+a.item.uuid,title:a.item.name,"share-url":"https://"+e.tenant.appHost+"/share/product/"+a.item.slugGo},null,8,["modelValue","product-i-r-i","title","share-url"])),[[m.aG,a.showShareModal]]):(0,c.Q3)("",!0),(0,c.Lk)("p",sc,[(0,c.eW)((0,u.v_)(e.$t("ro"===e.tenant?.language?"System built in Romania with":"Payment system powered by"))+" ",1),(0,c.Lk)("a",{href:`https://orgo.space?utm_source=app&utm_medium=referral&utm_campaign=p
1owered_by&utm_content=payment_page_product&utm_term=${encodeURIComponent(e.tenant?.slug||"")}`,target:"_blank"}," Orgo.space ",8,ac)]),e.$isMobile()?((0,c.uX)(),(0,c.CE)("p",nc," Â ")):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],64)}i(13579);var lc=i(32148),rc=i(31823);function dc(e,t){const i=e?.settingFeatures?.onlinePayments||{},s="donation"===t?.type;return{middleName:s&&!!i.checkoutRequireMiddleName,personalIdNumber:s&&!!i.checkoutRequirePersonalId}}function cc(e,t){const i=e=>"string"===typeof e&&""!==e.trim();return!(e.middleName&&!i(t.middleName))&&!(e.personalIdNumber&&!i(t.personalIdNumber))}function uc(e,t){const i=(e,t)=>{const i="string"===typeof e?e.trim():"";return""!==i?i:t||""},s=i(e.firstName,t?.firstName),a=i(e.lastName,t?.lastName),n=i(e.middleName,t?.middleName),o="string"===typeof e.personalIdNumber?e.personalIdNumber.trim():"";return{firstName:s,middleName:n,lastName:a,name:[s,a].filter(Boolean).join(" "),email:i(e.email,t?.email),phone:i(e.phone,t?.phoneNumber),personalIdNumber:o}}const mc={MIDDLE_NAME_REQUIRED:"Middle name is required",PERSONAL_ID_REQUIRED:"Personal identification number is required"};function pc(e){if("string"!==typeof e)return null;const t=e.trim();return Object.prototype.hasOwnProperty.call(mc,t)?mc[t]:null}var hc=i(1325),gc=i(55318),fc=i(5866),bc=i(53719);const yc=Object.freeze({percent:.029,fixed:Object.freeze({USD:30,EUR:25,GBP:20,CAD:30,AUD:30,CHF:30,DKK:180,NOK:200,SEK:180,PLN:100,CZK:650,HUF:8500,BGN:50,RON:100,HRK:180,JPY:30,MXN:300,SGD:50,HKD:235,NZD:30,AED:100,INR:0})}),vc=30,kc=["HUF","ISK","TWD","UGX"];function Cc(e){const t=Number(e?.percent);return{percent:Number.isFinite(t)&&t>=0&&t<1?t:yc.percent,fixed:e?.fixed&&"object"===typeof e.fixed?e.fixed:yc.fixed}}function Lc(e,t,i){const{percent:s,fixed:a}=Cc(i),n=String(t||"").toUpperCase(),o=Number(a[n]??vc),l=(e+o)/(1-s);return kc.includes(n)?100*Math.ceil(l/100):Math.round(l)}function wc(e,t,i){const s=Number(e);if(!Number.isFinite(s)||s<=0)return 0;const a=Math.round(100*s);return(Lc(a,t,i)-a)/100}function _c(e,t,i){const s=Number(e);return!Number.isFinite(s)||s<=0?0:Lc(Math.round(100*s),t,i)/100}var Ec=i(31666),$c={components:{TipTap:bc.A,ShareUrlModal:fc.A,TownAutocomplete:Mt.A,FontAwesomeIcon:zs.gc,LogoThumbnail:rc.A,OrgoLogo:At.A,PaymentLoadingAnimation:Ec.A},props:[],data(){return{showScrollDonateButton:!1,showShareModal:!1,showCommentBox:!1,paymentStep:"form",stripe:null,stripeElements:null,stripePaymentElement:null,isPaymentElementReady:!1,isPaymentElementComplete:!1,isPaymentProcessing:!1,paymentErrorMessage:null,clientSecret:null,paymentIntentId:null,subscriptionId:null,stripeCustomerId:null,paymentUniqueId:null,stripeConfig:null,buttonColor:null,heroRadius:null,isCustomPriceInputActive:!1,isLoading:!1,isLoadingProduct:!1,item:null,email:null,phone:null,firstName:null,middleName:null,lastName:null,personalIdNumber:null,isIframe:this.$route.query.iframe,isWidget:this.$route.query.widget,widgetType:this.$route.query.widgetType?this.$route.query.widgetType:"popup",widgetOffTitle:!!this.$route.query.offTitle,widgetOffDescription:!!this.$route.query.offDescription,productTotal:null,priceId:0,productOption:this.$route.query.optionId?parseInt(this.$route.query.optionId):null,onlyOneTime:this.$route.query.onlyOneTime,localCenters:null,currency:this.$route.query.currency?this.$route.query.currency:null,localCenterOptionId:null,customPriceValue:null,isNewsletter:!0,isCreateAccount:null,isConfidential:!1,identityMandatoryAnonymous:!1,itemId:this.$route.params.item,paymentType:"one",abTestingVariationId:null,variationIndex:null,atLeastOnePriceForOneTimeAndAbTesting:!1,atLeastOnePriceForSubscriptionAndAbTesting:!1,commentSection:[],topPayments:[],topRecurringPayment:null,justDonatedCount:null,latestPayments:[],latestPaymentIndex:0,isDonationsModalActive:!1,donationsModalTab:"latest",isTopModalActive:!1,isLatestMod
1alActive:!1,comment:"",orgoTipsPercentage:0,orgoTipsCustomAmount:0,paymentValue:0,orgoTipsType:"slider",showMoreDescription:!1,showMoreComments:!1,maxLength:this.$isMobile()?400:1e3,donationPaymentsCount:null,fullAddress:null,currentCommentsPage:1,currentPaymentsPage:1,totalComments:null,isLoadingComments:!1,isLoadingPayments:!1,isPrivateMoney:!1,acceptedConfidentiality:!1,showConfidentialityInfo:!1,scrollElement:null,utmSource:this.$route.query.utm_source??null,utmCampaign:this.$route.query.utm_campaign??null,utmMedium:this.$route.query.utm_medium??null,coverProcessingFees:!1,floatingHearts:[],heartIdCounter:0}},computed:{availableForOneTime(){return(0,ds.a6)(this.item,this.currency,"one")},availableForRecurring(){return(0,ds.a6)(this.item,this.currency,"subscription")},showPaymentTypeToggle(){return this.availableForOneTime&&this.availableForRecurring&&!this.onlyOneTime},shareUrlModal(){return fc.A},comments(){return hc["default"]},...(0,vi.L8)(["user","isGrantedOwner","tenant","tenantLogo"]),autoSubscribeNewsletter(){return!!this.tenant?.newsletterAutoSubscribe},isMobileView(){return this.$isMobile()||"mobile"===this.$route.query.preview},progressGradientStart(){return this.buttonColor?this.buttonColor:"#304D30"},progressGradientEnd(){if(!this.buttonColor)return"#C8E67A";const e=(0,lc.oW)(this.buttonColor),t=(0,lc.HS)(e.h,parseInt(e.s),parseInt(e.l));return`hsl(${t.h}, ${t.s}%, ${t.l}%)`},currencies(){let e=[this.tenant.currency];if(this.item)for(let t of this.item.productPrices)t.currency&&!e.includes(t.currency)&&e.push(t.currency);return e},maxTipAmount(){return.3*this.paymentValue},isProductBySlug(){return"ProductPayBySlug"===this.$route.name},localCenterOption(){return this.localCenterOptionId&&null!==this.localCenters?this.localCenters.find(e=>e.id===parseInt(this.localCenterOptionId)):null},selectedOption(){return this.item&&this.productOption&&null!==this.productOption?this.item.productOptions.find(e=>e.id===parseInt(this.productOption)):null},sortedProductOptions(){return this.item&&this.item.productOptions?[...this.item.productOptions].sort((e,t)=>(e.position||0)-(t.position||0)):[]},isVariationValid(){return this.item.productPriceVariations&&this.price.productPriceVariationValues.some(e=>e.productPriceVariation.id===this.abTestingVariationId)},truncatedDescription(){let e;const t=this.$route.query.lang;return e="en"===t&&this.item.descriptionEn?this.item.descriptionEn:"de"===t&&this.item.descriptionDe?this.item.descriptionDe:this.item.description,e&&!this.showMoreDescription&&e.length>this.maxLength?e.substring(0,this.maxLength)+"...":e},isLongText(){return this.item.description.length>this.maxLength},hasMoreComments(){return this.totalComments>this.commentSection.length},isDonatingForPolitics(){return this.tenant.settingFeatures.onlinePayments.isPolitics&&"donation"===this.item.type},isConfidentialityMandatory(){return this.tenant.settingFeatures.onlinePayments.confidentialityMandatory},processingFeeAmount(){return this.coverProcessingFees&&this.paymentValue?wc(this.paymentValue,this.currency,this.tenant?.stripeFeeRate):0},processingFeeForDisplay(){return this.paymentValue?wc(this.paymentValue,this.currency,this.tenant?.stripeFeeRate):0},totalAmountWithFees(){return this.coverProcessingFees&&this.paymentValue?_c(this.paymentValue,this.currency,this.tenant?.stripeFeeRate):this.paymentValue},showCoverFeesOption(){return this.item&&"donation"===this.item.type&&this.paymentValue>0},requiredDonorFields(){return dc(this.tenant,this.item)},isDonorIdentityComplete(){const e=!!this.user?.id||!(!this.donorIdentity.firstName||!this.donorIdentity.lastName);return e&&cc(this.requiredDonorFields,this.donorIdentity)},donorIdentity(){return uc({firstName:this.firstName,middleName:this.middleName,lastName:this.lastName,email:this.email,phone:this.phone,personalIdNumber:this.personalIdNumber},this.user?.id?this.user:null)},paymentModalDonorInfo(){return{email:this.donorIdentity.email,firstName:this.donorIdentity.firstName,middleName:this.donorIdentity.middleName,lastName:this.donorIdentity.lastName,personalIdNumber:this.donorIdentity.personalIdNumber,phone:this.donorIdentity.phone,isAnonymous:this.isConfidential,subscribeNewsletter:this.isNewsletter,comment:this.comment||"",address:this.fullAddress?{street:this.fullAddress}:null}},inlinePaymentTotalAmount(){return this.coverProcessingFees&&this.paymentValue?_c(this.paymentValue,this.currency,this.tenant?.stripeFeeRate):this.paymentValue||0},inlinePaymentBillingDetails(){return{name:[this.paymentModalDonorInfo.firstName,this.paymentModalDonorInfo.lastName].filter(
1Boolean).join(" "),email:this.paymentModalDonorInfo.email,phone:this.paymentModalDonorInfo.phone||void 0}}},watch:{"user.id":function(e){e&&this.prefillDonorFromUser()},currency:function(){this.syncPaymentTypeToAvailability()},priceId:function(e){if(e&&this.item&&this.item.productPrices){const t=this.item.productPrices.find(t=>t.id===e);t&&(this.paymentValue=t.price,this.customPriceValue=t.price)}else e||this.customPriceValue||(this.paymentValue=0)},paymentType:function(e){if(this.item&&this.item.productPrices)for(let t of this.item.productPrices)if(!t.isArchived&&t.currency===this.currency&&!this.item.abTestingEnabled&&t.isDefault&&("subscription"===e&&this.priceOffersRecurring(t)||"one"===e&&this.priceOffersOneTime(t))){this.priceId=t.id,this.paymentValue=t.price,this.customPriceValue=t.price;break}},tenant:function(){this.currency||(this.currency=this.tenant.currency),"DonatePage"===this.$route.name||"PresidentDonatePage"===this.$route.name?this.tenant.settingFeatures.onlinePayments.donationProductUuid&&(this.itemId=this.tenant.settingFeatures.onlinePayments.donationProductUuid,this.item||this.retrieveProduct()):this.itemId&&!this.item&&this.retrieveProduct()},item:function(e){if(e&&!this.productOption)if(e.productOptions&&e.productOptions.length>0){const t=[...e.productOptions].sort((e,t)=>(e.position||0)-(t.position||0)),i=t.find(e=>!e.isArchived);i&&(this.productOption=i.id)}else e.hasLocalCenterOption&&(this.productOption="local-center")},buttonColor(e){if(e){document.documentElement.style.setProperty("--product-button-color",e);const t=(0,lc.oW)(e);document.documentElement.style.setProperty("--product-button-h",t.h),document.documentElement.style.setProperty("--product-button-s",t.s),document.documentElement.style.setProperty("--product-button-l",t.l);const i=t.h,s=parseInt(t.s),a=parseInt(t.l),n=(0,lc.HS)(i,s,a);document.documentElement.style.setProperty("--pp-secondary-h",n.h),document.documentElement.style.setProperty("--pp-secondary-s",n.s+"%"),document.documentElement.style.setProperty("--pp-secondary-l",n.l+"%");const o=(0,lc.SZ)(i,a);document.documentElement.style.setProperty("--pp-text-on-primary-h",o.h),document.documentElement.style.setProperty("--pp-text-on-primary-s",o.s+"%"),document.documentElement.style.setProperty("--pp-text-on-primary-l",o.l+"%");const l=(0,lc.SZ)(i,n.l);document.documentElement.style.setProperty("--pp-text-on-secondary-h",l.h),document.documentElement.style.setProperty("--pp-text-on-secondary-s",l.s+"%"),document.documentElement.style.setProperty("--pp-text-on-secondary-l",l.l+"%")}},heroRadius(e){document.documentElement.style.setProperty("--hero-image-radius",e)},showCommentBox(e){e&&this.$nextTick(()=>{const e=this.$refs.commentInput?.$el?.querySelector("textarea");e&&e.focus()})},commentSection(e){e.length>0&&this.$nextTick(()=>{this.checkScroll()})}},beforeUnmount(){this.scrollElement&&this.scrollElement.removeEventListener("scroll",this.checkScroll),this.isWidget&&this.$isMobile()&&"popup"===this.widgetType&&window.removeEventListener("resize",this.updateWidgetHeight),window.removeEventListener("message",this.handlePreviewMessage)},created(){window.addEventListener("message",this.handlePreviewMessage),this.prefillDonorFromUser()},mounted(){if("ProductSharePage"===this.$route.name)return this.isLoading=!0,void this.$http.plain.get(`/resolve-slug-go/${this.$route.params.item}`).then(e=>{"product"===e.data.type&&e.data.slug?this.$router.replace({name:"ProductPayBySlug",params:{item:e.data.slug},query:this.$route.query}):this.$buefy.toast.open({message:this.$t("Product not found"),type:"is-danger",duration:4e3})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Product not found"),type:"is-danger",duration:4e3})}).finally(()=>{this.isLoading=!1});if(this.isWidget&&this.itemId){const t=[`orgo-widget-dismissed-${this.itemId}`,`orgo-widget-closed-${this.itemId}`,"orgo-widget-dismissed-default","orgo-widget-closed-default"],i=()=>(this.item&&this.item.uuid&&this.item.uuid!==this.itemId&&(t.push(`orgo-widget-dismissed-${this.item.uuid}`),t.push(`orgo-widget-closed-${this.item.uuid}`)),s()),s=()=>{for(const e of t)if("true"===localStorage.getItem(e))return!0;return!1},a=s();if(a){if(this.item&&this.item.uuid&&(localStorage.setItem(`orgo-widget-dismissed-${this.item.uuid}`,"true"),localStorage.setItem(`orgo-widget-closed-${this.item.uuid}`,"true")),localStorage.setItem(`orgo-widget-dismissed-${this.itemId}`,"true"),localStorage.setItem(`orgo-widget-closed-${this.itemId}`,"true"),window.parent&&window.parent!==window){window.parent.postMessage({action:"removeOrgoPaymentIframe",productId:this.item?.uuid||this.itemId},"*");try{window.frameElement&&(window.frameElement.style.height="0px",window.frameElement.style.width="0px",window.frameElement.style.display="none",window.frameElement.style.visibility="hidden")}catch(e){console.error("Could not access frameElement",e)}}document.querySelector("section.payment-page-product")?.setAttribute("style","display: none !important")}else if(this.$isMobile()&&"popup"===this.widgetType)try{window.frameElement&&(window.frameElement.style.height="450px")}catch(e){console.error("Could not access frameElement",e)}this.item||a||this.$watch("item",()=>{if(this.item&&i()){window.parent&&window.parent!==window&&window.parent.postMessage({action:"removeOrgoPaymentIframe",productId:this.item.uuid},"*");try{window.frameElement&&(window.frameElement.style.height="0px",window.frameElement.style.width="0px",window.frameElement.style.display="none",window.frameElement.style.visibility="hidden")}catch(e){console.error("Could not access frameElement",e)}document.querySelector("section.payment-page-product")?.setAttribute("style","display: none !important")}},{immediate:!0})}this.scrollElement=document.querySelector("#o-center-scroll-payment"),this.scrollElement&&(this.scrollElement.addEventListener("scroll",this.checkScroll,{passive:!0}),this.$nextTick(()=>{this.checkScroll()})),this.$route.query.paymentType&&(this.paymentType=this.$route.query.paymentType),this.tenant&&("DonatePage"===this.$route.name||"DonateRoPage"===this.$route.name||"PresidentDonatePage"===this.$route.name?this.tenant&&(this.tenant.settingFeatures.onlinePayments.donationProductUuid?(this.itemId=this.tenant.settingFeatures.onlinePayments.donationProductUuid,this.item||this.retrieveProduct()):this.isLoading=!0):this.tenant&&this.itemId&&!this.item?this.retrieveProduct():this.isLoading=!0,this.currency||(this.currency=this.tenant.currency),(0,ds.zL)()&&this.tenant?.settingFeatures?.integrations?.isActive&&this.tenant?.settingFeatures?.integrations?.googleAnalyticsId&&(0,gc.u_)("donation_page_view",{page_title:this.item?.name||"Donation Page",page_location:window.location.href,page_path:this.$route.path,item_name:this.item?.name,item_id:this.itemId}),(0,ds.zL)()&&this.tenant?.settingFeatures?.integrations?.isActive&&this.tenant?.settingFeatures?.integrations?.googleTagManagerId&&(0,gc.WH)("donation_page_view",{page_title:this.item?.name||"Donation Page",page_location:window.location.href,page_path:this.$route.path,item_name:this.item?.name,item_id:this.itemId}),(0,ds.zL)()&&this.tenant?.settingFeatures?.integrations?.facebookPixelId&&(0,gc.CS)("DonationPageView"))},methods:{handlePreviewMessage(e){e.data&&e.data.action&&("updateButtonColor"===e.data.action&&e.data.color&&(this.buttonColor=e.data.color),"updateHeroRadius"===e.data.action&&this.item&&(this.heroRadius=e.data.value),"updateSetting"===e.data.action&&this.item&&e.data.key&&
1(this.item.settings[e.data.key]=e.data.value))},hasAcceptedCookies:ds.zL,currencySymbol:ds.S1,logoPublicUrl:ds.YV,mediaSrc:ds.F9,sameDay:ds.lp,getYouTubeEmbedUrl(e){if(!e)return"";let t="";return e.includes("youtube.com/watch?v=")?t=e.split("v=")[1]?.split("&")[0]:e.includes("youtu.be/")?t=e.split("youtu.be/")[1]?.split("?")[0]:e.includes("youtube.com/embed/")&&(t=e.split("embed/")[1]?.split("?")[0]),t?`https://www.youtube-nocookie.com/embed/${t}?rel=0&modestbranding=1&showinfo=0&iv_load_policy=3&controls=1&disablekb=0`:""},selectProductOption(e){"local-center"===e?(this.productOption="local-center",this.localCenterOptionId=null):(this.productOption=e,this.localCenterOptionId=null)},getSelectedOptionName(){if(!this.productOption||"local-center"===this.productOption)return null;const e=this.item.productOptions.find(e=>e.id===this.productOption);return e?e.name:null},updateWidgetHeight(){if(this.isWidget&&this.$isMobile())try{const e=document.querySelector(".payment-page-product");if(e){const t=e.offsetHeight;window.parent&&window.parent!==window&&window.parent.postMessage({action:"resizeOrgoPaymentIframe",height:t+20,productId:this.item?.uuid||this.itemId||"default"},"*"),window.frameElement&&(window.frameElement.style.height=`${t+20}px`)}}catch(e){console.error("Error adjusting widget height",e)}},startAnimation(){setInterval(()=>{void 0!==this.latestPayments[this.latestPaymentIndex+1]?this.latestPaymentIndex=this.latestPaymentIndex+1:this.latestPaymentIndex=0},2200)},onCoverFeesToggle(){!0===this.coverProcessingFees&&this.triggerHeartsAnimation()},triggerHeartsAnimation(){const e=5;for(let t=0;t<e;t++){const e={id:this.heartIdCounter++,left:200*Math.random()-50,delay:.15*t};this.floatingHearts.push(e),setTimeout(()=>{const t=this.floatingHearts.findIndex(t=>t.id===e.id);t>-1&&this.floatingHearts.splice(t,1)},2500+150*t)}},updatePaymentValueFromCustom(){let e=parseInt(this.customPriceValue);if(isNaN(e)||e<=0)return void(this.paymentValue=null);const t=this.item?.customMaxPrice||1e7;e>t&&(this.customPriceValue=t,e=t,this.$buefy.toast.open({message:this.$t("The maximum amount you can choose is {amount}.",{amount:this.$filters.money(t,this.currency)}),type:"is-warning",duration:4e3})),this.paymentValue=e},checkMinMaxCustom(){let e=parseInt(this.customPriceValue);if(isNaN(e)||e<=0)return void(this.paymentValue=null);const t=this.item?.customMaxPrice||1e7,i=this.item?.customMinPrice||0;e>t&&(this.customPriceValue=t,e=t),i>0&&e<i&&(this.customPriceValue=i,e=i,this.$buefy.toast.open({message:this.$t("The minimum amount you can choose is {amount}.",{amount:this.$filters.money(i,this.currency)}),type:"is-warning",duration:4e3})),this.paymentValue=e},checkScroll(){if(this.scrollElement){const e=document.getElementById("commentsList");if(!e)return;const t=e.getBoundingClientRect(),i=t.top;this.showScrollDonateButton=i<20}},scrollToForm(){this.isDonationsModalActive=!1,document.getElementById("paymentForm").scrollIntoView({behavior:"smooth"})},localCenterNameSelector:ds.Hc,nl2br:ds.HA,sortLocalCenters:ds.KN,videoUrl:ds.fV,removeIframeWidget(){if(window.parent&&window.parent!==window){const t=this.itemId||"default",i=this.item?.uuid||"default";localStorage.setItem(`orgo-widget-dismissed-${t}`,"true"),localStorage.setItem(`orgo-widget-closed-${t}`,"true"),i!==t&&(localStorage.setItem(`orgo-widget-dismissed-${i}`,"true"),localStorage.setItem(`orgo-widget-closed-${i}`,"true")),localStorage.setItem("orgo-widget-dismissed-default","true"),localStorage.setItem("orgo-widget-closed-default","true"),window.parent.postMessage({action:"removeOrgoPaymentIframe",productId:"default"!==i?i:t},"*");try{window.frameElement&&(window.frameElement.style.height="0px",window.frameElement.style.width="0px",window.frameElement.style.display="none",window.frameElement.style.visibility="hidden",window.frameElement.setAttribute("hidden","hidden"))}catch(e){console.error("Could not access frameElement",e)}const s=document.querySelector("section.payment-page-product");s&&s.setAttribute("style","display: none !important")}},navigateFromWidgetToOrgo(){if(window.parent&&window.parent!==window){let e="https://"+this.tenant.appHost+"/pay/"+this.item.slug+"?paymentType="+this.paymentType+"&priceId="+this.priceId+"&workspace="+this.tenant.slug;!this.priceId&&this.customPriceValue&&(e+="&customPriceValue="+this.customPriceValue),window.parent.location.href=e}},priceOffersRecurring(e){return(0,ds.nj)(e)},priceOffersOneTime(e){return(0,ds.Oh)(e)},paymentTypeVisible(e){return"subscription"===this.paymentType?(0,ds.nj)(e):(0,ds.Oh)(e)},syncPaymentTypeToAvailability(){this.paymentType=(0,ds.vK)(this.paymentType,this.availableForOneTime,this.availableForRecurring,!!this.$route.query.paymentType)},retrieveProduct(){if(!this.tenant||this.isLoadingProduct)return;this.isLoading=!0,this.isLoadingProduct=!0;let e=this.isProductBySlug?"/product_by_slug?tenant="+this.tenant.slug+"&slug="+this.itemId:"/product/public/"+this.itemId;this.$http.plain.get(e,{headers:{"X-Tenant-ID":this.tenant.id}}).then(e=>{this.item=e.data,(this.item.goalValue&&this.item.goalValue>0||this.item.goalValueSubscription&&this.item.goalValueSubscription>
10)&&this.$http.plain.get("/connected/product-total/"+this.item.uuid).then(e=>{this.productTotal=e.data,this.donationPaymentsCount=this.productTotal.onetime_payments_count}),this.item.settings.commentSection&&this.retrieveProductComments(),this.item.settings.newestAndTopDonationSection&&(this.retrieveProductStats(),this.retrieveProductPayments()),this.updateColors(),this.syncPaymentTypeToAvailability(),this.item.productPrices.sort((e,t)=>e.price-t.price);for(let t of this.item.productPrices)if(this.item.abTestingEnabled){for(let e=0;e<this.item.productPriceVariations.length;e++)this.item.productPriceVariations[e].enabled?this.item.productPriceVariations[e].currency!==this.currency&&this.item.productPriceVariations.splice(e,1):this.item.productPriceVariations.splice(e,1);if(this.item.productPriceVariations&&0!==this.item.productPriceVariations.length){if(localStorage.getItem("ab-testing-variation-product-"+this.item.id)&&(this.abTestingVariationId=parseInt(localStorage.getItem("ab-testing-variation-product-"+this.item.id)),this.variationIndex=this.item.productPriceVariations.findIndex(e=>e.id===this.abTestingVariationId),-1===this.variationIndex)){const e=Math.floor(Math.random()*this.item.productPriceVariations.length);this.abTestingVariationId=this.item.productPriceVariations[e].id,localStorage.setItem("ab-testing-variation-product-"+this.item.id,this.abTestingVariationId)}if(!localStorage.getItem("ab-testing-variation-product-"+this.item.id)){const e=Math.floor(Math.random()*this.item.productPriceVariations.length);this.variationIndex=e,this.abTestingVariationId=this.item.productPriceVariations[e].id,localStorage.setItem("ab-testing-variation-product-"+this.item.id,this.abTestingVariationId)}}else localStorage.getItem("ab-testing-variation-product-"+this.item.id)&&localStorage.removeItem("ab-testing-variation-product-"+this.item.id),this.item.abTestingEnabled=!1;!this.atLeastOnePriceForSubscriptionAndAbTesting&&this.priceOffersRecurring(t)&&t.productPriceVariation?.find(e=>e.productPriceVariationValues.productPriceVariation.id===this.abTestingVariationId)?this.atLeastOnePriceForSubscriptionAndAbTesting=!0:!this.atLeastOnePriceForOneTimeAndAbTesting&&this.priceOffersOneTime(t)&&t.productPriceVariation?.find(e=>e.productPriceVariationValues.productPriceVariation.id===this.abTestingVariationId)&&(this.atLeastOnePriceForOneTimeAndAbTesting=!0),this.item.productPriceVariations&&this.item.productPriceVariations[this.variationIndex]&&(this.priceId=this.item.productPriceVariations[this.variationIndex].defaultPrice?this.item.productPriceVariations[this.variationIndex].defaultPrice:0)}else t.isDefault&&(this.priceOffersRecurring(t)&&"subscription"===this.paymentType||this.priceOffersOneTime(t)&&"one"===this.paymentType)&&(this.priceId=t.id,this.paymentValue=t.price);if(this.item.hasLocalCenterOption)return this.$http.plain.get("/local-centers-public?isActive=1&isStripeEligible=1&tenantSlug="+this.tenant.slug).then(e=>{this.localCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant),this.localCenterOptionId=this.$route.query.localCenter?this.$route.query.localCenter:null}).catch(e=>console.error(e));this.$route.query.customPriceValue&&"null"!==this.$route.query.customPriceValue&&(this.customPriceValue=parseInt(this.$route.query.customPriceValue),this.paymentValue=parseInt(this.$route.query.customPriceValue),this.priceId=null,this.isCustomPriceInputActive=!0),this.$route.query.priceId&&"null"!==this.$route.query.priceId&&0!==parseInt(this.$route.query.priceId)&&(this.priceId=parseInt(this.$route.query.priceId)),this.isWidget&&this.$isMobile()&&this.$nextTick(()=>{this.updateWidgetHeight()})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1,this.isLoadingProduct=!1})},retrieveProductStats(){this.isWidget||(this.isLoading=!0,this.$http.plain.get("/get-payment-page-info/"+this.item.uuid).then(e=>{this.topPayments=e.data["topPayments"],this.totalComments=e.data["commentsCount"],this.topRecurringPayment=e.data["topRecurringPayment"],this.justDonatedCount=e.data["justDonatedCount"]}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1}))},retrieveProductPayments(){1===this.currentPaymentsPage&&(this.latestPayments=[]),this.isWidget||(this.isLoadingPayments=!0,this.$http.plain.get("/get-payment-page-payments/"+this.item.uuid+"?page="+this.currentPaymentsPage).then(e=>
1{e.data["latestPayments"].forEach(e=>{this.latestPayments.push(e)}),this.startAnimation()}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingPayments=!1}))},retrieveProductComments(){1===this.currentCommentsPage&&(this.commentSection=[]),this.isWidget||(this.isLoadingComments=!0,this.$http.plain.get("/get-payment-page-comments/"+this.item.uuid+"?page="+this.currentCommentsPage).then(e=>{this.commentSection=[...this.commentSection,...e.data["commentSection"]]}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingComments=!1}))},selectPrice(e){this.priceId=e.id,this.paymentValue=e.price,this.customPriceValue=e.price,this.isCustomPriceInputActive=!1},onCustomAmountFocus(e){"0"===e.target.value&&(this.customPriceValue=null,e.target.value=""),e.target.select()},onCustomPriceInput(){if(this.priceId){const e=this.item.productPrices.find(e=>e.id===this.priceId);e&&parseInt(this.customPriceValue)!==e.price&&(this.priceId=null)}this.updatePaymentValueFromCustom()},cancelCustomPriceInput(){this.isCustomPriceInputActive=!1},enableCustomPriceInput(){this.isCustomPriceInputActive=!0,this.$refs.customPriceValueInput&&this.$refs.customPriceValueInput.focus(),this.isWidget&&this.$isMobile()&&this.$nextTick(()=>{this.updateWidgetHeight()})},createSubscriptionPending(){return this.isLoading=!0,!this.identityMandatoryAnonymous||this.user?.id||this.email&&this.donorIdentity.name?this.isDonorIdentityComplete?void this.$http.plain.post("/subscription/"+(this.user&&this.user.id?"":"external/")+"create-pending",{requestPayload:{optionId:this.productOption,localCenterOptionId:this.localCenterOptionId,priceId:this.priceId,customPriceValue:this.priceId?null:this.customPriceValue,product:this.item.name,productId:this.item.id,productUuid:this.item.uuid,productPriceVariation:this.abTestingVariationId,currency:this.currency,isNewsletter:this.isNewsletter,isCreateAccount:this.isCreateAccount,isPublic:!this.isConfidential,email:this.donorIdentity.email,phone:this.donorIdentity.phone,name:this.donorIdentity.name,firstName:this.donorIdentity.firstName,middleName:this.donorIdentity.middleName,lastName:this.donorIdentity.lastName,personalIdNumber:this.donorIdentity.personalIdNumber,fieldX:this.fieldX,fieldLinkedin:this.fieldLinkedin,fieldInstagram:this.fieldInstagram,fieldOrganisation:this.fieldOrganisation,fieldRole:this.fieldRole,fieldTown:this.fieldTown?this.fieldTown.id:null,comment:this.comment,coverProcessingFeeAmount:this.coverProcessingFees?this.processingFeeAmount:0}}).then(e=>{this.$router.push({name:"ValidateIdentityByUserOnPayment",params:{payment:e.data.uid},query:{paymentType:"subscription"}})}).catch(e=>{console.error(e);const t=pc(e.response?.data?.detail||e.response?.data?.["hydra:description"]||e.response?.data?.message);t&&this.$buefy.toast.open({message:this.$t(t),type:"is-danger",duration:6e3})}).finally(()=>{this.isLoading=!1}):(this.isLoading=!1,this.$buefy.toast.open({message:this.$t("Please fill in all required donor fields"),type:"is-danger",duration:6e3})):(this.isLoading=!1,this.$buefy.toast.open({message:this.$t("The name and email address are mandatory"),type:"is-danger",duration:6e3}))},updateColors(){this.item&&this.item.settings.colorButton&&(this.buttonColor=this.item.settings.colorButton),this.event&&this.event.settings.colorButton&&(this.buttonColor=this.event.settings.colorButton),this.item&&void 0!==this.item.settings.heroRadius&&null!==this.item.settings.heroRadius&&(this.heroRadius=this.item.settings.heroRadius),this.event&&void 0!==this.event.settings.heroRadius&&null!==this.event.settings.heroRadius&&(this.heroRadius=this.event.settings.heroRadius)},openPaymentModal(){!this.paymentValue||this.paymentValue<=0?this.$buefy.toast.open({message:this.$t("Please select an amount"),type:"is-warning"}):this.user.id||this.isValidEmail(this.email)?this.isDonorIdentityComplete?(this.tenant?.settingFeatures?.integrations?.isActive&&(0,gc.u_)("begin_checkout",{currency:this.currency,value:this.paymentValue,items:[{item_name:this.item?.name,item_id:this.item?.uuid}]}),this.initInlinePayment()):this.$buefy.toast.open({message:this.$t("Please fill in all required donor fields"),type:"is-warning"}
1):this.$buefy.toast.open({message:this.$t("Please enter a valid email"),type:"is-warning"})},initInlinePayment(){this.resetInlinePaymentState(),this.paymentStep="loading",this.loadStripeScript().then(()=>this.fetchStripeConfig()).then(()=>this.saveDonorInfo()).then(()=>this.createStripePaymentIntent()).then(()=>this.setupInlineStripeElements()).catch(e=>{if(console.log(e),"identity_required"===e.message||"identity_upload_required"===e.message)return void(this.identityMandatoryAnonymous&&(this.paymentStep="form"));const t=pc(e.message);if(t)return this.paymentStep="form",void this.$buefy.toast.open({message:this.$t(t),type:"is-danger",duration:6e3});this.paymentErrorMessage=e.message||this.$t("Failed to initialize payment"),this.paymentStep="error"})},resetInlinePaymentState(){this.destroyStripePaymentElement(),this.stripe=null,this.stripeElements=null,this.stripePaymentElement=null,this.isPaymentElementReady=!1,this.isPaymentElementComplete=!1,this.isPaymentProcessing=!1,this.paymentErrorMessage=null,this.clientSecret=null,this.paymentIntentId=null,this.subscriptionId=null,this.stripeCustomerId=null,this.paymentUniqueId=null},destroyStripePaymentElement(){try{this.stripePaymentElement?.destroy()}catch(e){console.log(e)}this.stripeElements=null,this.stripePaymentElement=null,this.isPaymentElementReady=!1,this.isPaymentElementComplete=!1,this.isPaymentProcessing=!1},loadStripeScript(){return new Promise((e,t)=>{if(window.Stripe)return void e();const i=document.createElement("script");i.src="https://js.stripe.com/v3/",i.async=!0,i.onload=e,i.onerror=()=>t(new Error("Failed to load Stripe.js")),document.head.appendChild(i)})},fetchStripeConfig(){return new Promise((e,t)=>{this.$http.plain.get(`/donation/stripe-config/${this.item.uuid}`).then(t=>{this.stripeConfig=t.data,this.stripe=window.Stripe(this.stripeConfig.publishableKey,{stripeAccount:this.stripeConfig.stripeAccount}),e()}).catch(e=>{console.log(e),t(new Error(this.$t("Failed to load payment configuration")))})})},saveDonorInfo(){return new Promise((e,t)=>{const i="subscription"===this.paymentType?"monthly":"once";this.$http.plain.post(this.user?.id?"/member-donation/save-donor":"/donation/save-donor",{productId:this.item.uuid,donor:this.paymentModalDonorInfo,donationType:i,localCenterId:this.localCenterOptionId,productOptionId:"number"===typeof this.productOption?this.productOption:null,source:"app_inline"}).then(t=>{this.paymentUniqueId=t.data.uniqueId,e()}).catch(e=>{console.log(e);const i=e.response?.data?.detail||e.response?.data?.message||this.$t("Failed to save donor information");t(new Error(i))})})},createStripePaymentIntent(){const e="subscription"===this.paymentType?"monthly":"once";return new Promise((t,i)=>{this.$http.plain.post("/donation/payment-intent",{productId:this.item.uuid,amount:this.paymentValue,currency:this.currency,donationType:e,uniqueId:this.paymentUniqueId,coverTransactionCosts:this.coverProcessingFees}).then(e=>{if(e.data.requiresIdentity){if(e.data.identityMandatory)return this.createSubscriptionPending(),void i(new Error("identity_required"));if(e.data.uploadIdentity)return this.$router.push({name:"ValidateIdentityByUserOnPayment",params:{payment:e.data.uploadIdentity},query:{paymentType:"subscription"}}),void i(new Error("identity_upload_required"))}this.clientSecret=e.data.clientSecret,e.data.subscriptionId?(this.subscriptionId=e.data.subscriptionId,this.stripeCustomerId=e.data.customerId):this.paymentIntentId=e.data.paymentIntentId,t()}).catch(e=>{console.log(e);const t=e.response?.data?.detail||e.response?.data?.message||this.$t("Failed to create payment");i(new Error(t))})})},setupInlineStripeElements(){const e=this.tenant?.language||"en";this.stripeElements=this.stripe.elements({clientSecret:this.clientSecret,locale:e,appearance:{theme:"stripe",variables:{borderRadius:"8px",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}}}),this.stripePaymentElement=this.stripeElements.create("payment",{layout:"accordion",wallets:{applePay:"auto",googlePay:"auto"},defaultValues:{billingDetails:this.inlinePaymentBillingDetails}}),this.stripePaymentElement.on("ready",()=>{this.isPaymentElementReady=!0}),this.stripePaymentElement.on("change",e=>{this.isPaymentElementComplete=e.complete}),this.stripePaymentElement.on("loaderror",()=>{this.paymentErrorMessage=this.$t("Failed to load payment form"),this.paymentStep="error"}),this.paymentStep="payment",this.$nextTick(()=>{const e=document.getElementById("inline-payment-element");e?this.stripePaymentElement.mount("#inline-payment-element"):(this.paymentErrorMessage=this.$t("Failed to load payment form"),this.paymentStep="error")})},confirmStripePayment(){if(this.isPaymentProcessing||!this.isPaymentElementReady||!this.isPaymentElementComplete)return;this.isPaymentProcessing=!0,this.paymentErrorMessage=null;const e="confirmPayment";this.stripe[e]({elements:this.stripeElements,confirmParams:{return_url:window.location.href,payment_method_data:{billing_details:this.inl
1inePaymentBillingDetails}},redirect:"if_required"}).then(e=>{e.error?this.handleStripePaymentError(e.error):(this.paymentStep="processing",this.handleStripePaymentSuccess(e))}).catch(e=>{console.log(e),this.handleStripePaymentError(e)})},handleStripePaymentError(e){this.isPaymentProcessing=!1,this.paymentErrorMessage=e.message||this.$t("Payment failed")},handleStripePaymentSuccess(e){const t=e.paymentIntent,i=t?.status;"succeeded"===i?this.completeInlineDonation():"processing"===i?this.paymentStep="processing":"requires_payment_method"===i?this.handleStripePaymentError({message:this.$t("Payment failed. Please try a different payment method.")}):this.handleStripePaymentError({message:this.$t("Unexpected payment status: ")+i})},completeInlineDonation(){const e="subscription"===this.paymentType?"monthly":"once",t={productId:this.item.uuid,donor:this.paymentModalDonorInfo,donationType:e};"monthly"===e?(t.subscriptionId=this.subscriptionId,t.customerId=this.stripeCustomerId):t.paymentIntentId=this.paymentIntentId,this.$http.plain.post("/donation/complete",t).then(e=>{this.handlePaymentSuccess(),e.data.requiresIdentity&&e.data.uploadIdentity?this.$router.push({name:"ValidateIdentityByUserOnPayment",params:{payment:e.data.uploadIdentity},query:{paymentType:"onetime"}}):this.redirectToThankYou(e.data?.unique||this.paymentUniqueId)}).catch(e=>{console.log(e),this.handleStripePaymentError({message:this.$t("Payment processing failed. Please try again.")})})},redirectToThankYou(e){const t="subscription"===this.paymentType?"subscription":"onetime";this.$router.push({name:"PaymentThankYou",query:{unique:e,paymentType:t,type:this.item.type,workspace:this.tenant.slug,lang:this.tenant.language,product:this.item.uuid,amount:this.inlinePaymentTotalAmount,currency:this.currency}})},goBackToForm(){this.paymentStep="form",this.resetInlinePaymentState()},resetPaymentStep(){this.paymentStep="form",this.resetInlinePaymentState(),this.priceId=0,this.paymentValue=0,this.customPriceValue=null,this.coverProcessingFees=!1},retryPayment(){if(this.stripe&&this.clientSecret)return this.paymentErrorMessage=null,this.destroyStripePaymentElement(),void this.setupInlineStripeElements();this.initInlinePayment()},onInlinePaymentCoverFeesToggle(){!0===this.coverProcessingFees&&this.triggerHeartsAnimation()},handlePaymentSuccess(){this.tenant?.settingFeatures?.integrations?.isActive&&((0,gc.u_)("purchase",{currency:this.currency,value:this.paymentValue,items:[{item_name:this.item?.name,item_id:this.item?.uuid}]}),this.tenant?.settingFeatures?.integrations?.facebookPixelId&&(0,gc.CS)("Purchase",{currency:this.currency,value:this.paymentValue,content_name:this.item?.name})),this.retrieveProductPayments(),this.item?.goalValue&&this.retrieveProductStats()},createStripeCheckoutSession(){setTimeout(()=>{let e=null;this.isLoading=!0;let t=this.user.id?"":"anonymous/",i="subscription"===this.paymentType?"subscription":"payment",s=0;return this.$http.plain.post("/connected/stripe-checkout-session/"+t+i,{optionId:this.productOption,localCenterOptionId:this.localCenterOptionId,priceId:this.priceId,customPriceValue:this.priceId?null:this.customPriceValue,product:this.item.name,productId:this.item.id,productUuid:this.item.uuid,productPriceVariation:this.abTestingVariationId,currency:this.currency,isNewsletter:this.isNewsletter,isCreateAccount:this.isCreateAccount,isPublic:!this.isConfidential,email:this.email,contactEntity:e,comment:this.comment,fullAddress:this.fullAddress,orgoTipsAmount:s,coverProcessingFeeAmount:this.coverProcessingFees?this.processingFeeAmount:0}).then(e=>{e.data.identityMandatory?(this.user.id||(this.identityMandatoryAnonymous=!0),this.createSubscriptionPending()):e.data.uploadIdentity?this.$router.push({name:"ValidateIdentityByUserOnPayment",params:{payment:e.data.uploadIdentity},query:{paymentType:"subscription"}}):location.href=e.data.url}).catch(e=>{const t=e.response,i=t?.data,s=t?i?.detail||i?.message||(Array.isArray(i?.errors)?i.errors.join("\n"):i&&JSON.stringify(i))||t.status<500&&t.statusText:e.message;this.$buefy.toast.open({message:s,type:"is-danger",duration:6e3})}).finally(()=>{this.isLoading=!1})},200)},prefillDonorFromUser(){this.user?.id&&(this.firstName=this.firstName||this.user.firstName||null,this.middleName=this.middleName||this.user.middleName||null,this.lastName=this.lastName||this.user.lastName||null,this.email=this.email||this.user.email||null,this.phone=this.phone||this.user.phoneNumber||null)},isValidEmail(e){const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.test(e)},showModal(e){this.donationsModalTab="top"===e?"top":"latest",this.isDonationsModalActive=!0},toggleShowMoreDescription(){this.showMoreDescription=!this.showMoreDescription},loadMoreComments(){this.currentCommentsPage++,this.retrieveProductComments()}
1,loadMorePayments(){this.currentPaymentsPage++,this.retrieveProductPayments()}}};const Fc=(0,Li.A)($c,[["render",oc],["__scopeId","data-v-073580b0"]]);var Tc=Fc,Sc=i(57985);const Ac={class:"o-maxwidth"},Pc={key:0,class:"mb-5 is-flex"},Ic={class:"title mt-1"},Mc={key:0,class:"title-count-badge"},xc={key:1},Nc={key:0},Uc={key:1},Dc={key:1},Xc={class:"is-flex is-flex-wrap-wrap is-align-items-center pb-3",style:{gap:"8px"}},Vc={class:"list-filter-pill"},Rc={class:"pill-label"},Oc={class:"pill-value"},Qc={class:"pill-label"},Bc={class:"pill-dropdown"},Gc={class:"pill-dropdown-header"},Wc={class:"pill-input-body"},jc=["placeholder"],zc={class:"list-filter-pill"},qc={class:"pill-label"},Jc={class:"pill-value"},Hc={class:"pill-label"},Kc={class:"pill-dropdown"},Yc={class:"pill-dropdown-header"},Zc={class:"pill-input-body"},eu=["placeholder"],tu={key:0,class:"list-filter-pill"},iu={class:"pill-label"},su={class:"pill-value"},au={class:"pill-label"},nu={class:"pill-dropdown"},ou={class:"pill-dropdown-header"},lu={class:"pill-input-body"},ru=["placeholder"],du={class:"list-filter-pill"},cu={key:0,class:"orgo-table-wrap"},uu={class:"tag is-rounded is-default"},mu=["href"],pu={class:"icon-text"},hu={class:"icon is-small"},gu={class:"is-default tag is-rounded"},fu={class:"icon-text tag is-rounded is-medium"},bu={class:"icon is-small mr-1"},yu={class:"tag is-rounded is-medium"},vu={key:0,class:"mr-2 tag is-rounded is-default"},ku={key:1,class:"mr-2 tag is-rounded is-default"},Cu={key:2,class:"tag is-rounded is-default"},Lu={key:0,class:"tag is-default is-rounded"},wu={key:1,class:"tag is-default is-rounded"},_u={key:2},Eu={key:0,class:"tag is-rounded is-default"},$u={key:1,class:"is-rounded is-default tag"},Fu=["onClick"],Tu={key:1},Su=["onClick"],Au=["onClick"],Pu={key:0},Iu={key:1}
1,Mu=["onClick"],xu={key:4},Nu={key:0,class:"tag is-small is-warning is-outlined is-rounded"},Uu={key:1,class:"tag is-small is-danger is-outlined is-rounded"},Du={key:2,class:"tag is-small is-danger is-outlined is-rounded"},Xu={key:3,class:"tag is-small is-success is-outlined is-rounded"},Vu={key:4,class:"tag is-small is-warning is-outlined is-rounded"},Ru={key:5,class:"tag is-small is-default is-outlined is-rounded"},Ou={key:6,class:"tag ml-2 is-small is-default is-outlined is-rounded"},Qu=["onClick"];function Bu(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("font-awesome-icon"),r=(0,c.g2)("list-filter-pill"),d=(0,c.g2)("b-table-column"),p=(0,c.g2)("router-link"),h=(0,c.g2)("b-table");return(0,c.uX)(),(0,c.CE)("section",Ac,[a.item||a.items||n.isAllSubscribers?((0,c.uX)(),(0,c.CE)("div",Pc,[(0,c.Lk)("h2",Ic,[(0,c.eW)((0,u.v_)(a.item?a.item.name+" - ":"")+(0,u.v_)(e.$t("subscribers"))+" ",1),null!==a.itemsTotal?((0,c.uX)(),(0,c.CE)("span",Mc,(0,u.v_)(a.itemsTotal),1)):(0,c.Q3)("",!0),e.isGranted("FINANCIAL_TENANT")?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("span",xc,[t[17]||(t[17]=(0,c.eW)(" - ",-1)),e.isGranted("FINANCIAL_PARENT_LOCAL")&&e.user.localCenterParent?((0,c.uX)(),(0,c.CE)("span",Nc,(0,u.v_)(e.$t("LP"))+" "+(0,u.v_)(e.user.localCenterParent.name),1)):((0,c.uX)(),(0,c.CE)("span",Uc,(0,u.v_)(e.$t("LC"))+" "+(0,u.v_)(e.user.localCenter.name),1))]))])])):(0,c.Q3)("",!0),(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),a.item||a.items||n.isAllSubscribers?((0,c.uX)(),(0,c.CE)("div",Dc,[(0,c.Lk)("div",Xc,[(0,c.Lk)("div",Vc,[(0,c.Lk)("button",{class:(0,u.C4)(["pill-trigger",{"is-active":a.filters.name}]),onClick:t[2]||(t[2]=(0,m.D$)(e=>n.togglePill("name"),["stop"]))},[a.filters.name?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("span",{class:"pill-clear",onClick:t[1]||(t[1]=(0,m.D$)(e=>n.clearFilter("name"),["stop"]))},[(0,c.bF)(l,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",Rc,(0,u.v_)(e.$t("name")),1),t[18]||(t[18]=(0,c.Lk)("span",{class:"pill-divider"},null,-1)),(0,c.Lk)("span",Oc,(0,u.v_)(a.filters.name),1)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.bF)(l,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,c.Lk)("span",Qc,(0,u.v_)(e.$t("name")),1)],64))],2),(0,c.bo)((0,c.Lk)("div",Bc,[(0,c.Lk)("div",Gc,(0,u.v_)(e.$t("name")),1),(0,c.Lk)("div",Wc,[(0,c.bo)((0,c.Lk)("input",{ref:"nameInput","onUpdate:modelValue":t[3]||(t[3]=e=>a.filters.name=e),class:"pill-text-input",placeholder:e.$t("name"),onInput:t[4]||(t[4]=(...e)=>n.filterItemsByWord&&n.filterItemsByWord(...e)),onClick:t[5]||(t[5]=(0,m.D$)(()=>{},["stop"]))},null,40,jc),[[m.Jo,a.filters.name]])])],512),[[m.aG,"name"===a.openPill]])]),(0,c.Lk)("div",zc,[(0,c.Lk)("button",{class:(0,u.C4)(["pill-trigger",{"is-active":a.filters.id}]),onClick:t[7]||(t[7]=(0,m.D$)(e=>n.togglePill("id"),["stop"]))},[a.filters.id?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("span",{class:"pill-clear",onClick:t[6]||(t[6]=(0,m.D$)(e=>n.clearFilter("id"),["stop"]))},[(0,c.bF)(l,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",qc,(0,u.v_)(e.$t("ID")),1),t[19]||(t[19]=(0,c.Lk)("span",{class:"pill-divider"},null,-1)),(0,c.Lk)("span",Jc,(0,u.v_)(a.filters.id),1)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.bF)(l,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,c.Lk)("span",Hc,(0,u.v_)(e.$t("ID")),1)],64))],2),(0,c.bo)((0,c.Lk)("div",Kc,[(0,c.Lk)("div",Yc,(0,u.v_)(e.$t("ID")),1),(0,c.Lk)("div",Zc,[(0,c.bo)((0,c.Lk)("input",{ref:"idInput","onUpdate:modelValue":t[8]||(t[8]=e=>a.filters.id=e),class:"pill-text-input",placeholder:e.$t("ID"),onInput:t[9]||(t[9]=(...e)=>n.filterItemsByWord&&n.filterItemsByWord(...e)),onClick:t[10]||(t[10]=(0,m.D$)(()=>{},["stop"]))},null,40,eu),[[m.Jo,a.filters.id]])])],512),[[m.aG,"id"===a.openPill]])]),e.isGranted("FINANCIAL_TENANT")?((0,c.uX)(),(0,c.CE)("div",tu,[(0,c.Lk)("button",{class:(0,u.C4)(["pill-trigger",{"is-active":a.filters.email}]),onClick:t[12]||(t[12]=(0,m.D$)(e=>n.togglePill("email"),["stop"]))},[a.filters.email?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("span",{class:"pill-clear",onClick:t[11]||(t[11]=(0,m.D$)(e=>n.clearFilter("email"),["stop"]))},[(0,c.bF)(l,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",iu,(0,u.v_)(e.$t("Email")),1),t[20]||(t[20]=(0,c.Lk)("span",{class:"pill-divider"},null,-1)),(0,c.Lk)("span",su,(0,u.v_)(a.filters.email),1)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.bF)(l,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,c.Lk)("span",au,(0,u.v_)(e.$t("Email")),1)],64))],2),(0,c.bo)((0,c.Lk)("div",nu,[(0,c.Lk)("div",ou,(0,u.v_)(e.$t("Email")),1),(0,c.Lk)("div",lu,[(0,c.bo)((0,c.Lk)("input",{ref:"emailInput","onUpdate:modelValue":t[13]||(t[13]=e=>a.filters.email=e),class:"pill-text-input",placeholder:e.$t("Email"),onInput:t[14]||(t[14]=(...e)=>n.filterItemsByWord&&n.filterItemsByWord(...e)),onClick:t[15]||(t[15]=(0,m.D$)(()=>{},["stop"]))},null,40,ru),[[m.Jo,a.filters.email]])])],512),[[m.aG,"email"===a.openPill]])])):(0,c.Q3)("",!0),(0,c.bF)(r,{ref:"statusPill",label:e.$t("Status"),options:n.statusOptions,"model-value":a.filters.status,"onUpdate:modelValue":n.onStatusChange},null,8,["label","options","model-value","onUpdate:modelValue"]),a.item&&a.item.hasLocalCenterOption&&e.isGranted("FINANCIAL_TENANT")?((0,c.uX)(),(0,c.Wv)(r,{key:1,ref:"localCenterPill",label:e.$t("localCenters"),options:n.localCenterFilterOptions,"model-value":a.filters.localCenter,"onUpdate:modelValue":n.onLocalCenterChange},null,8,["label","options","model-value","onUpdate:modelValue"])):(0,c.Q3)("",!0),(0,c.Lk)("div",du,[(0,c.Lk)("button",{class:"pill-trigger",onClick:t[16]||(t[16]=(...e)=>n.loadItemsPage&&n.loadItemsPage(...e))},[(0,c.bF)(l,{icon:"fa-light fa-refresh"})])])]),a.items&&!a.isLoading?((0,c.uX)(),(0,c.CE)("div",cu,[(0,c.bF)(h,{data:a.items,paginated:a.isMoreThanOnePage,"backend-pagination":"","pagination-rounded":!0,"mobile-cards":!1,total:a.itemsTotal,"per-page":a.itemsPerPage,"current-page":a.itemsPageCurrent,striped:"",scrollable:"","backend-sorting":"","default-sort-direction":a.defaultSortOrder,"default-sort":[a.sortField,a.sortOrder],onPageChange:n.changeListPage,onSort:n.onSort},{default:(0,c.k6)(()=>[(0,c.bF)(d,{label:e.$t("ID"),sortable:"",field:"id"},{default:(0,c.k6)(e=>[(0,c.Lk)("span",uu,(0,u.v_)(e.row.id),1)]),_:1},8,["label"]),e.tenant.stripeAccount?((0,c.uX)(),(0,c.Wv)(d,{key:0,label:"Str
1ipe",sortable:"",field:"id"},{default:(0,c.k6)(t=>[t.row.stripeSubscriptionId?((0,c.uX)(),(0,c.CE)("a",{key:0,href:"https://dashboard.stripe.com/"+e.tenant.stripeAccount+"/subscriptions/"+t.row.stripeSubscriptionId,target:"_blank"},[(0,c.Lk)("span",pu,[(0,c.Lk)("span",hu,[(0,c.bF)(l,{icon:"fa-light fa-arrow-up-right"})])])],8,mu)):(0,c.Q3)("",!0)]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(d,{label:e.$t("created"),sortable:"",field:"createdAt"},{default:(0,c.k6)(t=>[(0,c.Lk)("span",gu,(0,u.v_)(e.$filters.formatDateCool(t.row.createdAt)),1)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("name")},{default:(0,c.k6)(e=>[e.row.member?((0,c.uX)(),(0,c.Wv)(p,{key:0,class:"is-size-6",target:"_blank",to:{name:"UserShow",params:{item:e.row.member.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",fu,[(0,c.Lk)("span",bu,[(0,c.bF)(l,{class:"is-size-7",icon:"fa-light fa-user"})]),(0,c.Lk)("span",null,(0,u.v_)(e.row.member.fullName),1)])]),_:2},1032,["to"])):e.row.contact?((0,c.uX)(),(0,c.Wv)(p,{key:1,class:"is-size-6",to:{name:"ContactShow",params:{item:e.row.contact.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",yu,(0,u.v_)(e.row.contact.name),1)]),_:2},1032,["to"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("location")},{default:(0,c.k6)(t=>[e.tenant.settingFeatures.localCenter.isActive&&t.row.member&&t.row.member.localCenter?((0,c.uX)(),(0,c.CE)("span",vu,(0,u.v_)(t.row.member.localCenter.name.length>20?t.row.member.localCenter.name.substring(0,20)+"...":t.row.member.localCenter.name),1)):(0,c.Q3)("",!0),t.row.contact&&t.row.contact.town?((0,c.uX)(),(0,c.CE)("span",ku,(0,u.v_)(t.row.contact.town.name),1)):(0,c.Q3)("",!0),t.row.contact&&t.row.contact.country?((0,c.uX)(),(0,c.CE)("span",Cu,(0,u.v_)(t.row.contact.country.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("amount")},{default:(0,c.k6)(t=>[t.row.customPriceValue?((0,c.uX)(),(0,c.CE)("span",Lu,(0,u.v_)(e.$filters.money(t.row.customPriceValue,t.row.currency)),1)):t.row.productPrice?((0,c.uX)(),(0,c.CE)("span",wu,(0,u.v_)(e.$filters.money(t.row.productPrice.price,t.row.currency)),1)):((0,c.uX)(),(0,c.CE)("span",_u,"Â "))]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("Option"),sortable:"",field:"productOption.id"},{default:(0,c.k6)(e=>[e.row.productOption?((0,c.uX)(),(0,c.CE)("span",Eu,(0,u.v_)(e.row.productOption.name),1)):e.row.localCenterOption?((0,c.uX)(),(0,c.CE)("span",$u,(0,u.v_)(e.row.localCenterOption.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),n.tenantHasIdentityValidation?((0,c.uX)(),(0,c.Wv)(d,{key:1,label:e.$t("Identity")},{default:(0,c.k6)(t=>[t.row.identity&&n.subscriberValidatePending(t.row)?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-primary is-rounded is-outlined",onClick:i=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:t.row.identity.id}})},(0,u.v_)(e.$t("Validate")),9,Fu)):n.subscriberValidated(t.row)?((0,c.uX)(),(0,c.CE)("span",Tu,[t.row.identity?((0,c.uX)(),(0,c.CE)("a",{key:0,class:"tag is-success is-rounded",onClick:i=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:t.row.identity.id}})},(0,u.v_)(e.$t("validated")),9,Su)):(0,c.Q3)("",!0)])):t.row.identity?((0,c.uX)(),(0,c.CE)("a",{key:2,class:"tag is-primary is-rounded is-small",onClick:i=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:t.row.identity.id}})},["system_validated"===t.row.identity.status?((0,c.uX)(),(0,c.CE)("span",Pu,(0,u.v_)(e.$t("Orgo validated")),1)):((0,c.uX)(),(0,c.CE)("span",Iu,(0,u.v_)(e.$t(t.row.identity.status)),1))],8,Au)):t.row.member&&t.row.member.identity?((0,c.uX)(),(0,c.CE)("a",{key:3,class:"tag is-primary is-rounded is-small",onClick:i=>e.$router.push({name:"ValidateIdentityAdmin",params:{item:t.row.member.identity.id}})},(0,u.v_)(t.row.member.identity.status),9,Mu)):((0,c.uX)(),(0,c.CE)("span",xu,"-"))]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(d,{label:e.$t("status")},{default:(0,c.k6)(t=>["no_identity"===t.row.status?((0,c.uX)(),(0,c.CE)("span",Nu,[(0,c.bF)(p,{to:{name:"ValidateIdentityByUserOnPayment",params:{payment:t.row.uid}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("No identity upload")),1)]),_:1},8,["to"])])):"identity_pending"===t.row.status?((0,c.uX)(),(0,c.CE)("span",Uu,[(0,c.bF)(p,{to:{name:"ValidateIdentityByUserOnPayment",params:{payment:t.row.uid}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Identity validation pending")),1)]),_:1},8,["to"])])):"identity_validated"===t.row.status?((0,c.uX)(),(0,c.CE)("span",Du,[(0,c.bF)(p,{to:{name:"PaymentSubscriptionCheckoutRedirect",params:{item:t.row.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Waiting for subscription")),1)]),_:1},8,["to"])])):"active"===t.row.status?((0,c.uX)(),(0,c.CE)("span",Xu,(0,u.v_)(e.$t("active")),1)):"identity_system_validated"===t.row.status?((0,c.uX)(),(0,c.CE)("span",Vu,(0,u.v_)(e.$t("Pending - Orgo validated")),1)):((0,c.uX)(),(0,c.CE)("span",Ru,(0,u.v_)(e.$t(t.row.status)),1)),"active"===t.row.status&&t.row.isSubscriptionCanceled||"canceling"===t.row.status?((0,c.uX)(),(0,c.CE)("span",Ou,(0,u.v_)(e.$t("Cancels on")+" "+e.$filters.format(t.row.currentPeriodEnd)),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),e.isGranted("FINANCIAL_TENANT")?((0,c.uX)(),(0,c.Wv)(d,{key:2,label:e.$t("action"),centered:""},{default:(0,c.k6)(t=>["active"!==t.row.status||t.row.isSubscriptionCanceled?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-primary is-outlined is-rounded is-small",onClick:e=>
1n.confirmCancelSubscription(t.row.id)},(0,u.v_)(e.$t("Unsubscribe")),9,Qu))]),_:1},8,["label"])):(0,c.Q3)("",!0)]),_:1},8,["data","paginated","total","per-page","current-page","default-sort-direction","default-sort","onPageChange","onSort"])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])}var Gu=i(37440),Wu=i(43432),ju={data(){return{isLocal:this.$route.query.isLocalSettings,item:null,items:null,itemId:0!=this.$route.params.item?this.$route.params.item:null,filters:{localCenter:this.$route.query.localCenter?parseInt(this.$route.query.localCenter):null,status:this.$route.query.status?this.$route.query.status:null,name:this.$route.query.name?this.$route.query.name:null,email:this.$route.query.email?this.$route.query.email:null,id:this.$route.query.id?this.$route.query.id:null},localCenters:[],itemsTotal:null,itemsPageCurrent:1,itemsPerPage:null,isLoading:!1,sortField:"id",sortOrder:"desc",defaultSortOrder:"desc",isMoreThanOnePage:!1,openPill:null}},mounted(){document.addEventListener("click",this.closePills),this.unregisterPill=(0,Gu.f)(this.closeOwnPill)},beforeUnmount(){document.removeEventListener("click",this.closePills),this.unregisterPill&&this.unregisterPill()},created(){this.isGranted("FINANCIAL_LOCAL")||this.isGranted("FINANCIAL_TENANT")||this.$router.push({name:"Dashboard"}),this.isAllSubscribers?this.loadItemsPage():this.retrieveProduct()},computed:{...(0,vi.L8)(["isGranted","tenant","user"]),isAllSubscribers(){return 0===parseInt(this.$route.params.item)},queryLink(){return this.isLocal?{isLocalSettings:1}:{}},tenantHasIdentityValidation(){return this.tenant.settingFeatures.identityValidation.onlinePayments},statusOptions(){return[{value:"active",label:this.$t("Active")},{value:"canceled",label:this.$t("Canceled")},{value:"canceling",label:this.$t("Canceling")},{value:"no_identity",label:this.$t("No identity upload")},{value:"identity_pending",label:this.$t("Identity validation pending")},{value:"identity_validated",label:this.$t("Waiting for subscription")},{value:"identity_system_validated",label:this.$t("Pending - Orgo validated")}]},localCenterFilterOptions(){return this.localCenters.filter(e=>e.isStripeEligible).map(e=>({value:e.id,label:this.localCenterNameSelector(e,this.tenant)}))}},methods:{localCenterNameSelector:ds.Hc,sortLocalCenters:ds.KN,closeOwnPill(){this.openPill=null},togglePill(e){this.openPill===e?this.openPill=null:((0,Gu.r)(this.closeOwnPill),this.openPill=e,this.$nextTick(()=>{const t=this.$refs[e+"Input"];t&&t.focus()}))},closePills(e){if(this.openPill){const t=this.$el.querySelectorAll(".list-filter-pill");let i=!1;t.forEach(t=>{t.contains(e.target)&&(i=!0)}),i||(this.openPill=null)}},clearFilter(e){this.filters[e]=null,this.openPill=null,this.filterItems(!0)},onStatusChange(e){this.filters.status=e,this.filterItems(!0)},onLocalCenterChange(e){this.filters.localCenter=e,this.filterItems(!0)},filterItems(e=!1){let t={};t=this.filters.name?{name:this.filters.name}:{...t},t=this.filters.email?{email:this.filters.email}:{...t},t=this.filters.id?{id:this.filters.id}:{...t},t=this.filters.status?{status:this.filters.status}:{...t},t=this.filters.localCenter?{localCenter:this.filters.localCenter,...t}:{...t},t={page:e?1:this.itemsPageCurrent,...t},this.$router.push({name:"ProductSubscribers",params:{item:this.item?.uuid?this.item.uuid:0},query:{...t}})},loadLocalCenters(){return this.$http.plain.get("/local_centers?isActive=1&tenant="+this.tenant.id).then(e=>{this.localCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>console.error(e))},retrieveProduct(){this.isLoading=!0,this.$http.plain.get("/products/"+this.itemId,{}).then(e=>{this.item=e.data,this.item.hasLocalCenterOption&&this.loadLocalCenters(),this.loadItemsPage()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},productShowQuery(e){return e.localCenter?{isLocalSettings:1}:{}},getFiltersQueryString(){if(this.filters.id)return"&id="+this.filters.id;let e="";return this.itemId&&(e+="&product.uuid="+this.itemId),this.filters.status&&(e+="&status="+this.filters.status),this.filters.name&&(e+="&user.fullName="+this.filters.name),this.filters.email&&(e+="&user.email="+this.filters.email),this.item?.localCenter||this.isGranted("FINANCIAL_TENANT")?this.filters.localCenter&&(e+="&localCenter="+this.filters.localCenter):this.isGranted("FINANCIAL_PARENT_LOCAL")&&this.user.localCenterParent?e+="&localCenter="+this.user.localCenterParent.id:e+="&localCenter="+this.user.localCenter.id,"members"===this.filters.user?e+="&exists[member]=true":"external"===this.filters.user&&(e+="&exists[contact]=true"),e},getOrderQueryString(){let e="&order["+this.sortField+"]="+this.sortOrder;return e},changeListPage(e){this.itemsPageCurrent=e,this.loadItemsPage()},loadItemsPage(){this.isLoading=!0;let e=this.getOrderQueryString(),t=this.getFiltersQueryString();this.$http.plain.get("/subscription_profiles?page="+this.itemsPageCurrent+e+t).then(e=>{this.items=e.data["hydra:member"],this.itemsTotal=e.data["hydra:totalItems"],this.itemsPerPage=20,this.isMoreThanOnePage=void 0!==e.data["hydra:view"]["hydra:first"]}
1).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},filterItemsByWord:qn()(function(){this.filterItems()},500),onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.loadItemsPage()},error(e){console.error(e)},subscriberValidatePending(e){return!(!e.identity||"pending"!==e.identity.status)||!(!e.member||!e.member.identity||"pending"!==e.member.identity.status)},subscriberValidated(e){return!(!e.identity||"validated"!==e.identity.status)||!(!e.member||!e.member.identity||"validated"!==e.member.identity.status)},confirmCancelSubscription(e){this.$buefy.dialog.confirm({title:this.$t("unsubscribe"),message:this.$t("Are you sure you want to unsubscribe?"),confirmText:this.$t("Unsubscribe"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>this.cancelSubscription(e)})},cancelSubscription(e){this.isLoading=!0,this.$http.plain.post("/connected/cancel-subscription/"+e).then(e=>{e.data&&this.$buefy.snackbar.open({message:this.$t("Unsubscribed")}),this.retrieveProduct()}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1)}},components:{ListFilterPill:Wu.A}};const zu=(0,Li.A)(ju,[["render",Bu]]);var qu=zu;const Ju={class:"icon is-small"},Hu={class:"tag is-danger is-passive is-rounded unapproved-count"},Ku={class:"icon is-small"},Yu={class:"icon is-small"},Zu={class:"icon is-small"},em={key:0,class:"ml-1"},tm={class:"p-4"},im={class:"icon is-small"},sm={class:"icon is-small"},am={class:"icon is-small"},nm={class:"mb-3"},om={key:0},lm={value:null},rm=["value"],dm={class:"has-text-grey has-text-centered py-1 is-size-7"},cm={class:"has-text-weight-semibold is-size-7 has-text-grey mt-3 mb-2"},um={class:"has-text-weight-semibold is-size-7 has-text-grey mb-2"},mm={class:"has-text-weight-semibold is-size-7 has-text-grey mb-2"},pm={key:4,class:"user-list-filters pb-5"},hm={class:"has-text-grey has-text-centered py-1 is-size-7"},gm={class:"pill-label"},fm={class:"user-list-view-controls"},bm=["aria-label","onClick"],ym={class:"pill-dropdown-header"},vm={class:"pill-dropdown-body"},km=["aria-label"],Cm=["aria-label","aria-pressed"],Lm=["aria-label"],wm=["aria-pressed"],_m=["aria-pressed"],Em=["aria-pressed"],$m={key:5,class:"members-controls mb-5"},Fm={id:"inputSearchMember",key:"inputSearchMember"},Tm={id:"inputAddMember",key:"inputAddMember",class:"input-add-member"},Sm={class:"icon-text"},Am={class:"icon is-small"},Pm={class:"icon-text"},Im={class:"icon is-small"},Mm={key:6,class:"mobile-private-group-list"},xm={class:"mobile-member-content"},Nm={class:"mobile-member-info"},Um=["href","onClick"],Dm={class:"mobile-member-info"},Xm={class:"mobile-member-name"},Vm={key:0,class:"tag is-success is-rounded is-light is-small"},Rm={key:1,class:"tag is-info is-rounded is-light is-small"},Om={class:"button is-white is-rounded is-small"},Qm={class:"icon is-small"},Bm={class:"icon-text"},Gm={class:"icon is-small"},Wm={class:"icon-text"},jm={class:"icon is-small"},zm={key:8,class:"orgo-table-wrap"},qm={class:"icon-text"},Jm={key:0,class:"icon-text"},Hm={key:0,class:"tag is-success is-rounded is-light ml-2"},Km={key:1,class:"tag is-info is-rounded is-light ml-2"},Ym={slot:"toggle",class:"button is-white is-rounded"},Zm={class:"icon is-small"},ep={class:"icon-text"},tp={class:"is-small"},ip={class:"ml-2"},sp={class:"icon-text"},ap={class:"is-small"},np={class:"ml-2"},op={key:0,class:"has-text-centered p-5"},lp={key:1,class:"has-text-centered p-3 mb-3"},rp={key:2,class:"orgo-table-wrap"},dp={key:0,class:"full-member-badge"},cp={key:0},up={key:1},mp={class:"is-flex is-align-items-center"},pp={class:"icon-text"},hp=["href","onClick"],gp={key:1,class:"tag is-info is-rounded is-light is-small ml-2"},fp={key:0,class:"ml-2 is-flex is-align-items-center"},bp=["onClick"],yp={class:"is-small"},vp=["onClick"],kp={class:"is-small"},Cp=["onClick"],Lp=["onClick"],wp=["onClick"],_p={key:0,class:"tag is-rounded"},Ep={key:1,class:"tag is-rounded"},$p={key:1,class:"tag is-rounded"},Fp={key:0,class:"nowrap"},Tp={key:0},Sp={key:1},Ap={key:2},Pp={key:0,class:"tag is-small is-default is-rounded ml-2"},Ip={key:0,class:"tag is-default is-rounded"},Mp={class:"icon is-small"},xp=["onClick"],Np={class:"icon is-small"},Up={class:"icon is-small"},Dp=["onClick"],Xp={class:"icon is-small"},Vp={class:"tag is-rounded is-default is-small"},Rp={key:0},Op={class:"icon is-small"},Qp={key:1},Bp={key:2},Gp=["onClick"],Wp={class:"icon is-small"},jp={class:"icon-text"},zp={class:"icon is-small"},qp={class:"icon-text"},Jp={class:"icon is-small"},Hp={class:"icon-text"},Kp={class:"icon is-small"},Yp={class:"icon-text"},Zp={class:"icon is-small"},eh=["onClick"],th={class:"icon-text"},ih={class:"icon is-small"},sh={key:4,class:"user-cards-grid"},ah={class:"o-user-card"},nh={class:"o-user-card-photo"},oh={class:"o-user-card-body"}
1,lh={key:1,class:"map-view-right"},rh={class:"button is-light is-small is-rounded"},dh={class:"icon is-small"},ch={class:"icon is-small"};function uh(e,t,i,s,a,n){const o=(0,c.g2)("font-awesome-icon"),l=(0,c.g2)("GroupHeader"),r=(0,c.g2)("MobileViewHeader"),d=(0,c.g2)("MobileFilterSheet"),p=(0,c.g2)("b-input"),h=(0,c.g2)("b-field"),g=(0,c.g2)("MobileFilterSection"),f=(0,c.g2)("TownAutocomplete"),b=(0,c.g2)("CountryAutocomplete"),y=(0,c.g2)("b-select"),v=(0,c.g2)("CountyAutocomplete"),k=(0,c.g2)("b-radio"),C=(0,c.g2)("b-datepicker"),L=(0,c.g2)("ProfessionIndustryList"),w=(0,c.g2)("b-checkbox"),_=(0,c.g2)("b-taginput"),E=(0,c.g2)("ListFilterBar"),$=(0,c.g2)("b-tooltip"),F=(0,c.g2)("b-dropdown"),T=(0,c.g2)("UserSearchAutocomplete"),S=(0,c.g2)("b-skeleton"),A=(0,c.g2)("LogoThumbnail"),P=(0,c.g2)("router-link"),I=(0,c.g2)("b-dropdown-item"),M=(0,c.g2)("b-pagination"),x=(0,c.g2)("b-table-column"),N=(0,c.g2)("b-table"),U=(0,c.g2)("UserTypeThumbnail"),D=(0,c.g2)("b-tag"),X=(0,c.g2)("MemberDirectoryCard"),V=(0,c.g2)("UserMap"),R=(0,c.g2)("UserCreateContent"),O=(0,c.g2)("ItemViewModal"),Q=(0,c.g2)("ProfileReferralTab"),B=(0,c.g2)("UserShowContent"),G=(0,c.gN)("safe-html");return e.tenant&&(a.unitItem||a.isGeneralUnitAccess)?((0,c.uX)(),(0,c.CE)("section",{key:0,class:(0,u.C4)(["o-maxwidth",{"is-viewport-locked":n.isViewportLocked,"is-fullscreen-list":a.isFullscreenList}])},[a.unitId||a.isGeneralUnitAccess?((0,c.uX)(),(0,c.Wv)(l,{key:0,modelValue:a.unitItem,"onUpdate:modelValue":t[3]||(t[3]=e=>a.unitItem=e),class:"members-group-header",tab:"members","count-members":a.itemsTotal,"show-title-actions":n.hasHeaderActions},{"title-actions":(0,c.k6)(()=>[n.canRegisterMember?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-primary is-rounded is-small",onClick:t[0]||(t[0]=(...e)=>n.openCreateModal&&n.openCreateModal(...e))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("registerMember")),1)])):(0,c.Q3)("",!0),n.canInviteFriend?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-rounded is-small",onClick:t[1]||(t[1]=(...e)=>n.openInviteModal&&n.openInviteModal(...e))},[(0,c.Lk)("span",Ju,[(0,c.bF)(o,{icon:"fa-light fa-paper-plane"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Invite a friend")),1)])):(0,c.Q3)("",!0),n.hasUnapprovedShortcut?((0,c.uX)(),(0,c.CE)("a",{key:2,class:"pill-trigger",onClick:t[2]||(t[2]=(...e)=>n.loadUnapprovedItems&&n.loadUnapprovedItems(...e))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("unapproved_plural")),1),(0,c.Lk)("span",Hu,(0,u.v_)(a.totalUnapproved),1)])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","count-members","show-title-actions"])):(0,c.Q3)("",!0),!e.$isMobile()||a.isPrivateGroup||n.isRoleGroupAdminList?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(r,{key:1,title:a.itemsTotal?a.itemsTotal+" "+e.$t("members"):e.$t("members"),"no-header-padding":!0,"back-route":a.unitId?{name:"Dashboard"}:null},{actions:(0,c.k6)(()=>[n.canRegisterMember?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-primary is-small is-rounded mr-1",onClick:t[4]||(t[4]=(...e)=>n.openCreateModal&&n.openCreateModal(...e))},[(0,c.Lk)("span",Ku,[(0,c.bF)(o,{icon:"fa-light fa-user-plus"})])])):(0,c.Q3)("",!0),(0,c.Lk)("button",{class:"button is-white is-small is-rounded mr-1",onClick:t[5]||(t[5]=e=>a.mobileViewModeVisible=!0)},[(0,c.Lk)("span",Yu,[(0,c.bF)(o,{icon:a.isMapView?"fa-light fa-map-location-dot":a.isGallery?"fa-light fa-grid-2":"fa-light fa-table-list"},null,8,["icon"])])]),(0,c.Lk)("button",{class:"button is-white is-small is-rounded",onClick:t[6]||(t[6]=e=>a.mobileFilterVisible=!0)},[(0,c.Lk)("span",Zu,[(0,c.bF)(o,{icon:"fa-light fa-sliders"})]),n.mobileFiltersCount>0?((0,c.uX)(),(0,c.CE)("span",em,(0,u.v_)(n.mobileFiltersCount),1)):(0,c.Q3)("",!0)])]),_:1},8,["title","back-route"])),!e.$isMobile()||a.isPrivateGroup||n.isRoleGroupAdminList?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:2,modelValue:a.mobileViewModeVisible,"onUpdate:modelValue":t[10]||(t[10]=e=>a.mobileViewModeVisible=e),title:e.$t("View"),"show-reset":!1},{default:(0,c.k6)(()=>[(0,c.Lk)("div",tm,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-rounded is-fullwidth mb-2",{"is-info":a.isGallery&&!a.isMapView}]),onClick:t[7]||(t[7]=e=>
1{n.setViewMode("gallery"),a.mobileViewModeVisible=!1})},[(0,c.Lk)("span",im,[(0,c.bF)(o,{icon:"fa-light fa-grid-2"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Gallery")),1)],2),(0,c.Lk)("button",{class:(0,u.C4)(["button is-rounded is-fullwidth mb-2",{"is-info":!a.isGallery&&!a.isMapView}]),onClick:t[8]||(t[8]=e=>{n.setViewMode("table"),a.mobileViewModeVisible=!1})},[(0,c.Lk)("span",sm,[(0,c.bF)(o,{icon:"fa-light fa-table-list"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Table")),1)],2),(0,c.Lk)("button",{class:(0,u.C4)(["button is-rounded is-fullwidth",{"is-info":a.isMapView}]),onClick:t[9]||(t[9]=e=>{n.setViewMode("map"),a.mobileViewModeVisible=!1})},[(0,c.Lk)("span",am,[(0,c.bF)(o,{icon:"fa-light fa-map-location-dot"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("map")),1)],2)])]),_:1},8,["modelValue","title"])),!e.$isMobile()||a.isPrivateGroup||n.isRoleGroupAdminList?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:3,modelValue:a.mobileFilterVisible,"onUpdate:modelValue":t[51]||(t[51]=e=>a.mobileFilterVisible=e),title:e.$t("Filters"),onReset:n.removeFilters,onClose:t[52]||(t[52]=e=>n.filterItems(!0))},{default:(0,c.k6)(()=>[(0,c.bF)(g,{title:e.$t("search"),expanded:!0},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.filters.name,"onUpdate:modelValue":t[11]||(t[11]=e=>a.filters.name=e),placeholder:e.$t("Name or Keyword"),rounded:"",expanded:"",size:"is-small"},null,8,["modelValue","placeholder"])]),_:1})]),_:1},8,["title"]),e.tenant.settingFeatures.users.hasCardId?((0,c.uX)(),(0,c.Wv)(g,{key:0,title:e.$t("Card ID")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.filters.cardId,"onUpdate:modelValue":t[12]||(t[12]=e=>a.filters.cardId=e),placeholder:e.$t("Card ID"),rounded:"",expanded:"",size:"is-small"},null,8,["modelValue","placeholder"])]),_:1})]),_:1},8,["title"])):(0,c.Q3)("",!0),a.isRoleGroup||a.isGeneralUnit?((0,c.uX)(),(0,c.Wv)(g,{key:1,title:e.$t("Location")},{default:(0,c.k6)(()=>[(0,c.Lk)("div",nm,[(0,c.bF)(f,{key:"user_list_mobile_filter_town",modelValue:a.filters.town,"onUpdate:modelValue":[t[13]||(t[13]=e=>a.filters.town=e),n.syncTownFilter],label:null,town:a.filters.town&&e.$store.state.filterByTown?e.$store.state.filterByTown:null,placeholder:e.$t("Location"),"is-filter":!0,"is-result-object":!0,"show-map-icon":!0},null,8,["modelValue","town","placeholder","onUpdate:modelValue"])]),n.showsCountryFilter?((0,c.uX)(),(0,c.CE)("div",om,[(0,c.bF)(b,{key:"user_list_mobile_filter_country",modelValue:a.filters.country,"onUpdate:modelValue":[t[14]||(t[14]=e=>a.filters.country=e),n.syncCountryFilter],label:null,country:a.filters.country&&e.$store.state.filterByCountry?e.$store.state.filterByCountry:null,counts:n.countryFilterCounts,placeholder:e.$t("country"),"is-filter":!0,"is-result-object":!0},null,8,["modelValue","country","counts","placeholder","onUpdate:modelValue"])])):(0,c.Q3)("",!0),!e.tenant.isInternational&&n.stateOptions.length>0?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)({"mt-3":n.showsCountryFilter})},[(0,c.bF)(y,{modelValue:a.filters.state,"onUpdate:modelValue":t[15]||(t[15]=e=>a.filters.state=e),placeholder:e.$t("State"),expanded:"",rounded:""},{default:(0,c.k6)(()=>[(0,c.Lk)("option",lm,(0,u.v_)(e.$t("All")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.stateOptions,e=>((0,c.uX)(),(0,c.CE)("option",{key:e,value:e},(0,u.v_)(e),9,rm))),128))]),_:1},8,["modelValue","placeholder"])],2)):(0,c.Q3)("",!0),n.showsCountyFilter?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)({"mt-3":n.stateOptions.length>0||n.showsCountryFilter})},[(0,c.bF)(v,{key:"user_list_mobile_filter_county",modelValue:a.filters.county,"onUpdate:modelValue":[t[16]||(t[16]=e=>a.filters.county=e),n.syncCountyFilter],label:null,country:n.countyScopeCountry,state:a.filters.state,county:a.filters.county&&e.$store.state.filterByCounty?e.$store.state.filterByCounty:null,counts:n.mapCountyPillCounts,placeholder:e.$t("County"),"is-filter":!0,"is-result-object":!0},null,8,["modelValue","country","state","county","counts","placeholder","onUpdate:modelValue"])],2)):(0,c.Q3)("",!0)]),_:1},8,["title"])):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL",a.unitId)&&"LocalCenter"===a.unitDiscriminator||a.isGeneralUnit&&e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.Wv)(g,{key:2,title:e.$t("Status")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[17]||(t[17]=e=>a.filters.status=e),"native-value":""},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All")),1)]),_:1},8,["modelValue"])]),_:1}),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[18]||(t[18]=e=>a.filters.status=e),"native-value":"ACTIVE"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("active")),1)]),_:1},8,["modelValue"])]),_:1}),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[19]||(t[19]=e=>a.filters.status=e),"native-value":"INACTIVE"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("inactive")),1)]),_:1},8,["modelValue"])]),_:1}),e.tenant.settingFeatures.users.hasManualApprove?((0,c.uX)(),(0,c.Wv)(h,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[20]||(t[20]=e=>a.filters.status=e),"native-value":"UNAPPROVED"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("unapproved")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.WAITING_LIST?((0,c.uX)(),(0,c.Wv)(h,{key:1},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[21]||(t[21]=e=>a.filters.status=e),"native-value":"WAITING_LIST"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("waitingList")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.UNREACHABLE?((0,c.uX)(),(0,c.Wv)(h,{key:2},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[22]||(t[22]=e=>a.filters.status=e),"native-value":"UNREACHABLE"},{default:(0,c.k6)(()=>
1[(0,c.eW)((0,u.v_)(e.$t("UNREACHABLE")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.SUSPENDED?((0,c.uX)(),(0,c.Wv)(h,{key:3},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[23]||(t[23]=e=>a.filters.status=e),"native-value":"SUSPENDED"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("suspended")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.status,"onUpdate:modelValue":t[24]||(t[24]=e=>a.filters.status=e),"native-value":"UNCONFIRMED_EMAIL"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("UNCONFIRMED_EMAIL")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["title"])):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL",a.unitId)&&"LocalCenter"===a.unitDiscriminator||a.isGeneralUnit&&e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.Wv)(g,{key:3,title:e.$t("Date joined")},{default:(0,c.k6)(()=>[(0,c.bF)(h,{label:e.$t("From")},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.dateJoinedFrom,"onUpdate:modelValue":t[25]||(t[25]=e=>a.filters.dateJoinedFrom=e),"append-to-body":"",placeholder:e.$t("Select date")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,c.bF)(h,{label:e.$t("Until")},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.dateJoinedTo,"onUpdate:modelValue":t[26]||(t[26]=e=>a.filters.dateJoinedTo=e),"append-to-body":"",placeholder:e.$t("Select date")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["title"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.fees.isActive&&e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.Wv)(g,{key:4,title:e.$t("Fee status")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.feeStatus,"onUpdate:modelValue":t[27]||(t[27]=e=>a.filters.feeStatus=e),"native-value":null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All")),1)]),_:1},8,["modelValue"])]),_:1}),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.feeStatus,"onUpdate:modelValue":t[28]||(t[28]=e=>a.filters.feeStatus=e),"native-value":"paid"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Fee paid")),1)]),_:1},8,["modelValue"])]),_:1}),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.feeStatus,"onUpdate:modelValue":t[29]||(t[29]=e=>a.filters.feeStatus=e),"native-value":"not_paid"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Fee not paid")),1)]),_:1},8,["modelValue"])]),_:1}),e.tenant.settingFeatures.fees.isMandatory&&e.tenant.settingFeatures.fees.autoDeactivateOnFeeExpiry&&e.tenant.settingFeatures.fees.deactivationDelayDays>0?((0,c.uX)(),(0,c.Wv)(h,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.feeStatus,"onUpdate:modelValue":t[30]||(t[30]=e=>a.filters.feeStatus=e),"native-value":"grace_period"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Grace period")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0)]),_:1},8,["title"])):(0,c.Q3)("",!0),n.showsAgeGroup?((0,c.uX)(),(0,c.Wv)(g,{key:5,title:e.$t("age")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.ageGroup,"onUpdate:modelValue":t[31]||(t[31]=e=>a.filters.ageGroup=e),"native-value":null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All")),1)]),_:1},8,["modelValue"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.ageGroupPillOptions,e=>((0,c.uX)(),(0,c.Wv)(h,{key:e.value},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.ageGroup,"onUpdate:modelValue":t[32]||(t[32]=e=>a.filters.ageGroup=e),"native-value":e.value},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.label),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))]),_:1},8,["title"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.isActive&&e.tenant.settingFeatures.professions.hasIndustry?((0,c.uX)(),(0,c.Wv)(g,{key:6,title:e.$t("Profession")},{default:(0,c.k6)(()=>[(0,c.bF)(L,{modelValue:a.filters.professionIndustry,"onUpdate:modelValue":t[33]||(t[33]=e=>a.filters.professionIndustry=e),"init-value":"object"===typeof a.filters.professionIndustry?a.filters.professionIndustry?.id:a.filters.professionIndustry,"display-total":!0,"get-total":!0,"sorted-by-totals-desc":!0,"local-center":a.filters.localCenter||(a.isLocalCenter?a.unitId:0)||0,unit:!a.isLocalCenter&&a.unitId?a.unitId:null,status:a.filters.status,type:"autocomplete"},null,8,["modelValue","init-value","local-center","unit","status"])]),_:1},8,["title"])):(0,c.Q3)("",!0),n.interestCustomField?((0,c.uX)(),(0,c.Wv)(g,{key:7,title:e.$t(n.interestCustomField.name)},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.interestCustomField.fieldOptionsArray,e=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-cf-"+e.key},{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.filters.customField,"onUpdate:modelValue":t[34]||(t[34]=e=>a.filters.customField=e),"native-value":e.key},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.label),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))]),_:1},8,["title"])):(0,c.Q3)("",!0),n.skillsCustomField?((0,c.uX)(),(0,c.Wv)(g,{key:8,title:e.$t(n.skillsCustomField.name)},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(_,{modelValue:n.skillsSelected,"onUpdate:modelValue":t[35]||(t[35]=e=>n.skillsSelected=e),data:n.filteredSkillOptions,field:"label",autocomplete:"",rounded:"","open-on-focus":!0,"allow-new":!1,"close-type":"is-white",placeholder:e.$t(n.skillsCustomField.name),onTyping:t[36]||(t[36]=e=>a.skillsSearch=e)},{empty:(0,c.k6)(()=>
1[(0,c.Lk)("div",dm,(0,u.v_)(e.$t("No options found")),1)]),_:1},8,["modelValue","data","placeholder"])]),_:1})]),_:1},8,["title"])):(0,c.Q3)("",!0),n.hasAvailability?((0,c.uX)(),(0,c.Wv)(g,{key:9,title:e.$t("Availability")},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.weekdayOptions,e=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-avail-"+e.key},{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.filters.availability,"onUpdate:modelValue":t[37]||(t[37]=e=>a.filters.availability=e),"native-value":e.key},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.label),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))]),_:1},8,["title"])):(0,c.Q3)("",!0),(a.isGeneralUnit||a.unitItem&&a.isRoleGroup&&!a.unitItem.localCenter)&&a.localCenters.length>0?((0,c.uX)(),(0,c.Wv)(g,{key:10,title:e.$t("Chapter")},{default:(0,c.k6)(()=>[(0,c.bF)(h,{class:"mb-3"},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.localCenterSearch,"onUpdate:modelValue":t[38]||(t[38]=e=>a.localCenterSearch=e),placeholder:e.$t("Search local center"),rounded:"",expanded:"",size:"is-small",icon:"magnifying-glass","icon-pack":"fa-light"},null,8,["modelValue","placeholder"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.filteredLocalCenters,i=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-lc-"+i.id},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.localCenter,"onUpdate:modelValue":t[39]||(t[39]=e=>a.filters.localCenter=e),"native-value":i.id},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(n.localCenterNameSelector(i,e.tenant)),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))]),_:1},8,["title"])):(0,c.Q3)("",!0),e.isGranted("ADMIN_TENANT")&&(a.isGeneralUnit||a.isLocalCenter)?((0,c.uX)(),(0,c.Wv)(g,{key:11,title:e.$t("Permissions")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.filters.permission,"onUpdate:modelValue":t[40]||(t[40]=e=>a.filters.permission=e),"native-value":"ROLE_ADMIN_TENANT"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("ROLE_ADMIN_TENANT")),1)]),_:1},8,["modelValue"])]),_:1}),n.permissionsByGroup.tenant.length?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("p",cm,(0,u.v_)(e.$t("Organization")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.permissionsByGroup.tenant,i=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-perm-"+i},{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.filters.permission,"onUpdate:modelValue":t[41]||(t[41]=e=>a.filters.permission=e),"native-value":i},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t(i)),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))],64)):(0,c.Q3)("",!0),n.permissionsByGroup.local.length?((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[t[83]||(t[83]=(0,c.Lk)("hr",{class:"my-2"},null,-1)),(0,c.Lk)("p",um,(0,u.v_)(e.$t("Chapter")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.permissionsByGroup.local,i=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-perm-"+i},{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.filters.permission,"onUpdate:modelValue":t[42]||(t[42]=e=>a.filters.permission=e),"native-value":i},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t(i)),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))],64)):(0,c.Q3)("",!0),n.permissionsByGroup.parentLocal.length?((0,c.uX)(),(0,c.CE)(c.FK,{key:2},[t[84]||(t[84]=(0,c.Lk)("hr",{class:"my-2"},null,-1)),(0,c.Lk)("p",mm,(0,u.v_)(e.$t("Regional")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.permissionsByGroup.parentLocal,i=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-perm-"+i},{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.filters.permission,"onUpdate:modelValue":t[43]||(t[43]=e=>a.filters.permission=e),"native-value":i},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t(i)),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024))),128))],64)):(0,c.Q3)("",!0)]),_:1},8,["title"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.fees.isActive&&(a.isGeneralUnit||a.isLocalCenter)&&a.tenantFeePrices&&(e.isGranted("HR_TENANT")||e.isGranted("FINANCIAL_TENANT"))?((0,c.uX)(),(0,c.Wv)(g,{key:12,title:e.$t("Fee type")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.feeType,"onUpdate:modelValue":t[44]||(t[44]=e=>a.filters.feeType=e),"native-value":null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All")),1)]),_:1},8,["modelValue"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.tenantFeePrices.productPrices,i=>((0,c.uX)(),(0,c.CE)(c.FK,null,[i?.id&&!i.isArchived?((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-fee-"+i.id},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.feeType,"onUpdate:modelValue":t[45]||(t[45]=e=>a.filters.feeType=e),"native-value":i.id},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$filters.money(i.price,i.currency))+" - "+(0,u.v_)(i.name),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024)):(0,c.Q3)("",!0)],64))),256))]),_:1},8,["title"])):(0,c.Q3)("",!0),n.canFilterByUserType?((0,c.uX)(),(0,c.Wv)(g,{key:13,title:e.$t("userType")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.userType,"onUpdate:modelValue":t[46]||(t[46]=e=>a.filters.userType=e),"native-value":null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("allUserTypes")),1)]),_:1},8,["modelValue"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.tenant.roles,e=>((0,c.uX)(),(0,c.CE)(c.FK,null,[e.isUserType?((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-ut-"+e.id},{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.userType,"onUpdate:modelValue":t[47]||(t[47]=e=>a.filters.userType=e),"native-value":e.id},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.name),1)]),_:2},1032,["modelValue","native-value"])]),_:2},1024)):(0,c.Q3)("",!0)],64))),256))]),_:1},8,["title"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasFullMembership?((0,c.uX)(),(0,c.Wv)(g,{key:14,title:e.$t("fullMember")},{default:(0,c.k6)(()=>[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.fullMember,"onUpdate:modelValue":t[48]||(t[48]=e=>a.filters.fullMember=e),"native-value":null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("allMembers")),1)]),_:1},8,["modelValue"])]),_:1}),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.fullMember,"onUpdate:modelValue":t[49]||(t[49]=e=>a.filters.fullMember=e),"native-value":"1"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("onlyFullMembers")),1)]),_:1},8,["modelValue"])]),_:1}),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(k,{modelValue:a.filters.fullMember,"onUpdate:modelValue":t[50]||(t[50]=e=>a.filters.fullMember=e),"native-value":"0"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("onlyNotFullMembers")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["title"])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title","onReset"])),a.isPrivateGroup||n.isRoleGroupAdminList||e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",pm,[(0,c.bF)(E,{definitions:n.filterDefinitions,"model-value":a.filters,defaults:n.filterDefaults,"onUpdate:modelValue":n.onFilterBarUpdate,onChange:n.onFilterBarChange,onClear:n.removeFilters},{town:(0,c.k6)(({close:i})=>[(0,c.bF)(f,{key:"user_list_filter_town",modelValue:a.filters.town,"onUpdate:modelValue":[t[53]||(t[53]=e=>a.filters.town=e),e=>{n.syncTownFilter(e),n.onFilterBarChange(),i()}],label:null,town:a.filters.town&&e.$store.state.filterByTown?e.$store.state.filterByTown:null,placeholder:e.$t("Location"),"is-filter":!0,"is-result-object":!0,"show-map-icon":!0},null,8,["modelValue","town","placeholder","onUpdate:modelValue"])]),c
1ountry:(0,c.k6)(({close:i})=>[(0,c.bF)(b,{key:"user_list_filter_country",modelValue:a.filters.country,"onUpdate:modelValue":[t[54]||(t[54]=e=>a.filters.country=e),e=>{n.syncCountryFilter(e),n.onFilterBarChange(),i()}],label:null,country:a.filters.country&&e.$store.state.filterByCountry?e.$store.state.filterByCountry:null,counts:n.countryFilterCounts,placeholder:e.$t("country"),"is-filter":!0,"is-result-object":!0},null,8,["modelValue","country","counts","placeholder","onUpdate:modelValue"])]),county:(0,c.k6)(({close:i})=>[(0,c.bF)(v,{key:"user_list_filter_county",modelValue:a.filters.county,"onUpdate:modelValue":[t[55]||(t[55]=e=>a.filters.county=e),e=>{n.syncCountyFilter(e),n.onFilterBarChange(),i()}],label:null,country:n.countyScopeCountry,state:a.filters.state,county:a.filters.county&&e.$store.state.filterByCounty?e.$store.state.filterByCounty:null,counts:n.mapCountyPillCounts,placeholder:e.$t("County"),"is-filter":!0,"is-result-object":!0},null,8,["modelValue","country","state","county","counts","placeholder","onUpdate:modelValue"])]),professionIndustry:(0,c.k6)(({close:e})=>[(0,c.bF)(L,{modelValue:a.filters.professionIndustry,"onUpdate:modelValue":[t[56]||(t[56]=e=>a.filters.professionIndustry=e),t=>{n.onFilterBarChange(),e()}],"init-value":"object"===typeof a.filters.professionIndustry?a.filters.professionIndustry?.id:a.filters.professionIndustry,"display-total":!0,"get-total":!0,"sorted-by-totals-desc":!0,"local-center":a.filters.localCenter||(a.isLocalCenter?a.unitId:0)||0,unit:!a.isLocalCenter&&a.unitId?a.unitId:null,status:a.filters.status,type:"autocomplete"},null,8,["modelValue","init-value","local-center","unit","status","onUpdate:modelValue"])]),skills:(0,c.k6)(()=>[(0,c.bF)(_,{modelValue:n.skillsSelected,"onUpdate:modelValue":t[57]||(t[57]=e=>n.skillsSelected=e),data:n.filteredSkillOptions,field:"label",autocomplete:"",rounded:"","open-on-focus":!0,"allow-new":!1,size:"is-small","close-type":"is-white",placeholder:e.$t(n.skillsCustomField.name),onTyping:t[58]||(t[58]=e=>a.skillsSearch=e),onAdd:t[59]||(t[59]=e=>n.onFilterBarChange()),onRemove:t[60]||(t[60]=e=>n.onFilterBarChange())},{empty:(0,c.k6)(()=>[(0,c.Lk)("div",hm,(0,u.v_)(e.$t("No options found")),1)]),_:1},8,["modelValue","data","placeholder"])]),_:1},8,["definitions","model-value","defaults","onUpdate:modelValue","onChange","onClear"]),a.selectedCluster?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"pill-trigger user-list-cluster-clear",onClick:t[61]||(t[61]=(...e)=>n.clearClusterSelection&&n.clearClusterSelection(...e))},[(0,c.bF)(o,{icon:"fa-light fa-circle-xmark",class:"pill-icon"}),(0,c.Lk)("span",gm,(0,u.v_)(e.$t("Clear cluster selection")),1)])):(0,c.Q3)("",!0),(0,c.Lk)("div",fm,[!a.isMapView&&n.hasAccessAdvanced&&(e.isGranted("HR_TENANT")||e.isGranted("ADMIN_LOCAL")&&"LocalCenter"===a.unitDiscriminator&&a.unitId===e.user.localCenterId)?((0,c.uX)(),(0,c.Wv)(F,{key:0,"close-on-click":!1,"aria-role":"menu",position:"is-bottom-left",class:"column-picker"},{trigger:(0,c.k6)(({toggle:t})=>[(0,c.bF)($,{label:e.$t("View columns"),position:"is-top",delay:300,animated:""},{default:(0,c.k6)(()=>[(0,c.Lk)("button",{class:"pill-trigger is-icon-only","aria-label":e.$t("View columns"),onClick:t},[(0,c.bF)(o,{icon:"fa-light fa-table",class:"pill-icon"})],8,bm)]),_:2},1032,["label"])]),default:(0,c.k6)(()=>[(0,c.Lk)("div",ym,(0,u.v_)(e.$t("View columns")),1),(0,c.Lk)("div",vm,[(0,c.Lk)("div",{class:"pill-option",onClick:t[63]||(t[63]=(0,m.D$)(()=>{},["stop"]))},[(0,c.bF)(w,{modelValue:a.advancedOptions,"onUpdate:modelValue":t[62]||(t[62]=e=>a.advancedOptions=e),"native-value":"c_groups"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("groups")),1)]),_:1},8,["modelValue"])]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.tenant.customFields,e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:"pill-option",onClick:t[65]||(t[65]=(0,m.D$)(()=>{},["stop"]))},[(0,c.bF)(w,{modelValue:a.advancedOptions,"onUpdate:modelValue":t[64]||(t[64]=e=>a.advancedOptions=e),"native-value":"c_"+e.id},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.name),1)]),_:2},1032,["modelValue","native-value"])]))),128))])]),_:1})):(0,c.Q3)("",!0),!a.isMapView&&n.hasCsvExportAccess?((0,c.uX)(),(0,c.Wv)($,{key:1,label:e.$t("Export CSV"),position:"is-top",delay:300,animated:""},{default:(0,c.k6)(()=>[(0,c.Lk)("button",{key:"filterList",class:(0,u.C4)(["pill-trigger is-icon-only",{"is-loading":a.isLoadingCSV}]),"aria-label":e.$t("Export"),onClick:t[66]||(t[66]=(...e)=>n.csvExportPrompt&&n.csvExportPrompt(...e))},[(0,c.bF)(o,{icon:"fa-light fa-file-excel",class:"pill-icon"})],10,km)]),_:1},8,["label"])):(0,c.Q3)("",!0),a.isMapView||n.showsGallery||a.isFullscreenList?((0,c.uX)(),(0,c.Wv)($,{key:2,label:a.isFullscreenList?e.$t("Exit fullscreen"):e.$t("Fullscreen"),position:"is-top",delay:300,animated:"",class:"is-hidden-mobile"},{default:(0,c.k6)(()=>[(0,c.Lk)("button",{class:"pill-trigger is-icon-only","aria-label":a.isFullscreenList?e.$t("Exit fullscreen"):e.$t("Fullscreen"),"aria-pressed":a.isFullscreenList,onClick:t[67]||(t[67]=(...e)=>n.toggleFullscreenList&&n.toggleFullscreenList(...e))},[(0,c.bF)(o,{icon:a.isFullscreenList?"fa-light fa-compress":"fa-light fa-expand",class:"pill-icon"}
1,null,8,["icon"])],8,Cm)]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.Lk)("div",{class:"orgo-segmented-toggle has-label",role:"group","aria-label":e.$t("View")},[(0,c.Lk)("button",{class:(0,u.C4)(["orgo-segmented-option",{"is-active":!a.isMapView&&!a.isGalleryOnly}]),"aria-pressed":!a.isMapView&&!a.isGalleryOnly,onClick:t[68]||(t[68]=e=>n.setDesktopView("table"))},[(0,c.bF)(o,{icon:"fa-light fa-table-list"}),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Table")),1)],10,wm),(0,c.Lk)("button",{class:(0,u.C4)(["orgo-segmented-option",{"is-active":!a.isMapView&&a.isGalleryOnly}]),"aria-pressed":!a.isMapView&&a.isGalleryOnly,onClick:t[69]||(t[69]=e=>n.setDesktopView("gallery"))},[(0,c.bF)(o,{icon:"fa-light fa-grid-2"}),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Gallery")),1)],10,_m),(0,c.Lk)("button",{class:(0,u.C4)(["orgo-segmented-option",{"is-active":a.isMapView}]),"aria-pressed":a.isMapView,onClick:t[70]||(t[70]=e=>n.setDesktopView("map"))},[(0,c.bF)(o,{icon:"fa-light fa-map-location-dot"}),(0,c.Lk)("span",null,(0,u.v_)(e.$t("map")),1)],10,Em)],8,Lm)])])),a.unitId&&(a.isPrivateGroup||n.isRoleGroupAdminList)?((0,c.uX)(),(0,c.CE)("div",$m,[a.items&&a.items.length>10||a.filters.name?((0,c.uX)(),(0,c.CE)("div",Fm,[(0,c.bF)(p,{modelValue:a.filters.name,"onUpdate:modelValue":t[71]||(t[71]=e=>a.filters.name=e),placeholder:e.$t("search"),class:"input-search-member",size:"is-small",rounded:"",expanded:"",onKeyup:n.filterItemsByWord},null,8,["modelValue","placeholder","onKeyup"])])):(0,c.Q3)("",!0),(0,c.bo)((0,c.Lk)("div",Tm,[(0,c.bF)(T,{"show-local-center-filter-option":!1,size:"is-small","onUpdate:modelValue":t[72]||(t[72]=e=>n.addMember(e))})],512),[[m.aG,e.isCurrentGroupAdmin]]),a.unitItem&&a.unitItem.isJoinable&&!a.unitItem.includesAllMembers?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-small is-rounded is-light",onClick:t[73]||(t[73]=(...e)=>n.copyClipboardJoinLink&&n.copyClipboardJoinLink(...e))},[(0,c.Lk)("span",Sm,[(0,c.Lk)("span",Am,[(0,c.bF)(o,{icon:"fa-light fa-link"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Join group link")),1)])])):(0,c.Q3)("",!0),a.unitItem.isJoinable?((0,c.uX)(),(0,c.CE)("button",{key:"mapView",class:(0,u.C4)(["button is-light is-small is-rounded mr-auto",{"is-focused":a.isMapView}]),onClick:t[74]||(t[74]=(...e)=>n.toggleMapView&&n.toggleMapView(...e))},[(0,c.Lk)("span",Pm,[(0,c.Lk)("span",Im,[(0,c.bF)(o,{icon:"fa-light fa-map-location-dot"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("map")),1)])],2)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),e.$isMobile()&&(a.isPrivateGroup||n.isRoleGroupAdminList)&&!a.items?.length&&a.isLoadingItems&&!a.noResults?((0,c.uX)(),(0,c.CE)("div",Mm,[((0,c.uX)(),(0,c.CE)(c.FK,null,(0,c.pI)(8,e=>(0,c.Lk)("div",{key:"pg-skel-mob-"+e,class:"mobile-member-item"},[(0,c.Lk)("div",xm,[(0,c.bF)(S,{circle:"",width:"40px",height:"40px",animated:""}),(0,c.Lk)("div",Nm,[(0,c.bF)(S,{width:50+e%4*10+"%",height:"14px",animated:""},null,8,["width"]),(0,c.bF)(S,{width:"60px",height:"18px",class:"mt-1",animated:""})])])])),64))])):(0,c.Q3)("",!0),e.$isMobile()&&(a.isPrivateGroup||n.isRoleGroupAdminList)&&a.items?.length>0?((0,c.uX)(),(0,c.CE)("div",{key:7,class:(0,u.C4)(["mobile-private-group-list",{"is-loading-opacity":a.isLoadingItems}])},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.items,(t,i)=>((0,c.uX)(),(0,c.CE)("div",{key:t.id,class:"mobile-member-item"},[t.user?((0,c.uX)(),(0,c.Wv)(P,{key:0,to:{name:"UserShow",params:{item:t.user.id}},custom:""},{default:(0,c.k6)(({href:i})=>[(0,c.Lk)("a",{class:"mobile-member-content",href:i,onClick:(0,m.D$)(e=>n.openUserModal(t.user.id),["exact","prevent"])},[((0,c.uX)(),(0,c.Wv)(A,{key:t.user.id,item:t.user,"is-type":"roundMedium"},null,8,["item"])),(0,c.Lk)("div",Dm,[(0,c.Lk)("span",Xm,(0,u.v_)(t.user.fullName),1),a.unitItem&&a.isPrivateGroup&&a.unitItem.owner?.id===t.user?.id?((0,c.uX)(),(0,c.CE)("span",Vm,(0,u.v_)(e.$t("groupOwner")),1)):t.isAdmin?((0,c.uX)(),(0,c.CE)("span",Rm,(0,u.v_)(e.$t("admin")),1)):(0,c.Q3)("",!0)])],8,Um)]),_:2},1032,["to"])):(0,c.Q3)("",!0),(a.isPrivateGroupAdmin||e.isGranted("ADMIN_TENANT")&&a.unitItem.isJoinable||e.isCurrentGroupAdmin)&&a.unitItem&&(n.isRoleGroupAdminList||a.unitItem.owner?.id!==t.user?.id)?((0,c.uX)(),(0,c.Wv)(F,{key:1,"append-to-body":"","aria-role":"list",position:"is-bottom-left"},{trigger:(0,c.k6)(()=>[(0,c.Lk)("button",Om,[(0,c.Lk)("span",Qm,[(0,c.bF)(o,{icon:"fa-light fa-ellipsis-v"})])])]),default:(0,c.k6)(()=>[(n.isRoleGroupAdminList||e.isCurrentGroupAdmin||e.user.id===a.unitItem.owner?.id||e.isGranted("ADMIN_TENANT")&&a.unitItem.isJoinable)&&e.user.id!==t.user?.id&&t.user?.id!==a.unitItem.owner?.id?((0,c.uX)(),(0,c.Wv)(I,{key:0,"aria-role":"listitem",onClick:e=>n.updateGroupAdmin(t.id,i)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Bm,[(0,c.Lk)("span",Gm,[(0,c.bF)(o,{icon:"fa-light fa-shield-alt"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t(t.isAdmin?"removeGroupAdmin":"addGroupAdmin")),1)])]),_:2},1032,["onClick"])):(0,c.Q3)("",!0),(0,c.bF)(I,{"aria-role":"listitem",onClick:e=>n.confirmDeleteFromGroup(t,i)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Wm,[(0,c.Lk)("span",jm,[(0,c.bF)(o,{icon:"fa-light fa-trash-alt"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("removeFromGroup")),1)])]),_:1},8,["onClick"])]),_:2},1024)):(0,c.Q3)("",!0)]))),128)),a.isMoreThanOnePage?((0,c.uX)(),(0,c.Wv)(M,{key:0,modelValue:a.itemsPageCurrent,"onUpdate:modelValue":t[75]||(t[75]=e=>a.itemsPageCurrent=e),total:a.itemsTotal,"per-page":a.itemsPerPage,rounded:"",onCh
1ange:n.changeListPage},null,8,["modelValue","total","per-page","onChange"])):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),e.$isMobile()||!a.isPrivateGroup&&!n.isRoleGroupAdminList||a.items?.length||!a.isLoadingItems||a.noResults?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",zm,[(0,c.bF)(N,{data:n.pgSkeletonRows,narrowed:!1,hoverable:!0,"mobile-cards":!1,loading:!1},{default:(0,c.k6)(()=>[(0,c.bF)(x,{label:e.$t("member")},{default:(0,c.k6)(e=>[(0,c.Lk)("span",qm,[(0,c.bF)(S,{circle:"",width:"32px",height:"32px",animated:""}),(0,c.bF)(S,{width:120+e.index%4*20+"px",height:"14px",class:"ml-2",animated:""},null,8,["width"])])]),_:1},8,["label"]),(0,c.bF)(x,{label:e.$t("date")},{default:(0,c.k6)(e=>[(0,c.bF)(S,{width:80+e.index%3*10+"px",height:"14px",animated:""},null,8,["width"])]),_:1},8,["label"]),(0,c.bF)(x,{width:"60"},{default:(0,c.k6)(e=>[((0,c.uX)(),(0,c.Wv)(S,{key:e.index,circle:"",width:"32px",height:"32px",animated:""}))]),_:1})]),_:1},8,["data"])])),!e.$isMobile()&&(a.isPrivateGroup||n.isRoleGroupAdminList)&&a.items?.length>0?((0,c.uX)(),(0,c.CE)("div",{key:9,class:(0,u.C4)(["orgo-table-wrap",{"is-skeleton-loading":n.isReloadingTable}])},[(0,c.bF)(N,{"current-page":a.itemsPageCurrent,"onUpdate:currentPage":t[76]||(t[76]=e=>a.itemsPageCurrent=e),data:a.items,loading:a.isLoadingItems&&!n.isReloadingTable,narrowed:!1,"pagination-rounded":"",hoverable:!0,paginated:a.isMoreThanOnePage,"backend-pagination":"","backend-sorting":"",total:a.itemsTotal,"per-page":a.itemsPerPage,"default-sort-direction":a.defaultSortOrder,"default-sort":[a.sortField,a.sortOrder],onPageChange:n.changeListPage,onSort:n.onSort},{default:(0,c.k6)(()=>[(0,c.bF)(x,{label:e.$t("member"),field:"user.lastName",sortable:""},{default:(0,c.k6)(t=>[t.row.user?((0,c.uX)(),(0,c.CE)("span",Jm,[((0,c.uX)(),(0,c.Wv)(A,{key:t.row.user.id,item:t.row.user,"is-type":"roundSmall"},null,8,["item"])),(0,c.bF)(P,{to:{name:"UserShow",params:{item:t.row.user.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(t.row.user.fullName)+" ",1),a.unitItem&&a.isPrivateGroup&&a.unitItem.owner?.id===t.row.user?.id?((0,c.uX)(),(0,c.CE)("span",Hm,(0,u.v_)(e.$t("groupOwner")),1)):(0,c.Q3)("",!0),t.row.isAdmin?((0,c.uX)(),(0,c.CE)("span",Km,(0,u.v_)(e.$t("admin")),1)):(0,c.Q3)("",!0)]),_:2},1032,["to"])])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(x,{label:e.$t("date"),sortable:"",field:"dateCreated"},{default:(0,c.k6)(t=>[(0,c.eW)((0,u.v_)(e.$filters.format(t.row.dateCreated)),1)]),_:1},8,["label"]),(a.isPrivateGroupAdmin||e.isGranted("ADMIN_TENANT")&&a.unitItem.isJoinable||e.isCurrentGroupAdmin)&&a.unitItem?((0,c.uX)(),(0,c.Wv)(x,{key:0},{default:(0,c.k6)(t=>[n.isRoleGroupAdminList||a.unitItem.owner?.id!==t.row.user?.id?((0,c.uX)(),(0,c.Wv)(F,{key:0,hoverable:"","append-to-body":"","aria-role":"list",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:e,toggle:t})=>[(0,c.Lk)("button",Ym,[(0,c.Lk)("span",Zm,[(0,c.bF)(o,{icon:"fa-light fa-ellipsis-h"})])])]),default:(0,c.k6)(()=>[(n.isRoleGroupAdminList||e.isCurrentGroupAdmin||e.user.id===a.unitItem.owner?.id||e.isGranted("ADMIN_TENANT")&&a.unitItem.isJoinable)&&e.user.id!==t.row.user?.id&&t.row.user?.id!==a.unitItem.owner?.id?((0,c.uX)(),(0,c.Wv)(I,{key:0,"aria-role":"listitem",onClick:e=>n.updateGroupAdmin(t.row.id,t.index)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",ep,[(0,c.Lk)("span",tp,[(0,c.bF)(o,{icon:"fa-light fa-shield-alt"})]),(0,c.Lk)("span",ip,(0,u.v_)(e.$t(t.row.isAdmin?"removeGroupAdmin":"addGroupAdmin")),1)])]),_:2},1032,["onClick"])):(0,c.Q3)("",!0),(0,c.bF)(I,{"aria-role":"listitem",onClick:e=>n.confirmDeleteFromGroup(t.row,t.index)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",sp,[(0,c.Lk)("span",ap,[(0,c.bF)(o,{icon:"fa-light fa-trash-alt"})]),(0,c.Lk)("span",np,(0,u.v_)(e.$t("removeFromGroup")),1)])]),_:1},8,["onClick"])]),_:2},1024)):(0,c.Q3)("",!0)]),_:1})):(0,c.Q3)("",!0)]),_:1},8,["current-page","data","loading","paginated","total","per-page","default-sort-direction","default-sort","onPageChange","onSort"])],2)):(0,c.Q3)("",!0),!a.isPrivateGroup||a.unitItem?.isJoinable?((0,c.uX)(),(0,c.CE)("div",{key:10,class:(0,u.C4)(["members-results-region",{"map-view-container":a.isMapView}])},[a.items||a.noResults||a.isLoadingItems||!a.items?((0,c.uX)(),(0,c.CE)("div",{key:0,class:(0,u.C4)(["members-results-column",{"map-view-left":a.isMapView,"is-dimmed":a.isMapView&&(a.isLoadingItems||a.isLoadingRegions)}])},[a.noResults&&!a.isMapView?((0,c.uX)(),(0,c.CE)("div",op,[(0,c.Lk)("p",null,(0,u.v_)(e.$t(n.isRoleGroupAdminList?"No extra admins set up for this group.":"noResultsForYourSearch")),1)])):(0,c.Q3)("",!0),a.noResults&&a.isMapView?((0,c.uX)(),(0,c.CE)("div",lp,[(0,c.Lk)("p",null,(0,u.v_)(e.$t("noResultsForYourSearch")),1)])):(0,c.Q3)("",!0),a.items?.length||!a.isLoadingItems||a.noResults||n.showsGallery||a.isMapView||a.isPrivateGroup||n.isRoleGroupAdminList?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",rp,[(0,c.bF)(N,{data:n.mainSkeletonRows,narrowed:!1,hoverable:!0,"mobile-cards":!1,scrollable:!0,loading:!1},{default:(0,c.k6)(()=>[(0,c.bF)(x,{width:"40"},{default:(0,c.k6)(e=>[((0,c.uX)(),(0,c.Wv)(S,{key:e.index,circle:"",width:"32px",height:"32px",animated:""}))]),_:1}),(0,c.bF)(x,{label:e.$t("name")},{default:(0,c.k6)(e=>[(0,c.bF)(S,{width:60+e.index%4*10+"%",height:"14px",animated:""},null,8,["width"])]),_:1},8,["label"]),(0,c.bF)(x,{label:e.$t("email")},{default:(0,c.k6)(e=>[(0,c.bF)(S,{width:50+e.index%3*15+"%",height:"14px",animated:""},null,8,["width"])]),_:1},8,["label"]),(0,c.bF)(x,{label:e.$t("localCenter")},{default:(0,c.k6)(e=>[(0,c.bF)(S,{width:40+e.index%5*12+"%",height:"14px",animated:""},null,8,["width"])]),_:1},8,["label"]),(0,c.bF)(x,{label:e.$t("status")},{default:(0,c.k6)(e=>[((0,c.uX)(),(0,c.Wv)(S,{key:e.index,width:"80px",height:"24px",animated:""}))]),_:1},8,["label"])]),_:1},8,["data"])])),a.isPrivateGroup||n.isRoleGroupAdminList||!(a.items?.length>0)||n.showsGallery||a.isMapView?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,u.C4)(["orgo-table-wrap",{"is-skeleton-loading":n.isReloadingTable}])},[(0,c.bF)(N,{"current-page":a.itemsPageCurrent,"onUpdate:currentPage":t[77]||(t[77]=e=>a.itemsPageCurrent=e),data:a.items,loading:a.isLoadingItems&&!n.isReloadingTable,narrowed:!1,hoverable:!0,"icon-pack":"fa-light",paginated:a.isMoreThanOnePage,"backend-pagination":"","pagination-rounded":"",total:a.itemsTotal,"per-page":a.itemsPerPage,"mobile-cards":!1,scrollable:!0,"backend-sorting":"","default-sort-direction":a.defaultSortOrder,"default-sort":[a.sortField,a.sortOrder],onPageChange:n.changeListPage,onSort:n.onSort},{default:(0,c.k6)(()=>[e.tenant.settingFeatures.users.hasUserTypes&&e.isGranted(e.tenant.settingFeatures.users.whoCanSeeUserType)?((0,c.uX)(),(0,c.Wv)(x,{key:0,label:e.$t("userType"),field:"type.position",sortable:""},{header:(0,c.k6)(({column:t})=>[(0,c.bF)($,{label:e.$t("userType"),position:"is-right","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("userType").slice(0,1))+". ",1)]),_:1},8,["label"])]),default:(0,c.k6)(e=>
1[((0,c.uX)(),(0,c.Wv)(U,{key:e.row.type&&e.row.type.id?e.row.type.id:"no-type-"+e.row.id,"user-type":e.row.type,"is-small":!0},null,8,["user-type"]))]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasFullMembership?((0,c.uX)(),(0,c.Wv)(x,{key:1,label:e.$t("fullMember"),field:"isFullMember",sortable:"",centered:""},{header:(0,c.k6)(({column:t})=>[(0,c.bF)($,{label:e.$t("fullMember"),position:"is-right","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("fullMember").slice(0,1))+". ",1)]),_:1},8,["label"])]),default:(0,c.k6)(t=>[t.row.isFullMember?((0,c.uX)(),(0,c.CE)("div",dp,[[1,68,256,269,215].includes(e.tenant.id)?((0,c.uX)(),(0,c.CE)("span",cp,"â")):((0,c.uX)(),(0,c.CE)("span",up,[(0,c.bF)(o,{icon:"fa-light fa-crown",class:"is-small"})]))])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(x,{label:e.$t("name"),field:"lastName",sortable:""},{default:(0,c.k6)(i=>[(0,c.Lk)("div",mp,[(0,c.Lk)("span",pp,[((0,c.uX)(),(0,c.Wv)(A,{key:i.row.id,item:i.row,"is-type":"roundSmaller"},null,8,["item"])),(0,c.bF)(P,{to:{name:"UserShow",params:{item:i.row.id}},custom:""},{default:(0,c.k6)(({href:e})=>[(0,c.Lk)("a",{class:"nowrap",href:e,onClick:(0,m.D$)(e=>n.openUserModal(i.row.id),["exact","prevent"])},(0,u.v_)(i.row.fullName),9,hp)]),_:2},1032,["to"]),n.showsAgeGroup&&n.isMinorAge(i.row.age)?((0,c.uX)(),(0,c.Wv)(D,{key:0,size:"is-small",type:"is-warning is-light",rounded:"",class:"ml-2 minor-tag",title:e.$t("Under 18")},{default:(0,c.k6)(()=>[...t[85]||(t[85]=[(0,c.eW)(" <18 ",-1)])]),_:1},8,["title"])):(0,c.Q3)("",!0),n.isUnitAdminRow(i.row)?((0,c.uX)(),(0,c.CE)("span",gp,(0,u.v_)(e.$t("admin")),1)):(0,c.Q3)("",!0)]),"UNAPPROVED"!==i.row.status&&"WAITING_LIST"!==i.row.status||!e.tenant.settingFeatures.users.hasManualApprove||!1===e.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions&&!e.isGranted("HR_TENANT")?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",fp,[(0,c.bF)($,{label:e.$t("approve"),position:"is-top","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.Lk)("button",{onClick:(0,m.D$)(e=>n.changeStatus(i.row.id,"ACTIVE"),["stop"])},[(0,c.Lk)("span",yp,[(0,c.bF)(o,{icon:"fa-light fa-check"})])],8,bp)]),_:2},1032,["label"]),"UNAPPROVED"===i.row.status?((0,c.uX)(),(0,c.Wv)($,{key:0,label:e.$t("addToWaitingList"),position:"is-top",class:"ml-1","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.Lk)("button",{onClick:(0,m.D$)(e=>n.changeStatus(i.row.id,"WAITING_LIST"),["stop"])},[(0,c.Lk)("span",kp,[(0,c.bF)(o,{icon:"fa-light fa-list-alt"})])],8,vp)]),_:2},1032,["label"])):(0,c.Q3)("",!0)]))])]),_:1},8,["label"]),e.tenant.settingFeatures.users.hasListFieldAge&&!a.isRoleGroup&&a.filteredTags&&!a.filteredTags.includes("age")&&e.isGranted("HR_ASSISTANT_LOCAL",a.unitId)?((0,c.uX)(),(0,c.Wv)(x,{key:2,label:e.$t("age"),field:"dateBirth",sortable:""},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.age),1)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasCardId?((0,c.uX)(),(0,c.Wv)(x,{key:3,sortable:"",field:"cardId",label:e.$t("cardId"),visible:a.filteredTags&&!a.filteredTags.includes("cardId")},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.cardId?e.row.cardId.toUpperCase():""),1)]),_:1},8,["label","visible"])):(0,c.Q3)("",!0),a.isRoleGroup||a.isGeneralUnit||a.isLocalCenter?((0,c.uX)(),(0,c.Wv)(x,{key:4,label:e.$t("town"),field:"townCurrent.name",sortable:""},{default:(0,c.k6)(e=>[e.row.townCurrent?.name?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"townLink tag is-rounded",onClick:t=>n.addTownFilter(e.row.townCurrent)},(0,u.v_)(e.row.townCurrent.name),9,Cp)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.isInternational&&(a.isRoleGroup||a.isGeneralUnit||a.isLocalCenter)?((0,c.uX)(),(0,c.Wv)(x,{key:5,label:e.$t("Country"),field:"townCurrent.country.name",sortable:""},{default:(0,c.k6)(e=>[e.row.townCurrent?.country?.name?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"townLink tag is-rounded",onClick:t=>n.addCountryFilter(e.row.townCurrent?.country)},(0,u.v_)(e.row.townCurrent?.country?.name),9,Lp)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),!e.tenant.isInternational&&e.tenant.country&&(a.isRoleGroup||a.isGeneralUnit||a.isLocalCenter)?((0,c.uX)(),(0,c.Wv)(x,{key:6,label:e.$t("County"),field:"townCurrent.county.name",sortable:""},{default:(0,c.k6)(e=>[e.row.townCurrent?.county?.name?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"townLink tag is-rounded",onClick:t=>n.addCountyFilter(e.row.townCurrent?.county)},(0,u.v_)(e.row.townCurrent?.county?.name),9,wp)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.localCenter.isActive&&(a.isRoleGroup||a.isGeneralUnit)?((0,c.uX)(),(0,c.Wv)(x,{key:7,label:e.$t("Chapter"),field:"localCenter.name",sortable:""},{default:(0,c.k6)(t=>[t.row.localCenter&&e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.Wv)(P,{key:0,to:{name:"UserList",query:{unit:t.row.localCenter.id,discriminator:"local_center"}}},{default:(0,c.k6)(()=>[t.row.localCenter.name.length<=40?((0,c.uX)(),(0,c.CE)("span",_p,(0,u.v_)(t.row.localCenter.name),1)):((0,c.uX)(),(0,c.CE)("span",Ep,(0,u.v_)(t.row.localCenter.name.substring(0,40))+"... ",1))]),_:2},1032,["to"])):t.row.localCenter?((0,c.uX)(),(0,c.CE)("span",$p,(0,u.v_)(t.row.localCenter.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),n.isFeeColumnAvailable?((0,c.uX)(),(0,c.Wv)(x,{key:8,label:e.$t("fee"),field:"validFeeDate",sortable:"",visible:a.filteredTags&&!a.filteredTags.includes("fee")},{default:(0,c.k6)(t=>[t.row.isGuest?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",Fp,[(0,c.Lk)("span",{class:(0,u.C4)([t.row.isFeeActive?"is-passive is-success":"is-passive is-danger","tag is-rounded"]),style:{"min-width":"95px"}},[t.row.validFeeDate&&(t.row.companyFeeTenantProductPrice||t.row.feeTenantProductPrice)?.isLifetime?((0,c.uX)(),(0,c.CE)("span",Tp,(0,u.v_)(e.$t("Lifetime")),1)):t.row.validFeeDate?((0,c.uX)(),(0,c.CE)("span",Sp,(0,u.v_)(e.$filters.format(t.row.validFeeDate)),1)):((0,c.uX)(),(0,c.CE)("span",Ap,"-"))],2),(t.row.companyFeeTenantProductPrice||t.row.feeTenantProductPrice)?.id?((0,c.uX)(),(0,c.CE)("span",Pp,(0,u.v_)((t.row.companyFeeTenantProductPrice||t.row.feeTenantProductPrice).name),1)):(0,c.Q3)("",!0)]))]),_:1},8,["label","visible"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.adhesion.isActive&&(a.isGeneralUnit||a.isLocalCenter)&&e.isGranted("HR_LOCAL")?((0,c.uX)(),(0,c.Wv)(x,{key:9,label:e.$t("Adhesion")},{default:(0,c.k6)(t=>[t.row.adhesion&&"duplicated"!==t.row.adhesion.status?((0,c.uX)(),(0,c.CE)("span",Ip,(0,u.v_)(e.$t(e.adhesionStatusLabel(t.row.adhesion.status))),1)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.isGranted("HR_ASSISTANT_LOCAL",a.unitId)&&!a.isRoleGroup?((0,c.uX)(),(0,c.Wv)(x,{key:10,label:"Email",visible:a.filteredTags&&!a.filteredTags.includes("email")},{header:(0,c.k6)(({column:e})=>[(0,c.Lk)("span",Mp,[(0,c.bF)(o,{icon:"fa-light fa-envelope"})])]),default:(0,c.k6)(e=>[e.row.email?((0,c.uX)(),(0,c.Wv)($,{key:0,label:e.row.email,position:"is-left","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.Lk)("a",{onClick:t=>n.copyToClipboardAndSnackbar(e.row.email)},[(0,c.Lk)("span",Np,[(0,c.bF)(o,{icon:"fa-light fa-envelope"})])],8,xp)]),_:2},1032,["label"])):(0,c.Q3)("",!0)]),_:1},8,["visible"])):(0,c.Q3)("",!0),e.isGranted("HR_ASSISTANT_LOCAL",a.unitId)&&!a.isRoleGroup?((0,c.uX)(),(0,c.Wv)(x,{key:11,label:e.$t("phone"),visible:a.filteredTags&&!a.filteredTags.includes("phone")},{header:(0,c.k6)(({column:e})=>[(0,c.Lk)("span",Up,[(0,c.bF)(o,{icon:"fa-light fa-phone"})])]),default:(0,c.k6)(e=>[e.row.phoneNumber?((0,c.uX)(),(0,c.Wv)($,{key:0,label:e.row.phoneNumber,position:"is-left","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.Lk)("a",{onClick:t=>n.copyToClipboardAndSnackbar(e.row.phoneNumber)},[(0,c.Lk)("span",Xp,[(0,c.bF)(o,{icon:"fa-light fa-phone"})])],8,Dp)]),_:2},1032,["label"])):(0,c.Q3)("",!0)]),_:1},8,["label","visible"])):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL")&&!a.filters.status?((0,c.uX)(),(0,c.Wv)(x,{key:12,label:e.$t("status"),field:"status",sortable:""},{default:(0,c.k6)(t=>[(0,c.Lk)("span",Vp,(0,u.v_)(e.$t(t.row.status.toLowerCase())),1)]),_:1},8,["label"])):(0,c.Q3)("",!0),"LocalCenter"===a.unitDiscriminator&&e.isGranted("HR_LOCAL")?((0,c.uX)(),(0,c.Wv)(x,{key:13,label:e.$t("groups"),class:"maxWidthColum",visible:a.advancedOptions&&a.advancedOptions.includes("c_groups")},{default:(0,c.k6)(t=>[a.unitItem&&a.unitItem.localUnits&&a.unitItem.localUnits.find(t=>
1t.id===parseInt(e.localUnitId))?((0,c.uX)(!0),(0,c.CE)(c.FK,{key:0},(0,c.pI)(t.row.roleGroups,e=>((0,c.uX)(),(0,c.CE)("span",{key:e,class:"tag is-default is-rounded mr-1"},[(0,c.bF)(P,{to:{name:"UserList",query:{unit:e}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(n.localUnit(e)),1)]),_:2},1032,["to"])]))),128)):(0,c.Q3)("",!0)]),_:1},8,["label","visible"])):(0,c.Q3)("",!0),a.isGeneralUnit&&e.isGranted("HR_TENANT")&&e.tenant.roleGroups?((0,c.uX)(),(0,c.Wv)(x,{key:14,label:e.$t("groups"),class:"maxWidthColum",visible:a.advancedOptions&&a.advancedOptions.includes("c_groups")},{default:(0,c.k6)(t=>[e.tenant.roleGroups.find(t=>t.id===parseInt(e.uid))?((0,c.uX)(!0),(0,c.CE)(c.FK,{key:0},(0,c.pI)(t.row.roleGroups,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-default is-rounded mr-1"},[(0,c.bF)(P,{to:{name:"UserList",query:{unit:t}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.tenant.roleGroups.find(e=>e.id===parseInt(t)).name),1)]),_:2},1032,["to"])]))),128)):(0,c.Q3)("",!0)]),_:1},8,["label","visible"])):(0,c.Q3)("",!0),(0,c.bF)(x,{label:e.$t("dateJoined"),visible:n.isAdvancedOption("dateJoined"),field:"dateJoined",sortable:""},{default:(0,c.k6)(t=>[(0,c.eW)((0,u.v_)(e.$filters.format(t.row.dateJoined)),1)]),_:1},8,["label","visible"]),e.isGranted("HR_TENANT")||e.isGranted("ADMIN_LOCAL")&&"LocalCenter"===a.unitDiscriminator&&a.unitId===e.user.localCenterId?((0,c.uX)(!0),(0,c.CE)(c.FK,{key:15},(0,c.pI)(e.tenant.customFields,e=>((0,c.uX)(),(0,c.Wv)(x,{key:"custom_"+e.id,label:e.name,visible:n.isAdvancedOption("c_"+e.id)},{default:(0,c.k6)(t=>["boolean"===e.fieldType&&n.customFieldValue(t.row,e)?((0,c.uX)(),(0,c.CE)("span",Rp,[(0,c.Lk)("span",Op,[(0,c.bF)(o,{icon:"fa-light fa-check is-success"})])])):"checkboxes"===e.fieldType?(0,c.bo)(((0,c.uX)(),(0,c.CE)("span",Qp,null,512)),[[G,n.customFieldValue(t.row,e)]]):((0,c.uX)(),(0,c.CE)("span",Bp,(0,u.v_)(n.customFieldValue(t.row,e)),1))]),_:2},1032,["label","visible"]))),128)):(0,c.Q3)("",!0),e.isGranted("HR_TENANT")||e.isGranted("HR_LOCAL")&&["LocalCenter","Unit"].includes(a.unitDiscriminator)&&!a.isRoleGroup||["Group"].includes(a.unitDiscriminator)&&a.unitItem&&a.unitItem.owner&&a.unitItem.owner.id===e.user.id||n.canToggleUnitAdmin?((0,c.uX)(),(0,c.Wv)(x,{key:16},{default:(0,c.k6)(t=>[(0,c.bF)(F,{hoverable:"","aria-role":"list","append-to-body":"",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:e,toggle:t})=>[(0,c.Lk)("button",{class:"button is-white is-small",onClick:t},[(0,c.Lk)("span",Wp,[(0,c.bF)(o,{icon:"fa-light fa-ellipsis-v"})])],8,Gp)]),default:(0,c.k6)(()=>[(0,c.bF)(I,{"aria-role":"listitem","is-clickable":""},{default:(0,c.k6)(()=>[(0,c.bF)(P,{to:{name:"UserShow",params:{item:t.row.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",jp,[(0,c.Lk)("span",zp,[(0,c.bF)(o,{icon:"fa-light fa-eye"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("viewProfile")),1)])]),_:1},8,["to"])]),_:2},1024),e.isGranted("ADMIN_LOCAL")&&(!1!==e.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions||e.isGranted("HR_TENANT"))?((0,c.uX)(),(0,c.Wv)(I,{key:0,"aria-role":"listitem","is-clickable":""},{default:(0,c.k6)(()=>[(0,c.bF)(P,{to:{name:"UserUpdate",params:{item:t.row.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",qp,[(0,c.Lk)("span",Jp,[(0,c.bF)(o,{icon:"fa-light fa-pencil-alt"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("modifyProfile")),1)])]),_:1},8,["to"])]),_:2},1024)):(0,c.Q3)("",!0),e.isGranted("ADMIN_LOCAL")&&(!1!==e.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions||e.isGranted("HR_TENANT"))?((0,c.uX)(),(0,c.Wv)(I,{key:1,"aria-role":"listitem","is-clickable":""},{default:(0,c.k6)(()=>[(0,c.bF)(P,{to:{name:"UserUpdate",params:{item:t.row.id,tab:"roles"},query:{tab:"roles"}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Hp,[(0,c.Lk)("span",Kp,[(0,c.bF)(o,{icon:"fa-light fa-user-tag"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("modifyRoles")),1)])]),_:1},8,["to"])]),_:2},1024)):(0,c.Q3)("",!0),n.canToggleUnitAdmin&&t.row.id!==e.user.id&&a.unitUserRoles[t.row.id]?((0,c.uX)(),(0,c.Wv)(I,{key:2,"aria-role":"listitem",onClick:e=>n.toggleUnitAdmin(t.row)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Yp,[(0,c.Lk)("span",Zp,[(0,c.bF)(o,{icon:"fa-light fa-shield-alt"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t(n.isUnitAdminRow(t.row)?"removeUnitAdmin":"makeUnitAdmin")),1)])]),_:2}
1,1032,["onClick"])):(0,c.Q3)("",!0),"UNAPPROVED"!==t.row.status&&"WAITING_LIST"!==t.row.status||!e.tenant.settingFeatures.users.hasManualApprove||!1===e.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions&&!e.isGranted("HR_TENANT")?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(I,{key:3,"aria-role":"listitem","is-clickable":""},{default:(0,c.k6)(()=>[(0,c.Lk)("a",{onClick:e=>n.confirmDeleteUser(t.row,t.index)},[(0,c.Lk)("span",th,[(0,c.Lk)("span",ih,[(0,c.bF)(o,{icon:"fa-light fa-trash"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("user.deleteAccount")),1)])],8,eh)]),_:2},1024))]),_:2},1024)]),_:1})):(0,c.Q3)("",!0)]),_:1},8,["current-page","data","loading","paginated","total","per-page","default-sort-direction","default-sort","onPageChange","onSort"])],2)),!a.items&&!a.isLoadingItems&&a.items||!n.showsGallery&&!a.isMapView||n.isRoleGroupAdminList||a.isPrivateGroup?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",sh,[a.isLoadingItems||!a.items?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},(0,c.pI)(12,e=>(0,c.Lk)("div",{key:"skeleton-"+e,class:"user-grid-cell"},[(0,c.Lk)("div",ah,[(0,c.Lk)("div",nh,[(0,c.bF)(S,{width:"100%",height:"100%",rounded:!1})]),(0,c.Lk)("div",oh,[(0,c.bF)(S,{width:"65%"}),(0,c.bF)(S,{width:"45%",class:"mt-2"}),(0,c.bF)(S,{width:"85%",class:"mt-2"})])])])),64)):(0,c.Q3)("",!0),a.isLoadingItems?(0,c.Q3)("",!0):((0,c.uX)(!0),(0,c.CE)(c.FK,{key:1},(0,c.pI)(a.items,e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:"user-grid-cell"},[(0,c.bF)(P,{to:{name:"UserShow",params:{item:e.id}},custom:""},{default:(0,c.k6)(({href:t})=>[(0,c.bF)(X,{member:e,href:t,"shows-minor-tag":n.showsAgeGroup,class:"is-clickable",onOpen:t=>n.openUserModal(e.id)},null,8,["member","href","shows-minor-tag","onOpen"])]),_:2},1032,["to"])]))),128))])),a.items?((0,c.uX)(),(0,c.CE)("div",{key:5,class:(0,u.C4)(["members-pagination",{"pagination-sticky-bottom":a.isMapView&&e.$isMobile()}])},[!a.isMoreThanOnePage||!n.showsGallery&&!a.isMapView||a.isPrivateGroup||n.isRoleGroupAdminList?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(M,{key:0,modelValue:a.itemsPageCurrent,"onUpdate:modelValue":t[78]||(t[78]=e=>a.itemsPageCurrent=e),total:a.itemsTotal,"per-page":a.itemsPerPage,rounded:"",onChange:n.changeListPage},null,8,["modelValue","total","per-page","onChange"]))],2)):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),a.isMapView?((0,c.uX)(),(0,c.CE)("div",lh,[((0,c.uX)(),(0,c.Wv)(V,{key:n.mapKey,ref:"userMap","is-map-view":a.isMapView,items:a.mapItems,"selected-cluster":a.selectedCluster,loading:a.isLoadingMap||a.isLoadingRegions,"is-pagination-change":a.isPaginationChange,"fill-height":n.isViewportLocked,level:n.mapLevel,regions:a.mapRegions,"region-geo-json":a.mapRegionGeoJson,"region-bounds":a.mapRegionBounds,"back-label":n.mapBackLabel,onBoundsChanged:n.handleMapBoundsChanged,onClusterClicked:n.handleClusterClick,onRegionClicked:n.handleRegionClicked,onRegionBack:n.handleRegionBack,onRegionsUnmatched:n.handleRegionsUnmatched,onFittingBounds:n.handleFittingBounds,onClearSelection:n.clearClusterSelection,onMarkerHover:n.handleMarkerHover,onMarkerLeave:n.handleMarkerLeave},{"hover-preview":(0,c.k6)(()=>[e.hoveredRecord?((0,c.uX)(),(0,c.Wv)(X,{key:0,member:e.hoveredRecord,class:"member-hover-card"},null,8,["member"])):(0,c.Q3)("",!0)]),_:1},8,["is-map-view","items","selected-cluster","loading","is-pagination-change","fill-height","level","regions","region-geo-json","region-bounds","back-label","onBoundsChanged","onClusterClicked","onRegionClicked","onRegionBack","onRegionsUnmatched","onFittingBounds","onClearSelection","onMarkerHover","onMarkerLeave"]))])):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),(0,c.bF)(O,{modelValue:a.isCreateModalVisible,"onUpdate:modelValue":t[79]||(t[79]=e=>a.isCreateModalVisible=e),title:e.$t("registerMember"),"modal-width":800,"scroll-container-id":"userCreateModalBody",onClose:n.closeCreateModal},{default:(0,c.k6)(()=>[a.isCreateModalVisible?((0,c.uX)(),(0,c.Wv)(R,{key:0,"is-local-center":a.unitId?1:0,"is-general-unit":a.isGeneralUnit?1:0,onCreated:n.handleUserCreated,onCancel:n.closeCreateModal},null,8,["is-local-center","is-general-unit","onCreated","onCancel"])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title","onClose"]),(0,c.bF)(O,{modelValue:a.isInviteModalVisible,"onUpdate:modelValue":t[80]||(t[80]=e=>a.isInviteModalVisible=e),title:e.$t("Invite a friend"),"modal-width":900,"scroll-container-id":"userInviteModalBody",onClose:n.closeInviteModal},{default:(0,c.k6)(()=>[a.isInviteModalVisible?((0,c.uX)(),(0,c.Wv)(Q,{key:0,"only-invitations":!0})):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title","onClose"]),(0,c.bF)(O,{modelValue:a.isUserModalVisible,"onUpdate:modelValue":t[82]||(t[82]=e=>a.isUserModalVisible=e),title:a.selectedUser?e.$t("Profile"):"","modal
1-width":1100,"maximize-route":a.selectedUserId?{name:"UserShow",params:{item:a.selectedUserId}}:null,"scroll-container-id":"userModalBody",onClose:n.closeUserModal},{actions:(0,c.k6)(()=>[e.isGranted("ROLE_SUPER_ADMIN")&&a.selectedUser&&a.selectedUser.id!==e.user.id?((0,c.uX)(),(0,c.Wv)($,{key:0,class:"is-hidden-tablet mr-2",label:`Impersonate as ${a.selectedUser.fullName}`,position:"is-left","append-to-body":""},{default:(0,c.k6)(()=>[(0,c.Lk)("a",{class:(0,u.C4)({"is-loading":e.$store.state.isLoadingButton}),onClick:t[81]||(t[81]=(...e)=>n.triggerImpersonate&&n.triggerImpersonate(...e))},[(0,c.Lk)("button",rh,[(0,c.Lk)("span",dh,[(0,c.bF)(o,{icon:"fa-light fa-arrows-repeat"})])])],2)]),_:1},8,["label"])):(0,c.Q3)("",!0),a.selectedUser&&(a.selectedUser.id===e.user.id||e.isGranted("HR_LOCAL",a.selectedUser.localCenter))?((0,c.uX)(),(0,c.Wv)(P,{key:1,to:{name:"UserUpdate",params:{item:a.selectedUser.id}},class:"button is-small is-light is-rounded is-hidden-tablet"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",ch,[(0,c.bF)(o,{icon:"fa-light fa-pen"})])]),_:1},8,["to"])):(0,c.Q3)("",!0)]),default:(0,c.k6)(()=>[a.selectedUserId?((0,c.uX)(),(0,c.Wv)(B,{key:0,ref:"userShowContent","user-id":a.selectedUserId,onLoaded:n.handleUserLoaded,onRefresh:n.handleUserRefresh},null,8,["user-id","onLoaded","onRefresh"])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title","maximize-route","onClose"])],2)):(0,c.Q3)("",!0)}i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);function mh(e){const t={};for(const i of e||[]){let e=i.user&&i.user.id;e||"string"!==typeof i.user||(e=parseInt(i.user.split("/").pop())),e&&(t[e]||(t[e]=[]),t[e].push({id:i.id,isAdmin:!!i.isAdmin}))}return t}function ph(e){if(!e||!e.length)return[];const t=e.filter(e=>e.isAdmin);return t.length?t:[e[0]]}var hh=i(41891),gh=i(58511),fh=i(41183),bh=i(94335),yh=i(68866),vh=i(93231),kh=i(95439),Ch=i(36401),Lh=i(78348),wh=i(57027),_h=i(20875),Eh=i(9906),$h=i(17048),Fh=i(6720);const Th={class:"columns"},Sh={class:"column"},Ah={class:"columns"},Ph={class:"column"},Ih={class:"column"},Mh={class:"is-size-7 mb-3"},xh={key:0,class:"mt-5"},Nh={key:1,class:"mt-5"},Uh={value:"MEMBER"},Dh={value:"PRIMARY_CONTACT"},Xh={key:2,class:"mt-5"},Vh=["value"],Rh={class:"field has-addons mt-3"},Oh={class:"control"},Qh={class:"control is-expanded"},Bh={class:"card pr-5 pl-5 pt-1 pb-5 mb-6"},Gh={key:1,class:"is-size-7 mb-4 has-text-grey"},Wh={key:4,class:"is-size-7 mb-5 has-text-grey"},jh={class:"card-header"},zh={class:"card-header-title p-0 ml-4 py-3"},qh={class:"card-header-icon p-0 mr-4"},Jh={class:"card-content pt-0 mt-3"},Hh={class:"is-flex is-justify-content-flex-end mb-4"},Kh={href:"https://docs.orgo.space/platform/permissions",target:"_blank",class:"has-text-weight-normal is-size-7"},Yh={key:0,class:"mb-5"},Zh={class:"has-text-weight-semibold mb-2"},eg={key:0,class:"mb-4"},tg={key:0,class:"has-text-weight-semibold mb-4 mt-2"},ig={key:1,class:"has-text-weight-semibold mb-4 mt-2"},sg={key:2,class:"has-text-weight-semibold mb-4 mt-2"},ag={key:3},ng={class:"card-header"},og={class:"card-header-title p-0 ml-4 py-3"},lg={class:"card-header-icon p-0 mr-4"},rg={class:"card-content pt-0 mt-3"},dg={key:0},cg={class:"has-text-weight-semibold mb-4"},ug={key:1},mg={key:0},pg={class:"has-text-weight-semibold mb-4"},hg={class:"mt-6"},gg=["disabled"];function fg(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("b-input"),r=(0,c.g2)("b-field"),d=(0,c.g2)("LocalCenterSelect"),p=(0,c.g2)("CompanyAutocomplete"),h=(0,c.g2)("b-select"),g=(0,c.g2)("PhoneCountryPrefixSelect"),f=(0,c.g2)("BirthdaySelect"),b=(0,c.g2)("b-radio"),y=(0,c.g2)("TownAutocomplete"),v=(0,c.g2)("font-awesome-icon"),k=(0,c.g2)("b-switch"),C=(0,c.g2)("b-checkbox"),L=(0,c.g2)("b-collapse");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("form",{onSubmit:t[26]||(t[26]=(0,m.D$)((...e)=>n.save&&n.save(...e),["prevent"]))},[(0,c.Lk)("div",Th,[(0,c.Lk)("div",Sh,[(0,c.Lk)("div",Ah,[(0,c.Lk)("div",Ph,[n.isProfileField("first_name")?((0,c.uX)(),(0,c.Wv)(r,{key:0,label:e.$t("firstName"),class:(0,u.C4)(n.isMandatoryField("first_name")?"required":"")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{ref:"firstNameInput",modelValue:a.item.firstName,"onUpdate:modelValue":t[1]||(t[1]=e=>a.item.firstName=e),required:n.isMandatoryField("first_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",Ih,[n.isProfileField("last_name")?((0,c.uX)(),(0,c.Wv)(r,{key:0,label:e.$t("lastName"),class:(0,u.C4)(n.isMandatoryField("last_name")?"required":"")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.item.lastName,"onUpdate:modelValue":t[2]||(t[2]=e=>a.item.lastName=e),required:n.isMandatoryField("last_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)])]),(0,c.bF)(r,{label:"Email ("+e.$t("optional")+")",class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.item.email,"onUpdate:modelValue":t[3]||(t[3]=e=>a.item.email=e),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.Lk)("p",Mh,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Enables the possibility for the user to login"))+". "+(0,u.v_)(e.$t("User will login
1with email code and can set their own password"))+".",1)]),e.tenant.settingFeatures.localCenter.isActive&&(e.isGranted("HR_TENANT")||i.isLocalCenter)?((0,c.uX)(),(0,c.CE)("div",xh,[i.isLocalCenter&&n.currentUserLocalCenter?((0,c.uX)(),(0,c.Wv)(r,{key:0,label:e.$t("Chapter")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{"model-value":n.currentUserLocalCenter.name,disabled:""},null,8,["model-value"])]),_:1},8,["label"])):((0,c.uX)(),(0,c.Wv)(d,{key:1,modelValue:a.item.localCenter,"onUpdate:modelValue":t[4]||(t[4]=e=>a.item.localCenter=e),label:e.$t("Chapter"),"auto-load":!0,"use-autocomplete":!0,"filter-by-permission":!0,onSelect:n.onLocalCenterSelect},null,8,["modelValue","label","onSelect"]))])):(0,c.Q3)("",!0),n.canAssignCompany?((0,c.uX)(),(0,c.CE)("div",Nh,[e.isGranted("ADMIN_TENANT")?((0,c.uX)(),(0,c.Wv)(p,{key:1,modelValue:a.selectedCompany,"onUpdate:modelValue":t[5]||(t[5]=e=>a.selectedCompany=e),label:e.$t("Company")},null,8,["modelValue","label"])):((0,c.uX)(),(0,c.Wv)(r,{key:0,label:e.$t("Company")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{"model-value":n.currentUserCompany.name,disabled:""},null,8,["model-value"])]),_:1},8,["label"])),a.selectedCompany?((0,c.uX)(),(0,c.Wv)(r,{key:2,label:e.$t("Company role"),class:"mt-3"},{default:(0,c.k6)(()=>[(0,c.bF)(h,{modelValue:a.companyRole,"onUpdate:modelValue":t[6]||(t[6]=e=>a.companyRole=e),expanded:""},{default:(0,c.k6)(()=>[(0,c.Lk)("option",Uh,(0,u.v_)(e.$t("Member")),1),(0,c.Lk)("option",Dh,(0,u.v_)(e.$t("Primary Contact")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasUserTypes&&n.roles?((0,c.uX)(),(0,c.CE)("div",Xh,[(0,c.bF)(r,{label:e.$t("userType")},{default:(0,c.k6)(()=>[(0,c.bF)(h,{modelValue:a.userTypeSelected,"onUpdate:modelValue":t[7]||(t[7]=e=>a.userTypeSelected=e)},{default:(0,c.k6)(()=>[t[27]||(t[27]=(0,c.Lk)("option",{value:null},"...",-1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.roles,e=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[e.isUserType?((0,c.uX)(),(0,c.CE)("option",{key:0,value:e.id},(0,u.v_)(e.name),9,Vh)):(0,c.Q3)("",!0)],64))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])])):(0,c.Q3)("",!0),n.isProfileField("phoneNumber")?((0,c.uX)(),(0,c.Wv)(r,{key:3,class:(0,u.C4)(["mt-5 mb-5",n.isMandatoryField("phoneNumber")?"required":""]),label:e.$t("phoneNumber")},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Rh,[(0,c.Lk)("div",Oh,[(0,c.bF)(g,{modelValue:a.item.phoneCountry,"onUpdate:modelValue":[t[8]||(t[8]=e=>a.item.phoneCountry=e),t[9]||(t[9]=e=>a.item.phoneNumber=null)],placeholder:e.$t("Prefix"),"is-required":n.isMandatoryField("phoneNumber")},null,8,["modelValue","placeholder","is-required"])]),(0,c.Lk)("div",Qh,[(0,c.bF)(l,{modelValue:a.item.phoneLocalNumber,"onUpdate:modelValue":t[10]||(t[10]=e=>a.item.phoneLocalNumber=e),type:"tel",disabled:!a.item.phoneCountry,required:n.isMandatoryField("phoneNumber"),placeholder:n.getPhonePlaceholder},null,8,["modelValue","disabled","required","placeholder"])])])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),(0,c.bF)(r,{class:"mt-5"},{default:(0,c.k6)(()=>[n.isProfileField("birthday")?((0,c.uX)(),(0,c.Wv)(f,{key:0,modelValue:a.item.dateBirth,"onUpdate:modelValue":t[11]||(t[11]=e=>a.item.dateBirth=e),user:a.item,"is-required":n.isMandatoryField("birthday")},null,8,["modelValue","user","is-required"])):(0,c.Q3)("",!0)]),_:1}),n.isProfileField("gender")?((0,c.uX)(),(0,c.Wv)(r,{key:4,grouped:"",label:e.$t("gender"),class:(0,u.C4)(["mt-4 mb-4",n.isMandatoryField("gender")?"required":""]),style:{padding:"12px 0"}},{default:(0,c.k6)(()=>[(0,c.bF)(b,{modelValue:a.item.gender,"onUpdate:modelValue":t[12]||(t[12]=e=>a.item.gender=e),"native-value":"f",name:"gender",class:"mt-2",required:n.isMandatoryField("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("female")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(b,{modelValue:a.item.gender,"onUpdate:modelValue":t[13]||(t[13]=e=>a.item.gender=e),"native-value":"m",name:"gender",class:"mt-2 ml-3",required:n.isMandatoryField("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("male")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(b,{modelValue:a.item.gender,"onUpdate:modelValue":t[14]||(t[14]=e=>a.item.gender=e),"native-value":"n",name:"gender",class:"mt-2 ml-3",required:n.isMandatoryField("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Other gender")),1)]),_:1},8,["modelValue","required"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),(0,c.Lk)("div",Bh,[n.isProfileField("town_current")?((0,c.uX)(),(0,c.Wv)(y,{key:0,modelValue:a.item.townCurrent,"onUpdate:modelValue":[t[15]||(t[15]=e=>a.item.townCurrent=e),t[16]||(t[16]=e=>a.item.townCurrent=e)],label:e.$t("townCurrent"),town:a.item.townCurrent,class:"mt-5","is-result-object":!0,"is-required":n.isMandatoryField("town_current")},null,8,["modelValue","label","town","is-required"])):(0,c.Q3)("",!0),n.isProfileField("town_current")||n.isProfileField("town_from")?((0,c.uX)(),(0,c.CE)("p",Gh,(0,u.v_)(e.$t("townAutocompleteExplanation")),1)):(0,c.Q3)("",!0),n.isProfileField("town_current")&&a.item.townCurrent&&a.item.townCurrent.country&&a.item.townCurrent.country.name?((0,c.uX)(),(0,c.Wv)(r,{key:2,label:e.$t("Country of residence")+": "+a.item.townCurrent.country.name,class:"mt-5"},null,8,["label"])):n.isProfileField("town_current")&&a.item.townCurrent&&a.item.townCurrent.country?((0,c.uX)(),(0,c.Wv)(r,{key:3,label:e.$t("Country of residence")+": "+n.countryName(a.item.townCurrent.country),class:"mt-5"},null,8,["label"])):(0,c.Q3)("",!0),n.isProfileField("town_current")?((0,c.uX)(),(0,c.CE)("p",Wh,(0,u.v_)(e.$t("Country is set automatically based on selected town of residence")),1)):(0,c.Q3)("",!0),n.isProfileField("town_from")?((0,c.uX)(),(0,c.Wv)(y,{key:5,modelValue:a.item.townFrom,"onUpdate:modelValue":t[17]||(t[17]=e=>a.item.townFrom=e),label:e.$t("townFrom"),town:a.item.townFrom,"is-result-object":!0,class:"mt-5 mb-5","is-required":n.isMandatoryField("town_from")},null,8,["modelValue","label","town","is-required"])):(0,c.Q3)("",!0)]),n.isProfileField("address")?((0,c.uX)(),(0,c.Wv)(r,{key:5,label:e.$t("Address"),class:(0,u.C4)(n.isMandatoryField("address")?"required":""),placeholder:e.$t("Address")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.item.address,"onUpdate:modelValue":t[18]||(t[18]=e=>a.item.address=e)},null,8,["modelValue"])]),_:1},8,["label","class","placeholder"])):(0,c.Q3)("",!0),n.isProfileField("postal_code")?((0,c.uX)(),(0,c.Wv)(r,{key:6,label:e.$t("Postal code"),class:(0,u.C4)(n.isMandatoryField("postal_code")?"required":""),placeholder:e.$t("Postal code")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.item.postalCode,"onUpdate:modelValue":t[19]||(t[19]=e=>a.item.postalCode=e)},null,8,["modelValue"])]),_:1},8,["label","class","placeholder"])):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL")?((0,c.uX)(),(0,c.Wv)(L,{key:7,modelValue:a.showPermissions,"onUpdate:modelValue":t[22]||(t[22]=e=>a.showPermissions=e),class:"card mt-5",animation:"slide"},{trigger:(0,c.k6)(()=>[(0,c.Lk)("div",jh,[(0,c.Lk)("p",zh,[(0,c.bF)(v,{icon:"fa-light fa-shield-halved",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Permissions")),1)]),(0,c.Lk)("a",qh,[(0,c.bF)(v,{icon:a.showPermissions?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])])]),default:(0,c.k6)(()=>[(0,c.Lk)("div",Jh,[(0,c.Lk)("div",Hh,[(0,c.Lk)("a",Kh,(0,u.v_)(e.$t("More about permissions"))+" â ",1)]),e.isGranted("ROLE_ADMIN_TENANT")?((0,c.uX)(),(0,c.CE)("div",Yh,[(0,c.Lk)("p",Zh,(0,u.v_)(e.$t("ROLE_ADMIN_TENANT")),1),(0,c.bF)(k,{modelValue:a.isRoleAdminTenant,"onUpdate:modelValue":t[20]||(t[20]=e=>a.isRoleAdminTenant=e),size:"is-small"},null,8,["modelValue"])])):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.permissionsAvailable,(i,s)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:i},[n.shouldShowPermission(i)?((0,c.uX)(),(0,c.CE)("div",eg,[n.isFirstVisibleTenantPermission(i)?((0,c.uX)(),(0,c.CE)("p",tg,(0,u.v_)(e.$t("Organization"))+": "+(0,u.v_)(e.tenant.shortName),1)):(0,c.Q3)("",!0),n.isFirstVisibleLocalPermission(i)?((0,c.uX)(),(0,c.CE)("p",ig,(0,u.v_)(e.$t("Chapter")),1)):(0,c.Q3)("",!0),n.isFirstVisibleParentLocalPermission(i)?((0,c.uX)(),(0,c.CE)("p",sg,(0,u.v_)(e.$t("Parent chapter")),1)):(0,c.Q3)("",!0),(0,c.bF)(r,null,{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.item.customPermissions,"onUpdate:modelValue":t[21]||(t[21]=e=>a.item.customPermissions=e),name:"perm_"+i,"native-value":i},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(n.stripPermissionPrefix(e.$t(i))),1)]),_:2},1032,["modelValue","name","native-value"])]),_:2}
1,1024),n.shouldShowSeparator(s)?((0,c.uX)(),(0,c.CE)("hr",ag)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],64))),128))])]),_:1},8,["modelValue"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasRoles&&n.roles?((0,c.uX)(),(0,c.Wv)(L,{key:8,modelValue:a.showRoles,"onUpdate:modelValue":t[25]||(t[25]=e=>a.showRoles=e),class:"card mt-5",animation:"slide"},{trigger:(0,c.k6)(()=>[(0,c.Lk)("div",ng,[(0,c.Lk)("p",og,[(0,c.bF)(v,{icon:"fa-light fa-user-tag",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Roles")),1)]),(0,c.Lk)("a",lg,[(0,c.bF)(v,{icon:a.showRoles?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])])]),default:(0,c.k6)(()=>[(0,c.Lk)("div",rg,[e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)("div",dg,[(0,c.Lk)("p",cg,(0,u.v_)(e.$t("tenant")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.roles,i=>((0,c.uX)(),(0,c.CE)(c.FK,{key:i.id},[i.isNational?((0,c.uX)(),(0,c.Wv)(r,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.rawUserRoles,"onUpdate:modelValue":t[23]||(t[23]=e=>a.rawUserRoles=e),"native-value":i.id},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(i.name)+" ",1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.permissions,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-warning is-small is-rounded ml-3"},(0,u.v_)(e.$t(t)),1))),128))]),_:2},1032,["modelValue","native-value"])]),_:2},1024)):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),a.selectedLocalCenterId?((0,c.uX)(),(0,c.CE)("div",ug,[e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)("hr",mg)):(0,c.Q3)("",!0),(0,c.Lk)("p",pg,(0,u.v_)(e.$t("Chapter")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.roles,i=>((0,c.uX)(),(0,c.CE)(c.FK,{key:i.id},[i.isLocalCenter?((0,c.uX)(),(0,c.Wv)(r,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.rawUserRoles,"onUpdate:modelValue":t[24]||(t[24]=e=>a.rawUserRoles=e),"native-value":i.id+"_"+a.selectedLocalCenterId},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(i.name)+" ",1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.permissions,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-warning is-small is-rounded ml-3"},(0,u.v_)(e.$t(t)),1))),128))]),_:2},1032,["modelValue","native-value"])]),_:2},1024)):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0)])]),_:1},8,["modelValue"])):(0,c.Q3)("",!0),(0,c.Lk)("div",hg,[(0,c.Lk)("button",{ref:"submitXHR",class:(0,u.C4)(["button is-primary is-rounded is-fullwidth",{"is-loading":e.$store.state.isLoadingButton}]),disabled:e.$store.state.isLoadingButton,type:"submit"},(0,u.v_)(e.$t("save")),11,gg)])])])],32)])}var bg=i(99440);const yg={key:0};function vg(e,t,i,s,a,n){const o=(0,c.g2)("b-autocomplete"),l=(0,c.g2)("b-field");return(0,c.uX)(),(0,c.Wv)(l,{label:i.label,class:(0,u.C4)(i.isRequired?"required":"")},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.companyName,"onUpdate:modelValue":t[0]||(t[0]=e=>a.companyName=e),data:a.data,placeholder:i.placeholder||e.$t("Type to search..."),field:"name",loading:a.isFetching,disabled:i.isDisabled,clearable:!i.isDisabled,required:!!i.isRequired,expanded:"",onKeyup:n.handleKeyup,onSelect:n.change},{default:(0,c.k6)(({option:e})=>[(0,c.eW)((0,u.v_)(e.name),1)]),empty:(0,c.k6)(()=>[!a.isFetching&&n.hasSearchTerm?((0,c.uX)(),(0,c.CE)("span",yg,(0,u.v_)(e.$t("No results found")),1)):(0,c.Q3)("",!0)]),_:1},8,["modelValue","data","placeholder","loading","disabled","clearable","required","onKeyup","onSelect"])]),_:1},8,["label","class"])}const kg=2;var Cg={name:"CompanyAutocomplete",props:["modelValue","label","placeholder","isRequired","isDisabled"],emits:["update:modelValue"],data(){return{companyName:null,data:[],isFetching:!1}},computed:{hasSearchTerm(){return!!this.companyName&&this.companyName.length>=kg}},watch:{modelValue(e){this.companyName=e?e.name:null},companyName(e){(!e||e.length<kg)&&(this.data=[]),!e&&this.modelValue&&this.$emit("update:modelValue",null)}},created(){this.companyName=this.modelValue?this.modelValue.name:null},methods:{handleKeyup(e){["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key)||this.getAsyncData()},getAsyncData:qn()(function(){this.hasSearchTerm?(this.isFetching=!0,this.$http.plain.get("/companies?name="+encodeURIComponent(this.companyName)+"&itemsPerPage=20").then(e=>{this.data=e.data["hydra:member"].filter(e=>
1!["DELETED","INACTIVE"].includes(e.status))}).catch(e=>{this.data=[],console.error(e)}).finally(()=>{this.isFetching=!1})):this.data=[]},300),change(e){this.$emit("update:modelValue",e||null)}}};const Lg=(0,Li.A)(Cg,[["render",vg]]);var wg=Lg;const _g=["PRIMARY_CONTACT","FINANCIAL_REP"];var Eg={name:"UserCreateContent",components:{BirthdaySelect:Pt.A,TownAutocomplete:Mt.A,PhoneCountryPrefixSelect:bg.A,LocalCenterSelect:ka.A,CompanyAutocomplete:wg},mixins:[yh.A],props:{isLocalCenter:{type:[Boolean,Number,String],default:!1},isGeneralUnit:{type:[Boolean,Number,String],default:!1}},emits:["created","cancel"],data(){return{item:{status:"ACTIVE",localCenter:null,customPermissions:[]},isLoading:!1,profileFields:null,countries:ds.Xr,userTypeSelected:null,selectedCompany:null,companyRole:"MEMBER",rawUserRoles:[],selectedLocalCenterId:null,isRoleAdminTenant:!1,showPermissions:!1,showRoles:!1,lastTenantIndex:-1,lastLocalIndex:-1,lastParentLocalIndex:-1}},computed:{...(0,vi.L8)(["user","tenant","isGranted"]),getPhonePlaceholder(){let e=ds.Xr.find(e=>e.c===this.item.phoneCountry);return void 0!==e?e.s:""},currentUserLocalCenter(){return this.$store.state.currentUser?.localCenter||null},roles(){return this.$store.state.tenant.roles},currentUserCompany(){const e=this.user?.companyFeeStatus;return e?.companyUuid&&_g.includes(e.role)?{uuid:e.companyUuid,name:e.companyName}:null},canAssignCompany(){return!!this.tenant.settingFeatures?.company?.isActive&&(this.isGranted("ADMIN_TENANT")||null!==this.currentUserCompany)}},created(){this.profileFields=this.tenant.settingForms.profileForm.profileFields,this.initPhoneCountry(),this.initLastPermissionIndexes(),this.isLocalCenter&&this.currentUserLocalCenter&&(this.selectedLocalCenterId=this.currentUserLocalCenter.id),this.canAssignCompany&&!this.isGranted("ADMIN_TENANT")&&(this.selectedCompany=this.currentUserCompany)},mounted(){setTimeout(()=>{if(this.$refs.firstNameInput?.$el){const e=this.$refs.firstNameInput.$el.querySelector("input");e&&e.focus()}},100)},methods:{countryName:ds.GL,isProfileField(e){if(this.profileFields.includes(e))return!0},isMandatoryField(e){return this.tenant.settingForms.profileForm.profileFieldsMandatory&&this.tenant.settingForms.profileForm.profileFieldsMandatory.includes(e)},initPhoneCountry(){if(!this.item.phoneCountry&&this.tenant.country){let e=ds.Xr.find(e=>e.v===this.tenant.country.id);this.item.phoneCountry=e?e.c:null}},onLocalCenterSelect(e){e?this.selectedLocalCenterId=e.id:(this.selectedLocalCenterId=null,this.rawUserRoles=this.rawUserRoles.filter(e=>!String(e).includes("_")))},shouldShowPermission(e){if(!e)return!1;if(!(0,ds.Zz)(this.user,e))return!1;const t=this.isGranted("ADMIN_TENANT")||this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")||this.isGranted("COMMUNICATION_TENANT")||this.isGranted("EVENT_TENANT")||this.isGranted("HR_ASSISTANT_TENANT"),i=this.isGranted("ADMIN_PARENT_LOCAL")||this.isGranted("HR_PARENT_LOCAL")||this.isGranted("FINANCIAL_PARENT_LOCAL")||this.isGranted("COMMUNICATION_PARENT_LOCAL")||this.isGranted("EVENT_PARENT_LOCAL")||this.isGranted("HR_ASSISTANT_PARENT_LOCAL");return t?!!e.includes("_TENANT")||(e.includes("_PARENT_LOCAL")?this.tenant.settingFeatures.localCenter.hasParent:(e.includes("_LOCAL"),!0)):i&&e.includes("_PARENT_LOCAL")?this.tenant.settingFeatures.localCenter.hasParent:!(!e.includes("_LOCAL")||e.includes("_PARENT_LOCAL"))},shouldShowSeparator(e){const t=this.lastTenantIndex===e,i=this.lastLocalIndex===e;if(!t&&!i)return!1;for(let s=e+1;s<this.permissionsAvailable.length;s++)if(this.shouldShowPermission(this.permissionsAvailable[s]))return!0;return!1},initLastPermissionIndexes(){for(let e=0;e<this.permissionsAvailable.length;e++){const t=this.permissionsAvailable[e];t.includes("_TENANT")?this.lastTenantIndex=e:t.includes("_LOCAL")&&!t.includes("_PARENT_LOCAL")?this.lastLocalIndex=e:t.includes("_PARENT_LOCAL")&&(this.lastParentLocalIndex=e)}},isFirstVisibleTenantPermission(e){if(!e.includes("_TENANT"))return!1;for(const t of this.permissionsAvailable)if(t.includes("_TENANT")&&this.shouldShowPermission(t))return t===e;return!1},isFirstVisibleLocalPermission(e){if(!e.includes("_LOCAL")||e.includes("_PARENT_LOCAL"))return!1;for(const t of this.permissionsAvailable)if(t.includes("_LOCAL")&&!t.includes("_PARENT_LOCAL")&&this.shouldShowPermission(t))return t===e;return!1},isFirstVisibleParentLocalPermission(e){if(!e.includes("_PARENT_LOCAL"))return!1;for(const t of this.permissionsAvailable)if(t.includes("_PARENT_LOCAL")&&this.shouldShowPermission(t))return t===e;return!1},stripPermissionPrefix(e){const t=["ORG: ","ORG:","ÐÐ Ð: ","ÐÐ Ð:","LOCAL: ","LOCAL:","
1LOKAL: ","LOKAL:","ÐÐСЦÐÐÐÐ: ","ÐÐСЦÐÐÐÐ:","ÐÐСТÐÐ: ","ÐÐСТÐÐ:","REGION: ","REGION:","JUD: ","JUD:","ÃBERGEORDNET: ","ÃBERGEORDNET:","ÐÐÐÐСÐÐÐ: ","ÐÐÐÐСÐÐÐ:","ÐÐÐÐСТ: ","ÐÐÐÐСТ:"];let i=e;for(const n of t)if(i.startsWith(n)){i=i.substring(n.length);break}const s=[" Local"];for(const n of s)if(i.endsWith(n)){i=i.substring(0,i.length-n.length);break}const a=[" Centru PÄrinte Local"];for(const n of a)if(i.includes(n)){i=i.replace(n,"");break}return i.trim()},save(){const e={...this.item};this.isLocalCenter&&this.$store.state.currentUser.localCenter&&(e.localCenter=this.$store.state.currentUser.localCenter["@id"]),e.dateJoined=(0,ds.vW)(e.dateJoined),e.dateJoinedFullMember=(0,ds.vW)(e.dateJoinedFullMember),e.townFrom&&(e.townFrom=e.townFrom["@id"]),e.townCurrent&&(e.townCurrent=e.townCurrent["@id"]),e.feeType=parseInt(e.feeType),e.roles=[this.isRoleAdminTenant?"ROLE_ADMIN_TENANT":"ROLE_USER"],e.rawUserRoles=this.rawUserRoles,e.userType=this.userTypeSelected,this.canAssignCompany&&this.selectedCompany?.uuid&&(e.companyUuid=this.selectedCompany.uuid,e.companyRole=this.companyRole),this.isLoading=!0,this.$store.state.isLoadingButton=!0,this.$http.plain.post("/member-register-by-admin",e).then(e=>{this.$buefy.snackbar.open({message:this.$t("createdSuccessfully")}),this.$emit("created",e.data)}).catch(e=>{console.error(e);const t=e.response?.data?.detail||e.response?.data?.message;let i=this.$t("An error occurred");"EMAIL_EXISTS"===t?i=this.$t("A user with this email already exists"):t&&(i=t),this.$buefy.toast.open({message:i,type:"is-danger",duration:5e3})}).finally(()=>{this.isLoading=!1,this.$store.state.isLoadingButton=!1})}}};const $g=(0,Li.A)(Eg,[["render",fg]]);var Fg=$g,Tg=i(48266),Sg=(i(2543),i(31137)),Ag=i(99882),Pg=i(81084),Ig={data(){return{isFilter:this.$store.state.listValues.user.isFilter,isGallery:!1,isMapView:!1,isGalleryOnly:!1,isFullscreenList:!1,isViewportTall:"undefined"!==typeof window&&window.innerHeight>=800,unitItem:null,isGeneralUnit:!!this.$route.query.generalUnit,isLocalCenter:!1,isGeneralUnitAccess:!1,items:[],mapItems:null,mapRegions:[],mapRegionGeoJson:null,mapRegionBounds:null,mapRegionUnassigned:0,pendingRegionShape:null,isLoadingRegions:!1,countryPolygonsLoaded:null,countryCounts:[],countryCountsKey:null,allMapUsers:null,currentMapZoom:6,currentMapBounds:null,hasAutoZoomedForTown:!1,selectedCluster:null,isProgrammaticZoom:!1,isPaginationChange:!1,originalMapPosition:null,originalMapZoom:null,autoSelectClusterAfterZoom:!1,pendingClusterLocation:null,pendingAutoZoomBounds:null,mapRequestCancelToken:null,mapRegionsCancelToken:null,itemsRequestCancelToken:null,unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,unitDiscriminator:this.$route.query.type,isRoleGroup:!1,isPrivateGroup:!1,isPrivateGroupAdmin:!1,userTypes:this.$store.state.tenant.userTypes,isOnlyVoters:!1,skillsSearch:"",filters:{unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,localCenter:this.$route.query.localCenter?parseInt(this.$route.query.localCenter):null,status:this.$route.query.status?this.$route.query.status:"ACTIVE",feeStatus:this.$route.query.feeStatus?this.$route.query.feeStatus:null,ageGroup:this.$route.query.ageGroup?this.$route.query.ageGroup:null,cardId:this.$route.query.cardId?this.$route.query.cardId:null,name:this.$route.query.name?this.$route.query.name:null,town:this.$route.query.town?this.$route.query.town:null,country:this.$route.query.country?this.$route.query.country:null,county:this.$route.query.county&&"undefined"!==this.$route.query.county?this.$route.query.county:null,state:this.$route.query.state?this.$route.query.state:null,fullMember:this.$route.query.fullMember?this.$route.query.fullMember:null,feeType:this.$route.query.feeType?parseInt(this.$route.query.feeType):null,userType:this.$route.query.userType?parseInt(this.$route.query.userType):null,customField:this.$route.query.customField?Array.isArray(this.$route.query.customField)?this.$route.query.customField:[this.$route.query.customField]:[],skills:this.$route.query.skills?Array.isArray(this.$route.query.skills)?this.$route.query.skills:[this.$route.query.skills]:[],availability:this.$route.query.availability?Array.isArray(this.$route.query.availability)?this.$route.query.availability:[this.$route.query.availability]:[],permission:this.$route.query.permission?Array.isArray(this.$route.query.permission)?this.$route.query.permission:[this.$route.query.permission]:[],professionIndustry:this.$route.query.professionIndustry?this.$route.query.professionIndustry:null,clusterLat:this.$route.query.clusterLat?parseFloat(this.$route.query.clusterLat):null,clusterLng:this.$route.query.clusterLng?parseFloat(this.$route.query.clusterLng):null,clusterPrecision:this.$route.query.clusterPrecision?parseInt(this.$route.query.clusterPrecision):null,dateJoinedFrom:this.$route.query.dateJoinedFrom?new Date(this.$route.query.dateJoinedFrom):null,dateJoinedTo:this.$route.query.dateJoinedTo?new Date(this.$route.query.dateJoinedTo):null},itemsTotal:null,itemsPageCurrent:this.$route.query.page?parseInt(this.$route.query.page):1,itemsPerPage:null,isLoading:!1,isLoadingItems:!0,isSorting:!1,isPaginating:!1,isLoadingMap:!1,isLoadingCSV:!1,mapInitialLoadComplete:!1,isInitialMapLoad:!1,localCenters:[],isLoadingLocalCenters:!1,localCenterUnits:null,invisbileColumns:this.$store.state.listValues.user.invisibleColumns,hideableColumns:["age","email","phone","cardId","permission"],filteredTags:[],sortField:this.$store.state.listValues.user.sortField,sortOrder:this.$store.state.listValues.user.sortOrder,defaultSortOrder:this.$store.state.listValues.user.defaultSortOrder,noResults:!1,totalUnapproved:0,advancedOptions:this.$store.state.listValues.user.advancedOptions||[],isMoreThanOnePage:!1,itemsPerPageCSV:500,tenantFeePrices:null,isUserModalVisible:!1,selectedUserId:null,selectedUser:null,isCreateModalVisible:!1,isInviteModalVisible:!1,mobileFilterVisible:!1,mobileViewModeVisible:!1,localCenterSearch:"",unitUserRoles:{}}},watch:{mapRegionGeoJson:function(){this.refreshMapRegionBounds()},"filters.country":function(e,t){this.countryPolygonsLoaded=null;const i=("object"===typeof e?e?.id:e)??null,s=("object"===typeof t?t?.id:t)??null;String(i)!==String(s)&&(this.filters.county=null,this.syncCountyFilter(null),this.filters.state=null)},"filters.state":function(){this.countryPolygonsLoaded=null,this.filters.county=null},unitItem:function(){this.unitItem&&("Group"===this.unitItem["@type"]&&this.resetFiltersForPrivateGroup(),this.unitDiscriminator=this.unitItem["@type"],this.isRoleGroup=!!this.unitItem.isRoleGroup,this.isLocalCenter="LocalCenter"===this.unitItem["@type"],this.filters.unitId=this.unitItem.id,this.isPrivateGroup="Group"===this.unitDiscriminator,(this.isPrivateGroup||this.isLocalCenter)&&(this.isMapView=!1,this.setGalleryOnly(!1)),this.isGeneralUnit||this.loadLocalCenters(),this.fetchCountryCounts(),this.loadUnitUserRoles(),this.isMapView||this.loadItemsPage())}}
1,mounted(){this.debouncedViewportHeightCheck=qn()(()=>{this.isViewportTall=window.innerHeight>=800},200),window.addEventListener("resize",this.debouncedViewportHeightCheck)},beforeUnmount(){window.removeEventListener("resize",this.debouncedViewportHeightCheck),this.exitFullscreenList()},created(){if(this.filters.status||this.isGranted("HR_LOCAL",this.unitId)&&"LocalCenter"===this.unitDiscriminator||this.isGeneralUnit&&this.isGranted("HR_TENANT")||(this.filters.status="ACTIVE"),this.isFilterActive&&(this.isFilter=!0),this.filters.country&&"object"!==typeof this.filters.country&&this.$http.plain.get("/countries/"+this.filters.country).then(e=>{this.filters.country=e.data,this.syncCountryFilter(e.data),this.startMapRegionLevel()}).catch(e=>{console.log(e)}),this.filters.county&&"object"!==typeof this.filters.county&&String(this.$store.state.filterByCounty?.id)!==String(this.filters.county)&&this.$http.plain.get("/counties/"+this.filters.county).then(e=>{this.$store.state.filterByCounty=e.data}).catch(e=>{console.log(e)}),this.isGeneralUnit&&this.loadLocalCenters(),this.fetchCountryCounts(),this.loadFeeTenantProduct(),this.initIsGallery(),this.initIsMapView(),this.initSortField(),this.loadTotalUnapproved(),this.setGeneralUnitAccess(),this.isGeneralUnit&&this.isGeneralUnitAccess&&null==this.unitId&&(this.isMapView||this.loadItemsPage()),this.user.localCenter&&this.unitId===this.user.localCenter.id&&(this.unitItem=this.user.localCenter),!this.unitItem)for(let e of this.$store.state.spaces[this.tenant.slug].myGroups||[])e.id===this.unitId&&(this.unitItem=e);this.unitItem||!this.unitId||this.isGeneralUnit||this.retrieveUnit(),this.mapInitialLoadComplete=!1,this.debouncedLoadMapData=qn()((e,t)=>{this.loadMapItems(e,t),this.itemsPageCurrent=1,this.loadItemsPage(),this.mapInitialLoadComplete=!0,this.isProgrammaticZoom=!1},300,{leading:!1,trailing:!0})},computed:{...(0,vi.L8)(["user","tenant","isGranted","isCurrentGroupAdmin","adhesionStatusLabel"]),showsGallery(){return this.$isMobile()?this.isGallery:this.isGalleryOnly},isViewportLocked(){return(this.showsGallery||this.isMapView)&&!this.isPrivateGroup&&!this.isRoleGroupAdminList&&(this.isViewportTall||this.isFullscreenList)},canToggleUnitAdmin(){return!(!this.unitItem||"Unit"!==this.unitItem["@type"]||this.unitItem.isRoleGroup)&&(this.unitItem.localCenter?this.isGranted("FINANCIAL_LOCAL",this.unitItem.localCenter)||this.isGranted("HR_LOCAL",this.unitItem.localCenter):this.isGranted("HR_TENANT"))},mainSkeletonRows(){return Array.from({length:20},(e,t)=>({_skeletonId:t}))},pgSkeletonRows(){return Array.from({length:10},(e,t)=>({_skeletonId:t}))},isReloadingTable(){return this.isLoadingItems&&(this.isSorting||this.isPaginating)},filterDefinitions(){const e=this.isGranted("HR_LOCAL",this.unitId)&&"LocalCenter"===this.unitDiscriminator||this.isGeneralUnit&&this.isGranted("HR_TENANT");return[{key:"status",label:this.$t("Status"),options:this.statusPillOptions,icon:"fa-light fa-circle-dot",visible:e,isPrimary:!0},{key:"ageGroup",label:this.$t("age"),options:this.ageGroupPillOptions,icon:"fa-light fa-cake-candles",visible:this.showsAgeGroup,isPrimary:!0},{key:"userType",label:this.$t("userType"),options:this.userTypePillOptions,icon:"fa-light fa-user-tag",visible:this.canFilterByUserType,isPrimary:!0},{key:"country",label:this.$t("country"),type:"slot",icon:"fa-light fa-earth-europe",displayValue:this.countryFilterLabel,visible:this.showsCountryFilter,isPrimary:!0},{key:"county",label:this.$t("County"),type:"slot",icon:"fa-light fa-map",displayValue:this.countyFilterLabel,visible:this.showsCountyFilter,isPrimary:!0},{key:"localCenter",label:this.$t("Chapter"),options:this.localCenterPillOptions,icon:"fa-light fa-sitemap",visible:(this.isGeneralUnit||this.unitItem&&this.isRoleGroup&&!this.unitItem.localCenter)&&this.localCenters.length>0,isPrimary:!0},{key:"feeStatus",label:this.$t("Fee status"),options:this.feeStatusPillOptions,icon:"fa-light fa-receipt",visible:this.tenant.settingFeatures.fees.isActive&&this.isGranted("HR_TENANT"),isPrimary:!0},{key:"customField",label:this.interestCustomField?this.$t(this.interestCustomField.name):"",options:this.interestPillOptions,multiple:!0,icon:"fa-light fa-heart",visible:!!this.interestCustomField,isPrimary:!0},{key:"town",label:this.$t("Town"),type:"slot",icon:"fa-light fa-location-dot",displayValue:this.townFilterLabel,visible:this.isTownScoped},{key:"state",label:this.$t("State"),options:this.statePillOptions,icon:"fa-light fa-map-pin",visible:!this.tenant.isInternational&&this.stateOptions.length>0&&this.isTownScoped},{key:"cardId",label:this.$t("Card ID"),type:"text",icon:"fa-light fa-id-card",visible:this.tenant.settingFeatures.users.hasCardId},{key:"professionIndustry",label:this.$t("Profession"),type:"slot",icon:"fa-light fa-briefcase",displayValue:this.professionFilterLabel,visible:this.tenant.settingFeatures.professions.isActive&&this.tenant.settingFeatures.professions.hasIndustry},{key:"skills",label:this.skillsCustomField?this.$t(this.skillsCustomField.name):"",type:"slot",icon:"fa-light fa-lightbulb",displayValue:this.filters.skills.length?this.filters.skills.length+" "+this.$t("selected"):"",clearValue:[],visible:!!this.skillsCustomField},{key:"availability",label:this.$t("Availability"),options:this.weekdayPillOptions,multiple:!0,icon:"fa-light fa-calendar-week",visible:this.hasAvailability},{key:"permission",label:this.$t("Permissions"),options:this.permissionPillOptions,multiple:!0,icon:"fa-light fa-shield-halved",visible:this.isGranted("ADMIN_TENANT")&&(this.isGeneralUnit||this.isLocalCenter)},{key:"feeType",label:this.$t("Fee type"),options:this.feeTypePillOptions,icon:"fa-light fa-tag",visible:this.tenant.settingFeatures.fees.isActive&&(this.isGeneralUnit||this.isLocalCenter)&&!!this.tenantFeePrices&&(this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT"))},{key:"fullMember",label:this.$t("fullMember"),options:this.fullMemberPillOptions,icon:"fa-light fa-user-check",visible:this.tenant.settingFeatures.users.hasFullMembership},{key:"dateJoined",label:this.$t("Date joined"),type:"date",fromKey:"dateJoinedFrom",toKey:"dateJoinedTo",icon:"fa-light fa-calendar",visible:e},{key:"name",label:this.$t("Name"),type:"text",icon:"fa-light fa-magnifying-glass",placeholder:this.$t("Full name"),isPrimary:!0}]},filterDefaults(){return{status:"ACTIVE"}},statusPillOptions(){const e=this.tenant.settingFeatures,t=[{value:"ACTIVE",label:this.$t("active")},{value:"INACTIVE",label:this.$t("inactive")}];return e.users.hasManualApprove&&t.push({value:"UNAPPROVED",label:this.$t("unapproved")}),e.statuses.WAITING_LIST&&t.push({value:"WAITING_LIST",label:this.$t("waitingList")}),e.statuses.UNREACHABLE&&t.push({value:"UNREACHABLE",label:this.$t("UNREACHABLE")}),e.statuses.SUSPENDED&&t.push({value:"SUSPENDED",label:this.$t("suspended")}),e.statuses.EXCLUDED&&t.push({value:"EXCLUDED",label:this.$t("EXCLUDED")}),e.statuses.HELPING_HANDS&&t.push({value:"HELPING_HANDS",label:this.$t("HELPING_HANDS")}),e.statuses.CONTRIBUTOR&&t.push({value:"CONTRIBUTOR",label:this.$t("CONTRIBUTOR")}),e.referral.isActive&&t.push({value:"AWAITING_REFERRAL",label:this.$t("awaiting_referral")}),t.push({value:"UNCONFIRMED_EMAIL",label:this.$t("UNCONFIRMED_EMAIL")}),t},showsAgeGroup(){return!(!this.tenant.settingFeatures.users.hasListFieldAge||this.isRoleGroup||!this.isGranted("HR_ASSISTANT_LOCAL",this.unitId))},ageGroupPillOptions(){return[{value:"minor",label:this.$t("Under 18")},{value:"adult",label:this.$t("Adults")}]},feeStatusPillOptions(){const e=this.tenant.settingFeatures.fees,t=[{value:"paid",label:this.$t("Fee paid"),color:"var(--bulma-success)"},{value:"not_paid",label:this.$t("Fee not paid"),color:"var(--bulma-danger)"}];return e.isMandatory&&e.autoDeactivateOnFeeExpiry&&e.deactivationDelayDays>
10&&t.push({value:"grace_period",label:this.$t("Grace period"),color:"var(--bulma-warning)"}),t},localCenterPillOptions(){return this.localCenters.map(e=>({value:e.id,label:this.localCenterNameSelector(e,this.tenant)}))},statePillOptions(){return this.stateOptions.map(e=>({value:e,label:e}))},interestPillOptions(){return(this.interestCustomField?.fieldOptionsArray||[]).map(e=>({value:e.key,label:e.label}))},weekdayPillOptions(){return this.weekdayOptions.map(e=>({value:e.key,label:e.label}))},permissionPillOptions(){const e=[{label:null,options:[{value:"ROLE_ADMIN_TENANT",label:this.$t("ROLE_ADMIN_TENANT")}]}],t=(t,i)=>{i.length&&e.push({label:t,options:i.map(e=>({value:e,label:this.$t(e)}))})};return t(this.$t("Organization"),this.permissionsByGroup.tenant),t(this.$t("Chapter"),this.permissionsByGroup.local),t(this.$t("Regional"),this.permissionsByGroup.parentLocal),e},feeTypePillOptions(){return(this.tenantFeePrices?.productPrices||[]).filter(e=>e?.id&&!e.isArchived).map(e=>({value:e.id,label:this.$filters.money(e.price,e.currency)+" - "+e.name}))},userTypePillOptions(){return(this.tenant.roles||[]).filter(e=>e.isUserType).map(e=>({value:e.id,label:e.name,color:e.options?.bgcolor||null}))},fullMemberPillOptions(){return[{value:"1",label:this.$t("onlyFullMembers")},{value:"0",label:this.$t("onlyNotFullMembers")}]},townFilterLabel(){const e=this.filters.town;return e?"object"===typeof e?e.name:this.$store.state.filterByTown?.name||"":""},countryFilterLabel(){const e=this.filters.country;return e?"object"===typeof e?e.name:this.$store.state.filterByCountry?.name||"":""},countyFilterLabel(){const e=this.filters.county;return e?"object"===typeof e?e.name:this.$store.state.filterByCounty?.name||"":""},professionFilterLabel(){const e=this.filters.professionIndustry;return e?"object"===typeof e?e.name:String(e):""},permissionsByGroup(){const e=[],t=[],i=[];return this.permissionsAvailable.forEach(s=>{s.includes("_TENANT")?e.push(s):s.includes("_PARENT_LOCAL")&&this.tenant.settingFeatures.localCenter.hasParent?i.push(s):s.includes("_LOCAL")&&!s.includes("_PARENT_LOCAL")&&t.push(s)}),{tenant:e,local:t,parentLocal:i}},canFilterByUserType(){return this.tenant.settingFeatures.users.hasUserTypes&&this.isGranted(this.tenant.settingFeatures.users.whoCanFilterUsersByType||"USER")},mapKey(){return`map-${this.tenant.id}`},mapLevel(){return(0,fh.rK)({tenant:this.tenant,filters:this.filters,hasPolygons:this.countryPolygonsLoaded})},mapCountry(){return this.tenant.isInternational?this.filters.country||null:this.tenant.country||null},isMapRegionLevel(){return(0,fh.tY)(this.mapLevel)},mapBackLabel(){return this.filters.county?this.tenant.isInternational||this.filters.state?this.$t("backToCounties"):this.$t("backToAllCounties"):this.filters.state?this.$t("backToStates"):this.filters.country&&this.tenant.isInternational?this.$t("backToAllCountries"):""},mapCountyPillCounts(){const e=[fh.ov,fh.Lk];return this.isMapView&&e.includes(this.mapLevel)?this.mapRegionCounts:null},mapRegionCounts(){const e={};return this.mapRegions.forEach(t=>{e[String(t.id)]=t.count}),e},isTownScoped(){return this.isRoleGroup||this.isGeneralUnit},countryFilterCounts(){if(!this.countryCounts.length)return null;const e={};return this.countryCounts.forEach(t=>{t.id&&(e[String(t.id)]=t.count)}),Object.keys(e).length?e:null},hasMembersOutsideOwnCountry(){const e=String(this.tenant.country?.id??"");return this.countryCounts.some(t=>t.id&&t.count>0&&String(t.id)!==e)},showsCountryFilter(){return!!this.isTownScoped&&(this.tenant.isInternational||!!this.tenant.country&&this.hasMembersOutsideOwnCountry)},countyScopeCountry(){return this.showsCountryFilter?"object"===typeof this.filters.country?this.filters.country:null:this.tenant.country||null},stateOptions(){return"US"===String(this.countyScopeCountry?.code||"").toUpperCase()?gh.Ky:[]},showsCountyFilter(){return!(!this.isTownScoped||this.tenant.isInternational)&&(this.countyScopeCountry?0===this.stateOptions.length||!!this.filters.state:!!this.filters.county)},interestCustomField(){if(this.tenant.settingFeatures.users.interestCustomFieldId){let t=this.tenant.customFields.find(e=>e.id===parseInt(this.tenant.settingFeatures.users.interestCustomFieldId));if(t){let i={...t},s=i.fieldOptions||i.options;if("string"===typeof s)try{s=JSON.parse(s)}catch(e){console.error("Failed to parse field options",e)}return s?.options&&(s=s.options),s&&"object"===typeof s&&(i.fieldOptionsArray=Object.entries(s).map(([e,t])=>({key:e,label:t}))),i}return null}return null},hasAvailability(){return Boolean(this.tenant?.settingFeatures?.users?.hasAvailability)},weekdayOptions(){return[{key:"mon",label:this.$t("Monday")},{key:"tue",label:this.$t("Tuesday")},{key:"wed",label:this.$t("Wednesday")},{key:"thu",label:this.$t("Thursday")},{key:"fri",label:this.$t("Friday")},{key:"sat",label:this.$t("Saturday")},{key:"sun",label:this.$t("Sunday")}]},skillsCustomField(){if(!this.tenant?.settingFeatures?.users?.hasSkills)return null;if(this.tenant.settingFeatures.users.skillsCustomFieldId){let t=this.tenant.customFields.find(e=>e.id===parseInt(this.tenant.settingFeatures.users.skillsCustomFieldId));if(t){let i={...t},s=i.fieldOptions||i.options;if("string"===typeof s)try{s=JSON.parse(s)}catch(e){console.error("Failed to parse field options",e)}s?.options&&(s=s.options);const a=s&&"object"===typeof s?s:{};return i.fieldOptionsArray=Object.entries(a).map(([e,t])=>({key:String(e),label:String(t)})),i}return null}return null},skillsSelected:{get(){const e=this.skillsCustomField?.fieldOptionsArray||[];return this.filters.skills.map(t=>e.find(e=>e.key===String(t))||{key:String(t),label:String(t)})},set(e){this.filters.skills=e.map(e=>"object"===typeof e?e.key:String(e))}},filteredSkillOptions(){const e=this.skillsCustomField?.fieldOptionsArray||[],t=new Set(this.filters.skills.map(String)),i=(this.skillsSearch||"").toLowerCase();return e.filter(e=>
1!t.has(e.key)&&(!i||e.label.toLowerCase().includes(i)))},isUserRoleList(){return this.isPrivateGroup||this.isRoleGroupAdminList},isRoleGroupAdminList(){return!("RoleGroup"!==this.unitDiscriminator||!this.$route.query.role_group_admin||!this.isCurrentGroupAdmin)},isFeeColumnAvailable(){return!!this.tenant.settingFeatures.fees.isActive&&(!!(0,hh.i4)(this.tenant)&&(!(!this.isGeneralUnit&&!this.isLocalCenter||!this.isGranted("FINANCIAL_LOCAL")&&!this.isGranted("HR_LOCAL"))||!(!this.isRoleGroup||!this.isGranted("HR_TENANT"))))},hasCsvExportAccess(){return!(!this.isRoleGroup&&!this.isGeneralUnit||!this.isGranted("HR_TENANT"))||(!!(this.isRoleGroup&&this.unitItem.localCenter&&this.isGranted("HR_LOCAL",this.unitItem.localCenter))||!!(this.isLocalCenter&&this.unitItem&&this.isGranted("HR_LOCAL",this.unitItem)))},hasAccessAdvanced(){return!this.isRoleGroup&&this.unitId&&this.isGranted("HR_LOCAL",this.unitId)||!0===this.isRoleGroup&&this.isGranted("HR_TENANT")||this.isGeneralUnitAccess&&this.isGranted("HR_TENANT")},canRegisterMember(){return("LocalCenter"===this.unitDiscriminator||this.isGeneralUnitAccess&&this.isGranted("HR_TENANT"))&&(this.isGranted("HR_TENANT")||this.isGranted("HR_LOCAL")&&this.user.localCenter&&this.unitId==this.user.localCenter.id)},canInviteFriend(){return this.isGeneralUnitAccess&&this.tenant.settingFeatures.users.hasUserInvitation&&this.isGranted(this.tenant.settingFeatures.users.whoCanSendUserInvitation)},hasUnapprovedShortcut(){return this.totalUnapproved>0&&"UNAPPROVED"!==this.filters.status},hasListActions(){return this.canRegisterMember||this.canInviteFriend||this.hasUnapprovedShortcut},hasHeaderActions(){return this.hasListActions&&!this.isPrivateGroup&&!this.isRoleGroupAdminList&&!this.$isMobile()},isFilterActive(){return"ACTIVE"!==this.filters.status||this.filters.feeStatus||this.filters.ageGroup||this.filters.localCenter||this.filters.town||this.filters.country||this.filters.skills?.length>0||this.filters.availability?.length>0||this.filters.county||this.filters.state||this.filters.name||this.filters.customField?.length>0||this.filters.fullMember||this.filters.feeType||this.filters.userType||this.filters.permission?.length>0||this.filters.professionIndustry||null!==this.filters.clusterLat},mobileFiltersCount(){let e=0;return this.filters.name&&e++,this.filters.status&&"ACTIVE"!==this.filters.status&&e++,this.filters.feeStatus&&e++,this.filters.ageGroup&&e++,(this.filters.dateJoinedFrom||this.filters.dateJoinedTo)&&e++,this.filters.town&&e++,this.filters.country&&e++,this.filters.county&&e++,this.filters.state&&e++,this.filters.localCenter&&e++,this.filters.fullMember&&e++,this.filters.feeType&&e++,this.filters.userType&&e++,this.filters.permission?.length>0&&e++,this.filters.customField?.length>0&&e++,this.filters.skills?.length>0&&e++,this.filters.availability?.length>0&&e++,this.filters.professionIndustry&&e++,e},filteredLocalCenters(){if(!this.localCenterSearch)return this.localCenters;const e=this.localCenterSearch.toLowerCase();return this.localCenters.filter(t=>{const i=this.localCenterNameSelector(t,this.tenant).toLowerCase();return i.includes(e)})}},methods:{localCenterNameSelector:ds.Hc,sortLocalCenters:ds.KN,customFieldValue:ds.cn,copyToClipboard:ds.lW,toggleFullscreenList(){this.isFullscreenList?this.exitFullscreenList():(this.isFullscreenList=!0,document.body.style.overflow="hidden",document.addEventListener("keydown",this.handleFullscreenEscKey),this.$nextTick(()=>{this.$refs.userMap?.invalidateMapSize()}))},exitFullscreenList(){this.isFullscreenList&&(this.isFullscreenList=!1,document.body.style.overflow="",document.removeEventListener("keydown",this.handleFullscreenEscKey),this.$nextTick(()=>{this.$refs.userMap?.invalidateMapSize()}))},handleFullscreenEscKey(e){"Escape"===e.key&&this.exitFullscreenList()},memberLocation(e){return(0,ds.D2)(e.townCurrent,this.tenant)},memberAffiliation(e){return(0,ds.mF)(e,this.tenant)},copyToClipboardAndSnackbar(e){this.copyToClipboard(e),this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-info",duration:500,actionText:null})},copyClipboardJoinLink(){this.copyToClipboard("https://"+this.tenant.appHost+"/group/"+this.unitId+"/join"),this.$buefy.toast.o
1pen({message:this.$t("urlCopiedToClipboard"),type:"is-info",duration:500,actionText:null})},onFilterBarChange:qn()(function(){this.filterItems(!0),this.fetchCountryCounts(),this.isMapView&&this.$nextTick(()=>{if(this.isMapRegionLevel)this.startMapRegionLevel();else if(this.$refs.userMap&&this.$refs.userMap.$refs.map&&this.$refs.userMap.$refs.map.leafletObject){const e=this.$refs.userMap.$refs.map.leafletObject,t=e.getBounds(),i=e.getZoom();this.loadMapItems(t,i,!0)}})},800),setDesktopView(e){if("map"===e){if(this.isMapView)return;return this.setGalleryOnly(!1),void this.toggleMapView()}this.setGalleryOnly("gallery"===e),this.isMapView&&this.toggleMapView()},setGalleryOnly(e){this.isGalleryOnly=e,this.$store.state.listValues.user.isGalleryOnly=e},setViewMode(e){if("map"===e)return void(this.isMapView||(this.setGalleryOnly(!1),this.toggleMapView()));this.setGalleryOnly(!1);const t="gallery"===e;if(!this.isMapView&&this.isGallery===t)return;const i=this.isMapView;this.isGallery=t,this.isMapView=!1,this.currentMapBounds=null,this.$store.state.listValues.user.isGallery=t,this.$store.state.listValues.user.isMapView=!1,i&&(this.itemsPageCurrent=1,this.loadItemsPage())},toggleMapView(){const e=this.isMapView;this.isMapView=!this.isMapView,this.isMapView?(this.hasAutoZoomedForTown=!1,this.mapInitialLoadComplete=!1,this.currentMapBounds=null,this.isInitialMapLoad=!0,this.$nextTick(()=>{this.itemsPageCurrent=1,this.loadItemsPage(),this.startMapRegionLevel()})):(this.currentMapBounds=null,e&&(this.itemsPageCurrent=1,this.loadItemsPage())),this.$store.state.listValues.user.isMapView=this.isMapView},handleMapBoundsChanged(e,t){if(this.currentMapZoom=t||6,this.isPaginationChange)return;if(this.pendingAutoZoomBounds&&this.$refs.userMap){const e=this.$refs.userMap.$refs.map?.leafletObject;if(e){this.isProgrammaticZoom=!0,this.hasAutoZoomedForTown=!0;const t=()=>{e.off("moveend",t),setTimeout(()=>{this.isProgrammaticZoom=!1},100)};return e.once("moveend",t),this.$refs.userMap.fitBoundsToActual(this.pendingAutoZoomBounds),void(this.pendingAutoZoomBounds=null)}}if(!this.mapInitialLoadComplete&&this.isMapView)return;if(this.isMapView&&this.allMapUsers&&this.allMapUsers.length>0)return this.currentMapBounds=e,void this.filterMapUsersByBounds(e);const i=!this.currentMapBounds||Math.abs((this.currentMapBounds.north||0)-(e.north||0))>.001||Math.abs((this.currentMapBounds.south||0)-(e.south||0))>.001||Math.abs((this.currentMapBounds.east||0)-(e.east||0))>.001||Math.abs((this.currentMapBounds.west||0)-(e.west||0))>.001;this.currentMapBounds=e,this.isProgrammaticZoom||this.isPaginationChange||!i||this.debouncedLoadMapData(e,t)},startMapRegionLevel(){this.isMapView&&this.isMapRegionLevel&&(this.loadMapPolygons(),this.loadMapRegions())},refreshMapRegionBounds(){this.mapRegionBounds=(0,fh.bU)(this.mapLevel,this.mapRegions,this.mapCountry,this.mapRegionGeoJson)},loadMapRegions(){if(!this.isMapView||!this.isMapRegionLevel)return;this.mapRegionsCancelToken&&this.mapRegionsCancelToken.cancel("New map region request initiated");const e=bh.A.CancelToken.source();this.mapRegionsCancelToken=e,this.isLoadingRegions=!0;const t=this.buildMapFilterParams();t.append("level",(0,fh.om)(this.mapLevel)),this.$http.plain.get("/map-regions?"+t.toString(),{cancelToken:e.token}).then(e=>{this.mapRegions=e.data.regions||[],this.mapRegionUnassigned=e.data.unassignedCount||0,this.refreshMapRegionBounds()}).catch(e=>{bh.A.isCancel(e)||(console.log(e),this.mapRegions=[],this.mapRegionBounds=null)}).finally(()=>{this.isLoadingRegions=!1})},fetchCountryCounts(){if(!this.isTownScoped)return;const e=this.buildMapFilterParams();["country","county","state","townCurrent"].forEach(t=>e.delete(t)),e.append("level","country");const t=e.toString();t!==this.countryCountsKey&&(this.countryCountsKey=t,this.$http.plain.get("/map-regions?"+t).then(e=>{this.countryCounts=e.data.regions||[]}).catch(e=>{console.log(e),this.countryCountsKey=null}))},currentPolygonFile(){return(0,fh.qv)(this.mapCountry?.code,this.filters.state)},loadMapPolygons(){const e=this.mapLevel;if(e===fh.OC)return void(this.mapRegionGeoJson=null);if(e===fh.uK)return void i.e(6478).then(i.bind(i,86478)).then(e=>{this.mapLevel===fh.uK&&(this.mapRegionGeoJson=e.geoData)}).catch(e=>{console.log(e),this.mapRegionGeoJson=null});const t=this.currentPolygonFile();return(0,fh.qS)(this.mapCountry?.code)&&t?void i(96991)(`./${t}.json`).then(e=>{this.currentPolygonFile()===t&&(this.mapRegionGeoJson=e.default,this.countryPolygonsLoaded=!0)}).catch(()=>{this.currentPolygonFile()===t&&(this.mapRegionGeoJson=null,this.countryPolygonsLoaded=!1)}):(this.mapRegionGeoJson=null,void(this.countryPolygonsLoaded=!1))},handleRegionClicked(e,t=null){if(e&&e.count){if(this.pendingRegionShape=t,this.itemsPageCurrent=1,this.mapLevel===fh.uK){const t={id:e.id,name:e.name,code:e.alpha2,iso3:e.code};this.filters.country=t,this.syncCountryFilter(t)}else if(this.mapLevel===fh.Vd)this.filters.state=e.id;else{const t={id:e.id,name:e.name};this.filters.county=t,this.syncCountyFilter(t)}this.onMapDrillChanged()}},handleRegionBack(){this.itemsPageCurrent=1,this.filters.county?(this.filters.county=null,this.syncCountyFilter(null)):this.filters.state?this.filters.state=null:this.filters.country&&(this.filters.country=null,this.syncCountryFilter(null),this.countryPolygonsLoaded=null),this.onMapDrillChanged()},onMapDrillChanged(){this.mapRegions=[],this.mapRegionBounds=null,this.selectedCluster=null,this.filterItems(),this.$nextTick(()=>
1{if(this.isMapRegionLevel)return void this.startMapRegionLevel();this.mapRegionGeoJson=null;const e=this.pendingRegionShape;this.pendingRegionShape=null;const t=this.$refs.userMap?.enterClusterView(e);t&&this.loadMapItems(t.bounds,t.zoom,!e)})},handleRegionsUnmatched(e){console.log(`[UserMap] ${e.length} region(s) at level "${this.mapLevel}" matched no polygon and are badge-only:`,e.map(e=>e.name))},handleFittingBounds(){this.mapInitialLoadComplete&&(this.isProgrammaticZoom=!0,this.$nextTick(()=>{setTimeout(()=>{this.isProgrammaticZoom=!1},1500)}))},handleMarkerHover(e){const t=e.users?.[0];t?.id?this.resolveHoveredRecord({key:t.id,items:this.items,matches:e=>e.id===t.id,placeholder:{...t,fullName:"",townCurrent:null,type:null},fetchOne:e=>this.$http.plain.get("/users-map-list",{params:{id:e}}).then(e=>(e.data["hydra:member"]||[])[0])}):this.handleMarkerLeave()},handleMarkerLeave(){this.clearHoveredRecord()},handleClusterClick(e){try{if(!e||0===e.count)return;this.selectedCluster=null,this.filters.clusterLat=null,this.filters.clusterLng=null,this.filters.clusterPrecision=null,this.autoSelectClusterAfterZoom=!1,this.itemsPageCurrent=1,this.isProgrammaticZoom=!0,this.$nextTick(()=>{this.zoomToCluster(e)}).catch(e=>{console.error("Error in nextTick:",e),this.filterItems(),this.isProgrammaticZoom=!1})}catch(t){console.error("Error in handleClusterClick:",t),this.isProgrammaticZoom=!1}},zoomToCluster(e){try{if(this.$refs.userMap&&this.$refs.userMap.$refs.map&&this.$refs.userMap.$refs.map.leafletObject){const t=this.$refs.userMap.$refs.map.leafletObject;if(!this.originalMapPosition){const e=t.getCenter();this.originalMapPosition=[e.lat,e.lng],this.originalMapZoom=t.getZoom()}const i=e.users&&e.users.length>0&&e.users.length===e.count&&void 0!==e.users[0].townLat;if(i){const i=[];if(e.users.forEach(e=>{const t=parseFloat(e.townLat),s=parseFloat(e.townLng);isNaN(t)||isNaN(s)||i.push([t,s])}),i.length>0){const e=()=>{t.off("zoomend",e),this.isProgrammaticZoom=!1};t.once("zoomend",e),t.fitBounds(i,{padding:[50,50],maxZoom:18,animate:!0,duration:1})}else this.isProgrammaticZoom=!1}else{const i=[e.lat,e.lng],s=e.count>50?1:e.count>20?2:3,a=Math.min(t.getZoom()+s,15),n=()=>{t.off("zoomend",n),this.isProgrammaticZoom=!1};t.once("zoomend",n),t.setView(i,a,{animate:!0,duration:1})}}else this.filterItems(),this.isProgrammaticZoom=!1}catch(t){console.error("Error zooming to cluster:",t),this.filterItems(),this.isProgrammaticZoom=!1}},clearClusterSelection(){try{if(this.selectedCluster=null,this.filters.clusterLat=null,this.filters.clusterLng=null,this.filters.clusterPrecision=null,this.itemsPageCurrent=1,this.originalMapPosition&&this.$refs.userMap&&this.$refs.userMap.$refs.map){const e=this.$refs.userMap.$refs.map.leafletObject;if(e){this.isProgrammaticZoom=!0;const t=()=>{e.off("zoomend",t),this.originalMapPosition=null,this.originalMapZoom=null,this.isProgrammaticZoom=!1;const i=e.getBounds();this.loadMapItems({north:i.getNorth(),south:i.getSouth(),east:i.getEast(),west:i.getWest()},e.getZoom())};e.once("zoomend",t),e.setView(this.originalMapPosition,this.originalMapZoom,{animate:!0,duration:1})}}else if(this.$refs.userMap&&this.$refs.userMap.$refs.map){const e=this.$refs.userMap.$refs.map.leafletObject,t=e.getBounds();this.loadMapItems({north:t.getNorth(),south:t.getSouth(),east:t.getEast(),west:t.getWest()},e.getZoom())}this.filterItems()}catch(e){console.error("Error clearing cluster selection:",e)}},getCurrentClusterPrecision(){const e=this.currentMapZoom||6;return e>=15?3:e>=12||e>=9?2:0},loadLocalCenters(){if(!(this.localCenters.length>0||this.isLoadingLocalCenters))return this.tenant.settingFeatures.localCenter.isActive?(this.isLoadingLocalCenters=!0,this.$http.plain.get("/local_centers_all?isActive=1&tenantSlug="+this.tenant.slug).then(e=>{this.localCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>console.error(e)).finally(()=>{this.isLoadingLocalCenters=!1})):void 0},initIsGallery(){null!==this.$store.state.listValues.user.isGallery&&void 0!==this.$store.state.listValues.user.isGallery?this.isGallery=this.$store.state.listValues.user.isGallery:this.isGallery=!this.isGranted("ADMIN_TENANT"),this.$store.state.listValues.user.isGallery=this.isGallery},initIsMapView(){null!==this.$store.state.listValues.user.isMapView&&void 0!==this.$store.state.listValues.user.isMapView?this.isMapView=this.$store.state.listValues.user.isMapView:this.isMapView=this.isGeneralUnit,this.$store.state.listValues.user.isMapView=this.isMapView,this.isGalleryOnly=!this.isMapView&&!0===this.$store.state.listValues.user.isGalleryOnly,this.$store.state.listValues.user.isGalleryOnly=this.isGalleryOnly,this.isMapView&&(this.mapInitialLoadComplete=!1,this.currentMapBounds=null,this.isInitialMapLoad=!0,this.$nextTick(()=>{this.itemsPageCurrent=1,this.loadItemsPage(),this.startMapRegionLevel()}))},initSortField(){this.sortField||(this.unitId&&"LocalCenter"===this.unitDiscriminator?(this.sortField="type.position",this.sortOrder="asc",this.$store.state.listValues.user.sortField=this.sortField,this.$store.state.listValues.user.sortOrder="asc"):(this.sortField="dateUpdated",this.sortOrder="DESC",this.$store.state.listValues.user.sortField=this.sortField,this.$store.state.listValues.user.sortOrder="DESC"))},loadUnitUserRoles(){this.unitItem&&"Unit"===this.unitItem["@type"]&&!this.unitItem.isRoleGroup?this.$http.plain.get("/user_roles?unit="+this.unitItem.id+"&exists[dateEnded
1]=false&itemsPerPage=200").then(e=>{this.unitUserRoles=mh(e.data["hydra:member"])}).catch(e=>{console.log(e)}):this.unitUserRoles={}},isUnitAdminRow(e){return(this.unitUserRoles[e.id]||[]).some(e=>e.isAdmin)},toggleUnitAdmin(e){const t=ph(this.unitUserRoles[e.id]);t.length&&(this.isLoading=!0,Promise.all(t.map(e=>this.$http.plain.post("/user_role_group_admin/"+e.id))).then(()=>{this.$buefy.snackbar.open(this.$t("saved"))}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1,this.loadUnitUserRoles()}))},updateGroupAdmin(e,t){this.isLoading=!0,this.$http.plain.post("/user_role_group_admin/"+e).then(e=>{this.items[t].isAdmin=e.data.isAdmin,this.$buefy.snackbar.open(this.$t("saved"))}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},resetFiltersForPrivateGroup(){this.filters.status="ACTIVE",this.filters.town=null,this.filters.permission=[],this.filters.fullMember=null,this.filters.customField=null,this.filters.skills=[],this.filters.availability=[],this.filters.userType=null},loadUnapprovedItems(){this.filters.status="UNAPPROVED",this.filterItems()},isAdvancedOption(e){return!!this.advancedOptions&&this.advancedOptions.includes(e)},loadTotalUnapproved(){if(!this.tenant.settingFeatures.users.hasManualApprove||"UNAPPROVED"===this.filters.status||!this.isGranted("ADMIN_LOCAL"))return!1;this.unitId&&this.user.localCenter&&this.user.localCenter.id===this.unitId&&this.isGranted("ADMIN_LOCAL")?this.$http.plain.get("/users/status-count/"+this.unitId).then(e=>{let t=e.data.find(e=>"UNAPPROVED"===e.status);this.totalUnapproved=void 0!==t?t.number:0}).catch(e=>{console.error(e)}):this.isGeneralUnit&&this.isGranted("HR_TENANT")&&this.$http.plain.get("/users/status-count/0").then(e=>{let t=e.data.find(e=>"UNAPPROVED"===e.status);this.totalUnapproved=void 0!==t?t.number:0}).catch(e=>{console.error(e)})},setGeneralUnitAccess(){let e=this.$store.state.tenant.settingFeatures.users.seeMembersInGeneralUnitGroup;this.isGeneralUnit&&e&&this.isGranted(e)&&(this.isGeneralUnitAccess=!0,!this.isGranted("HR_TENANT")||this.tenant.roleGroups&&0!==this.tenant.roleGroups?.length||this.$http.plain.get("/tenant-role-groups").then(e=>{this.tenant.roleGroups=e.data["hydra:member"]}).catch(e=>console.error(e)))},addTownFilter(e){this.filters.town=e,this.isFilter=!0,this.filterItems()},addCountryFilter(e){this.filters.country=e,this.isFilter=!0,this.filterItems()},addCountyFilter(e){this.filters.county=e,this.isFilter=!0,this.filterItems()},onFilterBarUpdate(e){!e.town&&this.filters.town&&(this.$store.state.filterByTown={}),!e.country&&this.filters.country&&(this.$store.state.filterByCountry={}),!e.county&&this.filters.county&&(this.$store.state.filterByCounty={}),Object.assign(this.filters,e)},syncTownFilter(e){this.$store.state.filterByTown=e&&"object"===typeof e?e:{}},syncCountryFilter(e){this.$store.state.filterByCountry=e&&"object"===typeof e?e:{}},syncCountyFilter(e){this.$store.state.filterByCounty=e&&"object"===typeof e?e:{}},removeFilters(){if(this.filters.status="ACTIVE",this.filters.feeStatus=null,this.filters.ageGroup=null,this.filters.cardId=null,this.filters.name=null,this.filters.fullMember=null,this.filters.town=null,this.filters.country=null,this.filters.county=null,this.filters.state=null,this.$store.state.filterByTown={},this.$store.state.filterByCountry={},this.$store.state.filterByCounty={},this.filters.userType=null,this.filters.feeType=null,this.filters.permission=[],this.filters.customField=[],this.filters.skills=[],this.filters.availability=[],this.filters.localCenter=null,this.filters.professionIndustry=null,this.filters.clusterLat=null,this.filters.clusterLng=null,this.filters.clusterPrecision=null,this.selectedCluster=null,this.isFilter=!1,this.itemsPageCurrent=1,this.originalMapPosition&&this.$refs.userMap&&this.$refs.userMap.$refs.map){const e=this.$refs.userMap.$refs.map.leafletObject;if(e){this.isProgrammaticZoom=!0;const t=()=>{e.off("zoomend",t),this.originalMapPosition=null,this.originalMapZoom=null,this.isProgrammaticZoom=!1;const i=e.getBounds();this.loadMapItems({north:i.getNorth(),south:i.getSouth(),east:i.getEast(),west:i.getWest()},e.getZoom())};e.once("zoomend",t),e.setView(this.originalMapPosition,this.originalMapZoom,{animate:!0,duration:1})}}this.filterItems()},addMember(e){e&&(this.isLoading=!0,this.$http.plain.post("/user_roles",{user:"/api/v1/users/"+e.id,unit:this.$store.state.currentGroup["@id"],isAdmin:this.isRoleGroupAdminList}).then(e=>(this.$buefy.snackbar.open({message:this.$t("memberAdded")}
1),this.loadItemsPage())).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1}))},filterItemsByWord:qn()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return!1;this.filterItems()},400),filterItems(e=!1,t=!1){!t&&e&&(this.hasAutoZoomedForTown=!1,this.isMapView&&(this.currentMapBounds=null)),e&&(this.itemsPageCurrent=1);let i={};if(this.filters.town&&"object"===typeof this.filters.town&&(this.$store.state.filterByTown=this.filters.town),this.filters.town||null===this.$store.state.filterByTown||(this.$store.state.filterByTown={}),this.filters.country&&"object"===typeof this.filters.country&&(this.$store.state.filterByCountry=this.filters.country),this.filters.country||null===this.$store.state.filterByCountry||(this.$store.state.filterByCountry={}),this.filters.county&&"object"===typeof this.filters.county&&(this.$store.state.filterByCounty=this.filters.county),this.filters.county||null===this.$store.state.filterByCounty||(this.$store.state.filterByCounty={}),i=this.filters.status?{status:this.filters.status}:{...i},i=this.filters.feeStatus?{feeStatus:this.filters.feeStatus,...i}:{...i},i=this.filters.ageGroup?{ageGroup:this.filters.ageGroup,...i}:{...i},i=this.filters.cardId?{cardId:this.filters.cardId,...i}:{...i},i=this.filters.name?{name:this.filters.name,...i}:{...i},i=this.filters.fullMember?{fullMember:this.filters.fullMember,...i}:{...i},i=this.filters.town?{town:"object"===typeof this.filters.town?this.filters.town.id:this.filters.town,...i}:{...i},i=this.filters.country?{country:"object"===typeof this.filters.country?this.filters.country.id:this.filters.country,...i}:{...i},i=this.filters.county?{county:"object"===typeof this.filters.county?this.filters.county.id:this.filters.county,...i}:{...i},i=this.filters.state?{state:this.filters.state,...i}:{...i},i=this.filters.userType?{userType:this.filters.userType,...i}:{...i},i=this.filters.permission&&this.filters.permission.length>0?{permission:this.filters.permission,...i}:{...i},i=this.filters.feeType?{feeType:this.filters.feeType,...i}:{...i},i=this.filters.customField&&this.filters.customField.length>0?{customField:this.filters.customField,...i}:{...i},i=this.filters.skills&&this.filters.skills.length>0?{skills:this.filters.skills,...i}:{...i},i=this.filters.availability&&this.filters.availability.length>0?{availability:this.filters.availability,...i}:{...i},i=this.filters.localCenter?{localCenter:this.filters.localCenter,...i}:{...i},i=this.filters.professionIndustry?{professionIndustry:"object"===typeof this.filters.professionIndustry?this.filters.professionIndustry.id:this.filters.professionIndustry,...i}:{...i},i=null!==this.filters.clusterLat&&null!==this.filters.clusterLng&&null!==this.filters.clusterPrecision?{clusterLat:this.filters.clusterLat,clusterLng:this.filters.clusterLng,clusterPrecision:this.filters.clusterPrecision,...i}:{...i},i=this.isGeneralUnit?{generalUnit:!0,...i}:{...i},i=this.unitId?{unit:this.unitId,...i}:{...i},i={page:e?1:this.itemsPageCurrent,...i},!this.isMapView){const e=t?"replace":"push";this.$router[e]({name:"UserList",query:{...i}}).catch(()=>{})}const s=this.loadItemsPage();s&&s.then&&s.catch(e=>{console.error("Error loading items:",e)}),this.isMapView&&!t&&this.$nextTick(()=>{if(this.$refs.userMap&&this.$refs.userMap.$refs.map&&this.$refs.userMap.$refs.map.leafletObject){const e=this.$refs.userMap.$refs.map.leafletObject,t=e.getBounds(),i=e.getZoom();this.loadMapItems(t,i,!0)}})},loadFeeTenantProduct(){(this.isGeneralUnit||this.isLocalCenter||this.isRoleGroup)&&this.tenant.settingFeatures.fees.productUuid&&(this.isLoading=!0,this.$http.plain.get("/products/"+this.tenant.settingFeatures.fees.productUuid).then(e=>{this.tenantFeePrices=e.data}).catch(e=>{console.error(e)}).finally(()=>this.isLoading=!1))},ageGroupQueryParams(e,t=new Date){if("minor"!==e&&"adult"!==e)return{};const i=(0,ds.vW)(new Date(t.getFullYear()-18,t.getMonth(),t.getDate()));return"minor"===e?{"dateBirth[strictly_after]":i}:{"dateBirth[before]":i}},isMinorAge:ds.dG,getFiltersQueryString(e=!1,t=null){let i="";if(this.filters.status&&(!0===this.isRoleGroup?i+="&user.status="+this.filters.status:i+="&status="+this.filters.status),this.filters.feeStatus&&(i+="&feeStatus="+this.filters.feeStatus,this.isFilter=!0),Object.entries(this.ageGroupQueryParams(this.filters.ageGroup)).forEac
1h(([e,t])=>{i+="&"+e+"="+t,this.isFilter=!0}),this.filters.dateJoinedFrom&&(i+=(this.isRoleGroup?"&user.dateJoined[after]=":"&dateJoined[after]=")+(0,ds.vW)(this.filters.dateJoinedFrom),this.isFilter=!0),this.filters.dateJoinedTo&&(i+=(this.isRoleGroup?"&user.dateJoined[before]=":"&dateJoined[before]=")+(0,ds.vW)(this.filters.dateJoinedTo),this.isFilter=!0),this.filters.cardId&&(!0===this.isRoleGroup?i+="&user.cardId="+encodeURIComponent(this.filters.cardId):i+="&cardId="+encodeURIComponent(this.filters.cardId),this.isFilter=!0),(this.isRoleGroup||this.isPrivateGroup)&&this.unitId&&(i+="&unit="+this.unitId),"LocalCenter"===this.unitDiscriminator?i+="&localCenter="+this.unitId:this.filters.localCenter&&(i+="&localCenter="+this.filters.localCenter),this.filters.feeType&&(i+="&feeTenantProductPrice="+this.filters.feeType,this.isFilter=!0),this.filters.customField&&this.filters.customField.length>0&&this.interestCustomField){let e=this.interestCustomField.id;this.filters.customField.forEach(t=>{i+="&customField[]="+encodeURIComponent(e+"_"+t)}),this.isFilter=!0}if(this.filters.skills&&this.filters.skills.length>0&&this.skillsCustomField){let e=this.skillsCustomField.id;this.filters.skills.forEach(t=>{i+="&customField[]="+encodeURIComponent(e+"_"+t)}),this.isFilter=!0}if(this.filters.availability&&this.filters.availability.length>0&&this.hasAvailability&&(this.filters.availability.forEach(e=>{i+="&availability[]="+encodeURIComponent(e)}),this.isFilter=!0),this.filters.name&&(!0===this.isRoleGroup||this.isPrivateGroup?i+="&user.fullName="+encodeURIComponent(this.filters.name):i+="&fullName="+encodeURIComponent(this.filters.name),this.isFilter=!0),this.filters.permission&&this.filters.permission.length>0&&!this.isRoleGroup&&(i+="&permissions="+this.filters.permission.join(","),this.isFilter=!0),this.filters.town){const e="object"===typeof this.filters.town?this.filters.town.id:this.filters.town;!0===this.isRoleGroup?i+="&user.townCurrent="+e:i+="&townCurrent="+e,this.isFilter=!0}if(this.filters.country){const e="object"===typeof this.filters.country?this.filters.country.id:this.filters.country;!0===this.isRoleGroup?i+="&user.townCurrent.country="+e:i+="&townCurrent.country="+e,this.isFilter=!0}if(this.filters.county){const e="object"===typeof this.filters.county?this.filters.county.id:this.filters.county;!0===this.isRoleGroup?i+="&user.townCurrent.county="+e:i+="&townCurrent.county="+e,this.isFilter=!0}if(this.filters.state&&(!0===this.isRoleGroup?i+="&user.townCurrent.county.state="+encodeURIComponent(this.filters.state):i+="&townCurrent.county.state="+encodeURIComponent(this.filters.state),this.isFilter=!0),this.filters.userType&&(!0===this.isRoleGroup?i+="&user.type="+this.filters.userType:i+="&type="+this.filters.userType,this.isFilter=!0),this.filters.fullMember&&(!0===this.isRoleGroup?i+="&exists[user.isFullMember]="+this.filters.fullMember:i+="&exists[isFullMember]="+this.filters.fullMember),this.filters.professionIndustry){let e="object"===typeof this.filters.professionIndustry?this.filters.professionIndustry.id:this.filters.professionIndustry;!0===this.isRoleGroup?i+="&user.professionIndustry="+e:i+="&professionIndustry="+e,this.isFilter=!0}return null!==this.filters.clusterLat&&null!==this.filters.clusterLng&&null!==this.filters.clusterPrecision&&void 0!==this.filters.clusterPrecision&&(i+="&clusterLat="+this.filters.clusterLat,i+="&clusterLng="+this.filters.clusterLng,i+="&clusterPrecision="+this.filters.clusterPrecision,this.isFilter=!0),!this.isMapView||!this.currentMapBounds||this.filters.clusterLat||e||this.isInitialMapLoad||(i+="&north="+this.currentMapBounds.north,i+="&south="+this.currentMapBounds.south,i+="&east="+this.currentMapBounds.east,i+="&west="+this.currentMapBounds.west),e?(i+="&itemsPerPage="+this.itemsPerPageCSV,t&&(i+="&page="+t)):i+="&page="+this.itemsPageCurrent,this.unitId&&["Unit"].includes(this.unitDiscriminator)&&!this.isRoleGroup&&(i+="&exists[userRoles.dateEnded]=false&userRoles.unit="+this.unitId),i},getOrderQueryString(){let e="order["+this.sortField+"]="+this.sortOrder;return!0===this.isRoleGroup&&(e="order[user."+this.sortField+"]="+this.sortOrder),e},changeListPage(e){if(this.isLoadingMap){const t=setInterval(()=>{this.isLoadingMap||(clearInterval(t),this.performPageChange(e))},100)}else this.performPageChange(e)},performPageChange(e){this.itemsPageCurrent=e,this.isPaginationChange=!0,this.isPaginating=!0,this.filterItems(!1,!0);const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.$nextTick(()=>{setTimeout(()=>{this.isPaginationChange=!1},400)})},loadItemsPage(e=!1){this.itemsRequestCancelToken&&this.itemsRequestCancelToken.cancel("New items request initiated"),this.itemsRequestCancelToken=bh.A.CancelToken.source();const t=this.itemsRequestCancelToken;this.user.localCenter&&this.unitId===this.user.localCenter.id&&(this.filters.localCenter=this.user.localCenter.id);const i=!this.items?.length,s=Date.now(),a=()=>
1{if(this.itemsRequestCancelToken!==t)return;if(!i)return this.isLoadingItems=!1,this.isSorting=!1,void(this.isPaginating=!1);const e=Math.max(0,250-(Date.now()-s));0===e?(this.isLoadingItems=!1,this.isSorting=!1,this.isPaginating=!1):setTimeout(()=>{this.itemsRequestCancelToken===t&&(this.isLoadingItems=!1,this.isSorting=!1,this.isPaginating=!1)},e)};this.isLoadingItems=!0,this.noResults=!1;let n=this.getOrderQueryString(),o=this.getFiltersQueryString();if(!this.isRoleGroup&&!this.isPrivateGroup){const e=this.isMapView?"/users-map-list?":"/users?";return this.$http.plain.get(e+n+o,{cancelToken:this.itemsRequestCancelToken.token}).then(e=>{if(!this.isUserRoleList&&(this.items=e.data["hydra:member"]||[],this.itemsPerPage=50,this.itemsTotal=e.data["hydra:totalItems"]||0,this.isMoreThanOnePage=this.itemsTotal>this.itemsPerPage,this.noResults=!this.items?.length,this.isMapView&&e.data.actualBounds&&!this.currentMapBounds)){const t=e.data.actualBounds;this.currentMapBounds=t,this.isProgrammaticZoom=!0,this.loadMapItems(t,this.currentMapZoom||6),this.$refs.userMap&&this.$refs.userMap.fitBoundsToActual&&this.$refs.userMap.fitBoundsToActual(t),this.mapInitialLoadComplete=!0,this.isInitialMapLoad=!1,setTimeout(()=>{this.isProgrammaticZoom=!1},800)}}).catch(e=>{bh.A.isCancel(e)||console.error(e)}).finally(a)}return this.isPrivateGroup||this.isRoleGroupAdminList?(o+="&exists[dateEnded]=false",this.$http.plain.get("/user_roles?"+n+o,{cancelToken:this.itemsRequestCancelToken.token}).then(e=>{if(this.isUserRoleList){this.items=e.data["hydra:member"],this.itemsPerPage=20,this.itemsTotal=e.data["hydra:totalItems"],this.isMoreThanOnePage=this.itemsTotal>this.itemsPerPage,this.noResults=!this.items.length;for(let e of this.items)e.user&&e.user.id===this.user.id&&(this.isPrivateGroupAdmin=e.isAdmin||this.unitItem&&this.unitItem.owner?.id===this.user?.id)}}).catch(e=>{bh.A.isCancel(e)||(console.error(e),this.isPrivateGroupAdmin=this.unitItem&&this.unitItem.owner?.id===this.user?.id,this.items=[],this.itemsTotal=0,this.noResults=!0,this.isLoadingItems=!1)}).finally(a)):this.isRoleGroup&&!this.isRoleGroupAdminList?this.$http.plain.get("/user_unit_role_groups?"+n+o,{cancelToken:this.itemsRequestCancelToken.token}).then(e=>{if(!this.isUserRoleList){this.items=[];for(let t of e.data["hydra:member"])this.items.push(t.user);if(this.itemsPerPage=50,this.itemsTotal=e.data["hydra:totalItems"],this.isMoreThanOnePage=this.itemsTotal>this.itemsPerPage,this.noResults=!this.items.length,this.isMapView&&!this.mapInitialLoadComplete){const e={north:85,south:-85,east:180,west:-180};this.isProgrammaticZoom=!0,this.loadMapItemsForRoleGroup(e,this.currentMapZoom||6)}}}).catch(e=>{bh.A.isCancel(e)||console.error(e)}).finally(a):void 0},autoFitMapToUsers(){if(!this.mapItems||0===this.mapItems.length)return;let e=1/0,t=-1/0,i=1/0,s=-1/0;if(this.mapItems.forEach(a=>{const n=a.mapLatitude||a.townCurrent?.latitude,o=a.mapLongitude||a.townCurrent?.longitude;n&&o&&(e=Math.min(e,n),t=Math.max(t,n),i=Math.min(i,o),s=Math.max(s,o))}),e!==1/0&&this.$refs.userMap){const a={north:t,south:e,east:s,west:i};this.$nextTick(()=>{this.$refs.userMap&&this.$refs.userMap.fitBoundsToActual&&this.$refs.userMap.fitBoundsToActual(a)})}},filterMapUsersByBounds(e){if(!this.allMapUsers||!e)return;const t=e.getNorth?e.getNorth():e.north,i=e.getSouth?e.getSouth():e.south,s=e.getEast?e.getEast():e.east,a=e.getWest?e.getWest():e.west;this.mapItems=this.allMapUsers.filter(e=>{const n=e.mapLatitude||e.townCurrent?.latitude,o=e.mapLongitude||e.townCurrent?.longitude;return!(!n||!o)&&(n>=i&&n<=t&&o>=a&&o<=s)})},loadMapItems(e,t,i=!1){if(!e)return;if(this.isMapRegionLevel)return;this.mapRequestCancelToken&&this.mapRequestCancelToken.cancel("New map request initiated"),this.mapRequestCancelToken=bh.A.CancelToken.source(),this.isLoadingMap=!0;const s=e.getNorth?e.getNorth():e.north,a=e.getSouth?e.getSouth():e.south,n=e.getEast?e.getEast():e.east,o=e.getWest?e.getWest():e.west,l=this.$refs.userMap?.zoomForBounds({north:s,south:a,east:n,west:o});let r=this.buildMapFilterParams();r.append("north",s),r.append("south",a),r.append("east",n),r.append("west",o),r.append("zoom",l??t??6),this.$http.plain.get("/map-clusters?"+r.toString(),{cancelToken:this.mapRequestCancelToken.token}).then(e=>
1{this.mapItems=e.data.clusters||[],i&&e.data.actualBounds&&this.$refs.userMap&&this.$refs.userMap.fitBoundsToActual&&(this.isProgrammaticZoom=!0,this.currentMapBounds=e.data.actualBounds,this.$refs.userMap.fitBoundsToActual(e.data.actualBounds),setTimeout(()=>{this.isProgrammaticZoom=!1},800))}).catch(e=>{bh.A.isCancel(e)||(console.error(e),this.mapItems=[])}).finally(()=>{this.isLoadingMap=!1})},buildMapFilterParams(){const e=new URLSearchParams;if(this.filters.permission&&this.filters.permission.length>0&&e.append("permission",this.filters.permission.join(",")),this.filters.feeType&&e.append("feeType",this.filters.feeType),this.filters.feeStatus&&e.append("feeStatus",this.filters.feeStatus),this.filters.name&&e.append("fullName",this.filters.name),this.filters.status&&e.append("status",this.filters.status),this.filters.userType&&e.append("userType",this.filters.userType),this.filters.professionIndustry){const t="object"===typeof this.filters.professionIndustry?this.filters.professionIndustry.id:this.filters.professionIndustry;e.append("professionIndustry",t)}if("LocalCenter"===this.unitDiscriminator&&this.unitId?e.append("localCenter",this.unitId):this.filters.localCenter&&e.append("localCenter",this.filters.localCenter),this.filters.town){const t="object"===typeof this.filters.town?this.filters.town.id:this.filters.town;e.append("townCurrent",t)}if(this.filters.country){const t="object"===typeof this.filters.country?this.filters.country.id:this.filters.country;e.append("country",t)}if(this.filters.county){const t="object"===typeof this.filters.county?this.filters.county.id:this.filters.county;e.append("county",t)}if(this.filters.state&&e.append("state",this.filters.state),null!==this.filters.fullMember&&void 0!==this.filters.fullMember&&e.append("fullMember",this.filters.fullMember),this.filters.customField&&this.filters.customField.length>0&&this.interestCustomField){let t=this.interestCustomField.id;this.filters.customField.forEach(i=>{e.append("customField[]",t+"_"+i)})}if(this.filters.skills&&this.filters.skills.length>0&&this.skillsCustomField){let t=this.skillsCustomField.id;this.filters.skills.forEach(i=>{e.append("customField[]",t+"_"+i)})}return this.filters.availability&&this.filters.availability.length>0&&this.hasAvailability&&this.filters.availability.forEach(t=>{e.append("availability[]",t)}),!this.isLocalCenter&&this.unitId&&"LocalCenter"!==this.unitDiscriminator&&e.append("unit",this.unitId),e},loadMapItemsForRoleGroup(e,t){if(!e)return;this.mapRequestCancelToken&&this.mapRequestCancelToken.cancel("New map request initiated"),this.mapRequestCancelToken=bh.A.CancelToken.source(),this.isLoadingMap=!0;const i=e.getNorth?e.getNorth():e.north,s=e.getSouth?e.getSouth():e.south,a=e.getEast?e.getEast():e.east,n=e.getWest?e.getWest():e.west;let o=new URLSearchParams({north:i,south:s,east:a,west:n,zoom:t||6});if(this.unitId&&o.append("unit",this.unitId),this.filters.status&&o.append("status",this.filters.status),this.filters.town){const e="object"===typeof this.filters.town?this.filters.town.id:this.filters.town;o.append("townCurrent",e)}if(this.filters.country){const e="object"===typeof this.filters.country?this.filters.country.id:this.filters.country;o.append("country",e)}if(this.filters.county){const e="object"===typeof this.filters.county?this.filters.county.id:this.filters.county;o.append("county",e)}this.filters.state&&o.append("state",this.filters.state),this.$http.plain.get("/map-clusters?"+o.toString(),{cancelToken:this.mapRequestCancelToken.token}).then(e=>{this.mapItems=e.data.clusters||[],e.data.actualBounds&&this.$refs.userMap&&this.$refs.userMap.fitBoundsToActual&&(this.currentMapBounds=e.data.actualBounds,this.$refs.userMap.fitBoundsToActual(e.data.actualBounds)),this.mapInitialLoadComplete=!0,this.isInitialMapLoad=!1,setTimeout(()=>{this.isProgrammaticZoom=!1},800)}).catch(e=>{bh.A.isCancel(e)||(console.error(e),this.mapItems=[])}).finally(()=>{this.isLoadingMap=!1})},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.itemsPerPage=null,this.$store.state.listValues.user.sortField=e,this.$store.state.listValues.user.sortOrder=t,this.isSorting=!0,this.loadItemsPage()},confirmDeleteFromGroup(e,t){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" <b>"+e.user.fullName+"</b> "+this.$t("From")+" "+this.unitItem.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deleteFromGroup(e,t)})},confirmDeleteUser(e,t){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" <b>"+e.fullName+"</b> "+this.$t("From")+" "+this.unitItem.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deleteUser(e,t)})},deleteFromGroup(e,t){this.isLoading=!0,this.$http.plain.delete("/user_role_group_delete/"+e.id).then(e=>this.deleteSuccess(t)).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},deleteUser(e,t){let i={status:"DELETED"};this.isLoading=!0,this.$http.plain.patch("/users/"+e.id,i).then(e=>this.deleteSuccess(t)).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},deleteSuccess(e){this.items.splice(e,1),this.$store.state.currentGroup.userRoles=this.items,this.$buefy.snackbar.open(this.$t("deleted")),this.loadItemsPage()},error(e){console.error(e)},changeStatus(e,t){const i="ACTIVE"===t?this.$t("Are you sure you want to approve this user?"):this.$t("Are you sure you want to add this user to the waiting list?");this.$buefy.dialog.confirm({title:"ACTIVE"===t?this.$t("approve"):this.$t("addToWaitingList"),message:i,confirmText:this.$t("confirm"),cancelText:this.$t("cancel"),type:"ACTIVE"===t?"is-success":"is-warning",onConfirm:()=>{let i={};i.status=t,this.isLoading=!0,this.$http.plain.patch("/users/"+e,i).then(e=>{this.saveSuccess(e),this.loadItemsPage()}).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})}})},saveSuccess(e){return this.$buefy.snackbar.open({message:this.$t("saved")})},csvExportPrompt(){const e=this.$t("Export"),t=this.$t("Are you sure you want to download this list?");if(this.itemsTotal<=this.itemsPerPageCSV)this.$buefy.dialog.confirm({title:e,message:t,confirmText:this.$t("Export"),type:"is-primary",onConfirm:()=>{this.csvExport()}});else{const i=Math.ceil(this.itemsTotal/this.itemsPerPageCSV);this.$buefy.dialog.prompt({title:e,message:t,inputAttrs:{type:"number",placeholder:this.itemsTotal+" "+this.$t("profiles")+", "+i+" "+this.$t("pages. Type the page number."),min:1,max:i},trapFocus:!0,confirmText:this.$t("Export"),type:"is-primary",onConfirm:e=>{this.csvExport(e)}})}},csvExport(e=null){this.isLoadingCSV=!0;let t=this.getOrderQueryString(),i=this.getFiltersQueryString(!0,e),s="/"+(this.isRoleGroup?"users-role-group-csv":"users-csv");return this.$http.plain.get(s+"?"+t+i,{responseType:"blob",headers:{Accept:"text/csv"}}).then(e=>{const t=window.URL.createObjectURL(new Blob([e.data])),i=document.createElement("a");i.href=t,i.style.display="none",i.setAttribute("download","orgo-profiles-export.csv"),document.body.appendChild(i),i.click(),setTimeout(()=>{document.body.removeChild(i),window.URL.revokeObjectURL(t)},100)}).catch(e=>console.error(e)).finally(()=>{this.isLoadingCSV=!1})},getFilteredTags(e){this.filteredTags=this.hideableColumns.filter(t=>t.toString().toLowerCase().indexOf(e.toLowerCase())>=0)},localUnit(e){if(this.unitItem.localUnits){let t=this.unitItem.localUnits.find(t=>
1t.id==e);if(t)return t.name}return null},retrieveUnit(){this.isLoading=!0,this.$http.plain.get("/units/"+this.unitId).then(e=>{this.unitItem=e.data}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},openUserModal(e){this.selectedUserId=e,this.selectedUser=this.items?.find(t=>t.id===e)||null,this.isUserModalVisible=!0},closeUserModal(){this.isUserModalVisible=!1,this.selectedUserId=null,this.selectedUser=null},handleUserLoaded(e){this.selectedUser=e},handleUserRefresh(){this.loadItemsPage()},triggerImpersonate(){this.$refs.userShowContent&&this.$refs.userShowContent.impersonateAs&&this.$refs.userShowContent.impersonateAs()},openCreateModal(){this.isCreateModalVisible=!0},openInviteModal(){this.isInviteModalVisible=!0},closeInviteModal(){this.isInviteModalVisible=!1},closeCreateModal(){this.isCreateModalVisible=!1},handleUserCreated(e){this.closeCreateModal(),this.loadItemsPage(),e&&e.id&&this.openUserModal(e.id)}},components:{FontAwesomeIcon:zs.gc,ListFilterBar:Eh.A,CountryAutocomplete:Ch.A,CountyAutocomplete:Lh.A,MemberDirectoryCard:wh.A,GroupHeader:vh.A,UserSearchAutocomplete:kh.A,LogoThumbnail:rc.A,CustomFieldWidget:It.A,UserTypeThumbnail:xt.A,TownAutocomplete:Mt.A,ProfessionIndustryList:hs.A,UserMap:$h.A,ItemViewModal:Jn.A,UserShowContent:Fh["default"],UserCreateContent:Fg,ProfileReferralTab:Tg.A,MobileFilterSheet:Sg.A,MobileFilterSection:Ag.A,MobileViewHeader:Pg.A},mixins:[yh.A,_h.A]};const Mg=(0,Li.A)(Ig,[["render",uh],["__scopeId","data-v-72b98f6a"]]);var xg=Mg;const Ng={key:1,class:"o-minwidth"},Ug={class:"icon"},Dg={key:0,class:"mobile-completion-bar-container"},Xg={key:1,class:"is-flex is-justify-content-space-between is-align-items-center mt-2 mb-4"},Vg={class:"is-flex is-align-items-center"},Rg={class:"is-size-4 has-text-weight-bold user-fullname m-0"},Og={class:"is-flex is-align-items-center gap-2"},Qg={class:"icon-text"},Bg={class:"icon is-small"},Gg={class:"user-tabs-bg"},Wg={key:0,class:"columns"},jg={class:"column"},zg={key:7,class:"card mt-5 p-5 pb-6"},qg={class:"has-text-weight-semibold has-text-grey-dark"},Jg={key:8,class:"card mt-5 p-5 pb-6"},Hg={class:"has-text-weight-semibold has-text-grey-dark"},Kg=["disabled"],Yg={class:"icon-text"},Zg={class:"icon"},ef={class:"text"},tf={class:"column is-one-quarter"},sf={class:"sticky"},af={class:"control"},nf={class:"columns is-gapless"},of={ref:"settingsContainer",class:"column"},lf={class:"is-hidden-desktop"},rf={key:0,class:"is-inline-block mr-2 mb-2"},df={key:1,class:"is-inline-block mr-2 mb-2"},cf={key:2,class:"is-inline-block mr-2 mb-2"},uf={key:3,class:"is-inline-block mr-2 mb-2"},mf={key:4,class:"is-inline-block mr-2 mb-2"},pf={key:5,class:"is-inline-block mr-2 mb-2"},hf={key:6,class:"is-inline-block mr-2 mb-2"},gf={class:"mt-4"},ff={class:"mb-5"},bf={class:"mb-3 is-size-6 has-text-weight-semibold"},yf={key:0,class:"has-text-grey"},vf={key:1,class:"orgo-table-wrap"},kf={class:"is-flex is-align-items-center"},Cf=["onClick"],Lf={class:"mt-4"},wf=["disabled"],_f={class:"mt-4"},Ef={class:"control mt-6"},$f=["disabled"],Ff={key:0},Tf={key:0,class:"notification is-warning is-light mb-5"},Sf={class:"is-italic is-size-7 mt-4"},Af={class:"control mt-5"},Pf=["disabled"],If={key:1},Mf={class:"mb-4"},xf={class:"notification is-info is-light mb-4"},Nf={class:"is-flex is-align-items-center gap-3 mt-5"},Uf=["disabled"],Df=["disabled"],Xf=["disabled"],Vf={class:"mb-4"},Rf=["disabled"],Of={class:"mt-4"},Qf={key:0,class:"mt-4 has-text-success"},Bf={class:"control mt-5"},Gf=["disabled"],Wf={key:0},jf={class:"is-italic is-size-7 mt-4"},zf={class:"control mt-5"},qf=["disabled"],Jf={key:1},Hf={class:"notification is-info is-light mb-4"},Kf={class:"has-text-weight-semibold mb-2"},Yf={class:"is-flex is-align-items-center gap-3 mt-5"},Zf=["disabled"],eb=["disabled"],tb=["disabled"],ib={key:2},sb={class:"notification is-success is-light mb-4"},ab={class:"has-text-weight-semibold mb-2"},nb={class:"notification is-info is-light mb-4"},ob={class:"is-flex is-align-items-center gap-3 mt-5"},lb=["disabled"],rb=["disabled"],db={class:"control mt-5"},cb=["disabled"],ub={key:0,class:"mb-6"},mb={class:"mt-4"},pb={key:1,class:"mb-6"},hb={class:"mb-4"},gb={key:2,class:"mb-6"},fb={class:"mb-4"},bb={key:3,class:"mb-6"},yb={class:"mb-4 has-text-danger"},vb={key:0,class:"mt-5"},kb={key:4,class:"mb-6"},Cb={class:"mb-4"},Lb={key:2,class:"mt-3 has-text-danger"},wb={class:"mt-5"},_b={key:5,class:"mb-6"},Eb={class:"mb-4"},$b={key:6},Fb={class:"mt-3 mb-6"},Tb={class:"column is-one-quarter-desktop is-hidden-mobile"},Sb={class:"sticky mt-5 pl-5"},Ab={key:0,class:"mb-3"},Pb={key:1,class:"mb-3"},Ib={key:2,class:"mb-3"},Mb={key:3,class:"mb-3"},xb={key:4,class:"mb-3"},Nb={key:5,class:"mb-3"},Ub={key:6,class:"mb-3"};function Db(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("ProfileCompletionCelebration"),r=(0,c.g2)("font-awesome-icon"),d=(0,c.g2)("router-link"),p=(0,c.g2)("MobileViewHeader"),h=(0,c.g2)("ProfileCompletionBar"),g=(0,c.g2)("Form"),f=(0,c.g2)("b-tab-item"),b=(0,c.g2)("FormPermissions"),y=(0,c.g2)("Roles"),v=(0,c.g2)("b-input"),k=(0,c.g2)("b-field"),C=(0,c.g2)("ProfessionJobList"),L=(0,c.g2)("ProfessionIndustryList"),w=(0,c.g2)("b-radio"),_=(0,c.g2)("Badges"),E=(0,c.g2)("Family"),$=(0,c.g2)("FormNotification"),F=(0,c.g2)("FormPrivacy"),T=(0,c.g2)("LogoThumbnail"),S=(0,c.g2)("b-table-column"),A=(0,c.g2)("b-table"),P=(0,c.g2)("TimezoneSelect"),I=(0,c.g2)("OtpCodeInput"),M=(0,c.g2)("b-switch"),x=(0,c.g2)("b-tabs");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),n.showProfileCompletionCelebration?((0,c.uX)(),(0,c.Wv)(l,{key:0,"user-id":a.item.id,onDismissed:n.onCelebrationDismissed},null,8,["user-id","onDismissed"])):(0,c.Q3)("",!0),a.item&&(a.item.id===e.user.id||e.isGranted("HR_ASSISTANT_LOCAL",a.item.localCenterObject)||a.canManageThisProfile)?((0,c.uX)(),(0,c.CE)("section",Ng,[(0,c.bF)(p,{title:a.fullName},{actions:(0,c.k6)(()=>[(0,c.bF)(d,{class:"button is-small is-white is-rounded",to:{name:"UserShow",params:{item:a.item.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Ug,[(0,c.bF)(r,{icon:"fa-light fa-user"})])]),_:1},8,["to"])]),_:1}
1,8,["title"]),e.$isMobile()&&n.showProfileCompletion?((0,c.uX)(),(0,c.CE)("div",Dg,[(0,c.bF)(h,{percentage:a.item.profileCompletionPercentage,"missing-fields":a.item.profileCompletionMissingFields,"user-id":a.item.id,onFocusField:n.scrollToField},null,8,["percentage","missing-fields","user-id","onFocusField"])])):(0,c.Q3)("",!0),e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",Xg,[(0,c.Lk)("div",Vg,[(0,c.Lk)("h2",Rg,(0,u.v_)(a.fullName),1),n.showProfileCompletion?((0,c.uX)(),(0,c.Wv)(h,{key:0,percentage:a.item.profileCompletionPercentage,"missing-fields":a.item.profileCompletionMissingFields,"user-id":a.item.id,onFocusField:n.scrollToField},null,8,["percentage","missing-fields","user-id","onFocusField"])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",Og,[(0,c.bF)(d,{class:"button is-light is-small is-rounded",to:{name:"UserShow",params:{item:a.item.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",Qg,[(0,c.Lk)("span",Bg,[(0,c.bF)(r,{icon:"fa-light fa-user"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("profile"))+" â",1)])]),_:1},8,["to"])])])),(0,c.Lk)("div",Gg,[(0,c.bF)(x,{ref:"userTabs",modelValue:a.activeTab,"onUpdate:modelValue":[t[75]||(t[75]=e=>a.activeTab=e),n.onTabChange],class:"tabs-pill",animated:!1},{default:(0,c.k6)(()=>[(0,c.bF)(f,{label:e.$t("profile"),value:"profile"},{default:(0,c.k6)(()=>[(0,c.bF)(g,{ref:"form",save:n.save,item:a.item},null,8,["save","item"])]),_:1},8,["label"]),e.isGranted("HR_LOCAL",a.item.localCenterObject)&&(!1!==e.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions||e.isGranted("HR_TENANT"))?((0,c.uX)(),(0,c.Wv)(f,{key:0,label:e.$t("Permissions"),value:"permissions"},{default:(0,c.k6)(()=>["permissions"===a.activeTab?((0,c.uX)(),(0,c.Wv)(b,{key:0,ref:"formPermissions",save:n.save,item:a.item,onGoToResignation:n.goToResignationTab,onRoleChanged:t[1]||(t[1]=e=>a.item.roles=e)},null,8,["save","item","onGoToResignation"])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),n.hasPermissionForRoles?((0,c.uX)(),(0,c.Wv)(f,{key:1,label:e.$t("roles"),value:"roles"},{default:(0,c.k6)(()=>["roles"===a.activeTab?((0,c.uX)(),(0,c.Wv)(y,{key:0,item:a.item,"can-modify-roles":n.canModifyRoles,onRolesUpdated:n.retrieve},null,8,["item","can-modify-roles","onRolesUpdated"])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.isActive&&n.hasProfessionFields&&(a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile)?((0,c.uX)(),(0,c.Wv)(f,{key:2,label:e.$t("profession"),value:"profession"},{default:(0,c.k6)(()=>["profession"===a.activeTab?((0,c.uX)(),(0,c.CE)("div",Wg,[(0,c.Lk)("div",jg,[(0,c.Lk)("form",{onSubmit:t[19]||(t[19]=(0,m.D$)(()=>{},["prevent"]))},[n.isProfileField("profession_headline")?((0,c.uX)(),(0,c.Wv)(k,{key:0,label:e.$t("professionHeadline")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.professionHeadline,"onUpdate:modelValue":t[2]||(t[2]=e=>a.item.professionHeadline=e)},null,8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.hasJob?((0,c.uX)(),(0,c.Wv)(k,{key:1,label:e.$t("Profession job"),class:"mt-5 mb-5"},{default:(0,c.k6)(()=>[e.tenant.settingFeatures.professions.hasJob?((0,c.uX)(),(0,c.Wv)(C,{key:0,modelValue:a.item.professionJob,"onUpdate:modelValue":t[3]||(t[3]=e=>a.item.professionJob=e),"display-total":!1,"get-total":!1,type:"autocomplete","is-job":!0},null,8,["modelValue"])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.hasJob&&a.item.professionJob&&431===a.item.professionJob.id?((0,c.uX)(),(0,c.Wv)(v,{key:2,modelValue:a.item.professionHeadline,"onUpdate:modelValue":t[4]||(t[4]=e=>a.item.professionHeadline=e),class:"mb-6",placeholder:e.$t("Fill other option"),required:""},null,8,["modelValue","placeholder"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.hasExpertise?((0,c.uX)(),(0,c.Wv)(k,{key:3,label:e.$t("Profession expertise"),class:"mt-5 mb-5"},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.item.professionExpertise,"onUpdate:modelValue":t[5]||(t[5]=e=>a.item.professionExpertise=e),"display-total":!1,"get-total":!1,"is-expertise":!0,type:"autocomplete"},null,8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.hasExpertise&&a.item.professionExpertise&&431===a.item.professionExpertise.id?((0,c.uX)(),(0,c.Wv)(v,{key:4,modelValue:a.item.professionExpertiseOther,"onUpdate:modelValue":t[6]||(t[6]=e=>a.item.professionExpertiseOther=e),class:"mb-6",placeholder:e.$t("Fill other option"),required:""},null,8,["modelValue","placeholder"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.professions.hasIndustry&&n.isProfileField("profession_
1industry")?((0,c.uX)(),(0,c.Wv)(k,{key:5,label:e.$t("professionIndustry"),class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(L,{modelValue:a.item.professionIndustry,"onUpdate:modelValue":t[7]||(t[7]=e=>a.item.professionIndustry=e),"display-total":!1,"get-total":!1,"is-medium-size":!0,"is-rectangle":!0,type:"autocomplete"},null,8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),n.isProfileField("profession_sector")?((0,c.uX)(),(0,c.Wv)(k,{key:6,label:e.$t("Profession sector"),class:"mt-5 mb-5",grouped:""},{default:(0,c.k6)(()=>[(0,c.bF)(w,{modelValue:a.item.professionSector,"onUpdate:modelValue":t[8]||(t[8]=e=>a.item.professionSector=e),"native-value":"public",name:"professionSector"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Public")),1)]),_:1},8,["modelValue"]),(0,c.bF)(w,{modelValue:a.item.professionSector,"onUpdate:modelValue":t[9]||(t[9]=e=>a.item.professionSector=e),"native-value":"private",class:"ml-2",name:"professionSector"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Private")),1)]),_:1},8,["modelValue"]),(0,c.bF)(w,{modelValue:a.item.professionSector,"onUpdate:modelValue":t[10]||(t[10]=e=>a.item.professionSector=e),"native-value":"ngo",class:"ml-2",name:"professionSector"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Non-governmental")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),n.isProfileField("professionOrganization")||n.isProfileField("professionOrganisationRole")||n.isProfileField("professionOrganisationWebsite")?((0,c.uX)(),(0,c.CE)("div",zg,[(0,c.Lk)("p",qg,(0,u.v_)(e.$t("Current profession")),1),t[76]||(t[76]=(0,c.Lk)("hr",{class:"mt-3"},null,-1)),n.isProfileField("professionOrganization")?((0,c.uX)(),(0,c.Wv)(k,{key:0,label:e.$t("Current Organisation/Company"),class:"mt-3"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.professionOrganisation,"onUpdate:modelValue":t[11]||(t[11]=e=>a.item.professionOrganisation=e)},null,8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),n.isProfileField("professionOrganizationWebsite")?((0,c.uX)(),(0,c.Wv)(k,{key:1,label:e.$t("Website"),class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.professionOrganisationWebsite,"onUpdate:modelValue":t[12]||(t[12]=e=>a.item.professionOrganisationWebsite=e)},null,8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0),n.isProfileField("professionOrganizationRole")?((0,c.uX)(),(0,c.Wv)(k,{key:2,label:e.$t("Current role"),class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.professionOrganisationRole,"onUpdate:modelValue":t[13]||(t[13]=e=>a.item.professionOrganisationRole=e)},null,8,["modelValue"])]),_:1},8,["label"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),n.isProfileField("companyIdentifier")||n.isProfileField("companyName")||n.isProfileField("companyAddress")||n.isProfileField("companyWebsite")||n.isProfileField("companyRegNo")?((0,c.uX)(),(0,c.CE)("div",Jg,[(0,c.Lk)("p",Hg,(0,u.v_)(e.$t("Billing Details")),1),t[77]||(t[77]=(0,c.Lk)("hr",{class:"mt-3"},null,-1)),n.isProfileField("companyIdentifier")?((0,c.uX)(),(0,c.Wv)(k,{key:0,class:(0,u.C4)(["mt-3",n.isMandatoryField("companyIdentifier")?"required":""]),label:e.$t("Company identifier")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.companyIdentifier,"onUpdate:modelValue":t[14]||(t[14]=e=>a.item.companyIdentifier=e)},null,8,["modelValue"]),"ro"===e.tenant.language?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-primary ml-2 is-rounded is-small is-outlined",disabled:e.isLoadingButton,type:"button",onClick:t[15]||(t[15]=(...e)=>n.getCompanyDetails&&n.getCompanyDetails(...e))},[(0,c.Lk)("span",Yg,[(0,c.Lk)("span",Zg,[(0,c.bF)(r,{icon:"fal fa-magnifying-glass"})]),(0,c.Lk)("span",ef,(0,u.v_)(e.$t("search")),1)])],8,Kg)):(0,c.Q3)("",!0)]),_:1},8,["label","class"])):(0,c.Q3)("",!0),n.isProfileField("companyName")?((0,c.uX)(),(0,c.Wv)(k,{key:1,class:(0,u.C4)(["mt-5",n.isMandatoryField("companyName")?"required":""]),label:e.$t("Company name")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.companyName,"onUpdate:modelValue":t[16]||(t[16]=e=>a.item.companyName=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),n.isProfileField("companyAddress")?((0,c.uX)(),(0,c.Wv)(k,{key:2,class:(0,u.C4)(["mt-5",n.isMandatoryField("companyAddress")?"required":""]),label:e.$t("Company address")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.companyAddress,"onUpdate:modelValue":t[17]||(t[17]=e=>a.item.companyAddress=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0),n.isProfileField("companyRegNo")?((0,c.uX)(),(0,c.Wv)(k,{key:3,class:(0,u.C4)(["mt-5",n.isMandatoryField("companyRegNo")?"required":""]),label:e.$t("Company commerce registry number")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.item.companyRegNo,"onUpdate:modelValue":t[18]||(t[18]=e=>a.item.companyRegNo=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],32)]),(0,c.Lk)("div",tf,[(0,c.Lk)("div",sf,[(0,c.Lk)("div",af,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),type:"button",onClick:t[20]||(t[20]=(...e)=>n.saveProfession&&n.saveProfession(...e))},(0,u.v_)(e.$t("save")),3)])])])])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.gamification.isActive?((0,c.uX)(),(0,c.Wv)(f,{key:3,label:e.$t("badges"),value:"badges"},{default:(0,c.k6)(()=>["badges"===a.activeTab?((0,c.uX)(),(0,c.Wv)(_,{key:0,item:a.item,class:"mt-4"},null,8,["item"])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasFamilyMembers||e.tenant.settingFeatures.users.hasFamilyNonMembers?((0,c.uX)(),(0,c.Wv)(f,{key:4,label:e.$t("family"),value:"family"},{default:(0,c.k6)(()=>["family"===a.activeTab?((0,c.uX)(),(0,c.Wv)(E,{key:0,item:a.item,class:"mt-4"},null,8,["item"])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),a.item&&(a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL"))?((0,
1c.uX)(),(0,c.Wv)(f,{key:5,label:e.$t("Notifications"),value:"notification"},{default:(0,c.k6)(()=>["notification"===a.activeTab?((0,c.uX)(),(0,c.Wv)($,{key:0,item:a.item},null,8,["item"])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("HR_LOCAL",a.item.localCenterObject)||a.canManageThisProfile?((0,c.uX)(),(0,c.Wv)(f,{key:6,label:e.$t("Settings & Privacy"),value:"settings"},{default:(0,c.k6)(()=>[(0,c.Lk)("div",nf,[(0,c.Lk)("div",of,[(0,c.Lk)("div",lf,[a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("span",rf,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded m-0",{"is-white":"privacy"!==a.openedSettings,"is-primary is-outlined":"privacy"===a.openedSettings}]),onClick:t[21]||(t[21]=e=>n.switchSettingsTab("privacy"))},(0,u.v_)(e.$t("Privacy")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id?((0,c.uX)(),(0,c.CE)("span",df,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"blockedUsers"!==a.openedSettings,"is-primary is-outlined":"blockedUsers"===a.openedSettings}]),onClick:t[22]||(t[22]=e=>n.openBlockedUsers())},(0,u.v_)(e.$t("Blocked users")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("ROLE_SUPER_ADMIN")||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("span",cf,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"timezone"!==a.openedSettings,"is-primary is-outlined":"timezone"===a.openedSettings}]),onClick:t[23]||(t[23]=e=>n.switchSettingsTab("timezone"))},(0,u.v_)(e.$t("Timezone")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("ROLE_SUPER_ADMIN")||e.isGranted("HR_LOCAL",a.item.localCenter)||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("span",uf,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"password"!==a.openedSettings,"is-primary is-outlined":"password"===a.openedSettings}]),onClick:t[24]||(t[24]=e=>n.switchSettingsTab("password"))},(0,u.v_)(e.$t("password")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("span",mf,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"email"!==a.openedSettings,"is-primary is-outlined":"email"===a.openedSettings}]),onClick:t[25]||(t[25]=e=>n.switchSettingsTab("email"))},(0,u.v_)(e.$t("Email")),3)])):(0,c.Q3)("",!0),n.hasCloseAccountActions?((0,c.uX)(),(0,c.CE)("span",pf,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"delete"!==a.openedSettings,"is-primary is-outlined":"delete"===a.openedSettings}]),onClick:t[26]||(t[26]=e=>n.switchSettingsTab("delete"))},(0,u.v_)(e.$t("Close account")),3)])):(0,c.Q3)("",!0),e.tenant.settingFeatures.multiFactorAuthentication.isActive?((0,c.uX)(),(0,c.CE)("span",hf,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"mfa"!==a.openedSettings,"is-primary is-outlined":"mfa"===a.openedSettings}
1]),onClick:t[27]||(t[27]=e=>n.switchSettingsTab("mfa"))},(0,u.v_)(e.$t("Multi Factor Authentication")),3)])):(0,c.Q3)("",!0)]),"privacy"===a.openedSettings&&(a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile)?((0,c.uX)(),(0,c.CE)("div",{key:0,class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},[(0,c.bF)(F,{ref:"formPrivacy",save:n.save,item:a.item,class:"mt-4"},null,8,["save","item"])],2)):(0,c.Q3)("",!0),"blockedUsers"===a.openedSettings&&a.item.id===e.user.id?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},[(0,c.Lk)("section",gf,[(0,c.Lk)("div",ff,[(0,c.Lk)("p",bf,(0,u.v_)(e.$t("You do not see posts or comments written by these members.")),1),t[78]||(t[78]=(0,c.Lk)("hr",null,null,-1))]),(0,c.bF)(o,{modelValue:a.isLoadingBlockedUsers,"onUpdate:modelValue":t[28]||(t[28]=e=>a.isLoadingBlockedUsers=e),"is-full-page":!1},null,8,["modelValue"]),a.isLoadingBlockedUsers||0!==a.blockedUsers.length?((0,c.uX)(),(0,c.CE)("div",vf,[(0,c.bF)(A,{data:a.blockedUsers,"mobile-cards":!1,hoverable:""},{default:(0,c.k6)(()=>[(0,c.bF)(S,{label:e.$t("Member")},{default:(0,c.k6)(e=>[(0,c.Lk)("div",kf,[(0,c.bF)(T,{class:"mr-3",item:e.row.blocked,"is-type":"roundXMedium"},null,8,["item"]),(0,c.Lk)("span",null,(0,u.v_)(e.row.blocked.firstName)+" "+(0,u.v_)(e.row.blocked.lastName),1)])]),_:1},8,["label"]),(0,c.bF)(S,{label:e.$t("Blocked on")},{default:(0,c.k6)(t=>[(0,c.eW)((0,u.v_)(e.$filters.format(t.row.dateCreated)),1)]),_:1},8,["label"]),(0,c.bF)(S,{width:"120px"},{default:(0,c.k6)(t=>[(0,c.Lk)("button",{class:"button is-small is-rounded",onClick:e=>n.unblockUser(t.row)},(0,u.v_)(e.$t("Unblock")),9,Cf)]),_:1})]),_:1},8,["data"])])):((0,c.uX)(),(0,c.CE)("p",yf,(0,u.v_)(e.$t("You have not blocked anyone.")),1))])],2)):(0,c.Q3)("",!0),"timezone"===a.openedSettings&&(a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile)?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},[(0,c.Lk)("section",Lf,[(0,c.bF)(k,{label:e.$t("Timezone")},{default:(0,c.k6)(()=>[(0,c.bF)(P,{modelValue:a.newTimezone,"onUpdate:modelValue":t[29]||(t[29]=e=>a.newTimezone=e),"init-value":a.item.timezone},null,8,["modelValue","init-value"])]),_:1},8,["label"]),(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded mt-5",{"is-loading":e.$store.state.isLoadingButton}]),type:"submit",disabled:e.$store.state.isLoadingButton,onClick:t[30]||(t[30]=(...e)=>n.saveTimezone&&n.saveTimezone(...e))},(0,u.v_)(e.$t("save")),11,wf)])],2)):(0,c.Q3)("",!0),"password"===a.openedSettings&&(a.item.id===e.user.id||e.isGranted("ROLE_SUPER_ADMIN")||e.isGranted("HR_LOCAL",a.item.localCenter)||a.canManageThisProfile)?((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},[(0,c.Lk)("section",_f,[e.isGranted("ROLE_SUPER_ADMIN")&&a.item.id!==e.user.id?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.bF)(k,{label:e.$t("newPassword")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.newPassword,"onUpdate:modelValue":t[31]||(t[31]=e=>a.newPassword=e),minlength:"8",class:"passwordInput","password-reveal":"",type:"password"},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.bF)(k,{label:e.$t("confirmPassword"),class:"mt-4"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.newPasswordConfirmation,"onUpdate:modelValue":t[32]||(t[32]=e=>a.newPasswordConfirmation=e),class:"passwordInput","password-reveal":"",minlength:"8",type:"password"},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.Lk)("div",Ef,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),disabled:e.$store.state.isLoadingButton||!a.newPassword||a.newPassword!==a.newPasswordConfirmation,onClick:t[33]||(t[33]=(...e)=>n.savePassword&&n.savePassword(...e))},(0,u.v_)(e.$t("save")),11,$f)])],64)):a.item.id===e.user.id?((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[1===a.passwordOtpStep?((0,c.uX)(),(0,c.CE)("div",Ff,[a.passwordOtpRateLimitError?((0,c.uX)(),(0,c.CE)("div",Tf,(0,u.v_)(e.$t("Too many requests. Please wait a few minutes before trying again.")),1)):(0,c.Q3)("",!0),(0,c.bF)(k,{label:e.$t("newPassword")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.newPassword,"onUpdate:modelValue":t[34]||(t[34]=e=>a.newPassword=e),minlength:"8",class:"passwordInput","password-reveal":"",type:"password"},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.bF)(k,{label:e.$t("confirmPassword"),class:"mt-4"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.newPasswordConfirmation,"onUpdate:modelValue":t[35]||(t[35]=e=>a.newPasswordConfirmation=e),class:"passwordInput","password-reveal":"",minlength:"8",type:"password"},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.Lk)("p",Sf,(0,u.v_)(e.$t("A 6-digit verification code will be sent to your email address")),1),(0,c.Lk)("div",Af,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.passwordOtpLoading}]),type:"button",disabled:a.passwordOtpLoading||!a.newPassword||a.newPassword.length<8||a.newPassword!==a.newPasswordConfirmation,onClick:t[36]||(t[36]=(...e)=>n.requestPasswordChangeOtp&&n.requestPasswordChangeOtp(...e))},(0,u.v_)(e.$t("Send verification code")),11,Pf)])])):2===a.passwordOtpStep?((0,c.uX)(),(0,c.CE)("div",If,[(0,c.Lk)("p",Mf,[(0,c.eW)((0,u.v_)(e.$t("A verification code has been sent to"))+" ",1),(0,c.Lk)("strong",null,(0,u.v_)(e.user.email),1)]),(0,c.Lk)("div",xf,[(0,c.Lk)("p",null,(0,u.v_)(e.$t("After entering the correct code, your password will be changed and you will need to log in again with your new password.")),1)]),(0,c.bF)(k,{label:e.$t("Verification code")},{default:(0,c.k6)(()=>[(0,c.bF)(I,{ref:"passwordOtpInput",modelValue:a.passwordOtpCode,"onUpdate:modelValue":t[37]||(t[37]=e=>a.passwordOtpCode=e),size:"small",centered:!1,onComplete:n.verifyPasswordChangeOtp},null,8,["modelValue","onComplete"])]),_:1},8,["label"]),(0,c.Lk)("div",Nf,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.passwordOtpLoading}]),type:"button",disabled:a.passwordOtpLoading||6!==a.passwordOtpCode.length,onClick:t[38]||(t[38]=(...e)=>n.verifyPasswordChangeOtp&&n.verifyPasswordChangeOtp(...e))},(0,u.v_)(e.$t("Verify and change password")),11,Uf),(0,c.Lk)("button",{class:"button is-text is-small is-rounded ml-1",type:"button",disabled:a.passwordOtpLoading,onClick:t[39]||(t[39]=(...e)=>n.requestPasswordChangeOtp&&n.requestPasswordChangeOtp(...e))},(0,u.v_)(e.$t("Resend code")),9,Df),(0,c.Lk)("button",{class:"button is-text is-small is-rounded ml-1",type:"button",disabled:a.passwordOtpLoading,onClick:t[40]||(t[40]=(...e)=>n.resetPasswordOtpFlow&&n.resetPasswordOtpFlow(...e))},(0,u.v_)(e.$t("Cancel")),9,Xf)])])):(0,c.Q3)("",!0)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:2},[(0,c.Lk)("p",Vf,(0,u.v_)(e.$t("Send this member a password reset email with a link to choose a new password.")),1),(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.isSendingPasswordReset}]),disabled:a.isSendingPasswordReset,onClick:t[41]||(t[41]=(...e)=>n.sendPasswordReset&&n.sendPasswordReset(...e))},(0,u.v_)(e.$t("Send password reset email")),11,Rf)],64))])],2)):(0,c.Q3)("",!0),"email"===a.openedSettings&&(a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||e.isGranted("HR_TENANT")||a.canManageThisProfile)?((0,c.uX)(),(0,c.CE)("div",{key:4,ref:"emailSettingsCard",class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},[(0,c.Lk)("section",Of,[e.isGranted("ADMIN_LOCAL",a.item.localCenterObject)||e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.bF)(k,{ref:"emailFieldAdmin",label:e.$t("accountEmail")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{ref:"emailInputAdmin",modelValue:a.newEmail,"onUpdate:modelValue":t[42]||(t[42]=e=>
1a.newEmail=e),type:"email",required:a.item.id===e.user.id},null,8,["modelValue","required"])]),_:1},8,["label"]),a.item.newEmailRequested?((0,c.uX)(),(0,c.CE)("p",Qf,(0,u.v_)(e.$t("Pending new email confirmation"))+", "+(0,u.v_)(a.item.newEmailRequested),1)):(0,c.Q3)("",!0),(0,c.Lk)("div",Bf,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),type:"submit",disabled:e.$store.state.isLoadingButton||a.newEmail===a.item.email,onClick:t[43]||(t[43]=(...e)=>n.saveEmail&&n.saveEmail(...e))},(0,u.v_)(e.$t("save")),11,Gf)])],64)):a.item.id===e.user.id?((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[1===a.emailOtpStep?((0,c.uX)(),(0,c.CE)("div",Wf,[(0,c.bF)(k,{ref:"emailFieldUser",label:e.$t("New email address")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{ref:"emailInputUser",modelValue:a.newEmail,"onUpdate:modelValue":t[44]||(t[44]=e=>a.newEmail=e),type:"email",required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.Lk)("p",jf,(0,u.v_)(e.$t("A 6-digit verification code will be sent to your current email address first")),1),(0,c.Lk)("div",zf,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.emailOtpLoading}]),type:"button",disabled:a.emailOtpLoading||!a.newEmail||a.newEmail===a.item.email,onClick:t[45]||(t[45]=(...e)=>n.requestEmailChangeOtp&&n.requestEmailChangeOtp(...e))},(0,u.v_)(e.$t("Send verification code")),11,qf)])])):2===a.emailOtpStep?((0,c.uX)(),(0,c.CE)("div",Jf,[(0,c.Lk)("div",Hf,[(0,c.Lk)("p",Kf,(0,u.v_)(e.$t("Step 1 of 2"))+": "+(0,u.v_)(e.$t("Verify your current email")),1),(0,c.Lk)("p",null,[(0,c.eW)((0,u.v_)(e.$t("A verification code has been sent to"))+" ",1),(0,c.Lk)("strong",null,(0,u.v_)(e.user.email),1)])]),(0,c.bF)(k,{label:e.$t("Verification code")},{default:(0,c.k6)(()=>[(0,c.bF)(I,{ref:"emailOtpInput",modelValue:a.emailOtpCode,"onUpdate:modelValue":t[46]||(t[46]=e=>a.emailOtpCode=e),size:"small",centered:!1,onComplete:n.verifyEmailChangeOtp},null,8,["modelValue","onComplete"])]),_:1},8,["label"]),(0,c.Lk)("div",Yf,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.emailOtpLoading}]),type:"button",disabled:a.emailOtpLoading||6!==a.emailOtpCode.length,onClick:t[47]||(t[47]=(...e)=>n.verifyEmailChangeOtp&&n.verifyEmailChangeOtp(...e))},(0,u.v_)(e.$t("Verify current email")),11,Zf),(0,c.Lk)("button",{class:"button is-text is-small is-rounded ml-1",type:"button",disabled:a.emailOtpLoading,onClick:t[48]||(t[48]=(...e)=>n.requestEmailChangeOtp&&n.requestEmailChangeOtp(...e))},(0,u.v_)(e.$t("Resend code")),9,eb),(0,c.Lk)("button",{class:"button is-text is-small is-rounded ml-1",type:"button",disabled:a.emailOtpLoading,onClick:t[49]||(t[49]=(...e)=>n.resetEmailOtpFlow&&n.resetEmailOtpFlow(...e))},(0,u.v_)(e.$t("Cancel")),9,tb)])])):3===a.emailOtpStep?((0,c.uX)(),(0,c.CE)("div",ib,[(0,c.Lk)("div",sb,[(0,c.Lk)("p",ab,(0,u.v_)(e.$t("Step 2 of 2"))+": "+(0,u.v_)(e.$t("Verify your new email")),1),(0,c.Lk)("p",null,[(0,c.eW)((0,u.v_)(e.$t("A verification code has been sent to"))+" ",1),(0,c.Lk)("strong",null,(0,u.v_)(a.newEmail),1)])]),(0,c.Lk)("div",nb,[(0,c.Lk)("p",null,(0,u.v_)(e.$t("After entering the correct code, your email will be changed and you will need to log in again with your new email.")),1)]),(0,c.bF)(k,{label:e.$t("Verification code")},{default:(0,c.k6)(()=>[(0,c.bF)(I,{ref:"emailOtpInputStep3",modelValue:a.emailOtpCode,"onUpdate:modelValue":t[50]||(t[50]=e=>a.emailOtpCode=e),size:"small",centered:!1,onComplete:n.verifyEmailChangeOtp},null,8,["modelValue","onComplete"])]),_:1},8,["label"]),(0,c.Lk)("div",ob,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":a.emailOtpLoading}]),type:"button",disabled:a.emailOtpLoading||6!==a.emailOtpCode.length,onClick:t[51]||(t[51]=(...e)=>n.verifyEmailChangeOtp&&n.verifyEmailChangeOtp(...e))},(0,u.v_)(e.$t("Verify and change email")),11,lb),(0,c.Lk)("button",{class:"button is-text is-small is-rounded ml-1",type:"button",disabled:a.emailOtpLoading,onClick:t[52]||(t[52]=(...e)=>n.resetEmailOtpFlow&&n.resetEmailOtpFlow(...e))},(0,u.v_)(e.$t("Cancel")),9,rb)])])):(0,c.Q3)("",!0)],64)):a.canManageThisProfile?((0,c.uX)(),(0,c.CE)(c.FK,{key:2},[(0,c.bF)(k,{label:e.$t("accountEmail")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.newEmail,"onUpdate:modelValue":t[53]||(t[53]=e=>
1a.newEmail=e),type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.Lk)("div",db,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),type:"submit",disabled:e.$store.state.isLoadingButton||a.newEmail===a.item.email,onClick:t[54]||(t[54]=(...e)=>n.saveEmail&&n.saveEmail(...e))},(0,u.v_)(e.$t("save")),11,cb)])],64)):(0,c.Q3)("",!0)])],2)):(0,c.Q3)("",!0),"delete"===a.openedSettings?((0,c.uX)(),(0,c.CE)("div",{key:5,class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},["ACTIVE"===a.item.status&&(n.canCloseOwnAccount||a.canManageThisProfile)?((0,c.uX)(),(0,c.CE)("div",ub,[(0,c.Lk)("p",null,(0,u.v_)(e.$t("user.closeAccountTemporaryDetail")),1),(0,c.Lk)("p",mb,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-danger is-outlined is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[55]||(t[55]=e=>n.makeAccountInactive("INACTIVE"))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Close account")),1)],2)])])):(0,c.Q3)("",!0),["SUSPENDED","INACTIVE"].includes(a.item.status)&&e.isGranted("ADMIN_LOCAL",a.item.localCenterObject)?((0,c.uX)(),(0,c.CE)("div",pb,[(0,c.Lk)("p",hb,(0,u.v_)(e.$t("user.reactivateAccountDetail")),1),(0,c.Lk)("p",null,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-danger is-outlined is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[56]||(t[56]=e=>n.changeStatus("ACTIVE"))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("user.reactivateAccount")),1)],2)])])):(0,c.Q3)("",!0),e.isGranted("ADMIN_LOCAL",a.item.localCenterObject)&&"SUSPENDED"!==a.item.status?((0,c.uX)(),(0,c.CE)("div",gb,[(0,c.Lk)("p",fb,(0,u.v_)(e.$t("user.suspendAccountDetail")),1),(0,c.Lk)("p",null,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-danger is-outlined is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[57]||(t[57]=e=>n.changeStatus("SUSPENDED"))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("user.suspendAccount")),1)],2)])])):(0,c.Q3)("",!0),e.tenant.settingFeatures.resignation.isActive&&a.item.resignPending&&(a.item.id===e.user.id||e.isGranted("HR_LOCAL",a.item.localCenterObject))?((0,c.uX)(),(0,c.CE)("div",bb,[(0,c.Lk)("p",yb,[(0,c.eW)((0,u.v_)(e.$t("Your resignation is pending and it will be processed by administration"))+". ",1),t[79]||(t[79]=(0,c.Lk)("br",null,null,-1)),(0,c.eW)(" "+(0,u.v_)(e.$t("We will let you know by email"))+". ",1)]),a.item.id===e.user.id?((0,c.uX)(),(0,c.CE)("p",vb,[(0,c.Lk)("a",{class:"button is-primary is-rounded mt-2",onClick:t[58]||(t[58]=(...e)=>n.cancelResignation&&n.cancelResignation(...e))},(0,u.v_)(e.$t("Cancel resignation")),1)])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),!e.tenant.settingFeatures.resignation.isActive||a.item.isGuest||a.item.resignPending||a.item.id!==e.user.id&&!e.isGranted("HR_LOCAL",a.item.localCenterObject)?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",kb,[(0,c.Lk)("p",Cb,(0,u.v_)(e.$t(a.item.id===e.user.id?"I want to resign from the organisation":"Record the resignation of this member"))+".",1),a.resignationIntent?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("a",{key:0,class:"button is-danger is-outlined is-rounded",onClick:t[59]||(t[59]=e=>a.resignationIntent=!0)},(0,u.v_)(e.$t("Resign")),1)),(0,c.bF)(k,{hidden:!a.resignationIntent,class:"mt-5",label:e.$t("Resignation reason")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.resignationReason,"onUpdate:modelValue":t[60]||(t[60]=e=>a.resignationReason=e),type:"textarea",required:""},null,8,["modelValue"])]),_:1},8,["hidden","label"]),(0,c.bF)(k,{hidden:!a.resignationIntent,class:"mt-5",label:e.$t("PromptToReinroll")},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:a.promptToReinroll,"onUpdate:modelValue":t[61]||(t[61]=e=>a.promptToReinroll=e),type:"textarea"},null,8,["modelValue"])]),_:1},8,["hidden","label"]),e.tenant.settingFeatures.resignation?.autoCloseAccountsThatResign?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(k,{key:1,hidden:!a.resignationIntent,class:"mt-3",label:e.$t("Close my account")},{default:(0,c.k6)(()=>[(0,c.bF)(M,{modelValue:a.closeAccount,"onUpdate:modelValue":t[62]||(t[62]=e=>a.closeAccount=e)},null,8,["modelValue"])]),_:1},8,["hidden","label"])),e.tenant.settingFeatures.resignation?.autoCloseAccountsThatResign&&a.resignationIntent?((0,c.uX)(),(0,c.CE)("p",Lb,(0,u.v_)(e.$t("This account will be closed after resignation is approved")),1)):(0,c.Q3)("",!0),(0,c.Lk)("p",wb,[a.resignationIntent?((0,c.uX)(),(0,c.CE)("a",{key:0,class:"button is-primary is-rounded mr-3 mt-2",onClick:t[63]||(t[63]=(...e)=>n.submitResignationRequest&&n.submitResignationRequest(...e))},(0,u.v_)(e.$t("Submit")),1)):(0,c.Q3)("",!0),a.resignationIntent?((0,c.uX)(),(0,c.CE)("a",{key:1,class:"button is-primary is-outlined is-rounded mt-2",onClick:t[64]||(t[64]=e
1=>a.resignationIntent=!1)},(0,u.v_)(e.$t("Cancel")),1)):(0,c.Q3)("",!0)])])),!a.item.isGuest&&!e.isGranted("ROLE_ADMIN_TENANT")||e.user.id!==a.item.id&&!e.isGranted("ADMIN_LOCAL",a.item.localCenterObject)?e.user.id!==a.item.id&&e.isGranted("HR_LOCAL",a.item.localCenterObject)?((0,c.uX)(),(0,c.CE)("div",$b,[(0,c.Lk)("p",null,(0,u.v_)(e.$t("This profile can be deleted permanently only by organization Admin"))+".",1),(0,c.Lk)("p",Fb,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-primary is-outlined is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[66]||(t[66]=t=>e.$router.push({name:"IssueList",query:{isSupport:!0,create:1}}))},(0,u.v_)(e.$t("Request delete")),3)])])):(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",_b,[(0,c.Lk)("p",Eb,(0,u.v_)(e.$t("user.deleteAccountDetail")),1),(0,c.Lk)("a",{class:(0,u.C4)(["button is-danger is-outlined is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[65]||(t[65]=e=>n.confirmDelete("delete"))},(0,u.v_)(e.$t("user.deleteAccount")),3)]))],2)):(0,c.Q3)("",!0),"mfa"===a.openedSettings?((0,c.uX)(),(0,c.CE)("div",{key:6,class:(0,u.C4)(["card","mt-5",e.$isMobile()?"p-4":"p-5"])},[(0,c.bF)(k,{label:e.$t("Multi Factor Authentication")},{default:(0,c.k6)(()=>[(0,c.bF)(M,{modelValue:a.item.mfaEnabled,"onUpdate:modelValue":[t[67]||(t[67]=e=>a.item.mfaEnabled=e),n.save],disabled:a.item.id===e.user.id&&a.item.mfaEnabled&&(e.isGranted("HR_TENANT")||e.isGranted("FINANCIAL_TENANT"))},null,8,["modelValue","disabled","onUpdate:modelValue"])]),_:1},8,["label"])],2)):(0,c.Q3)("",!0)],512),(0,c.Lk)("div",Tb,[(0,c.Lk)("div",Sb,[a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("p",Ab,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded m-0",{"is-white":"privacy"!==a.openedSettings,"is-primary is-outlined":"privacy"===a.openedSettings}]),onClick:t[68]||(t[68]=e=>n.switchSettingsTab("privacy"))},(0,u.v_)(e.$t("Privacy")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id?((0,c.uX)(),(0,c.CE)("p",Pb,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded m-0",{"is-white":"blockedUsers"!==a.openedSettings,"is-primary is-outlined":"blockedUsers"===a.openedSettings}]),onClick:t[69]||(t[69]=e=>n.openBlockedUsers())},(0,u.v_)(e.$t("Blocked users")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("ROLE_SUPER_ADMIN")||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("p",Ib,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded m-0",{"is-white":"timezone"!==a.openedSettings,"is-primary is-outlined":"timezone"===a.openedSettings}]),onClick:t[70]||(t[70]=e=>n.switchSettingsTab("timezone"))},(0,u.v_)(e.$t("Timezone")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("ROLE_SUPER_ADMIN")||e.isGranted("HR_LOCAL",a.item.localCenter)||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("p",Mb,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"password"!==a.openedSettings,"is-primary is-outlined":"password"===a.openedSettings}]),onClick:t[71]||(t[71]=e=>n.switchSettingsTab("password"))},(0,u.v_)(e.$t("password")),3)])):(0,c.Q3)("",!0),a.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||a.canManageThisProfile?((0,c.uX)(),(0,c.CE)("p",xb,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"email"!==a.openedSettings,"is-primary is-outlined":"email"===a.openedSettings}]),onClick:t[72]||(t[72]=e=>n.switchSettingsTab("email"))},(0,u.v_)(e.$t("Email")),3)])):(0,c.Q3)("",!0),n.hasCloseAccountActions?((0,c.uX)(),(0,c.CE)("p",Nb,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"delete"!==a.openedSettings,"is-primary is-outlined":"delete"===a.openedSettings}]),onClick:t[73]||(t[73]=e=>n.switchSettingsTab("delete"))},(0,u.v_)(e.$t("Close account")),3)])):(0,c.Q3)("",!0),e.tenant.settingFeatures.multiFactorAuthentication.isActive?((0,c.uX)(),(0,c.CE)("p",Ub,[(0,c.Lk)("a",{class:(0,u.C4)(["button is-rounded",{"is-white":"mfa"!==a.openedSettings,"is-primary is-outlined":"mfa"===a.openedSettings}]),onClick:t[74]||(t[74]=e=>n.switchSettingsTab("mfa"))},(0,u.v_)(e.$t("Multi Factor Authentication")),3)])):(0,c.Q3)("",!0)])])])]),_:1},8,["label"])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","onUpdate:modelValue"])])])):(0,c.Q3)("",!0)])}var Xb=i(87651),Vb=i(76446);const Rb={class:"columns"},Ob={class:"column"}
1,Qb={class:"is-flex is-align-items-flex-end gap-3"},Bb={key:0,value:"UNCONFIRMED_EMAIL"},Gb={value:"ACTIVE"},Wb={value:"INACTIVE"},jb={key:1,value:"UNAPPROVED"},zb={key:2,value:"WAITING_LIST"},qb={key:3,value:"UNREACHABLE"},Jb={key:4,value:"SUSPENDED"},Hb={key:5,value:"EXCLUDED"},Kb={key:6,value:"HELPING_HANDS"},Yb={key:7,value:"CONTRIBUTOR"},Zb=["disabled"],ey={class:"title ml-2 mt-5"},ty={class:"orgo-table-wrap"},iy={class:"tag is-rounded is-success"},sy={class:"tag is-rounded is-default"},ay={key:0,class:"tag is-rounded is-warning"},ny={key:1,class:"tag is-rounded is-danger"},oy={key:2,class:"tag is-rounded is-success"},ly={key:0,class:"tag is-rounded is-success"},ry={key:1,class:"tag is-rounded is-danger"},dy={key:2},cy={key:0,class:"is-flex is-align-items-flex-end gap-3 mt-5"},uy={key:1,class:"mt-5"},my={key:2},py={class:"card p-5 mt-5"},hy={class:"has-text-weight-semibold mb-5 is-flex is-align-items-center is-justify-content-space-between"},gy={href:"https://docs.orgo.space/platform/permissions",target:"_blank",class:"has-text-weight-normal is-size-7"},fy={key:1,class:"mb-5"},by={class:"has-text-weight-semibold mb-2"},yy={key:0,class:"mb-4"},vy={key:0,class:"has-text-weight-semibold mb-4 mt-2"},ky={key:1,class:"has-text-weight-semibold mb-4 mt-2"},Cy={key:2,class:"has-text-weight-semibold mb-4 mt-2"},Ly={key:0,class:"tag is-warning is-rounded is-small mr-3"},wy={key:3},_y={key:2,class:"is-size-7 is-italic mt-5"},Ey={class:"column is-one-quarter"},$y={class:"control saveButtonSticky ml-4"},Fy=["disabled"];function Ty(e,t,i,s,a,n){const o=(0,c.g2)("b-select"),l=(0,c.g2)("b-field"),r=(0,c.g2)("b-loading"),d=(0,c.g2)("b-input"),p=(0,c.g2)("LocalCenterSelect"),h=(0,c.g2)("router-link"),g=(0,c.g2)("b-table-column"),f=(0,c.g2)("b-table"),b=(0,c.g2)("ItemViewModal"),y=(0,c.g2)("b-datepicker"),v=(0,c.g2)("b-checkbox"),k=(0,c.g2)("b-message"),C=(0,c.g2)("b-switch");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.Lk)("form",{onSubmit:t[18]||(t[18]=(0,m.D$)(e=>i.save("permissions"),["prevent"]))},[(0,c.Lk)("div",Rb,[(0,c.Lk)("div",Ob,[(0,c.Lk)("div",Qb,[(0,c.bF)(l,{label:e.$t("status")},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:i.item.status,"onUpdate:modelValue":t[0]||(t[0]=e=>i.item.status=e)},{default:(0,c.k6)(()=>["UNCONFIRMED_EMAIL"===i.item.status?((0,c.uX)(),(0,c.CE)("option",Bb,(0,u.v_)(e.$t("UNCONFIRMED_EMAIL")),1)):(0,c.Q3)("",!0),(0,c.Lk)("option",Gb,(0,u.v_)(e.$t("active")),1),(0,c.Lk)("option",Wb,(0,u.v_)(e.$t("inactive")),1),e.tenant.settingFeatures.users.hasManualApprove?((0,c.uX)(),(0,c.CE)("option",jb,(0,u.v_)(e.$t("unapproved")),1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.WAITING_LIST?((0,c.uX)(),(0,c.CE)("option",zb,(0,u.v_)(e.$t("waitingList")),1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.UNREACHABLE?((0,c.uX)(),(0,c.CE)("option",qb,(0,u.v_)(e.$t("UNREACHABLE")),1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.SUSPENDED?((0,c.uX)(),(0,c.CE)("option",Jb,(0,u.v_)(e.$t("suspended")),1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.EXCLUDED?((0,c.uX)(),(0,c.CE)("option",Hb,(0,u.v_)(e.$t("EXCLUDED")),1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.HELPING_HANDS?((0,c.uX)(),(0,c.CE)("option",Kb,(0,u.v_)(e.$t("HELPING_HANDS")),1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.statuses.CONTRIBUTOR?((0,c.uX)(),(0,c.CE)("option",Yb,(0,u.v_)(e.$t("CONTRIBUTOR")),1)):(0,c.Q3)("",!0)]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.tenant.settingFeatures.resignation.isActive&&!i.item.isGuest&&e.isGranted("HR_LOCAL",i.item.localCenterObject)?((0,c.uX)(),(0,c.CE)("button",{key:0,type:"button",class:"button is-light is-rounded mb-4 is-small ml-5",onClick:t[1]||(t[1]=t=>e.$emit("goToResignation"))},(0,u.v_)(e.$t("Record the resignation of this member")),1)):(0,c.Q3)("",!0)]),(0,c.bF)(b,{modelValue:a.showTransferModal,"onUpdate:modelValue":t[6]||(t[6]=e=>a.showTransferModal=e),title:e.$t("Local center transfer request"),"modal-width":800},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.isLoadingTransfer,"onUpdate:modelValue":t[2]||(t[2]=e=>a.isLoadingTransfer=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("form",{class:"card p-5 mt-3 mb-6 pb-6",onSubmit:t[5]||
1(t[5]=(0,m.D$)((...e)=>n.saveTransferRequest&&n.saveTransferRequest(...e),["prevent"]))},[n.isEditingSelf?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(l,{key:0,label:e.$t("Member"),class:"mt-1 mb-5"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{disabled:!0,"model-value":i.item.fullName},null,8,["model-value"])]),_:1},8,["label"])),(0,c.bF)(l,{label:e.$t("Current local center"),class:"mt-1 mb-5"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{disabled:!0,"model-value":n.currentLocalCenterName},null,8,["model-value"])]),_:1},8,["label"]),(0,c.bF)(p,{modelValue:a.transferNewLocalCenter,"onUpdate:modelValue":t[3]||(t[3]=e=>a.transferNewLocalCenter=e),label:e.$t("New local center"),"local-centers":a.transferLocalCenters,"use-autocomplete":!0,"is-required":!0,class:"mt-1 mb-5",style:{"max-width":"415px"}},null,8,["modelValue","label","local-centers"]),(0,c.bF)(l,{label:e.$t("Reason for transfer request"),class:"mt-1 mb-5"},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.transferReason,"onUpdate:modelValue":t[4]||(t[4]=e=>a.transferReason=e),type:"textarea",required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.Lk)("button",{type:"submit",disabled:a.isLoadingTransfer,class:"mt-5 button is-primary is-rounded"},(0,u.v_)(e.$t("Send request")),9,Zb)],32),a.localCenterRequests.length>0?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("h2",ey,(0,u.v_)(n.isEditingSelf?e.$t("My transfer requests"):e.$t("Transfer requests")),1),(0,c.Lk)("div",ty,[(0,c.bF)(f,{data:a.localCenterRequests,class:"card p-5"},{default:(0,c.k6)(()=>[(0,c.bF)(g,{label:e.$t("Date requested")},{default:(0,c.k6)(t=>[(0,c.bF)(h,{to:{name:"LocalCenterChangeShow",params:{item:t.row.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",iy,(0,u.v_)(e.$filters.format(t.row.dateRequest,"dateTime")),1)]),_:2},1032,["to"])]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("New local center")},{default:(0,c.k6)(e=>[(0,c.Lk)("span",sy,(0,u.v_)(e.row.newLocalCenter.name),1)]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Status")},{default:(0,c.k6)(e=>["pending"===e.row.status?((0,c.uX)(),(0,c.CE)("span",ay,(0,u.v_)(e.row.status),1)):(0,c.Q3)("",!0),"declined"===e.row.status?((0,c.uX)(),(0,c.CE)("span",ny,(0,u.v_)(e.row.status),1)):(0,c.Q3)("",!0),"approved"===e.row.status?((0,c.uX)(),(0,c.CE)("span",oy,(0,u.v_)(e.row.status),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Date processed")},{default:(0,c.k6)(t=>[t.row.dateApproved?((0,c.uX)(),(0,c.CE)("span",ly,(0,u.v_)(e.$filters.format(t.row.dateApproved,"dateTime")),1)):t.row.dateDeclined?((0,c.uX)(),(0,c.CE)("span",ry,(0,u.v_)(e.$filters.format(t.row.dateDeclined,"dateTime")),1)):((0,c.uX)(),(0,c.CE)("span",dy,"-"))]),_:1},8,["label"]),(0,c.bF)(g,null,{default:(0,c.k6)(t=>[(0,c.bF)(h,{to:{name:"LocalCenterChangeShow",params:{item:t.row.id}},class:"button is-rounded is-light is-small"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Details"))+" â ",1)]),_:1},8,["to"])]),_:1})]),_:1},8,["data"])])],64)):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title"]),e.tenant.settingFeatures.localCenter.isActive&&a.localCenters&&a.localCenters.length>0&&e.isGranted("HR_TENANT")&&i.item.id?((0,c.uX)(),(0,c.CE)("div",cy,[(0,c.bF)(p,{modelValue:i.item.localCenter,"onUpdate:modelValue":[t[7]||(t[7]=e=>i.item.localCenter=e),t[8]||(t[8]=e=>i.item.localCenter=e)],label:e.$t("Chapter"),"use-autocomplete":!0,"local-centers":a.localCenters,disabled:0===a.localCenters.length&&!e.isGranted("HR_PARENT_LOCAL"),"filter-by-permission":!0,"permission-to-check":"HR_PARENT_LOCAL",class:"is-flex-grow-1"},null,8,["modelValue","label","local-centers","disabled"]),e.tenant.settingFeatures.localCenter.isActive?((0,c.uX)(),(0,c.CE)("button",{key:0,type:"button",class:"button is-light is-rounded ml-5 is-small mb-1",onClick:t[9]||(t[9]=(...e)=>n.openTransferModal&&n.openTransferModal(...e))},(0,u.v_)(e.$t("Request local transfer")),1)):(0,c.Q3)("",!0)])):n.canRequestTransfer?((0,c.uX)(),(0,c.CE)("div",uy,[(0,c.Lk)("button",{type:"button",class:"button is-light is-rounded is-small",onClick:t[10]||(t[10]=(...e)=>n.openTransferModal&&n.openTransferModal(...e))},(0,u.v_)(e.$t("Request local transfer")),1)])):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL",i.item.localCenterObject)?((0,c.uX)(),(0,c.CE)("div",my,[(0,c.bF)(l,{label:e.$t("Date joined as full member"),class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(y,{modelValue:i.item.dateJoinedFullMember,"onUpdate:modelValue":t[11]||(t[11]=e=>i.item.dateJoinedFullMember=e),editable:"","date-formatter":n.dateFormatterLong,"date-parser":n.dateParserLong,"years-range":[-100,100]},null,8,["modelValue","date-formatter","date-parser"])]),_:1},8,["label"]),e.tenant.settingFeatures.users.hasFullMembership?((0,c.uX)(),(0,c.Wv)(l,{key:0,class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:i.item.isFullMember,"onUpdate:modelValue":t[12]||(t[12]=e=>i.item.isFullMember=e)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("fullMember")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),e.tenant.settingFeatures.events.trainingEventType?((0,c.uX)(),(0,c.Wv)(l,{key:1,class:"mt-5"},{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:i.item.isTrainer,"onUpdate:modelValue":t[13]||(t[13]=e=>i.item.isTrainer=e)},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("isTrainer")),1)]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),(0,c.Lk)("section",py,[(0,c.Lk)("p",hy,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Permissions")),1),(0,c.Lk)("a",gy,(0,u.v_)(e.$t("More about permissions"))+" â ",1)]),n.isEditingSelf?((0,c.uX)(),(0,c.Wv)(k,{key:0,t
1ype:"is-info",class:"mb-4"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("You cannot modify your own permissions. Another administrator must change your permission level for security reasons.")),1)]),_:1})):(0,c.Q3)("",!0),e.isGranted("ROLE_ADMIN_TENANT")?((0,c.uX)(),(0,c.CE)("div",fy,[(0,c.Lk)("p",by,(0,u.v_)(e.$t("ROLE_ADMIN_TENANT")),1),(0,c.bF)(C,{modelValue:a.isRoleAdminTenant,"onUpdate:modelValue":[t[14]||(t[14]=e=>a.isRoleAdminTenant=e),n.setRoleOnItem],size:"is-small",disabled:n.isEditingSelf},null,8,["modelValue","disabled","onUpdate:modelValue"])])):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.permissionsAvailable,(s,o)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:s},[n.shouldShowPermission(s)?((0,c.uX)(),(0,c.CE)("div",yy,[n.isFirstVisibleTenantPermission(s)?((0,c.uX)(),(0,c.CE)("p",vy,(0,u.v_)(e.$t("Organization"))+": "+(0,u.v_)(e.tenant.shortName),1)):(0,c.Q3)("",!0),n.isFirstVisibleLocalPermission(s)?((0,c.uX)(),(0,c.CE)("p",ky,(0,u.v_)(e.$t("Chapter"))+": "+(0,u.v_)(n.localCenterName),1)):(0,c.Q3)("",!0),n.isFirstVisibleParentLocalPermission(s)?((0,c.uX)(),(0,c.CE)("p",Cy,(0,u.v_)(e.$t("Parent chapter"))+": "+(0,u.v_)(n.parentLocalCenterName),1)):(0,c.Q3)("",!0),(0,c.bF)(l,null,{default:(0,c.k6)(()=>[(0,c.bF)(v,{modelValue:i.item.customPermissions,"onUpdate:modelValue":t[15]||(t[15]=e=>i.item.customPermissions=e),name:"perm_"+s,"native-value":s,disabled:n.isEditingSelf},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(n.stripPermissionPrefix(e.$t(s))),1)]),_:2},1032,["modelValue","name","native-value","disabled"]),i.item.userRolePermissions&&i.item.userRolePermissions.includes(s)?((0,c.uX)(),(0,c.Wv)(v,{key:0,id:"perm_"+s,modelValue:a.checkedCheckbox,"onUpdate:modelValue":t[16]||(t[16]=e=>a.checkedCheckbox=e),"native-value":!0,disabled:!0,class:"ml-3 mr-0"},null,8,["id","modelValue"])):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.item.userRoles,e=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[!e.dateEnded&&e.role&&e.role.permissions&&e.role.permissions.includes(s)&&i.item.userRolePermissions&&i.item.userRolePermissions.includes(s)?((0,c.uX)(),(0,c.CE)("span",Ly,(0,u.v_)(e.role.name),1)):(0,c.Q3)("",!0)],64))),128))]),_:2},1024),n.shouldShowSeparator(o)?((0,c.uX)(),(0,c.CE)("hr",wy)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],64))),128)),i.item.userRolePermissions?.length>0?((0,c.uX)(),(0,c.CE)("div",_y,[t[19]||(t[19]=(0,c.Lk)("hr",null,null,-1)),(0,c.bF)(v,{modelValue:a.checkedCheckbox,"onUpdate:modelValue":t[17]||(t[17]=e=>a.checkedCheckbox=e),"native-value":!0,disabled:!0,class:"ml-3 mr-0 is-size-6-half"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Checkbox checked readonly, because the user has an active role that has allowed that permission"))+". ",1),(0,c.bF)(h,{to:{name:"UserUpdate",params:{item:i.item.id},query:{tab:"roles"}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("view"))+" â ",1)]),_:1},8,["to"])]),_:1},8,["modelValue"])])):(0,c.Q3)("",!0)])])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",Ey,[(0,c.Lk)("div",$y,[(0,c.Lk)("button",{ref:"submitXHR",class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),disabled:e.$store.state.isLoadingButton,type:"submit"},(0,u.v_)(e.$t("save")),11,Fy)])])])],32)])}var Sy=i(54481),Ay={props:["item","save"],data(){return{checkedCheckbox:!0,roleSelector:null,profileFields:null,isRoleAdminTenant:!1,localCenters:[],lastTenantIndex:-1,lastParentLocalIndex:-1,lastLocalIndex:-1,showTransferModal:!1,isLoadingTransfer:!1,transferLocalCenters:[],transferNewLocalCenter:null,transferReason:null,localCenterRequests:[]}},created(){this.initRoleSelector(),this.profileFields=this.tenant.settingForms.profileForm.profileFields,this.loadLocalCenters(),this.initLastPermissionIndexes()},methods:{localCenterNameSelector:ds.Hc,sortLocalCenters:ds.KN,dateFormatterLong(e){return(0,ds.OS)(e,(0,Sy.xy)(this.$store.state.tenant))},dateParserLong:ds.WZ,initRoleSelector(){this.item.roles?.includes("ROLE_ADMIN_TENANT")&&(this.isRoleAdminTenant=!0)},shouldShowPermission(e){if(!e)return!1;if(!(0,ds.Zz)(this.user,e))return!1;const t=this.isGranted("ADMIN_TENANT")||this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")||this.isGranted("COMMUNICATION_TENANT")||this.isGranted("EVENT_TENANT")||this.isGranted("HR_ASSISTANT_TENANT"),i=this.isGranted("ADMIN_PARENT_LOCAL")||this.isGranted("HR_PARENT_LOCAL")||this.isGranted("FINANCIAL_PARENT_LOCAL")||this.isGranted("COMMUNICATION_PARENT_LOCAL")||this.isGranted("EVENT_PARENT_LOCAL")||this.isGranted("HR_ASSISTANT_PARENT_LOCAL");return t?!!e.includes("_TENANT")||(e.includes("_PARENT_LOCAL")?this.tenant.settingFeatures.localCenter.hasParent:(e.includes("_LOCAL"),!0)):i&&e.includes("_PARENT_LOCAL")?this.tenant.settingFeatures.localCenter.hasParent:!(!e.includes("_LOCAL")||e.includes("_PARENT_LOCAL"))},shouldShowSeparator(e){const t=this.lastTenantIndex===e,i=this.lastLocalIndex===e;if(!t&&!i)return!1;for(let s=e+1;s<this.permissionsAvailable.length;s++)if(this.shouldShowPermission(this.permissionsAvailable[s]))return!0;return!1},setRoleOnItem(){this.$emit("roleChanged",[this.isRoleAdminTenant?"ROLE_ADMIN_TENANT":"ROLE_USER"])},localCenterObject(e){let t=null;if(e&&e["@id"]&&e.id&&(t=e),e&&("string"===typeof e||e instanceof String)&&e.includes("api/v1")&&this.localCenters&&this.localCenters.length>0){let i=parseInt(e.split("/").pop());t=this.localCenters.find(e=>e.id===i)}return t},initLastPermissionIndexes(){for(let e=0;e<this.permissionsAvailable.length;e++){const t=this.permissionsAvailable[e];t.includes("_TENANT")?this.lastTenantIndex=e:t.includes("_LOCAL")&&!t.includes("_PARENT_LOCAL")?this.lastLocalIndex=e:t.includes("_PARENT_LOCAL")&&(this.lastParentLocalIndex=e)}}
1,loadLocalCenters(){if(this.tenant.settingFeatures.localCenter.isActive&&this.isGranted("HR_PARENT_LOCAL")&&this.item.id)return this.$http.plain.get("/local_centers_all?isActive=1&tenant="+this.tenant.id).then(e=>{this.localCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>console.error(e))},openTransferModal(){this.showTransferModal=!0,this.transferNewLocalCenter=null,this.transferReason=null,this.loadTransferData()},loadTransferData(){this.isLoadingTransfer=!0;const e=this.item.id;this.$http.plain.get("/local_centers").then(e=>{this.transferLocalCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingTransfer=!1}),this.$http.plain.get("/local_center_requests?user="+e).then(e=>{this.localCenterRequests=e.data["hydra:member"]}).catch(e=>{console.log(e)})},saveTransferRequest(){if(this.isLoadingTransfer=!0,!this.transferNewLocalCenter)return this.isLoadingTransfer=!1,this.$buefy.toast.open({message:this.$t("Please select the new local center"),type:"is-danger",duration:7e3});const e={newLocalCenter:this.transferNewLocalCenter,reason:this.transferReason,user:"/api/v1/users/"+this.item.id};this.$http.plain.post("/local_center_requests",e).then(()=>{this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success"}),this.transferReason=null,this.transferNewLocalCenter=null,this.loadTransferData()}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingTransfer=!1})},isProfileField(e){if(this.profileFields.includes(e))return!0},isMandatoryField(e){return this.user.id===this.item.id&&this.tenant.settingForms.profileForm.profileFieldsMandatory&&this.tenant.settingForms.profileForm.profileFieldsMandatory.includes(e)},stripPermissionPrefix(e){const t=["ORG: ","ORG:","ÐÐ Ð: ","ÐÐ Ð:","LOCAL: ","LOCAL:","LOKAL: ","LOKAL:","ÐÐСЦÐÐÐÐ: ","ÐÐСЦÐÐÐÐ:","ÐÐСТÐÐ: ","ÐÐСТÐÐ:","REGION: ","REGION:","JUD: ","JUD:","ÃBERGEORDNET: ","ÃBERGEORDNET:","ÐÐÐÐСÐÐÐ: ","ÐÐÐÐСÐÐÐ:","ÐÐÐÐСТ: ","ÐÐÐÐСТ:"];let i=e;for(const n of t)if(i.startsWith(n)){i=i.substring(n.length);break}const s=[" Local"];for(const n of s)if(i.endsWith(n)){i=i.substring(0,i.length-n.length);break}const a=[" Centru PÄrinte Local"];for(const n of a)if(i.includes(n)){i=i.replace(n,"");break}return i.trim()},isFirstVisibleTenantPermission(e){if(!e.includes("_TENANT"))return!1;for(const t of this.permissionsAvailable)if(t.includes("_TENANT")&&this.shouldShowPermission(t))return t===e;return!1},isFirstVisibleLocalPermission(e){if(!e.includes("_LOCAL")||e.includes("_PARENT_LOCAL"))return!1;for(const t of this.permissionsAvailable)if(t.includes("_LOCAL")&&!t.includes("_PARENT_LOCAL")&&this.shouldShowPermission(t))return t===e;return!1},isFirstVisibleParentLocalPermission(e){if(!e.includes("_PARENT_LOCAL"))return!1;for(const t of this.permissionsAvailable)if(t.includes("_PARENT_LOCAL")&&this.shouldShowPermission(t))return t===e;return!1}},computed:{...(0,vi.L8)(["user","tenant","isGranted","isCustomFieldVisible"]),isEditingSelf(){return this.item&&this.user&&this.item.id===this.user.id},canRequestTransfer(){return this.tenant.settingFeatures.localCenter.isActive&&!!this.item.id&&this.isGranted("HR_LOCAL",this.item.localCenterObject)},localCenterName(){return this.item.localCenterObject&&this.item.localCenterObject.name?this.item.localCenterObject.name:this.item.localCenter&&"object"===typeof this.item.localCenter&&this.item.localCenter.name?this.item.localCenter.name:this.$t("Local")},currentLocalCenterName(){return this.item?"object"===typeof this.item.localCenter&&this.item.localCenter?this.item.localCenter.name:this.item.localCenterObject?this.item.localCenterObject.name:"-":"-"},parentLocalCenterName(){return this.item.localCenterParent&&this.item.localCenterParent.name?this.item.localCenterParent.name:this.item.localCenterObject&&this.item.localCenterObject.parent&&this.item.localCenterObject.parent.name?this.item.localCenterObject.parent.name:this.$t("Region")}},components:{LocalCenterSelect:ka.A,ItemViewModal:Jn.A},mixins:[yh.A]};const Py=(0,Li.A)(Ay,[["render",Ty]]);var Iy=Py;const My={class:"icon is-small"},xy={class:"icon is-small"},Ny={class:"icon-text"},Uy={class:"has-text-dark has-text-weight-semibold ml-2 nowrap"},Dy={key:0,class:"is-rounded tag is-default"},Xy={key:0,class:"tag is-rounded"},Vy={key:1,class:"tag is-rounded"},Ry={class:"tag is-rounded is-default"},Oy=["onClick"],Qy={class:"icon is-small"},By=["onClick"],Gy={class:"icon is-small"},Wy={key:3,class:"has-text-weight-semibold is-size-5 mt-6"},jy={key:0,class:"tag is-rounded"},zy={class:"tag is-rounded is-default"},qy={class:"buttons nowrap"},Jy=["onClick"],Hy={class:"icon is-small"},Ky=["onClick"],Yy={class:"icon is-small"},Zy={key:5,class:"mt-6 ml-1 has-text-dark"},ev={key:6,class:"mt-6 ml-1"},tv={key:0,class:"has-text-dark"},iv={key:7,class:"has-text-weight-semibold is-size-5 mt-6"},sv={class:"tag is-rounded is-default"},av={class:"is-rounded tag is-light is-small"},nv={class:"tag is-rounded is-default"},ov={class:"buttons nowrap"},lv=["onClick"],rv={class:"icon is-small"},dv=["onClick"],cv={class:"icon is-small"},uv={class:"badge_add"},mv={class:"modal-card"},pv={class:"modal-card-head"},hv={class:"modal-card-title"},gv={class:"modal-card-body badge-modal-body"},fv={autocomplete:"off"},bv={key:0,class:"badge-picker"},yv={key:0,class:"badge-picker-categories"},vv={class:"badge-picker-search"},kv={class:"badge-picker-list"},Cv={class:"badge-picker-item-name"},Lv=["onClick"],wv={class:"ml-2 badge-picker-item-name"},_v={class:"badge-picker-search"},Ev={key:0,class:"badge-picker-list"},$v=["onClick"],Fv={class:"ml-2 badge-picker-item-name"},Tv={key:1,class:"badge-picker-empty"},Sv={key:2,class:"badge-picker-empty"},Av={key:1},Pv={class:"badge-selected-header mb-4"},Iv={class:"badge-selected-info"},Mv={class:"ml-3 has-text-weight-semibold is-size-5"},xv={class:"modal-card-foot"},Nv={class:"buttons-left"},Uv={class:"buttons-right"},Dv={class:"modal-card"},Xv={class:"modal-card-head"},Vv={class:"modal-card-title"},Rv={class:"modal-card-body"},Ov={autocomplete:"off"},Qv={class:"columns mb-0"},Bv={class:"modal-card-foot"},Gv={class:"buttons-left"},Wv={class:"buttons-right"},jv={class:"modal-card slide-from-right"},zv={class:"modal-card-head pb-2"},qv={class:"modal-card-title"},Jv={class:"modal-card-body"},Hv={autocomplete:"off"},Kv={value:"purchase"},Yv={value:"event"},Zv={value:"engagement"},ek={value:"referral"},tk={value:"manual"},ik={class:"modal-card-foot"},sk={class:"buttons-left"},ak={class:"buttons-right"};function nk(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("font-awesome-icon"),r=(0,c.g2)("LogoThumbnail"),d=(0,c.g2)("b-table-column"),m=(0,c.g2)("b-table"),p=(0,c.g2)("b-input"),h=(0,c.g2)("b-datepicker"),g=(0,c.g2)("b-field"),f=(0,c.g2)("b-radio"),b=(0,c.g2)("b-modal"),y=(0,c.g2)("b-select");return(0,c.uX)(),(0,c.CE)("div",null,[(0,c.Lk)("section",null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),e.isGranted("HR_TENANT")||e.isGranted("HR_LOCAL",i.item.localCenter)?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-primary is-small is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[1]||(t[1]=e=>n.addBadge())},[(0,c.Lk)("span",My,[(0,c.bF)(l,{icon:"fa-light fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("addBadge")),1)],2)):(0,c.Q3)("",!0),e.tenant.settingFeatures.gamification.hasHours&&e.isGranted("HR_ASSISTANT_LOCAL",i.item.localCenter)?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-primary is-outlined is-small is-rounded ml-4",onClick:t[2]||(t[2]=e=>n.addBadgeHour())},[(0,c.Lk)("span",xy,[(0,c.bF)(l,{icon:"fa-light fa-clock"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Add volunteering hours")),1)])):(0,c.Q3)("",!0),a.userBadges&&a.userBadges.length>0?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)(["mt-5",{"card p-3":!e.$isMobile()}])},[(0,c.bF)(m,{data:a.userBadges,"mobile-cards":!1},{default:(0,c.k6)(()=>[(0,c.bF)(d,{label:e.$t("badge"),field:"badge.name",sortable:""},{default:(0,c.k6)(e=>
1[(0,c.Lk)("div",Ny,[((0,c.uX)(),(0,c.Wv)(r,{key:"badge_"+e.row.badge.id,item:e.row.badge,"is-type":"roundSmall"},null,8,["item"])),(0,c.Lk)("span",Uy,(0,u.v_)(e.row.badge.name),1)])]),_:1},8,["label"]),e.tenant.settingFeatures.gamification.hasType?((0,c.uX)(),(0,c.Wv)(d,{key:0,label:e.$t("type"),field:"badge.type.id",sortable:""},{default:(0,c.k6)(e=>[e.row.badge.type?((0,c.uX)(),(0,c.CE)("span",Dy,(0,u.v_)(e.row.badge.type.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(d,{label:e.$t("status"),field:"status",width:"15%","cell-class":"nowrap",sortable:""},{default:(0,c.k6)(t=>[0===t.row.status||"0"===t.row.status?((0,c.uX)(),(0,c.CE)("span",{key:"pending_"+t.row.id,class:"is-warning is-rounded tag"},(0,u.v_)(e.$t("badgeStatusPending")),1)):(0,c.Q3)("",!0),1===t.row.status||"1"===t.row.status?((0,c.uX)(),(0,c.CE)("span",{key:"success_"+t.row.id,class:"is-success tag is-rounded"},(0,u.v_)(e.$t("badgeStatusCompleted")),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("badgeMaster"),field:"owner.fullName",width:"20%","cell-class":"nowrap",sortable:""},{default:(0,c.k6)(t=>[t.row.owner&&!t.row.badge.hours?((0,c.uX)(),(0,c.CE)("span",Xy,(0,u.v_)(t.row.owner?t.row.owner.fullName:""),1)):((0,c.uX)(),(0,c.CE)("span",Vy,(0,u.v_)(e.tenant.shortName),1))]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("date"),field:"dateCreated",width:"25%","cell-class":"nowrap",sortable:""},{default:(0,c.k6)(t=>[(0,c.Lk)("span",Ry,(0,u.v_)(e.$filters.format(t.row.dateCreated)),1)]),_:1},8,["label"]),e.isGranted("HR_LOCAL",i.item.localCenter)?((0,c.uX)(),(0,c.Wv)(d,{key:1,width:"1%","cell-class":"nowrap"},{default:(0,c.k6)(e=>[(0,c.Lk)("button",{class:"button is-white is-small",onClick:t=>n.confirmDelete(e.row,e.index)},[(0,c.Lk)("span",Qy,[(0,c.bF)(l,{icon:"fa-light fa-trash"})])],8,Oy),(0,c.Lk)("button",{class:"button is-white is-small",onClick:t=>n.editBadge(e.row,e.index)},[(0,c.Lk)("span",Gy,[(0,c.bF)(l,{icon:"fa-light fa-pen"})])],8,By)]),_:1})):(0,c.Q3)("",!0)]),_:1},8,["data"])],2)):(0,c.Q3)("",!0),a.badgeHours&&a.badgeHours.length>0?((0,c.uX)(),(0,c.CE)("p",Wy,(0,u.v_)(e.$t("Volunteering")),1)):(0,c.Q3)("",!0),a.badgeHours&&a.badgeHours.length>0?((0,c.uX)(),(0,c.CE)("div",{key:4,class:(0,u.C4)(["mt-5",{"card p-3":!e.$isMobile()}])},[(0,c.bF)(m,{data:a.badgeHours,"mobile-cards":!1},{default:(0,c.k6)(()=>[(0,c.bF)(d,{label:e.$t("title")},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.title),1)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("Hours number"),field:"hours",width:"15%","cell-class":"nowrap",sortable:""},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.hours),1)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("badgeMaster"),field:"owner.fullName",width:"20%","cell-class":"nowrap",sortable:""},{default:(0,c.k6)(e=>[e.row.owner?((0,c.uX)(),(0,c.CE)("span",jy,(0,u.v_)(e.row.owner?e.row.owner.fullName:""),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("Period"),field:"dateCreated",width:"25%","cell-class":"nowrap",sortable:""},{default:(0,c.k6)(t=>[(0,c.Lk)("span",zy,(0,u.v_)(e.$filters.format(t.row.dateBegin))+" - "+(0,u.v_)(e.$filters.format(t.row.dateEnd)),1)]),_:1},8,["label"]),e.isGranted("HR_LOCAL",i.item.localCenter)?((0,c.uX)(),(0,c.Wv)(d,{key:0,width:"1%"},{default:(0,c.k6)(e=>[(0,c.Lk)("div",qy,[(0,c.Lk)("button",{class:"button is-white is-small",onClick:t=>n.confirmDeleteBadgeHour(e.row,e.index)},[(0,c.Lk)("span",Hy,[(0,c.bF)(l,{icon:"fa-light fa-trash"})])],8,Jy),(0,c.Lk)("button",{class:"button is-white is-small",onClick:t=>n.editBadgeHour(e.row,e.index)},[(0,c.Lk)("span",Yy,[(0,c.bF)(l,{icon:"fa-light fa-pen"})])],8,Ky)])]),_:1})):(0,c.Q3)("",!0)]),_:1},8,["data"])],2)):(0,c.Q3)("",!0),Array.isArray(a.userBadges)&&0===a.userBadges.length?((0,c.uX)(),(0,c.CE)("p",Zy,(0,u.v_)(e.$t("noBadgesYet"))+". ",1)):(0,c.Q3)("",!0),e.tenant.settingFeatures.gamification.hasHours?((0,c.uX)(),(0,c.CE)("section",ev,[Array.isArray(a.badgeHours)&&0===a.badgeHours.length?((0,c.uX)(),(0,c.CE)("p",tv,(0,u.v_)(e.$t("No volunteering hours yet"))+". ",1)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),a.userPointsTransactions&&a.userPointsTransactions.length>0?((0,c.uX)(),(0,c.CE)("p",iv,(0,u.v_)(e.$t("Membership tires points transactions")),1)):(0,c.Q3)("",!0),a.userPointsTransactions&&a.userPointsTransactions.length>0?((0,c.uX)(),(0,c.CE)("div",{key:8,class:(0,u.C4)(["mt-5",{"card p-3":!e.$isMobile()}])},[(0,c.bF)(m,{data:a.userPointsTransactions,"mobile-cards":!1},{default:(0,c.k6)(()=>[(0,c.bF)(d,{label:e.$t("Points"),field:"points",sortable:""},{default:(0,c.k6)(e=>[(0,c.Lk)("span",{class:(0,u.C4)(["tag is-rounded",e.row.points>0?"is-success":"is-danger"])},(0,u.v_)(e.row.points>0?"+":"")+(0,u.v_)(e.row.points),3)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("Activity Type"),field:"activityType",sortable:""},{default:(0,c.k6)(e=>[(0,c.Lk)("span",sv,(0,u.v_)(e.row.activityType),1)]),_:1},8,["label"]),(0,c.bF)(d,{width:e.$isMobile()?"300px":void 0,label:e.$t("Description")},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.description),1)]),_:1},8,["width","label"]),(0,c.bF)(d,{label:e.$t("Reference ID")},{default:(0,c.k6)(e=>[(0,c.Lk)("span",av,"#"+(0,u.v_)(e.row.referenceId),1)]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("Date"),field:"dateCreated",sortable:""},{default:(0,c.k6)(t=>[(0,c.Lk)("span",nv,(0,u.v_)(e.$filters.format(t.row.dateCreated)),1)]),_:1},8,["label"]),e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.Wv)(d,{key:0,width:"1%"},{default:(0,c.k6)(e=>[(0,c.Lk)("div",ov,[(0,c.Lk)("button",{class:"button is-white is-small",onClick:t=>n.confirmDeletePointsTransaction(e.row,e.index)},[(0,c.Lk)("span",rv,[(0,c.bF)(l,{icon:"fa-light fa-trash"})])],8,lv),(0,c.Lk)("button",{class:"button is-white is-small",onClick:t=>n.editPointsTransaction(e.row,e.index)},[(0,c.Lk)("span",cv,[(0,c.bF)(l,{icon:"fa-light fa-pen"})])],8,dv)])]),_:1})):(0,c.Q3)("",!0)]),_:1},8,["data"])],2)):(0,c.Q3)("",!0)]),(0,c.Lk)("div",uv,[e.isGranted("HR_LOCAL",i.item.localCenter)||e.isGranted("HR_ASSISTANT_LOCAL",i.item.localCenter)?((0,c.uX)(),(0,c.Wv)(b,{key:0,modelValue:a.isModalActive,"onUpdate:modelValue":t[14]||(t[14]=e=>a.isModalActive=e),width:800,scroll:"keep","has-modal-card":!0,"can-cancel":["escape","outside"],"full-screen":e.$isMobile()},{default:(0,c.k6)(()=>[(0,c.Lk)("div",mv,[(0,c.Lk)("header",pv,[(0,c.Lk)("p",hv,(0,u.v_)(a.editingBadge?e.$t("edit"):e.$t("addBadge")),1),(0,c.Lk)("button",{type:"button",class:"delete",onClick:t[3]||(t[3]=e=>a.isModalActive=!1)})]),(0,c.Lk)("section",gv,[(0,c.Lk)("form",fv,[a.selectedBadgeObj?((0,c.uX)(),(0,c.CE)("div",Av,[(0,c.Lk)("div",Pv,[(0,c.Lk)("div",Iv,[(0,c.bF)(r,{item:a.selectedBadgeObj,"is-type":"roundMedium"},null,8,["item"]),(0,c.Lk)("span",Mv,(0,u.v_)(a.selectedBadgeObj.name),1)]),a.editingBadge?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-rounded",onClick:t[7]||(t[7]=(...e)=>n.clearBadgeSelection&&n.clearBadgeSelection(...e))},(0,u.v_)(e.$t("Change")),1))]),(0,c.bF)(g,{label:e.$t("badgeDateCompleted")},{default:(0,c.k6)(()=>[(0,c.bF)(h,{modelValue:a.userBadge.dateCreated,"onUpdate:modelValue":t[8]||(t[8]=e=>a.userBadge.dateCreated=e),editable:!0,"append-to-body":"",placeholder:e.$t("badgeDateCompleted")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("badgeComment")},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.userBadge.commentMaster,"onUpdate:modelValue":t[9]||(t[9]=e=>a.userBadge.commentMaster=e),type:"textarea",placeholder:e.$t("badgeComment"),rows:"2"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("status")},{default:(0,c.k6)(()=>[(0,c.Lk)("div",null,[(0,c.bF)(f,{modelValue:a.userBadge.status,"onUpdate:modelValue":t[10]||(t[10]=e=>a.userBadge.status=e),"native-value":"1"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("badgeStatusCompleted")),1)]),_:1},8,["modelValue"]),(0,c.bF)(f,{modelValue:a.userBadge.status,"onUpdate:modelValue":t[11]||(t[11]=e=>a.userBadge.status=e),"native-value":"0"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("badgeStatusPending")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"])])):((0,c.uX)(),(0,c.CE)("div",bv,[e.tenant.settingFeatures.gamification.hasType?((0,c.uX)(),(0,c.CE)("div",yv,[(0,c.Lk)("div",vv,[(0,c.bF)(p,{modelValue:a.categorySearch,"onUpdate:modelValue":t[4]||(t[4]=e=>a.categorySearch=e),placeholder:e.$t("Search categories"),size:"is-small",icon:"magnifying-glass",rounded:""},null,8,["modelValue","placeholder"])]),(0,c.Lk)("div",kv,[(0,c.Lk)("div",{class:(0,u.C4)(["badge-picker-item",{"is-active":"none"===a.selectedBadgeType}]),onClick:t[5]||(t[5]=(...e)=>n.selectNoBadgeType&&n.selectNoBadgeType(...e))},[(0,c.Lk)("span",Cv,(0,u.v_)(e.$t("No category")),1)],2),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.filteredBadgeTypes,e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:(0,u.C4)(["badge-picker-item",{"is-active":a.selectedBadgeType===e.id}]),onClick:t=>n.selectBadgeType(e)},[(0,c.bF)(r,{item:e,"is-type":"roundSmall"},null,8,["item"]),(0,c.Lk)("span",wv,(0,u.v_)(e.name),1)],10,Lv))),128))])])):(0,c.Q3)("",!0),(0,c.Lk)("div",{class:(0,u.C4)(["badge-picker-badges",{"no-border":!e.tenant.settingFeatures.gamification.hasType}])},[(0,c.Lk)("div",_v,[(0,c.bF)(p,{modelValue:a.badgeSearch,"onUpdate:modelValue":t[6]||(t[6]=e=>a.badgeSearch=e),placeholder:e.$t("Search badges"),size:"is-small",icon:"magnifying-glass",rounded:""},null,8,["modelValue","placeholder"])]),n.searchedBadges.length>0?((0,c.uX)(),(0,c.CE)("div",Ev,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.searchedBadges,e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:"badge-picker-item",onClick:t=>n.pickBadge(e)},[(0,c.bF)(r,{item:e,"is-type":"roundSmall"},null,8,["item"]),(0,c.Lk)("span",Fv,(0,u.v_)(e.name),1)],8,$v))),128))])):e.tenant.settingFeatures.gamification.hasType&&!a.selectedBadgeType?((0,c.uX)(),(0,c.CE)("p",Tv,(0,u.v_)(e.$t("selectBadgeType")),1)):((0,c.uX)(),(0,c.CE)("p",Sv,(0,u.v_)(e.$t("noBadgesInCategory")),1))],2)]))])]),(0,c.Lk)("footer",xv,[(0,c.Lk)("div",Nv,[a.selectedBadgeObj?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[12]||(t[12]=(...e)=>n.saveEditModal&&n.saveEditModal(...e))},(0,u.v_)(e.$t("save")),3)):(0,c.Q3)("",!0)]),(0,c.Lk)("div",Uv,[(0,c.Lk)("button",{class:"button is-rounded",onClick:t[13]||(t[13]=(...e)=>n.cancelEditModal&&n.cancelEditModal(...e))},(0,u.v_)(e.$t("cancel")),1)])])])]),_:1},8,["modelValue","full-screen"])):(0,c.Q3)("",!0),e.tenant.settingFeatures.gamification.hasHours&&(e.isGranted("HR_LOCAL",i.item.localCenter)||e.isGranted("HR_ASSISTANT_LOCAL",i.item.localCenter))?((0,c.uX)(),(0,c.Wv)(b,{key:1,modelValue:a.isModalActiveBadgeHour,"onUpdate:modelValue":t[23]||(t[23]=e=>a.isModalActiveBadgeHour=e),width:800,scroll:"keep","has-modal-card":!0,"can-cancel":["escape","outside"],"full-screen":e.$isMobile()},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Dv,[(0,c.Lk)("header",Xv,[(0,c.Lk)("p",Vv,(0,u.v_)(a.editingBadgeHour?e.$t("edit"):e.$t("Add volunteering hours")),1),(0,c.Lk)("button",{type:"button",class:"delete",onClick:t[15]||(t[15]=e=>a.isModalActiveBadgeHour=!1)})]),(0,c.Lk)("section",Rv,[(0,c.Lk)("form",Ov,[(0,c.Lk)("div",Qv,[(0,c.bF)(g,{label:e.$t("Period"),class:(0,u.C4)(["column",{"mb-0 pb-0":e.$isMobile()}])},{default:(0,c.k6)(()=>[(0,c.bF)(h,{modelValue:a.badgeHour.dateBegin,"onUpdate:modelValue":t[16]||(t[16]=e=>a.badgeHour.dateBegin=e),size:"is-small",editable:!0,expanded:"",placeholder:e.$t("Begin date")},null,8,["modelValue","placeholder"]),(0,c.bF)(h,{modelValue:a.badgeHour.dateEnd,"onUpdate:modelValue":t[17]||(t[17]=e=>a.badgeHour.dateEnd=e),size:"is-small",editable:!0,expanded:"",placeholder:e.$t("End date")},null,8,["modelValue","placeholder"])]),_:1},8,["label","class"]),(0,c.bF)(g,{label:e.$t("Hours number"),class:"column"},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.badgeHour.hours,"onUpdate:modelValue":t[18]||(t[18]=e=>a.badgeHour.hours=e),type:"number",size:"is-small",placeholder:e.$t("Hours number")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),(0,c.bF)(g,null,{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.badgeHour.title,"onUpdate:modelValue":t[19]||(t[19]=e=>a.badgeHour.title=e),placeholder:e.$t("title")},null,8,["modelValue","placeholder"])]),_:1}),(0,c.bF)(g,null,{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.badgeHour.comment,"onUpdate:modelValue":t[20]||(t[20]=e=>a.badgeHour.comment=e),type:"textarea",placeholder:e.$t("Notes"),rows:"2"},null,8,["modelValue","placeholder"])]),_:1})])]),(0,c.Lk)("footer",Bv,[(0,c.Lk)("div",Gv,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[21]||(t[21]=(...e)=>n.saveEditModalBadgeHour&&n.saveEditModalBadgeHour(...e))},(0,u.v_)(e.$t("save")),3)]),(0,c.Lk)("div",Wv,[(0,c.Lk)("button",{class:"button is-rounded",onClick:t[22]||(t[22]=(...e)=>n.cancelEditModalBadgeHour&&n.cancelEditModalBadgeHour(...e))},(0,u.v_)(e.$t("cancel")),1)])])])]),_:1},8,["modelValue","full-screen"])):(0,c.Q3)("",!0),e.isGranted("HR_LOCAL",i.item.localCenter)?((0,c.uX)(),(0,c.Wv)(b,{key:2,modelValue:a.isModalActivePointsTransaction,"onUpdate:modelValue":t[31]||(t[31]=e=>a.isModalActivePointsTransaction=e),width:800,scroll:"keep","has-modal-card":!0,"can-cancel":["escape","outside"],"full-screen":e.$isMobile()},{default:(0,c.k6)(()=>[(0,c.Lk)("div",jv,[(0,c.Lk)("header",zv,[(0,c.Lk)("p",qv,(0,u.v_)(a.editingPointsTransaction?e.$t("Edit Points Transaction"):e.$t("Add Points Transaction")),1),(0,c.Lk)("button",{type:"button",class:"delete",onClick:t[24]||(t[24]=e=>a.isModalActivePointsTransaction=!1)})]),(0,c.Lk)("section",Jv,[(0,c.Lk)("form",Hv,[(0,c.bF)(g,{label:e.$t("Points")},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.pointsTransaction.points,"onUpdate:modelValue":t[25]||(t[25]=e=>a.pointsTransaction.points=e),type:"number",placeholder:e.$t("Points")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Activity Type")},{default:(0,c.k6)(()=>[(0,c.bF)(y,{modelValue:a.pointsTransaction.activityType,"onUpdate:modelValue":t[26]||(t[26]=e=>a.pointsTransaction.activityType=e),disabled:"",placeholder:e.$t("Select activity type")},{default:(0,c.k6)(()=>[(0,c.Lk)("option",Kv,(0,u.v_)(e.$t("Purchase")),1),(0,c.Lk)("option",Yv,(0,u.v_)(e.$t("Event")),1),(0,c.Lk)("option",Zv,(0,u.v_)(e.$t("Engagement")),1),(0,c.Lk)("option",ek,(0,u.v_)(e.$t("Referral")),1),(0,c.Lk)("option",tk,(0,u.v_)(e.$t("Manual")),1)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Description")},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.pointsTransaction.description,"onUpdate:modelValue":t[27]||(t[27]=e=>a.pointsTransaction.description=e),disabled:"",type:"textarea",placeholder:e.$t("Description"),rows:"3"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Reference ID")},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.pointsTransaction.referenceId,"onUpdate:modelValue":t[28]||(t[28]=e=>a.pointsTransaction.referenceId=e),disabled:"",placeholder:e.$t("Reference ID")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),(0,c.Lk)("footer",ik,[(0,c.Lk)("div",sk,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[29]||(t[29]=(...e)=>n.saveEditModalPointsTransaction&&n.saveEditModalPointsTransaction(...e))},(0,u.v_)(e.$t("save")),3)]),(0,c.Lk)("div",ak,[(0,c.Lk)("button",{class:"button is-rounded",onClick:t[30]||(t[30]=(...e)=>n.cancelEditModalPointsTransaction&&n.cancelEditModalPointsTransaction(...e))},(0,u.v_)(e.$t("cancel")),1)])])])]),_:1},8,["modelValue","full-screen"])):(0,c.Q3)("",!0)])])}i(18237);var ok={props:["item"],data(){return{isModalActive:!1,isModalActiveBadgeHour:!1,isModalActivePointsTransaction:!1,editingBadge:!1,editingBadgeHour:!1,editingPointsTransaction:!1,selectedBadgeType:null,selectedBadge:null,selectedBadgeObj:null,
1selectedBadgeHour:null,userBadges:null,badgeHours:null,userPointsTransactions:null,userBadge:null,badgeHour:null,pointsTransaction:null,badges:[],badgeTypes:[],filteredBadges:[],categorySearch:"",badgeSearch:"",isLoading:!1,userTotalPoints:0}},watch:{isModalActive(e){this.$isMobile()&&(this.$store.state.hideMobileNavbarTabs=e)},isModalActiveBadgeHour(e){this.$isMobile()&&(this.$store.state.hideMobileNavbarTabs=e)},isModalActivePointsTransaction(e){this.$isMobile()&&(this.$store.state.hideMobileNavbarTabs=e)}},created(){this.initNewUserBadge(),this.initNewBadgeHour(),this.initNewPointsTransaction(),this.loadTenantBadges(),this.loadUserPoints()},methods:{initNewUserBadge(){this.userBadge={user:this.item["@id"],status:1,dateCreated:new Date,badge:null,commentMaster:null,commentUser:null}},initNewBadgeHour(){this.badgeHour={user:this.item["@id"],dateBegin:new Date,dateEnd:new Date,title:null,hours:null,comment:null}},initNewPointsTransaction(){this.pointsTransaction={user:this.item["@id"],points:null,activityType:"manual",description:null,referenceId:null,referenceType:null}},loadTenantBadges(){this.isLoading=!0,this.$http.plain.get("/badge_types").then(e=>{this.badgeTypes=e.data["hydra:member"],this.loadUserBadges()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},loadUserBadges(){return this.$http.plain.get("/badge_users?user="+this.item.id).then(e=>(this.userBadges=e.data["hydra:member"],this.$http.plain.get("/badge_hours?user="+this.item.id).then(e=>(this.badgeHours=e.data["hydra:member"],this.$http.plain.get("/badge_points_transactions?user="+this.item.id).then(e=>{this.userPointsTransactions=e.data["hydra:member"]})))))},filterBadges(){let e="/badges?";const t=[];this.tenant.settingFeatures.gamification.hasType&&this.selectedBadgeType&&("none"===this.selectedBadgeType?t.push("exists[type]=false"):t.push("type="+this.selectedBadgeType)),e+=t.join("&"),this.$http.plain.get(e).then(e=>{this.filteredBadges=e.data["hydra:member"]}).catch(e=>{console.error(e)})},saveEditModal(){const e=(0,ds.GG)(this.userBadge.dateCreated);if(this.userBadge.id){const t={status:parseInt(this.userBadge.status),commentMaster:this.userBadge.commentMaster,commentUser:this.userBadge.commentUser,badge:this.userBadge.badge["@id"]};e&&(t.dateCreated=e),this.$http.plain.patch("/badge_users/"+this.userBadge.id,t).then(e=>{this.loadUserBadges(),this.resetUserBadge(),this.editingBadge=!1,this.isModalActive=!1,this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("errorOccurred")})})}else if(this.userBadge.badge){const t={user:this.userBadge.user,badge:this.userBadge.badge,status:parseInt(this.userBadge.status),commentMaster:this.userBadge.commentMaster,commentUser:this.userBadge.commentUser};e&&(t.dateCreated=e),this.$http.plain.post("/badge_users",t).then(e=>{this.loadUserBadges(),this.resetUserBadge(),this.isModalActive=!1}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("errorOccurred")})})}},saveEditModalBadgeHour(){this.badgeHour.hours=parseInt(this.badgeHour.hours),this.badgeHour.id?this.$http.plain.patch("/badge_hours/"+this.badgeHour.id,{comment:this.badgeHour.comment,hours:parseInt(this.badgeHour.hours),title:this.badgeHour.title,dateBegin:this.badgeHour.dateBegin,dateEnd:this.badgeHour.dateEnd}).then(e=>{this.resetBadgeHour(),this.loadUserBadges(),this.editingBadgeHour=!1,this.isModalActiveBadgeHour=!1,this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})}).catch(e=>console.error(e)):this.badgeHour&&this.$http.plain.post("/badge_hours",this.badgeHour).then(e=>{this.resetBadgeHour(),this.loadUserBadges(),this.isModalActiveBadgeHour=!1}).catch(e=>console.error(e))},resetUserBadge(){this.selectedBadgeType=null,this.selectedBadge=null,this.selectedBadgeObj=null,this.categorySearch="",this.badgeSearch="",this.initNewUserBadge()},resetBadgeHour(){this.selectedBadgeHour=null,this.initNewBadgeHour()},resetPointsTransaction(){this.initNewPointsTransaction()},selectBadgeType(e){this.selectedBadgeType=e.id,this.filterBadges()},selectNoBadgeType(){this.selectedBadgeType="none",this.filterBadges()},pickBadge(e){this.selectedBadgeObj=e,this.selectedBadge=e.name,this.userBadge.badge=e["@id"],void 0===this.userBadge.id&&e.defaultNote?this.userBadge.commentMaster=e.defaultNote:this.userBadge.commentMaster=null},clearBadgeSelection(){this.selectedBadgeObj=null,this.selectedBadge=null,this.userBadge.badge=null,this.userBadge.commentMaster=null},badgeSelect(e){e&&this.pickBadge(e)},addBadge(){this.resetUserBadge(),this.tenant.settingFeatures.gamification.hasType||this.filterBadges(),this.isModalActive=!0},addBadgeHour(){this.resetBadgeHour(),this.isModalActiveBadgeHour=!0},cancelEditModal(){this.isModalActive=!1,this.editingBadge=!1},cancelEditModalBadgeHour(){this.isModalActiveBadgeHour=!1,this.editingBadgeHour=!1},editBadge(e,t){this.userBadge=e,this.userBadge.dateCreated=new Date(this.userBadge.dateCreated),this.selectedBadgeType=this.userBadge.badge.type?this.userBadge.badge.type.id:null,this.selectedBadge=this.userBadge.badge.name,this.selectedBadgeObj=this.userBadge.badge,this.editingBadge=!0,this.isModalActive=!0},editBadgeHour(e,t){this.badgeHour=e,this.badgeHour.dateBegin=new Date(this.badgeHour.dateBegin),this.badgeHour.dateEnd=new Date(this.badgeHour.dateEnd),this.selectedBadgeHour=this.badgeHour.title,this.editingBadgeHour=!0,this.isModalActiveBadgeHour=!0},confirmDelete(e,t){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+this.$t("badge")+" "+e.badge.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.delete(e,t)})},delete(e,t){this.isLoading=!0,this.$http.plain.delete("/badge_users/"+e.id).then(e=>{this.loadUserBadges(),this.resetUserBadge(),this.$buefy.toast.o
1pen(this.$t("deleted"))}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},confirmDeleteBadgeHour(e,t){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+e.title+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deleteBadgeHour(e,t)})},deleteBadgeHour(e,t){this.isLoading=!0,this.$http.plain.delete("/badge_hours/"+e.id).then(e=>{this.loadUserBadges(),this.resetUserBadge(),this.$buefy.toast.open(this.$t("deleted"))}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},loadUserPoints(){this.$http.plain.get("/badge_points_transactions?user="+this.item.id).then(e=>{const t=e.data["hydra:member"];this.userTotalPoints=t.reduce((e,t)=>e+t.points,0)}).catch(e=>console.log(e))},isTierAchieved(e){return this.userTotalPoints>=e.pointsRequired},editPointsTransaction(e,t){this.pointsTransaction={...e},this.editingPointsTransaction=!0,this.isModalActivePointsTransaction=!0},addPointsTransaction(){this.resetPointsTransaction(),this.isModalActivePointsTransaction=!0},cancelEditModalPointsTransaction(){this.isModalActivePointsTransaction=!1,this.editingPointsTransaction=!1,this.resetPointsTransaction()},saveEditModalPointsTransaction(){this.pointsTransaction.points=parseInt(this.pointsTransaction.points),this.pointsTransaction.id?this.$http.plain.patch("/badge_points_transactions/"+this.pointsTransaction.id,{points:parseInt(this.pointsTransaction.points),activityType:this.pointsTransaction.activityType,description:this.pointsTransaction.description,referenceId:this.pointsTransaction.referenceId,referenceType:this.pointsTransaction.referenceType}).then(e=>{this.resetPointsTransaction(),this.loadUserBadges(),this.loadUserPoints(),this.editingPointsTransaction=!1,this.isModalActivePointsTransaction=!1,this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})}).catch(e=>console.log(e)):this.$http.plain.post("/badge_points_transactions",this.pointsTransaction).then(e=>{this.resetPointsTransaction(),this.loadUserBadges(),this.loadUserPoints(),this.isModalActivePointsTransaction=!1}).catch(e=>console.log(e))},confirmDeletePointsTransaction(e,t){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+this.$t("Points Transaction")+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deletePointsTransaction(e,t)})},deletePointsTransaction(e,t){this.isLoading=!0,this.$http.plain.delete("/badge_points_transactions/"+e.id).then(e=>{this.loadUserBadges(),this.loadUserPoints(),this.resetPointsTransaction(),this.$buefy.toast.open(this.$t("deleted"))}).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})}},computed:{...(0,vi.L8)(["user","isGranted","tenant"]),tierBadges(){return this.badges.filter(e=>null!==e.pointsRequired).sort((e,t)=>e.pointsRequired-t.pointsRequired)},getReferenceLink(){return e=>{if(!e.referenceId||!e.referenceType)return null;const t={event:{name:"EventView",param:"id"},badge:{name:"BadgeView",param:"id"},purchase:{name:"PurchaseView",param:"id"},adhesion:{name:"AdhesionView",param:"id"}},i=t[e.referenceType.toLowerCase()];return i?this.$router.resolve({name:i.name,params:{[i.param]:e.referenceId}}).href:null}},filteredBadgeTypes(){if(!this.categorySearch)return this.badgeTypes;const e=this.categorySearch.toLowerCase();return this.badgeTypes.filter(t=>t.name.toLowerCase().includes(e))},searchedBadges(){if(!this.badgeSearch)return this.filteredBadges;const e=this.badgeSearch.toLowerCase();return this.filteredBadges.filter(t=>t.name.toLowerCase().includes(e))}},components:{LogoThumbnail:rc.A}};const lk=(0,Li.A)(ok,[["render",nk],["__scopeId","data-v-3538dcb8"]]);var rk=lk;const dk={key:0,class:"columns mt-3"},ck={class:"column"},uk={key:0},mk={key:0,class:"card p-5 mb-3"},pk={class:"title is-size-5 mb-5"},hk=["value"],gk={key:1},fk={key:0,class:"card p-5 mb-3"},bk={class:"title is-size-5 mb-5"},yk={key:1,class:"card p-5 mb-3"},vk={class:"title is-size-5 mb-5"},kk={key:2,class:"card p-5 mb-3"},Ck={class:"title is-size-5 mb-5"}
1,Lk={key:3,class:"card p-5 mb-3"},wk={class:"title is-size-5 mb-3"},_k={class:"columns"},Ek={class:"column"},$k=["title"],Fk={class:"column is-4"},Tk={value:null},Sk={value:"HR_LOCAL"},Ak={value:"ADMIN_LOCAL"},Pk={value:"FINANCIAL_LOCAL"},Ik={value:"HR_ASSISTANT_LOCAL"},Mk={value:"EVENT_LOCAL"},xk={value:"COMMUNICATION_LOCAL"},Nk={class:"column is-narrow is-flex is-align-items-flex-end mb-2"},Uk={key:4},Dk={class:"title is-size-5 mb-5"},Xk={class:"unit-title"},Vk={key:0,class:"tag is-light is-small is-rounded ml-2"},Rk={key:5,class:"card p-5 mb-3 user-roles"},Ok={key:0,class:"title is-size-5"},Qk={key:0,class:"past-role"},Bk={class:"past-role-left"},Gk={class:"role-title"},Wk={class:"past-role-right"},jk=["onClick"],zk={class:"icon"},qk=["onClick"],Jk={class:"icon"},Hk={key:1},Kk={key:0,class:"past-role mb-3"},Yk={class:"past-role-left"},Zk={class:"role-title"},eC={class:"tag is-small is-rounded"},tC={class:"past-role-right"},iC={key:0,class:"role-actions"},sC=["onClick"],aC={class:"icon"},nC=["onClick"],oC={class:"icon"},lC={class:"modal-card card",style:{width:"100%"}},rC={class:"modal-card-body"},dC={class:"title is-size-5"},cC={class:"modal-card-foot"},uC=["disabled"],mC={class:"column is-one-quarter"},pC={class:"sticky"},hC={class:"control"};function gC(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("b-select"),r=(0,c.g2)("b-checkbox"),d=(0,c.g2)("b-field"),p=(0,c.g2)("b-autocomplete"),h=(0,c.g2)("b-button"),g=(0,c.g2)("font-awesome-icon"),f=(0,c.g2)("b-datepicker"),b=(0,c.g2)("b-modal");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!0},null,8,["modelValue"]),i.item?((0,c.uX)(),(0,c.CE)("div",dk,[(0,c.Lk)("div",ck,[a.roles&&a.unitTypes?((0,c.uX)(),(0,c.CE)("section",uk,[e.tenant.settingFeatures.users.hasUserTypes?((0,c.uX)(),(0,c.CE)("div",mk,[(0,c.Lk)("h3",pk,(0,u.v_)(e.$t("userType")),1),(0,c.bF)(l,{modelValue:a.userTypeSelected,"onUpdate:modelValue":[t[1]||(t[1]=e=>a.userTypeSelected=e),n.changeUserTypeRole]},{default:(0,c.k6)(()=>[t[12]||(t[12]=(0,c.Lk)("option",{value:null},"...",-1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.roles,e=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[e.isUserType?((0,c.uX)(),(0,c.CE)("option",{key:0,value:e.id},(0,u.v_)(e.name),9,hk)):(0,c.Q3)("",!0)],64))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])])):(0,c.Q3)("",!0),e.tenant.settingFeatures.users.hasRoles?((0,c.uX)(),(0,c.CE)("div",gk,[e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)("div",fk,[(0,c.Lk)("h3",bk,(0,u.v_)(e.$t("tenant")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.roles,s=>((0,c.uX)(),(0,c.CE)(c.FK,{key:s.id},[s.isNational?((0,c.uX)(),(0,c.Wv)(d,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(r,{id:"role"+s.id,modelValue:a.userRolesCurrent,"onUpdate:modelValue":t[2]||(t[2]=e=>a.userRolesCurrent=e),"native-value":s.id,disabled:!i.canModifyRoles},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(s.name)+" ",1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.permissions,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-warning is-small is-rounded ml-3"},(0,u.v_)(e.$t(t)),1))),128))]),_:2},1032,["id","modelValue","native-value","disabled"])]),_:2},1024)):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),e.tenant.settingFeatures.localCenter.hasParent&&e.isGranted("HR_PARENT_LOCAL",i.item.localCenterObject)&&i.item.localCenterParent?((0,c.uX)(),(0,c.CE)("div",yk,[(0,c.Lk)("h3",vk,(0,u.v_)(e.$t("Parent chapter")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.roles,s=>((0,c.uX)(),(0,c.CE)(c.FK,{key:s.id},[s.isLocalCenterParent?((0,c.uX)(),(0,c.Wv)(d,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(r,{id:"role"+s.id,modelValue:a.userRolesCurrent,"onUpdate:modelValue":t[3]||(t[3]=e=>a.userRolesCurrent=e),"native-value":s.id+"_"+i.item.localCenterParent.id,disabled:!i.canModifyRoles},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(s.name)+" ",1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.permissions,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-warning is-small is-rounded ml-3"},(0,u.v_)(e.$t(t)),1))),128))]),_:2},1032,["id","modelValue","native-value","disabled"])]),_:2},1024)):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),i.item.localCenter&&e.isGranted("HR_LOCAL",i.item.localCenterObject)?((0,c.uX)(),(0,c.CE)("div",kk,[(0,c.Lk)("h3",Ck,(0,u.v_)(e.$t("Chapter")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.roles,s=>((0,c.uX)(),(0,c.CE)(c.FK,{key:s.id},[s.isLocalCenter?((0,c.uX)(),(0,c.Wv)(d,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.userRolesCurrent,"onUpdate:modelValue":t[4]||(t[4]=e=>a.userRolesCurrent=e),"native-value":s.id+"_"+i.item.localCenterId,disabled:!i.canModifyRoles},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(s.name),1)]),_:2},1032,["modelValue","native-value","disabled"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.permissions,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-warning is-small is-rounded ml-3"},(0,u.v_)(e.$t(t)),1))),128))]),_:2},1024)):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),(e.isGranted("HR_TENANT")||e.isGranted("ADMIN_TENANT"))&&e.tenant?.settingFeatures?.localCenter?.multiLocalCenterAccess?((0,c.uX)(),(0,c.CE)("div",Lk,[(0,c.Lk)("h3",wk,(0,u.v_)(e.$t("Multi chapter access")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.multiLocalCenterAccess,(t,i)=>((0,c.uX)(),(0,c.CE)("div",{key:"access-"+i,class:"py-3"},[(0,c.Lk)("div",_k,[(0,c.Lk)("div",Ek,[(0,c.bF)(d,null,{label:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Local Center"))+" ",1),t.isDerived?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"tag is-light is-small is-rounded ml-2",title:e.$t("Follows a position held in a unit of this chapter")},(0,u.v_)(e.$t("From unit position")),9,$k)):(0,c.Q3)("",!0)]),default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:t.localCenterSearch,"onUpdate:modelValue":e=>t.localCenterSearch=e,data:n.getFilteredLocalCentersForRow(i),field:"name",placeholder:e.$t("Select local center"),"open-on-focus":"",clearable:"",expanded:"",onSelect:e=>n.onSelectLocalCenter(i,e)},{empty:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("No results found")),1)]),_:1},8,["modelValue","onUpdate:modelValue","data","placeholder","onSelect"])]),_:2},1024)]),(0,c.Lk)("div",Fk,[(0,c.bF)(d,{label:e.$t("Permission Level")},{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:t.permission,"onUpdate:modelValue":e=>t.permission=e,class:"is-fullwidth",placeholder:e.$t("User"),exp
1anded:""},{default:(0,c.k6)(()=>[(0,c.Lk)("option",Tk,(0,u.v_)(e.$t("User")),1),(0,c.Lk)("option",Sk,(0,u.v_)(e.$t("HR_LOCAL")),1),(0,c.Lk)("option",Ak,(0,u.v_)(e.$t("ADMIN_LOCAL")),1),(0,c.Lk)("option",Pk,(0,u.v_)(e.$t("FINANCIAL_LOCAL")),1),(0,c.Lk)("option",Ik,(0,u.v_)(e.$t("HR_ASSISTANT_LOCAL")),1),(0,c.Lk)("option",Mk,(0,u.v_)(e.$t("EVENT_LOCAL")),1),(0,c.Lk)("option",xk,(0,u.v_)(e.$t("COMMUNICATION_LOCAL")),1)]),_:1},8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"])]),(0,c.Lk)("div",Nk,[t.isDerived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(h,{key:0,"icon-left":"trash-alt",class:"button is-small is-white",onClick:e=>n.removeLocalCenterAccess(i)},null,8,["onClick"]))])])]))),128)),(0,c.bF)(h,{type:"is-primary","icon-left":"plus",class:"is-rounded is-small mt-2",onClick:n.addLocalCenterAccess},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Add Local Center Access")),1)]),_:1},8,["onClick"])])):(0,c.Q3)("",!0),e.tenant.settingFeatures.group.hasUnits&&a.unitTypes?((0,c.uX)(),(0,c.CE)("div",Uk,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.unitTypes,i=>((0,c.uX)(),(0,c.CE)("div",{key:i.id,class:"card p-5 mb-3"},[(0,c.Lk)("h3",Dk,(0,u.v_)(i.name),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.units,s=>((0,c.uX)(),(0,c.CE)(c.FK,{key:s.id},[s.unitType&&s.unitType.id===i.id?((0,c.uX)(),(0,c.CE)("div",{key:0,class:(0,u.C4)(["p-3 mb-3",s.userType?"unitUserTypeBox":""]),style:(0,u.Tr)({"border-color":s.userType?.options?.bgcolor?s.userType.options.bgcolor:"none"})},[(0,c.Lk)("h4",Xk,[(0,c.eW)((0,u.v_)(s.name)+" ",1),n.hasUnitsFromSeveralLocalCenters&&s.localCenter?((0,c.uX)(),(0,c.CE)("span",Vk,(0,u.v_)(s.localCenter.name),1)):(0,c.Q3)("",!0)]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.roles,n=>((0,c.uX)(),(0,c.CE)(c.FK,{key:n.id},[n.unitType&&n.unitType.id===i.id?((0,c.uX)(),(0,c.Wv)(d,{key:0},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.userRolesCurrent,"onUpdate:modelValue":t[5]||(t[5]=e=>a.userRolesCurrent=e),"native-value":n.id+"_"+s.id},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(n.name),1)]),_:2},1032,["modelValue","native-value"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.permissions,t=>((0,c.uX)(),(0,c.CE)("span",{key:t,class:"tag is-warning is-small is-rounded ml-3"},(0,u.v_)(e.$t(t)),1))),128))]),_:2},1024)):(0,c.Q3)("",!0)],64))),128))],6)):(0,c.Q3)("",!0)],64))),128))]))),128))])):(0,c.Q3)("",!0),(a.hasCurrentRoles||a.hasPastRoles)&&a.roles&&a.roles.length>0?((0,c.uX)(),(0,c.CE)("div",Rk,[a.hasPastRoles?((0,c.uX)(),(0,c.CE)("h3",Ok,(0,u.v_)(e.$t("currentRoles")),1)):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.itemUserRoles,t=>((0,c.uX)(),(0,c.CE)(c.FK,{key:t.id},[!t.dateEnded&&t.role?((0,c.uX)(),(0,c.CE)("div",Qk,[(0,c.Lk)("div",Bk,[(0,c.Lk)("span",Gk,(0,u.v_)(n.printRole(t)),1),((0,c.uX)(),(0,c.CE)("span",{key:"urole"+t.id,class:"tag is-small is-rounded"},(0,u.v_)(e.$filters.formatDateOnly(t.dateCreated))+" - "+(0,u.v_)(e.$t("present")),1))]),(0,c.Lk)("div",Wk,[t.unit||t.role&&t.role.isUserType||e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"button is-small is-white",onClick:e=>n.editUserRole(t)},[(0,c.Lk)("span",zk,[(0,c.bF)(g,{icon:"fa-light fa-pen"})])],8,jk)):(0,c.Q3)("",!0),t.unit||t.role&&t.role.isUserType||e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)("span",{key:1,class:"button is-small is-white",onClick:e=>n.deleteUserRole(t)},[(0,c.Lk)("span",Jk,[(0,c.bF)(g,{icon:"fa-light fa-trash-alt"})])],8,qk)):(0,c.Q3)("",!0)])])):(0,c.Q3)("",!0)],64))),128)),a.itemUserRoles&&a.hasPastRoles?((0,c.uX)(),(0,c.CE)("hr",Hk)):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.itemUserRoles,t=>((0,c.uX)(),(0,c.CE)(c.FK,{key:"past-"+t.id},[t.dateEnded&&t.role?((0,c.uX)(),(0,c.CE)("div",Kk,[(0,c.Lk)("div",Yk,[(0,c.Lk)("span",Zk,(0,u.v_)(n.printRole(t)),1),(0,c.Lk)("span",eC,(0,u.v_)(e.$filters.formatDateOnly(t.dateCreated))+" - "+(0,u.v_)(e.$filters.formatDateOnly(t.dateEnded)),1)]),(0,c.Lk)("div",tC,[t.unit||t.role&&t.role.isUserType||e.isGranted("HR_TENANT")?((0,c.uX)(),(0,c.CE)("div",iC,[(0,c.Lk)("span",{class:"button is-small is-white",onClick:e=>n.editUserRole(t)},[(0,c.Lk)("span",aC,[(0,c.bF)(g,{icon:"fa-light fa-pen"})])],8,sC),(0,c.Lk)("span",{class:"button is-small is-white",onClick:e=>n.deleteUserRole(t)},[(0,c.Lk)("span",oC,[(0,c.bF)(g,{icon:"fa-light fa-trash-alt"})])],8,nC)])):(0,c.Q3)("",!0)])])):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),a.editingUserRole?((0,c.uX)(),(0,c.Wv)(b,{key:6,modelValue:a.isModalActive,"onUpdate:modelValue":t[10]||(t[10]=e=>a.isModalActive=e)},{default:(0,c.k6)(()=>[(0,c.Lk)("div",lC,[(0,c.Lk)("section",rC,[(0,c.Lk)("h3",dC,(0,u.v_)(n.printRole(a.editingUserRole)),1),(0,c.bF)(d,{label:e.$t("dateBegin")},{default:(0,c.k6)(()=>[(0,c.bF)(f,{modelValue:a.editingDateCreated,"onUpdate:modelValue":t[6]||(t[6]=e=>a.editingDateCreated=e),required:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.bF)(d,{label:e.$t("dateEnd")},{default:(0,c.k6)(()=>[(0,c.bF)(f,{modelValue:a.editingDateEnded,"onUpdate:modelValue":t[7]||(t[7]=e=>a.editingDateEnded=e)},null,8,["modelValue"])]),_:1},8,["label"])]),(0,c.Lk)("footer",cC,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary mr-3 is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),disabled:e.$store.state.isLoadingButton,onClick:t[8]||(t[8]=(...e)=>n.saveEditUserRole&&n.saveEditUserRole(...e))},(0,u.v_)(e.$t("save")),11,uC),(0,c.Lk)("button",{class:"button is-rounded",onClick:t[9]||(t[9]=(...e)=>n.cancelEditUserRole&&n.cancelEditUserRole(...e))},(0,u.v_)(e.$t("cancel")),1)])])]),_:1},8,["modelValue"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",mC,[(0,c.Lk)("div",pC,[(0,c.Lk)("form",{onSubmit:t[11]||(t[11]=(0,m.D$)((...e)=>n.save&&n.save(...e),["prevent"]))},[(0,c.Lk)("div",hC,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),type:"submit"},(0,u.v_)(e.$t("save")),3)])],32)])])])):(0,c.Q3)("",!0)])}i(30531);var fC=i(78103),bC=i(95093),yC=i.n(bC),vC={components:{},props:["item","canModifyRoles"],data(){return{isLoading:!1,hasPastRoles:!1,hasCurrentRoles:!1,itemId:this.$route.params.user,roles:this.$store.state.tenant.roles,units:null,unitTypes:this.$store.state.tenant.unitTypes?[...this.$store.state.tenant.unitTypes].sort((e,t)=>
1e.name.localeCompare(t.name,"et")):null,itemUserRoles:this.item.userRoles,userTypeSelected:this.item.type?this.item.type.id:null,userRolesCurrent:[],isModalActive:!1,editingUserRole:null,editingDateCreated:null,editingDateEnded:null,multiLocalCenterAccess:[],allLocalCenters:[],availableLocalCenters:[]}},computed:{...(0,vi.L8)(["isGranted","tenant","user"]),hasUnitsFromSeveralLocalCenters(){const e=new Set;for(const t of this.units||[])t.localCenter&&t.localCenter.id&&e.add(t.localCenter.id);return e.size>1}},watch:{item:function(){this.itemUserRoles=this.item.userRoles}},created(){this.retrieve()},methods:{printRole:ds.ii,initUserRoles(){let e=[];for(let t of this.itemUserRoles)!t.dateEnded&&t.role?(t.unit?e.push(t.role.id+"_"+t.unit.id):(t.role.isNational||t.role.isUserType)&&e.push(t.role.id),this.hasCurrentRoles=!0):t.dateEnded&&(this.hasPastRoles=!0);this.userRolesCurrent=e,this.userTypeSelected&&this.userRolesCurrent.push(this.userTypeSelected)},unitScopeLocalCenterIds(){if(!this.item.localCenter)return[];const e=this.item.localCenterObject&&"object"===typeof this.item.localCenterObject?this.item.localCenterObject:"object"===typeof this.item.localCenter?this.item.localCenter:null,t=[this.item.localCenterId||e&&e.id].filter(Boolean);let i=[];e&&Array.isArray(e.ancestors)?i=e.ancestors:this.item.localCenterParent&&(i=[this.item.localCenterParent]);for(const s of i)s&&s.id&&!t.includes(s.id)&&t.push(s.id);return t},unitScopeQuery(){const e=this.unitScopeLocalCenterIds();return e.length?e.map(e=>"&localCenter[]="+e).join(""):null},unitIdsHeldElsewhere(e){const t=new Set((e||[]).map(e=>e.id)),i=new Set;for(const s of this.itemUserRoles||[]){const e=s&&!s.dateEnded&&s.role?s.unit:null;e&&e.id&&"Unit"===e["@type"]&&!t.has(e.id)&&i.add(e.id)}return[...i]},fetchUnitsHeldElsewhere(e){const t=this.unitIdsHeldElsewhere(e);return t.length?Promise.allSettled(t.map(e=>this.$http.plain.get("/units/"+e))).then(e=>e.filter(e=>"fulfilled"===e.status&&e.value.data&&e.value.data.unitType).map(e=>e.value.data)):Promise.resolve([])},onlyMemberChapters(e){const t=(0,fC.I)({homeChapterIds:this.unitScopeLocalCenterIds(),userRoles:this.itemUserRoles||[],units:e});return e.filter(e=>"LocalCenter"!==e["@type"]||t.has(e.id))},retrieve(){this.isLoading=!0;const e="/units?exists[isRoleGroup]=false&exists[unitType]=true&status=ACTIVE&pagination=false",t=[this.$http.plain.get(e+"&exists[localCenter]=false")],i=this.unitScopeQuery();i&&t.push(this.$http.plain.get(e+i)),Promise.all(t).then(e=>e.flatMap(e=>e.data["hydra:member"])).then(e=>this.fetchUnitsHeldElsewhere(e).then(t=>e.concat(t))).then(e=>this.onlyMemberChapters(e)).then(e=>{this.units=e.sort((e,t)=>e.name.localeCompare(t.name,"et")),this.initUserRoles()}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1}),(this.isGranted("HR_TENANT")||this.isGranted("ADMIN_TENANT"))&&this.tenant?.settingFeatures?.localCenter?.multiLocalCenterAccess&&this.$http.plain.get("/local_centers?status=ACTIVE").then(e=>{this.allLocalCenters=e.data["hydra:member"],this.initAdditionalLocalCenters()}).catch(e=>console.error(e))},initAdditionalLocalCenters(){const e=[];for(let t of this.itemUserRoles)if(!t.dateEnded&&t.unit&&!t.role){const i=t.unit.id;if(i!==this.item.localCenterId){const s=this.allLocalCenters.find(e=>e.id===i);s&&e.push({userRoleId:t.id,localCenter:s,localCenterSearch:s.name,permission:t.localCenterPermission,dateEnded:t.dateEnded?new Date(t.dateEnded):null,isDerived:!0===t.isDerivedChapterAccess})}}this.multiLocalCenterAccess=e,this.updateAvailableLocalCenters()},updateAvailableLocalCenters(){const e=this.multiLocalCenterAccess.filter(e=>e.localCenter).map(e=>e.localCenter.id);this.availableLocalCenters=this.allLocalCenters.filter(t=>(!this.item.localCenterId||t.id!==this.item.localCenterId)&&!e.includes(t.id))},getAvailableLocalCentersForRow(e){const t=this.multiLocalCenterAccess.filter((t,i)=>i!==e&&t.localCenter).map(e=>e.localCenter.id);return this.allLocalCenters.filter(e=>(!this.item.localCenterId||e.id!==this.item.localCenterId)&&!t.includes(e.id))},getFilteredLocalCentersForRow(e){const t=this.getAvailableLocalCentersForRow(e),i=this.multiLocalCenterAccess[e]?.localCenterSearch||"";return i?t.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())):t},onSelectLocalCenter(e,t){this.multiLocalCenterAccess[e].localCenter=t,this.multiLocalCenterAccess[e].localCenterSearch=t?t.name:"",this.updateAvailableLocalCenters()},addLocalCenterAccess(){this.multiLocalCenterAccess.push({userRoleId:null,localCenter:null,localCenterSearch:"",permission:null,dateEnded:null}),this.updateAvailableLocalCenters()},removeLocalCenterAccess(e){const t=this.multiLocalCenterAccess[e];t.userRoleId&&this.$http.plain.delete("/user_roles/"+t.userRoleId).then(e=>{const i=this.itemUserRoles.findIndex(e=>e.id===t.userRoleId);-1!==i&&this.itemUserRoles.splice(i,1),this.saveSuccess(e)}).catch(e=>console.error(e)),this.multiLocalCenterAccess.splice(e,1),this.updateAvailableLocalCenters()},changeUserTypeRole(){for(let e of this.roles)e.isUserType&&(this.userRolesCurrent=this.userRolesCurrent.filter(t=>t!==e.id));this.userTypeSelected&&this.userRolesCurrent.push(this.userTypeSelected)},save(){const e=this.multiLocalCenterAccess.filter(e=>e.localCenter).map(e=>({userRoleId:e.userRoleId,localCenterId:e.localCenter.id,permission:e.permission||null,dateEnded:e.dateEnded}));this.$http.plain.patch("/users/"+this.item.id+"/update-roles",{rawUserRoles:this.userRolesCurrent,userType:this.userTypeSelected,multiLocalCenterAccess:e}).then(e=>(this.itemUserRoles=e.data.userRoles,this.$emit("roles-updated",e.data.userRoles),this.tenant?.settingFeatures?.localCenter?.multiLocalCenterAccess&&this.initAdditionalLocalCenters(),this.saveSuccess(e))).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Something went wrong")})})},saveSuccess(e){return this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})},syncUserRolesCurrent(e){if(!e||!e.role)return;let t="";if(e.unit)t=e.role.id+"_"+e.unit.id;else{if(!e.role.isNational&&!e.role.isUserType)return;t=e.role.id}const i=this.userRolesCurrent.indexOf(t);e.dateEnded&&-1!==i?this.userRolesCurrent.splice(i,1):e.dateEnded||-1!==i||this.userRolesCurrent.push(t)},deleteUserRole(e){this.$http.plain.delete("/user_roles/"+e.id).then(t=>{if(this.syncUserRolesCurrent({...e,dateEnded:new Date}),this.itemUserRoles.splice(this.itemUserRoles.findIndex(t=>t.id===e.id),1),!e.dateEnded&&e.role){let t="";e.unit?t=e.role.id+"_"+e.unit.id:(e.role.isNational||e.role.isUserType)&&(t=e.role.id),t&&(this.userRolesCurrent=this.userRolesCurrent.filter(e=>e!==t))}this.saveSuccess(t)}).catch(e=>console.error(e))},editUserRole(e){this.isModalActive=!0,this.editingUserRole=e,this.editingDateCreated=this.dateOnlyToLocalDate(e.dateCreated),this.editingDateEnded=e.dateEnded?this.dateOnlyToLocalDate(e.dateEnded):null},dateOnlyToLocalDate(e){const t=yC().utc(e);return new Date(t.year(),t.month(),t.date())},cancelEditUserRole(){this.isModalActive=!1,this.editingUserRole=null,this.editingDateCreated=null,this.editingDateEnded=null},saveEditUserRole(){this.$http.plain.patch("/user_roles/"+this.editingUserRole.id,{dateCreated:yC()(this.editingDateCreated).format("YYYY-MM-DD"),dateEnded:this.editingDateEnded?yC()(this.editingDateEnded).format("YYYY-MM-DD"):null}).then(e=>{this.editingUserRole.dateCreated=e.data.dateCreated,this.editingUserRole.dateEnded=e.data.dateEnded||null,this.syncUserRolesCurrent(this.editingUserRole),this.cancelEditUserRole(),this.saveSuccess(e)}).catch(e=>console.error(e))},error(e){console.error(e)}}};const kC=(0,Li.A)(vC,[["render",gC],["__scopeId","data-v-ae8c1f2e"]]);var CC=kC;
1const LC={key:0},wC={class:"family-modal-card"},_C={class:"family-modal-header"},EC={class:"is-size-5 has-text-weight-bold"},$C={class:"family-modal-body"},FC={key:0},TC={class:"columns mt-3"},SC={class:"column"},AC={class:"column"},PC={key:1},IC={key:0,class:"mb-5"},MC={class:"is-flex is-align-items-center"},xC={class:"ml-2"},NC={key:0},UC={key:1},DC={key:1,class:"mb-5"},XC={class:"family-type-cards"},VC={class:"family-type-label"},RC={class:"family-type-desc"},OC={class:"family-type-label"},QC={class:"family-type-desc"},BC={class:"family-type-emoji"},GC={class:"family-type-label"},WC={class:"family-type-desc"},jC={key:2,class:"mb-5"},zC={class:"has-text-weight-semibold mb-3"},qC={class:"tabs-pill family-member-toggle"},JC={class:"tabs"},HC={key:3,class:"mb-4"},KC={key:0,class:"notification is-warning is-light"},YC={class:"icon-text"},ZC={class:"icon"},eL={key:0},tL={key:1,class:"family-selected-user"},iL={class:"is-flex is-align-items-center is-flex-grow-1"},sL={class:"ml-3 has-text-weight-semibold"},aL={key:2,class:"help is-danger mt-1"},nL={key:4,class:"mb-4"},oL={class:"has-text-weight-semibold mb-2"},lL={key:0},rL={key:1,class:"family-selected-user"},dL={class:"is-flex is-align-items-center is-flex-grow-1"},cL={class:"ml-3 has-text-weight-semibold"},uL={key:5,class:"mb-4"},mL={class:"columns is-mobile"},pL={class:"column"},hL={class:"column"},gL={key:6,class:"family-manage-switch mt-4"},fL={class:"family-modal-actions mt-6"},bL=["disabled"],yL={class:"icon"},vL={key:0,class:"family-header mb-5"},kL={class:"level"},CL={class:"level-left"},LL={key:0,class:"level-item"},wL={class:"title is-size-4"},_L={class:"icon-text"},EL={class:"icon"},$L={class:"text"},FL={class:"icon"},TL={key:1,class:"level-item"},SL={class:"control"},AL={class:"icon"},PL={class:"control"},IL={class:"icon"},ML={key:0,class:"level-right"},xL={key:1,class:"has-text-centered py-6"},NL={class:"notification is-light"},UL={class:"mb-4"},DL={class:"icon is-large"},XL={class:"title is-5"},VL={class:"subtitle is-6 mb-4"},RL={class:"icon"},OL={key:2,class:"notification is-info is-light"},QL={class:"icon-text"},BL={key:0},GL={key:1},WL={key:3},jL={key:0,class:"notification is-info is-light mb-5"},zL={class:"icon-text"},qL={class:"icon"},JL={key:1,class:"family-section mt-6"},HL={class:"family-section-header"},KL={class:"is-flex is-align-items-center"},YL={class:"icon is-small has-text-grey mr-2"},ZL={class:"family-section-title"},ew={class:"icon is-small"},tw={class:"family-members-list"},iw={class:"is-flex is-align-items-center is-flex-grow-1",style:{"min-width":"0"}},sw={key:0},aw={class:"ml-3",style:{"min-width":"0"}},nw={class:"is-flex is-align-items-center is-flex-wrap-wrap",style:{gap:"0.5rem"}},ow={class:"has-text-weight-semibold"},lw={key:0,class:"tag is-primary is-rounded is-small"},rw={class:"is-size-7 has-text-grey"},dw={key:0},cw={key:1},uw={key:2},mw={key:0},pw={key:1,class:"is-flex is-align-items-center"},hw={class:"family-avatar-placeholder"},gw={class:"ml-3"},fw={class:"has-text-weight-semibold"},bw={key:0,class:"has-text-grey is-size-7 ml-1"},yw={class:"tag is-light is-rounded is-small ml-2"},vw={key:0,class:"is-flex is-align-items-center",style:{gap:"0.25rem"}},kw=["onClick"],Cw={class:"icon is-small"},Lw=["onClick"],ww={class:"icon is-small"},_w={key:2,class:"family-section mt-6"},Ew={class:"family-section-header"},$w={class:"is-flex is-align-items-center"},Fw={class:"icon is-small has-text-grey mr-2"},Tw={class:"family-section-title"},Sw={class:"icon is-small"},Aw={key:0,class:"family-empty-state"},Pw={class:"icon is-large has-text-grey-light"},Iw={class:"has-text-weight-semibold mt-3 mb-4"},Mw={class:"icon"},xw={key:1,class:"family-members-list"},Nw={class:"is-flex is-align-items-center is-flex-grow-1",style:{"min-width":"0"}},Uw={key:0},Dw={class:"ml-3"},Xw={class:"has-text-weight-semibold"},Vw={class:"is-flex is-align-items-center is-flex-wrap-wrap",style:{gap:"0.5rem"}},Rw={key:0,class:"tag is-warning is-rounded is-small"},Ow={key:1,class:"tag is-info is-rounded is-small"}
1,Qw={key:1,class:"is-flex is-align-items-center"},Bw={class:"family-avatar-placeholder"},Gw={class:"ml-3"},Ww={class:"has-text-weight-semibold"},jw={key:0,class:"has-text-grey is-size-7 ml-1"},zw={class:"tag is-light is-rounded is-small ml-2"},qw={key:0,class:"is-flex is-align-items-center",style:{gap:"0.25rem"}},Jw=["onClick"],Hw={class:"icon is-small"},Kw=["onClick"],Yw={class:"icon is-small"},Zw={key:1,class:"is-flex is-align-items-center"},e_={class:"tag is-light is-rounded is-small"},t_={key:3,class:"family-section mt-6"},i_={class:"family-section-header"},s_={class:"is-flex is-align-items-center"},a_={class:"icon is-small has-text-grey mr-2"},n_={class:"family-section-title"},o_={class:"icon is-small"},l_={key:0,class:"has-text-centered py-4 has-text-grey is-size-7"},r_={key:1,class:"family-members-list"},d_={class:"is-flex is-align-items-center is-flex-grow-1",style:{"min-width":"0"}},c_={key:0},u_={class:"ml-3"},m_={class:"is-flex is-align-items-center is-flex-wrap-wrap",style:{gap:"0.5rem"}},p_={class:"has-text-weight-semibold"},h_={key:0,class:"tag is-rounded is-small is-default"},g_={class:"icon is-small mr-1"},f_={key:1,class:"is-flex is-align-items-center"},b_={class:"family-avatar-placeholder"},y_={class:"ml-3"},v_={class:"has-text-weight-semibold"},k_={key:0,class:"has-text-grey is-size-7 ml-1"},C_={class:"tag is-light is-rounded is-small ml-2"},L_={key:0,class:"is-flex is-align-items-center",style:{gap:"0.25rem"}},w_=["onClick"],__={class:"icon is-small"},E_=["onClick"],$_={class:"icon is-small"},F_={key:1,class:"is-flex is-align-items-center"},T_={class:"tag is-light is-rounded is-small"};function S_(e,t,i,s,a,n){const o=(0,c.g2)("b-input"),l=(0,c.g2)("b-field"),r=(0,c.g2)("BirthdaySelect"),d=(0,c.g2)("b-radio"),p=(0,c.g2)("LogoThumbnail"),h=(0,c.g2)("font-awesome-icon"),g=(0,c.g2)("UserSearchAutocomplete"),f=(0,c.g2)("b-switch"),b=(0,c.g2)("b-modal"),y=(0,c.g2)("b-loading"),v=(0,c.g2)("router-link"),k=(0,c.g2)("b-tag");return(0,c.uX)(),(0,c.CE)("section",null,[e.tenant.settingFeatures.users.hasFamilyMembers?((0,c.uX)(),(0,c.CE)("div",LC,[(0,c.bF)(b,{modelValue:a.showAddMemberPanel,"onUpdate:modelValue":t[22]||(t[22]=e=>a.showAddMemberPanel=e),width:520,scroll:"keep","can-cancel":["escape","outside"],onClose:n.closeAddMemberPanel},{default:(0,c.k6)(()=>[(0,c.Lk)("div",wC,[(0,c.Lk)("div",_C,[(0,c.Lk)("h3",EC,(0,u.v_)(n.getPanelTitle),1),(0,c.Lk)("button",{class:"delete",onClick:t[0]||(t[0]=(...e)=>n.closeAddMemberPanel&&n.closeAddMemberPanel(...e))})]),(0,c.Lk)("div",$C,[a.isRegisteringChild?((0,c.uX)(),(0,c.CE)("div",FC,[(0,c.bF)(l,{type:a.childEmailError&&a.childData.email?"is-danger":"",message:a.childEmailError&&a.childData.email?a.childEmailError:""},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.childData.email,"onUpdate:modelValue":t[1]||(t[1]=e=>a.childData.email=e),modelModifiers:{trim:!0},type:"email",placeholder:e.$t("Email address")+" ("+e.$t("optional")+")"},null,8,["modelValue","placeholder"])]),_:1},8,["type","message"]),(0,c.Lk)("div",TC,[(0,c.Lk)("div",SC,[(0,c.bF)(l,{type:a.childEmailError&&!a.childData.email?"is-danger":"",message:a.childEmailError&&!a.childData.email?a.childEmailError:""},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.childData.firstName,"onUpdate:modelValue":t[2]||(t[2]=e=>a.childData.firstName=e),type:"text",placeholder:e.$t("firstName"),required:""},null,8,["modelValue","placeholder"])]),_:1},8,["type","message"])]),(0,c.Lk)("div",AC,[(0,c.bF)(l,null,{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.childData.lastName,"onUpdate:modelValue":t[3]||(t[3]=e=>a.childData.lastName=e),type:"text",placeholder:e.$t("lastName"),required:""},null,8,["modelValue","placeholder"])]),_:1})])]),(0,c.bF)(l,{class:"mt-3"},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.childData.dateBirth,"onUpdate:modelValue":t[4]||(t[4]=e=>a.childData.dateBirth=e),required:""},null,8,["modelValue"])]),_:1}),(0,c.bF)(l,{class:"mt-4",grouped:""},{default:(0,c.k6)(()=>[(0,c.bF)(d,{modelValue:a.childData.gender,"onUpdate:modelValue":t[5]||(t[5]=e=>a.childData.gender=e),"native-value":"f",name:"gender",required:a.registerUserFieldsMandatory.includes("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("female")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(d,{modelValue:a.childData.gender,"onUpdate:modelValue":t[6]||(t[6]=e=>a.childData.gender=e),"native-value":"m",class:"ml-3",name:"gender",required:a.registerUserFieldsMandatory.includes("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("male")),1)]),_:1},8,["modelValue","required"]),(0,c.bF)(d,{modelValue:a.childData.gender,"onUpdate:modelValue":t[7]||(t[7]=e=>a.childData.gender=e),"native-value":"n",class:"ml-3",name:"gender",required:a.registerUserFieldsMandatory.includes("gender")},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Other gender")),1)]),_:1},8,["modelValue","required"])]),_:1})])):((0,c.uX)(),(0,c.CE)("div",PC,[a.isEditMode&&a.editingMemberData?((0,c.uX)(),(0,c.CE)("div",IC,[(0,c.Lk)("div",MC,[a.editingMemberData.user?((0,c.uX)(),(0,c.Wv)(p,{key:0,item:a.editingMemberData.user},null,8,["item"])):(0,c.Q3)("",!0),(0,c.Lk)("span",xC,[a.editingMemberData.user?((0,c.uX)(),(0,c.CE)("strong",NC,(0,u.v_)(a.editingMemberData.user.firstName)+" "+(0,u.v_)(a.editingMemberData.user.lastName),1)):((0,c.uX)(),(0,c.CE)("strong",UC,(0,u.v_)(a.editingMemberData.name),1))])])])):(0,c.Q3)("",!0),a.isRegisteringChild?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",DC,[(0,c.Lk)("div",XC,[(0,c.Lk)("div",{class:(0,u.C4)(["family-type-card",{"is-active":"parent"===n.currentLevel}]),onClick:t[8]||(t[8]=e=>n.setLevel("parent"))},[t[34]||(t[34]=(0,c.Lk)("span",{class:"family-type-emoji"},"ð¨âð©",-1)),(0,c.Lk)("span",VC,(0,u.v_)(e.$t("Parent")),1),(0,c.Lk)("span",RC,(0,u.v_)(e.$t("Can manage child accounts")),1)],2),(0,c.Lk)("div",{class:(0,u.C4)(["family-type-card",{"is-active":"child"===n.currentLevel}]),onClick:t[9]||(t[9]=e=>n.setLevel("child"))},[t[35]||(t[35]=(0,c.Lk)("span",{class:"family-type-emoji"}
1,"ð§",-1)),(0,c.Lk)("span",OC,(0,u.v_)(e.$t("Child")),1),(0,c.Lk)("span",QC,(0,u.v_)(e.$t("Account managed by parent")),1)],2),(0,c.Lk)("div",{class:(0,u.C4)(["family-type-card",{"is-active":"other"===n.currentLevel}]),onClick:t[10]||(t[10]=e=>n.setLevel("other"))},[(0,c.Lk)("span",BC,[(0,c.bF)(h,{icon:"fal fa-user"})]),(0,c.Lk)("span",GC,(0,u.v_)(e.$t("Other member")),1),(0,c.Lk)("span",WC,(0,u.v_)(e.$t("Guardian, grandparent, etc.")),1)],2)])])),a.isEditMode?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",jC,[(0,c.Lk)("p",zC,(0,u.v_)(e.$t("Is member of"))+" "+(0,u.v_)(e.tenant.shortName)+"?",1),(0,c.Lk)("div",qC,[(0,c.Lk)("nav",JC,[(0,c.Lk)("ul",null,[(0,c.Lk)("li",{class:(0,u.C4)({"is-active":"platform"===a.newMemberType})},[(0,c.Lk)("a",{onClick:t[11]||(t[11]=e=>a.newMemberType="platform")},(0,u.v_)(e.$t("Yes")),1)],2),(0,c.Lk)("li",{class:(0,u.C4)({"is-active":"external"===a.newMemberType})},[(0,c.Lk)("a",{onClick:t[12]||(t[12]=e=>a.newMemberType="external")},(0,u.v_)(e.$t("No")),1)],2)])])])])),a.isEditMode||"platform"!==a.newMemberType?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",HC,[n.canAddPlatformMembers?((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[a.selectedPlatformUser?((0,c.uX)(),(0,c.CE)("div",tL,[(0,c.Lk)("div",iL,[(0,c.bF)(p,{item:a.selectedPlatformUser},null,8,["item"]),(0,c.Lk)("span",sL,(0,u.v_)(a.selectedPlatformUser.firstName)+" "+(0,u.v_)(a.selectedPlatformUser.lastName),1)]),(0,c.Lk)("button",{class:"delete",onClick:t[13]||(t[13]=(...e)=>n.clearSelectedPlatformUser&&n.clearSelectedPlatformUser(...e))})])):((0,c.uX)(),(0,c.CE)("div",eL,[(0,c.bF)(l,{type:a.isDuplicateMember?"is-danger":"",message:a.duplicateMemberMessage},{default:(0,c.k6)(()=>[(0,c.bF)(g,{label:e.$t("Search by name or email")+"...","exclude-current-user":!0,"include-minors":!0,"is-rounded":!1,"is-append-to-body":!0,"onUpdate:modelValue":n.handlePlatformUserSelected},null,8,["label","onUpdate:modelValue"])]),_:1},8,["type","message"])])),a.isDuplicateMember?((0,c.uX)(),(0,c.CE)("p",aL,(0,u.v_)(a.duplicateMemberMessage),1)):(0,c.Q3)("",!0)],64)):((0,c.uX)(),(0,c.CE)("div",KC,[(0,c.Lk)("span",YC,[(0,c.Lk)("span",ZC,[(0,c.bF)(h,{icon:"fal fa-lock"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("For privacy reasons, only chapter or association administrators can add organisation members to a family.")),1)])]))])),a.isEditMode&&a.editingMemberData&&!a.editingMemberData.user&&n.canAddPlatformMembers?((0,c.uX)(),(0,c.CE)("div",nL,[(0,c.Lk)("p",oL,(0,u.v_)(e.$t("Link to existing account")),1),a.editingMemberData.linkUser?((0,c.uX)(),(0,c.CE)("div",rL,[(0,c.Lk)("div",dL,[(0,c.bF)(p,{item:a.editingMemberData.linkUser},null,8,["item"]),(0,c.Lk)("span",cL,(0,u.v_)(a.editingMemberData.linkUser.fullName||a.editingMemberData.linkUser.firstName+" "+a.editingMemberData.linkUser.lastName),1)]),(0,c.Lk)("button",{class:"delete",onClick:t[14]||(t[14]=e=>a.editingMemberData.linkUser=null)})])):((0,c.uX)(),(0,c.CE)("div",lL,[(0,c.bF)(g,{label:e.$t("Search by name or email")+"...","exclude-current-user":!0,"include-minors":!0,"is-rounded":!1,"is-append-to-body":!0,"onUpdate:modelValue":n.handleLinkUserSelected},null,8,["label","onUpdate:modelValue"])]))])):(0,c.Q3)("",!0),a.isEditMode||"external"!==a.newMemberType?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",uL,[(0,c.Lk)("div",mL,[(0,c.Lk)("div",pL,[(0,c.bF)(l,{type:a.externalMemberErrors.name?"is-danger":"",message:a.externalMemberErrors.name},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.externalMember.firstName,"onUpdate:modelValue":t[15]||(t[15]=e=>a.externalMember.firstName=e),placeholder:e.$t("firstName"),required:""},null,8,["modelValue","placeholder"])]),_:1},8,["type","message"])]),(0,c.Lk)("div",hL,[(0,c.bF)(l,null,{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.externalMember.lastName,"onUpdate:modelValue":t[16]||(t[16]=e=>a.externalMember.lastName=e),placeholder:e.$t("lastName"),required:""},null,8,["modelValue","placeholder"])]),_:1})])]),(0,c.bF)(l,{class:"mt-3",type:a.externalMemberErrors.email?"is-danger":"",message:a.externalMemberErrors.email},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.externalMember.email,"onUpdate:modelValue":t[17]||(t[17]=e=>a.externalMember.email=e),type:"email",placeholder:e.$t("Email address")+" ("+e.$t("optional")+")"},null,8,["modelValue","placeholder"])]),_:1},8,["type","message"])])),!a.isRegisteringChild&&(n.canShowManageChildrenOption||a.isEditMode&&a.editingMemberData&&"child"!==a.editingMemberData.level)?((0,c.uX)(),(0,c.CE)("div",gL,[a.isEditMode?((0,c.uX)(),(0,c.Wv)(f,{key:0,modelValue:a.editingMemberData.canManageChildren,"onUpdate:modelValue":[t[18]||(t[18]=e=>a.editingMemberData.canManageChildren=e),n.handleCanManageChange]},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Can manage child accounts")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])):((0,c.uX)(),(0,c.Wv)(f,{key:1,modelValue:a.newMemberCanManageChildren,"onUpdate:modelValue":[t[19]||(t[19]=e=>a.newMemberCanManageChildren=e),n.handleCanManageChange]},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Can manage child accounts")),1)]),_:1},8,["modelValue","onUpdate:modelValue"]))])):(0,c.Q3)("",!0)])),(0,c.Lk)("div",fL,[(0,c.Lk)("button",{class:"button is-rounded is-light",onClick:t[20]||(t[20]=(...e)=>n.closeAddMemberPanel&&n.closeAddMemberPanel(...e))},(0,u.v_)(e.$t("Cancel")),1),(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded family-modal-submit",{"is-loading":a.isSavingMember}]),disabled:!n.canSaveMember,onClick:t[21]||(t[21]=(...e)=>n.handleSaveClick&&n.handleSaveClick(...e))},[(0,c.Lk)("span",yL,[(0,c.bF)(h,{icon:"fal fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(n.getActionButtonText),1)],10,bL)])])])]),_:1},8,["modelValue","onClose"]),(0,c.bF)(y,{modelValue:a.isLoading,"onUpdate:modelValue":t[23]||(t[23]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),a.familyData?((0,c.uX)(),(0,c.CE)("div",vL,[(0,c.Lk)("div",kL,[(0,c.Lk)("div",CL,[a.isEditingFamilyName?((0,c.uX)(),(0,c.CE)("div",TL,[(0,c.bF)(l,{grouped:""},{default:(0,c.k6)(()=>[(0,c.bF)(o,{modelValue:a.editedFamilyName,"onUpdate:modelValue":t[25]||(t[25]=e=>a.editedFamilyName=e),placeholder:e.$t("Family Name"),onKeyup:[(0,m.jR)(n.saveFamilyName,["enter","native"]),(0,m.jR)(n.cancelEditingFamilyName,["esc","native"])]},null,8,["modelValue","placeholder","onKeyup"]),(0,c.Lk)("p",SL,[(0,c.Lk)("button",{class:"button is-primary is-small is-rounded",onClick:t[26]||(t[26]=(...e)=>n.saveFamilyName&&n.saveFamilyName(...e))},[(0,c.Lk)("span",AL,[(0,c.bF)(h,{icon:"fal fa-check"})])])]),(0,c.Lk)("p",PL,[(0,c.Lk)("button",{class:"button is-small is-rounded",onClick:t[27]||
1(t[27]=(...e)=>n.cancelEditingFamilyName&&n.cancelEditingFamilyName(...e))},[(0,c.Lk)("span",IL,[(0,c.bF)(h,{icon:"fal fa-times"})])])])]),_:1})])):((0,c.uX)(),(0,c.CE)("div",LL,[(0,c.Lk)("p",wL,[(0,c.Lk)("span",_L,[(0,c.Lk)("span",EL,[(0,c.bF)(h,{icon:"fal fa-house-user"})]),(0,c.Lk)("span",$L,(0,u.v_)(a.familyData.name),1)]),n.canEditFamily?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-text ml-2 mt-1",onClick:t[24]||(t[24]=(...e)=>n.startEditingFamilyName&&n.startEditingFamilyName(...e))},[(0,c.Lk)("span",FL,[(0,c.bF)(h,{icon:"fal fa-pen"})])])):(0,c.Q3)("",!0)])]))]),n.canEditFamily?((0,c.uX)(),(0,c.CE)("div",ML,[(0,c.Lk)("a",{class:"has-text-grey is-size-7",onClick:t[28]||(t[28]=(...e)=>n.confirmDeleteFamily&&n.confirmDeleteFamily(...e))},(0,u.v_)(e.$t("Delete Family")),1)])):(0,c.Q3)("",!0)])])):!a.isLoading&&n.canEditFamily?((0,c.uX)(),(0,c.CE)("div",xL,[(0,c.Lk)("div",NL,[(0,c.Lk)("p",UL,[(0,c.Lk)("span",DL,[(0,c.bF)(h,{icon:"fal fa-house-user",size:"3x"})])]),(0,c.Lk)("p",XL,(0,u.v_)(e.$t("No family yet")),1),(0,c.Lk)("p",VL,(0,u.v_)(e.$t("Create a family to add members")),1),(0,c.Lk)("button",{class:"button is-primary is-rounded",onClick:t[29]||(t[29]=(...e)=>n.createFamily&&n.createFamily(...e))},[(0,c.Lk)("span",RL,[(0,c.bF)(h,{icon:"fal fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Create Family")),1)])])])):a.isLoading||a.familyData||n.canEditFamily?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",OL,[(0,c.Lk)("span",QL,[(0,c.bF)(h,{icon:"fal fa-info-circle"}),n.isViewingOtherUser?((0,c.uX)(),(0,c.CE)("span",BL,(0,u.v_)(e.$t("This user does not have a family yet")),1)):((0,c.uX)(),(0,c.CE)("span",GL,(0,u.v_)(e.$t("No family yet. Contact a national or local administrator to set up your family.")),1))])])),a.familyData?((0,c.uX)(),(0,c.CE)("div",WL,[n.canManageFamily?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",jL,[(0,c.Lk)("span",zL,[(0,c.Lk)("span",qL,[(0,c.bF)(h,{icon:"fal fa-info-circle"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Only national or local administrators can manage family members.")),1)])])),n.parentMembers.length>0||a.familyData&&n.canManageFamily?((0,c.uX)(),(0,c.CE)("div",JL,[(0,c.Lk)("div",HL,[(0,c.Lk)("div",KL,[(0,c.Lk)("span",YL,[(0,c.bF)(h,{icon:"fal fa-user-group"})]),(0,c.Lk)("span",ZL,(0,u.v_)(e.$t("Parents").toUpperCase()),1)]),n.canManageFamily?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-light is-rounded",onClick:t[30]||(t[30]=e=>n.openAddMemberPanel("parent"))},[(0,c.Lk)("span",ew,[(0,c.bF)(h,{icon:"fal fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Add")),1)])):(0,c.Q3)("",!0)]),(0,c.Lk)("div",tw,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.parentMembers,t=>((0,c.uX)(),(0,c.CE)("div",{key:t.id,class:"family-member-row"},[(0,c.Lk)("div",iw,[t.user?((0,c.uX)(),(0,c.CE)("div",sw,[(0,c.bF)(v,{to:{name:"UserShow",params:{item:t.user.id}},class:"is-flex is-align-items-center"},{default:(0,c.k6)(()=>[(0,c.bF)(p,{item:t.user},null,8,["item"]),(0,c.Lk)("div",aw,[(0,c.Lk)("div",nw,[(0,c.Lk)("span",ow,(0,u.v_)(t.user.firstName)+" "+(0,u.v_)(t.user.lastName),1),n.isCurrentUserMember(t)?((0,c.uX)(),(0,c.CE)("span",lw,(0,u.v_)(e.$t("You").toUpperCase()),1)):(0,c.Q3)("",!0)]),(0,c.Lk)("div",rw,[t.isOwner?((0,c.uX)(),(0,c.CE)("span",dw,(0,u.v_)(e.$t("Family Admin")),1)):t.canManageChildren?((0,c.uX)(),(0,c.CE)("span",cw,(0,u.v_)(e.$t("Can manage child accounts")),1)):(0,c.Q3)("",!0),t.joinedAt?((0,c.uX)(),(0,c.CE)("span",uw,[t.isOwner||t.canManageChildren?((0,c.uX)(),(0,c.CE)("span",mw,"·")):(0,c.Q3)("",!0),(0,c.eW)(" "+(0,u.v_)(e.$t("Added on"))+" "+(0,u.v_)(e.$filters.format(t.joinedAt)),1)])):(0,c.Q3)("",!0)])])]),_:2},1032,["to"])])):((0,c.uX)(),(0,c.CE)("div",pw,[(0,c.Lk)("span",hw,[(0,c.bF)(h,{icon:"fal fa-user"})]),(0,c.Lk)("div",gw,[(0,c.Lk)("span",fw,(0,u.v_)(t.name),1),t.email?((0,c.uX)(),(0,c.CE)("span",bw," ("+(0,u.v_)(t.email)+") ",1)):(0,c.Q3)("",!0),(0,c.Lk)("span",yw,(0,u.v_)(e.$t("External")),1)])]))]),!n.canManageFamily||n.isCurrentUserMember(t)||t.isOwner?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",vw,[(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:e=>n.startEditingMember(t)},[(0,c.Lk)("span",Cw,[(0,c.bF)(h,{icon:"fal fa-pen"})])],8,kw),(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:e=>n.deleteFamilyMember(t)},[(0,c.Lk)("span",ww,[(0,c.bF)(h,{icon:"fa-light fa-trash"})])],8,Lw)]))]))),128))])])):(0,c.Q3)("",!0),n.childMembers.length>0||a.familyData&&n.canManageFamily?((0,c.uX)(),(0,c.CE)("div",_w,[(0,c.Lk)("div",Ew,[(0,c.Lk)("div",$w,[(0,c.Lk)("span",Fw,[(0,c.bF)(h,{icon:"fal fa-child"})]),(0,c.Lk)("span",Tw,(0,u.v_)(e.$t("Children").toUpperCase()),1)]),n.canManageFamily?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-light is-rounded",onClick:t[31]||(t[31]=e=>n.openAddMemberPanel("child"))},[(0,c.Lk)("span",Sw,[(0,c.bF)(h,{icon:"fal fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Add")),1)])):(0,c.Q3)("",!0)]),0===n.childMembers.length&&n.canManageFamily?((0,c.uX)(),(0,c.CE)("div",Aw,[(0,c.Lk)("span",Pw,[(0,c.bF)(h,{icon:"fal fa-child",size:"2x"})]),(0,c.Lk)("p",Iw,(0,u.v_)(e.$t("No children added")),1),(0,c.Lk)("button",{class:"button is-primary is-rounded",onClick:t[32]||(t[32]=e=>n.openAddMemberPanel("child"))},[(0,c.Lk)("span",Mw,[(0,c.bF)(h,{icon:"fal fa-plus"}
1)]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Add child")),1)])])):((0,c.uX)(),(0,c.CE)("div",xw,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.childMembers,t=>((0,c.uX)(),(0,c.CE)("div",{key:t.id,class:"family-member-row"},[(0,c.Lk)("div",Nw,[t.user?((0,c.uX)(),(0,c.CE)("div",Uw,[(0,c.bF)(v,{to:{name:"UserShow",params:{item:t.user.id}},class:"is-flex is-align-items-center"},{default:(0,c.k6)(()=>[(0,c.bF)(p,{item:t.user},null,8,["item"]),(0,c.Lk)("div",Dw,[(0,c.Lk)("span",Xw,(0,u.v_)(t.user.firstName)+" "+(0,u.v_)(t.user.lastName),1),(0,c.Lk)("div",Vw,["underage"===t.waitlistStatus?((0,c.uX)(),(0,c.CE)("span",Rw,(0,u.v_)(e.$t("In waitlist, underage")),1)):"waiting"===t.waitlistStatus?((0,c.uX)(),(0,c.CE)("span",Ow,(0,u.v_)(e.$t("In waitlist")),1)):(0,c.Q3)("",!0)])])]),_:2},1032,["to"])])):((0,c.uX)(),(0,c.CE)("div",Qw,[(0,c.Lk)("span",Bw,[(0,c.bF)(h,{icon:"fal fa-user"})]),(0,c.Lk)("div",Gw,[(0,c.Lk)("span",Ww,(0,u.v_)(t.name),1),t.email?((0,c.uX)(),(0,c.CE)("span",jw," ("+(0,u.v_)(t.email)+") ",1)):(0,c.Q3)("",!0),(0,c.Lk)("span",zw,(0,u.v_)(e.$t("External")),1)])]))]),n.canManageFamily&&!n.isCurrentUserMember(t)?((0,c.uX)(),(0,c.CE)("div",qw,[(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:e=>n.startEditingMember(t)},[(0,c.Lk)("span",Hw,[(0,c.bF)(h,{icon:"fal fa-pen"})])],8,Jw),(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:e=>n.deleteFamilyMember(t)},[(0,c.Lk)("span",Yw,[(0,c.bF)(h,{icon:"fa-light fa-trash"})])],8,Kw)])):n.canManageFamily&&n.isCurrentUserMember(t)?((0,c.uX)(),(0,c.CE)("div",Zw,[(0,c.Lk)("span",e_,(0,u.v_)(e.$t("You")),1)])):(0,c.Q3)("",!0)]))),128))]))])):(0,c.Q3)("",!0),n.otherMembers.length>0||a.familyData&&n.canManageFamily?((0,c.uX)(),(0,c.CE)("div",t_,[(0,c.Lk)("div",i_,[(0,c.Lk)("div",s_,[(0,c.Lk)("span",a_,[(0,c.bF)(h,{icon:"fal fa-user-friends"})]),(0,c.Lk)("span",n_,(0,u.v_)(e.$t("Other Family Members").toUpperCase()),1)]),n.canManageFamily?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-small is-light is-rounded",onClick:t[33]||(t[33]=e=>n.openAddMemberPanel("other"))},[(0,c.Lk)("span",o_,[(0,c.bF)(h,{icon:"fal fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Add")),1)])):(0,c.Q3)("",!0)]),0===n.otherMembers.length?((0,c.uX)(),(0,c.CE)("div",l_,(0,u.v_)(e.$t("No other family members added")),1)):((0,c.uX)(),(0,c.CE)("div",r_,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.otherMembers,t=>((0,c.uX)(),(0,c.CE)("div",{key:t.id,class:"family-member-row"},[(0,c.Lk)("div",d_,[t.user?((0,c.uX)(),(0,c.CE)("div",c_,[(0,c.bF)(v,{to:{name:"UserShow",params:{item:t.user.id}},class:"is-flex is-align-items-center"},{default:(0,c.k6)(()=>[(0,c.bF)(p,{item:t.user},null,8,["item"]),(0,c.Lk)("div",u_,[(0,c.Lk)("div",m_,[(0,c.Lk)("span",p_,(0,u.v_)(t.user.firstName)+" "+(0,u.v_)(t.user.lastName),1),(0,c.bF)(k,{size:"is-small",rounded:""},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(n.getMemberLevelLabel(t.level)),1)]),_:2},1024),t.canManageChildren&&!t.isOwner?((0,c.uX)(),(0,c.CE)("span",h_,[(0,c.Lk)("span",g_,[(0,c.bF)(h,{icon:"fal fa-user-shield"})]),(0,c.eW)(" "+(0,u.v_)(e.$t("Can manage child accounts")),1)])):(0,c.Q3)("",!0)])])]),_:2},1032,["to"])])):((0,c.uX)(),(0,c.CE)("div",f_,[(0,c.Lk)("span",b_,[(0,c.bF)(h,{icon:"fal fa-user"})]),(0,c.Lk)("div",y_,[(0,c.Lk)("span",v_,(0,u.v_)(t.name),1),t.email?((0,c.uX)(),(0,c.CE)("span",k_," ("+(0,u.v_)(t.email)+") ",1)):(0,c.Q3)("",!0),(0,c.Lk)("span",C_,(0,u.v_)(e.$t("External")),1)])]))]),n.canManageFamily&&!n.isCurrentUserMember(t)?((0,c.uX)(),(0,c.CE)("div",L_,[(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:e=>n.startEditingMember(t)},[(0,c.Lk)("span",__,[(0,c.bF)(h,{icon:"fal fa-pen"})])],8,w_),(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:e=>n.deleteFamilyMember(t)},[(0,c.Lk)("span",$_,[(0,c.bF)(h,{icon:"fa-light fa-trash"})])],8,E_)])):n.canManageFamily&&n.isCurrentUserMember(t)?((0,c.uX)(),(0,c.CE)("div",F_,[(0,c.Lk)("span",T_,(0,u.v_)(e.$t("You")),1)])):(0,c.Q3)("",!0)]))),128))]))])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])}var A_=i(28994),P_={mixins:[A_.A],props:["item"],data(){return{family:[],isLoading:!0,userFamilyId:null,familyData:null,isEditingFamilyName:!1,editedFamilyName:"",isOwner:!1,showAddMemberPanel:!1,newMemberType:"platform",selectedPlatformUser:null,externalMember:{firstName:"",lastName:"",email:""}
1,externalMemberErrors:{name:"",email:""},newMemberLevel:"child",newMemberCanManageChildren:!1,isSavingMember:!1,isDuplicateMember:!1,duplicateMemberMessage:"",editingMemberId:null,editingMemberData:null,isEditMode:!1,isRegisteringChild:!1,childData:{email:"",firstName:"",lastName:"",dateBirth:null,gender:"",phoneNumber:"",phoneCountry:null,address:"",postalCode:""},childEmailError:"",countries:[],registerUserFields:[],registerUserFieldsMandatory:[]}},created(){this.loadFamilyData(),this.loadRegistrationConfig(),this.loadCountries()},methods:{loadFamilyData(){this.isLoading=!0;const e=this.item.id!==this.user.id?this.item.id:null,t=e?`/my-families?userId=${e}`:"/my-families";this.$http.plain.get(t).then(e=>{const t=e.data.families||[];return t.length>0?(this.familyData=t[0],this.userFamilyId=t[0].id,this.isOwner=t[0].isOwner,this.$http.plain.get("/family-entities/"+this.userFamilyId+"/members")):(this.familyData=null,this.family=[],null)}).then(e=>{e&&e.data&&(this.family=e.data.members||[])}).catch(e=>{console.error(e),this.family=[],this.familyData=null}).finally(()=>{this.isLoading=!1})},createFamily(){this.isViewingOtherUser&&this.canEditFamily?this.$buefy.dialog.confirm({title:this.$t("Create Family"),message:this.$t("What role should this user have in the family?"),confirmText:this.$t("Parent/Owner"),cancelText:this.$t("Child"),type:"is-info",hasIcon:!0,icon:"house-user",iconPack:"fal",onConfirm:()=>this.createFamilyWithRole("owner"),onCancel:()=>this.createFamilyWithRole("child")}):this.createFamilyWithRole("owner")},createFamilyWithRole(e){this.isLoading=!0;const t="child"===e,i=this.item.fullName+" "+this.$t("Family"),s={name:i};t||(s.familyOwner="/api/v1/users/"+this.item.id),this.$http.plain.post("/family_entities",s).then(e=>t?this.$http.plain.post("/family-members/add",{familyId:e.data.id,userId:this.item.id,level:"child",canManageChildren:!1}).then(()=>e):e).then(e=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("Family created successfully")}),this.loadFamilyData()}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("Failed to create family")})}).finally(()=>{this.isLoading=!1})},startEditingFamilyName(){this.editedFamilyName=this.familyData.name,this.isEditingFamilyName=!0},cancelEditingFamilyName(){this.isEditingFamilyName=!1,this.editedFamilyName=""},saveFamilyName(){this.editedFamilyName.trim()&&(this.isLoading=!0,this.$http.plain.patch("/family-entities/"+this.userFamilyId+"/update-name",{name:this.editedFamilyName.trim()}).then(e=>{this.familyData.name=this.editedFamilyName.trim(),this.isEditingFamilyName=!1,this.editedFamilyName="",this.$buefy.snackbar.open({type:"is-success",message:this.$t("Family name updated")})}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("Failed to update family name")})}).finally(()=>{this.isLoading=!1}))},addNotMember(){this.family.unshift({user:null,name:null,email:null,level:"child",id:"x"+Math.floor(100*Math.random()+1),uncreated:!0})},saveFamilyMember(e){if(e.uncreated){let t=Object.assign({},e);delete t.id,delete t.uncreated,this.$http.plain.post("/family-members/add",{familyId:this.userFamilyId,email:e.email,name:e.name,level:e.level||"child"}).then(t=>{let i=this.family.findIndex(t=>t.id===e.id);return this.family.splice(i,1),this.family.push(t.data),this.$buefy.snackbar.open({message:this.$t("saved")})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})}else delete e.member,this.$http.plain.patch("/family-members/"+e.id+"/update",{level:e.level,email:e.email,name:e.name}).then(t=>(e.isEditing=!1,this.$buefy.snackbar.open({message:this.$t("saved")}))).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},openAddMemberPanel(e){this.resetAddMemberForm(),this.newMemberLevel=e,this.isEditMode=!1,this.canAddPlatformMembers||(this.newMemberType="external"),this.showAddMemberPanel=!0},closeAddMemberPanel(){this.showAddMemberPanel=!1,this.childEmailError="",setTimeout(()=>{this.resetAddMemberForm()},300)},resetAddMemberForm(){this.newMemberType="platform",this.selectedPlatformUser=null,this.externalMember={firstName:"",lastName:"",email:""}
1,this.externalMemberErrors={name:"",email:""},this.newMemberLevel="child",this.newMemberCanManageChildren=!1,this.isDuplicateMember=!1,this.duplicateMemberMessage="",this.editingMemberId=null,this.editingMemberData=null,this.isEditMode=!1,this.isRegisteringChild=!1,this.childData={email:"",firstName:"",lastName:"",dateBirth:null,gender:"",phoneNumber:"",phoneCountry:this.tenant?.country?.code||null,address:"",postalCode:""},this.childEmailError=""},handlePlatformUserSelected(e){if(this.selectedPlatformUser=e,e){const t=this.family.find(t=>t.user&&t.user.id===e.id);t?(this.isDuplicateMember=!0,this.duplicateMemberMessage=this.$t("This user is already a member of the family")):(this.isDuplicateMember=!1,this.duplicateMemberMessage="")}},clearSelectedPlatformUser(){this.selectedPlatformUser=null,this.isDuplicateMember=!1,this.duplicateMemberMessage=""},setLevel(e){this.handleLevelChange(e)},handleLevelChange(e){this.isEditMode?(this.editingMemberData.level=e,"child"===e&&(this.editingMemberData.canManageChildren=!1)):(this.newMemberLevel=e,"child"===e&&(this.newMemberCanManageChildren=!1))},handleCanManageChange(e){this.isEditMode?this.editingMemberData.canManageChildren=e:this.newMemberCanManageChildren=e},startEditingMember(e){this.editingMemberId=e.id,this.editingMemberData={level:e.level,canManageChildren:e.canManageChildren||!1,user:e.user,name:e.name,linkUser:null},this.isEditMode=!0,this.showAddMemberPanel=!0},handleLinkUserSelected(e){e&&this.editingMemberData&&(this.editingMemberData.linkUser=e)},cancelEditingMember(){this.editingMemberId=null,this.editingMemberData=null},saveEditingMember(){if(!this.editingMemberData)return;this.isSavingMember=!0;const e=this.editingMemberId;this.$http.plain.patch(`/family-members/${e}/update`,{level:this.editingMemberData.level,canManageChildren:this.editingMemberData.canManageChildren,userId:this.editingMemberData.linkUser?.id||null}).then(t=>{const i=this.family.findIndex(t=>t.id===e);-1!==i&&(this.family[i].level=this.editingMemberData.level,this.family[i].canManageChildren=this.editingMemberData.canManageChildren,t.data?.user&&(this.family[i].user=t.data.user,this.family[i].name=null,this.family[i].email=null)),this.$buefy.snackbar.open({type:"is-success",message:this.$t("Member updated successfully")}),this.closeAddMemberPanel()}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:e.response?.data?.message||this.$t("Failed to update member")})}).finally(()=>{this.isSavingMember=!1})},validateExternalMember(){let e=!0;return this.externalMemberErrors={name:"",email:""},this.externalMember.firstName.trim()&&this.externalMember.lastName.trim()||(this.externalMemberErrors.name=this.$t("Name is required"),e=!1),e},isValidEmail(e){const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.test(e)},saveNewMember(){"platform"===this.newMemberType?this.selectedPlatformUser&&this.addPlatformMember():this.validateExternalMember()&&this.addExternalMember()},addPlatformMember(){this.isSavingMember=!0;const e="child"!==this.newMemberLevel&&this.newMemberCanManageChildren;this.postPlatformMemberAdd(e,!1)},postPlatformMemberAdd(e,t){this.$http.plain.post("/family-members/add",{familyId:this.userFamilyId,userId:this.selectedPlatformUser.id,level:this.newMemberLevel,canManageChildren:e,moveFromOtherFamily:t}).then(e=>{this.family.push(e.data),this.$buefy.snackbar.open({type:"is-success",message:this.$t(t?"Member moved successfully":"Member added successfully")}),this.closeAddMemberPanel()}).catch(t=>{409!==t.response?.status||"user_in_other_family"!==t.response?.data?.code?(console.error(t),this.$buefy.snackbar.open({type:"is-danger",message:t.response?.data?.message||this.$t("Failed to add member")})):this.confirmMoveFromOtherFamily(t.response.data.otherFamily,e)}).finally(()=>{this.isSavingMember=!1})},confirmMoveFromOtherFamily(e,t){const i=this.selectedPlatformUser,s=i.fullName||[i.firstName,i.lastName].filter(Boolean).join(" ")||this.$t("This member");this.$buefy.dialog.confirm({title:this.$t("Move family member"),message:this.$t('{name} is already a member of "{family}". Move them to this family?',{name:s,family:e.name}),confirmText:this.$t("Move"),cancelText:this.$t("Cancel"),type:"is-warning",hasIcon:!0,icon:"exclamation-triangle",iconPack:"fal",onConfirm:()=>{this.isSavingMember=!0,this.postPlatformMemberAdd(t,!0)}})},addExternalMember(){this.isSavingMember=!0;const e=(this.externalMember.firstName.trim()+" "+this.externalMember.lastName.trim()).trim();this.$http.plain.post("/family-members/add",{familyId:this.userFamilyId,email:this.externalMember.email||null,name:e,level:this.newMemberLevel,canManageChildren:!1}).then(e=>{this.family.push(e.data),this.$buefy.snackbar.open({type:"is-success",message:this.$t("External member added successfully")}),this.closeAddMemberPanel()}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:e.response?.data?.message||this.$t("Failed to add external member")})}).finally(()=>{this.isSavingMember=!1})},addFamilyMember(e){e&&(this.isLoading=!0,this.$http.plain.post("/family-members/add",{familyId:this.userFamilyId,userId:e.id,level:"child"}).then(e=>(this.family.push(e.data),this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}))).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1}))},getMemberLevelLabel(e){const t={grandparent:this.$t("Grandparent"),parent:this.$t("Parent"),child:this.$t("Child"),sibling:this.$t("Sibling"),spouse:this.$t("Spouse"),guardian:this.$t("Guardian"),other:this.$t("Other")};return t[e]||e},isCurrentUserMember(e){return e.user&&e.user.id===this.user.id},confirmDeleteFamily(){this.$buefy.dialog.confirm({title:this.$t("Delete Family"),message:this.$t("Are you sure you want to delete this family? This action cannot be undone and will remove all family members."),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",hasIcon:!0,icon:"exclamation-triangle",iconPack:"fal",onConfirm:()=>this.deleteFamily()})},deleteFamily(){this.isLoading=!0,this.$http.plain.delete("/family-entities/"+this.userFamilyId+"/delete").then(()=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("Family deleted successfully")}),this.familyData=null,this.family=[],this.userFamilyId=null,this.isOwner=!1}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("Failed to delete family")})}).finally(()=>{this.isLoading=!1})},deleteFamilyMember(e){if(this.isCurrentUserMember(e))this.$buefy.snackbar.open({type:"is-warning",message:this.$t("You cannot remove yourself from your family")});else if(e.uncreated){let t=this.family.findIndex(t=>t.id===e.id);this.family.splice(t,1)}else this.isLoading=!0,this.$http.plain.delete("/family-members/"+e.id+"/remove").then(t=>{let i=this.family.findIndex(t=>t.id===e.id);return this.family.splice(i,1),this.$buefy.snackbar.open({message:this.$t("deleted")})}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},registerChild(){this.resetAddMemberForm(),this.isRegisteringChild=!0,this.showAddMemberPanel=!0},loadRegistrationConfig(){this.tenant&&(this.registerUserFields=this.tenant.settingForms?.registerForm?.registerUserFields||[],this.registerUserFieldsMandatory=this.tenant.settingForms?.registerForm?.registerUserFieldsMandatory||[],this.tenant.country&&(this.childData.phoneCountry=this.tenant.country.code))},loadCountries(){this.countries=ds.Xr},validateChildEmail(e){if(!e)return!0;const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return t.test(e)},saveChildRegistration(){this.childEmailError="",!this.childData.email||this.validateChildEmail(this.childData.email)?this.childData.email?(this.isSavingMember=!0,this.$http.plain.post("/check-email-exists",{email:this.childData.email,tenantSlug:this.tenant.slug}).then(e=>{if(e.data.exists)return this.childEmailError=this.$t("An account with this email address already exists"),void(this.isSavingMember=!1);
1this.proceedWithChildRegistration()}).catch(e=>{this.isSavingMember=!1,this.$buefy.snackbar.open({type:"is-danger",message:this.$t("Failed to validate email address")})})):this.proceedWithChildRegistration():this.childEmailError=this.$t("Please enter a valid email address")},proceedWithChildRegistration(){if(this.childData.firstName&&this.childData.lastName){const e=this.family.find(e=>!!e.user&&(e.user.firstName?.toLowerCase()===this.childData.firstName.toLowerCase()&&e.user.lastName?.toLowerCase()===this.childData.lastName.toLowerCase()));if(e)return this.childEmailError=this.$t("A family member with this name already exists in your family"),void(this.isSavingMember=!1)}const e={firstName:this.registerUserFieldsMandatory.includes("first_name"),lastName:this.registerUserFieldsMandatory.includes("last_name"),dateBirth:this.registerUserFieldsMandatory.includes("birthday"),gender:this.registerUserFieldsMandatory.includes("gender")};for(const[t,i]of Object.entries(e))if(i&&!this.childData[t])return this.$buefy.snackbar.open({type:"is-danger",message:this.$t("Please fill in all required fields")}),void(this.isSavingMember=!1);this.isSavingMember||(this.isSavingMember=!0),this.$http.plain.post("/users/register-child",{email:this.childData.email,firstName:this.childData.firstName,lastName:this.childData.lastName,dateBirth:this.childData.dateBirth,gender:this.childData.gender,phoneNumber:this.childData.phoneNumber,phoneCountry:this.childData.phoneCountry,address:this.childData.address,postalCode:this.childData.postalCode,tenant:this.tenant["@id"],isChild:!0,parentUserId:this.user.id}).then(e=>{if(e.data&&e.data.id)return this.$http.plain.post("/family-members/add",{familyId:this.userFamilyId,userId:e.data.id,level:"child",canManageChildren:!1})}).then(()=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("Child registered successfully")}),this.loadFamilyData(),this.closeAddMemberPanel()}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:e.response?.data?.message||this.$t("Failed to register child")})}).finally(()=>{this.isSavingMember=!1})},handleSaveClick(){this.isRegisteringChild?this.saveChildRegistration():this.isEditMode?this.saveEditingMember():this.saveNewMember()}},computed:{...(0,vi.L8)(["isGranted","user","tenant"]),getPanelTitle(){return this.isRegisteringChild?this.$t("Register Child"):this.isEditMode?this.$t("Edit Family Member"):this.$t("Add Family Member")},getActionIcon(){return this.isRegisteringChild?"fal fa-user-plus":this.isEditMode?"fal fa-check":"fal fa-plus"},getActionButtonText(){return this.isRegisteringChild?this.$t("Register Child"):this.isEditMode?this.$t("Save Changes"):this.$t("Add Member")},getPhonePlaceholder(){let e=this.countries.find(e=>e.c===this.childData.phoneCountry);return void 0!==e?e.s:""},currentLevel(){return this.isEditMode&&this.editingMemberData?this.editingMemberData.level:this.newMemberLevel},canShowManageChildrenOption(){return"platform"===this.newMemberType&&"child"!==this.newMemberLevel},canSaveMember(){if(this.isRegisteringChild){const e=!this.registerUserFieldsMandatory.includes("first_name")||this.childData.firstName,t=!this.registerUserFieldsMandatory.includes("last_name")||this.childData.lastName;return e&&t}if(this.isEditMode)return null!==this.editingMemberData;if("platform"===this.newMemberType)return this.canAddPlatformMembers&&null!==this.selectedPlatformUser&&!this.isDuplicateMember;{const e=this.externalMember.firstName.trim()&&this.externalMember.lastName.trim(),t=this.externalMember.email.trim(),i=!t||this.isValidEmail(t);return e&&i}},parentMembers(){return this.family.filter(e=>["parent","guardian","grandparent","spouse"].includes(e.level))},childMembers(){return this.family.filter(e=>"child"===e.level)},otherMembers(){return this.family.filter(e=>["sibling","other"].includes(e.level))},canEditFamily(){return this.isGranted("HR_LOCAL")||this.item.id===this.user.id},canManageFamily(){return this.isGranted("HR_LOCAL")||this.item.id===this.user.id&&this.familyData},canAddPlatformMembers(){return this.isGranted("HR_LOCAL")},isViewingOtherUser(){return this.item.id!==this.user.id}},components:{BirthdaySelect:Pt.A,UserSearchAutocomplete:kh.A,LogoThumbnail:rc.A}};const I_=(0,Li.A)(P_,[["render",S_],["__scopeId","data-v-17f9e06c"]]);var M_=I_,x_=i(90957),N_=i(1521),U_=i(49958),D_=i(78048),X_=i(65593),V_=i(39162),R_={mixins:[A_.A],data(){return{itemId:this.$route.params.item,item:null,fullName:null,activeTab:"profile",newPassword:null,newPasswordConfirmation:null,isSendingPasswordReset:!1,currentPassword:null,newEmail:null,mySkills:null,newSkill:null,newTimezone:null,skillLoading:!1,industries:null,profileCustomFields:null,profileFields:null,isLoading:!0,openedSettings:this.$route.query.setting?this.$route.query.setting:"privacy",blockedUsers:[],isLoadingBlockedUsers:!1,theme:"light",resignationIntent:!1,canManageThisProfile:!1,resignationReason:"",promptToReinroll:"",resignationConclusion:"",closeAccount:!1,emailOtpStep:1,emailOtpTempToken:null,emailOtpCode:"",emailOtpLoading:!1,passwordOtpStep:1,passwordOtpTempToken:null,passwordOtpCode:"",passwordOtpLoading:!1,passwordOtpRateLimitError:!1,triggerProfileCompletionCelebration:!1,previousCompletionPercentage:null}},created(){this.user.notificationSettings?.prefTheme&&(this.theme=this.user.notificationSettings.prefTheme),"UserDeleteAccount"===this.$route.name&&(this.openedSettings="delete"),this.retrieve(),this.profileCustomFields=this.tenant.settingForms.profileForm.profileCustomFields,this.initTab(),"blockedUsers"===this.openedSettings&&this.loadBlockedUsers()},methods:{scrollToField(e){if("email"===e)return this.activeTab="settings",void this.$nextTick(()=>
1{this.switchSettingsTab("email"),this.$nextTick(()=>{setTimeout(()=>{const e=this.$refs.emailFieldAdmin?.$el||this.$refs.emailFieldUser?.$el,t=this.$refs.emailInputAdmin||this.$refs.emailInputUser;e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.classList.add("highlight-focus-field"),setTimeout(()=>{e.classList.remove("highlight-focus-field")},1e3)),t&&setTimeout(()=>t.focus(),300)},100)})});"profile"!==this.activeTab?(this.activeTab="profile",this.$nextTick(()=>{setTimeout(()=>{this.$refs.form&&this.$refs.form.focusField&&this.$refs.form.focusField(e)},300)})):this.$refs.form&&this.$refs.form.focusField&&this.$refs.form.focusField(e)},onCelebrationDismissed(){this.triggerProfileCompletionCelebration=!1,this.item?.privacy&&(this.item.privacy.hasSeenProfileCompletionCelebration=!0)},initTab(){this.$route.query.tab&&(this.activeTab=this.$route.query.tab),this.$route.query.focusField&&this.$nextTick(()=>{setTimeout(()=>{this.scrollToField(this.$route.query.focusField)},500)})},onTabChange(){!this.isGranted("ADMIN_LOCAL")&&this.isGranted("HR_LOCAL")&&this.switchSettingsTab("delete"),this.scrollActiveTabIntoView()},scrollActiveTabIntoView(){this.$isMobile()&&this.$nextTick(()=>{const e=this.$refs.userTabs?.$el;if(!e)return;const t=e.querySelector(".tabs li.is-active");t&&t.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})},switchSettingsTab(e){this.openedSettings=e,window.scrollTo({top:0,behavior:"smooth"})},openBlockedUsers(){this.switchSettingsTab("blockedUsers"),this.loadBlockedUsers()},loadBlockedUsers(){this.isLoadingBlockedUsers=!0,this.$http.plain.get("/user_blocks").then(e=>{this.blockedUsers=e.data["hydra:member"]}).catch(e=>console.error(e)).finally(()=>{this.isLoadingBlockedUsers=!1})},unblockUser(e){this.isLoadingBlockedUsers=!0,this.$http.plain.delete("/user_blocks/"+e.id).then(()=>{this.blockedUsers=this.blockedUsers.filter(t=>t.id!==e.id),this.$buefy.toast.open({message:this.$t("Member unblocked. Their content is visible again."),duration:6e3,type:"is-success"})}).catch(e=>console.error(e)).finally(()=>{this.isLoadingBlockedUsers=!1})},deleteSkill(e){this.$http.plain.delete("/profession_users/"+e.id).then(t=>{this.mySkills=this.mySkills.filter(function(t){return t.id!==e.id}),this.saveSuccess(t)}).catch(e=>console.error(e))},saveUserSkill(e){this.skillLoading=!0,this.$http.plain.post("/profession_users",{profession:"/api/v1/professions/"+e.id,user:this.item["@id"]}).then(e=>{this.mySkills.push(e.data)}).catch(e=>console.error(e)).finally(()=>{this.skillLoading=!1})},saveSkill(){let e=this.newSkill;return e&&(e.id?this.saveUserSkill(e):(this.skillLoading=!0,this.$http.plain.post("/professions",{name:e,translation:{ro:e,en:e},isSuggested:!0}).then(e=>{this.saveUserSkill(e.data)}).catch(e=>console.error(e)).finally(()=>{this.skillLoading=!1}))),!1},retrieve(){this.isLoading=!0;let e=this.user.id!==this.itemId||this.$store.state.impersonatedAs?"/users/"+this.itemId:"/me";return this.$http.plain.get(e).then(e=>this.postRetrieve(e)).catch(e=>console.error(e)).finally(()=>this.isLoading=!1)},postRetrieve(e){e.data.dateJoined=(0,ds.QE)(e.data.dateJoined),e.data.dateJoinedFullMember=(0,ds.QE)(e.data.dateJoinedFullMember),this.item=e.data,this.canManageThisProfile=this.canManageProfileAsParent(this.item),"delete"!==this.openedSettings||this.hasCloseAccountActions||(this.openedSettings="privacy"),this.fullName=this.item.fullName,this.newEmail=this.item.email,this.newTimezone=this.item.timezone,this.item.customPermissions||(this.item.customPermissions=[]),this.item.permissions||(this.item.permissions=[]),this.item.userRolePermissions=[],this.item.userRolePermissions=this.item.permissions.filter(e=>!this.item.customPermissions.includes(e)),this.profileFields=this.tenant.settingForms.profileForm.profileFields,this.setItemLocalCenterObject()},isProfileField(e){if(this.profileFields.includes(e))return!0},isMandatoryField(e){return this.user.id===this.item.id&&this.tenant.settingForms.profileForm.profileFieldsMandatory&&this.tenant.settingForms.profileForm.profileFieldsMandatory.includes(e)},setItemLocalCenterObject(){if(this.item.localCenter){this.item.localCenterId=this.item.localCenter.id,this.item.localCenterObject=this.item.localCenter,this.item.localCenter=this.item.localCenter["@id"];const e=this.item.localCenterObject.ancestors;Array.isArray(e)&&e.length?this.item.localCenterObject.parent=e[0]:this.item.localCenterParent&&void 0===this.item.localCenterObject.parent&&this.item.localCenterParent.id!==this.item.localCenterObject.id&&(this.item.localCenterObject.parent=this.item.localCenterParent)}},getCompanyDetails(){this.item.companyIdentifier?(this.isLoadingButton=!0,this.$http.plain.get(`/company-detail
1s-get/${this.item.companyIdentifier}`).then(e=>{this.item.companyName=e.data.companyName,this.item.companyAddress=e.data.companyAddress,this.item.companyRegNo=e.data.companyRegNo}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingButton=!1})):this.$buefy.toast.open({message:this.$t("Company identifier is required")})},save(e=null){this.previousCompletionPercentage=this.item?.profileCompletionPercentage,this.item.rawUserCustomFieldsValues=this.$refs.form.customFieldValues;const t=(0,ds.vW)(this.item.dateJoined),i=(0,ds.vW)(this.item.dateJoinedFullMember);delete this.item.feeLocalProductPrice,delete this.item.feeTenantProductPrice;let s={...this.item};"privacy"===e?s={privacy:{...this.item.privacy}}:"permissions"===e?(s={status:this.item.status,roles:this.item.roles,localCenter:this.item.localCenter,customPermissions:this.item.customPermissions,dateJoinedFullMember:i,isFullMember:this.item.isFullMember,isTrainer:this.item.isTrainer},this.isGranted("HR_TENANT")||delete s.localCenter):"mfa"===e?s={mfaEnabled:this.item.mfaEnabled}:(s.townFrom&&(s.townFrom=s.townFrom["@id"]),s.townCurrent&&(s.townCurrent=s.townCurrent["@id"]),s.phoneNumber=s.phoneLocalNumber?s.phoneLocalNumber:null,s.dateJoined=t,delete s.localCenter,delete s.customPermissions,delete s.privacy,delete s.roleGroups,delete s.status,delete s.userRolePermissions,delete s.logo,delete s.dateJoinedFullMember,delete s.professionIndustry,delete s.professionJob,delete s.professionExpertise,delete s.identity,delete s.adhesion,delete s.customFieldValues,delete s.educationMaster,delete s.educationPhd,delete s.educationUniversity,delete s.userRoles,delete s.type,delete s.localCenterObject,delete s.localCenterParent,delete s.localCenterParentName,delete s.permissions,"NaN/NaN/NaN"===s.dateBirth&&delete s.dateBirth),this.isLoading=!0,this.$http.plain.patch(this.APIPutRoute,s).then(e=>{this.fullName=e.data.fullName,this.saveSuccess(e)}).catch(e=>console.error(e)).finally(()=>this.isLoading=!1)},saveProfession(){this.previousCompletionPercentage=this.item?.profileCompletionPercentage,this.$http.plain.patch(this.APIPutRoute,{professionHeadline:this.item.professionHeadline,professionExpertiseOther:this.item.professionExpertiseOther,professionSector:this.item.professionSector,professionIndustry:this.item.professionIndustry?this.item.professionIndustry["@id"]:null,professionJob:this.item.professionJob?this.item.professionJob["@id"]:null,professionExpertise:this.item.professionExpertise?this.item.professionExpertise["@id"]:null,professionOrganisation:this.item.professionOrganisation,professionOrganisationRole:this.item.professionOrganisationRole,professionOrganisationWebsite:this.item.professionOrganisationWebsite,companyIdentifier:this.item.companyIdentifier,companyName:this.item.companyName,companyAddress:this.item.companyAddress,companyRegNo:this.item.companyRegNo}).then(e=>{this.saveSuccess(e)}).catch(e=>{console.error(e)})},saveSuccess(e){this.postRetrieve(e),this.user.id===e.data.id&&this.$store.commit("setCurrentUser",e.data),this.item.id===e.data.id&&(this.item=e.data),this.tenant?.settingFeatures?.users?.profileCompletionEnabled&&this.item?.id===this.user?.id&&null!==this.previousCompletionPercentage&&this.previousCompletionPercentage<100&&100===this.item?.profileCompletionPercentage&&(this.triggerProfileCompletionCelebration=!0),this.user.id===this.item.id&&(this.$route.query.missing_f||this.$route.query.missing_c)&&this.$router.push({name:"UserShowMyProfile"}),this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")}),"child"===this.item.accountType&&this.item.id!==this.user.id&&this.$router.push({name:"UserUpdate",params:{item:this.user.id},query:{tab:"family"}})},changeStatus(e){let t={};t.status=e,this.$http.plain.patch(this.APIPutRoute,t).then(i=>(this.item.status=t.status,"INACTIVE"===e&&this.item.id===t.id?this.$router.push({name:"Dashboard"}):this.saveSuccess(i))).catch(e=>console.error(e))},confirmDelete(){this.$buefy.dialog.confirm({title:this.$t("deleteUserTitle")+" "+this.item.fullName,message:this.$t("deleteUserConfirmation"),confirmText:this.$t("deleteAccount"),type:"is-danger",onConfirm:()=>this.delete()})},makeAccountInactive(){this.$buefy.dialog.confirm({title:this.$t("Are you sure?"),message:this.$t("user.closeAccountTemporaryDetail"),confirmText:this.$t("Close account"),cancelText:this.$t("cancel"),type:"is-danger",onConfirm:()=>this.changeStatus("INACTIVE")})},delete(){let e={status:"DELETED"};this.$http.plain.patch(this.APIPutRoute,e).then(e=>this.deleteSuccess(e)).catch(e=>console.error(e))},deleteSuccess(){this.item.id===this.user.id?(this.$store.commit("unsetCurrentUser"),this.$router.replace("/login")):(this.$router.push({name:"Dashboard"}
1),this.$buefy.toast.open(this.$t("deleted")))},sendPasswordReset(){this.isSendingPasswordReset=!0,this.$http.plain.post(`/users/${this.item.id}/send-password-reset`,{}).then(()=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("Sent")})}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Something went wrong")})}).finally(()=>{this.isSendingPasswordReset=!1})},savePassword(){let e={};e.newPassword=this.newPassword,e.currentPassword=this.currentPassword,this.$http.plain.patch("/users/"+this.item.id+"/new-password",e).then(e=>this.saveSuccess(e)).catch(e=>console.error(e))},saveEmail(){if(this.item.id===this.user.id&&!this.newEmail)return this.$buefy.toast.open({type:"is-danger",message:this.$t("You have to enter your new email")});if(this.newEmail&&!(0,ds.DT)(this.newEmail))return this.$buefy.toast.open({type:"is-danger",message:this.$t("Please enter a valid email address")});let e={};e.newEmailRequested=this.newEmail,e.isUnsubscribed=this.item.isUnsubscribed,e.isUnsubscribedInstant=this.item.isUnsubscribedInstant,this.$http.plain.patch("/users/"+this.item.id+"/new-email",e).then(e=>{this.saveSuccess(e)}).catch(e=>{console.error(e);const t=e.response?.data?.detail;let i=this.$t("An error occurred. Please try again.");"EMAIL_EXISTS"===t?i=this.$t("This email address is already in use"):"EMAIL_REQUIRED"===t?i=this.$t("You have to enter your new email"):t&&(i=t),this.$buefy.toast.open({type:"is-danger",message:i,duration:4e3})})},requestEmailChangeOtp(){if(!this.newEmail)return this.$buefy.toast.open({type:"is-danger",message:this.$t("You have to enter your new email")});this.emailOtpLoading=!0,this.$http.plain.post("/request-email-change-otp",{newEmail:this.newEmail}).then(e=>{this.emailOtpTempToken=e.data.tempToken,this.emailOtpStep=2,this.emailOtpCode="",this.$buefy.toast.open({type:"is-success",message:this.$t("Verification code sent to your current email address")})}).catch(e=>{console.error(e)}).finally(()=>{this.emailOtpLoading=!1})},verifyEmailChangeOtp(){if(!this.emailOtpLoading){if(!this.emailOtpCode||6!==this.emailOtpCode.length)return this.$buefy.toast.open({type:"is-danger",message:this.$t("Please enter the 6-digit verification code")});this.emailOtpLoading=!0,this.$http.plain.post("/verify-email-change-otp",{code:this.emailOtpCode,tempToken:this.emailOtpTempToken}).then(e=>{if(2===e.data.step)return this.emailOtpTempToken=e.data.tempToken,this.emailOtpStep=3,this.emailOtpCode="",void this.$buefy.toast.open({type:"is-success",message:this.$t("Current email verified. Verification code sent to your new email address.")});this.$store.commit("unsetCurrentUser"),this.$router.push({name:"Login"}),this.$buefy.snackbar.open({type:"is-success",message:this.$t("Email updated successfully. Please log in with your new email."),duration:5e3})}).catch(e=>{console.error(e)}).finally(()=>{this.emailOtpLoading=!1})}},resetEmailOtpFlow(){this.emailOtpStep=1,this.emailOtpTempToken=null,this.emailOtpCode=""},requestPasswordChangeOtp(){return!this.newPassword||this.newPassword.length<8?this.$buefy.toast.open({type:"is-danger",message:this.$t("Password must be at least 8 characters")}):this.newPassword!==this.newPasswordConfirmation?this.$buefy.toast.open({type:"is-danger",message:this.$t("Passwords do not match")}):(this.passwordOtpLoading=!0,this.passwordOtpRateLimitError=!1,void this.$http.plain.post("/request-password-change-otp").then(e=>{this.passwordOtpTempToken=e.data.tempToken,this.passwordOtpStep=2,this.passwordOtpCode="",this.$buefy.toast.open({type:"is-success",message:this.$t("Verification code sent to your email address")})}).catch(e=>{console.log(e),429===e.response?.status&&(this.passwordOtpRateLimitError=!0)}).finally(()=>{this.passwordOtpLoading=!1}))},verifyPasswordChangeOtp(){if(!this.passwordOtpLoading){if(!this.passwordOtpCode||6!==this.passwordOtpCode.length)return this.$buefy.toast.open({type:"is-danger",message:this.$t("Please enter the 6-digit verification code")});this.passwordOtpLoading=!0,this.$http.plain.post("/verify-password-change-otp",{code:this.passwordOtpCode,tempToken:this.passwordOtpTempToken,newPassword:this.newPassword}).then(e=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("Password updated successfully")}),this.resetPasswordOtpFlow(),this.newPassword=null,this.newPasswordConfirmation=null}).catch(e=>{console.error(e)}).finally(()=>{this.passwordOtpLoading=!1})}},resetPasswordOtpFlow(){this.passwordOtpStep=1,this.passwordOtpTempToken=null,this.passwordOtpCode=""},saveTimezone(){this.$http.plain.patch(this.APIPutRoute,{timezone:this.newTimezone}).then(e=>this.saveSuccess(e)).catch(e=>console.error(e))},cancelResignation(){this.isLoading=!0,this.$http.plain.delete("/resignation_requests/"+this.user.resignPending).then(e=>
1(this.$buefy.toast.open({message:this.$t("Your resignation cancellation is confirmed. We're glad you're staying with us!"),type:"is-success",duration:6e3}),this.retrieve())).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},submitResignationRequest(){if(this.isLoading=!0,!this.resignationIntent)return this.$buefy.toast.open({message:this.$t("Please provide a resignation reason."),type:"is-danger",duration:6e3}),void(this.isLoading=!1);let e={};e.reason=this.resignationReason,e.promptToReinroll=this.promptToReinroll,e.conclusion=this.resignationConclusion,this.tenant.settingFeatures.resignation?.autoCloseAccountsThatResign?e.stayActive=!1:e.stayActive=!this.closeAccount,this.isGranted("HR_LOCAL",this.item.localCenterObject)&&(e.user=this.item["@id"]),this.$http.plain.post("/resignation_requests",e).then(e=>(this.$buefy.toast.open({message:this.$t("We have received your resignation request, you will be notified by email when it is processed"),type:"is-success",duration:6e3}),this.resignationReason="",this.closeAccount=!1,this.resignationIntent=!1,this.retrieve())).catch(e=>{console.error(e),this.$buefy.toast.open({message:e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Something went wrong"),type:"is-danger",duration:6e3})}).finally(()=>{this.isLoading=!1})},goToResignationTab(){this.activeTab="settings",this.switchSettingsTab("delete"),this.resignationIntent=!0}},computed:{...(0,vi.L8)(["isGranted","user","tenant","canManageProfileAsParent"]),showProfileCompletion(){return this.tenant?.settingFeatures?.users?.profileCompletionEnabled&&void 0!==this.item?.profileCompletionPercentage&&this.item.profileCompletionPercentage<100},showProfileCompletionCelebration(){return this.triggerProfileCompletionCelebration},hasProfessionFields(){const e=["profession_headline","profession_industry","profession_sector","professionOrganization","professionOrganisationRole","professionOrganisationWebsite","companyIdentifier","companyName","companyAddress","companyWebsite","companyRegNo"],t=e.some(e=>this.profileFields.includes(e)),i=this.tenant.settingFeatures.professions.hasJob||this.tenant.settingFeatures.professions.hasExpertise||this.tenant.settingFeatures.professions.hasIndustry;return t||i},hasCloseAccountActions(){const e=this.item.id===this.user.id,t=this.isGranted("ADMIN_LOCAL",this.item.localCenterObject),i=this.isGranted("HR_LOCAL",this.item.localCenterObject),s=this.tenant.settingFeatures.resignation?.isActive&&(e||i);return"ACTIVE"===this.item.status&&(this.canCloseOwnAccount||this.canManageThisProfile)||["SUSPENDED","INACTIVE"].includes(this.item.status)&&t||t&&"SUSPENDED"!==this.item.status||s&&(this.item.resignPending||!this.item.isGuest)||(this.item.isGuest||this.isGranted("ROLE_ADMIN_TENANT"))&&(e||t)||!e&&i},canCloseOwnAccount(){return this.item.id===this.user.id&&!(0,ds.dG)(this.item.age)},APIPutRoute(){return this.user.id!==this.item.id||this.isGranted("HR_LOCAL",this.item.localCenterObject)?"/users/"+this.item.id:"/profile-update/"+this.item.id},hasPermissionForRoles(){const e=this.isGranted("HR_TENANT"),t=this.tenant.settingFeatures.localCenter.isActive&&this.isGranted("HR_LOCAL",this.item.localCenterObject);return!(!e&&!t)&&(this.tenant.settingFeatures.users.hasRoles||this.tenant.settingFeatures.users.hasUserTypes)},canModifyRoles(){const e=this.isGranted("HR_TENANT"),t=!1!==this.tenant?.settingFeatures?.users?.allowLocalAdminsToModifyUserPermissions;return e||t},hasCustomFields(){return this.profileCustomFields&&this.profileCustomFields.length>0}},components:{BField:D_.$W,LogoThumbnail:rc.A,FormNotification:N_.A,TimezoneSelect:x_.A,Form:Xb.A,FormPermissions:Iy,ProfileCompletionBar:X_.A,ProfileCompletionCelebration:V_.A,FormPrivacy:Vb.A,Roles:CC,Family:M_,Badges:rk,ProfessionIndustryList:hs.A,ProfessionJobList:Ls,MobileViewHeader:Pg.A,OtpCodeInput:U_.A}};const O_=(0,Li.A)(R_,[["render",Db],["__scopeId","data-v-9af5e0ae"]]);var Q_=O_,B_=i(21662),G_=i(28404);const W_={class:"o-maxwidth discuss_list"},j_={class:(0,u.C4)({"o-maxwidth":!0})},z_={class:"discuss-layout"},q_={class:"discuss-feed"},J_={class:"o-discussions-grid"},H_={key:0,class:"grid-cell-1"},K_={ref:"stickySentinel",style:{height:"1px","margin-top":"-1px"}},Y_={key:0,class:"discuss-category-tabs mb-2"},Z_={class:"discuss-category-tabs-scroll"},eE=["onClick"],tE=["title"],iE={class:"icon is-small"},sE={key:0,class:"is-size-7 unit-name-truncate"},aE={key:1,class:"is-size-7 namespace-name-truncate"},nE={class:"discuss-tags-list mt-3"},oE={key:4,class:"grid-cell-1 o-minwidth"},lE={class:"no-discussions mt-6"},rE={class:"no-discussions-icon mb-3"},dE={class:"no-discussions-message"},cE={class:"no-discussions-actions mt-5"},uE={key:5,class:"grid-cell-1 o-minwidth"},mE={class:"no-discussions mt-6"},pE={class:"no-discussions-icon mb-3"},hE={class:"no-discussions-message"},gE={key:0,ref:"infiniteScrollSentinel",class:"o-minwidth mt-3 mb-3 has-text-centered",style:{"min-height":"60px",position:"relative"}}
1,fE={key:0,class:"discuss-sidebar"},bE={key:0,class:"discuss-sidebar-inner"},yE=["title"],vE=["title","onClick"],kE={class:"discuss-sidebar-topic-header"},CE={class:"discuss-sidebar-topic-pill"},LE={class:"discuss-sidebar-topic-pill"},wE={class:"discuss-sidebar-topic-pill"},_E={class:"icon"};function EE(e,t,i,s,a,n){const o=(0,c.g2)("GroupHeader"),l=(0,c.g2)("b-loading"),r=(0,c.g2)("DiscussCreateBar"),d=(0,c.g2)("font-awesome-icon"),p=(0,c.g2)("DiscussionNamespace"),h=(0,c.g2)("b-modal"),g=(0,c.g2)("router-link"),f=(0,c.g2)("DiscussionCardComfortable"),b=(0,c.g2)("DiscussionCardCompact"),y=(0,c.g2)("ListFilterPill"),v=(0,c.g2)("ListFilterPillText");return(0,c.uX)(),(0,c.CE)("section",W_,[(0,c.Lk)("div",null,[(0,c.bF)(o,{tab:e.$route.query.category?"namespace_"+e.$route.query.category:"discuss",namespaces:a.discussionCategories},null,8,["tab","namespaces"]),(0,c.Lk)("div",j_,[(0,c.bF)(l,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("div",z_,[(0,c.Lk)("div",q_,[(0,c.Lk)("div",J_,[a.onlyAdminsCanPost&&(e.isGranted("HR_TENANT")||e.isCurrentGroupAdmin)||!a.onlyAdminsCanPost?((0,c.uX)(),(0,c.CE)("div",H_,[n.isCreateButtonVisible&&!e.$isMobile()?((0,c.uX)(),(0,c.Wv)(r,{key:0,"order-by":a.orderBy,"view-mode":a.viewMode,"show-sort-bar":a.items&&a.items.length>0||n.filtersNumber>0,onOpenCreateModal:n.openModal,onOrderChange:n.onSortChange,onViewModeChange:t[1]||(t[1]=e=>n.toggleViewMode())},null,8,["order-by","view-mode","show-sort-bar","onOpenCreateModal","onOrderChange"])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),(0,c.Lk)("div",K_,null,512),e.$isMobile()?((0,c.uX)(),(0,c.CE)("div",{key:1,ref:"stickyControls",class:(0,u.C4)(["discuss-sticky-controls",{"has-shadow":a.isStickyActive}])},[e.$isMobile()&&(a.isGeneralUnit||a.unitId||n.isAggregatedView||a.filters.category)&&(a.discussionCategories.length>0||n.canManageDiscussionCategories)&&!n.isCategoryHotlink?((0,c.uX)(),(0,c.CE)("div",Y_,[(0,c.Lk)("div",Z_,[a.discussionCategories.length>0?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-small is-rounded mr-1",{"is-primary":!a.filters.category,"is-light":a.filters.category}]),onClick:t[2]||(t[2]=e=>n.selectCategory(null))},(0,u.v_)(e.$t("All")),3)):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.discussionCategories,e=>((0,c.uX)(),(0,c.CE)("button",{key:"cat_tab_"+e.id,ref_for:!0,ref:"categoryButtons",class:(0,u.C4)(["button is-small is-rounded mr-1",{"is-primary":a.filters.category&&a.filters.category.id===e.id,"is-light":!a.filters.category||a.filters.category.id!==e.id}]),onClick:t=>n.selectCategory(e,t)},(0,u.v_)(e.name),11,eE))),128)),n.canManageDiscussionCategories?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-small is-rounded is-light",title:e.$t("Manage categories"),onClick:t[3]||(t[3]=e=>a.showDiscussionNamespaceModal=!0)},[(0,c.Lk)("span",iE,[(0,c.bF)(d,{icon:"fa-light fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Add categories")),1)],8,tE)):(0,c.Q3)("",!0)])])):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),(0,c.bF)(h,{modelValue:a.showDiscussionNamespaceModal,"onUpdate:modelValue":t[6]||(t[6]=e=>a.showDiscussionNamespaceModal=e),"has-modal-card":"","trap-focus":"","can-cancel":["escape","outside"]},{default:(0,c.k6)(()=>[(0,c.bF)(p,{onClose:t[4]||(t[4]=e=>a.showDiscussionNamespaceModal=!1),onSave:t[5]||(t[5]=e=>n.loadDiscussionCategories())})]),_:1},8,["modelValue"]),n.isCompact?((0,c.uX)(!0),(0,c.CE)(c.FK,{key:3},(0,c.pI)(a.items,e=>((0,c.uX)(),(0,c.CE)("div",{key:"discussion_compact_"+e.id,class:"grid-cell-1"},[(0,c.bF)(b,{row:e,onOpenDiscussion:n.openDiscussionShow},null,8,["row","onOpenDiscussion"])]))),128)):((0,c.uX)(!0),(0,c.CE)(c.FK,{key:2},(0,c.pI)(a.items,i=>((0,c.uX)(),(0,c.CE)("div",{key:"discussion_card_"+i.id,class:"grid-cell-1"},[(0,c.bF)(f,{row:i,onOpenDiscussion:n.openDiscussionShow,onReact:n.reactToDiscussion},{context:(0,c.k6)(()=>[!a.filters.category&&!a.unitId&&!a.isGeneralUnit||i.namespace&&!n.isCategoryHotlink?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[t[14]||(t[14]=(0,c.Lk)("span",{class:"discuss-card-head-dot"},"·",-1)),a.filters.category||a.unitId||a.isGeneralUnit?i.namespace&&!n.isCategoryHotlink?((0,c.uX)(),(0,c.CE)("span",aE,[i.unit?((0,c.uX)(),(0,c.Wv)(g,{key:0,to:{name:"DiscussList",query:{unit:i.unit.id,category:i.namespace.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(i.namespace.name),1)]),_:2},1032,["to"])):((0,c.uX)(),(0,c.Wv)(g,{key:1,to:{name:"DiscussList",query:{generalUnit:!0,category:i.namespace.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(i.namespace.name),1)]),_:2},1032,["to"]))])):(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("span",sE,[i.unit?((0,c.uX)(),(0,c.Wv)(g,{key:0,to:{name:"DiscussList",query:{unit:i.unit.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(i.unit.name),1)]),_:2},1032,["to"])):((0,c.uX)(),(0,c.Wv)(g,{key:1,to:{name:"DiscussList",query:{generalUnit:!0}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.tenant.name),1)]),_:1}))]))],64)):(0,c.Q3)("",!0)]),"tags-inline":(0,c.k6)(()=>[i.topics.length>0&&n.unitHasTagCollections?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"discuss-card-tags-inline",onClick:t[7]||(t[7]=(0,m.D$)(()=>{},["stop"]))}
1,[(0,c.Lk)("div",nE,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.topics,e=>((0,c.uX)(),(0,c.Wv)(g,{key:e.id,to:{name:"DiscussList",query:{tag:e.name}},class:"discuss-tag-link mr-1"},{default:(0,c.k6)(()=>[(0,c.eW)(" #"+(0,u.v_)(e.name),1)]),_:2},1032,["to"]))),128))])])):(0,c.Q3)("",!0)]),_:2},1032,["row","onOpenDiscussion","onReact"])]))),128)),a.items?.length||!n.isFilteredByCategory||a.isLoading?a.items?.length||a.isLoading||n.isAggregatedView?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",uE,[(0,c.Lk)("div",mE,[(0,c.Lk)("span",pE,[(0,c.bF)(d,{icon:"fa-light fa-comments"})]),(0,c.Lk)("span",hE,(0,u.v_)(e.$t("Be the first to post in this group")),1)])])):((0,c.uX)(),(0,c.CE)("div",oE,[(0,c.Lk)("div",lE,[(0,c.Lk)("span",rE,[(0,c.bF)(d,{icon:"fa-light fa-comments"})]),(0,c.Lk)("span",dE,(0,u.v_)(e.$t("noDiscussionListByCriteria")),1),(0,c.Lk)("span",cE,[(0,c.Lk)("a",{class:"no-discussions-link",onClick:t[8]||(t[8]=e=>n.selectCategory(null))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("View all posts")),1)])])])]))]),n.hasMorePages?((0,c.uX)(),(0,c.CE)("div",gE,[(0,c.bF)(l,{modelValue:a.isLoadingMore,"onUpdate:modelValue":t[9]||(t[9]=e=>a.isLoadingMore=e),"is-full-page":!1},null,8,["modelValue"])],512)):(0,c.Q3)("",!0)]),!e.$isMobile()&&n.showSidebar?((0,c.uX)(),(0,c.CE)("aside",fE,[!n.isCategoryHotlink&&(a.isGeneralUnit||a.unitId||n.isAggregatedView||a.filters.category)&&(a.discussionCategories.length>0||n.canManageDiscussionCategories)?((0,c.uX)(),(0,c.CE)("div",bE,[(0,c.Lk)("div",{class:(0,u.C4)(["discuss-sidebar-item is-clickable",{"is-active":!a.filters.category}]),onClick:t[11]||(t[11]=e=>n.selectCategory(null))},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("All")),1),n.canManageDiscussionCategories?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"discuss-sidebar-cog",title:e.$t("Manage categories"),onClick:t[10]||(t[10]=(0,m.D$)(e=>a.showDiscussionNamespaceModal=!0,["stop"]))},[(0,c.bF)(d,{icon:"fa-light fa-gear"})],8,yE)):(0,c.Q3)("",!0)],2),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.discussionCategories,e=>((0,c.uX)(),(0,c.CE)("div",{key:"sidebar_cat_"+e.id,class:(0,u.C4)(["discuss-sidebar-item is-clickable",{"is-active":a.filters.category&&a.filters.category.id===e.id}]),title:e.name,onClick:t=>n.selectCategory(e)},(0,u.v_)(e.name),11,vE))),128))])):(0,c.Q3)("",!0),n.hasTopicTypes?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)(["discuss-sidebar-inner",{"mt-3":!n.isCategoryHotlink&&a.discussionCategories.length>0}])},[(0,c.Lk)("div",kE,(0,u.v_)(e.$t("filters")),1),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.filters.category.topicTypes,e=>((0,c.uX)(),(0,c.CE)("div",{key:"topic_type_"+e.id,class:"discuss-sidebar-topic-pill"},[(0,c.bF)(y,{label:e.name,options:n.getTopicTypeOptions(e),"model-value":a.namespaceTopicsSelected[e.id]||null,"filter-title":e.name,"onUpdate:modelValue":t=>n.onTopicTypeSelect(e.id,t)},null,8,["label","options","model-value","filter-title","onUpdate:modelValue"])]))),128)),t[15]||(t[15]=(0,c.Lk)("hr",{class:"discuss-sidebar-divider"},null,-1)),(0,c.Lk)("div",CE,[(0,c.bF)(v,{label:e.$t("searchText"),"model-value":a.filters.search,type:"text",placeholder:e.$t("searchText"),"onUpdate:modelValue":n.onSidebarSearchChange},null,8,["label","model-value","placeholder","onUpdate:modelValue"])]),(0,c.Lk)("div",LE,[(0,c.bF)(v,{label:e.$t("Author"),"model-value":a.filters.owner,type:"autocomplete","display-value":a.filters.owner?a.filters.owner.fullName:null,placeholder:e.$t("Author"),"search-results":a.sidebarAuthorResults,"is-searching":a.isSidebarSearchingAuthor,onSearch:n.debouncedSidebarSearchAuthors,"onUpdate:modelValue":n.onSidebarOwnerChange},null,8,["label","model-value","display-value","placeholder","search-results","is-searching","onSearch","onUpdate:modelValue"])]),(0,c.Lk)("div",wE,[(0,c.bF)(v,{label:e.$t("myPosts"),"model-value":a.isMyDiscussionsChecked?e.$t("myPosts"):null,type:"toggle","onUpdate:modelValue":n.onSidebarMyPostsToggle},null,8,["label","model-value","onUpdate:modelValue"])])],2)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)])])]),e.$isMobile()&&n.isCreateButtonVisible&&!e.$store.state.isFormModalVisible&&(a.onlyAdminsCanPost&&(e.isGranted("HR_TENANT")||e.isCurrentGroupAdmin)||!a.onlyAdminsCanPost)?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"discuss-fab",onClick:t[12]||(t[12]=e=>
1n.openModal("text"))},[(0,c.Lk)("span",_E,[(0,c.bF)(d,{icon:"fa-light fa-plus",size:"lg"})])])):(0,c.Q3)("",!0),(0,c.bF)(h,{modelValue:e.$store.state.isFormModalVisible,"onUpdate:modelValue":t[13]||(t[13]=t=>e.$store.state.isFormModalVisible=t),component:a.FormModal,"can-cancel":a.formModalCanCancel,props:{showDiscussionModalPhotosDialog:a.showDiscussionModalPhotosDialog,showDiscussionModalVideosDialog:a.showDiscussionModalVideosDialog,showDiscussionModalFilesDialog:a.showDiscussionModalFilesDialog,itemLoaded:a.itemLoaded,categories:a.discussionCategories,filters:a.filters},"has-modal-card":"","full-screen":e.$isMobile(),events:{},onNewDiscussionPosted:n.getItems},null,8,["modelValue","component","can-cancel","props","full-screen","onNewDiscussionPosted"])])}var $E=i(97278);function FE(e,t,i,s,a,n){const o=(0,c.g2)("ListFilterBar");return(0,c.uX)(),(0,c.Wv)(o,{definitions:n.filterDefinitions,"model-value":n.filterValues,"show-clear":!1,"onUpdate:modelValue":n.onUpdate,onSearch:n.onSearch},null,8,["definitions","model-value","onUpdate:modelValue","onSearch"])}var TE={name:"DiscussFilterBar",components:{ListFilterBar:Eh.A},props:{search:{type:String,default:null},owner:{type:Object,default:null},myPosts:{type:Boolean,default:!1},hideAddFilter:{type:Boolean,default:!1}},emits:["update:search","update:owner","update:myPosts","change"],data(){return{authorSearchResults:[],isSearchingAuthor:!1}},computed:{filterValues(){return{search:this.search,owner:this.owner,myPosts:this.myPosts?this.$t("myPosts"):null}},filterDefinitions(){return[{key:"search",label:this.$t("searchText"),type:"text",icon:"fa-light fa-magnifying-glass",isPrimary:!this.hideAddFilter},{key:"owner",label:this.$t("Author"),type:"autocomplete",icon:"fa-light fa-user",displayValue:this.owner?this.owner.fullName:null,searchResults:this.authorSearchResults,isSearching:this.isSearchingAuthor,isPrimary:!this.hideAddFilter},{key:"myPosts",label:this.$t("myPosts"),type:"toggle",icon:"fa-light fa-user-check",isPrimary:!this.hideAddFilter}]}},methods:{onUpdate(e){e.search!==this.search&&this.$emit("update:search",e.search),e.owner!==this.owner&&this.$emit("update:owner",e.owner);const t=!!e.myPosts;t!==this.myPosts&&this.$emit("update:myPosts",t),this.$emit("change")},onSearch({key:e,term:t}){"owner"===e&&this.debouncedSearchAuthors(t)},debouncedSearchAuthors:qn()(function(e){this.searchAuthors(e)},300),searchAuthors(e){!e||e.length<3?this.authorSearchResults=[]:(this.isSearchingAuthor=!0,this.$http.plain.get("/search-user/"+e).then(e=>{this.authorSearchResults=e.data}).catch(e=>{console.log(e),this.authorSearchResults=[]}).finally(()=>{this.isSearchingAuthor=!1}))}}};const SE=(0,Li.A)(TE,[["render",FE]]);var AE=SE,PE=i(15770),IE=i(50953),ME=i(27089),xE=i(75583),NE=i(33444),UE=i(19328),DE={beforeRouteLeave(e,t,i){if("DiscussShow"===e.name||"DiscussShowOld"===e.name){const e=document.getElementById("oMain");this.$store.state.listValues.discussion.cache={items:this.items,itemsTotal:this.itemsTotal,itemsPageCurrent:this.itemsPageCurrent,scrollTop:e?e.scrollTop:0,cacheKey:this.getCacheKey()},this.$store.state.listValues.discussion.pendingScrollRestore=!0}else this.$store.state.listValues.discussion.cache=null,this.$store.state.listValues.discussion.pendingScrollRestore=!1;i()},data(){return{FormModal:(0,IE.IG)($E.A),items:null,filters:{search:this.$store.state.listValues.discussion.filters.search,isArchived:this.$store.state.listValues.discussion.filters.isArchived,owner:this.$store.state.listValues.discussion.filters.owner,category:this.$store.state.listValues.discussion.filters.category,topic:this.$route.query.tag?[this.$route.query.tag]:[]},itemLoaded:null,unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,isGeneralUnit:this.$route.query.generalUnit,createLinkQuery:{},itemsTotal:null,itemsPerPage:10,itemsPageCurrent:this.$store.state.listValues.discussion.itemsPageCurrent,orderBy:this.$store.state.listValues.discussion.orderBy,isMyDiscussionsChecked:this.$store.state.listValues.discussion.isMyDiscussionsChecked,viewMode:this.$store.state.listValues.discussion.viewMode||"comfortable",isLoading:!1,isLoadingMore:!1,showDiscussionModal:!1,showDiscussionModalPhotosDialog:!1,showDiscussionModalVideosDialog:!1,showDiscussionModalFilesDialog:!1,showDiscussionNamespaceModal:!1,isFilterByCategoryOpen:!1,namespaceTopicsSelected:{},sidebarAuthorResults:[],isSidebarSearchingAuthor:!1,sortField:this.$store.state.listValues.discussion.sortField,sortOrder:this.$store.state.listValues.discussion.sortOrder,defaultSortOrder:this.$store.state.listValues.discussion.sortOrder,formModalCanCancel:["escape","outside"],discussionCategories:[],onlyAdminsCanPost:!1,isStickyActive:!1,stickyObserver:null,infiniteScrollObserver:null,filterByGeneralUnitCategory:!1}},activated(){!0===this.$store.state.refreshCachedKeepAliveList&&(this.$store.state.refreshCachedKeepAliveList=!1,this.getItems()),this.initStickyObserver(),this.setupInfiniteScroll()},deactivated(){this.stickyObserver&&this.stickyObserver.disconnect(),this.infiniteScrollObserver&&this.infiniteScrollObserver.disconnect()},mounted(){this.initStickyObserver();try{let e=localStorage.getItem("discuss_view_mode");e&&["compact","comfortable"].includes(e)&&(this.viewMode=e,this.$store.state.listValues.discussion.viewMode=e)}catch(e){}},beforeUnmount(){this.$store.commit("resetEventSource"),this.stickyObserver&&this.stickyObserver.disconnect(),this.infiniteScrollObserver&&this.infiniteScrollObserver.disconnect()},created(){if(this.$route.query.query&&(this.filters.search=this.$route.query.query,this.$store.state.listValues.discussion.filters.search=this.filters.search),this.$route.query.topic||(this.filters.search=null),this.$store.state.currentGroupTab="discussions",this.onlyAdminsCanPost=this.$store.state.currentGroup?.onlyAdminsCanPost,1===parseInt(this.$route.query.create))return this.showDiscussionModal=!0,this.$store.state.isFormModalVisible=!0,void this.getItems();this.isGeneralUnit||this.unitId||(this.$store.state.currentGroup=null);let e=this.$store.state.currentGroup;this.unitId?this.createLinkQuery={unit:this.unitId}:!e||["generalUnit"].includes(e)||this.isGeneralUnit?"generalUnit"!==e||this.isGeneralUnit||this.$router.push({name:"DiscussList",query:{generalUnit:1}}):this.$router.push({name:"DiscussList",query:{unit:e.id}});const t=this.$store.state.listValues.discussion.cache;if(t&&t.cacheKey===this.getCacheKey())return this.items=t.items,this.itemsTotal=t.itemsTotal,this.itemsPageCurrent=t.itemsPageCurrent,this.loadDiscussionCategories(),this.$nextTick(()=>{this.setupInfiniteScroll(),this.restoreCachedScroll(t.scrollTop||0)}),void this.mercureDiscovery();this.getItems(),this.mercureDiscovery()},computed:{formModalOpen:{get(){return this.$store.state.isFormModalVisible},set(){this.$store.state.isFormModalVisible=!this.$store.state.isFormModalVisible}}
1,...(0,vi.aH)(["isFormModalVisible"]),...(0,vi.L8)(["tenant","user","hasDiscussionToPost","isGranted","isCurrentGroupAdmin"]),canManageDiscussionCategories(){const e=this.$store.state.currentGroup;return this.isGeneralUnit||this.isAggregatedView||"generalUnit"===e||"support"===e||!e||e.isRoleGroup||"RoleGroup"===e["@type"]?this.isGranted("COMMUNICATION_TENANT"):"LocalCenter"===e["@type"]?this.isGranted("COMMUNICATION_LOCAL",e):this.isCurrentGroupAdmin},isAggregatedView(){return!this.unitId&&!this.isGeneralUnit},isCategoryHotlink(){return this.$route.query.category&&this.$route.query.hotlink},isCompact(){return"compact"===this.viewMode},hasAnyActiveFilter(){return!!this.filters.search||!!this.filters.owner||this.isMyDiscussionsChecked||this.filters.topic&&this.filters.topic.length>0},showSidebar(){let e=(this.isGeneralUnit||this.unitId||this.isAggregatedView||this.filters.category)&&!this.isCategoryHotlink,t=e&&this.discussionCategories.length>0,i=e&&this.canManageDiscussionCategories;return t||i||this.hasTopicTypes},hasTopicTypes(){return this.filters.category&&this.filters.category.topicTypes&&this.filters.category.topicTypes.length>0},unitHasTagCollections(){return this.discussionCategories.some(e=>e.topicTypes&&e.topicTypes.length>0)},filtersNumber(){let e=0;return this.filters.search&&e++,this.filters.owner&&e++,this.filters.isArchived&&e++,this.filters.topic&&this.filters.topic.length&&(e+=this.filters.topic.length),this.isMyDiscussionsChecked&&e++,e},isMoreThanOnePage(){return this.itemsPerPage&&this.itemsTotal>this.itemsPerPage},isCreateButtonVisible(){return this.$store.state.currentGroup?!!(!this.isGeneralUnit||this.isGranted(this.tenant.settingFeatures.discussions.whoCanPostPublic)||this.filters.category&&this.filters.category.hasPublicPosting||this.isGranted("COMMUNICATION_TENANT")):this.hasDiscussionToPost||!!this.filters.category?.hasPublicPosting},isFilteredByCategory(){return!!this.$store.state.listValues.discussion.filters.category},hasMorePages(){if(!this.itemsTotal||!this.itemsPerPage)return!1;const e=Math.ceil(this.itemsTotal/this.itemsPerPage);return this.itemsPageCurrent<e}},methods:{...(0,vi.i0)(["openFormModal","closeFormModal"]),mediaSrc:ds.F9,nl2br:ds.HA,linkifyUrls:ds.JP,hasImage(e){return e.mainPost.medias.length>0&&"postimage"===e.mainPost.medias[0].type},hasVideo(e){return e.mainPost.medias.length>0&&"postvideo"===e.mainPost.medias[0].type},hasFile(e){return e.mainPost.medias.length>0&&"postfile"===e.mainPost.medias[0].type},hasEmbed(e){return e.mainPost.embedOpenGraph&&e.mainPost.embedOpenGraph.openGraph},postContent(e){let t=/(https?:\/\/[^\s]+)/g;return e.replace(t,"")},onSortChange(e){this.orderBy=e,this.filterItems()},toggleViewMode(){this.viewMode="comfortable"===this.viewMode?"compact":"comfortable",this.$store.state.listValues.discussion.viewMode=this.viewMode;try{localStorage.setItem("discuss_view_mode",this.viewMode)}catch(e){}},selectCategory(e,t){this.filters.category=e,this.isAggregatedView&&(this.filterByGeneralUnitCategory=!!e),this.resetFilterTopics(),this.filterByCategory(),t&&t.target&&this.$nextTick(()=>{t.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})},onFilterSearch(e){this.filters.search=e},onFilterOwner(e){this.filters.owner=e},onFilterMyPosts(e){this.isMyDiscussionsChecked=e},onSidebarSearchChange(e){this.filters.search=e,this.filterItems()},onSidebarOwnerChange(e){this.filters.owner=e,this.filterItems()},onSidebarMyPostsToggle(e){this.isMyDiscussionsChecked=!!e,this.filterItems()},debouncedSidebarSearchAuthors:qn()(function(e){this.sidebarSearchAuthors(e)},300),sidebarSearchAuthors(e){!e||e.length<3?this.sidebarAuthorResults=[]:(this.isSidebarSearchingAuthor=!0,this.$http.plain.get("/search-user/"+e).then(e=>{this.sidebarAuthorResults=e.data}).catch(e=>{console.log(e),this.sidebarAuthorResults=[]}).finally(()=>{this.isSidebarSearchingAuthor=!1}))},initStickyObserver(){this.$nextTick(()=>{this.$refs.stickySentinel&&"undefined"!==typeof IntersectionObserver&&(this.stickyObserver&&this.stickyObserver.disconnect(),this.stickyObserver=new IntersectionObserver(([e])=>{this.isStickyActive=!e.isIntersecting},{threshold:0}),this.stickyObserver.observe(this.$refs.stickySentinel))})},setupInfiniteScroll(){"undefined"!==typeof IntersectionObserver&&(this.infiniteScrollObserver&&this.infiniteScrollObserver.disconnect(),this.$nextTick(()=>{this.$refs.infiniteScrollSentinel&&(this.infiniteScrollObserver=new IntersectionObserver(([e])=>{e.isIntersecting&&this.hasMorePages&&!this.isLoadingMore&&!this.isLoading&&this.loadMoreItems()},{root:document.getElementById("oMain"),rootMargin:"200px",threshold:0}),this.infiniteScrollObserver.observe(this.$refs.infiniteScrollSentinel))}))},reactToDiscussion(e){let t=!1;if(e.mainPost.myReactions.length>0){t=!0;let i=e.mainPost.myReactions;return e.reactionsCount--,e.mainPost.myReactions=[],void this.$http.plain.delete("/post_user_reactions?post="+e.mainPost.id).then(e=>{}).catch(t=>{this.$buefy.snackbar.open({message:this.$t("error"),type:"is-danger"}),e.mainPost.myReactions=i,e.reactionsCount++})}e.reactionsCount++,e.mainPost.myReactions.push(1),this.$http.plain.post("/post_user_reactions",{post:e.mainPost["@id"],reaction:"/api/v1/reactions/1"}).then(e=>{}).catch(t=>{e.mainPost.myReactions=[],console.error(t)})},loadDiscussionCategories(){let e="";this.isGeneralUnit||this.isAggregatedView?(e+="&tenant="+this.tenant.id,e+="&exists[unit]=false"):this.unitId?e+="&unit="+this.unitId:this.$route.query.category&&(e+="&category="+this.$route.query.category),this.isLoading=!0,this.$http.plain.get("/discussion_namespaces?"+e).then(e=>{if(this.discussionCategories=e.data["hydra:member"],this.$route.query.category){let e=this.discussionCategories.find(e=>e.id===parseInt(this.$route.query.category));void 0!==e&&(this.filters.category=e)}}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},resetFilterTopics(){this.namespaceTopicsSelected={},this.filters.topic=[]},changedFilterNamespaceTopics(){this.filters.topic=[];for(let[,e]of Object.entries(this.namespaceTopicsSelected))e&&this.filters.topic.push(e);this.filterItems()},loadItemModal(e){this.itemLoaded=e,this.showDiscussionModal=!0},getTopicTypeOptions(e){return e.topics?e.topics.map(e=>({value:e.name,label:e.name})):[]}
1,onTopicTypeSelect(e,t){t?this.namespaceTopicsSelected[e]=t:delete this.namespaceTopicsSelected[e],this.changedFilterNamespaceTopics()},formModalUpdate(e){if(e&&this.items){let t=this.items.find(t=>t.id===e.id);if(t){if(t.title=e.title,e.isArchived){let t=this.items.findIndex(t=>t.id===e.id);-1!==t&&this.items.splice(t,1)}}else this.items.unshift(e),this.itemsTotal++}if(this.$route.query.create){let e=Object.assign({},this.$route.query);delete e.create,this.$router.replace({query:e})}},openModal(e){"photos"===e?this.showDiscussionModalPhotosDialog=!0:"videos"===e?this.showDiscussionModalVideosDialog=!0:"files"===e&&(this.showDiscussionModalFilesDialog=!0),this.showDiscussionModal=!0,this.$store.state.isFormModalVisible=!0},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.$store.state.listValues.task.sortField=e,this.$store.state.listValues.task.sortOrder=t,this.$store.state.listValues.task.itemsPageCurrent=1,this.getItems()},filterByCategory(){this.filterItems()},filterByTopic(e){if(!this.filters.topic.includes(e.name)){if(this.filters.topic.push(e.name),e.type){let t=parseInt(e.type.split("/").pop());this.namespaceTopicsSelected[t]=e.name}this.filterItems()}},filterByTopicRemove(e){this.filters.topic=this.filters.topic.filter(t=>t!=e),this.filterItems()},filterItems(){this.itemsPageCurrent=1,this.$store.state.listValues.discussion.itemsPageCurrent=1,this.$store.state.listValues.discussion.isMyDiscussionsChecked=this.isMyDiscussionsChecked,this.$store.state.listValues.discussion.orderBy=this.orderBy,this.$store.state.listValues.discussion.category=this.filters.category,this.$store.state.listValues.discussion.filters.search=this.filters.search,this.$store.state.listValues.discussion.filters.topic=this.filters.topic,this.$store.state.listValues.discussion.filters.owner=this.filters.owner,this.$store.state.listValues.discussion.filters.category=this.filters.category,this.getItems()},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.$store.state.listValues.discussion.itemsPageCurrent=e,this.getItems()},loadMoreItems(){this.itemsPageCurrent++,this.$store.state.listValues.discussion.itemsPageCurrent=this.itemsPageCurrent,this.getItems(!0)},getFiltersQueryString(){let e="";if(this.$route.query.category?e+="&category="+this.$route.query.category:this.filters.category?e+="&category="+this.filters.category.id:this.unitId&&(e+="&unit="+this.unitId),(this.isGeneralUnit||this.filterByGeneralUnitCategory)&&(e+="&exists[unit]=false"),e+="&exists[isSupport]=false",e+="&exists[isIssue]=false",this.filters.isArchived?e+="&exists[isArchived]=true":e+="&exists[isArchived]=false",this.filters.owner&&(e+="&owner="+this.filters.owner.id),this.filters.search&&(e+="&title="+encodeURIComponent(this.filters.search)),this.filters.topic&&this.filters.topic.length)for(let t of this.filters.topic)e+="&topics.name[]="+encodeURIComponent(t);return this.isMyDiscussionsChecked&&(e+="&owner="+this.user.id),e},getOrderQueryString(){let e="";return"maxComments"===this.orderBy?e="&order[postsCount]=DESC":"minComments"===this.orderBy?e="&order[postsCount]=ASC":"new"===this.orderBy?e="&order[mainPost.dateCreated]=DESC":"old"===this.orderBy?e="&order[mainPost.dateCreated]=ASC":"group"===this.orderBy&&(e="&order[unit.name]=ASC"),e},getItems(e=!1){e?this.isLoadingMore=!0:this.isLoading=!0;let t=this.getFiltersQueryString(),i=this.getOrderQueryString();this.unitId!==this.$store.state.listValues.discussion.unitId&&(this.$store.commit("resetListValuesDiscussion"),this.$store.state.listValues.discussion.unitId=this.unitId,this.$store.state.listValues.discussion.isMyDiscussionsChecked=!1,this.itemsPageCurrent=1),this.$http.plain.get("/discussions?page="+this.itemsPageCurrent+t+i).then(t=>{e?this.items=[...this.items,...t.data["hydra:member"]]:(this.items=t.data["hydra:member"],this.loadDiscussionCategories()),this.itemsTotal=t.data["hydra:totalItems"],this.setupInfiniteScroll()}).catch(e=>{console.error(e)}).finally(()=>{e?this.isLoadingMore=!1:this.isLoading=!1})},openDiscussionShow(e){this.$router.push({name:"DiscussShow",params:{item:e.id}})},restoreCachedScroll(e){const t=document.getElementById("oMain");if(!t)return this.$store.state.listValues.discussion.cache=null,void(this.$store.state.listValues.discussion.pendingScrollRestore=!1);let i=null,s=null,a=!1;const n=()=>{a||(a=!0,i&&i.disconnect(),s&&clearTimeout(s),this.$store.state.listValues.discussion.cache=null,this.$store.state.listValues.discussion.pendingScrollRestore=!1)},o=()=>{a||(t.scrollTop=e,t.scrollTop===e&&n())};if(o(),!a){if("undefined"!==typeof ResizeObserver){i=new ResizeObserver(()=>o());const e=t.firstElementChild;e?i.observe(e):i.observe(t)}s=setTimeout(()=>n(),3e3)}},getCacheKey(){return JSON.stringify({unitId:this.unitId,isGeneralUnit:!!this.isGeneralUnit,category:this.filters.category?this.filters.category.id:null,
1search:this.filters.search||null,owner:this.filters.owner?this.filters.owner.id:null,isMyDiscussionsChecked:this.isMyDiscussionsChecked,orderBy:this.orderBy,topic:(this.filters.topic||[]).slice().sort(),isArchived:!!this.filters.isArchived})},updateCanCancel(e){this.formModalCanCancel=e},mercureTopic(){let e=null;return this.unitId?e="group_"+this.unitId:this.isGeneralUnit&&(e="tenant_"+this.tenant.id),e},mercureDiscovery(){if(!1===ki.uW||!1===this.tenant?.settingFeatures?.realtime?.isActive)return;let e=this.mercureTopic();e&&this.$http.plain.get("/mercure-token/"+e).then(e=>{this.mercureSubscribe(e.data)}).catch(e=>console.error(e))},mercureSubscribe(e){}},components:{BDropdownItem:D_.H_,DiscussFilterBar:AE,DiscussionCardComfortable:xE.A,DiscussionCardCompact:NE.A,ListFilterPill:Wu.A,ListFilterPillText:PE.A,FontAwesomeIcon:zs.gc,GroupHeader:vh.A,LogoThumbnail:rc.A,DiscussionNamespace:ME["default"],DiscussCreateBar:UE.A}};const XE=(0,Li.A)(DE,[["render",EE],["__scopeId","data-v-613c8423"]]);var VE=XE;i(29314);const RE={class:"o-maxwidth issue_list"},OE={class:(0,u.C4)({"o-maxwidth":!1})},QE={key:0},BE={class:"group-title-category"},GE={class:"icon is-small"},WE={class:"noGroup"},jE={key:0,class:"group-title-category mt-4"},zE={class:"icon is-small"},qE={class:"level mb-3 is-mobile"},JE={class:"level-left"},HE={class:"level-item ml-2"},KE={class:"icon is-small"},YE={key:0,class:"ml-1"},ZE={class:"icon-text"},e$={class:"icon"},t$={class:"level-right"},i$={key:0,class:"is-hidden-mobile is-size-6-half"},s$={class:"tag is-rounded is-light icon-text"},a$={class:""},n$={key:0},o$={key:1},l$={class:"icon is-small"},r$={class:"icon is-small"},d$={class:"icon is-small"},c$={class:"filtersWrapperIssues p-3"},u$={class:"filters-layout"},m$={class:"filters-assignee-section"},p$={class:"mr-2"},h$={class:"tags-group m-0 ml-2"},g$={class:"filters-type-status-section"},f$={class:"tags-group m-0"},b$=["onClick"],y$={class:"icon is-small"},v$=["onClick"],k$={class:"icon is-small"},C$=["onClick"],L$={class:"icon is-small"},w$=["onClick"],_$={class:"icon is-small"},E$=["onClick"],$$={key:0,class:"ml-1"},F$={class:"icon is-small"},T$={class:"tag is-success is-rounded"},S$={class:"tag is-rounded",style:{"background-color":"#8957e5"}},A$={key:0,class:"mobile-issues-list"},P$=["onClick"],I$={class:"mobile-card-header has-text-grey-light"},M$={class:"mobile-card-id"},x$={class:"mobile-card-title"},N$={class:"mobile-card-tags"},U$=["onClick"],D$=["onClick"],X$=["onClick"],V$={key:5,class:"tag is-rounded is-small",style:{"background-color":"#8957e5"}},R$={class:"mobile-card-footer"},O$={class:"mobile-card-footer-left"},Q$=["onClick"],B$=["onClick"],G$={class:"mobile-card-footer-right"},W$={key:0,class:"mobile-card-comments icon-text"},j$={class:"icon is-small"},z$={class:"mobile-card-date"},q$={key:0,class:"mobile-pagination"},J$={key:1,class:"orgo-table-wrap"},H$={class:"icon is-small"},K$={class:"level-left"},Y$={class:"has-text-grey is-size-7 nowrap"},Z$={key:0,class:"is-size-7 tag is-rounded is-default"},eF={key:0},tF=["onClick"],iF={key:0},sF={key:1},aF={class:"icon is-small"},nF={key:1},oF={key:0,class:"is-flex mt-3"},lF={class:"has-text-grey is-size-7 mr-2 mt-1"},rF=["onClick"],dF={class:"icon is-small"},cF=["onClick"],uF={key:1,class:"icon is-small"},mF={class:"ml-1"},pF={key:0},hF=["onClick"],gF={class:"icon-text"},fF={key:0},bF={class:"icon-text"},yF={key:1},vF={class:"icon-text"},kF={key:0},CF=["onClick"],LF={key:0},wF={key:1},_F={key:2},EF={class:"icon is-small"},$F={class:"tag is-rounded",style:{"background-color":"#8957e5"}},FF={key:1},TF={key:0,class:"icon is-small"},SF={key:2,class:"card p-5 m-2 mt-6"},AF={class:"has-text-weight-semibold has-text-dark mb-4"},PF={class:"has-text-dark"},IF={class:"has-text-dark"},MF={key:3},xF={class:"has-text-dark ml-4 mt-6"},NF={class:"mobile-filter-header"},UF={class:"mobile-filter-title"},DF={class:"mobile-filter-actions"},XF={class:"mobile-filter-content"},VF={class:"mobile-filter-section"},RF={class:"mobile-filter-section-title"},OF={class:"icon is-small"},QF={class:"mobile-filter-section-content"},BF={class:"tag is-rounded is-small",style:{"background-color":"#8957e5"}},GF={class:"mobile-filter-section"},WF={class:"mobile-filter-section-title"},jF={class:"icon is-small"},zF={class:"mobile-filter-section-content"},qF={class:"mobile-assignee-grid"},JF={class:"mobile-assignee-name"},HF=["onClick"],KF={class:"mobile-assignee-name"},YF={class:"mobile-filter-section"},ZF={class:"mobile-filter-section-title"},eT={class:"icon is-small"},tT={class:"mobile-filter-section-content"},iT={class:"mobile-mention-content"},sT={class:"mobile-mention-text"},aT={key:0,class:"mobile-filter-section"},nT={class:"mobile-filter-section-title"},oT={class:"icon is-small"},lT={class:"mobile-filter-section-content"},rT={class:"mobile-modal-container"},dT={class:"mobile-modal-header"},cT={class:"icon"},uT={class:"mobile-modal-title"},mT={class:"mobile-modal-content"},pT=["onClick"],hT={class:"icon-text"},gT={key:0,class:"icon"},fT={class:"mobile-modal-container"},bT={class:"mobile-modal-header"},yT={class:"icon"},vT={class:"mobile-modal-title"},kT={class:"mobile-modal-content"},CT={class:"icon-text"},LT={key:0,class:"icon"},wT=["onClick"],_T={class:"icon-text"},ET={key:0,class:"icon"},$T={class:"mobile-modal-container"},FT={class:"mobile-modal-header"},TT={class:"icon"},ST={class:"mobile-modal-title"},AT={class:"mobile-modal-content"},PT=["onClick"],IT={key:0,class:"icon"},MT={class:"tag is-rounded is-small",style:{"background-color":"#8957e5"}},xT={class:"mobile-modal-container"},NT={class:"mobile-modal-header"},UT={class:"icon"},DT={class:"mobile-modal-title"},XT={class:"mobile-modal-content"},VT=["onClick"],RT={key:0,class:"icon"};function OT(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("GroupHeader"),r=(0,c.g2)("font-awesome-icon"),d=(0,c.g2)("router-link"),p=(0,c.g2)("b-input"),h=(0,c.g2)("b-field"),g=(0,c.g2)("UserSearchDiscussAutocomplete"),f=(0,c.g2)("b-tag"),b=(0,c.g2)("LogoThumbnail"),y=(0,c.g2)("b-tooltip"),v=(0,c.g2)("b-dropdown-item"),k=(0,c.g2)("b-dropdown"),C=(0,c.g2)("b-checkbox"),L=(0,c.g2)("b-pagination"),w=(0,c.g2)("b-table-column"),_=(0,c.g2)("b-table"),E=(0,c.g2)("b-modal"),$=(0,c.g2)("b-radio");return(0,c.uX)(),(0,c.CE)("section",RE,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("div",null,[(0,c.bF)(l,{tab:"issues"}),(0,c.Lk)("div",OE,[a.isSupport||n.hasProjects()||null===a.items?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",QE,[(0,c.Lk)("div",BE,[(0,c.eW)((0,u.v_)(e.$t("projects"))+" ",1),(0,c.bF)(d,{to:{name:"GroupCreate",query:{project:1}},class:"button is-primary is-small is-rounded"},{default:(0,c.k6)(()=>
1[(0,c.Lk)("span",GE,[(0,c.bF)(r,{icon:"fa-light fa-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("new")),1)]),_:1})]),(0,c.Lk)("div",WE,(0,u.v_)(e.$t("noProjectCreateOne")),1),e.isGranted("ADMIN_TENANT")&&e.tenant.settingFeatures.support.isActive?((0,c.uX)(),(0,c.CE)("div",jE,[(0,c.eW)((0,u.v_)(e.$t("support"))+" ",1),(0,c.bF)(d,{to:{name:"IssueList",query:{support:1}},class:"button is-primary is-small is-rounded"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",zE,[(0,c.bF)(r,{icon:"fa-light fa-envelope"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("issues")),1)]),_:1})])):(0,c.Q3)("",!0)])),(0,c.Lk)("div",qE,[(0,c.Lk)("div",JE,[(0,c.Lk)("div",HE,[(0,c.Lk)("button",{class:"button is-small is-primary is-rounded",onClick:t[1]||(t[1]=e=>n.openModal("text"))},[(0,c.Lk)("span",null,(0,u.v_)(a.isSupport?e.$t("createSupport"):e.$t("createIssue")),1)]),e.$isMobile()&&(!a.isSupport||a.isSupport&&n.isUserInSupportTeam)?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-small is-rounded ml-2",{"is-light":n.filtersNumber>0,"is-white":0===n.filtersNumber}]),onClick:t[2]||(t[2]=(...e)=>n.openMobileFilter&&n.openMobileFilter(...e))},[(0,c.Lk)("span",KE,[(0,c.bF)(r,{icon:"fa-light fa-sliders"})]),n.filtersNumber>0?((0,c.uX)(),(0,c.CE)("span",YE,(0,u.v_)(n.filtersNumber),1)):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),e.tenant.settingFeatures.localCenter.isActive&&a.isSupport&&!n.isUserInSupportTeam?((0,c.uX)(),(0,c.Wv)(d,{key:1,to:{name:"LocalCenterChangeForm"},class:"button is-primary is-small is-rounded ml-2 is-outlined"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Request local transfer")),1)]),_:1})):(0,c.Q3)("",!0),a.isFilter&&(!a.isSupport||a.isSupport&&n.isUserInSupportTeam)?((0,c.uX)(),(0,c.Wv)(h,{key:2,class:"mb-0 ml-3 mr-2"},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.filters.search,"onUpdate:modelValue":t[3]||(t[3]=e=>a.filters.search=e),placeholder:e.$t("searchText"),style:{"min-width":"160px"},size:"is-small",rounded:"",expanded:"",onKeyup:n.filterItemsByWord},null,8,["modelValue","placeholder","onKeyup"])]),_:1})):(0,c.Q3)("",!0),a.filters.owner||a.isSupport||e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(g,{key:"UserSearchDiscussAutocomplete",label:e.$t("Author"),"support-team":a.supportTeam,"is-support":a.isSupport,"onUpdate:modelValue":n.filterItemsOwner},null,8,["label","support-team","is-support","onUpdate:modelValue"])),n.filtersNumber>0?((0,c.uX)(),(0,c.CE)("button",{key:4,class:"button is-light is-rounded is-small ml-2",onClick:t[4]||(t[4]=(...e)=>n.removeFilters&&n.removeFilters(...e))},[(0,c.Lk)("span",ZE,[(0,c.Lk)("span",e$,[(0,c.bF)(r,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Reset filters")),1)])])):(0,c.Q3)("",!0)])]),(0,c.Lk)("div",t$,[a.itemsTotal>0?((0,c.uX)(),(0,c.CE)("div",i$,[(0,c.Lk)("span",s$,[(0,c.Lk)("span",a$,(0,u.v_)(a.itemsTotal),1),a.isSupport?((0,c.uX)(),(0,c.CE)("span",n$,(0,u.v_)(e.$t("issues")),1)):((0,c.uX)(),(0,c.CE)("span",o$,(0,u.v_)(e.$t("issues")),1))])])):(0,c.Q3)("",!0),e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:1,class:(0,u.C4)(["button is-small ml-2 is-rounded",{"is-light":a.showCreatedDate,"is-white":!a.showCreatedDate}]),onClick:t[5]||(t[5]=(...e)=>n.toggleAuthorColumn&&n.toggleAuthorColumn(...e))},[(0,c.Lk)("span",l$,[(0,c.bF)(r,{icon:a.showCreatedDate?"fa-light fa-minus":"fa-light fa-plus"},null,8,["icon"])]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("author")),1)],2)),e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:2,class:"button is-white is-small ml-2",onClick:t[6]||(t[6]=(...e)=>n.loadItems&&n.loadItems(...e))},[(0,c.Lk)("span",r$,[(0,c.bF)(r,{icon:"fa-light fa-refresh"})])])),e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("button",{key:3,class:"button is-white is-small ml-2",onClick:t[7]||(t[7]=t=>e.$store.commit("toggleSidebarCollapse"))},[(0,c.Lk)("span",d$,[(0,c.bF)(r,{icon:e.$store.state.hideAppSidebar?"fa-light fa-arrows-minimize":"fa-light fa-arrows-maximize"},null,8,["icon"])])]))])]),(0,c.bo)((0,c.Lk)("div",c$,[(0,c.Lk)("div",u$,[(0,c.Lk)("div",m$,[a.filters.owner?((0,c.uX)(),(0,c.Wv)(h,{key:0,class:"mb-0"},{default:(0,c.k6)(()=>[(0,c.bF)(f,{closable:"",class:"is-small is-rounded is-default",onClose:t[8]||(t[8]=e=>n.filterItemsOwner(null))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",p$,(0,u.v_)(e.$t("owner"))+": "+(0,u.v_)(a.filters.owner.firstName)+" "+(0,u.v_)(a.filters.owner.lastName),1)]),_:1})]),_:1})):(0,c.Q3)("",!0),(0,c.Lk)("div",h$,[(0,c.bF)(y,{label:e.$t("unassigned"),position:"is-bottom"},{default:(0,c.k6)(()=>[(0,c.bF)(b,{item:a.unassigned,class:(0,u.C4)([{filterAssignee:a.filters.assignee?.id===a.unassigned.id},"is-clickable"]),"is-type":"roundSmall",onClick:t[9]||(t[9]=e=>n.filterItemsAssignee(a.unassigned))},null,8,["item","class"])]),_:1},8,["label"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.team,e=>((0,c.uX)(),(0,c.Wv)(y,{key:"member_"+e.id,label:e.fullName,position:"is-bottom"},{default:(0,c.k6)(()=>[(0,c.bF)(b,{item:e,class:(0,u.C4)(["ml-1 is-clickable",{filterAssignee:a.filters.assignee?.id===e.id}]),"is-type":"roundSmall",onClick:t=>n.filterItemsAssignee(e)},null,8,["item","class","onClick"])]),_:2},1032,["label"]))),128)),(0,c.bF)(y,{label:e.user.fullName,class:"ml-3",position:"is-bottom"},{default:(0,c.k6)(()=>[(0,c.bF)(b,{item:e.user,class:(0,u.C4)(["is-clickable",{filterAssignee:a.filters.assignee?.id===e.user.id}]),"is-type":"roundSmall",onClick:n.toggleMentionFilter},null,8,["item","class","onClick"])]),_:1},8,["label"])])]),(0,c.Lk)("div",g$,[(0,c.Lk)("div",f$,[e.$store.state.currentGroup&&"Group"===e.$store.state.currentGroup["@type"]||a.isSupport?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.bF)(k,{modelValue:a.filters.type,"onUpdate:modelValue":[t[10]||(t[10]=e=>a.filters.type=e),n.filterItems],"aria-role":"list",hoverable:"","mobile-modal":!0,"close-on-click":"",position:"is-bottom-left",size:"is-small",rounded:""},{trigger:(0,c.k6)(({active:t,toggle:i})=>[null==a.filters.type?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-rounded is-small is-primary is-passive",onClick:i},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Task type")),1),(0,c.Lk)("span",y$,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],8,b$)):((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-rounded is-small",style:(0,u.Tr)("background-color: "+n.filtersTypeColor+";"),onClick:i},[(0,c.Lk)("span",null,(0,u.v_)(a.filters.type),1),(0,c.Lk)("span",k$,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],12,v$))]),default:(0,c.k6)(()=>[(0,c.bF)(v,{value:null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Task type")),1)]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueTypes,e=>((0,c.uX)(),(0,c.Wv)(v,{key:"type_"+e.id,value:e.name},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"button is-small is-rounded",style:(0,u.Tr)("background-color: "+e.color+";")},(0,u.v_)(e.name),5)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"]),"kanban"!==a.boardType?((0,c.uX)(),(0,c.Wv)(k,{key:0,"aria-role":"list",multiple:"",class:(0,u.C4)(["dropdownStatusFilter ml-auto",e.$isMobile()?"order-last":""]),"mobile-modal":!0,position:"is-bottom-left",size:"is-small"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[a.filters.opened?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-success is-small is-rounded",onClick:i},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("anyOpenStatus")),1),(0,c.Lk)("span",L$,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],8,C$)):a.filters.closed?((0,c.uX)(),(0,c.CE)("button",{key:1,class:"button is-small is-rounded",style:{"background-color":"#8957e5",color:"white"},onClick:i},[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Closed issues")),1),(0,c.Lk)("span",_$,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],8,w$)):((0,c.uX)(),(0,c.CE)("button",{key:2,class:"button is-small is-rounded",onClick:i},[(0,c.Lk)("span",null,[(0,c.eW)((0,u.v_)(a.filters.status[0])+" ",1),a.filters.status.length>1?((0,c.uX)(),(0,c.CE)("span",$$," (+"+(0,u.v_)(a.filters.status.length-1)+") ",1)):(0,c.Q3)("",!0)]),(0,c.Lk)("span",F$,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],8,E$))]),default:(0,c.k6)(()=>[(0,c.bF)(v,{value:null,class:"has-text-success"},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.opened,"onUpdate:modelValue":[t[11]||(t[11]=e=>a.filters.opened=e),n.toggleStatusOpened]},{default:(0,c.k6)(()=>[(0,c.Lk)("span",T$,(0,u.v_)(e.$t("anyOpenStatus")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueStatuses,e=>((0,c.uX)(),(0,c.Wv)(v,{key:"status_"+e.id,value:e},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.status,"onUpdate:modelValue":[t[12]||(t[12]=e=>a.filters.status=e),n.filterItemsStatus],class:"ml-3","native-value":e.name},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.color+";")},(0,u.v_)(e.name),5)]),_:2},1032,["modelValue","native-value","onUpdate:modelValue"])]),_:2},1032,["value"]))),128)),(0,c.bF)(v,{value:"archived",style:{color:"purple"}},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.closed,"onUpdate:modelValue":[t[13]||(t[13]=e=>a.filters.closed=e),n.toggleStatusArchived]},{default:(0,c.k6)(()=>[(0,c.Lk)("span",S$,(0,u.v_)(e.$t("Closed issues")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["class"])):(0,c.Q3)("",!0)],64)):(0,c.Q3)("",!0)])])])],512),[[m.aG,a.isFilter&&(!a.isSupport||a.isSupport&&n.isUserInSupportTeam)&&!e.$isMobile()]]),a.items&&a.items.length>0?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,u.C4)([{"o-issues-list p-1 ":!e.$isMobile()},"mt-4 mb-6"])},[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[14]||(t[14]=e=>a.isLoading=e),"is-full-page":!1}
1,null,8,["modelValue"]),e.$isMobile()?((0,c.uX)(),(0,c.CE)("div",A$,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.items,(t,i)=>((0,c.uX)(),(0,c.CE)("div",{key:"mobile-issue-"+t.id,class:"mobile-issue-card",onClick:i=>e.$router.push({name:"DiscussShow",params:{item:t.id}})},[(0,c.Lk)("div",I$,[(0,c.Lk)("span",M$,(0,u.v_)(t.id),1)]),(0,c.Lk)("h3",x$,(0,u.v_)(t.title),1),(0,c.Lk)("div",N$,[n.editIssuePermission(t)&&t.issueType?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"tag is-rounded is-small is-clickable",style:(0,u.Tr)("background-color: "+t.issueType.color+";"),onClick:(0,m.D$)(e=>n.openMobileTypeModal(t,i),["stop"])},(0,u.v_)(t.issueType.name),13,U$)):!n.editIssuePermission(t)&&t.issueType?((0,c.uX)(),(0,c.CE)("span",{key:1,class:"tag is-rounded is-small",style:(0,u.Tr)("background-color: "+t.issueType.color+";")},(0,u.v_)(t.issueType.name),5)):(0,c.Q3)("",!0),n.editIssuePermission(t)&&t.issueStatus&&!t.isArchived?((0,c.uX)(),(0,c.CE)("span",{key:2,class:"tag is-rounded is-small is-clickable",style:(0,u.Tr)("background-color: "+t.issueStatus.color+";"),onClick:(0,m.D$)(e=>n.openMobileStatusModal(t,i),["stop"])},(0,u.v_)(t.issueStatus.name),13,D$)):n.editIssuePermission(t)||!t.issueStatus||t.isArchived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("span",{key:3,class:"tag is-rounded is-small",style:(0,u.Tr)("background-color: "+t.issueStatus.color+";")},(0,u.v_)(t.issueStatus.name),5)),n.editIssuePermission(t)&&t.isArchived?((0,c.uX)(),(0,c.CE)("span",{key:4,class:"tag is-rounded is-small is-clickable",style:{"background-color":"#8957e5"},onClick:(0,m.D$)(e=>n.openMobileStatusModal(t,i),["stop"])},(0,u.v_)(e.$t("closed")),9,X$)):!n.editIssuePermission(t)&&t.isArchived?((0,c.uX)(),(0,c.CE)("span",V$,(0,u.v_)(e.$t("closed")),1)):(0,c.Q3)("",!0)]),(0,c.Lk)("div",R$,[(0,c.Lk)("div",O$,[t.assignee?((0,c.uX)(),(0,c.Wv)(b,{key:0,item:t.assignee,"is-type":"roundXSmall",onClick:(0,m.D$)(e=>n.openMobileAssigneeModal(t,i),["stop"])},null,8,["item","onClick"])):((0,c.uX)(),(0,c.CE)("span",{key:1,class:"icon is-small mobile-unassigned-icon",onClick:(0,m.D$)(e=>n.openMobileAssigneeModal(t,i),["stop"])},[(0,c.bF)(r,{icon:"fa-light fa-user-circle"})],8,Q$)),n.projectSettings.hasPriority?((0,c.uX)(),(0,c.CE)("button",{key:2,class:"mobile-priority-btn",onClick:(0,m.D$)(e=>n.openMobilePriorityModal(t,i),["stop"])},[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.priority).color))},[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.priority).icon)},null,8,["icon"])],4)],8,B$)):(0,c.Q3)("",!0)]),(0,c.Lk)("div",G$,[t.postsCount>0?((0,c.uX)(),(0,c.CE)("span",W$,[(0,c.Lk)("span",j$,[(0,c.bF)(r,{icon:"fa-light fa-comment"})]),(0,c.Lk)("span",null,(0,u.v_)(t.postsCount),1)])):(0,c.Q3)("",!0),(0,c.Lk)("span",z$,(0,u.v_)(e.$filters.format(t.mainPost.dateCreated)),1)])])],8,P$))),128)),n.isMoreThanOnePage?((0,c.uX)(),(0,c.CE)("div",q$,[(0,c.bF)(L,{modelValue:a.itemsPageCurrent,"onUpdate:modelValue":t[15]||(t[15]=e=>a.itemsPageCurrent=e),total:a.itemsTotal,"per-page":a.itemsPerPage,rounded:!0,size:"is-small",onChange:n.changeListPage},null,8,["modelValue","total","per-page","onChange"])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0),!e.$isMobile()&&"backlog"===a.boardType&&a.items&&a.items.length>0?((0,c.uX)(),(0,c.CE)("div",J$,[(0,c.bF)(_,{"current-page":a.itemsPageCurrent,"onUpdate:currentPage":t[17]||(t[17]=e=>a.itemsPageCurrent=e),data:a.items,narrowed:!1,"mobile-cards":!1,paginated:n.isMoreThanOnePage,"backend-pagination":"",total:a.itemsTotal,"per-page":a.itemsPerPage,scrollable:!1,class:"issuesTable","backend-sorting":"","default-sort-direction":a.defaultSortOrder,"default-sort":[a.sortField,a.sortOrder],draggable:"priority"===a.sortField,"pagination-rounded":"",onPageChange:n.changeListPage,onSort:n.onSort,onDragstart:n.dragstart,onDrop:n.drop,onDragover:n.dragover,onDragleave:n.dragleave,onDblclick:n.handleRowDoubleClick},{default:(0,c.k6)(()=>[(0,c.bF)(w,{label:e.$t(""),width:"20px",visible:"priority"===a.sortField},{default:(0,c.k6)(e=>[(0,c.Lk)("span",H$,[(0,c.bF)(r,{icon:"fa-light fa-bars"})])]),_:1},8,["label","visible"]),(0,c.bF)(w,{visible:a.showCreatedDate&&!e.$isMobile(),width:"1%",label:e.$t("created"),field:"mainPost.dateCreated",sortable:""},{default:(0,c.k6)(t=>[(0,c.Lk)("div",K$,[t.row.mainPost?.owner?((0,c.uX)(),(0,c.Wv)(d,{key:0,to:{name:"UserShow",params:{item:t.row.mainPost.owner.id}}},{default:(0,c.k6)(()=>[((0,c.uX)(),(0,c.Wv)(b,{key:t.row.mainPost.owner.id,item:t.row.mainPost.owner,"
1is-type":"roundXSmall"},null,8,["item"]))]),_:2},1032,["to"])):(0,c.Q3)("",!0),(0,c.Lk)("span",Y$,(0,u.v_)(e.$filters.format(t.row.mainPost?.dateCreated)),1)])]),_:1},8,["visible","label"]),n.projectSettings.hasDueDate&&!a.isSupport?((0,c.uX)(),(0,c.Wv)(w,{key:0,label:e.$t("dueDate"),field:"dueDate",sortable:"",width:"1%"},{default:(0,c.k6)(t=>[t.row.dueDate?((0,c.uX)(),(0,c.CE)("span",Z$,(0,u.v_)(e.$filters.format(t.row.dueDate)),1)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),n.projectSettings.hasTypes&&!e.$isMobile()?((0,c.uX)(),(0,c.Wv)(w,{key:1,label:e.$t("issueType"),field:"issueType.position",sortable:"",width:"1%"},{default:(0,c.k6)(e=>[n.editIssuePermission(e.row)?((0,c.uX)(),(0,c.CE)("div",eF,[(0,c.bF)(k,{"aria-role":"list",hoverable:"",class:"is-rounded","close-on-click":"",position:"is-bottom-right"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[(0,c.Lk)("button",{class:"button is-small is-rounded",style:(0,u.Tr)("background-color: "+(e.row.issueType?e.row.issueType.color:"#eee")+";"),onClick:i},[e.row.issueType?((0,c.uX)(),(0,c.CE)("span",sF,(0,u.v_)(e.row.issueType.name),1)):((0,c.uX)(),(0,c.CE)("span",iF,"...")),(0,c.Lk)("span",aF,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],12,tF)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueTypes,t=>((0,c.uX)(),(0,c.Wv)(v,{key:t.id,value:t,onClick:i=>n.issueSetAction(e.row,"type",t,e.index)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+t.color+";")}," â "+(0,u.v_)(t.name),5)]),_:2},1032,["value","onClick"]))),128))]),_:2},1024)])):((0,c.uX)(),(0,c.CE)("div",nF,[e.row.issueType?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.row.issueType.color+";")},(0,u.v_)(e.row.issueType.name),5)):(0,c.Q3)("",!0)]))]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(w,{label:e.$t("taskName"),field:"mainPost.dateCreated",sortable:"","cell-class":"is-fullwidth",width:"400px"},{default:(0,c.k6)(t=>[(0,c.bF)(d,{class:"titleLink is-size-6-half has-text-weight-semibold",to:{name:"DiscussShow",params:{item:t.row.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(t.row.title),1)]),_:2},1032,["to"]),e.$isMobile()?((0,c.uX)(),(0,c.CE)("div",oF,[t.row.mainPost?.owner?((0,c.uX)(),(0,c.Wv)(d,{key:0,to:{name:"UserShow",params:{item:t.row.mainPost.owner.id}},class:"mr-2"},{default:(0,c.k6)(()=>[((0,c.uX)(),(0,c.Wv)(b,{key:t.row.mainPost.owner.id,item:t.row.mainPost.owner,"is-type":"roundXSmall"},null,8,["item"]))]),_:2},1032,["to"])):(0,c.Q3)("",!0),(0,c.Lk)("span",lF,(0,u.v_)(e.$filters.format(t.row.mainPost?.dateCreated)),1),t.row.issueType?((0,c.uX)(),(0,c.CE)("span",{key:1,class:"tag is-rounded",style:(0,u.Tr)("background-color: "+t.row.issueType.color+";")},(0,u.v_)(t.row.issueType.name),5)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(w,{"cell-class":"nowrap",width:"1%"},{default:(0,c.k6)(e=>[n.editIssuePermission(e.row)?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"taskTitle editIssueIcon button is-light is-small is-rounded",onClick:t=>n.loadItemModal(e.row)},[(0,c.Lk)("span",dF,[(0,c.bF)(r,{icon:"fa-light fa-pencil-alt"})])],8,rF)):(0,c.Q3)("",!0)]),_:1}),(0,c.bF)(w,{label:e.$t("assignee"),width:"160px",field:"assignee.firstName",sortable:"","cell-class":"nowrap"},{default:(0,c.k6)(i=>[n.editIssuePermission(i.row)&&a.isIssueAssigneeEdit===i.row.id&&a.items[i.index]?((0,c.uX)(),(0,c.Wv)(g,{key:0,ref:"assigneeSearch"+i.row.id,modelValue:a.items[i.index].assignee,"onUpdate:modelValue":[e=>a.items[i.index].assignee=e,e=>n.issueSetAction(i.row,"assignee",e)],label:i.row.assignee?i.row.assignee.fullName:e.$t("unassigned"),"is-assignee":!0,"focus-on-load":!0,"support-team":a.supportTeam,"is-support":a.isSupport,onBlur:t[16]||(t[16]=e=>a.isIssueAssigneeEdit=null)},null,8,["modelValue","onUpdate:modelValue","label","support-team","is-support"])):(0,c.Q3)("",!0),a.isIssueAssigneeEdit!==i.row.id?((0,c.uX)(),(0,c.CE)("div",{key:1,class:"assignneColumn p-1",onClick:e=>n.editIssuePermission(i.row)?n.isIssueAssigneeEditOpen(i.row.id):null},[i.row.assignee?((0,c.uX)(),(0,c.Wv)(b,{key:i.row.assignee.id,item:i.row.assignee,"is-type":"roundXSmall"},null,8,["item"])):((0,c.uX)(),(0,c.CE)("span",uF,[(0,c.bF)(r,{icon:"fa-light fa-user-circle"})])),(0,c.Lk)("span",mF,(0,u.v_)(i.row.assignee?.["@id"]?i.row.assignee.firstName+" "+i.row.assignee.lastName[0]+".":e.$t("unassigned")),1)],8,cF)):(0,c.Q3)("",!0)]),_:1},8,["label"]),n.projectSettings.hasPriority?((0,c.uX)(),(0,c.Wv)(w,{key:2,label:e.$t("priority").slice(0,1)+".",field:"priority",width:"1%",sortable:""},{default:(0,c.k6)(t=>[n.editIssuePermission(t.row)&&a.items[t.index]?((0,c.uX)(),(0,c.CE)("div",pF,[(0,c.bF)(k,{modelValue:a.items[t.index].priority,"onUpdate:modelValue":[e=>a.items[t.index].priority=e,e=>n.issueSetAction(t.row,"priority",t.row.priority)],"close-on-click":"",hoverable:"","aria-role":"list",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:i,toggle:s})=>[(0,c.Lk)("button",{class:"button is-small is-rounded is-white",onClick:s},[(0,c.Lk)("span",gF,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.row.priority)?.color))},[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.row.priority)?.icon)},null,8,["icon"])],4),t.row.priority?((0,c.uX)(),(0,c.CE)("span",fF,(0,u.v_)(e.$t(e.$store.state.issuePrioritiesData.find(e=>
1e.id===t.row.priority)?.text)),1)):(0,c.Q3)("",!0)])],8,hF)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.$store.state.issuePrioritiesData,t=>((0,c.uX)(),(0,c.Wv)(v,{key:"priority_"+t.id,value:t.id},{default:(0,c.k6)(()=>[(0,c.Lk)("span",bF,[(0,c.Lk)("span",{class:"mr-3 is-small",style:(0,u.Tr)("color: "+t.color)},[(0,c.bF)(r,{icon:"fa-light "+t.icon},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(t.text)),1)])]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])])):t.row.priority?((0,c.uX)(),(0,c.CE)("div",yF,[(0,c.Lk)("span",vF,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.row.priority)?.color))},[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.row.priority)?.icon)},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===t.row.priority)?.text)),1)])])):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(w,{label:e.$t("status"),field:"issueStatus.position",width:"1%",sortable:""},{default:(0,c.k6)(t=>[n.editIssuePermission(t.row)?((0,c.uX)(),(0,c.CE)("div",kF,[(0,c.bF)(k,{"aria-role":"list",hoverable:"",class:"is-rounded","close-on-click":"",position:"is-bottom-right"},{trigger:(0,c.k6)(({active:i,toggle:s})=>[(0,c.Lk)("button",{class:"button is-small is-rounded",style:(0,u.Tr)("background-color: "+(t.row.issueStatus?t.row.issueStatus.color:t.row.isArchived?"#8957E5":"#eee")+";"),onClick:s},[t.row.isArchived?((0,c.uX)(),(0,c.CE)("span",LF,(0,u.v_)(e.$t("closed")),1)):t.row.issueStatus?((0,c.uX)(),(0,c.CE)("span",_F,(0,u.v_)(t.row.issueStatus.name),1)):((0,c.uX)(),(0,c.CE)("span",wF,"...")),(0,c.Lk)("span",EF,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],12,CF)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueStatuses,e=>((0,c.uX)(),(0,c.Wv)(v,{key:e,value:e,onClick:i=>n.issueSetAction(t.row,"status",e,t.index)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.color+";")}," â "+(0,u.v_)(e.name),5)]),_:2},1032,["value","onClick"]))),128)),t.row.isArchived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(v,{key:0,value:"archive",onClick:e=>n.issueSetAction(t.row,"status","archive",t.index)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",$F," â "+(0,u.v_)(e.$t("Close issue")),1)]),_:1},8,["onClick"]))]),_:2},1024)])):((0,c.uX)(),(0,c.CE)("div",FF,(0,u.v_)(t.row.issueStatus?t.row.issueStatus.name:""),1))]),_:1},8,["label"]),(0,c.bF)(w,{"cell-class":"nowrap",width:"1%"},{default:(0,c.k6)(e=>[a.isLoadingIssueUpdate===e.row.id?((0,c.uX)(),(0,c.CE)("span",TF,[(0,c.bF)(r,{icon:"fa-light fa-circle-notch"})])):(0,c.Q3)("",!0)]),_:1})]),_:1},8,["current-page","data","paginated","total","per-page","default-sort-direction","default-sort","draggable","onPageChange","onSort","onDragstart","onDrop","onDragover","onDragleave","onDblclick"])])):(0,c.Q3)("",!0)],2)):a.items&&0===a.items.length&&!n.filtersNumber&&a.isSupport?((0,c.uX)(),(0,c.CE)("div",SF,[(0,c.Lk)("p",AF,(0,u.v_)(e.$t("Welcome to our Community Help Desk"))+" ð",1),(0,c.Lk)("p",PF,(0,u.v_)(e.$t("No requests yet"))+".",1),(0,c.Lk)("p",IF,(0,u.v_)(e.$t("If you have any questions or issues, please post a new one, and our team will assist you promptly.")),1)])):(0,c.Q3)("",!0),a.items&&0===a.items.length&&n.filtersNumber>0?((0,c.uX)(),(0,c.CE)("div",MF,[(0,c.Lk)("p",xF,(0,u.v_)(e.$t("noDiscussionListByCriteria"))+".",1)])):(0,c.Q3)("",!0)])]),(0,c.bF)(E,{modelValue:e.$store.state.isFormModalVisible,"onUpdate:modelValue":t[18]||(t[18]=t=>e.$store.state.isFormModalVisible=t),component:a.FormModal,"can-cancel":a.formModalCanCancel,width:1200,props:{showDiscussionModalPhotosDialog:a.showDiscussionModalPhotosDialog,showDiscussionModalVideosDialog:a.showDiscussionModalVideosDialog,showDiscussionModalFilesDialog:a.showDiscussionModalFilesDialog,isSupport:a.isSupport,supportTeam:a.supportTeam,itemLoaded:a.itemLoaded,projectSettings:n.projectSettings,issueStatuses:a.issueStatuses,issueTypes:a.issueTypes},"has-modal-card":"",events:{},style:{"z-index":"10000"},onNewDiscussionPosted:n.loadItems},null,8,["modelValue","component","can-cancel","props","onNewDiscussionPosted"]),(0,c.bF)(E,{modelValue:a.closeAndCommentMod
1alVisible,"onUpdate:modelValue":t[19]||(t[19]=e=>a.closeAndCommentModalVisible=e),component:n.CloseAndComment,"can-cancel":!0,props:{item:a.closeAndCommentModal,save:n.issueSetAction},"has-modal-card":"",events:{},style:{"z-index":"10000"},onCancelComment:n.cancelCloseComment},null,8,["modelValue","component","props","onCancelComment"]),(0,c.bF)(m.eB,{name:"slide-up"},{default:(0,c.k6)(()=>[a.mobileFilterVisible&&e.$isMobile()?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"mobile-filter-overlay",onClick:t[34]||(t[34]=(...e)=>n.closeMobileFilter&&n.closeMobileFilter(...e))},[(0,c.Lk)("div",{class:"mobile-filter-sheet",onClick:t[33]||(t[33]=(0,m.D$)(()=>{},["stop"]))},[(0,c.Lk)("div",NF,[(0,c.Lk)("h3",UF,(0,u.v_)(e.$t("Filters")),1),(0,c.Lk)("div",DF,[(0,c.Lk)("button",{class:"button is-text is-small",onClick:t[20]||(t[20]=(...e)=>n.removeFilters&&n.removeFilters(...e))},(0,u.v_)(e.$t("Reset")),1),(0,c.Lk)("button",{class:"button is-primary is-small is-rounded",onClick:t[21]||(t[21]=(...e)=>n.closeMobileFilter&&n.closeMobileFilter(...e))},(0,u.v_)(e.$t("Done")),1)])]),(0,c.Lk)("div",XF,[(0,c.Lk)("div",VF,[(0,c.Lk)("div",{class:"mobile-filter-section-header",onClick:t[22]||(t[22]=e=>n.toggleFilterSection("status"))},[(0,c.Lk)("span",RF,(0,u.v_)(e.$t("status")),1),(0,c.Lk)("span",OF,[(0,c.bF)(r,{icon:a.filterSectionExpanded.status?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),(0,c.bo)((0,c.Lk)("div",QF,[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.opened,"onUpdate:modelValue":[t[23]||(t[23]=e=>a.filters.opened=e),n.toggleStatusOpened]},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("anyOpenStatus")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueStatuses,e=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-status-"+e.id},{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.status,"onUpdate:modelValue":[t[24]||(t[24]=e=>a.filters.status=e),n.filterItemsStatus],"native-value":e.name},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded is-small",style:(0,u.Tr)("background-color: "+e.color+";")},(0,u.v_)(e.name),5)]),_:2},1032,["modelValue","native-value","onUpdate:modelValue"])]),_:2},1024))),128)),(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)(C,{modelValue:a.filters.closed,"onUpdate:modelValue":[t[25]||(t[25]=e=>a.filters.closed=e),n.toggleStatusArchived]},{default:(0,c.k6)(()=>[(0,c.Lk)("span",BF,(0,u.v_)(e.$t("Closed issues")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})],512),[[m.aG,a.filterSectionExpanded.status]])]),(0,c.Lk)("div",GF,[(0,c.Lk)("div",{class:"mobile-filter-section-header",onClick:t[26]||(t[26]=e=>n.toggleFilterSection("assignee"))},[(0,c.Lk)("span",WF,(0,u.v_)(e.$t("assignee")),1),(0,c.Lk)("span",jF,[(0,c.bF)(r,{icon:a.filterSectionExpanded.assignee?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),(0,c.bo)((0,c.Lk)("div",zF,[(0,c.Lk)("div",qF,[(0,c.Lk)("div",{class:(0,u.C4)(["mobile-assignee-item",{active:a.filters.assignee?.id===a.unassigned.id}
1]),onClick:t[27]||(t[27]=e=>n.filterItemsAssignee(a.unassigned))},[(0,c.bF)(b,{item:a.unassigned,"is-type":"roundSmall"},null,8,["item"]),(0,c.Lk)("span",JF,(0,u.v_)(e.$t("unassigned")),1)],2),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.team,e=>((0,c.uX)(),(0,c.CE)("div",{key:"mobile-team-"+e.id,class:(0,u.C4)(["mobile-assignee-item",{active:a.filters.assignee?.id===e.id}]),onClick:t=>n.filterItemsAssignee(e)},[(0,c.bF)(b,{item:e,"is-type":"roundSmall"},null,8,["item"]),(0,c.Lk)("span",KF,(0,u.v_)(e.firstName),1)],10,HF))),128))])],512),[[m.aG,a.filterSectionExpanded.assignee]])]),(0,c.Lk)("div",YF,[(0,c.Lk)("div",{class:"mobile-filter-section-header",onClick:t[28]||(t[28]=e=>n.toggleFilterSection("mention"))},[(0,c.Lk)("span",ZF,(0,u.v_)(e.$t("My issues")),1),(0,c.Lk)("span",eT,[(0,c.bF)(r,{icon:a.filterSectionExpanded.mention?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),(0,c.bo)((0,c.Lk)("div",tT,[(0,c.Lk)("div",{class:"mobile-mention-item",onClick:t[29]||(t[29]=(...e)=>n.toggleMentionFilter&&n.toggleMentionFilter(...e))},[(0,c.Lk)("div",iT,[(0,c.bF)(b,{item:e.user,"is-type":"roundSmall"},null,8,["item"]),(0,c.Lk)("span",sT,(0,u.v_)(e.$t("My issues")),1)]),(0,c.bF)(C,{"model-value":a.filters.assignee?.id===e.user.id,"onUpdate:modelValue":n.toggleMentionFilter},null,8,["model-value","onUpdate:modelValue"])])],512),[[m.aG,a.filterSectionExpanded.mention]])]),e.$store.state.currentGroup&&"Group"===e.$store.state.currentGroup["@type"]||a.isSupport?((0,c.uX)(),(0,c.CE)("div",aT,[(0,c.Lk)("div",{class:"mobile-filter-section-header",onClick:t[30]||(t[30]=e=>n.toggleFilterSection("type"))},[(0,c.Lk)("span",nT,(0,u.v_)(e.$t("Task type")),1),(0,c.Lk)("span",oT,[(0,c.bF)(r,{icon:a.filterSectionExpanded.type?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),(0,c.bo)((0,c.Lk)("div",lT,[(0,c.bF)(h,null,{default:(0,c.k6)(()=>[(0,c.bF)($,{modelValue:a.filters.type,"onUpdate:modelValue":[t[31]||(t[31]=e=>a.filters.type=e),n.filterItems],"native-value":null},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All types")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1}),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueTypes,e=>((0,c.uX)(),(0,c.Wv)(h,{key:"mobile-type-"+e.id},{default:(0,c.k6)(()=>[(0,c.bF)($,{modelValue:a.filters.type,"onUpdate:modelValue":[t[32]||(t[32]=e=>a.filters.type=e),n.filterItems],"native-value":e.name},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded is-small",style:(0,u.Tr)("background-color: "+e.color+";")},(0,u.v_)(e.name),5)]),_:2},1032,["modelValue","native-value","onUpdate:modelValue"])]),_:2},1024))),128))],512),[[m.aG,a.filterSectionExpanded.type]])])):(0,c.Q3)("",!0)])])])):(0,c.Q3)("",!0)]),_:1}),(0,c.bF)(E,{modelValue:a.mobilePriorityModalVisible,"onUpdate:modelValue":t[36]||(t[36]=e=>a.mobilePriorityModalVisible=e),"can-cancel":["escape","outside"],"full-screen":e.$isMobile(),width:e.$isMobile()?"100%":640},{default:(0,c.k6)(()=>[(0,c.Lk)("div",rT,[(0,c.Lk)("div",dT,[(0,c.Lk)("button",{class:"button is-text",onClick:t[35]||(t[35]=e=>a.mobilePriorityModalVisible=!1)},[(0,c.Lk)("span",cT,[(0,c.bF)(r,{icon:"fa-light fa-xmark"})])]),(0,c.Lk)("h3",uT,(0,u.v_)(e.$t("priority")),1),t[45]||(t[45]=(0,c.Lk)("div",{style:{width:"40px"}},null,-1))]),(0,c.Lk)("div",mT,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.$store.state.issuePrioritiesData,t=>((0,c.uX)(),(0,c.CE)("div",{key:"mobile-priority-"+t.id,class:(0,u.C4)(["mobile-modal-item",{active:a.mobilePriorityItem&&a.mobilePriorityItem.priority===t.id}]),onClick:e=>n.selectMobilePriority(t.id)},[(0,c.Lk)("span",hT,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+t.color)},[(0,c.bF)(r,{icon:"fa-light "+t.icon},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(t.text)),1)]),a.mobilePriorityItem&&a.mobilePriorityItem.priority===t.id?((0,c.uX)(),(0,c.CE)("span",gT,[(0,c.bF)(r,{icon:"fa-light fa-check"})])):(0,c.Q3)("",!0)],10,pT))),128))])])]),_:1},8,["modelValue","full-screen","width"]),(0,c.bF)(E,{modelValue:a.mobileAssigneeModalVisible,"onUpdate:modelValue":t[39]||(t[39]=e=>a.mobileAssigneeModalVisible=e),"can-cancel":["escape","outside"],"full-screen":e.$isMobile(),width:e.$isMobile()?"100%":640},{default:(0,c.k6)(()=>[(0,c.Lk)("div",fT,[(0,c.Lk)("div",bT,[(0,c.Lk)("button",{class:"button is-text",onClick:t[37]||(t[37]=e=>a.mobileAssigneeModalVisible=!1)},[(0,c.Lk)("span",yT,[(0,c.bF)(r,{icon:"fa-light fa-xmark"})])]),(0,c.Lk)("h3",vT,(0,u.v_)(e.$t("assignee")),1),t[46]||(t[46]=(0,c.Lk)("div",{style:{width:"40px"}},null,-1))]),(0,c.Lk)("div",kT,[(0,c.Lk)("div",{class:(0,u.C4)(["mobile-modal-item",{active:a.mobileAssigneeItem&&!a.mobileAssigneeItem.assignee}]),onClick:t[38]||(t[38]=e=>n.selectMobileAssignee(null))},[(0,c.Lk)("span",CT,[(0,c.bF)(b,{item:a.unassigned,"is-type":"roundXSmall"},null,8,["item"]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("unassigned")),1)]),a.mobileAssigneeItem&&!a.mobileAssigneeItem.assignee?((0,c.uX)(),(0,c.CE)("span",LT,[(0,c.bF)(r,{icon:"fa-light fa-check"})])):(0,c.Q3)("",!0)],2),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.team,e=>((0,c.uX)(),(0,c.CE)("div",{key:"mobile-assignee-"+e.id,class:(0,u.C4)(["mobile-modal-item",{active:a.mobileAssigneeItem&&a.mobileAssigneeItem.assignee?.id===e.id}]),onClick:t=>n.selectMobileAssignee(e)},[(0,c.Lk)("span",_T,[(0,c.bF)(b,{item:e,"is-type":"roundXSmall"},null,8,["item"]),(0,c.Lk)("span",null,(0,u.v_)(e.fullName),1)]),a.mobileAssigneeItem&&a.mobileAssigneeItem.assignee?.id===e.id?((0,c.uX)(),(0,c.CE)("span",ET,[(0,c.bF)(r,{icon:"fa-light fa-check"})])):(0,c.Q3)("",!0)],10,wT))),128))])])]),_:1},8,["modelValue","full-screen","width"]),(0,c.bF)(E,{modelValue:a.mobileStatusModalVisible,"onUpdate:modelValue":t[42]||(t[42]=e=>a.mobileStatusModalVisible=e),"can-cancel":["escape","outside"],"full-screen":e.$isMobile(),width:e.$isMobile()?"100%":640},{default:(0,c.k6)(()=>[(0,c.Lk)("div",$T,[(0,c.Lk)("div",FT,[(0,c.Lk)("button",{class:"button is-text",onClick:t[40]||(t[40]=e=>a.mobileStatusModalVisible=!1)},[(0,c.Lk)("span",TT,[(0,c.bF)(r,{icon:"fa-light fa-xmark"})])]),(0,c.Lk)("h3",ST,(0,u.v_)(e.$t("status")),1),t[47]||(t[47]=(0,c.Lk)("div",{style:{width:"40px"}},null,-1))]),(0,c.Lk)("div",AT,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueStatuses,e=>((0,c.uX)(),(0,c.CE)("div",{key:"mobile-status-modal-"+e.id,class:(0,u.C4)(["mobile-modal-item",{active:a.mobileStatusItem&&a.mobileStatusItem.issueStatus?.id===e.id}]),onClick:t=>n.selectMobileStatus(e)},[(0,c.Lk)("span",{class:"tag is-rounded is-small",style:(0,u.Tr)("background-color: "+e.color+";")},(0,u.v_)(e.name),5),a.mobileStatusItem&&a.mobileStatusItem.issueStatus?.id===e.id?((0,c.uX)(),(0,c.CE)("span",IT,[(0,c.bF)(r,{icon:"fa-light fa-check"})])):(0,c.Q3)("",!0)],10,PT))),128)),a.mobileStatusItem&&!a.mobileStatusItem.isArchived?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"mobile-modal-item",onClick:t[41]||(t[41]=e=>n.selectMobileStatus("archive"))},[(0,c.Lk)("span",MT,(0,u.v_)(e.$t("Close issue")),1)])):(0,c.Q3)("",!0)])])]),_:1},8,["modelValue","full-screen","width"]),(0,c.bF)(E,{modelValue:a.mobileTypeModalVisible,"onUpdate:modelValue":t[44]||(t[44]=e=>a.mobileTypeModalVisible=e),"can-cancel":["escape","outside"],"full-screen":e.$isMobile(),width:e.$isMobile()?"100%":640},{default:(0,c.k6)(()=>[(0,c.Lk)("div",xT,[(0,c.Lk)("div",NT,[(0,c.Lk)("button",{class:"button is-text",onClick:t[43]||(t[43]=e=>a.mobileTypeModalVisible=!1)},[(0,c.Lk)("span",UT,[(0,c.bF)(r,{icon:"fa-light fa-xmark"})])]),(0,c.Lk)("h3",DT,(0,u.v_)(e.$t("issueType")),1),t[48]||(t[48]=(0,c.Lk)("div",{style:{width:"40px"}},null,-1))]),(0,c.Lk)("div",XT,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueTypes,e=>((0,c.uX)(),(0,c.CE)("div",{key:"mobile-type-modal-"+e.id,class:(0,u.C4)(["mobile-modal-item",{active:a.mobileTypeItem&&a.mobileTypeItem.issueType?.id===e.id}]),onClick:t=>n.selectMobileType(e)},[(0,c.Lk)("span",{class:"tag is-rounded is-small",style:(0,u.Tr)("background-color: "+e.color+";")},(0,u.v_)(e.name),5),a.mobileTypeItem&&a.mobileTypeItem.issueType?.id===e.id?((0,c.uX)(),(0,c.CE)("span",RT,[(0,c.bF)(r,{icon:"fa-light fa-check"})])):(0,c.Q3)("",!0)],10,VT))),128))])])]),_:1},8,["modelValue","full-screen","width"])])}var QT=i(299);const BT={class:"issue-field-row mb-5"},GT={class:"issue-field-label"},WT={class:"issue-field-value"},jT=["onClick"],zT={key:0},qT={key:1},JT={key:2},HT={class:"issue-field-row mb-5"},KT={class:"issue-field-label"},YT={class:"issue-field-value"},ZT={key:0,class:"issue-field-row mb-5"},eS={class:"issue-field-label"},tS={class:"issue-field-value"},iS=["onClick"],sS={class:"icon-text"},aS={class:"issue-field-row mb-5"},nS={class:"issue-field-label"},oS={class:"issue-field-value"},lS=["onClick"],rS={key:0},dS={key:1},cS={key:2},uS={key:3},mS={class:"tag is-rounded",style:{"background-color":"#8957e5",color:"white !important"}},pS={key:1,class:"issue-field-row mb-5"},hS={class:"issue-field-label"},gS={class:"issue-field-value"};function fS(e,t,i,s,a,n){const o=(0,c.g2)("font-awesome-icon"),l=(0,c.g2)("router-link"),r=(0,c.g2)("b-dropdown-item"),d=(0,c.g2)("b-dropdown"),m=(0,c.g2)("b-tag"),p=(0,c.g2)("UserSearchDiscussAutocomplete"),h=(0,c.g2)("b-datepicker"),g=(0,c.g2)("BaseFormModal");return(0,c.uX)(),(0,c.Wv)(g,{ref:"baseModal","item-loaded":i.itemLoaded,"show-discussion-modal-photos-dialog":i.showDiscussionModalPhotosDialog,"show-discussion-modal-videos-dialog":i.showDiscussionModalVideosDialog,"show-discussion-modal-files-dialog":i.showDiscussionModalFilesDialog,"title-placeholder":n.titlePlaceholder,"default-title":n.modalTitle,"save-button-text":n.saveButtonText,"use-two-columns":!0,onSave:n.saveIssue,onTitleChanged:n.onTitleChanged,onInlineMentionsChanged:n.onTypedMentionsChanged,onInlineContactMentionsChanged:n.onTypedContactMentionsChanged},{"additional-fields":(0,c.k6)(()=>[(0,c.Lk)("div",BT,[(0,c.Lk)("div",GT,[(0,c.eW)((0,u.v_)(e.$t(i.isSupport?"Request type":"Type"))+" ",1),i.isSupport||e.$isMobile()?e.isGranted("ROLE_ADMIN_TENANT")&&!e.$isMobile()?((0,c.uX)(),(0,c.Wv)(l,{key:1,to:{name:"TenantSupport"},class:"is-size-6 ml-2 pencil-icon"},{default:(0,c.k6)(()=>[(0,c.bF)(o,{icon:"fa-light fa-pencil"})]),_:1})):(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(l,{key:0,to:{name:"GroupUpdate",params:{item:e.$store.state.currentGroup.id}},class:"is-size-6 ml-2 pencil-icon"},{default:(0,c.k6)(()=>[(0,c.bF)(o,{icon:"fa-light fa-pencil"})]),_:1},8,["to"]))]),(0,c.Lk)("div",WT,[(0,c.bF)(d,{modelValue:a.itemIssueType,"onUpdate:modelValue":t[0]||(t[0]=e=>a.itemIssueType=e),"aria-role":"list",hoverable:"","close-on-click":"",position:"is-bottom-left",scrollable:"",expanded:"","max-height":300},{trigger:(0,c.k6)(({active:e,toggle:t})=>[(0,c.Lk)("button",{class:"button is-small is-rounded is-fullwidth",style:(0,u.Tr)("background-color: "+(a.itemIssueType?a.itemIssueType.color:"gold")+";color:black;"),onClick:t},[a.item.id&&!a.itemIssueType?((0,c.uX)(),(0,c.CE)("span",zT,"...")):(0,c.Q3)("",!0),a.itemIssueType?((0,c.uX)(),(0,c.CE)("span",qT,(0,u.v_)(a.itemIssueType.name),1)):(0,c.Q3)("",!0),!a.item.id&&i.issueTypes.length>0&&!a.itemIssueType?((0,c.uX)(),(0,c.CE)("span",JT,(0,u.v_)(i.issueTypes[0].name),1)):(0,c.Q3)("",!0)],12,jT)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.issueTypes,e=>((0,c.uX)(),(0,c.Wv)(r,{key:e.id,value:e},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.color+";
1color:black;")},(0,u.v_)(e.name),5)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),a.item.isIssue&&!a.item.isSupport||a.item.isSupport&&e.isGranted("HR_TENANT")&&a.item.id?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("div",HT,[(0,c.Lk)("div",KT,(0,u.v_)(e.$t("Assignee")),1),(0,c.Lk)("div",YT,[a.itemIssueAssignee?((0,c.uX)(),(0,c.Wv)(m,{key:0,closable:"",class:"is-rounded is-medium is-default",onClose:t[1]||(t[1]=e=>n.addAssignee(null))},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(a.itemIssueAssignee.firstName)+" "+(0,u.v_)(a.itemIssueAssignee.lastName),1)]),_:1})):(0,c.Q3)("",!0),a.itemIssueAssignee||!(i.isSupport&&i.supportTeam.length>0)&&i.isSupport?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(p,{key:1,"is-support":i.isSupport,"is-assignee":!0,"support-team":i.supportTeam,"item-loaded":i.itemLoaded,icon:"fa-crown","onUpdate:modelValue":n.addAssignee},null,8,["is-support","support-team","item-loaded","onUpdate:modelValue"]))])]),i.projectSettings.hasPriority?((0,c.uX)(),(0,c.CE)("div",ZT,[(0,c.Lk)("div",eS,(0,u.v_)(e.$t("Priority")),1),(0,c.Lk)("div",tS,[(0,c.bF)(d,{modelValue:a.itemPriority,"onUpdate:modelValue":t[2]||(t[2]=e=>a.itemPriority=e),"close-on-click":"",hoverable:"","aria-role":"list",expanded:"",position:"is-top-right"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[(0,c.Lk)("button",{class:"button is-light is-small is-rounded is-fullwidth",onClick:i},[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.itemPriority).color))},[(0,c.bF)(o,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.itemPriority).icon)},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.itemPriority).text)),1)],8,iS)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.$store.state.issuePrioritiesData,t=>((0,c.uX)(),(0,c.Wv)(r,{key:t.id,value:t.id},{default:(0,c.k6)(()=>[(0,c.Lk)("span",sS,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+t.color)},[(0,c.bF)(o,{icon:"fa-light "+t.icon},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(t.text)),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])):(0,c.Q3)("",!0),(0,c.Lk)("div",aS,[(0,c.Lk)("div",nS,[(0,c.eW)((0,u.v_)(e.$t("Status"))+" ",1),i.isSupport||e.$isMobile()?e.isGranted("ROLE_ADMIN_TENANT")&&!e.$isMobile()?((0,c.uX)(),(0,c.Wv)(l,{key:1,to:{name:"TenantSupport"},class:"is-size-6 ml-2 pencil-icon"},{default:(0,c.k6)(()=>[(0,c.bF)(o,{icon:"fa-light fa-pencil"})]),_:1})):(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(l,{key:0,to:{name:"GroupUpdate",params:{item:e.$store.state.currentGroup.id}},class:"is-size-6 ml-2 pencil-icon"},{default:(0,c.k6)(()=>[(0,c.bF)(o,{icon:"fa-light fa-pencil"})]),_:1},8,["to"]))]),(0,c.Lk)("div",oS,[(0,c.bF)(d,{modelValue:a.itemIssueStatus,"onUpdate:modelValue":[t[3]||(t[3]=e=>a.itemIssueStatus=e),n.updateIssueStatus],"aria-role":"list","close-on-click":"",expanded:"",position:"is-top-right"},{trigger:(0,c.k6)(({active:t,toggle:s})=>[(0,c.Lk)("button",{class:"button is-small is-rounded is-fullwidth",style:(0,u.Tr)("background-color: "+(a.item.issueStatus?a.item.issueStatus.color:a.item.isArchived?"#8957E5":"#eee")+";color:black;"),onClick:s},[a.item.isArchived?((0,c.uX)(),(0,c.CE)("span",rS,(0,u.v_)(e.$t("Closed issue")),1)):a.item.id&&!a.itemIssueStatus?((0,c.uX)(),(0,c.CE)("span",dS,"...")):a.itemIssueStatus?((0,c.uX)(),(0,c.CE)("span",cS,(0,u.v_)(a.itemIssueStatus.name),1)):!a.itemIssueStatus&&i.issueStatuses.length>0?((0,c.uX)(),(0,c.CE)("span",uS,(0,u.v_)(i.issueStatuses[0].name),1)):(0,c.Q3)("",!0)],12,lS)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(i.issueStatuses,e=>((0,c.uX)(),(0,c.Wv)(r,{key:e.id,value:e},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.color+";color:black;")}," â "+(0,u.v_)(e.name),5)]),_:2},1032,["value"]))),128)),(0,c.bF)(r,{value:"archive"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",mS," â "+(0,u.v_)(e.$t("Close issue")),1)]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])])]),i.projectSettings.hasDueDate?((0,c.uX)(),(0,c.CE)("div",pS,[(0,c.Lk)("div",hS,(0,u.v_)(e.$t("Due date")),1),(0,c.Lk)("div",gS,[(0,c.bF)(h,{modelValue:a.item.dueDate,"onUpdate:modelValue":t[4]||(t[4]=e=>a.item.dueDate=e),editable:"","show-week-number":!0,icon:"fa-calendar-alt","trap-focus":""},null,8,["modelValue"])])])):(0,c.Q3)("",!0)],64)):(0,c.Q3)("",!0)]),_:1},8,["item-loaded","show-discussion-modal-photos-dialog","show-discussion-modal-videos-dialog","show-discussion-modal-files-dialog","title-placeholder","default-title","save-button-text","onSave","onTitleChanged","onInlineMentionsChanged","onInlineContactMentionsChanged"])}var bS=i(72623),yS=i(41664),vS={name:"IssueFormModal",components:{BaseFormModal:bS.A,UserSearchDiscussAutocomplete:yS.A},props:{showDiscussionModalPhotosDialog:{type:Boolean,default:!1},showDiscussionModalVideosDialog:{type:Boolean,default:!1},showDiscussionModalFilesDialog:{type:Boolean,default:!1}
1,itemLoaded:{type:Object,default:null},isSupport:{type:Boolean,default:!1},projectSettings:{type:Object,default:()=>({})},issueStatuses:{type:Array,default:()=>[]},issueTypes:{type:Array,default:()=>[]},supportTeam:{type:Array,default:()=>[]}},data(){return{item:null,typedMentions:[],typedContactMentions:[],itemIssueStatus:null,itemIssueType:null,itemPriority:null,itemIssueAssignee:null}},computed:{...(0,vi.L8)(["user","tenant","isGranted"]),titlePlaceholder(){return this.isSupport?this.$t("subject"):this.$t("addTitle")},modalTitle(){return this.item?.id?this.$t("modify"):this.isSupport?this.$t("createSupport"):this.$t("createIssue")},saveButtonText(){return this.itemLoaded?this.$t("save"):this.isSupport?this.$t("send"):this.$t("add")}},created(){this.initIssue()},mounted(){this.$refs.baseModal&&this.item&&this.$refs.baseModal.initItem(this.item)},methods:{onTypedMentionsChanged(e){this.typedMentions=[...new Set([...this.typedMentions,...e])]},onTypedContactMentionsChanged(e){this.typedContactMentions=[...new Set([...this.typedContactMentions,...e])]},decodeHtmlEntities(e){if(!e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value},updateIssueStatus(){"archive"===this.itemIssueStatus?this.item.isArchived=!0:this.item.isArchived=null},addAssignee(e){this.itemIssueAssignee=e},onTitleChanged(e){this.$store.state.newDiscussion.title=e},async saveIssue(e){this.$refs.baseModal.setLoading(!0),await this.$refs.baseModal.uploadMedia("postimage"),await this.$refs.baseModal.uploadMedia("postvideo"),await this.$refs.baseModal.uploadMedia("postfile");let t=this.itemLoaded?this.$http.plain.patch:this.$http.plain.post,i=this.itemLoaded?"/discussions/"+this.itemLoaded.id:"/discussions";this.item.title=e.title,this.item.content=e.content,this.item.mentions=this.typedMentions,this.item.contactMentions=this.typedContactMentions,this.item.uploadedMedia=e.uploadedMedia,this.item.removedMedia=this.$refs.baseModal.$refs.mediaUpload.removedMedia,this.item.issueType=this.itemIssueType?this.itemIssueType["@id"]:this.issueTypes.length?this.issueTypes[0]["@id"]:null,this.item.issueStatus=this.itemIssueStatus?this.itemIssueStatus["@id"]:this.issueStatuses.length?this.issueStatuses[0]["@id"]:null,this.item.priority=this.itemPriority,this.item.assignee=this.itemIssueAssignee?this.itemIssueAssignee["@id"]:null,this.item.isSupport&&(this.item.unit=null),this.item.dueDate&&(this.item.dueDate=yC()(this.item.dueDate).utc(this.item.dueDate).toDate()),this.item.isArchived?this.item.issueStatus=null:this.item.isArchived=null,this.item.unit&&this.item.unit["@id"]?this.item.unit=this.item.unit["@id"]:!this.$store.state.currentGroup||"generalUnit"===this.$store.state.currentGroup||this.item.unit||this.item.isSupport||(this.item.unit=this.$store.state.currentGroup["@id"]),this.item.id&&delete this.item.unit,t(i,this.item).then(e=>{this.$buefy.snackbar.open({message:this.$t("saved")}),this.$store.state.newDiscussion={title:null,content:null},this.$store.state.isFormModalVisible=!1,this.$parent.$emit("newDiscussionPosted")}).catch(e=>console.log(e)).finally(()=>{this.$refs.baseModal.setLoading(!1)})},initIssue(){if(this.itemLoaded){const e={id:this.itemLoaded.id,title:this.decodeHtmlEntities(this.itemLoaded.title),isReadOnly:this.itemLoaded.isReadOnly,content:this.decodeHtmlEntities(this.itemLoaded.mainPost.content),unit:this.itemLoaded.unit?this.itemLoaded.unit["@id"]:null,medias:this.itemLoaded.mainPost.medias,uploadedMedia:[],removedMedia:[]};this.item=e,this.typedMentions=this.itemLoaded.mainPost?.mentions?this.itemLoaded.mainPost.mentions.map(e=>e.id):[],this.typedContactMentions=this.itemLoaded.mainPost?.contactMentions?this.itemLoaded.mainPost.contactMentions.map(e=>e.id):[],this.itemLoaded.isIssue&&(this.item.isIssue=this.itemLoaded.isIssue,this.item.isSupport=this.itemLoaded.isSupport,this.itemPriority=this.itemLoaded.priority,this.item.status=this.itemLoaded.status,this.item.isArchived=this.itemLoaded.isArchived,this.itemIssueAssignee=this.itemLoaded.assignee,this.itemIssueStatus=this.itemLoaded.issueStatus,this.itemIssueType=this.itemLoaded.issueType,this.item.dueDate=this.itemLoaded.dueDate?yC().utc(this.itemLoaded.dueDate).local().toDate():null)}else this.resetIssue()},resetIssue(){let e=null,t=this.$store.state.currentGroup;t&&!["support","generalUnit"].includes(t)&&(e=t);const i={title:this.$store.state.newDiscussion.title,content:this.$store.state.newDiscussion.content,isReadOnly:!1,unit:e,photos:[],videos:[],files:[],medias:[],uploadedMedia:[],removedMedia:[],isIssue:!0};this.item=i,this.itemPriority=3,this.itemStatus=null,this.isSupport&&(this.item.isSupport=!0)}}};const kS=(0,Li.A)(vS,[["render",fS],["__scopeId","data-v-540a0cf1"]]);var CS=kS;const LS={class:"discuss-show"},wS={class:"o-minwidth"},_S={class:"o-comment-author"},ES={class:"is-size-7"},$S=["disabled"],FS={class:"icon is-small"},TS=["onClick"],SS={class:"icon"},AS={class:"icon-text"},PS={class:"is-small mr-2"},IS={class:"icon-text"},MS={class:"is-small mr-2"},xS={class:"icon-text"},NS={class:"icon-text"},US={class:"icon-text"},DS={class:"icon-text"},XS={class:"icon-text"},VS={class:"is-small mr-2"}
1,RS={key:1,class:"level is-mobile mb-4"},OS={class:"level-left"},QS={class:"icon-text"},BS={class:"icon is-small"},GS={key:0,class:"level-right is-gap-0"},WS=["disabled"],jS={class:"icon is-small"},zS=["onClick"],qS={class:"icon is-small"},JS={class:"icon-text"},HS={class:"is-small mr-2"},KS={class:"icon-text"},YS={class:"is-small mr-2"},ZS={class:"icon-text"},eA={class:"icon-text"},tA={class:"icon-text"},iA={class:"icon-text"},sA={class:"icon-text"},aA={class:"is-small mr-2"},nA={class:"o-comment-wrap"},oA={key:0,class:"o-comment-content"},lA={class:"o-comment-header"},rA={key:0,class:"mobile-issue-header mt-3"},dA={class:"mobile-issue-row-1 mb-4"},cA={class:"mobile-issue-row-2"},uA=["onClick"],mA={key:0},pA={key:1},hA={key:2},gA={class:"icon is-small"},fA={class:"tag is-rounded",style:{"background-color":"#8957e5"}},bA={key:1},yA={key:0},vA={key:1},kA=["onClick"],CA={class:"icon-text"},LA={key:0},wA={class:"icon-text"},_A={key:3},EA={class:"icon is-small"},$A={class:"mobile-issue-group"},FA={key:0,class:"tag is-light is-rounded is-small"},TA={class:"icon-text"},SA={class:"icon is-small mr-0"},AA={key:3,class:"tag is-warning is-small is-rounded is-default"},PA={ref:"assigneeWrapperMobile",class:"mobile-issue-assignee ml-1"},IA={key:1,class:"icon is-small"},MA={class:"ml-1 is-size-7"},xA={key:1,class:"level is-mobile"},NA={key:0,class:"level-left mt-2"},UA={class:"is-size-7 has-text-grey"},DA={class:"level-right"},XA={key:0,class:"issue_controls"},VA={ref:"assigneeWrapperDesktop",class:"assignne_column is-flex-grow-1 mr-3"},RA={key:1,class:"icon is-small"},OA={class:"ml-1"},QA=["onClick"],BA={key:0},GA={key:1},WA={key:2},jA={class:"icon is-small"},zA={class:"tag is-rounded",style:{"background-color":"#8957e5"}},qA={key:1},JA={key:2},HA=["onClick"],KA={class:"icon-text"},YA={key:0,class:"is-hidden-mobile"},ZA={class:"icon-text"},eP={key:3},tP={key:1,class:"tag is-light is-rounded is-medium is-hidden-touch mr-2"},iP={class:"icon-text"},sP={class:"icon is-small"},aP={key:4,class:"tag is-warning is-medium is-rounded is-hidden-touch is-default"},nP={key:1,class:"my-4"},oP={key:2,class:"mt-6 mb-6 is-size-3"},lP={key:3,class:"gallery-cover-wrap mb-5"},rP=["src"],dP={class:"mt-3"},cP={class:"is-flex is-align-items-center mt-2",style:{gap:"8px"}},uP={key:6,class:"o-discuss-gallery"},mP={key:0,class:"o-gallery-item"},pP=["src","onClick"],hP={key:7,class:"o-discuss-gallery-videos"},gP={key:0,class:"o-video-item"},fP={controls:""},bP=["src"],yP={class:"mt-5"},vP={key:0,class:"mb-3"},kP={class:"icon-text"},CP={class:"icon is-small"},LP=["href"],wP={key:1,class:"discuss-card-foot discuss-card-foot-bordered mt-4"},_P={class:"icon is-small"},EP={key:0},$P={class:"reactionsButtonContainer ml-1 mr-1"},FP=["onClick","onMouseover"],TP={class:"icon"},SP={class:"icon is-small"},AP={class:"discuss-card-right"},PP={key:0,class:"discuss-card-reactions"},IP=["onMouseenter"],MP={class:"icon"},xP={key:0,class:"discuss-reactors-tooltip"},NP={key:0,class:"is-size-7"},UP={class:"discuss-reactors-group-header"},DP={class:"icon is-small"},XP={key:0,class:"discuss-reactor-more"},VP={style:{"flex-shrink":"0",width:"36px",height:"36px"}},RP={style:{flex:"1","min-width":"0"}},OP={style:{width:"200px"}},QP={class:"mt-2"},BP={class:"mt-1",style:{width:"75%"}},GP={key:0,class:"o-comment"},WP={key:1,class:"mt-2 is-size-6-half has-text-weight-bold",style:{"margin-left":"90px"}},jP={class:"is-flex-grow-1"},zP={class:"o-comment-form"},qP={class:"o-comment-content",style:{position:"relative"}},JP={key:0,class:"comment-form-inline-icons is-hidden-mobile"},HP={class:"mobile-comment-actions is-hidden-tablet"},KP=["disabled"],YP={key:0,class:"comment-form-actions is-hidden-mobile"},ZP={class:"comment-form-icons"},eI=["disabled"],tI={key:0,class:"icon"},iI={key:1,class:"icon"},sI={key:3},aI={class:"end-of-posts ml-2 mt-4"},nI={class:"icon-text has-text-grey-light"},oI={class:"icon is-small"},lI={class:"ml-2"},rI={key:4,class:"airy"},dI={key:0,class:"end-of-posts"};function cI(e,t,i,s,a,n){const o=(0,c.g2)("LogoThumbnail"),l=(0,c.g2)("router-link"),r=(0,c.g2)("font-awesome-icon"),d=(0,c.g2)("b-dropdown-item"),p=(0,c.g2)("b-dropdown"),h=(0,c.g2)("MobileViewHeader"),g=(0,c.g2)("b-loading"),f=(0,c.g2)("b-modal"),b=(0,c.g2)("Gallery"),y=(0,c.g2)("UserSearchDiscussAutocomplete"),v=(0,c.g2)("b-input"),k=(0,c.g2)("OpenGraphLinkPreview"),C=(0,c.g2)("PostInput"),L=(0,c.g2)("MediaUpload"),w=(0,c.g2)("b-button"),_=(0,c.g2)("b-taglist"),E=(0,c.g2)("b-skeleton"),$=(0,c.g2)("CommentItem"),F=(0,c.g2)("ReactionsModal"),T=(0,c.g2)("UserShowContent"),S=(0,c.g2)("ItemViewModal"),A=(0,c.g2)("ContactMentionProfileModal"),P=(0,c.gN)("safe-html");return(0,c.uX)(),(0,c.CE)(c.FK,null,[(0,c.Lk)("section",LS,[(0,c.Lk)("div",wS,[e.$isMobile()&&a.item?((0,c.uX)(),(0,c.Wv)(h,{key:0},{center:(0,c.k6)(()=>[(0,c.Lk)("div",_S,[(0,c.bF)(l,{to:{name:"UserShow",params:{item:a.item.mainPost.owner.id}}},{default:(0,c.k6)(()=>[((0,c.uX)(),(0,c.Wv)(o,{key:"authorlogo_"+a.item.mainPost.owner.id,item:a.item.mainPost.owner,"
1is-type":"roundSmall"},null,8,["item"]))]),_:1},8,["to"]),(0,c.Lk)("div",null,[(0,c.bF)(l,{class:"is-size-7 title is-block m-0",to:{name:"UserShow",params:{item:a.item.mainPost.owner.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(a.item.mainPost.owner.fullName),1)]),_:1},8,["to"]),(0,c.Lk)("span",ES,(0,u.v_)(e.$filters.formatDateCool(a.item.mainPost.dateCreated)),1)])])]),actions:(0,c.k6)(()=>[(0,c.Lk)("button",{class:(0,u.C4)(["button is-small is-rounded subscribe-btn",{"is-subscribed":a.isSubscribed||a.showSubscribeAnimation,"is-loading-state":a.isLoadingFollow}]),disabled:a.isLoadingFollow,onClick:t[0]||(t[0]=e=>a.isSubscribed?n.unsubscribeFromDiscussion():n.subscribeToDiscussion())},[(0,c.Lk)("span",FS,[a.isLoadingFollow?((0,c.uX)(),(0,c.Wv)(r,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,c.uX)(),(0,c.Wv)(r,{key:1,icon:a.isSubscribed||a.showSubscribeAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,u.C4)({"bell-ring-animation":a.showSubscribeAnimation})},null,8,["icon","class"]))])],10,$S)]),dropdown:(0,c.k6)(()=>[(0,c.bF)(p,{"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,c.k6)(({active:e,toggle:t})=>[(0,c.Lk)("button",{class:"button is-white is-rounded",onClick:t},[(0,c.Lk)("span",SS,[(0,c.bF)(r,{icon:"fa-light fa-ellipsis-vertical"})])],8,TS)]),default:(0,c.k6)(()=>[a.item.mainPost.owner.id===e.user.id||a.item.isSupport&&e.user.isSupportTeam||e.isGranted("ROLE_SUPER_ADMIN")?((0,c.uX)(),(0,c.Wv)(d,{key:0,onClick:t[1]||(t[1]=t=>(a.showDiscussionModal=!0,e.$store.state.isFormModalVisible=!0))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",AS,[(0,c.Lk)("span",PS,[((0,c.uX)(),(0,c.Wv)(r,{key:"edit"+a.item.mainPost.id,icon:"fa-light fa-pencil-alt"}))]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("modify")),1)])]),_:1})):(0,c.Q3)("",!0),a.item.mainPost.owner.id===e.user.id||n.canAdministerDiscussion?((0,c.uX)(),(0,c.Wv)(d,{key:1,"aria-role":"listitem",onClick:n.confirmDelete},{default:(0,c.k6)(()=>[(0,c.Lk)("span",IS,[(0,c.Lk)("span",MS,[((0,c.uX)(),(0,c.Wv)(r,{key:"delete"+a.item.mainPost.id,icon:"fa-light fa-trash is-small"}))]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("delete")),1)])]),_:1},8,["onClick"])):(0,c.Q3)("",!0),a.item.isIssue||!n.isModerator||a.item.mainPost.moderated||a.item.mainPost.owner.id===e.user.id?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:2,"aria-role":"listitem",onClick:t[2]||(t[2]=e=>n.moderatePost(a.item.mainPost,0,!1))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",xS,[((0,c.uX)(),(0,c.CE)("span",{key:"moderate"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-ban is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Moderate")),1)])]),_:1})),n.isModerator&&a.item.mainPost.moderated?((0,c.uX)(),(0,c.Wv)(d,{key:3,"aria-role":"listitem",onClick:t[3]||(t[3]=e=>n.moderatePost(a.item.mainPost,0,!0))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",NS,[((0,c.uX)(),(0,c.CE)("span",{key:"unmoderate"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-comment-arrow-up is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Remove moderation")),1)])]),_:1})):(0,c.Q3)("",!0),a.item.isIssue||a.item.mainPost.moderated||a.item.mainPost.owner.id===e.user.id?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:4,"aria-role":"listitem",onClick:t[4]||(t[4]=e=>n.reportPost(a.item.mainPost))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",US,[((0,c.uX)(),(0,c.CE)("span",{key:"moderate"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-comment-exclamation is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Report")),1)])]),_:1})),!a.item.isIssue&&n.canBlock(a.item.mainPost.owner)?((0,c.uX)(),(0,c.Wv)(d,{key:5,"aria-role":"listitem",onClick:t[5]||(t[5]=e=>n.blockUser(a.item.mainPost.owner))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",DS,[((0,c.uX)(),(0,c.CE)("span",{key:"block"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-user-slash is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Block user")),1)])]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(d,{"aria-role":"listitem",onClick:t[6]||(t[6]=t=>n.copyLinkToClipboard(e.appURL+"/discuss/show/"+a.item.id))},{default:(0,c.k6)(()=>
1[(0,c.Lk)("span",XS,[(0,c.Lk)("span",VS,[((0,c.uX)(),(0,c.Wv)(r,{key:"copy"+a.item.mainPost.id,icon:"fa-light fa-link"}))]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("copyDiscussionLink")),1)])]),_:1})]),_:1})]),_:1})):(0,c.Q3)("",!0),e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",RS,[(0,c.Lk)("div",OS,[e.hasHistory&&a.item?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"button is-white is-rounded",onClick:t[7]||(t[7]=t=>e.$router.go(-1))},[(0,c.Lk)("span",QS,[(0,c.Lk)("span",BS,[(0,c.bF)(r,{icon:"fa-light fa-chevron-left"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("back")),1)])])):(0,c.Q3)("",!0)]),a.item?((0,c.uX)(),(0,c.CE)("div",GS,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-small is-rounded mr-1 subscribe-btn",{"is-subscribed":a.isSubscribed||a.showSubscribeAnimation,"is-loading-state":a.isLoadingFollow}]),disabled:a.isLoadingFollow,onClick:t[8]||(t[8]=e=>a.isSubscribed?n.unsubscribeFromDiscussion():n.subscribeToDiscussion())},[(0,c.Lk)("span",jS,[a.isLoadingFollow?((0,c.uX)(),(0,c.Wv)(r,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,c.uX)(),(0,c.Wv)(r,{key:1,icon:a.isSubscribed||a.showSubscribeAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,u.C4)({"bell-ring-animation":a.showSubscribeAnimation})},null,8,["icon","class"]))]),(0,c.Lk)("span",null,(0,u.v_)(a.isSubscribed||a.showSubscribeAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,WS),(0,c.bF)(p,{hoverable:"","aria-role":"list",class:"ml-0",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:e,toggle:t})=>[(0,c.Lk)("button",{class:"button is-white is-rounded",onClick:t},[(0,c.Lk)("span",qS,[(0,c.bF)(r,{icon:"fa-light fa-ellipsis-vertical"})])],8,zS)]),default:(0,c.k6)(()=>[a.item.mainPost.owner.id===e.user.id||a.item.isSupport&&e.user.isSupportTeam||e.isGranted("ROLE_SUPER_ADMIN")?((0,c.uX)(),(0,c.Wv)(d,{key:0,onClick:t[9]||(t[9]=t=>(a.showDiscussionModal=!0,e.$store.state.isFormModalVisible=!0))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",JS,[(0,c.Lk)("span",HS,[((0,c.uX)(),(0,c.Wv)(r,{key:"edit"+a.item.mainPost.id,icon:"fa-light fa-pencil-alt"}))]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("modify")),1)])]),_:1})):(0,c.Q3)("",!0),a.item.mainPost.owner.id===e.user.id||n.canAdministerDiscussion?((0,c.uX)(),(0,c.Wv)(d,{key:1,"aria-role":"listitem",onClick:n.confirmDelete},{default:(0,c.k6)(()=>[(0,c.Lk)("span",KS,[(0,c.Lk)("span",YS,[((0,c.uX)(),(0,c.Wv)(r,{key:"delete"+a.item.mainPost.id,icon:"fa-light fa-trash is-small"}))]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("delete")),1)])]),_:1},8,["onClick"])):(0,c.Q3)("",!0),a.item.isIssue||!n.isModerator||a.item.mainPost.moderated||a.item.mainPost.owner.id===e.user.id?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:2,"aria-role":"listitem",onClick:t[10]||(t[10]=e=>n.moderatePost(a.item.mainPost,0,!1))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",ZS,[((0,c.uX)(),(0,c.CE)("span",{key:"moderate"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-ban is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Moderate")),1)])]),_:1})),n.isModerator&&a.item.mainPost.moderated?((0,c.uX)(),(0,c.Wv)(d,{key:3,"aria-role":"listitem",onClick:t[11]||(t[11]=e=>n.moderatePost(a.item.mainPost,0,!0))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",eA,[((0,c.uX)(),(0,c.CE)("span",{key:"unmoderate"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-comment-arrow-up is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Remove moderation")),1)])]),_:1})):(0,c.Q3)("",!0),a.item.isIssue||a.item.mainPost.moderated||a.item.mainPost.owner.id===e.user.id?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:4,"aria-role":"listitem",onClick:t[12]||(t[12]=e=>n.reportPost(a.item.mainPost))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",tA,[((0,c.uX)(),(0,c.CE)("span",{key:"moderate"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-comment-exclamation is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Report")),1)])]),_:1})),!a.item.isIssue&&n.canBlock(a.item.mainPost.owner)?((0,c.uX)(),(0,c.Wv)(d,{key:5,"aria-role":"listitem",onClick:t[13]||(t[13]=e=>n.blockUser(a.item.mainPost.owner))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",iA,[((0,c.uX)(),(0,c.CE)("span",{key:"block"+a.item.mainPost.id,class:"is-small mr-2"},[(0,c.bF)(r,{icon:"fa-light fa-user-slash is-small"})])),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Block user")),1)])]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(d,{"aria-role":"listitem",onClick:t[14]||(t[14]=t=>n.copyLinkToClipboard(e.appURL+"/discuss/show/"+a.item.id))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",sA,[(0,c.Lk)("span",aA,[((0,c.uX)(),(0,c.Wv)(r,{key:"c
1opy"+a.item.mainPost.id,icon:"fa-light fa-link"}))]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("copyDiscussionLink")),1)])]),_:1})]),_:1})])):(0,c.Q3)("",!0)])),(0,c.bF)(g,{modelValue:a.isLoading,"onUpdate:modelValue":t[15]||(t[15]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),a.item?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)(e.$isMobile()?"":"card pb-6")},[(0,c.bF)(f,{modelValue:e.$store.state.isFormModalVisible,"onUpdate:modelValue":t[16]||(t[16]=t=>e.$store.state.isFormModalVisible=t),component:n.FormModal,"can-cancel":a.formModalCanCancel,props:{showDiscussionModalPhotosDialog:a.showDiscussionModalPhotosDialog,showDiscussionModalVideosDialog:a.showDiscussionModalVideosDialog,showDiscussionModalFilesDialog:a.showDiscussionModalFilesDialog,itemLoaded:a.item,issueTypes:a.issueTypes,issueStatuses:a.issueStatuses,projectSettings:n.projectSettings,categories:a.discussionCategories,supportTeam:a.supportTeam,isSupport:a.item.isSupport},"has-modal-card":"","full-screen":e.$isMobile(),events:{},onNewDiscussionPosted:n.retrieve},null,8,["modelValue","component","can-cancel","props","full-screen","onNewDiscussionPosted"]),(0,c.bF)(b,{images:a.photosUrlSource,videos:a.videosUrlSource,index:a.galleryIndex,onClose:t[17]||(t[17]=e=>a.galleryIndex=null)},null,8,["images","videos","index"]),((0,c.uX)(),(0,c.CE)("div",{key:a.item.mainPost.id,class:"o-comment mainPostComment pb-4"},[(0,c.Lk)("div",nA,[a.item.mainPost.inEditing?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",oA,[(0,c.Lk)("div",lA,[a.item.isIssue&&e.$isMobile()?((0,c.uX)(),(0,c.CE)("div",rA,[(0,c.Lk)("div",dA,[(0,c.Lk)("div",cA,[n.editIssuePermission?((0,c.uX)(),(0,c.Wv)(p,{key:0,"aria-role":"list",hoverable:"",class:"is-rounded","close-on-click":"",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[(0,c.Lk)("button",{class:"button is-small is-rounded",style:(0,u.Tr)("background-color: "+(a.item.issueStatus?a.item.issueStatus.color:a.item.isArchived?"#8957E5":"#eee")+";"),onClick:i},[a.item.isArchived?((0,c.uX)(),(0,c.CE)("span",mA,(0,u.v_)(e.$t("closed")),1)):a.item.issueStatus?((0,c.uX)(),(0,c.CE)("span",hA,(0,u.v_)(a.item.issueStatus.name),1)):((0,c.uX)(),(0,c.CE)("span",pA,"...")),(0,c.Lk)("span",gA,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],12,uA)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueStatuses,e=>((0,c.uX)(),(0,c.Wv)(d,{key:e,value:e,onClick:t=>n.issueSetAction(a.item,"status",e)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.color+";")}," â "+(0,u.v_)(e.name),5)]),_:2},1032,["value","onClick"]))),128)),a.item.isArchived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:0,value:"archive",onClick:t[18]||(t[18]=e=>n.issueSetAction(a.item,"status","archive"))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",fA," â "+(0,u.v_)(e.$t("Close issue")),1)]),_:1}))]),_:1})):((0,c.uX)(),(0,c.CE)("div",bA,[(0,c.Lk)("span",{class:"tag is-small is-rounded",style:(0,u.Tr)("background-color: "+(a.item.issueStatus?a.item.issueStatus.color:a.item.isArchived?"#8957E5":"#eee")+";")},[a.item.isArchived?((0,c.uX)(),(0,c.CE)("span",yA,(0,u.v_)(e.$t("closed")),1)):a.item.issueStatus?((0,c.uX)(),(0,c.CE)("span",vA,(0,u.v_)(a.item.issueStatus.name),1)):(0,c.Q3)("",!0)],4)])),n.editIssuePermission?((0,c.uX)(),(0,c.Wv)(p,{key:2,modelValue:a.item.priority,"onUpdate:modelValue":[t[19]||(t[19]=e=>a.item.priority=e),t[20]||(t[20]=e=>n.issueSetAction(a.item,"priority",a.item.priority))],"close-on-click":"",hoverable:"","aria-role":"list",position:"is-bottom-right"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[(0,c.Lk)("button",{class:"button is-small is-rounded is-light",onClick:i},[(0,c.Lk)("span",CA,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).color))},[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).icon)},null,8,["icon"])],4),a.item.priority?((0,c.uX)(),(0,c.CE)("span",LA,(0,u.v_)(e.$t(e.$store.state.issuePrioritiesData.find(e=>
1e.id===a.item.priority).text)),1)):(0,c.Q3)("",!0)])],8,kA)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.$store.state.issuePrioritiesData,t=>((0,c.uX)(),(0,c.Wv)(d,{key:t.id,value:t.id},{default:(0,c.k6)(()=>[(0,c.Lk)("span",wA,[(0,c.Lk)("span",{class:"mr-3 is-small",style:(0,u.Tr)("color: "+t.color)},[(0,c.bF)(r,{icon:"fa-light "+t.icon},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(t.text)),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):((0,c.uX)(),(0,c.CE)("div",_A,[(0,c.Lk)("span",{class:"tag is-small is-rounded is-light icon-text",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).color))},[(0,c.Lk)("span",EA,[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).icon)},null,8,["icon"])]),(0,c.Lk)("span",null,(0,u.v_)(e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).text)),1)],4)]))]),(0,c.Lk)("div",$A,[a.item.namespace?((0,c.uX)(),(0,c.CE)("span",FA,(0,u.v_)(a.item.namespace.name),1)):(0,c.Q3)("",!0),!a.item.isSupport&&a.item.unit?((0,c.uX)(),(0,c.Wv)(l,{key:1,class:"button is-small is-rounded is-light",to:{name:"DiscussList",query:{unit:a.item.unit.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",TA,[(0,c.Lk)("span",SA,["Group"!==a.item.unit["type"]||a.item.unit.isJoinable?((0,c.uX)(),(0,c.Wv)(r,{key:1,icon:"fa-light fa-hashtag"})):((0,c.uX)(),(0,c.Wv)(r,{key:0,icon:"fa-light fa-lock"}))]),(0,c.Lk)("span",null,(0,u.v_)(a.item.unit.name),1)])]),_:1},8,["to"])):(0,c.Q3)("",!0),a.item.isSupport||a.item.unit?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(l,{key:2,class:"tag is-small is-rounded is-default",to:{name:"DiscussList",query:{generalUnit:!0}}},{default:(0,c.k6)(()=>[(0,c.eW)(" # "+(0,u.v_)(e.tenant.shortName),1)]),_:1})),a.item.isSupport?((0,c.uX)(),(0,c.CE)("span",AA," # "+(0,u.v_)(e.$t("support")),1)):(0,c.Q3)("",!0)])]),(0,c.Lk)("div",PA,[n.editIssuePermission&&a.isIssueAssigneeEdit?((0,c.uX)(),(0,c.Wv)(y,{key:0,ref:"assigneeSearch"+a.item.id,modelValue:a.item.assignee,"onUpdate:modelValue":[t[21]||(t[21]=e=>a.item.assignee=e),t[22]||(t[22]=e=>n.issueSetAction(a.item,"assignee",e))],label:a.item.assignee?a.item.assignee.fullName:e.$t("unassigned"),"is-assignee":!0,"focus-on-load":!0,"support-team":a.supportTeam,"is-support":a.item.isSupport,onBlur:t[23]||(t[23]=e=>a.isIssueAssigneeEdit=!1)},null,8,["modelValue","label","support-team","is-support"])):(0,c.Q3)("",!0),n.editIssuePermission&&!a.isIssueAssigneeEdit?((0,c.uX)(),(0,c.CE)("div",{key:1,class:"h-stack fs-14",onClick:t[24]||(t[24]=e=>a.isIssueAssigneeEdit=!0)},[a.item.assignee?((0,c.uX)(),(0,c.Wv)(o,{key:a.item.assignee.id,item:a.item.assignee,"is-type":"roundXSmall"},null,8,["item"])):((0,c.uX)(),(0,c.CE)("span",IA,[(0,c.bF)(r,{icon:"fa-light fa-user-circle"})])),(0,c.Lk)("span",MA,(0,u.v_)(a.item.assignee&&a.item.assignee["@id"]?a.item.assignee.firstName+" "+a.item.assignee.lastName[0]+".":e.$t("unassigned")),1)])):(0,c.Q3)("",!0)],512)])):(0,c.Q3)("",!0),a.item.isIssue&&e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",xA,[e.$isMobile()?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",NA,[((0,c.uX)(),(0,c.CE)("div",{key:"author_"+a.item.mainPost.id,class:"o-comment-author"},[(0,c.bF)(l,{to:{name:"UserShow",params:{item:a.item.mainPost.owner.id}}},{default:(0,c.k6)(()=>[((0,c.uX)(),(0,c.Wv)(o,{key:"authorlogo_"+a.item.mainPost.owner.id,item:a.item.mainPost.owner,"is-type":"roundMedium"},null,8,["item"]))]),_:1},8,["to"]),(0,c.Lk)("div",null,[(0,c.bF)(l,{class:"is-size-6 has-text-dark title is-block m-0",to:{name:"UserShow",params:{item:a.item.mainPost.owner.id}}},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(a.item.mainPost.owner.fullName),1)]),_:1},8,["to"]),(0,c.Lk)("span",UA,(0,u.v_)(e.$filters.formatDateCool(a.item.mainPost.dateCreated)),1)])]))])),(0,c.Lk)("div",DA,[a.item.isIssue?((0,c.uX)(),(0,c.CE)("div",XA,[(0,c.Lk)("div",VA,[n.editIssuePermission&&a.isIssueAssigneeEdit?((0,c.uX)(),(0,c.Wv)(y,{key:0,ref:"assigneeSearch"+a.item.id,modelValue:a.item.assignee,"onUpdate:modelValue":[t[25]||(t[25]=e=>a.item.assignee=e),t[26]||(t[26]=e=>n.issueSetAction(a.item,"assignee",e))],label:a.item.assignee?a.item.assignee.fullName:e.$t("unassigned"),"is-assignee":!0,style:{"min-width":"160px"},"focus-on-load":!0,"support-team":a.supportTeam,"is-support":a.item.isSupport,onBlur:t[27]||(t[27]=e=>a.isIssueAssigneeEdit=!1)},null,8,["modelValue","label","support-team","is-support"])):(0,c.Q3)("",!0),n.editIssuePermission&&!a.isIssueAssigneeEdit?((0,c.uX)(),(0,c.CE)("div",{key:1,class:"h-stack fs-14",onClick:t[28]||(t[28]=e=>a.isIssueAssigneeEdit=!0)},[a.item.assignee?((0,c.uX)(),(0,c.Wv)(o,{key:a.item.assignee.id,item:a.item.assignee,"is-type":"roundXSmall"},null,8,["item"])):((0,c.uX)(),(0,c.CE)("span",RA,[(0,c.bF)(r,{icon:"fa-light fa-user-circle"})])),(0,c.Lk)("span",OA,(0,u.v_)(a.item.assignee&&a.item.assignee["@id"]?a.item.assignee.firstName+" "+a.item.assignee.lastName[0]+".":e.$t("unassigned")),1)])):(0,c.Q3)("",!0)],512),n.editIssuePermission?((0,c.uX)(),(0,c.Wv)(p,{key:0,"aria-role":"list",hoverable:"",class:"is-rounded","close-on-click":"",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[(0,c.Lk)("button",{class:"button is-small is-rounded",style:(0,u.Tr)("background-color: "+(a.item.issueStatus?a.item.issueStatus.color:a.item.isArchived?"#8957E5":"#eee")+";"),onClick:i},[a.item.isArchived?((0,c.uX)(),(0,c.CE)("span",BA,(0,u.v_)(e.$t("closed")),1
1)):a.item.issueStatus?((0,c.uX)(),(0,c.CE)("span",WA,(0,u.v_)(a.item.issueStatus.name),1)):((0,c.uX)(),(0,c.CE)("span",GA,"...")),(0,c.Lk)("span",jA,[(0,c.bF)(r,{icon:"fa-light fa-angle-down"})])],12,QA)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.issueStatuses,e=>((0,c.uX)(),(0,c.Wv)(d,{key:e,value:e,onClick:t=>n.issueSetAction(a.item,"status",e)},{default:(0,c.k6)(()=>[(0,c.Lk)("span",{class:"tag is-rounded",style:(0,u.Tr)("background-color: "+e.color+";")}," â "+(0,u.v_)(e.name),5)]),_:2},1032,["value","onClick"]))),128)),a.item.isArchived?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(d,{key:0,value:"archive",onClick:t[29]||(t[29]=e=>n.issueSetAction(a.item,"status","archive"))},{default:(0,c.k6)(()=>[(0,c.Lk)("span",zA," â "+(0,u.v_)(e.$t("Close issue")),1)]),_:1}))]),_:1})):((0,c.uX)(),(0,c.CE)("div",qA,(0,u.v_)(a.item.issueStatus?a.item.issueStatus.name:""),1)),n.editIssuePermission?((0,c.uX)(),(0,c.CE)("div",JA,[(0,c.bF)(p,{modelValue:a.item.priority,"onUpdate:modelValue":[t[30]||(t[30]=e=>a.item.priority=e),t[31]||(t[31]=e=>n.issueSetAction(a.item,"priority",a.item.priority))],"close-on-click":"",hoverable:"","aria-role":"list",position:"is-bottom-left"},{trigger:(0,c.k6)(({active:t,toggle:i})=>[(0,c.Lk)("button",{class:"button is-small is-rounded is-light only-icon-mobile",onClick:i},[(0,c.Lk)("span",KA,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).color))},[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).icon)},null,8,["icon"])],4),a.item.priority?((0,c.uX)(),(0,c.CE)("span",YA,(0,u.v_)(e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).text)),1)):(0,c.Q3)("",!0)])],8,HA)]),default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.$store.state.issuePrioritiesData,t=>((0,c.uX)(),(0,c.Wv)(d,{key:t.id,value:t.id},{default:(0,c.k6)(()=>[(0,c.Lk)("span",ZA,[(0,c.Lk)("span",{class:"mr-3 is-small",style:(0,u.Tr)("color: "+t.color)},[(0,c.bF)(r,{icon:"fa-light "+t.icon},null,8,["icon"])],4),(0,c.Lk)("span",null,(0,u.v_)(e.$t(t.text)),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])):((0,c.uX)(),(0,c.CE)("div",eP,[(0,c.Lk)("span",{class:"icon is-small",style:(0,u.Tr)("color: "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).color))},[(0,c.bF)(r,{icon:"fa-light "+e.$t(e.$store.state.issuePrioritiesData.find(e=>e.id===a.item.priority).icon)},null,8,["icon"])],4)]))])):(0,c.Q3)("",!0),a.item.namespace?((0,c.uX)(),(0,c.CE)("span",tP,(0,u.v_)(a.item.namespace.name),1)):(0,c.Q3)("",!0),!a.item.isSupport&&a.item.unit?((0,c.uX)(),(0,c.Wv)(l,{key:2,class:"tag is-medium is-rounded is-hidden-touch is-default",to:{name:"DiscussList",query:{unit:a.item.unit.id}}},{default:(0,c.k6)(()=>[(0,c.Lk)("span",iP,[(0,c.Lk)("span",sP,["Group"!==a.item.unit["type"]||a.item.unit.isJoinable?((0,c.uX)(),(0,c.Wv)(r,{key:1,icon:"fa-light fa-hashtag"})):((0,c.uX)(),(0,c.Wv)(r,{key:0,icon:"fa-light fa-lock"}))]),(0,c.Lk)("span",null,(0,u.v_)(a.item.unit.name),1)])]),_:1},8,["to"])):(0,c.Q3)("",!0),a.item.isSupport||a.item.unit?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(l,{key:3,class:"tag is-medium is-rounded is-hidden-touch is-default",to:{name:"DiscussList",query:{generalUnit:!0}}},{default:(0,c.k6)(()=>[(0,c.eW)(" # "+(0,u.v_)(e.tenant.shortName),1)]),_:1})),a.item.isSupport?((0,c.uX)(),(0,c.CE)("span",aP," # "+(0,u.v_)(e.$t("support")),1)):(0,c.Q3)("",!0)])]))]),(0,c.Lk)("div",{class:(0,u.C4)(["discussion-content",{"pt-4":!a.item.title}])},[!a.item.title||a.item.mainPost.moderated||a.isEditingTitle?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",{key:0,id:"discussionTitle",class:(0,u.C4)(["is-size-4 has-text-weight-semibold my-4 has-text-black",{"editable-section":n.canEditDiscussion}]),onClick:t[32]||(t[32]=e=>n.canEditDiscussion?n.startEditingTitle():null)},(0,u.v_)(a.item.title),3)),a.isEditingTitle?((0,c.uX)(),(0,c.CE)("div",nP,[(0,c.bF)(v,{ref:"titleInlineInput",modelValue:a.inlineTitle,"onUpdate:modelValue":t[33]||(t[33]=e=>a.inlineTitle=e),class:"is-size-4 has-text-weight-semibold",type:"text",placeholder:e.$t("Title"),onKeyup:[(0,m.jR)(n.saveInlineTitle,["enter"]),(0,m.jR)(n.cancelEditingTitle,["escape"])],onBlur:n.saveInlineTitle},null,8,["modelValue","placeholder","onKeyup","onBlur"])])):(0,c.Q3)("",!0),a.item.mainPost.moderated?((0,c.uX)(),(0,c.CE)("div",oP,[(0,c.eW)((0,u.v_)(e.$t("Moderated discussion"))+" ",1),t[79]||(t[79]=(0,c.Lk)("br",null,null,-1))])):(0,c.Q3)("",!0),n.firstMediaImage?((0,c.uX)(),(0,c.CE)("div",lP,[(0,c.Lk)("img",{class:"gallery-cover",src:n.mediaSrc(n.firstMediaImage),onClick:t[34]||(t[34]=t=>n.openGallery(e.index,a.item.mainPost))},null,8,rP)])):(0,c.Q3)("",!0),a.item.mainPost.content&&!a.isEditingContent?((0,c.uX)(),(0,c.CE)("div",{key:4,id:"discussionContent",class:(0,u.C4)(["is-size-6 has-text-dark",{"editable-section":n.canEditDiscussion}]),onClick:t[36]||(t[36]=e=>n.canEditDiscussion?n.startEditingContent():null)},[(0,c.bo)((0,c.Lk)("div",{onClick:t[35]||(t[35]=(...e)=>n.handleMentionClick&&n.handleMentionClick(...e))},null,512),[[P,n.mainPostRenderedContent]]),a.item.mainPost.embedOpenGraph?((0,
1c.uX)(),(0,c.Wv)(k,{key:0,embed:a.item.mainPost.embedOpenGraph.openGraph,"is-comment":!1},null,8,["embed"])):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0),a.isEditingContent?((0,c.uX)(),(0,c.CE)("div",{key:5,class:"my-2",onDragover:t[41]||(t[41]=(0,m.D$)(()=>{},["prevent"])),onDragenter:t[42]||(t[42]=(0,m.D$)((...e)=>n.onInlineDragToggle&&n.onInlineDragToggle(...e),["prevent"])),onDragleave:t[43]||(t[43]=(0,m.D$)((...e)=>n.onInlineDragToggle&&n.onInlineDragToggle(...e),["prevent"])),onDrop:t[44]||(t[44]=(0,m.D$)((...e)=>n.onInlineDropFiles&&n.onInlineDropFiles(...e),["prevent"]))},[(0,c.bF)(C,{ref:"contentInlineInput","new-comment":a.inlineContent,discussion:a.item,"is-comment":!1,"show-media-icons":!0,placeholder:e.$t("Write more")+"...",rows:4,"focus-on-mount":!0,onMentionsChanged:n.onInlineMentionsChanged,onContactMentionsChanged:n.onInlineContactMentionsChanged,onUploadImage:t[37]||(t[37]=t=>e.$refs.inlineMediaUpload.triggerPhotoUpload()),onUploadVideo:t[38]||(t[38]=t=>e.$refs.inlineMediaUpload.triggerVideoUpload()),onUploadFile:t[39]||(t[39]=t=>e.$refs.inlineMediaUpload.triggerFileUpload())},null,8,["new-comment","discussion","placeholder","onMentionsChanged","onContactMentionsChanged"]),(0,c.Lk)("div",dP,[(0,c.bF)(L,{ref:"inlineMediaUpload",photos:a.inlinePhotos,videos:a.inlineVideos,files:a.inlineFiles,item:a.item,medias:a.inlineMedias,"is-comment":!1,"is-dragging":a.inlineIsDragging,"hide-buttons":!0,"onUpdate:modelValue":t[40]||(t[40]=e=>a.inlineMedias=e)},null,8,["photos","videos","files","item","medias","is-dragging"])]),(0,c.Lk)("div",cP,[(0,c.bF)(w,{class:"is-primary is-small is-rounded",loading:a.isSavingInline,onClick:n.saveInlineContent},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"]),(0,c.bF)(w,{class:"is-small is-rounded",onClick:n.cancelEditingContent},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("Cancel")),1)]),_:1},8,["onClick"])])],32)):(0,c.Q3)("",!0),n.firstMediaImage&&a.item.mainPost.medias.length>1?((0,c.uX)(),(0,c.CE)("div",uP,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.mainPost.medias,(e,t)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[e&&"postimage"===e.type&&e.id!==n.firstMediaImage.id?((0,c.uX)(),(0,c.CE)("figure",mP,[(0,c.Lk)("img",{src:n.mediaSrc(e),onClick:e=>n.openGallery(t,a.item.mainPost)},null,8,pP)])):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),a.item.mainPost.medias.find(e=>"postvideo"===e.type)?((0,c.uX)(),(0,c.CE)("div",hP,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.mainPost.medias,(e,i)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[e&&"postvideo"===e.type?((0,c.uX)(),(0,c.CE)("figure",gP,[(0,c.Lk)("video",fP,[(0,c.Lk)("source",{src:n.mediaSrc(e),type:"video/mp4"},null,8,bP),t[80]||(t[80]=(0,c.eW)(" Your browser does not support the video tag. ",-1))])])):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0),(0,c.Lk)("div",yP,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.mainPost.medias,(e,i)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[e&&"postfile"===e.type?((0,c.uX)(),(0,c.CE)("div",vP,[t[81]||(t[81]=(0,c.eW)(" â ",-1)),(0,c.Lk)("span",kP,[(0,c.Lk)("span",CP,[(0,c.bF)(r,{icon:"fa-light fa-file"})]),(0,c.Lk)("span",null,[(0,c.Lk)("a",{href:n.mediaSrc(e),target:"_blank"},(0,u.v_)(e.originalName),9,LP)])])])):(0,c.Q3)("",!0)],64))),128))]),(0,c.Lk)("div",null,[a.item.topics.length>0?((0,c.uX)(),(0,c.Wv)(_,{key:0,class:"o-hashtags mt-5"},{default:(0,c.k6)(()=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.item.topics,e=>((0,c.uX)(),(0,c.Wv)(l,{key:e.id,to:{name:"DiscussList",query:{tag:e.name}},class:"tag is-rounded is-link is-hoverable is-default"},{default:(0,c.k6)(()=>[(0,c.eW)(" #"+(0,u.v_)(e.name),1)]),_:2},1032,["to"]))),128))]),_:1})):(0,c.Q3)("",!0)])],2)])),a.item.mainPost.moderated?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",wP,[(0,c.bF)(p,{triggers:["hover"],"aria-role":"list",position:"is-top-right",class:"reactionPopup","mobile-modal":!0},{trigger:(0,c.k6)(()=>[(0,c.Lk)("div",{class:(0,u.C4)(["discuss-card-like-btn is-clickable",[a.item.mainPost.myReactions.length>0?`reacted reaction-${a.item.mainPost.myReactions[0]}`:""]])},[(0,c.Lk)("span",_P,[(0,c.bF)(r,{icon:a.item.mainPost.myReactions.length>0?a.reactions[a.item.mainPost.myReactions[0]].icon:"fa-light fa-thumbs-up"},null,8,["icon"])]),n.reactionsTotal(a.item.mainPost)>0?((0,c.uX)(),(0,c.CE)("span",EP,(0,u.v_)(n.reactionsTotal(a.item.mainPost)),1)):(0,c.Q3)("",!0)],2)]),default:(0,c.k6)(()=>[(0,c.Lk)("div",$P,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.reactions,i=>((0,c.uX)(),(0,c.CE)("span",{key:"pp_"+i.id,class:(0,u.C4)(["reactionButtonAnimated",[a.item.mainPost.myReactions.includes(i.id)?"myReaction":"",`reaction-${i.id}`]]),onClick:e=>n.reactToComment(a.item.mainPost,i),onMouseover:t=>a.tooltipReactionButton=e.$t(i.title),onMouseout:t[45]||(t[45]=t=>a.tooltipReactionButton=e.$t("pickYourReaction"))},[(0,c.Lk)("span",TP,[((0,c.uX)(),(0,c.Wv)(r,{key:"pp_r_"+i.id,icon:i.icon},null,8,["icon"]))])],42,FP))),128))])]),_:1}),a.commentsTotal>0?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"discuss-card-action-btn is-clickable",onClick:t[46]||(t[46]=t=>e.$refs.postInput?.focusInput())},[(0,c.Lk)("span",SP,[(0,c.bF)(r,{icon:"fa-light fa-comment-lines"})]),(0,c.Lk)("span",null,(0,u.v_)(a.commentsTotal),1)])):(0,c.Q3)("",!0),(0,c.Lk)("div",AP,[n.reactionsTotal(a.item.mainPost)>0?((0,c.uX)(),(0,c.CE)("div",PP,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.reactions,i=>((0,c.uX)(),(0,c.CE)(c.FK,{key:"rt_"+i.id},[a.item.mainPost.reactionData&&a.item.mainPost.reactionData[i.id]&&a.item.mainPost.reactionData[i.id]>0?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"discuss-card-reaction-item",onMouseenter:e=>n.onMainPostReactionHover(i.id),onMouseleave:t[47]||(t[47]=e=>a.activeMainPostReactionTooltip=null),onClick:t[48]||(t[48]=e=>n.openReactionsModal(a.item.mainPost))},[(0,c.Lk)("span",{class:(0,u.C4)(["discuss-card-reaction-icon",`reaction-${i.id}`])},[(0,c.Lk)("span",MP,[(0,c.bF)(r,{icon:i.icon},null,8,["icon"])])],2),a.activeMainPostReactionTooltip===i.id?((0,c.uX)(),(0,c.CE)("div",xP,[a.isLoadingMainPostReactors&&!a.mainPostReactorsLoaded?((0,c.uX)(),(0,c.CE)("span",NP,(0,u.v_)(e.$t("Loading"))+"...",1)):a.mainPostReactorsData[i.id]&&a.mainPostReactorsData[i.id].length>0?((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.Lk)("div",UP,[(0,c.Lk)("span",{class:(0,u.C4)(["discuss-card-reaction-icon",`reaction-${i.id}`])},[(0,c.Lk)("span",DP,[(0,c.bF)(r,{icon:i.icon},null,8,["icon"])])],2),(0,c.Lk)("strong",null,(0,u.v_)(n.getReactionTitle(i.id)),1)]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.mainPostReactorsData[i.id].slice(0,20),e=>((0,c.uX)(),(0,c.CE)("div",{key:e.id,class:"discuss-reactor-name"},(0,u.v_)(e.fullName),1))),128)),a.mainPostReactorsData[i.id].length>20?((0,c.uX)(),(0,c.CE)("div",XP,(0,u.v_)(e.$t("and"))+" "+(0,u.v_)(a.mainPostReactorsData[i.id].length-20)+" "+(0,u.v_)(e.$t("more"))+"... ",1)):(0,c.Q3)("",!0)],64)):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],40,IP)):(0,c.Q3)("",!0)],64))),128))])):(0,c.Q3)("",!0)])]))])])),a.isLoadingComments?((0,
1c.uX)(),(0,c.CE)(c.FK,{key:0},(0,c.pI)(3,e=>(0,c.Lk)("div",{key:"comment-skeleton-"+e,style:{display:"flex","align-items":"flex-start",gap:"12px",padding:"12px 20px"}},[(0,c.Lk)("div",VP,[(0,c.bF)(E,{circle:"",width:"36px",height:"36px",animated:""})]),(0,c.Lk)("div",RP,[(0,c.Lk)("div",OP,[(0,c.bF)(E,{height:"13px",animated:""})]),(0,c.Lk)("div",QP,[(0,c.bF)(E,{height:"13px",animated:""})]),(0,c.Lk)("div",BP,[(0,c.bF)(E,{height:"13px",animated:""})])])])),64)):(0,c.Q3)("",!0),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.comments,(e,i)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:e.id},[e&&i>0?((0,c.uX)(),(0,c.CE)("div",GP,[((0,c.uX)(),(0,c.Wv)($,{ref_for:!0,ref:"comment_"+e.id,key:"comment_"+e.id+e.refresher,depth:0,"updated-comment-id":a.updatedCommentId,"is-moderator":n.isModerator,"can-administer-discussion":n.canAdministerDiscussion,"react-to-comment":n.reactToComment,"reactions-total":n.reactionsTotal,"moderate-post":n.moderatePost,"block-user":n.blockUser,"load-replies":n.loadReplies,"open-gallery":n.openGallery,"new-comment":a.newComment,"comment-saved":a.commentSaved,item:a.item,"reply-parent-id":a.replyParentId,"is-saving-comment":a.isSavingComment,reactions:a.reactions,replies:a.replies,index:i,comment:e,onChangedReplyParent:t[49]||(t[49]=e=>a.replyParentId=e),onRemoved:e=>n.removedComment(i),onRemovedReply:n.removedReply,onReplySaved:n.handleReplySaved,onReplyUploadMedia:n.handleMediaUpload,onMentionClicked:n.openUserModal,onContactMentionClicked:n.openContactModal},null,8,["updated-comment-id","is-moderator","can-administer-discussion","react-to-comment","reactions-total","moderate-post","block-user","load-replies","open-gallery","new-comment","comment-saved","item","reply-parent-id","is-saving-comment","reactions","replies","index","comment","onRemoved","onRemovedReply","onReplySaved","onReplyUploadMedia","onMentionClicked","onContactMentionClicked"]))])):(0,c.Q3)("",!0)],64))),128)),a.someoneIsTyping?((0,c.uX)(),(0,c.CE)("div",WP,(0,u.v_)(a.someoneIsTyping)+" "+(0,u.v_)(e.$t("isWriting"))+"... ",1)):(0,c.Q3)("",!0),a.item&&!a.item.mainPost.moderated&&!a.item.isReadOnly&&a.comments.length>0&&!a.showDiscussionModal?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,u.C4)(["o-comment-addnew is-flex is-align-items-flex-start is-relative",{"comment-form-expanded":n.isCommentExpanded,"mr-5 ml-5":!e.$isMobile(),"reply-sticky-mobile-target":!n.isCommentExpanded}]),onDragover:t[71]||(t[71]=(0,m.D$)(()=>{},["prevent"])),onDragenter:t[72]||(t[72]=(0,m.D$)((...e)=>n.onDragToggle&&n.onDragToggle(...e),["prevent"])),onDragleave:t[73]||(t[73]=(0,m.D$)((...e)=>n.onDragToggle&&n.onDragToggle(...e),["prevent"])),onDrop:t[74]||(t[74]=(0,m.D$)((...e)=>n.onDropFiles&&n.onDropFiles(...e),["prevent"]))},[(0,c.bF)(o,{class:"o-comment-author mr-2 is-hidden-mobile",style:{"margin-top":"3px"},item:e.user,"is-type":"roundXMedium"},null,8,["item"]),(0,c.Lk)("div",jP,[(0,c.Lk)("div",zP,[(0,c.Lk)("div",qP,[(0,c.bF)(C,{ref:"postInput","new-comment":a.newComment,discussion:a.item,"is-comment":!0,placeholder:n.mobileCommentPlaceholder,saved:a.commentSaved,"focus-on-mount":!1,"is-reply":!0,rows:1,"hide-emoji":!0,onFocus:t[50]||(t[50]=e=>a.isCommentFocused=!0),onBlur:n.onCommentBlur,onRowsChanged:t[51]||(t[51]=e=>a.textareaRows=e),onMentionsChanged:t[52]||(t[52]=e=>a.commentMentions=e)},null,8,["new-comment","discussion","placeholder","saved","onBlur"]),(0,c.bF)(m.eB,{name:"fade-icons"},{default:(0,c.k6)(()=>[n.isCommentExpanded?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("div",JP,[(0,c.Lk)("span",{class:"icon is-clickable",onMousedown:t[53]||(t[53]=(0,m.D$)(()=>{},["prevent"])),onClick:t[54]||(t[54]=t=>e.$refs.postInput.toggleEmojiPicker("right"))},[(0,c.bF)(r,{icon:"fal fa-smile"})],32),(0,c.Lk)("span",{class:"icon is-clickable",onMousedown:t[55]||(t[55]=(0,m.D$)(()=>{},["prevent"])),onClick:t[56]||(t[56]=t=>e.$refs.mediaUpload.triggerPhotoUpload())},[(0,c.bF)(r,{icon:"fa-light fa-image"})],32),(0,c.Lk)("span",{class:"icon is-clickable",onMousedown:t[57]||(t[57]=(0,m.D$)(()=>{},["prevent"])),onClick:t[58]||(t[58]=t=>e.$refs.mediaUpload.triggerFileUpload())},[(0,c.bF)(r,{icon:"fa-light fa-folder"})],32)]))]),_:1}),(0,c.Lk)("div",HP,[a.newComment.content.length>0||a.isSavingComment?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"mobile-send-btn",disabled:a.isSavingComment,onClick:t[59]||(t[59]=(...e)=>n.commentSave&&n.commentSave(...e))},[a.isSavingComment?((0,c.uX)(),(0,c.Wv)(r,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,c.uX)(),(0,c.Wv)(r,{key:1,icon:"fa-light fa-paper-plane-top"}))],8,KP)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.Lk)("span",{class:"mobile-comment-icon",onMousedown:t[60]||(t[60]=(0,m.D$)(()=>{},["prevent"])),onClick:t[61]||(t[61]=t=>e.$refs.mediaUpload.triggerPhotoUpload())},[(0,c.bF)(r,{icon:"fa-light fa-image"})],32),(0,c.Lk)("span",{class:"mobile-comment-icon",onMousedown:t[62]||(t[62]=(0,m.D$)(()=>{},["prevent"])),onClick:t[63]||(t[63]=t=>e.$refs.postInput.triggerMention())},[(0,c.bF)(r,{icon:"fa-light fa-at"})],32)],64))])]),(0,c.bF)(m.eB,{name:"slide-actions"},{default:(0,c.k6)(()=>[n.isCommentExpanded?((0,c.uX)(),(0,c.CE)("div",YP,[(0,c.Lk)("div",ZP,[(0,c.Lk)("span",{class:"icon is-clickable",onMousedown:t[64]||(t[64]=(0,m.D$)(()=>{},["prevent"])),onClick:t[65]||(t[65]=t=>e.$refs.postInput.toggleEmojiPicker("left"))}
1,[(0,c.bF)(r,{icon:"fal fa-smile"})],32),(0,c.Lk)("span",{class:"icon is-clickable",onMousedown:t[66]||(t[66]=(0,m.D$)(()=>{},["prevent"])),onClick:t[67]||(t[67]=t=>e.$refs.mediaUpload.triggerPhotoUpload())},[(0,c.bF)(r,{icon:"fa-light fa-image"})],32),(0,c.Lk)("span",{class:"icon is-clickable",onMousedown:t[68]||(t[68]=(0,m.D$)(()=>{},["prevent"])),onClick:t[69]||(t[69]=t=>e.$refs.mediaUpload.triggerFileUpload())},[(0,c.bF)(r,{icon:"fa-light fa-folder"})],32)])])):(0,c.Q3)("",!0)]),_:1}),(0,c.bF)(L,{ref:"mediaUpload",photos:a.photos,videos:a.videos,files:a.files,item:a.item,medias:a.medias,"is-comment":!0,"is-dragging":a.isDragging,"hide-buttons":!0,"onUpdate:modelValue":n.handleMediaUpload},null,8,["photos","videos","files","item","medias","is-dragging","onUpdate:modelValue"]),a.newComment.content.length>0||a.isSavingComment?((0,c.uX)(),(0,c.CE)("button",{key:0,class:"comment-form-send-bottom is-hidden-mobile",disabled:a.isSavingComment,type:"submit",onClick:t[70]||(t[70]=(...e)=>n.commentSave&&n.commentSave(...e))},[a.isSavingComment?((0,c.uX)(),(0,c.CE)("span",tI,[(0,c.bF)(r,{icon:"fa-light fa-spinner-third",spin:""})])):((0,c.uX)(),(0,c.CE)("span",iI,[(0,c.bF)(r,{icon:"fa-light fa-paper-plane-top"})]))],8,eI)):(0,c.Q3)("",!0)])])],34)):(0,c.Q3)("",!0),a.item&&a.item.isReadOnly?((0,c.uX)(),(0,c.CE)("div",sI,[(0,c.Lk)("p",aI,[(0,c.Lk)("span",nI,[(0,c.Lk)("span",oI,[(0,c.bF)(r,{icon:"fa-light fa-comment-slash"})]),(0,c.Lk)("span",lI,(0,u.v_)(e.$t("commentsAreDisabled")),1)])])])):(0,c.Q3)("",!0),a.comments.length>0?((0,c.uX)(),(0,c.CE)("div",rI,[a.finishedPosts&&a.comments.length>=7?((0,c.uX)(),(0,c.CE)("div",dI,[(0,c.Lk)("p",null,[(0,c.Lk)("a",{onClick:t[75]||(t[75]=(...e)=>n.scrollToTop&&n.scrollToTop(...e))},(0,u.v_)(e.$t("backToTop")),1)])])):(0,c.Q3)("",!0)])):(0,c.Q3)("",!0)],2)):(0,c.Q3)("",!0)])]),(0,c.bF)(F,{"is-active":a.isReactionsModalActive,"onUpdate:isActive":t[76]||(t[76]=e=>a.isReactionsModalActive=e),reactions:a.reactions,"reaction-data":a.reactionsData},null,8,["is-active","reactions","reaction-data"]),(0,c.bF)(S,{modelValue:a.isUserModalVisible,"onUpdate:modelValue":t[77]||(t[77]=e=>a.isUserModalVisible=e),title:e.$t("Profile"),"modal-width":1100,"maximize-route":a.selectedUserId?{name:"UserShow",params:{item:a.selectedUserId}}:null,onClose:n.closeUserModal},{default:(0,c.k6)(()=>[a.selectedUserId?((0,c.uX)(),(0,c.Wv)(T,{key:0,"user-id":a.selectedUserId},null,8,["user-id"])):(0,c.Q3)("",!0)]),_:1},8,["modelValue","title","maximize-route","onClose"]),(0,c.bF)(A,{modelValue:a.isContactModalVisible,"onUpdate:modelValue":t[78]||(t[78]=e=>a.isContactModalVisible=e),"contact-id":a.selectedContactId,onClose:n.closeContactModal},null,8,["modelValue","contact-id","onClose"])],64)}var uI=i(53755),mI=i(63520),pI=i(73432),hI=i(86827),gI=i(76675),fI=i(60770),bI=i(29341),yI={data(){return{commentLookupMap:{}}},computed:{...(0,vi.L8)(["user","tenant"]),mercureDiscussionId(){return this.discussionId||this.itemId||this.currentItemId}},methods:{findPostById(e){const t=this.commentLookupMap[e];return t?t.isTopLevel?this.comments.find(t=>t.id===e):this.replies[t.parentId]?.find(t=>t.id===e)||null:null},buildCommentLookupMap(){const e={};if(this.comments){this.comments.forEach(t=>{e[t.id]={isTopLevel:!0}});for(const t in this.replies)this.replies[t]&&this.replies[t].forEach(i=>{e[i.id]={parentId:parseInt(t),isTopLevel:!1}});this.commentLookupMap=e}},mercureDiscovery(){if("undefined"!==typeof ki.uW&&!1===ki.uW)return;if(!1===this.tenant?.settingFeatures?.realtime?.isActive)return;const e="discussion_"+this.mercureDiscussionId;this.$http.plain.get("/mercure-token/"+e).then(e=>{this.mercureSubscribe(e.data)}).catch(e=>console.log(e))},mercureSubscribe(e){"undefined"!==typeof ki.uW&&!1===ki.uW||!1!==this.tenant?.settingFeatures?.realtime?.isActive&&(this.$store.commit("resetEventSource"),this.$store.commit("initEventSource",{token:e.token,hubUrl:e.hubUrl,topic:"discussion_"+this.mercureDiscussionId}),this.$store.state.currentMercureEvent.onmessage=e=>{this.handleMercureMessage(e)})},handleMercureMessage(e){let t;try{t=JSON.parse(e.data)}catch(i){return void console.log("Invalid Mercure message:",i)}t&&"object"===typeof t&&(t.action?"edit"===t.action?this.handleCommentEdit(t):"remove"===t.action?this.handleCommentRemove(t):"softdelete"===t.action?this.handleCommentSoftDelete(t):"typing"===t.action&&this.user?.id!==t.ownerId?this.someoneIsTyping=t.owner:"reset"===t.action?this.someoneIsTyping=null:"reaction_discussion"===t.action?this.item?.mainPost&&(this.item.mainPost.reactionData=t.reactionData):"reaction_comment"===t.action&&this.handleCommentReaction(t):t.owner?.id!==this.user?.id&&(t.parent?this.handleNewReply(t):this.comments.find(e=>e.id===t.id)||(this.comments.push(t),this.buildCommentLookupMap())))},handleNewReply(e){const t=e.parent?.id||e.parent;if(this.commentLookupMap[t]&&(this.replies[t]||(this.replies[t]=[]),!this.replies[t].find(t=>
1t.id===e.id))){this.replies[t].push(e);const i=this.findPostById(t);i&&(i.childrenCount=(i.childrenCount||0)+1),this.buildCommentLookupMap()}},handleCommentEdit(e){const t=this.findPostById(e.id);t&&(t.content=e.content,t.refresher=Math.random())},handleCommentSoftDelete(e){const t=this.findPostById(e.id);t&&(t.isDeleted=!0,t.content=null,t.medias=[],t.embedOpenGraph=null)},handleCommentRemove(e){const t=this.findPostById(e.id);if(!t)return;t.deleted=!0,t.content=null,t.medias=[],t.embedOpenGraph=null,t.reactionData=[],t.refresher=Math.random();const i=this.commentLookupMap[e.id];if(i&&!i.isTopLevel){const e=this.findPostById(i.parentId);e&&(e.childrenCount=Math.max(0,(e.childrenCount||1)-1))}},handleCommentReaction(e){const t=this.findPostById(e.postId);t&&(t.reactionData=e.reactionData)}}},vI={mixins:[yI],data(){return{isUserModalVisible:!1,selectedUserId:null,isContactModalVisible:!1,selectedContactId:null,updatedCommentId:null,itemId:this.$route.params.item,item:null,isSubscribed:!1,issueTypes:this.$store.state.currentGroupIssueTypes,issueStatuses:this.$store.state.currentGroupIssueStatuses,isDragging:!1,userFollowId:null,comments:[],commentsTotal:0,replies:{},scrollLock:!0,nextPage:1,finishedPosts:!1,someoneIsTyping:null,newComment:{content:"",postType:"text"},replyParentId:null,isSavingComment:!1,commentEditing:!1,textareaRows:1,commentEditId:null,reactions:{1:{"@id":"/api/v1/reactions/1","@type":"Reaction",id:1,title:"Like",icon:"fa-light fa-thumbs-up"},3:{"@id":"/api/v1/reactions/3","@type":"Reaction",id:3,title:"love",icon:"fa-light fa-heart"},4:{"@id":"/api/v1/reactions/4","@type":"Reaction",id:4,title:"celebrate",icon:"fa-light fa-hands-clapping"},5:{"@id":"/api/v1/reactions/5","@type":"Reaction",id:5,title:"informative",icon:"fa-light fa-lightbulb-on"}},commentSaved:null,commentMentions:[],tooltipReactionButton:this.$t("pickYourReaction"),galleryIndex:null,mediaGallery:null,showDiscussionModal:!1,showDiscussionModalPhotosDialog:!1,showDiscussionModalVideosDialog:!1,showDiscussionModalFilesDialog:!1,formModalCanCancel:["escape","outside"],showReplyComment:{},photosCommentUrls:{},videosCommentUrls:{},photosUrlSource:null,videosUrlSource:null,photos:[],videos:[],medias:[],files:[],uploadedMedia:[],isLoadingIssueUpdate:!1,isIssueAssigneeEdit:!1,isLoading:!1,isLoadingComments:!1,isDragDropActive:!1,reactionPopup:null,reactionPopupOpened:null,isLoadingFollow:!1,isCommentFocused:!1,showSubscribeAnimation:!1,supportTeam:[],discussionCategories:[],isReactionsModalActive:!1,reactionsData:{},activeMainPostReactionTooltip:null,isLoadingMainPostReactors:!1,mainPostReactorsLoaded:!1,mainPostReactorsData:{},isEditingTitle:!1,isEditingContent:!1,inlineTitle:"",inlineContent:{content:""},inlineContentMentions:[],inlineContentContactMentions:[],isSavingInline:!1,inlinePhotos:[],inlineVideos:[],inlineFiles:[],inlineMedias:[],inlineIsDragging:!1}},created(){this.item&&this.itemId===this.item.id?(this.commentsTotal=this.item&&this.item.postsCount?this.item.postsCount:0,this.comments.push(this.item.mainPost),this.photosCommentsSetUrls(this.item.mainPost),this.videosCommentsSetUrls(this.item.mainPost),this.loadComments(),this.retrieveUserFollow()):this.retrieve(),window.onscroll=()=>{if(!this.scrollLock&&!this.finishedPosts){let e=document.documentElement.scrollTop+window.innerHeight>=.85*document.documentElement.offsetHeight;e&&(this.scrollLock=!0,this.loadComments())}}},mounted(){this.$nextTick(()=>{this.contrastObserver=(0,lc.kg)('.tag[style*="background-color"], .button[style*="background-color"]')})},beforeUnmount(){this.$store.commit("resetEventSource"),this.contrastObserver&&this.contrastObserver.disconnect(),document.removeEventListener("click",this.handleClickOutsideAssignee)},methods:{isOlderDate:ds.NW,mediaSrc:ds.F9,copyToClipboard:ds.lW,openUserModal(e){this.selectedUserId=e,this.isUserModalVisible=!0},closeUserModal(){this.isUserModalVisible=!1,this.selectedUserId=null},openContactModal(e){this.selectedContactId=e,this.isContactModalVisible=!0},closeContactModal(){this.isContactModalVisible=!1,this.selectedContactId=null},handleMentionClick(e){const t=e.target.closest(".mention-link[data-user-id]");if(t){e.preventDefault(),e.stopPropagation();const i=t.dataset.userId;return void(i&&this.openUserModal(parseInt(i)))}const i=e.target.closest(".mention-link[data-contact-id]");if(i){e.preventDefault(),e.stopPropagation();const t=i.dataset.contactId;t&&this.openContactModal(parseInt(t))}},handleClickOutsideAssignee(e){const t=this.$refs.assigneeWrapperMobile,i=this.$refs.assigneeWrapperDesktop,s=t&&!t.contains(e.target),a=i&&!i.contains(e.target);s&&a&&(this.isIssueAssigneeEdit=!1)},issueSetAction(e,t,i){let s={};switch(t){case"assignee":s.assignee=i["@id"];break;case"priority":s.priority=i;break;case"dueDate":s.dueDate=i;break;case"status":"archive"===i?(s.isArchived=!0,s.issueStatus=null,this.item.issueStatus=null):(s.issueStatus=i["@id"],s.isArchived=!1,this.item.issueStatus=i);break;
1case"type":s.issueType=i["@id"];break}this.isLoading=!0,this.isLoadingIssueUpdate=!0,this.$http.plain.patch("/discussions/"+e.id,s).then(e=>{this.item=e.data}).catch(e=>console.error(e)).finally(()=>{this.isLoadingIssueUpdate=null,this.isIssueAssigneeEdit=null,this.isLoading=!1})},onCommentBlur(){setTimeout(()=>{this.isCommentFocused=!1},80)},onDragToggle(){this.isDragging=!this.isDragging},onDropFiles(e){this.onDragToggle();const t=Array.from(e.dataTransfer.files||[]);t.length&&this.$refs.mediaUpload&&this.$refs.mediaUpload.addExternalFiles(t,!0)},copyLinkToClipboard(e){this.copyToClipboard(e),this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-info",duration:500})},openGallery(e,t){this.galleryIndex=e,this.photosUrlSource=this.photosCommentUrls[t.id],this.videosUrlSource=this.videosCommentUrls[t.id]},loadIssueStatusesAndTypes(){if(!this.item.isIssue)return;let e=null;this.item.isSupport?e="?tenantSupport="+this.tenant.id:this.item.unit&&this.item.unit.id&&(e="?unit="+this.item.unit.id),e&&(this.isLoading=!0,this.$http.plain.get("/issue_statuses"+e).then(t=>(this.issueStatuses=t.data["hydra:member"],this.$http.plain.get("/issue_types"+e).then(e=>{this.issueTypes=e.data["hydra:member"]}))).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1}))},loadReplies(e){this.isLoading=!0,this.$http.plain.get("/posts",{params:{parent:e}}).then(t=>{let i=t.data["hydra:member"];i.length>0&&void 0===this.replies[e]&&(this.replies[e]=[]),this.replies[e]=i,this.updatedCommentId=e;for(let e of i)this.photosCommentsSetUrls(e),this.videosCommentsSetUrls(e)}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},reactToComment(e,t){let i=!1;if(e.myReactions.includes(t.id)){i=!0;let s=e.myReactions;return e.reactionData[t.id]--,this.$http.plain.delete("/post_user_reactions?post="+e.id).then(e=>{}).catch(i=>{this.$buefy.snackbar.open({message:this.$t("error"),type:"is-danger"}),e.myReactions=s,e.reactionData[t.id]++}),void(e.myReactions=e.myReactions.filter(e=>e!==t.id))}e.reactionData.hasOwnProperty(t.id)||(e.reactionData[t.id]=0);let s=e.myReactions,a=e.reactionData;for(let n of e.myReactions)e.reactionData[n]--;e.myReactions=[],e.myReactions.push(t.id),e.reactionData[t.id]++,this.$http.plain.post("/post_user_reactions",{post:e["@id"],reaction:t["@id"]}).then(e=>{}).catch(t=>{e.reactionData=a,e.myReactions=s,console.error(t)}),this.item&&e.id===this.item.mainPost.id&&(this.mainPostReactorsLoaded=!1,this.mainPostReactorsData={}),this.updatedCommentId=e.id},formModalUpdate(e){e&&(this.item=e,this.$store.state.refreshCachedKeepAliveList=!0),this.showDiscussionModal=!1,this.showDiscussionModalFilesDialog=!1,this.showDiscussionModalPhotosDialog=!1,this.showDiscussionModalVideosDialog=!1,this.showReplyComment={},this.$store.state.isFormModalVisible=!1},retrieve(){this.comments=[],this.nextPage=1,this.isLoading=!0,this.$http.plain.get("/discussions/"+this.itemId,{}).then(e=>this.entityLoaded(e)).catch(e=>{404===e.response.status&&this.$buefy.toast.open({duration:4e3,message:this.$t("Post not found"),type:"is-info"}),console.error(e),this.$router.push({name:"Dashboard"})}).finally(()=>{this.isLoading=!1})},retrieveUserFollow(){return this.$http.plain.get("/search-user-follows-discussion/"+this.itemId).then(e=>{this.isSubscribed=e.data&&e.data.id,this.userFollowId=this.isSubscribed?e.data.id:null}).catch(e=>console.error(e))},removedComment(e){this.comments.splice(e,1),this.commentsTotal--},removedReply(e){this.replies[e.parentId].splice(e.index,1),this.commentRepliesCount(e.parentId,"decrement")},moderatePost(e,t,i){this.isLoading=!0,this.$http.plain.patch("/posts/"+e.id+"/moderate"+(i?"-remove":""),{}).then(e=>{this.item.mainPost.id===e.data.id?this.retrieve():this.comments[t]=e.data}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},reportPost(e){this.isLoading=!0,this.$http.plain.patch("/posts/"+e.id+"/report",{}).then(e=>{this.$buefy.toast.open({message:this.$t("Post content was reported to the group administrator."),duration:6e3,type:"is-success"})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},canBlock(e){return(0,ds.cm)(e,this.user)},blockUser(e){this.$buefy.dialog.confirm({title:this.$t("Block user"),message:this.$t("You will no longer see posts and comments written by this member."),confirmText:this.$t("Block user"),cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>this.confirmBlockUser(e)})},confirmBlockUser(e){this.isLoading=!0,this.$http.plain.post("/user_blocks",{user:e.id}).then(()=>
1{this.$buefy.toast.open({message:this.$t("Member blocked. You will no longer see their content."),duration:6e3,type:"is-success"}),this.item.mainPost.owner.id!==e.id?this.reloadComments():this.$router.push({name:"DiscussList"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:e.response?.data?.["hydra:description"]||this.$t("This member could not be blocked."),duration:6e3,type:"is-danger"})}).finally(()=>{this.isLoading=!1})},reloadComments(){this.comments=[],this.replies={},this.nextPage=1,this.finishedPosts=!1,this.loadComments()},entityLoaded(e){let t=e.data;this.item=t,this.item.owner=t.mainPost.owner,this.commentsTotal=t.postsCount,this.$store.commit("setDynamicCurrentGroup",this.item),this.mercureDiscovery(),this.loadIssueStatusesAndTypes(),this.loadComments(),this.retrieveUserFollow(),this.item.isSupport&&this.retrieveSupportTeam(),this.loadDiscussionCategories()},loadDiscussionCategories(){let e="";e=this.item.unit&&this.item.unit.id?"&unit="+this.item.unit.id:"&tenant="+this.tenant.id+"&exists[unit]=false",this.$http.plain.get("/discussion_namespaces?"+e).then(e=>{this.discussionCategories=e.data["hydra:member"]}).catch(e=>console.error(e))},toggleFollowDiscussion(){this.isSubscribed?this.unsubscribeFromDiscussion():this.subscribeToDiscussion()},subscribeToDiscussion(){this.isLoadingFollow=!0,this.$http.plain.post("/user_follow_discussions",{discussion:"/api/v1/discussions/"+this.itemId}).then(e=>{this.retrieveUserFollow(),this.triggerSubscribeAnimation()}).catch(e=>console.error(e)).finally(()=>{this.isLoadingFollow=!1})},unsubscribeFromDiscussion(){this.userFollowId&&(this.isLoadingFollow=!0,this.$http.plain.delete("/user_follow_discussions/"+this.userFollowId).then(e=>this.retrieveUserFollow()).catch(e=>console.error(e)).finally(()=>{this.isLoadingFollow=!1}))},triggerSubscribeAnimation(){this.showSubscribeAnimation=!0,setTimeout(()=>{this.showSubscribeAnimation=!1},600)},loadComments(){this.item.mainPost.moderated||(this.isLoading=!0,this.isLoadingComments=!0,this.$http.plain.get("/posts",{params:{discussion:this.itemId,page:this.nextPage,includeReplies:1}}).then(e=>this.commentsLoaded(e)).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1,this.isLoadingComments=!1}))},commentsLoaded(e){e.data["hydra:member"].forEach(e=>{this.photosCommentsSetUrls(e),this.videosCommentsSetUrls(e),e.parentId?(this.replies[e.parentId]||(this.replies[e.parentId]=[]),this.replies[e.parentId].find(t=>t.id===e.id)||this.replies[e.parentId].push(e)):e.id===this.item.mainPost.id&&0!==this.comments.length||this.comments.find(t=>t.id===e.id)||this.comments.push(e)}),this.checkIfLastPage(e.data)&&(this.finishedPosts=!0),this.scrollLock=!1,this.nextPage++,this.buildCommentLookupMap()},checkIfLastPage(e){return 0===e["hydra:totalItems"]||e["hydra:view"]&&!e["hydra:view"].hasOwnProperty("hydra:last")||e["hydra:view"]&&e["hydra:view"]["@id"]===e["hydra:view"]["hydra:last"]},handleMediaUpload(e){this.medias=e},async uploadMedia(e){this.isSavingComment=!0,await this.$refs.mediaUpload.uploadMedia(e)},async commentSave(){if(this.isSavingComment)return;this.isSavingComment=!0;const e={};e.content=this.newComment.content,e.discussion=this.itemId,e.embedOpenGraph=this.newComment.openGraphEmbed,e.mentions=this.$refs.postInput?this.$refs.postInput.getMentions():[],e.contactMentions=this.$refs.postInput?this.$refs.postInput.getContactMentions():[],await this.uploadMedia("postimage"),await this.uploadMedia("postvideo"),await this.uploadMedia("postfile"),e.uploadedMedia=this.$refs.mediaUpload.uploadedMedia,e.medias=this.medias,(e.content||e.uploadedMedia.length>0||e.medias.length>0)&&this.$http.plain.post("/posts",e).then(e=>{this.newComment.content="",this.$refs.mediaUpload.photos=[],this.$refs.mediaUpload.videos=[],this.$refs.mediaUpload.files=[],this.$refs.mediaUpload.uploadedMedia=[],this.$refs.mediaUpload.removedMedia=[],this.medias=[],this.commentSaved=new Date,"pending"!==e.data.moderationStatus?this.comments.find(t=>t.id===e.data.id)||(this.comments.push(e.data),this.photosCommentsSetUrls(e.data),this.videosCommentsSetUrls(e.data),this.commentsTotal++):this.$buefy.snackbar.open({message:this.$t("postFlaggedMessage"),type:"is-warning",position:"is-top",actionText:this.$t("Close"),duration:8e3})}).catch(e=>{console.error(e)}).finally(()=>{this.isSavingComment=!1})},handleReplySaved(e){void 0===this.replies[e.parentId]&&(this.replies[e.parentId]=[]),this.replies[e.parentId].push(e.reply),this.photosCommentsSetUrls(e.reply),this.videosCommentsSetUrls(e.reply),this.commentRepliesCount(e.parentId,"increment"),this.replyParentId=null,this.buildCommentLookupMap()},commentRepliesCount(e,t){let i=this.comments.find(t=>
1t.id===e);if(!i)for(const s in this.replies){const t=this.replies[s].find(t=>t.id===e);if(t){i=t;break}}i&&(i.childrenCount="increment"===t?(i.childrenCount||0)+1:Math.max(0,(i.childrenCount||1)-1))},confirmDelete(){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>{this.$http.plain.delete("/discussions/"+this.item.id).then(e=>{this.$buefy.toast.open(this.$t("deleted")),this.$store.state.refreshCachedKeepAliveList=!0,this.item.isIssue?this.item.isSupport?this.$router.push({name:"IssueList",query:{support:null}}):this.$router.push({name:"IssueList",query:{unit:this.item.unit.id}}):this.item.unit?this.$router.push({name:"DiscussList",query:{unit:this.item.unit.id}}):this.$router.push({name:"DiscussList",query:{generalUnit:!0}})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:e?.response?.data?.detail||this.$t("Failed to delete"),type:"is-danger"})})}})},reactionsTotal(e){let t=0;for(const[i,s]of Object.entries(e.reactionData))t+=s;return t},scrollToTop(){document.getElementById("oMain").scrollTop=0},scrollToComment(){this.$refs.postInput.focusInput()},photosCommentsSetUrls(e){void 0===this.photosCommentUrls[e.id]&&(this.photosCommentUrls[e.id]=[]);let t=[];for(let i of e.medias)"postimage"===i.type&&t.push((0,ds.F9)(i));this.photosCommentUrls[e.id]=t},videosCommentsSetUrls(e){void 0===this.videosCommentUrls[e.id]&&(this.videosCommentUrls[e.id]=[]);let t=[];for(let i of e.medias)"postvideo"===i.type&&t.push((0,ds.F9)(i));this.videosCommentUrls[e.id]=t},retrieveSupportTeam(){this.$http.plain.get("/support_teams").then(e=>{for(let t of e.data["hydra:member"])this.supportTeam.push(t.user)}).catch(e=>console.error(e))},getPostsReactions(e){this.isLoading=!0,this.$http.plain.get("/posts/get_reactions_list/"+e).then(e=>{this.reactionsData=e.data}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},openReactionsModal(e){this.getPostsReactions(e.id),this.isReactionsModalActive=!0},onMainPostReactionHover(e){this.activeMainPostReactionTooltip=e,this.mainPostReactorsLoaded||(this.isLoadingMainPostReactors=!0,this.$http.plain.get("/posts/get_reactions_list/"+this.item.mainPost.id).then(e=>{this.mainPostReactorsData=e.data,this.mainPostReactorsLoaded=!0}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingMainPostReactors=!1}))},getReactionTitle(e){const t=this.reactions[e];return t?this.$t(t.title):""},startEditingTitle(){this.inlineTitle=this.item.title||"",this.isEditingTitle=!0,this.$nextTick(()=>{const e=this.$refs.titleInlineInput?.$el?.querySelector("input");e&&e.focus()})},cancelEditingTitle(){this.isEditingTitle=!1},saveInlineTitle(){this.isEditingTitle&&(this.inlineTitle.trim()&&!this.isSavingInline&&this.inlineTitle.trim()!==this.item.title?(this.isSavingInline=!0,this.$http.plain.patch("/discussions/"+this.item.id,{title:this.inlineTitle.trim()}).then(e=>{if(e.data.mainPost&&"pending"===e.data.mainPost.moderationStatus)return this.isEditingTitle=!1,void this.flagAndLeave();this.item.title=e.data.title,this.isEditingTitle=!1}).catch(e=>{console.error(e)}).finally(()=>{this.isSavingInline=!1})):this.isEditingTitle=!1)},onInlineMentionsChanged(e){this.inlineContentMentions=[...new Set([...this.inlineContentMentions,...e])]},onInlineContactMentionsChanged(e){this.inlineContentContactMentions=[...new Set([...this.inlineContentContactMentions,...e])]},startEditingContent(){this.inlineContent={content:(0,ds.jT)(this.item.mainPost.content||"")},this.inlineContentMentions=this.item.mainPost.mentions?this.item.mainPost.mentions.map(e=>e.id):[],this.inlineContentContactMentions=this.item.mainPost.contactMentions?this.item.mainPost.contactMentions.map(e=>e.id):[],this.inlinePhotos=[],this.inlineVideos=[],this.inlineFiles=[],this.inlineMedias=this.item.mainPost.medias?[...this.item.mainPost.medias]:[],this.isEditingContent=!0},cancelEditingContent(){this.isEditingContent=!1,this.inlinePhotos=[],this.inlineVideos=[],this.inlineFiles=[],this.inlineMedias=[]}
1,onInlineDragToggle(){this.inlineIsDragging=!this.inlineIsDragging},onInlineDropFiles(e){this.onInlineDragToggle();const t=Array.from(e.dataTransfer.files||[]);t.length&&this.$refs.inlineMediaUpload&&this.$refs.inlineMediaUpload.addExternalFiles(t,!1)},saveInlineContent(){if(this.isSavingInline)return;this.isSavingInline=!0;const e=this.$refs.inlineMediaUpload;Promise.resolve().then(()=>e?e.uploadMedia("postimage"):null).then(()=>e?e.uploadMedia("postvideo"):null).then(()=>e?e.uploadMedia("postfile"):null).then(()=>{const t=e?e.uploadedMedia:[],i=e?e.removedMedia:[];return this.$http.plain.patch("/discussions/"+this.item.id,{content:this.inlineContent.content,mentions:this.inlineContentMentions,contactMentions:this.inlineContentContactMentions,uploadedMedia:t,removedMedia:i})}).then(e=>{if(e.data.mainPost&&"pending"===e.data.mainPost.moderationStatus)return this.isEditingContent=!1,void this.flagAndLeave();this.item.mainPost.content=e.data.mainPost.content,this.item.mainPost.medias=e.data.mainPost.medias,e.data.mainPost.mentions&&(this.item.mainPost.mentions=e.data.mainPost.mentions),e.data.mainPost.contactMentions&&(this.item.mainPost.contactMentions=e.data.mainPost.contactMentions),this.isEditingContent=!1,this.inlinePhotos=[],this.inlineVideos=[],this.inlineFiles=[],this.inlineMedias=[]}).catch(e=>{console.error(e)}).finally(()=>{this.isSavingInline=!1})},flagAndLeave(){this.$buefy.snackbar.open({message:this.$t("postFlaggedMessage"),type:"is-warning",position:"is-top",actionText:this.$t("Close"),duration:8e3}),this.$router.push({name:"DiscussList"})},handleEditDoubleClick(){this.canEditDiscussion&&(this.showDiscussionModal=!0,this.$store.state.isFormModalVisible=!0)}},computed:{...(0,vi.L8)(["tenant","user","isGranted","appURL","hasHistory"]),mobileCommentPlaceholder(){return this.$isMobile()&&this.user?this.$t("Reply"):this.$t("Write a comment...")},isCommentExpanded(){return this.isCommentFocused||this.newComment.content&&this.newComment.content.length>0},mainPostRenderedContent(){return(0,ds.gt)(this.item?.mainPost?.content,this.item?.mainPost?.mentions,this.item?.mainPost?.contactMentions)},FormModal(){return this.item&&this.item.isIssue?(0,IE.IG)(CS):(0,IE.IG)($E.A)},editIssuePermission(){return!((!this.item.isSupport||!this.isUserInSupportTeam&&!this.isGranted("HR_TENANT"))&&this.item.isSupport)},canEditDiscussion(){return!!(this.item&&this.item.mainPost&&this.user)&&(this.item.mainPost.owner.id===this.user.id||this.item.isSupport&&this.user.isSupportTeam||this.isGranted("ROLE_SUPER_ADMIN"))},isUserInSupportTeam(){for(let e of this.supportTeam)if(e.id===this.user.id)return!0;return!1},firstMediaImage(){return this.item.mainPost.medias.find(e=>"postimage"===e.type)},typingReply(){return this.replyParentId&&this.newComment.content.length},isModerator(){return this.item.unit?this.item&&this.isGranted("COMMUNICATION_LOCAL",this.item.unit):this.item&&this.isGranted("COMMUNICATION_TENANT")},canAdministerDiscussion(){return!!this.item?.canAdministerDiscussion},projectSettings(){return this.item&&this.item.unit&&this.item.unit.isProject?this.item.unit:this.item&&this.item.isSupport?{hasPriority:!0,hasDueDate:!0,hasTypes:!0}:{hasPriority:!1,hasDueDate:!1,hasTypes:!1}}},watch:{isIssueAssigneeEdit(e){e?this.$nextTick(()=>{document.addEventListener("click",this.handleClickOutsideAssignee)}):document.removeEventListener("click",this.handleClickOutsideAssignee)},"$store.state.isFormModalVisible"(e){e||(this.showDiscussionModal=!1)}},components:{UserSearchDiscussAutocomplete:yS.A,ReactionsModal:fI.A,LogoThumbnail:rc.A,OpenGraphLinkPreview:uI.A,PostInput:mI.A,MediaUpload:hI.A,Gallery:gI.A,CommentItem:pI.A,MobileViewHeader:Pg.A,ItemViewModal:Jn.A,UserShowContent:Fh["default"],ContactMentionProfileModal:bI.A}};const kI=(0,Li.A)(vI,[["render",cI],["__scopeId","data-v-0722b525"]]);var CI=kI;const LI={key:0,class:"card p-5"},wI={class:"level"},_I={class:"title is-size-5"},EI={class:"columns"},$I={class:"column is-narrow pr-0"},FI={class:"column"},TI={class:"mt-5"};function SI(e,t,i,s,a,n){const o=(0,c.g2)("LogoThumbnail"),l=(0,c.g2)("b-input"),r=(0,c.g2)("b-field");return i.item?((0,c.uX)(),(0,c.CE)("div",LI,[(0,c.Lk)("div",wI,[(0,c.Lk)("p",_I,(0,u.v_)(i.item.title),
11)]),(0,c.Lk)("div",null,[(0,c.Lk)("div",EI,[(0,c.Lk)("div",$I,[(0,c.bF)(o,{item:e.user,"is-type":"roundSmall"},null,8,["item"])]),(0,c.Lk)("div",FI,[(0,c.bF)(r,null,{default:(0,c.k6)(()=>[(0,c.bF)(l,{modelValue:a.comment,"onUpdate:modelValue":t[0]||(t[0]=e=>a.comment=e),type:"textarea",rows:"3"},null,8,["modelValue"])]),_:1}),(0,c.Lk)("p",TI,[(0,c.Lk)("button",{class:"button is-rounded is-small is-primary",onClick:t[1]||(t[1]=(...e)=>i.save&&i.save(...e))},(0,u.v_)(e.$t("Close and comment")),1),(0,c.Lk)("button",{class:"button is-rounded is-small is-default ml-2",onClick:t[2]||(t[2]=(...e)=>n.cancel&&n.cancel(...e))},(0,u.v_)(e.$t("cancel")),1)])])])])])):(0,c.Q3)("",!0)}var AI={components:{LogoThumbnail:rc.A},props:["item","save"],data(){return{comment:null}},methods:{cancel(){this.$parent.$emit("cancelComment")}},computed:{...(0,vi.L8)(["user","tenant"])}};const PI=(0,Li.A)(AI,[["render",SI]]);var II=PI,MI={data(){const e=this.$route.query.unit?parseInt(this.$route.query.unit):null,t=e?this.$store.state.listValues.issue.filters[e]:null,i=this.$route.query.search||this.$route.query.opened||this.$route.query.closed||this.$route.query.status||this.$route.query.type||this.$route.query.priority||this.$route.query.isArchived||this.$route.query.owner||this.$route.query.assignee||this.$route.query.mention;return{FormModal:(0,IE.IG)(CS),items:null,filters:i?{search:this.$route.query.search?this.$route.query.search:null,opened:this.$route.query.opened?this.$route.query.opened:null,closed:this.$route.query.closed?this.$route.query.closed:null,status:this.$route.query.status?JSON.parse(this.$route.query.status):[],type:this.$route.query.type?this.$route.query.type:null,priority:this.$route.query.priority?this.$route.query.priority:null,isArchived:!!this.$route.query.isArchived,owner:this.$route.query.owner?JSON.parse(this.$route.query.owner):null,assignee:this.$route.query.assignee?{id:"unassigned"===this.$route.query.assignee?"unassigned":parseInt(this.$route.query.assignee)}:null,mention:!!this.$route.query.mention}:t?{...t}:{search:null,opened:null,closed:null,status:[],type:null,priority:null,isArchived:!1,owner:null,assignee:null,mention:!1},boardType:"backlog",blankStatusId:-1,itemLoaded:null,unitId:this.$route.query.unit?parseInt(this.$route.query.unit):null,isSupport:this.$route.query.isSupport&&this.$store.state.tenant.settingFeatures.support.isActive,showCreatedDate:void 0!==this.$store.state.listValues.issue.authorColumn?this.$store.state.listValues.issue.authorColumn:!!this.$route.query.isSupport,isGeneralUnit:this.$route.query.generalUnit,createLinkQuery:{},itemsTotal:null,itemsPerPage:30,itemsPageCurrent:this.$route.query.page?parseInt(this.$route.query.page):1,isLoading:!1,showDiscussionModal:!1,showDiscussionModalPhotosDialog:!1,showDiscussionModalVideosDialog:!1,showDiscussionModalFilesDialog:!1,isFilter:!0,sortField:this.$store.state.listValues.issue.sortField,quickSortBy:this.$store.state.listValues.issue.quickSortBy,sortOrder:this.$store.state.listValues.issue.sortOrder,defaultSortOrder:this.$store.state.listValues.issue.sortOrder,formModalCanCancel:["escape","outside"],isLoadingIssueUpdate:null,isIssueAssigneeEdit:null,closeAndCommentModal:null,closeAndCommentModalVisible:!1,draggingRow:null,draggingRowIndex:null,team:[],priorityLabel:{1:"priorityHighest",2:"priorityHigh",3:"priorityMedium",4:"priorityLow",5:"priorityLowest"},unassigned:{fullName:null,id:"unassigned","@id":null,logo:null},issueStatuses:[],issueTypes:[],kanbanStatuses:[],supportTeam:[],config:{accepts(e,t,i){let s=Number(t.dataset.status),a=Number(i.dataset.status);return s!==self.blankStatusId&&a!==s}},mobileFilterVisible:!1,filterSectionExpanded:{status:!0,assignee:!1,mention:!1,type:!1},mobilePriorityModalVisible:!1,mobilePriorityItem:null,mobilePriorityItemIndex:null,mobileAssigneeModalVisible:!1,mobileAssigneeItem:null,mobileAssigneeItemIndex:null,mobileStatusModalVisible:!1,mobileStatusItem:null,mobileStatusItemIndex:null,mobileTypeModalVisible:!1,mobileTypeItem:null,mobileTypeItemIndex:null}},watch:{"$route.query.unit":{handler(e,t){e&&e!==t&&(this.team=[],this.loadTeam())}}},activated(){!0===this.$store.state.refreshCachedKeepAliveList&&(this.$store.state.refreshCachedKeepAliveList=!1,this.loadItems())},beforeUnmount(){this.$store.commit("resetEventSource"),this.contrastObserver&&this.contrastObserver.disconnect()},mounted(){1===parseInt(this.$route.query.create)&&(this.showDiscussionModal=!0,this.$store.state.isFormModalVisible=!0),this.$nextTick(()=>
1{this.contrastObserver=(0,lc.kg)('.tag[style*="background-color"], .button[style*="background-color"]')})},async created(){this.$store.state.currentGroupTab="issues";let e=this.$store.state.listValues.issue;if(this.$isMobile()||(this.unitId?e.hasOwnProperty(this.unitId)?this.boardType=e.boardType[this.unitId]?e.boardType[this.unitId]:"backlog":e[this.unitId]="backlog":this.boardType=e.boardType[0]?e.boardType[0]:"backlog"),await this.loadIssueStatusesAndTypes(),1===parseInt(this.$route.query.create))return this.loadItems(),void(this.showDiscussionModal=!0);this.isSupport?this.$store.state.currentGroup="support":this.isSupport||this.isGeneralUnit||this.unitId||(this.$store.state.currentGroup=null);let t=this.$store.state.currentGroup;if(this.isSupport||this.unitId||t&&("Group"===t["@type"]||t.isProject)||this.$router.push({name:"IssueList",query:{isSupport:!0}}),this.unitId){this.createLinkQuery={unit:this.unitId};const e=this.$route.query.search||this.$route.query.opened||this.$route.query.closed||this.$route.query.status||this.$route.query.type||this.$route.query.priority||this.$route.query.isArchived||this.$route.query.owner||this.$route.query.assignee||this.$route.query.mention,t=this.$store.state.listValues.issue.filters[this.unitId];if(!e&&t)return this.loadTeam(),void this.filterItems()}else!t||["support","generalUnit"].includes(t)||this.isGeneralUnit?"support"===t&&!this.isSupport&&this.isGranted("ADMIN_TENANT")&&this.$router.push({name:"IssueList",query:{support:1}}):this.$store.state.currentGroup.isProject&&!this.isSupport?this.$router.push({name:"IssueList",query:{unit:t.id}}):t=null;this.isSupport?this.setSupportMembers():(this.isLoading=!0,this.loadTeam().then(()=>{this.loadItems(),this.mercureDiscovery()})),void 0===this.boardType&&(this.boardType="backlog")},computed:{CloseAndComment(){return II},...(0,vi.L8)(["tenant","user","isGranted"]),filtersTypeColor(){let e=this.filters.type?this.issueTypes.find(e=>e.name===this.filters.type):null;return e?e.color:"transparent"},isUserInSupportTeam(){for(let e of this.supportTeam)if(e.id===this.user.id)return!0;return!1},projectSettings(){let e=this.$store.state.currentGroup;return e&&e.isProject?e:"support"===e?{hasPriority:!0,hasDueDate:!0,hasTypes:!0}:{hasPriority:!1,hasDueDate:!1,hasTypes:!1}},filtersNumber(){let e=0;return this.filters.search&&e++,this.filters.owner&&e++,this.filters.assignee&&e++,this.filters.mention&&e++,this.filters.issueStatus&&e++,this.filters.type&&e++,this.filters.isArchived&&e++,e},isMoreThanOnePage(){return this.itemsPerPage&&this.itemsTotal>this.itemsPerPage}},methods:{dragstart(e){this.draggingRow=e.row,this.draggingRowIndex=e.index,e.event.dataTransfer.effectAllowed="copy"},dragover(e){const t=e.event.target.closest("tr");t&&t.classList.add("is-selected"),e.event.preventDefault(),e.event.dataTransfer.dropEffect="copy"},dragleave(e){const t=e.event.target.closest("tr");t&&t.classList.remove("is-selected"),e.event.preventDefault()},drop(e){const t=e.event.target.closest("tr");t&&t.classList.remove("is-selected");const i=e.index,s=this.draggingRowIndex;if("priority"===this.sortField&&s!==i){const e=[...this.items],t=e[i]?.priority??e[s]?.priority,[a]=e.splice(s,1);a.priority=t,e.splice(i,0,a),e.forEach((e,t)=>{e.position="desc"===this.sortOrder?this.itemsTotal-1-t:t}),this.items=e;const n=this.items.map(e=>this.$http.plain.patch(`/discussions/${e.id}`,{position:e.position,priority:e.priority}).catch(e=>console.error(e)));Promise.all(n).then(()=>{this.$buefy.toast.open({message:this.$t("Issue order saved"),type:"is-success"})})}this.draggingRow=null,this.draggingRowIndex=null},filterItemsPriority(){this.sortField="priority",this.sortOrder="asc",this.itemsPageCurrent=1,this.$store.state.listValues.issue.sortField="priority",this.$store.state.listValues.issue.sortOrder="asc",this.$store.state.listValues.issue.itemsPageCurrent=1,this.loadItems()},cancelCloseComment(){this.closeAndCommentModal=null,this.closeAndCommentModalVisible=!1},async loadTeam(){if(this.isSupport)this.team=this.supportTeam;else{let e=this.$store.state.currentGroup,i=this.unitId||e&&e.id;if(i)if(e&&e.id===i&&e.userRoles)for(let t of e.userRoles)this.team.push(t.user);else try{const t=await this.$http.plain.get("/user_roles?exists[dateEnded
1]=false&unit="+i),s=t.data["hydra:member"];e&&e.id===i&&(e.userRoles=s);for(let e of s)this.team.push(e.user)}catch(t){console.error(t)}}let e=this.user.id;this.team=this.team.filter(function(t){return t.id!==e})},setSupportMembers(){this.$http.plain.get("/support_teams").then(e=>{for(let t of e.data["hydra:member"])this.supportTeam.push(t.user);this.loadTeam(),this.loadItems(),this.mercureDiscovery()}).catch(e=>console.error(e))},switchBoardType(){this.boardType="kanban"===this.boardType?"backlog":"kanban","kanban"===this.boardType?this.kanbanStatuses=this.issueStatuses:this.itemsPageCurrent=1,this.$store.state.listValues.issue.boardType[this.unitId?this.unitId:0]=this.boardType,this.filterItems()},mediaSrc:ds.F9,hasProjects(){for(let e of this.$store.state.spaces[this.tenant.slug].myGroups)if(e.isProject)return!0;return!1},updateStageBlocks(e,t,i,s){let a=this.items.find(t=>t.id===Number(e.dataset.blockId)),n=this.issueStatuses.find(e=>e.id===Number(t.dataset.status));void 0!==n&&this.$http.plain.patch("/discussions/"+a.id,{issueStatus:n["@id"]}).then(e=>{a.status=this.issueStatuses.find(e=>e.id===Number(t.dataset.status))}).catch(e=>console.error(e)).finally(()=>{})},async loadIssueStatusesAndTypes(){let e=this.isSupport||!this.unitId?"?tenantSupport="+this.tenant.id:"?unit="+this.unitId;return this.isLoading=!0,this.$http.plain.get("/issue_statuses"+e).then(t=>(this.issueStatuses=t.data["hydra:member"],this.$store.state.currentGroupIssueStatuses=this.issueStatuses,"kanban"===this.boardType&&(this.kanbanStatuses=t.data["hydra:member"]),this.filters.opened||this.filters.closed||0!==this.filters.status.length||(this.filters.opened=!0),this.filters.opened&&0===this.filters.status.length&&(this.filters.status=this.issueStatuses.map(e=>e.name)),this.$http.plain.get("/issue_types"+e).then(e=>{this.issueTypes=e.data["hydra:member"],this.$store.state.currentGroupIssueTypes=this.issueTypes}))).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},loadItemModal(e){this.itemLoaded=e,this.$store.state.isFormModalVisible=!0},editIssuePermission(e){return!((!this.isSupport||!this.isUserInSupportTeam&&!this.isGranted("HR_TENANT"))&&this.isSupport)},isIssueAssigneeEditOpen(e){this.isIssueAssigneeEdit=e},openModal(e){this.itemLoaded=null,"photos"===e?this.showDiscussionModalPhotosDialog=!0:"videos"===e?this.showDiscussionModalVideosDialog=!0:"files"===e&&(this.showDiscussionModalFilesDialog=!0),this.$store.state.isFormModalVisible=!0},quickSort(){this.$store.state.listValues.issue.quickSortBy=this.quickSortBy,"new"===this.quickSortBy?this.onSort("mainPost.dateCreated","desc"):"old"===this.quickSortBy?this.onSort("mainPost.dateCreated","asc"):"priority_high"===this.quickSortBy?this.onSort("priority","asc"):"priority_low"===this.quickSortBy&&this.onSort("priority","desc")},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.$store.state.listValues.issue.sortField=e,this.$store.state.listValues.issue.sortOrder=t,this.$store.state.listValues.issue.itemsPageCurrent=1,this.loadItems(!1)},filterItemsOwner(e){this.filters.owner=e,this.filterItems()},filterItemsAssignee(e){this.filters.assignee?.id===e?.id?this.filters.assignee=null:this.filters.assignee=e,this.filterItems()},toggleMentionFilter(){this.filters.assignee?.id===this.user.id?this.filters.assignee=null:this.filters.assignee=this.user,this.filterItems()},toggleStatusOpened(){this.filters.opened?(this.filters.status=this.issueStatuses.map(e=>e.name),this.filters.closed=!1,this.filterItems()):this.filters.status=[]},toggleStatusArchived(){this.filters.closed?(this.filters.opened=!1,this.filters.status=[]):(this.filters.opened=!0,this.filters.status=this.issueStatuses.map(e=>e.name)),this.filterItems()},filterItemsStatus(e){this.filters.status=e,this.filters.opened=!1,this.filters.closed=!1,this.filterItemsStatusDebounced()},filterItemsStatusDebounced:qn()(function(){this.filterItems()},300),filterItemsType(e){this.filters.type=e,this.filterItems()},replaceWindow(e){const t=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent("object"===typeof t?JSON.stringify(t):t)}`).join("&"),i=t?`${this.$route.path}?${t}`:this.$route.path;window.history.replaceState({},"",i)},filterItems(e=!1){let t={};t=this.filters.closed?{closed:this.filters.closed,...t}:{...t},t=this.filters.opened?{opened:this.filters.opened,...t}:{...t},t=this.filters.status?{status:JSON.stringify(this.filters.status),...t}:{...t},t=this.filters.search?{search:this.filters.search,...t}:{...t},t=this.filters.type?{type:this.filters.type,...t}:{...t},t=this.filters.isArchived?{isArchived:this.filters.isArchived,...t}:{...t},t=this.filters.priority?{priority:this.filters.priority,...t}:{...t},t=this.filters.assignee?{assignee:this.filters.assignee.id,...t}:{...t},t=this.filters.owner?{owner:JSON.stringify({id:this.filters.owner.id,firstName:this.filters.owner.firstName,lastName:this.filters.owner.lastName}),...t}:{...t},t=this.filters.mention?{mention:this.user.id,...t}:{...t},t=this.isSupport?{isSupport:!0,...t}:{...t},t=this.unitId?{unit:this.unitId,...t}:{...t},t={page:e?1:this.itemsPageCurrent,...t},t=this.boardType?{board:this.boardType,...t}:{...t},this.unitId&&(this.$store.state.listValues.issue.filters[this.unitId]={...this.filters}),e&&(this.itemsPageCurrent=1,t.page=1),this.loadItems(!1),this.replaceWindow(t)},removeFilters(){this.unitId&&delete this.$store.state.listValues.issue.filters[this.unitId],this.filters={search:null,opened:null,closed:null,status:[],type:null,priority:null,isArchived:!1,owner:null,assignee:null,mention:!1},this.itemsPageCurrent=1,this.loadItems(!1);let e={page:1};e=this.isSupport?{isSupport:!0,...e}:{...e},e=this.unitId?{unit:this.unitId,...e}:{...e},this.replaceWindow(e)},changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.filterItems(!1)},getFiltersQueryString(){let e="";if(this.unitId&&(e+="&unit="+this.unitId),this.isGeneralUnit&&(e+="&exists[unit]=false"),this.isSupport?(this.isGeneralUnit&&(e+="&exists[unit]=false"),e+="&exists[isSupport]=true",this.isUserInSupportTeam||this.isGranted("HR_TENANT")||(e+="&owner="+this.user.id)):e+="&exists[isSupport]=false",e+="&exists[isIssue]=true",this.filters.opened)this.filters.isArchived=!1;else if(this.filters.closed)this.filters.isArchived=!0;else if(this.filters.status.length>0){this.filters.isArchived=!1;for(let t of this.filters.status){let i=this.issueStatuses.find(e=>e.name===t);i&&(e+="&issueStatus[]="+i.id)}}else this.filters.isArchived=!1;if(this.filters.type){let t=this.issueTypes.find(e=>e.name===this.filters.type);t&&(e+="&issueType="+t.id)}return this.filters.assignee&&("unassigned"===this.filters.assignee.id?e+="&exists[assignee]=false":e+="&assignee="+this.filters.assignee.id),this.filters.mention&&(e+="&mainPost.mentions="+this.user.id),this.filters.owner&&(e+="&owner="+this.filters.owner.id),this.filters.isArchived?e+="&exists[isArchived]=true":e+="&exists[isArchived]=false",this.filters.search&&(e+="&title="+encodeURIComponent(this.filters.search)),e},getOrderQueryString(){let e="&order["+this.sortField+"]="+this.sortOrder;return"priority"===this.sortField&&(e+="&order[position]="+this.sortOrder),e},loadItems(e=!0){e&&(this.isLoading=!0);let t=this.getFiltersQueryString(),i=this.getOrderQueryString();"kanban"===this.boardType?(this.items=[],this.getPageOfItems("/issues?"+t)):(this.unitId!==this.$store.state.listValues.issue.unitId&&(this.$store.commit("resetListValuesIssue"),this.$store.state.listValues.issue.unitId=this.unitId,this.itemsPageCurrent=1),this.$http.plain.get("/issues?page="+this.itemsPageCurrent+t+i).then(e=>{this.items=e.data["hydra:member"],this.itemsTotal=e.data["hydra:totalItems"]}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1}))},getPageOfItems(e){if(void 0===e)return this.checkBlankStatus(),void(this.isLoading=!1);this.$http.plain.get(e).then(e=>(this.items=this.items.concat(e.data["hydra:member"]),this.itemsTotal=e.data["hydra:totalItems"],"hydra:next"in e.data["hydra:view"]?this.getPageOfItems(e.data["hydra:view"]["hydra:next"].replace("/api/v1","")):this.getPageOfItems(void 0))).catch(e=>{console.error(e)}).finally(()=>{})},checkBlankStatus(){let e=this.items.find(e=>!e.issueStatus);e&&!this.kanbanStatuses.find(e=>e.id===this.blankStatusId)&&this.kanbanStatuses.push({id:this.blankStatusId,name:this.$t("Backlog")})},issueSetAction(e,t,i,s){let a={};switch(t){case"assignee":a.assignee=i["@id"];break;case"priority":a.priority=i;break;case"dueDate":a.dueDate=i;break;case"status":if("archive"===i)a.isArchived=!0,a.issueStatus=null,this.items[s].issueStatus=null;else{if("archive_and_comment"===i)return this.closeAndCommentMod
1al=e,void(this.closeAndCommentModalVisible=!0);"archive_and_comment_save"===i?(a.isArchived=!0,a.issueStatus=null,this.items[s].issueStatus=null):(a.issueStatus=i["@id"],a.isArchived=!1,this.items[s].issueStatus=i)}break;case"type":a.issueType=i["@id"],this.items[s].issueType=i;break}this.isLoading=!0,this.isLoadingIssueUpdate=e.id,this.$http.plain.patch("/discussions/"+e.id,a).then(i=>{if("status"===t&&a.isArchived){let t=this.items.findIndex(t=>t.id===e.id);-1!==t&&this.items.splice(t,1)}}).catch(e=>console.error(e)).finally(()=>{this.isLoadingIssueUpdate=null,this.isIssueAssigneeEdit=null,this.isLoading=!1})},mercureTopic(){let e=null;return this.unitId?e="group_"+this.unitId:this.isSupport&&(e="support_"+this.tenant.id),e},mercureDiscovery(){if(!1===ki.uW||!1===this.tenant?.settingFeatures?.realtime?.isActive)return;let e=this.mercureTopic();e&&this.$http.plain.get("/mercure-token/"+e).then(e=>{this.mercureSubscribe(e.data)}).catch(e=>console.error(e))},mercureSubscribe(e){},updateCanCancel(e){this.formModalCanCancel=e},filterItemsByWord:qn()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return!1;let t=this.filters.search;(null===t||0===t.length||t.length>=3)&&this.filterItems()},400),toggleAuthorColumn(){this.showCreatedDate=!this.showCreatedDate,this.$store.state.listValues.issue.authorColumn=this.showCreatedDate},handleRowDoubleClick(e){this.editIssuePermission(e)&&this.loadItemModal(e)},openMobileFilter(){this.mobileFilterVisible=!0,document.body.style.overflow="hidden"},closeMobileFilter(){this.mobileFilterVisible=!1,document.body.style.overflow=""},toggleFilterSection(e){this.filterSectionExpanded[e]=!this.filterSectionExpanded[e]},openMobilePriorityModal(e,t){this.editIssuePermission(e)&&(this.mobilePriorityItem=e,this.mobilePriorityItemIndex=t,this.mobilePriorityModalVisible=!0)},selectMobilePriority(e){this.mobilePriorityItem&&(this.items[this.mobilePriorityItemIndex].priority=e,this.issueSetAction(this.mobilePriorityItem,"priority",e),this.mobilePriorityModalVisible=!1,this.mobilePriorityItem=null,this.mobilePriorityItemIndex=null)},openMobileAssigneeModal(e,t){this.editIssuePermission(e)&&(this.mobileAssigneeItem=e,this.mobileAssigneeItemIndex=t,this.mobileAssigneeModalVisible=!0)},selectMobileAssignee(e){this.mobileAssigneeItem&&(null===e?(this.items[this.mobileAssigneeItemIndex].assignee=null,this.issueSetAction(this.mobileAssigneeItem,"assignee",{"@id":null})):(this.items[this.mobileAssigneeItemIndex].assignee=e,this.issueSetAction(this.mobileAssigneeItem,"assignee",e)),this.mobileAssigneeModalVisible=!1,this.mobileAssigneeItem=null,this.mobileAssigneeItemIndex=null)},openMobileStatusModal(e,t){this.editIssuePermission(e)&&(this.mobileStatusItem=e,this.mobileStatusItemIndex=t,this.mobileStatusModalVisible=!0)},selectMobileStatus(e){this.mobileStatusItem&&("archive"===e?this.issueSetAction(this.mobileStatusItem,"status","archive",this.mobileStatusItemIndex):(this.items[this.mobileStatusItemIndex].issueStatus=e,this.issueSetAction(this.mobileStatusItem,"status",e,this.mobileStatusItemIndex)),this.mobileStatusModalVisible=!1,this.mobileStatusItem=null,this.mobileStatusItemIndex=null)},openMobileTypeModal(e,t){this.editIssuePermission(e)&&(this.mobileTypeItem=e,this.mobileTypeItemIndex=t,this.mobileTypeModalVisible=!0)},selectMobileType(e){this.mobileTypeItem&&(this.items[this.mobileTypeItemIndex].issueType=e,this.issueSetAction(this.mobileTypeItem,"type",e,this.mobileTypeItemIndex),this.mobileTypeModalVisible=!1,this.mobileTypeItem=null,this.mobileTypeItemIndex=null)}},components:{FontAwesomeIcon:zs.gc,CloseAndComment:II,BCheckbox:D_.cX,GroupHeader:vh.A,VueKanban:QT.A,LogoThumbnail:rc.A,Show:CI,UserSearchDiscussAutocomplete:yS.A}};const xI=(0,Li.A)(MI,[["render",OT],["__scopeId","data-v-6778f913"]]);var NI=xI;const UI={class:"o-fullwidth"},DI={class:"mb-5 is-flex"},XI={class:"title mt-1"},VI={key:0,class:"title-count-badge"},RI={class:"is-flex is-flex-wrap-wrap is-align-items-center pb-3",style:{gap:"8px"}},OI={class:"pill-label"},QI={class:"pill-value"},BI={class:"pill-label"},GI={class:"author-pill-dropdown"},WI={class:"author-pill-header"},jI={class:"author-input-row"},zI={class:"author-input-icon"},qI=["placeholder"],JI={key:0,class:"author-results"},HI={key:0,class:"author-results-empty"},KI={key:1,class:"author-results-empty"},YI=["onClick"],ZI={class:"author-result-name"},eM={key:0,class:"author-result-email"},tM={class:"pill-label"},iM={class:"pill-value"},sM={class:"pill-label"},aM={class:"author-pill-dropdown"},nM={class:"author-pill-header"},oM={class:"author-input-row"},lM={class:"author-input-icon"},rM=["placeholder"],dM={key:0,class:"author-results"},cM={key:0,class:"author-results-empty"},uM={key:1,class:"author-results-empty"},mM=["onClick"],pM={class:"author-result-name"},hM={key:0,class:"author-result-email"},gM={class:"pill-label"},fM={class:"pill-value"},bM={class:"pill-label"},yM={class:"date-chip-dropdown"},vM={class:"list-filter-pill"},kM={key:0},CM={key:1,class:"orgo-table-wrap"},LM={class:"nowrap fs-14"},wM={class:"tag is-rounded is-small is-default"},_M={key:1,class:"has-text-grey"},EM={key:1,class:"has-text-grey"},$M={key:0,class:"fs-14"},FM={class:"has-text-weight-semibold"},TM={key:0,class:"has-text-grey"},SM={key:1,class:"has-text-grey"},AM={key:1,class:"has-text-grey"},PM={key:0,class:"fs-14 has-text-grey"},IM={key:1,class:"has-text-grey"},MM={class:"content"},xM={key:1,class:"log-details-pre"},NM={key:2,class:"has-text-grey"};function UM(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("list-filter-pill"),r=(0,c.g2)("font-awesome-icon"),d=(0,c.g2)("b-dropdown"),p=(0,c.g2)("b-datepicker"),h=(0,c.g2)("b-field"),g=(0,c.g2)("b-table-column"),f=(0,c.g2)("router-link"),b=(0,c.g2)("PersonalIdChangeLogDetails"),y=(0,c.g2)("b-table");return(0,c.uX)(),(0,c.CE)("section",UI,[(0,c.Lk)("div",DI,[(0,c.Lk)("h2",XI,[(0,c.eW)((0,u.v_)(e.$t("Logs"))+" ",1),a.itemsTotal&&a.itemsTotal>0?((0,c.uX)(),(0,c.CE)("span",VI,(0,u.v_)(a.itemsTotal),1)):(0,c.Q3)("",!0)])]),(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("div",RI,[(0,c.bF)(l,{label:e.$t("Action"),options:n.actionPillOptions,"model-value":a.filters.action,"onUpdate:modelValue":n.onPillActionChange},null,8,["label","options","model-value","onUpdate:modelValue"]),(0,c.bF)(l,{label:e.$t("Entity"),options:n.entityTypePillOptions,"model-value":a.filters.entityType,"onUpdate:modelValue":n.onPillEntityTypeChange},null,8,["label","options","model-value","onUpdate:modelValue"]),(0,c.bF)(d,{ref:"authorDropdown","append-to-body":"","close-on-click":!1,position:"is-bottom-right",onActiveChange:n.onAuthorDropdownToggle},{trigger:(0,c.k6)(()=>[(0,c.Lk)("button",{class:(0,u.C4)(["pill-trigger",{"is-active":a.filters.owner}])},[a.filters.owner?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("span",{class:"pill-clear",onClick:t[1]||(t[1]=(0,m.D$)((...e)=>n.clearAuthorFilter&&n.clearAuthorFilter(...e),["stop"]))},[(0,c.bF)(r,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",OI,(0,u.v_)(e.$t("Author")),1),t[15]||(t[15]=(0,c.Lk)("span",{class:"pill-divider"},null,-1)),(0,c.Lk)("span",QI,(0,u.v_)(a.filters.ownerLabel),1)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.bF)(r,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,c.Lk)("span",BI,(0,u.v_)(e.$t("Author")),1)],64))],2)]),default:(0,c.k6)(()=>[(0,c.Lk)("div",GI,[(0,c.Lk)("div",WI,(0,u.v_)(e.$t("Author")),1),(0,c.Lk)("div",jI,[(0,c.Lk)("span",zI,[(0,c.bF)(r,{icon:"fa-light fa-magnifying-glass"})]),(0,c.bo)((0,c.Lk)("input",{ref:"authorInput","onUpdate:modelValue":t[2]||(t[2]=e=>a.authorSearchQuery=e),type:"text",class:"author-input",placeholder:e.$t("Search by name or email"),onInput:t[3]||(t[3]=e=>n.searchAuthors(a.authorSearchQuery)),onClick:t[4]||(t[4]=(0,m.D$)(()=>{},["stop"]))},null,40,qI),[[m.Jo,a.authorSearchQuery]])]),a.authorSearchQuery&&a.authorSearchQuery.length>=2?((0,c.uX)(),(0,c.CE)("ul",JI,[a.isSearchingAuthors?((0,c.uX)(),(0,c.CE)("li",HI,[(0,c.bF)(r,{icon:"fa-light fa-spinner",spin:"",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Searching")),1)])):0===a.authorSearchResults.length?((0,c.uX)(),(0,c.CE)("li",KI,(0,u.v_)(e.$t("No results found")),1)):((0,c.uX)(!0),(0,c.CE)(c.FK,{key:2},(0,c.pI)(a.authorSearchResults,e=>((0,c.uX)(),(0,c.CE)("li",{key:e.id,class:"author-result",onClick:(0,m.D$)(t=>n.onAuthorSelect(e),["stop"])},[(0,c.Lk)("strong",ZI,(0,u.v_)(e.fullName),1),e.email?((0,c.uX)(),(0,c.CE)("small",eM,(0,u.v_)(e.email),1)):(0,c.Q3)("",!0)],8,YI))),128))])):(0,c.Q3)("",!0)])]),_:1},8,["onActiveChange"]),(0,c.bF)(d,{ref:"userDropdown","append-to-body":"","close-on-click":!1,position:"is-bottom-right",onActiveChange:n.onUserDropdownToggle},{trigger:(0,c.k6)(()=>[(0,c.Lk)("button",{class:(0,u.C4)(["pill-trigger",{"is-active":a.filters.user}])},[a.filters.user?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("span",{class:"pill-clear",onClick:t[5]||(t[5]=(0,m.D$)((...e)=>n.clearUserFilter&&n.clearUserFilter(...e),["stop"]))},[(0,c.bF)(r,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",tM,(0,u.v_)(e.$t("User")),1),t[16]||(t[16]=(0,c.Lk)("span",{class:"pill-divider"},null,-1)),(0,c.Lk)("span",iM,(0,u.v_)(a.filters.userLabel),1)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.bF)(r,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,c.Lk)("span",sM,(0,u.v_)(e.$t("User")),1)],64))],2)]),default:(0,c.k6)(()=>[(0,c.Lk)("div",aM,[(0,c.Lk)("div",nM,(0,u.v_)(e.$t("User")),1),(0,c.Lk)("div",oM,[(0,c.Lk)("span",lM,[(0,c.bF)(r,{icon:"fa-light fa-magnifying-glass"})]),(0,c.bo)((0,c.Lk)("input",{ref:"userInput","onUpdate:modelValue":t[6]||(t[6]=e=>a.userSearchQuery=e),type:"text",class:"author-input",placeholder:e.$t("Search by name or email"),onInput:t[7]||(t[7]=e=>n.searchUsers(a.userSearchQuery)),onClick:t[8]||(t[8]=(0,m.D$)(()=>{},["stop"]))},null,40,rM),[[m.Jo,a.userSearchQuery]])]),a.userSearchQuery&&a.userSearchQuery.length>=2?((0,c.uX)(),(0,c.CE)("ul",dM,[a.isSearchingUsers?((0,c.uX)(),(0,c.CE)("li",cM,[(0,c.bF)(r,{icon:"fa-light fa-spinner",spin:"",class:"mr-2"}),(0,c.eW)(" "+(0,u.v_)(e.$t("Searching")),1)])):0===a.userSearchResults.length?((0,c.uX)(),(0,c.CE)("li",uM,(0,u.v_)(e.$t("No results found")),1)):((0,c.uX)(!0),(0,c.CE)(c.FK,{key:2},(0,c.pI)(a.userSearchResults,e=>((0,c.uX)(),(0,c.CE)("li",{key:e.id,class:"author-result",onClick:(0,m.D$)(t=>n.onUserSelect(e),["stop"])},[(0,c.Lk)("strong",pM,(0,u.v_)(e.fullName),1),e.email?((0,c.uX)(),(0,c.CE)("small",hM,(0,u.v_)(e.email),1)):(0,c.Q3)("",!0)],8,mM))),128))])):(0,c.Q3)("",!0)])]),_:1},8,["onActiveChange"]),(0,c.bF)(d,{"append-to-body":"","close-on-click":!1,position:"is-bottom-right"},{trigger:(0,c.k6)(()=>[(0,c.Lk)("button",{class:(0,u.C4)(["pill-trigger",{"is-active":a.filters.dateBegin||a.filters.dateEnd}])}
1,[a.filters.dateBegin||a.filters.dateEnd?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("span",{class:"pill-clear",onClick:t[9]||(t[9]=(0,m.D$)(e=>{a.filters.dateBegin=null,a.filters.dateEnd=null,n.filterItems(!0)},["stop"]))},[(0,c.bF)(r,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",gM,(0,u.v_)(e.$t("Date")),1),t[17]||(t[17]=(0,c.Lk)("span",{class:"pill-divider"},null,-1)),(0,c.Lk)("span",fM,(0,u.v_)(n.dateRangeLabel),1)],64)):((0,c.uX)(),(0,c.CE)(c.FK,{key:1},[(0,c.bF)(r,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,c.Lk)("span",bM,(0,u.v_)(e.$t("Date")),1)],64))],2)]),default:(0,c.k6)(()=>[(0,c.Lk)("div",yM,[(0,c.bF)(h,{label:e.$t("Date after")},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.filters.dateBegin,"onUpdate:modelValue":[t[10]||(t[10]=e=>a.filters.dateBegin=e),t[11]||(t[11]=e=>n.filterItems(!0))],size:"is-small",rounded:"",inline:""},null,8,["modelValue"])]),_:1},8,["label"]),(0,c.bF)(h,{label:e.$t("Date before")},{default:(0,c.k6)(()=>[(0,c.bF)(p,{modelValue:a.filters.dateEnd,"onUpdate:modelValue":[t[12]||(t[12]=e=>a.filters.dateEnd=e),t[13]||(t[13]=e=>n.filterItems(!0))],size:"is-small",rounded:"",inline:""},null,8,["modelValue"])]),_:1},8,["label"])])]),_:1}),(0,c.Lk)("div",vM,[(0,c.Lk)("button",{class:"pill-trigger",onClick:t[14]||(t[14]=(...e)=>n.loadItemsPage&&n.loadItemsPage(...e))},[(0,c.bF)(r,{icon:"fa-light fa-refresh"})])])]),a.items&&0===a.items.length&&!a.isLoading?((0,c.uX)(),(0,c.CE)("div",kM,[(0,c.Lk)("p",null,(0,u.v_)("*"+e.$t("No logs available")),1)])):(0,c.Q3)("",!0),a.items&&a.items.length>0?((0,c.uX)(),(0,c.CE)("div",CM,[(0,c.bF)(y,{data:a.items,detailed:"","detail-key":"id","show-detail-icon":"",paginated:a.isMoreThanOnePage,"pagination-rounded":"","backend-pagination":"","mobile-cards":!1,total:a.itemsTotal,"per-page":a.itemsPerPage,"current-page":a.itemsPageCurrent,striped:"",onPageChange:n.changeListPage},{detail:(0,c.k6)(t=>[(0,c.Lk)("div",MM,["personal_id_changed"===t.row.action?((0,c.uX)(),(0,c.Wv)(b,{key:0,log:t.row,"can-reveal":e.isGranted("HR_TENANT")||e.isGranted("FINANCIAL_TENANT")},null,8,["log","can-reveal"])):t.row.details?((0,c.uX)(),(0,c.CE)("pre",xM,(0,u.v_)(n.formatDetails(t.row.details)),1)):((0,c.uX)(),(0,c.CE)("p",NM,(0,u.v_)(e.$t("No details")),1))])]),default:(0,c.k6)(()=>[(0,c.bF)(g,{field:"id",label:e.$t("ID"),width:"50"},{default:(0,c.k6)(e=>[(0,c.eW)((0,u.v_)(e.row.id),1)]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Date")},{default:(0,c.k6)(t=>[(0,c.Lk)("span",LM,(0,u.v_)(e.$filters.format(t.row.dateCreated,"dateTime")),1)]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Action")},{default:(0,c.k6)(e=>[(0,c.Lk)("span",wM,(0,u.v_)(e.row.action),1)]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Author")},{default:(0,c.k6)(e=>[e.row.owner?((0,c.uX)(),(0,c.Wv)(f,{key:0,to:{name:"UserShow",params:{item:e.row.owner.id}},class:"has-text-link fs-14"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.row.owner.fullName),1)]),_:2},1032,["to"])):((0,c.uX)(),(0,c.CE)("span",_M," - "))]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("User")},{default:(0,c.k6)(e=>[e.row.user?((0,c.uX)(),(0,c.Wv)(f,{key:0,to:{name:"UserShow",params:{item:e.row.user.id}},class:"has-text-link fs-14"},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.row.user.fullName),1)]),_:2},1032,["to"])):((0,c.uX)(),(0,c.CE)("span",EM," - "))]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("Entity")},{default:(0,c.k6)(e=>[e.row.entityType?((0,c.uX)(),(0,c.CE)("span",$M,[(0,c.Lk)("span",FM,(0,u.v_)(e.row.entityType),1),e.row.entityName?((0,c.uX)(),(0,c.CE)("span",TM," â "+(0,u.v_)(e.row.entityName),1)):e.row.entityId?((0,c.uX)(),(0,c.CE)("span",SM," #"+(0,u.v_)(e.row.entityId),1)):(0,c.Q3)("",!0)])):((0,c.uX)(),(0,c.CE)("span",AM," - "))]),_:1},8,["label"]),(0,c.bF)(g,{label:e.$t("IP")},{default:(0,c.k6)(e=>[e.row.lastIp?((0,c.uX)(),(0,c.CE)("span",PM,(0,u.v_)(e.row.lastIp),1)):((0,c.uX)(),(0,c.CE)("span",IM," - "))]),_:1},8,["label"])]),_:1},8,["data","paginated","total","per-page","current-page","onPageChange"])])):(0,c.Q3)("",!0)])}var DM=i(44352);const XM=["create","update","remove","moderate","unmoderate","confirm_identity","upload_identity","csv","decrypt_custom_field","decrypt_custom_field_failed","custom_field_encryption_enabled","custom_field_encryption_disabled"],VM=["Adhesion","Contact","ContractUser","Course","CourseLesson","EmailTemplate","Event","Form","Group","Identity","LocalCenter","Newsletter","NewsletterTemplate","Product","Query","Role","RoleGroup","Unit","User"];var RM={name:"TenantLogs",components:{FontAwesomeIcon:zs.gc,ListFilterPill:Wu.A,PersonalIdChangeLogDetails:DM.A},data(){return{items:null,filters:{action:this.$route.query.action?this.$route.query.action:null,entityType:this.$route.query.entityType?this.$route.query.entityType:null,owner:this.$route.query.owner?parseInt(this.$route.query.owner):null,ownerLabel:this.$route.query.ownerLabel?this.$route.query.ownerLabel:null,user:this.$route.query.user?parseInt(this.$route.query.user):null,userLabel:this.$route.query.userLabel?this.$route.query.userLabel:null,dateBegin:this.$route.query.dateBegin?new Date(this.$route.query.dateBegin):null,dateEnd:this.$route.query.dateEnd?new Date(this.$route.query.dateEnd):null},itemsTotal:null,itemsPerPage:15,itemsPageCurrent:this.$route.query.page?parseInt(this.$route.query.page):1,isMoreThanOnePage:!1,isLoading:!1,authorSearchQuery:"",authorSearchResults:[],isSearchingAuthors:!1,userSearchQuery:"",userSearchResults:[],isSearchingUsers:!1}},computed:{...(0,vi.L8)(["tenant","isGranted"]),actionPillOptions(){return XM.map(e=>({value:e,label:this.$t("logAction."+e)}))},entityTypePillOptions(){return VM.map(e=>({value:e,label:e}))},dateRangeLabel(){const e=[];return this.filters.dateBegin&&e.push(this.$filters.format(this.filters.dateBegin)),this.filters.dateEnd&&e.push(this.$filters.format(this.filters.dateEnd)),e.join(" - ")}},watch:{$route(e,t){if(!t||"TenantLogs"!==e.name||t.name!==e.name)return;const i=e.query.page?parseInt(e.query.page):1;i!==this.itemsPageCurrent&&(this.itemsPageCurrent=i),this.loadItemsPage()}},created(){this.isGranted("ADMIN_TENANT")?this.loadItemsPage():this.$router.push({name:"TenantUpdate"})},methods:{onPillActionChange(e){this.filters.action=e,this.filterItems(!0)},onPillEntityTypeChange(e){this.filters.entityType=e,this.filterItems(!0)},searchAuthors:qn()(function(e){!e||e.length<2?this.authorSearchResults=[]:(this.isSearchingAuthors=!0,this.$http.plain.get("/search-user/"+encodeURIComponent(e)).then(e=>{this.authorSearchResults=Array.isArray(e.data)?e.data:[]}).catch(e=>{console.log(e),this.authorSearchResults=[]}).finally(()=>{this.isSearchingAuthors=!1}))},300),onAuthorSelect(e){e&&(this.filters.owner=e.id,this.filters.ownerLabel=e.fullName,this.authorSearchQuery="",this.authorSearchResults=[],this.$refs.authorDropdown&&this.$refs.authorDropdown.toggle(),this.filterItems(!0))},clearAuthorFilter(){this.filters.owner=null,this.filters.ownerLabel=null,this.filterItems(!0)},onAuthorDropdownToggle(e){e?this.$nextTick(()=>{const e=this.$refs.authorInput;e&&"function"===typeof e.focus&&e.focus()}):(this.authorSearchQuery="",this.authorSearchResults=[])},searchUsers:qn()(function(e){!e||e.length<2?this.userSearchResults=[]:(this.isSearchingUsers=!0,this.$http.plain.get("/search-user/"+encodeURIComponent(e)).then(e=>{this.userSearchResults=Array.isArray(e.data)?e.data:[]}).catch(e=>{console.log(e),this.userSearchResults=[]}).finally(()=>{this.isSearchingUsers=!1}))},300),onUserSelect(e){e&&(this.filters.user=e.id,this.filters.userLabel=e.fullName,this.userSearchQuery="",this.userSearchResults=[],this.$refs.userDropdown&&this.$refs.userDropdown.toggle(),this.filterItems(!0))},clearUserFilter(){this.filters.user=null,this.filters.userLabel=null,this.filterItems(!0)},onUserDropdownToggle(e){e?this.$nextTick(()=>{const e=this.$refs.userInput;e&&"function"===typeof e.focus&&e.focus()}):(this.userSearchQuery="",this.userSearchResults=[])},filterItems(e=!1){const t={};this.filters.action&&(t.action=this.filters.action),this.filters.entityType&&(t.entityType=this.filters.entityType),this.filters.owner&&(t.owner=this.filters.owner,this.filters.ownerLabel&&(t.ownerLabel=this.filters.ownerLabel)),this.filters.user&&(t.user=this.filters.user,this.filters.userLabel&&(t.userLabel=this.filters.userLabel)),this.filters.dateBegin&&(t.dateBegin=yC()(this.filters.dateBegin).format("YYYY-MM-DD")),this.filters.dateEnd&&(t.dateEnd=yC()(this.filters.dateEnd).format("YYYY-MM-DD")),t.page=e?1:this.itemsPageCurrent,this.$router.push({name:"TenantLogs",query:t})},changeListPage(e){this.itemsPageCurrent=e,this.filterItems(!1)},getFiltersQueryString(){let e="";return this.filters.action&&(e+="&action="+encodeURIComponent(this.filters.action)),this.filters.entityType&&(e+="&entityType="+encodeURIComponent(this.filters.entityType)),this.filters.owner&&(e+="&owner="+this.filters.owner),this.filters.user&&(e+="&user="+this.filters.user),this.filters.dateBegin&&(e+="&dateCreated[after]="+yC()(this.filters.dateBegin).format("YYYY-MM-DD")),this.filters.dateEnd&&(e+="&dateCreated[before]="+yC()(this.filters.dateEnd).add(1,"day").format("YYYY-MM-DD")),e},loadItemsPage(){this.items=null,this.isLoading=!0;const e=this.getFiltersQueryString();return this.$http.plain.get("/logs?page="+this.itemsPageCurrent+"&order[dateCreated]=DESC"+e).then(e=>{this.items=e.data["hydra:member"],this.itemsTotal=e.data["hydra:totalItems"],this.isMoreThanOnePage=void 0!==e.data["hydra:view"]["hydra:first"]}
1).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})},formatDetails(e){if(!e)return"";try{const t="string"===typeof e?JSON.parse(e):e;return JSON.stringify(t,null,2)}catch{return String(e)}}}};const OM=(0,Li.A)(RM,[["render",UM],["__scopeId","data-v-2ef8bc7d"]]);var QM=OM;const BM={class:"o-maxwidth"},GM={class:"icon is-small"},WM={class:"icon is-small"},jM={key:1,class:"contact-header"},zM={class:"header-top-row"},qM={class:"title mb-0"},JM={class:"header-actions"},HM={class:"icon-text"},KM={class:"icon is-small"},YM={class:"icon is-small"},ZM={class:"add-contact-text"},ex={class:"icon-text"},tx={class:"icon is-small"},ix={class:"page-list-controls mt-5"},sx={class:"controls-left pt-2 pb-2"},ax={class:"control"},nx={class:"filters-inline-group"},ox={class:"local-center-filter-label"},lx={class:"is-small ml-1"},rx={class:"dropdown-item-search"},dx={key:0},cx={class:"is-small ml-1"},ux={class:"level is-mobile"},mx={class:"level-left"},px={class:"level-item"},hx={class:"tag is-rounded is-small ml-1"},gx={key:0,class:"level-right"},fx={class:"level-item"},bx={class:"level is-mobile"},yx={class:"level-left"},vx={class:"level-item"},kx={class:"level-item"},Cx={class:"tag is-rounded is-small ml-1"},Lx={key:0,class:"level-right"},wx={class:"level-item"},_x={class:"is-small ml-1"},Ex={class:"level is-mobile"},$x={class:"level-left"},Fx={class:"level-item"},Tx={key:0,class:"level-right"},Sx={class:"level-item"},Ax={class:"level is-mobile"},Px={class:"level-left"},Ix={class:"level-item"},Mx={key:0,class:"level-right"},xx={class:"level-item"},Nx={class:"is-small ml-1"},Ux={class:"level is-mobile"},Dx={class:"level-left"},Xx={class:"level-item"},Vx={class:"tag is-rounded is-small ml-1"},Rx={key:0,class:"level-right"},Ox={class:"level-item"},Qx={class:"level is-mobile"},Bx={class:"level-left"},Gx={class:"level-item"},Wx={class:"tag is-rounded is-small ml-1"},jx={key:0,class:"level-right"},zx={class:"level-item"},qx={class:"level is-mobile"},Jx={class:"level-left"},Hx={class:"level-item"},Kx={class:"tag is-rounded is-small ml-1"},Yx={key:0,class:"level-right"},Zx={class:"level-item"},eN={class:"level is-mobile"},tN={class:"level-left"},iN={class:"level-item"},sN={class:"tag is-rounded is-small ml-1"},aN={key:0,class:"level-right"},nN={class:"level-item"},oN={class:"controls-right level-right pt-2 pb-2"},lN={class:"icon is-small"},rN={class:"icon is-small"},dN={class:"mt-3"},cN={key:0,class:"bulk-action-bar mb-3"},uN={class:"level is-mobile"},mN={class:"level-left"},pN={class:"level-item"},hN={class:"has-text-weight-medium is-size-6-half"},gN={class:"level-right"},fN={class:"level-item"},bN={class:"icon-text"},yN={class:"icon is-small"},vN=["onClick"],kN={class:"is-size-6-half ml-2"},CN={key:0,class:"is-size-6-half"},LN={key:1,class:"is-size-6-half"},wN={key:0,class:"is-size-6-half"},_N={key:0,class:"is-size-6-half"},EN=["onClick"],$N={class:"icon is-small"},FN=["onClick"],TN={class:"icon is-small"},SN={key:0,class:"tag is-rounded is-small is-success"},AN={key:1,class:"tag is-rounded is-small is-light"},PN={key:2,class:"tag is-rounded is-small is-default"},IN={key:1,class:"has-text-grey is-size-7 is-clickable"},MN={class:"status-item-content"},xN={class:"status-item-content"},NN={key:0,class:"tags"},UN=["onClick"],DN={key:0,class:"is-size-7"},XN=["href"],VN={class:"icon-text"},RN={class:"icon is-small"},ON={class:"icon is-small"},QN={class:"icon is-small"},BN={class:"icon-text"},GN={class:"icon is-small"},WN={class:"icon-text"},jN={class:"icon is-small"},zN={class:"icon-text"},qN={class:"icon is-small"},JN={class:"icon-text"},HN={class:"icon is-small"},KN={class:"icon-text"},YN={class:"icon is-small"},ZN={class:"icon-text"},eU={class:"icon is-small"};function tU(e,t,i,s,a,n){const o=(0,c.g2)("font-awesome-icon"),l=(0,c.g2)("MobileViewHeader"),r=(0,c.g2)("b-input"),d=(0,c.g2)("b-button"),p=(0,c.g2)("b-field"),h=(0,c.g2)("b-dropdown-item"),g=(0,c.g2)("b-dropdown"),f=(0,c.g2)("b-icon"),b=(0,c.g2)("b-table-column"),y=(0,c.g2)("b-tooltip"),v=(0,c.g2)("b-table"),k=(0,c.g2)("ContactShowContent"),C=(0,c.g2)("ItemViewModal"),L=(0,c.g2)("ContactCreateContent");return(0,c.uX)(),(0,c.CE)("section",BM,[e.$isMobile()?((0,c.uX)(),(0,c.Wv)(l,{key:0,"back-route":"Dashboard",title:e.$t("Contacts")}
1,{actions:(0,c.k6)(()=>[(0,c.Lk)("button",{class:"button is-light is-small is-rounded mr-1",onClick:t[0]||(t[0]=(...e)=>n.toggleMobileSearch&&n.toggleMobileSearch(...e))},[(0,c.Lk)("span",GM,[(0,c.bF)(o,{icon:"fa-light fa-search"})])]),(0,c.Lk)("button",{class:"button is-primary is-small is-rounded",onClick:t[1]||(t[1]=(...e)=>n.openCreateModal&&n.openCreateModal(...e))},[(0,c.Lk)("span",WM,[(0,c.bF)(o,{icon:"fa-light fa-plus"})])])]),_:1},8,["title"])):((0,c.uX)(),(0,c.CE)("div",jM,[(0,c.Lk)("div",zM,[(0,c.Lk)("h2",qM,(0,u.v_)(e.$t("Contacts")),1),(0,c.Lk)("div",JM,[e.isGranted("ROLE_SUPER_ADMIN")&&24===e.tenant.id?((0,c.uX)(),(0,c.CE)("button",{key:0,class:(0,u.C4)(["button is-light is-small is-rounded",{"is-loading":a.isSyncingContacts}]),onClick:t[2]||(t[2]=(...e)=>n.syncContacts&&n.syncContacts(...e))},[(0,c.Lk)("span",HM,[(0,c.Lk)("span",KM,[(0,c.bF)(o,{icon:"fa-light fa-sync-alt"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Sync Contacts")),1)])],2)):(0,c.Q3)("",!0),(0,c.Lk)("button",{class:"button is-primary is-small is-rounded",onClick:t[3]||(t[3]=(...e)=>n.openCreateModal&&n.openCreateModal(...e))},[(0,c.Lk)("span",YM,[(0,c.bF)(o,{icon:"fa-light fa-plus"})]),(0,c.Lk)("span",ZM,(0,u.v_)(e.$t("Add Contact")),1)]),!e.$isMobile()&&n.hasCsvExportAccess?((0,c.uX)(),(0,c.CE)("button",{key:"filterList",class:(0,u.C4)(["button is-light is-small is-rounded",{"is-loading":a.isLoadingCSV}]),onClick:t[4]||(t[4]=(...e)=>n.csvExportPrompt&&n.csvExportPrompt(...e))},[(0,c.Lk)("span",ex,[(0,c.Lk)("span",tx,[(0,c.bF)(o,{icon:"fa-light fa-file-csv"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Download CSV")),1)])],2)):(0,c.Q3)("",!0)])])])),(0,c.Lk)("div",ix,[(0,c.Lk)("div",sx,[(0,c.bo)((0,c.bF)(p,{class:"m-0"},{default:(0,c.k6)(()=>[(0,c.bF)(r,{modelValue:a.filters.search,"onUpdate:modelValue":t[5]||(t[5]=e=>a.filters.search=e),rounded:"",expanded:"",size:"is-small",style:{"min-width":"240px"},placeholder:e.$t("Search by name or email"),class:"nameFilter","icon-right":a.filters.search?"close-circle":null,"icon-right-clickable":"",onIconRightClick:n.clearSearch,onKeyup:(0,m.jR)(n.filterItems,["enter"])},null,8,["modelValue","placeholder","icon-right","onIconRightClick","onKeyup"]),(0,c.Lk)("p",ax,[(0,c.bF)(d,{type:"is-primary",rounded:"",size:"is-small",onClick:n.filterItems},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("search")),1)]),_:1},8,["onClick"])])]),_:1},512),[[m.aG,!e.$isMobile()||a.isMobileSearchVisible]]),(0,c.Lk)("div",nx,[e.contactChaptersEnabled&&a.localCenters.length>0?((0,c.uX)(),(0,c.Wv)(p,{key:0,class:"m-0"},{default:(0,c.k6)(()=>[(0,c.bF)(g,{position:"is-bottom-right","aria-role":"list",class:"status-filter-dropdown local-center-filter-dropdown",rounded:"",onActiveChange:n.onLocalCenterDropdownToggle},{trigger:(0,c.k6)(()=>[(0,c.bF)(d,{class:"button is-small is-default is-rounded local-center-filter-trigger",size:"is-small"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",ox,(0,u.v_)(n.getSelectedLocalCenterName()||e.$t("Chapter")),1),(0,c.Lk)("span",lx,[(0,c.bF)(o,{icon:"fa-light fa-chevron-down"})])]),_:1})]),default:(0,c.k6)(()=>[(0,c.Lk)("div",rx,[(0,c.bF)(r,{ref:"localCenterSearchInput",modelValue:a.localCenterSearch,"onUpdate:modelValue":t[6]||(t[6]=e=>a.localCenterSearch=e),placeholder:e.$t("Search")+"...",size:"is-small",icon:"magnifying-glass","icon-pack":"fa-light"},null,8,["modelValue","placeholder"])]),(0,c.bF)(h,{value:null,"aria-role":"listitem",class:(0,u.C4)({"is-active":null===a.filters.localCenter}),onClick:t[7]||(t[7]=e=>n.onLocalCenterFilterSelect(null))},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("All")),1)]),_:1},8,["class"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.filteredLocalCenters,t=>((0,c.uX)(),(0,c.Wv)(h,{key:t.id,value:t.id,"aria-role":"listitem",class:(0,u.C4)({"is-active":a.filters.localCenter===t.id}),onClick:e=>n.onLocalCenterFilterSelect(t)},{default:(0,c.k6)(()=>[e.tenant.settingFeatures.localCenter.hasParent&&t.parent?((0,c.uX)(),(0,c.CE)("span",dx,"    â ")):(0,c.Q3)("",!0),(0,c.eW)(" "+(0,u.v_)(n.localCenterNameSelector(t,e.tenant)),1)]),_:2},1032,["value","class","onClick"]))),128))]),_:1},8,["onActiveChange"])]),_:1})):(0,c.Q3)("",!0),e.tenant.settingFeatures.contacts.hasStatuses?((0,c.uX)(),(0,c.Wv)(p,{key:1,class:"m-0"},{default:(0,c.k6)(()=>[(0,c.bF)(g,{modelValue:a.filters.status,"onUpdate:modelValue":t[10]||(t[10]=e=>a.filters.status=e),position:"is-bottom-right","aria-role":"list",class:"status-filter-dropdown",rounded:"",onActiveChange:n.onStatusDropdownToggle,onInput:t[11]||(t[11]=e=>n.filterItems(!0))},{trigger:(0,c.k6)(()=>[(0,c.bF)(d,{class:"button is-small is-default is-rounded",size:"is-small"},{default:(0,c.k6)(()=>[n.getSelectedStatus()?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"status-preview-small mr-2",style:(0,u.Tr)("background-color: "+n.getSelectedStatus().color)},null,4)):(0,c.Q3)("",!0),(0,c.Lk)("span",null,(0,u.v_)(n.getSelectedStatus()?n.getSelectedStatus().name:e.$t("Status")),1),(0,c.Lk)("span",cx,[(0,c.bF)(o,{icon:"fa-light fa-chevron-down"})])]),_:1})]),default:(0,c.k6)(()=>[0===a.statuses?.length?((0,c.uX)(),(0,c.Wv)(h,{key:0,onClick:t[8]||(t[8]=t=>e.$router.push({name:"ProfileStatusList"}))},{default:(0,c.k6)(()=>[(0,c.eW)((0,u.v_)(e.$t("No statuses. Manage Statuses"))+" â ",1)]),_:1})):((0,c.uX)(),(0,c.Wv)(h,{key:1,value:null,"aria-role":"listitem",class:(0,u.C4)({"is-active":null===a.filters.status}),onClick:t[9]||(t[9]=e=>{a.filters.status=null,n.filterItems(!0)})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",ux,[(0,c.Lk)("div",mx,[(0,c.Lk)("div",px,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("All statuses")),1),(0,c.Lk)("span",hx,(0,u.v_)(a.itemsTotal),1)])]),null===a.filters.status?((0,c.uX)(),(0,c.CE)("div",gx,[(0,c.Lk)("div",fx,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:1},8,["class"])),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.statuses,e=>((0,c.uX)(),(0,c.Wv)(h,{key:e.id,value:e.id,"aria-role":"listitem",class:(0,u.C4)({"is-active":a.filters.status===e.id}),onClick:t=>{a.filters.status=e.id,n.filterItems(!0)}},{default:(0,c.k6)(()=>[(0,c.Lk)("div",bx,[(0,c.Lk)("div",yx,[(0,c.Lk)("div",vx,[(0,c.Lk)("span",{class:"status-preview",style:(0,u.Tr)("background-color: "+e.color)},null,4)]),(0,c.Lk)("div",kx,[(0,c.Lk)("span",null,(0,u.v_)(e.name),1),(0,c.Lk)("span",Cx,(0,u.v_)(n.getStatusCount(e.id)),1)])]),a.filters.status===e.id?((0,c.uX)(),(0,c.CE)("div",Lx,[(0,c.Lk)("div",wx,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:2},1032,["value","class","onClick"]))),128))]),_:1},8,["modelValue","onActiveChange"])]),_:1})):(0,c.Q3)("",!0),a.tags?.length>0?((0,c.uX)(),(0,c.Wv)(p,{key:2,class:"m-0"},{default:(0,c.k6)(()=>[(0,c.bF)(g,{modelValue:a.filters.tags,"onUpdate:modelValue":t[14]||(t[14]=e=>a.filters.tags=e),position:"is-bottom-right",multiple:"","aria-role":"list",class:"status-filter-dropdown",rounded:"",onInput:t[15]||(t[15]=e=>n.filterItems(!0))},{trigger:(0,c.k6)(()=>[(0,c.bF)(d,{class:"button is-small is-rounded",size:"is-small"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",null,(0,u.v_)(a.filters.tags.length>0?a.filters.tags.length+" "+e.$t("Tags"):e.$t("All tags")),1),(0,c.Lk)("span",_x,[(0,c.bF)(o,{icon:"fa-light fa-chevron-down"})])]),_:1})]),default:(0,c.k6)(()=>[(0,c.bF)(h,{value:null,"aria-role":"listitem",class:(0,u.C4)({"is-active":0===a.filters.tags.length}),onClick:t[12]||(t[12]=e=>{a.filters.tags=[],n.filterItems(!0)})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Ex,[(0,c.Lk)("div",$x,[(0,c.Lk)("div",Fx,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("All tags")),1)])]),0===a.filters.tags.length?((0,c.uX)(),(0,c.CE)("div",Tx,[(0,c.Lk)("div",Sx,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:1},8,["class"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.tags,e=>((0,c.uX)(),(0,c.Wv)(h,{key:e.id,value:e.id,"aria-role":"listitem",class:(0,u.C4)({"is-active":a.filters.tags.includes(e.id)}),onClick:t[13]||(t[13]=e=>n.filterItems(!0))},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Ax,[(0,c.Lk)("div",Px,[(0,c.Lk)("div",Ix,[(0,c.Lk)("span",null,(0,u.v_)(e.name),1)])]),a.filters.tags.includes(e.id)?((0,c.uX)(),(0,c.CE)("div",Mx,[(0,c.Lk)("div",xx,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:2},1032,["value","class"]))),128))]),_:1},8,["modelValue"])]),_:1})):(0,c.Q3)("",!0),(0,c.bF)(p,{class:"m-0"},{default:(0,c.k6)(()=>[(0,c.bF)(g,{modelValue:a.filters.newsletter,"onUpdate:modelValue":t[20]||(t[20]=e=>a.filters.newsletter=e),position:"is-bottom-right","aria-role":"list",class:"newsletter-filter-dropdown",rounded:"",onActiveChange:n.onNewsletterDropdownToggle,onInput:t[21]||(t[21]=e=>n.filterItems(!0))},{trigger:(0,c.k6)(()=>[(0,c.bF)(d,{class:"button is-small is-default is-rounded",size:"is-small"},{default:(0,c.k6)(()=>[(0,c.Lk)("span",null,(0,u.v_)(n.getSelectedNewsletterLabel()),1),(0,c.Lk)("span",Nx,[(0,c.bF)(o,{icon:"fa-light fa-chevron-down"})])]),_:1})]),default:(0,c.k6)(()=>[(0,c.bF)(h,{value:"all","aria-role":"listitem",class:(0,u.C4)({"is-active":"all"===a.filters.newsletter}),onClick:t[16]||(t[16]=e=>{a.filters.newsletter="all",n.filterItems(!0)})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Ux,[(0,c.Lk)("div",Dx,[(0,c.Lk)("div",Xx,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("All")),1),(0,c.Lk)("span",Vx,(0,u.v_)(a.newsletterStats.total),1)])]),"all"===a.filters.newsletter?((0,c.uX)(),(0,c.CE)("div",Rx,[(0,c.Lk)("div",Ox,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:1},8,["class"]),(0,c.bF)(h,{value:"1","aria-role":"listitem",class:(0,u.C4)({"is-active":"1"===a.filters.newsletter}),onClick:t[17]||(t[17]=e=>{a.filters.newsletter="1",n.filterItems(!0)})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",Qx,[(0,c.Lk)("div",Bx,[(0,c.Lk)("div",Gx,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Subscribed")),1),(0,c.Lk)("span",Wx,(0,u.v_)(a.newsletterStats.subscribed),1)])]),"1"===a.filters.newsletter?((0,c.uX)(),(0,c.CE)("div",jx,[(0,c.Lk)("div",zx,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:1},8,["class"]),(0,c.bF)(h,{value:"null","aria-role":"listitem",class:(0,u.C4)({"is-active":"null"===a.filters.newsletter}),onClick:t[18]||(t[18]=e=>{a.filters.newsletter="null",n.filterItems(!0)})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",qx,[(0,c.Lk)("div",Jx,[(0,c.Lk)("div",Hx,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Not subscribed")),1),(0,c.Lk)("span",Kx,(0,u.v_)(a.newsletterStats.not_selected),1)])]),"null"===a.filters.newsletter?((0,c.uX)(),(0,c.CE)("div",Yx,[(0,c.Lk)("div",Zx,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:1},8,["class"]),(0,c.bF)(h,{value:"0","aria-role":"listitem",class:(0,u.C4)({"is-active":"0"===a.filters.newsletter}),onClick:t[19]||(t[19]=e=>{a.filters.newsletter="0",n.filterItems(!0)})},{default:(0,c.k6)(()=>[(0,c.Lk)("div",eN,[(0,c.Lk)("div",tN,[(0,c.Lk)("div",iN,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("Unsubscribed")),1),(0,c.Lk)("span",sN,(0,u.v_)(a.newsletterStats.unsubscribed),1)])]),"0"===a.filters.newsletter?((0,c.uX)(),(0,c.CE)("div",aN,[(0,c.Lk)("div",nN,[(0,c.bF)(f,{icon:"check",size:"is-small"})])])):(0,c.Q3)("",!0)])]),_:1},8,["class"])]),_:1},8,["modelValue","onActiveChange"])]),_:1})])]),(0,c.Lk)("div",oN,[a.isSelectionMode?((0,c.uX)(),(0,c.CE)("a",{key:1,class:"selection-toggle-link
1is-active",onClick:t[23]||(t[23]=(...e)=>n.exitSelectionMode&&n.exitSelectionMode(...e))},[(0,c.Lk)("span",rN,[(0,c.bF)(o,{icon:"fa-light fa-xmark"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Cancel")),1)])):((0,c.uX)(),(0,c.CE)("a",{key:0,class:"selection-toggle-link",onClick:t[22]||(t[22]=(...e)=>n.enterSelectionMode&&n.enterSelectionMode(...e))},[(0,c.Lk)("span",lN,[(0,c.bF)(o,{icon:"fa-light fa-check-square"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Select")),1)]))])]),(0,c.Lk)("div",dN,[a.isSelectionMode?((0,c.uX)(),(0,c.CE)("div",cN,[(0,c.Lk)("div",uN,[(0,c.Lk)("div",mN,[(0,c.Lk)("div",pN,[(0,c.Lk)("span",hN,(0,u.v_)(a.checkedRows.length)+" "+(0,u.v_)(e.$t("contacts_selected")),1)])]),(0,c.Lk)("div",gN,[(0,c.Lk)("div",fN,[a.checkedRows.length>0?((0,c.uX)(),(0,c.Wv)(d,{key:0,type:"is-danger",size:"is-small",class:"is-rounded is-outlined",loading:a.isBulkDeleting,onClick:n.confirmBulkDelete},{default:(0,c.k6)(()=>[(0,c.Lk)("span",bN,[(0,c.Lk)("span",yN,[(0,c.bF)(o,{icon:"fa-light fa-trash"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("delete_selected")),1)])]),_:1},8,["loading","onClick"])):(0,c.Q3)("",!0)])])])])):(0,c.Q3)("",!0),(0,c.Lk)("div",{class:(0,u.C4)(["orgo-table-wrap",{"is-skeleton-loading":a.isLoading}])},[(0,c.bF)(v,{"checked-rows":a.checkedRows,"onUpdate:checkedRows":t[24]||(t[24]=e=>a.checkedRows=e),"current-page":a.itemsPageCurrent,"onUpdate:currentPage":t[25]||(t[25]=e=>a.itemsPageCurrent=e),data:n.tableRows,"row-class":n.rowClass,narrowed:!1,hoverable:!0,checkable:a.isSelectionMode,"checkbox-position":"left","icon-pack":"fa-light",paginated:a.isMoreThanOnePage,"backend-pagination":"","pagination-rounded":"",total:a.itemsTotal,"per-page":a.itemsPerPage,"mobile-cards":!1,scrollable:!0,"backend-sorting":"","default-sort-direction":a.defaultSortOrder,"default-sort":[a.sortField,a.sortOrder],onPageChange:n.changeListPage,onSort:n.onSort},{default:(0,c.k6)(()=>[(0,c.bF)(b,{label:e.$t("name"),field:"name",sortable:"","cell-class":"nowrap"},{default:(0,c.k6)(e=>[(0,c.Lk)("a",{class:"is-clickable contact-name-cell",onClick:t=>n.openContactModal(e.row.id)},[(0,c.Lk)("span",kN,(0,u.v_)(e.row.name),1)],8,vN)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("country"),field:"country",sortable:"","cell-class":"nowrap"},{default:(0,c.k6)(e=>[e.row.town&&e.row.town.country?((0,c.uX)(),(0,c.CE)("span",CN,(0,u.v_)(e.row.town.country.name),1)):e.row.country?((0,c.uX)(),(0,c.CE)("span",LN,(0,u.v_)(e.row.country.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("town"),field:"town",sortable:"","cell-class":"nowrap"},{default:(0,c.k6)(e=>[e.row.town?((0,c.uX)(),(0,c.CE)("span",wN,(0,u.v_)(e.row.town.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),e.contactChaptersEnabled?((0,c.uX)(),(0,c.Wv)(b,{key:0,label:e.$t("Chapter"),field:"localCenter.name","cell-class":"nowrap"},{default:(0,c.k6)(e=>[e.row.localCenter?((0,c.uX)(),(0,c.CE)("span",_N,(0,u.v_)(e.row.localCenter.name),1)):(0,c.Q3)("",!0)]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(b,{label:e.$t("Email"),field:"email",width:"1%",centered:"","header-class":"nowrap"},{default:(0,c.k6)(e=>[e.row.email?((0,c.uX)(),(0,c.Wv)(y,{key:0,label:e.row.email,position:"is-right"},{default:(0,c.k6)(()=>[(0,c.Lk)("a",{onClick:t=>n.copyToClipboardAndSnackbar(e.row.email)},[(0,c.Lk)("span",$N,[(0,c.bF)(o,{icon:"fa-light fa-envelope"})])],8,EN)]),_:2},1032,["label"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("phone"),width:"1%",centered:""},{default:(0,c.k6)(e=>[e.row.phone?((0,c.uX)(),(0,c.Wv)(y,{key:0,label:e.row.phone,position:"is-right"},{default:(0,c.k6)(()=>[(0,c.Lk)("a",{onClick:t=>n.copyToClipboardAndSnackbar(e.row.phone)},[(0,c.Lk)("span",TN,[(0,c.bF)(o,{icon:"fa-light fa-phone"})])],8,FN)]),_:2},1032,["label"])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("Newsletter"),field:"isNewsletterSubscribed",sortable:""},{default:(0,c.k6)(t=>[!0===t.row.isNewsletterSubscribed?((0,c.uX)(),(0,c.CE)("span",SN,(0,u.v_)(e.$t("Subscribed")),1)):null===t.row.isNewsletterSubscribed?((0,c.uX)(),(0,c.CE)("span",AN,(0,u.v_)(e.$t("Not subscribed")),1)):!1===t.row.isNewsletterSubscribed?((0,c.uX)(),(0,c.CE)("span",PN,(0,u.v_)(e.$t("Unsubscribed")),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("contact_source"),field:"source",sortable:"",width:"1%","cell-class":"nowrap"},{default:(0,c.k6)(t=>[t.row.source?((0,c.uX)(),(0,c.CE)("span",{key:0,class:(0,u.C4)(["tag is-rounded is-small",n.getSourceTagClass(t.row.source)])},(0,u.v_)(e.$t("contact_source_"+t.row.source)),3)):(0,c.Q3)("",!0)]),_:1},8,["label"]),e.tenant.settingFeatures.contacts.hasStatuses?((0,c.uX)(),(0,c.Wv)(b,{key:1,label:e.$t("Status"),field:"status"},{default:(0,c.k6)(t=>[(0,c.bF)(g,{"aria-role":"list","append-to-body":"",class:"status-inline-dropdown",position:"is-bottom-left"},{trigger:(0,c.k6)(()=>[t.row.status?((0,c.uX)(),(0,c.CE)("span",{key:0,class:"tag is-medium is-rounded is-size-7 is-clickable",style:(0,u.Tr)("background-color: "+t.row.status.color+"; color: "+n.getTextColor(t.row.status.color))},(0,u.v_)(t.row.status.name),5)):((0,c.uX)(),(0,c.CE)("span",IN,(0,u.v_)(e.$t("No status")),1))]),default:(0,c.k6)(()=>[(0,c.bF)(h,{"aria-role":"listitem",class:(0,u.C4)([{"is-active":!t.row.status},"status-dropdown-item"]),onClick:e=>n.saveStatus(t.row,null)},{default:(0,c.k6)(()=>[(0,c.Lk)("div",MN,[(0,c.Lk)("span",null,(0,u.v_)(e.$t("No status")),1),t.row.status?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.Wv)(f,{key:0,icon:"check",size:"is-small",class:"ml-auto"}))])]),_:2},1032,["class","onClick"]),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(a.statuses,e=>((0,c.uX)(),(0,c.Wv)(h,{key:e.id,"aria-role":"listitem",class:(0,u.C4)([{"is-active":t.row.status&&t.row.status.id===e.id},"status-dropdown-item"]),onClick:i=>n.saveStatus(t.row,e)},{default:(0,c.k6)(()=>[(0,c.Lk)("div",xN,[(0,c.Lk)("span",{class:"status-preview",style:(0,u.Tr)("background-color: "+e.color)},null,4),(0,c.Lk)("span",null,(0,u.v_)(e.name),1),t.row.status&&t.row.status.id===e.id?((0,c.uX)(),(0,c.Wv)(f,{key:0,icon:"check",size:"is-small",class:"ml-auto"})):(0,c.Q3)("",!0)])]),_:2},1032,["class","onClick"]))),128))]),_:2},1024)]),_:1},8,["label"])):(0,c.Q3)("",!0),(0,c.bF)(b,{label:e.$t("Tags"),width:"18%"},{default:(0,c.k6)(e=>[e.row.tags&&e.row.tags.length>
10?((0,c.uX)(),(0,c.CE)("div",NN,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.row.tags,e=>((0,c.uX)(),(0,c.CE)("span",{key:e.id,class:"tag is-success is-light is-rounded is-small is-size-7 mr-1 is-clickable",onClick:t=>n.filterByTag(e.tag.id)},(0,u.v_)(e.tag.name),9,UN))),128))])):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("Date created"),field:"dateCreated",sortable:"",width:"1%","cell-class":"nowrap"},{default:(0,c.k6)(t=>[t.row.dateCreated?((0,c.uX)(),(0,c.CE)("span",DN,(0,u.v_)(e.$filters.format(t.row.dateCreated,"dateTime")),1)):(0,c.Q3)("",!0)]),_:1},8,["label"]),(0,c.bF)(b,{label:e.$t("Stripe"),width:"1%",centered:""},{default:(0,c.k6)(t=>[t.row.stripeCustomerId?((0,c.uX)(),(0,c.CE)("a",{key:0,href:"https://dashboard.stripe.com/"+e.tenant.stripeAccount+"/customers/"+t.row.stripeCustomerId,target:"_blank"},[(0,c.Lk)("span",VN,[(0,c.Lk)("span",RN,[(0,c.bF)(o,{icon:"fa-light fa-arrow-up-right"})])])],8,XN)):(0,c.Q3)("",!0)]),_:1},8,["label"])]),_:1},8,["checked-rows","current-page","data","row-class","checkable","paginated","total","per-page","default-sort-direction","default-sort","onPageChange","onSort"])],2)]),(0,c.bF)(C,{modelValue:a.isContactModalVisible,"onUpdate:modelValue":t[29]||(t[29]=e=>a.isContactModalVisible=e),title:a.selectedContact?a.selectedContact.name:"","modal-width":1200,"maximize-route":a.selectedContactId?{name:"ContactShow",params:{item:a.selectedContactId}}:null,"scroll-container-id":"contactModalBody",onClose:n.closeContactModal},(0,c.eX)({actions:(0,c.k6)(()=>[a.selectedContact?((0,c.uX)(),(0,c.Wv)(g,{key:0,ref:"contactActionsDropdown","aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,c.k6)(()=>[(0,c.Lk)("button",{class:"button is-small is-light is-rounded",onMouseenter:t[28]||(t[28]=(...e)=>n.openContactActions&&n.openContactActions(...e))},[(0,c.Lk)("span",QN,[(0,c.bF)(o,{icon:"fa-light fa-ellipsis-vertical"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Actions")),1)],32)]),default:(0,c.k6)(()=>[(0,c.bF)(h,{"aria-role":"listitem",onClick:n.openContactPage},{default:(0,c.k6)(()=>[(0,c.Lk)("span",BN,[(0,c.Lk)("span",GN,[(0,c.bF)(o,{icon:"fa-light fa-expand"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("openAction")),1)])]),_:1},8,["onClick"]),(0,c.bF)(h,{"aria-role":"listitem",onClick:n.copyContactUrl},{default:(0,c.k6)(()=>[(0,c.Lk)("span",WN,[(0,c.Lk)("span",jN,[(0,c.bF)(o,{icon:"fa-light fa-link"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Copy URL")),1)])]),_:1},8,["onClick"]),n.canSendEmailToSelected?((0,c.uX)(),(0,c.Wv)(h,{key:0,"aria-role":"listitem",onClick:n.triggerSendEmail},{default:(0,c.k6)(()=>[(0,c.Lk)("span",zN,[(0,c.Lk)("span",qN,[(0,c.bF)(o,{icon:"fa-light fa-paper-plane"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Send an email")),1)])]),_:1},8,["onClick"])):(0,c.Q3)("",!0),(0,c.bF)(h,{"aria-role":"listitem",onClick:n.triggerCreateUserAccount},{default:(0,c.k6)(()=>[(0,c.Lk)("span",JN,[(0,c.Lk)("span",HN,[(0,c.bF)(o,{icon:"fa-light fa-user-plus"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Create user account")),1)])]),_:1},8,["onClick"]),a.selectedContact&&a.selectedContact.stripeCustomerId?((0,c.uX)(),(0,c.Wv)(h,{key:1,"aria-role":"listitem",onClick:n.triggerOpenStripe},{default:(0,c.k6)(()=>[(0,c.Lk)("span",KN,[(0,c.Lk)("span",YN,[(0,c.bF)(o,{icon:"fa-light fa-arrow-up-right"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Open in Stripe")),1)])]),_:1},8,["onClick"])):(0,c.Q3)("",!0),(0,c.bF)(h,{"aria-role":"listitem",onClick:n.confirmDeleteFromModal},{default:(0,c.k6)(()=>[(0,c.Lk)("span",ZN,[(0,c.Lk)("span",eU,[(0,c.bF)(o,{icon:"fa-light fa-trash"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("Delete contact")),1)])]),_:1},8,["onClick"])]),_:1},512)):(0,c.Q3)("",!0)]),default:(0,c.k6)(()=>[a.selectedContactId?((0,c.uX)(),(0,c.Wv)(k,{key:0,ref:"contactShowContent","contact-id":a.selectedContactId,onRefresh:n.handleContactRefresh,onDeleted:n.handleContactDeleted,onUserCreated:n.handleUserCreated,onOpenStripe:n.handleOpenStripe,onEditStateChange:n.handleEditStateChange},null,8,["contact-id","onRefresh","onDeleted","onUserCreated","onOpenStripe","onEditStateChange"])):(0,c.Q3)("",!0)]),_:2},[a.isContactEditing?{name:"left-actions",fn:(0,c.k6)(()=>[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-small is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),onClick:t[26]||(t[26]=(...e)=>n.triggerSaveContactEdit&&n.triggerSaveContactEdit(...e))},[(0,c.Lk)("span",ON,[(0,c.bF)(o,{icon:"fa-light fa-check"})]),(0,c.Lk)("span",null,(0,u.v_)(e.$t("save")),1)],2),(0,c.Lk)("button",{class:"button is-light is-small is-rounded",onClick:t[27]||
1(t[27]=(...e)=>n.triggerCancelContactEdit&&n.triggerCancelContactEdit(...e))},(0,u.v_)(e.$t("Cancel")),1)]),key:"0"}:void 0]),1032,["modelValue","title","maximize-route","onClose"]),(0,c.bF)(C,{modelValue:a.isCreateModalVisible,"onUpdate:modelValue":t[30]||(t[30]=e=>a.isCreateModalVisible=e),title:e.$t("Add Contact"),"modal-width":800,"scroll-container-id":"contactCreateModalBody",onClose:n.closeCreateModal},{default:(0,c.k6)(()=>[(0,c.bF)(L,{onCreated:n.handleContactCreated,onOpenExisting:n.handleOpenExistingContact,onCancel:n.closeCreateModal},null,8,["onCreated","onOpenExisting","onCancel"])]),_:1},8,["modelValue","title","onClose"])])}var iU=i(52959);const sU={class:"card p-5"},aU={class:"is-flex mt-6 mb-6"};function nU(e,t,i,s,a,n){const o=(0,c.g2)("b-loading"),l=(0,c.g2)("ContactForm");return(0,c.uX)(),(0,c.CE)("section",null,[(0,c.bF)(o,{modelValue:a.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,c.Lk)("div",sU,[(0,c.bF)(l,{ref:"contactForm",item:a.item},null,8,["item"]),(0,c.Lk)("div",aU,[(0,c.Lk)("button",{class:(0,u.C4)(["button is-primary is-rounded is-fullwidth",{"is-loading":a.isSaving}]),onClick:t[1]||(t[1]=(...e)=>n.save&&n.save(...e))},(0,u.v_)(e.$t("save")),3)])])])}var oU=i(31830),lU={components:{ContactForm:oU.A},emits:["created","cancel","open-existing"],data(){return{item:{name:null,email:null,phone:null,town:null,country:null,organisation:null,role:null,gender:null,dateBirth:null,companyIdentifier:null,companyName:null,companyAddress:null,companyRegNo:null,linkedin:null,twitter:null,instagram:null,status:null},isLoading:!1,isSaving:!1}},computed:{...(0,vi.L8)(["tenant"])},methods:{updateExistingContact(e){this.isSaving=!0;let t={...this.item};t.country=t.town?.country["@id"]?t.town.country["@id"]:null,t.town=t.town?t.town["@id"]:null,delete t.email,this.$http.plain.patch("/contacts/"+e,t).then(()=>{this.$buefy.snackbar.open({message:this.$t("updatedSuccessfully")}),this.$emit("open-existing",e)}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error"),type:"is-danger"})}).finally(()=>{this.isSaving=!1})},save(){if(!this.item.name)return void this.$buefy.toast.open({message:this.$t("Name is required"),type:"is-warning"});this.isSaving=!0;const e=this.$refs.contactForm?.getPendingUploads?.()||[],t=e.length>0?e.reduce((e,t)=>e.then(()=>t.upload()),Promise.resolve()):Promise.resolve();t.then(()=>{this.$refs.contactForm?.clearPendingUploads?.();let e={...this.item};return e.country=e.town?.country["@id"]?e.town.country["@id"]:null,e.town=e.town?e.town["@id"]:null,e.status=e.status?e.status["@id"]:null,e.rawContactCustomFieldsValues=this.$refs.contactForm?.getCustomFieldValues?.()||{},this.$http.plain.post("/contacts",e)}).then(e=>{const t=e.data,i=this.$refs.contactForm?.getPendingLogo?.();if(i){const e=new FormData;return e.append("file",i),e.append("type","contact"),e.append("entity_id",t.id),this.$http.plain.post("/media_objects",e,{headers:{"Content-Type":"multipart/form-data"}}).then(()=>(this.$refs.contactForm?.clearPendingLogo?.(),t)).catch(e=>(console.error("Logo upload failed:",e),t))}return t}).then(e=>{this.$buefy.snackbar.open({message:this.$t("createdSuccessfully")}),this.$emit("created",e)}).catch(t=>{if(console.error(t),t.response&&409===t.response.status){const e=t.response.data;return void("contact_exists"===e.error?this.$buefy.dialog.confirm({title:this.$t("contact_already_exists"),message:this.$t("contact_already_exists_modify"),confirmText:this.$t("yes"),cancelText:this.$t("no"),type:"is-warning",onConfirm:()=>{this.updateExistingContact(e.contactId)}}):"profile_exists"===e.error&&this.$buefy.dialog.alert({title:this.$t("profile_already_exists"),message:this.$t("profile_already_exists_email"),confirmText:this.$t("ok"),type:"is-warning"}))}e.length>0&&this.$buefy.toast.open({message:this.$t("Failed to upload file"),type:"is-danger"})}).finally(()=>{this.isSaving=!1})}}};const rU=(0,Li.A)(lU,[["render",nU]]);var dU=rU,cU=i(72554),uU={components:{FontAwesomeIcon:zs.gc,BTableColumn:D_.HP,ContactShowContent:iU["default"],ContactCreateContent:dU,MobileViewHeader:Pg.A,ItemViewModal:Jn.A,LogoThumbnail:rc.A},props:{userContract:{type:Boolean,default:!1}},data(){return{items:null,api_url:null,file:null,item:null,isUploadingContract:null,isDownloadingContract:null,filters:{localCenter:this.$route.query.localCenter?parseInt(this.$route.query.localCenter):null,search:this.$route.query.search?this.$route.query.search:null,town:this.$route.query.town?this.$route.query.town:null,country:this.$route.query.country?this.$route.query.country:null,newsletter:this.$route.query.newsletter?this.$route.query.newsletter:"all",status:this.$route.query.status?parseInt(this.$route.query.status):null,tags:this.$route.query.tags?this.$route.query.tags.split(",").map(e=>parseInt(e)):[]},userUploadedContracts:[],contractPath:null,itemsTotal:null,itemsPageCurrent:this.$route.query.page?parseInt(this.$route.query.page):1,itemsPerPage:20,sortField:"id",sortOrder:"DESC",defaultSortOrder:"DESC",isMoreThanOnePage:!1,itemsPerPageCSV:1e3,isLoadingCSV:!1,isLoading:!1,itemsRequestCancelToken:null,hasLoadedNewsletterStats:!1,hasLoadedStatusStats:!1,statuses:[],tags:[],newsletterStats:{total:0,subscribed:0,unsubscribed:0,not_selected:0},statusStats:{by_status:{},without_status:0},isContactModalVisible:!1,isContactEditing:!1,selectedContactId:null,selectedContact:null,isMobileSearchVisible:!1,isCreateModalVisible:!1,
1checkedRows:[],isBulkDeleting:!1,isSelectionMode:!1,isSyncingContacts:!1,localCenters:[],localCenterSearch:""}},computed:{hasCsvExportAccess(){return this.isGranted("HR_TENANT")},hasCsvImportAccess(){return this.isGranted("ADMIN_TENANT")},skeletonRows(){return Array.from({length:this.itemsPerPage},(e,t)=>({_skeletonId:t}))},tableRows(){return null===this.items?this.skeletonRows:this.items},filteredLocalCenters(){if(!this.localCenterSearch)return this.localCenters;const e=this.localCenterSearch.toLowerCase();return this.localCenters.filter(t=>(0,ds.Hc)(t,this.tenant).toLowerCase().includes(e))},...(0,vi.L8)(["isGranted","user","tenant","contactChaptersEnabled"]),canSendEmailToSelected(){return(0,cU.y)(this.selectedContact,this.isGranted)}},watch:{$route(e,t){t&&"ContactList"===t.name&&"ContactList"===e.name&&(this.syncFiltersFromRoute(e.query),this.loadItemsPage())}},created(){this.loadItemsPage(),this.loadStatuses(),this.loadTags(),this.loadLocalCenters()},methods:{mediaSrc:ds.F9,copyToClipboard:ds.lW,localCenterNameSelector:ds.Hc,syncFiltersFromRoute(e){this.filters.search=e.search||null,this.filters.town=e.town||null,this.filters.country=e.country||null,this.filters.localCenter=e.localCenter?parseInt(e.localCenter):null,this.filters.newsletter=e.newsletter||"all",this.filters.status=e.status?parseInt(e.status):null,this.filters.tags=e.tags?e.tags.split(",").map(e=>parseInt(e)):[],this.itemsPageCurrent=e.page?parseInt(e.page):1},copyToClipboardAndSnackbar(e){this.copyToClipboard(e),this.$buefy.snackbar.open({message:this.$t("Copied"),type:"is-info",duration:500,actionText:null})},rowClass(e){return e&&void 0!==e._skeletonId?"is-skeleton-row":""},loadItemsPage(){this.itemsRequestCancelToken&&this.itemsRequestCancelToken.cancel("New contacts request initiated"),this.itemsRequestCancelToken=bh.A.CancelToken.source();const e=this.itemsRequestCancelToken;let t=this.getOrderQueryString(),i=this.getFiltersQueryString();return this.isLoading=!0,this.checkedRows=[],this.$http.plain.get("/contacts?"+t+i,{cancelToken:e.token}).then(t=>{this.itemsRequestCancelToken===e&&(this.items=t.data["hydra:member"],this.itemsTotal=t.data["hydra:totalItems"],this.isMoreThanOnePage=void 0!==t.data["hydra:view"]["hydra:first"])}).catch(e=>{bh.A.isCancel(e)||console.error(e)}).finally(()=>{this.itemsRequestCancelToken===e&&(this.isLoading=!1)})},loadStatuses(){this.$http.plain.get("/profile_statuses?tenant="+this.tenant.id+"&order[position]=asc").then(e=>{this.statuses=e.data["hydra:member"]}).catch(e=>console.error(e))},loadStatusStats(){this.hasLoadedStatusStats=!0,this.$http.plain.get("/contact/status-stats").then(e=>{this.statusStats=e.data}).catch(e=>console.error(e))},onStatusDropdownToggle(e){e&&!this.hasLoadedStatusStats&&this.loadStatusStats()},onNewsletterDropdownToggle(e){e&&!this.hasLoadedNewsletterStats&&this.loadNewsletterStats()},refreshStats(){this.hasLoadedNewsletterStats&&this.loadNewsletterStats(),this.hasLoadedStatusStats&&this.loadStatusStats()},loadTags(){this.$http.plain.get("/tags?tenant="+this.tenant.id).then(e=>{this.tags=e.data["hydra:member"]}).catch(e=>console.error(e))},loadNewsletterStats(){this.hasLoadedNewsletterStats=!0,this.$http.plain.get("/contact/newsletter-stats").then(e=>{this.newsletterStats=e.data}).catch(e=>console.error(e))},loadLocalCenters(){this.contactChaptersEnabled&&this.$http.plain.get("/local_centers_all?isActive=1&tenantSlug="+this.tenant.slug).then(e=>{this.localCenters=(0,ds.KN)(e.data["hydra:member"],this.tenant)}).catch(e=>console.error(e))},getSelectedLocalCenterName(){if(!this.filters.localCenter)return null;const e=this.localCenters.find(e=>e.id===this.filters.localCenter);return e?(0,ds.Hc)(e,this.tenant):null},onLocalCenterDropdownToggle(e){e?this.$nextTick(()=>{this.$refs.localCenterSearchInput&&this.$refs.localCenterSearchInput.focus()}):this.localCenterSearch=""},onLocalCenterFilterSelect(e){this.filters.localCenter=e?e.id:null,this.localCenterSearch="",this.filterItems(!0)},saveStatus(e,t){const i=t?`/api/v1/profile_statuses/${t.id}`:null;this.$http.plain.patch(`/contacts/${e.id}`,{status:i}).then(()=>
1{e.status=t,e.lastStatusUpdate=new Date,this.$buefy.toast.open({message:this.$t("Status updated successfully"),type:"is-success"})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error updating status"),type:"is-danger"})})},filterItemsByWord:qn()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return!1;this.filterItems()},400),changeListPage(e){const t=document.getElementById("oMain");t&&t.scrollTo({top:0,behavior:"smooth"}),this.itemsPageCurrent=e,this.loadItemsPage()},filterItems(e=!1){e&&(this.itemsPageCurrent=1),this.loadItemsPage()},getOrderQueryString(){let e="&order["+this.sortField+"]="+this.sortOrder;return e},getFiltersQueryString(e=!1,t=null){let i="";return this.filters.search&&(i+="&search="+encodeURIComponent(this.filters.search)),this.filters.localCenter&&this.contactChaptersEnabled&&(i+="&localCenter="+this.filters.localCenter),this.filters.newsletter&&"all"!==this.filters.newsletter&&("null"===this.filters.newsletter?i+="&exists[isNewsletterSubscribed]=false":i+="&isNewsletterSubscribed="+this.filters.newsletter),this.filters.town&&(i+="&town="+this.filters.town),this.filters.country&&(i+="&country="+this.filters.country),this.filters.status&&(i+="&status="+this.filters.status),this.filters.tags&&this.filters.tags.length>
10&&this.filters.tags.forEach(e=>{i+="&tags.tag[]="+e}),e?(i+="&itemsPerPage="+this.itemsPerPageCSV,t&&(i+="&page="+t)):i+="&page="+this.itemsPageCurrent,i},onSort(e,t){this.sortField=e,this.sortOrder=t,this.itemsPageCurrent=1,this.loadItemsPage()},saveSuccess(){return this.$buefy.snackbar.open({message:this.$t("uploadSuccess")})},syncContacts(){this.isSyncingContacts=!0,this.$http.plain.post("/contacts/populate").then(()=>{this.$buefy.snackbar.open({message:this.$t("Sync started successfully"),type:"is-success"})}).catch(e=>{console.log(e),this.$buefy.snackbar.open({message:this.$t("Error"),type:"is-danger"})}).finally(()=>{this.isSyncingContacts=!1})},csvExportPrompt(){const e=this.$t("Export"),t=this.$t("Are you sure you want to download this list?");if(this.itemsTotal<=this.itemsPerPageCSV)this.$buefy.dialog.confirm({title:e,message:t,confirmText:this.$t("Export"),type:"is-primary",onConfirm:()=>{this.csvExport()}});else{const i=Math.ceil(this.itemsTotal/this.itemsPerPageCSV);this.$buefy.dialog.prompt({title:e,message:t,inputAttrs:{type:"number",placeholder:this.itemsTotal+" "+this.$t("profiles")+", "+i+" "+this.$t("pages. Type the page number."),min:1,max:i},trapFocus:!0,confirmText:this.$t("Export"),type:"is-primary",onConfirm:e=>{this.csvExport(e)}})}},csvExport(e=null){this.isLoadingCSV=!0;let t=this.getOrderQueryString(),i=this.getFiltersQueryString(!0,e);return this.$http.plain.get("contacts-csv?"+t+i,{responseType:"blob",headers:{Accept:"text/csv"}}).then(e=>{const t=window.URL.createObjectURL(new Blob([e.data])),i=document.createElement("a");i.href=encodeURI(t),i.setAttribute("download","contacts.csv"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}).catch(e=>console.error(e)).finally(()=>{this.isLoadingCSV=!1})},error(e){console.error(e)},confirmDelete(e){this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+e.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.delete(e)})},delete(e){this.$http.plain.delete("/contacts/"+e.id).then(e=>this.deleteSuccess(e)).catch(e=>console.error(e))},deleteSuccess(){this.filterItems(),this.$buefy.toast.open(this.$t("deleted"))},getSelectedStatus(){return this.filters.status?this.statuses.find(e=>e.id===this.filters.status):null},getSelectedNewsletterLabel(){const e={all:this.$t("Newsletter"),1:this.$t("Subscribed"),null:this.$t("Not subscribed"),0:this.$t("Unsubscribed")};return e[this.filters.newsletter]||this.$t("Newsletter")},getTextColor(e){const t=e.replace("#",""),i=parseInt(t.substr(0,2),16),s=parseInt(t.substr(2,2),16),a=parseInt(t.substr(4,2),16),n=(299*i+587*s+114*a)/1e3;return n>128?"#000000":"#ffffff"},filterByTag(e){this.filters.tags=[e],this.filterItems(!0)},getSourceTagClass(e){const t={manual:"is-info is-light",import:"is-warning is-light",form:"is-primary is-light","contact-form":"is-primary is-light",newsletter:"is-success is-light",event:"is-link is-light",donation:"is-danger is-light",stripe:"is-dark is-light",contract:"is-primary is-light",system:"is-light"};return t[e]||"is-light"},getStatusCount(e){return null===e?this.statusStats.without_status||0:this.statusStats.by_status[e]||0},openContactModal(e){this.selectedContactId=e,this.selectedContact=this.items.find(t=>t.id===e),this.isContactModalVisible=!0},closeContactModal(){this.isContactModalVisible=!1,this.isContactEditing=!1,this.selectedContactId=null,this.selectedContact=null},handleEditStateChange(e){this.isContactEditing=e},triggerSaveContactEdit(){const e=this.$refs.contactShowContent;e&&e.saveAndCloseEdit&&e.saveAndCloseEdit()},triggerCancelContactEdit(){const e=this.$refs.contactShowContent;e&&e.cancelEdit&&e.cancelEdit()},handleContactRefresh(){this.loadItemsPage(),this.refreshStats(),this.selectedContactId&&this.$http.plain.get("/contacts/"+this.selectedContactId).then(e=>{this.selectedContact=e.data}).catch(e=>{console.log(e)})},handleContactDeleted(){this.closeContactModal(),this.filterItems(),this.refreshStats()},handleUserCreated(e){this.closeContactModal(),this.$router.push({name:"UserShow",params:{item:e}})},handleOpenStripe(e){window.open(`https://dashboard.stripe.com/${this.tenant.stripeAccount}/customers/${e}`,"_blank")},openContactActions(){const e=this.$refs.contactActionsDropdown;
1e&&!e.isActive&&e.toggle()},openContactPage(){this.selectedContactId&&this.$router.push({name:"ContactShow",params:{item:this.selectedContactId}})},copyContactUrl(){if(!this.selectedContactId)return;const e=window.location.origin+this.$router.resolve({name:"ContactShow",params:{item:this.selectedContactId}}).href;navigator.clipboard.writeText(e).then(()=>{this.$buefy.toast.open({message:this.$t("Link copied to clipboard"),type:"is-success"})})},triggerSendEmail(){const e=this.$refs.contactShowContent;e&&e.openSendEmail&&e.openSendEmail()},triggerCreateUserAccount(){const e=this.$refs.contactShowContent;e&&e.createUserAccount&&e.createUserAccount()},triggerOpenStripe(){const e=this.$refs.contactShowContent;e&&e.openStripeCustomer&&e.openStripeCustomer()},confirmDeleteFromModal(){this.selectedContact&&this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("confirmDelete")+" "+this.selectedContact.name+"? "+this.$t("confirmDeleteLast"),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.deleteFromModal()})},deleteFromModal(){this.$http.plain.delete("/contacts/"+this.selectedContactId).then(()=>{this.$buefy.toast.open(this.$t("deleted")),this.closeContactModal(),this.filterItems(),this.refreshStats()}).catch(e=>{console.error(e)})},confirmBulkDelete(){0!==this.checkedRows.length&&this.$buefy.dialog.confirm({title:this.$t("deleting"),message:this.$t("bulk_delete_confirm",{count:this.checkedRows.length}),confirmText:this.$t("delete"),type:"is-danger",onConfirm:()=>this.bulkDelete()})},bulkDelete(){this.isBulkDeleting=!0;const e=this.checkedRows.map(e=>e.id);this.$http.plain.post("/contacts/bulk-delete",{contacts:e}).then(e=>{const t=e.data;let i=this.$t("deleted")+": "+t.deleted;t.skipped>0&&(i+=", "+this.$t("skipped")+": "+t.skipped),this.$buefy.toast.open({message:i,type:"is-success"}),this.checkedRows=[],this.filterItems(),this.refreshStats()}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error"),type:"is-danger"})}).finally(()=>{this.isBulkDeleting=!1})},enterSelectionMode(){this.isSelectionMode=!0,this.checkedRows=[]},exitSelectionMode(){this.isSelectionMode=!1,this.checkedRows=[]},toggleMobileSearch(){this.isMobileSearchVisible=!this.isMobileSearchVisible},clearSearch(){this.filters.search=null,this.filterItems(!0)},openCreateModal(){this.isCreateModalVisible=!0},closeCreateModal(){this.isCreateModalVisible=!1},handleContactCreated(e){this.closeCreateModal(),this.loadItemsPage(),this.refreshStats(),e&&e.id&&this.openContactModal(e.id)},handleOpenExistingContact(e){this.closeCreateModal(),this.loadItemsPage(),this.openContactModal(e)}}};const mU=(0,Li.A)(uU,[["render",tU],["__scopeId","data-v-33414876"]]);var pU=mU;const hU=()=>i.e(9825).then(i.bind(i,9825)),gU=()=>i.e(8308).then(i.bind(i,68308)),fU=()=>i.e(4773).then(i.bind(i,94773)),bU=()=>i.e(5325).then(i.bind(i,95325)),yU=()=>i.e(476).then(i.bind(i,40476)),vU=()=>Promise.all([i.e(6801),i.e(6118),i.e(1288),i.e(6478),i.e(1892),i.e(1635)]).then(i.bind(i,23582)),kU=()=>Promise.all([i.e(6801),i.e(4133)]).then(i.bind(i,64133)),CU=()=>i.e(309).then(i.bind(i,90309)),LU=()=>i.e(7131).then(i.bind(i,17131)),wU=()=>i.e(5207).then(i.bind(i,75207)),_U=()=>i.e(4281).then(i.bind(i,84281)),EU=()=>i.e(973).then(i.bind(i,20973)),$U=()=>Promise.all([i.e(9106),i.e(1613)]).then(i.bind(i,76417)),FU=()=>i.e(8842).then(i.bind(i,68842)),TU=()=>i.e(2748).then(i.bind(i,80367)),SU=()=>i.e(2575).then(i.bind(i,32575)),AU=()=>i.e(687).then(i.bind(i,90687)),PU=()=>Promise.all([i.e(9106),i.e(4519)]).then(i.bind(i,19079)),IU=()=>i.e(24).then(i.bind(i,90024)),MU=()=>i.e(4903).then(i.bind(i,34903)),xU=()=>i.e(3702).then(i.bind(i,13702)),NU=()=>Promise.resolve().then(i.bind(i,7757)),UU=()=>i.e(1137).then(i.bind(i,1137)),DU=()=>i.e(7353).then(i.bind(i,27353)),XU=()=>i.e(4259).then(i.bind(i,44259)),VU=()=>i.e(4681).then(i.bind(i,94681)),RU=()=>i.e(2029).then(i.bind(i,92029)),OU=()=>i.e(3524).then(i.bind(i,53524)),QU=()=>i.e(8375).then(i.bind(i,68375)),BU=()=>i.e(3395).then(i.bind(i,43395)),GU=()=>i.e(1738).then(i.bind(i,41738)),WU=()=>i.e(6062).then(i.bind(i,56062)),jU=()=>i.e(1731).then(i.bind(i,81731)),zU=()=>i.e(8999).then(i.bind(i,78999)),qU=()=>i.e(7210).then(i.bind(i,27210)),JU=()=>i.e(9832).then(i.bind(i,29832)),HU=()=>i.e(4637).then(i.bind(i,74637)),KU=()=>i.e(6320).then(i.bind(i,76320)),YU=()=>i.e(4115).then(i.bind(i,4115)),ZU=()=>i.e(6327).then(i.bind(i,16327)),eD=()=>i.e(1736).then(i.bind(i,81736)),tD=()=>i.e(9811).then(i.bind(i,89811)),iD=()=>i.e(2687).then(i.bind(i,2687)),sD=()=>Promise.all([i.e(6801),i.e(6118),i.e(1288),i.e(2776)]).then(i.bind(i,12776)),aD=()=>
1i.e(5626).then(i.bind(i,65626)),nD=()=>i.e(6786).then(i.bind(i,86786)),oD=()=>i.e(3409).then(i.bind(i,13409)),lD=()=>i.e(5556).then(i.bind(i,15556)),rD=()=>Promise.resolve().then(i.bind(i,6650)),dD=()=>i.e(9233).then(i.bind(i,9233)),cD=()=>i.e(2526).then(i.bind(i,42526)),uD=()=>i.e(1040).then(i.bind(i,1040)),mD=()=>i.e(6626).then(i.bind(i,26626)),pD=()=>i.e(1366).then(i.bind(i,21366)),hD=()=>i.e(8729).then(i.bind(i,38729)),gD=()=>i.e(5775).then(i.bind(i,15775)),fD=()=>i.e(3492).then(i.bind(i,83492)),bD=()=>i.e(5911).then(i.bind(i,45911)),yD=()=>Promise.all([i.e(6801),i.e(3781)]).then(i.bind(i,13781)),vD=()=>i.e(8866).then(i.bind(i,28866)),kD=()=>i.e(5300).then(i.bind(i,75300)),CD=()=>i.e(4041).then(i.bind(i,34041)),LD=()=>i.e(3748).then(i.bind(i,3748)),wD=()=>i.e(8956).then(i.bind(i,8956)),_D=()=>i.e(2708).then(i.bind(i,42708)),ED=()=>i.e(1348).then(i.bind(i,51348)),$D=()=>i.e(899).then(i.bind(i,50899)),FD=()=>i.e(4928).then(i.bind(i,94928)),TD=()=>i.e(6854).then(i.bind(i,56854)),SD=()=>i.e(6071).then(i.bind(i,36071)),AD=()=>i.e(8134).then(i.bind(i,98134)),PD=()=>i.e(3918).then(i.bind(i,83918)),ID=()=>i.e(7233).then(i.bind(i,17233)),MD=()=>i.e(2624).then(i.bind(i,22624)),xD=()=>i.e(7011).then(i.bind(i,27011)),ND=()=>i.e(6675).then(i.bind(i,26675)),UD=()=>i.e(9177).then(i.bind(i,29177)),DD=()=>i.e(8982).then(i.bind(i,28982)),XD=()=>i.e(852).then(i.bind(i,40852)),VD=()=>i.e(9960).then(i.bind(i,99960)),RD=()=>i.e(353).then(i.bind(i,90353)),OD=()=>i.e(836).then(i.bind(i,90836)),QD=()=>i.e(8376).then(i.bind(i,18376)),BD=()=>i.e(6531).then(i.bind(i,56531)),GD=()=>i.e(3849).then(i.bind(i,3849)),WD=()=>i.e(1673).then(i.bind(i,11673)),jD=()=>i.e(2702).then(i.bind(i,22702)),zD=()=>i.e(9225).then(i.bind(i,79225)),qD=()=>i.e(4471).then(i.bind(i,84471)),JD=()=>i.e(5763).then(i.bind(i,45763)),HD=()=>i.e(6090).then(i.bind(i,36090)),KD=()=>i.e(8878).then(i.bind(i,8878)),YD=()=>i.e(19).then(i.bind(i,70019)),ZD=()=>i.e(3699).then(i.bind(i,33699)),eX=()=>i.e(7460).then(i.bind(i,57460)),tX=()=>i.e(2681).then(i.bind(i,22681)),iX=()=>i.e(2130).then(i.bind(i,82130)),sX=()=>i.e(6331).then(i.bind(i,76331)),aX=()=>i.e(7303).then(i.bind(i,97303)),nX=()=>i.e(492).then(i.bind(i,20492)),oX=()=>i.e(2842).then(i.bind(i,82842)),lX=()=>i.e(6865).then(i.bind(i,16865)),rX=()=>i.e(1919).then(i.bind(i,71919)),dX=()=>i.e(8958).then(i.bind(i,48958)),cX=()=>Promise.all([i.e(5222),i.e(369),i.e(7825),i.e(8302),i.e(4895),i.e(3753),i.e(3835),i.e(5092),i.e(6920),i.e(7742),i.e(7868),i.e(5608),i.e(5347),i.e(9504),i.e(389),i.e(7747)]).then(i.bind(i,77747)),uX=()=>Promise.all([i.e(5222),i.e(369),i.e(7825),i.e(8302),i.e(4895),i.e(3753),i.e(3835),i.e(5092),i.e(6920),i.e(7742),i.e(7868),i.e(5608),i.e(5347),i.e(9504),i.e(389),i.e(1217)]).then(i.bind(i,41217)),mX=()=>i.e(2764).then(i.bind(i,92764)),pX=()=>Promise.resolve().then(i.bind(i,27089)),hX=()=>i.e(3470).then(i.bind(i,93470)),gX=()=>i.e(8852).then(i.bind(i,38852)),fX=()=>i.e(6162).then(i.bind(i,43781)),bX=()=>i.e(5235).then(i.bind(i,65235)),yX=()=>i.e(7983).then(i.bind(i,27983)),vX=()=>i.e(2635).then(i.bind(i,62635)),kX=()=>i.e(5584).then(i.bind(i,95584)),CX=()=>i.e(9143).then(i.bind(i,81524)),LX=()=>i.e(3218).then(i.bind(i,3218)),wX=()=>i.e(2443).then(i.bind(i,42443)),_X=()=>i.e(6424).then(i.bind(i,56424)),EX=()=>i.e(3818).then(i.bind(i,93818)),$X=()=>i.e(8665).then(i.bind(i,48665)),FX=()=>i.e(6811).then(i.bind(i,6811)),TX=()=>i.e(6115).then(i.bind(i,36115)),SX=()=>i.e(1203).then(i.bind(i,41203)),AX=()=>i.e(2293).then(i.bind(i,82293)),PX=()=>i.e(9967).then(i.bind(i,19967)),IX=()=>i.e(6945).then(i.bind(i,26945)),MX=()=>i.e(7546).then(i.bind(i,67546)),xX=()=>i.e(952).then(i.bind(i,50952)),NX=()=>i.e(5190).then(i.bind(i,35190)),UX=()=>i.e(3757).then(i.bind(i,3757)),DX=()=>i.e(5910).then(i.bind(i,35910)),XX=()=>i.e(6185).then(i.bind(i,56185)),VX=()=>i.e(8562).then(i.bind(i,88562)),RX=()=>i.e(7602).then(i.bind(i,17602)),OX=()=>i.e(4670).then(i.bind(i,54670)),QX=()=>i.e(7633).then(i.bind(i,97633)),BX=()=>i.e(3091).then(i.bind(i,23091)),GX=()=>i.e(9558).then(i.bind(i,79558)),WX=()=>i.e(9196).then(i.bind(i,19196)),jX=()=>i.e(8217).then(i.bind(i,98217)),zX=()=>i.e(225).then(i.bind(i,50225)),qX=()=>i.e(9105).then(i.bind(i,49105)),JX=()=>i.e(8991).then(i.bind(i,41372)),HX=()=>i.e(9625).then(i.bind(i,29625)),KX=()=>i.e(109).then(i.bind(i,80109)),YX=()=>i.e(1580).then(i.bind(i,41580)),ZX=()=>i.e(6872).then(i.bind(i,96872)),eV=()=>i.e(3850).then(i.bind(i,13850)),tV=()=>Promise.all([i.e(3566),i.e(375)]).then(i.bind(i,70375)),iV=()=>i.e(8316).then(i.bind(i,28316)),sV=()=>Promise.resolve().then(i.bind(i,58065)),aV=()=>i.e(4231).then(i.bind(i,54231)),nV=()=>i.e(1144).then(i.bind(i,51144)),oV=()=>i.e(7006).then(i.bind(i,67006)),lV=()=>i.e(9723).then(i.bind(i,79723)),rV=()=>i.e(691).then(i.bind(i,60691)),dV=()=>
1i.e(6541).then(i.bind(i,66541)),cV=()=>i.e(9579).then(i.bind(i,79579)),uV=()=>i.e(8057).then(i.bind(i,48057)),mV=()=>i.e(4444).then(i.bind(i,4444)),pV=()=>i.e(439).then(i.bind(i,40439)),hV=()=>i.e(2346).then(i.bind(i,22346)),gV=()=>i.e(7553).then(i.bind(i,67553)),fV=()=>i.e(5676).then(i.bind(i,85676)),bV=()=>i.e(367).then(i.bind(i,60367)),yV=()=>i.e(3694).then(i.bind(i,53694)),vV=()=>i.e(9059).then(i.bind(i,59059)),kV=()=>i.e(9818).then(i.bind(i,79818)),CV=()=>i.e(6612).then(i.bind(i,26612)),LV=()=>i.e(9009).then(i.bind(i,79009)),wV=()=>i.e(9511).then(i.bind(i,89511)),_V=()=>i.e(2992).then(i.bind(i,92992)),EV=()=>i.e(3527).then(i.bind(i,3527)),$V=()=>i.e(8972).then(i.bind(i,78972)),FV=()=>i.e(3534).then(i.bind(i,3534)),TV=()=>i.e(2876).then(i.bind(i,92876)),SV=()=>i.e(6676).then(i.bind(i,66676)),AV=()=>i.e(920).then(i.bind(i,920)),PV=()=>i.e(8084).then(i.bind(i,18084)),IV=()=>i.e(8854).then(i.bind(i,98854)),MV=()=>i.e(9518).then(i.bind(i,29518)),xV=()=>i.e(4879).then(i.bind(i,4879)),NV=()=>i.e(9324).then(i.bind(i,69324)),UV=()=>i.e(8148).then(i.bind(i,58148)),DV=()=>i.e(7147).then(i.bind(i,67147)),XV=()=>i.e(5199).then(i.bind(i,35199)),VV=()=>Promise.resolve().then(i.bind(i,1325)),RV=()=>i.e(9315).then(i.bind(i,29315)),OV=()=>i.e(9636).then(i.bind(i,69636)),QV=()=>i.e(632).then(i.bind(i,10632)),BV=()=>i.e(980).then(i.bind(i,30980)),GV=()=>i.e(4079).then(i.bind(i,14079)),WV=()=>i.e(25).then(i.bind(i,90025)),jV=()=>i.e(9191).then(i.bind(i,59191)),zV=()=>Promise.resolve().then(i.bind(i,29450)),qV=()=>i.e(9557).then(i.bind(i,29557)),JV=()=>i.e(3689).then(i.bind(i,83689)),HV=()=>i.e(4737).then(i.bind(i,4737)),KV=()=>i.e(5972).then(i.bind(i,55972)),YV=()=>i.e(6828).then(i.bind(i,76828)),ZV=()=>i.e(7433).then(i.bind(i,17433)),eR=()=>i.e(7618).then(i.bind(i,97618)),tR=()=>i.e(8633).then(i.bind(i,68633)),iR=()=>i.e(8895).then(i.bind(i,58895)),sR=()=>i.e(1410).then(i.bind(i,1410)),aR=()=>i.e(8474).then(i.bind(i,56093)),nR=()=>i.e(865).then(i.bind(i,80865)),oR=()=>i.e(2077).then(i.bind(i,52077)),lR=()=>i.e(3676).then(i.bind(i,83676)),rR=()=>i.e(7355).then(i.bind(i,17355)),dR=()=>i.e(9211).then(i.bind(i,19211)),cR=()=>i.e(2471).then(i.bind(i,2471)),uR=()=>i.e(2106).then(i.bind(i,92106)),mR=()=>i.e(3896).then(i.bind(i,23896)),pR=()=>i.e(1539).then(i.bind(i,21539)),hR=()=>i.e(2258).then(i.bind(i,72258)),gR=()=>i.e(3950).then(i.bind(i,53950)),fR=()=>i.e(3718).then(i.bind(i,73718)),bR=()=>i.e(7252).then(i.bind(i,27252)),yR=()=>i.e(4790).then(i.bind(i,54790)),vR=()=>i.e(8942).then(i.bind(i,68942)),kR=()=>i.e(9620).then(i.bind(i,59620)),CR=()=>i.e(3595).then(i.bind(i,83595)),LR=()=>i.e(9405).then(i.bind(i,79405)),wR=()=>i.e(7319).then(i.bind(i,57319)),_R=()=>i.e(5884).then(i.bind(i,5884)),ER=()=>i.e(8789).then(i.bind(i,8789)),$R=()=>Promise.all([i.e(6118),i.e(763)]).then(i.bind(i,10763)),FR=()=>i.e(8227).then(i.bind(i,48227)),TR=()=>i.e(2596).then(i.bind(i,22596)),SR=()=>i.e(3363).then(i.bind(i,53363)),AR=()=>i.e(5832).then(i.bind(i,95832)),PR=()=>i.e(9313).then(i.bind(i,89313)),IR=()=>i.e(1401).then(i.bind(i,31401)),MR=()=>i.e(4432).then(i.bind(i,94432)),xR=()=>i.e(4950).then(i.bind(i,54950)),NR=()=>i.e(5214).then(i.bind(i,45214)),UR=()=>i.e(2734).then(i.bind(i,32734)),DR=()=>i.e(2889).then(i.bind(i,92889)),XR=()=>i.e(3885).then(i.bind(i,3885)),VR=()=>i.e(6175).then(i.bind(i,16175)),RR=()=>i.e(4573).then(i.bind(i,54573)),OR=()=>i.e(8229).then(i.bind(i,68229)),QR=()=>i.e(5807).then(i.bind(i,35807)),BR=()=>i.e(993).then(i.bind(i,50993)),GR=()=>i.e(7504).then(i.bind(i,7504)),WR=()=>i.e(7251).then(i.bind(i,67251)),jR=()=>i.e(1223).then(i.bind(i,11223)),zR=(e,t,i)=>{const s=!!e.query.eventUuid;e.meta.hasEventSidebar=s,e.meta.hasAppSidebarMenu=!s,s||(e.meta.sidebarMode="administration"),i()},qR=(e,t,i)=>{const s=!!e.query.eventUuid;e.meta.hasEventSidebar=s,e.meta.hasAppSidebarMenu=!s,i()},JR=()=>i.e(8310).then(i.bind(i,48310)),HR=()=>i.e(8670).then(i.bind(i,98670)),KR=()=>i.e(3906).then(i.bind(i,23906)),YR=(e,t,i)=>{(0,r.m)(a.M.getters.tenant)?i():i({name:"Dashboard"})},ZR=[{path:"/",name:"Dashboard",component:hU,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,anonymous:!1},beforeEnter:(e,t,i)=>{const s=(0,l.zk)(window.location.hostname);s?(0,o.m6)(s).then(t=>{i(t?{name:"WebsitePage",params:{slug:t},hash:e.hash,replace:!0}:void 0)}):i()}},{path:"/dashboard",name:"DashboardAlias",component:hU,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,anonymous:!1}},{path:"/donation-embed",name:"DonationEmbedTest",component:fU,meta:{anonymous:!0,layout:"simple",layoutSize:"full"}},{path:"/donation-popup",name:"DonationPopupTest",component:bU,meta:{anonymous:!0,layout:"simple",layoutSize:"full"}},{path:"/newsletter-widget",name:"NewsletterWidgetTest",component:yU,meta:{anonymous:!0,layout:"simple",layoutSize:"full"}},{path:"/stats",name:"Stats",component:vU,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/maintenance",name:"Maintenance",component:gU,meta:{layout:"simple",anonymous:!0}},{path:"/design",name:"DesignSystem",component:OU,meta:{layout:"app",hasAppSidebarMenu:!0}},{path:"/register",name:"Register",component:CU,meta:{layout:"simple",anonymous:!0}},{path:"/authorize",name:"OAuthAuthorize",component:LU,meta:{layout:"simple",anonymous:!0,layoutSize:"small"}},{path:"/register/:referrerId",name:"RegisterWithReferral",component:CU,meta:{layout:"simple",anonymous:!0}},{path:"/ticket/:token/details",name:"TicketFillDetails",component:yV,meta:{layout:"simple",anonymous:!0}}
1,{path:"/ticket/:hash",name:"TicketScan",component:()=>i.e(1151).then(i.bind(i,31151)),meta:{layout:"simple"}},{path:"/register-child",name:"RegisterChild",component:wU,meta:{hasAppSidebarMenu:!1,layout:"simple",layoutSize:"full"}},{path:"/newsletter",name:"Newsletter",component:_U,meta:{layout:"simple",anonymous:!0}},{path:"/register-newsletter",name:"RegisterNewsletter",component:_U,meta:{layout:"simple",anonymous:!0}},{path:"/register-newsletter-success",name:"RegisterNewsletterSuccess",component:EU,meta:{layout:"simple",anonymous:!0}},{path:"/website-builder",name:"WebsiteAdmin",component:()=>i.e(954).then(i.bind(i,30954)),meta:{alwaysRefresh:!0,role:"ADMIN_TENANT",isTenantSettings:!0},beforeEnter:YR},{path:"/website-builder/article/new",name:"WebsiteAdminArticleCreate",component:()=>i.e(954).then(i.bind(i,30954)),meta:{alwaysRefresh:!0,role:"ADMIN_TENANT",isTenantSettings:!0},beforeEnter:YR},{path:"/website-builder/article/:uuid",name:"WebsiteAdminArticleEdit",component:()=>i.e(954).then(i.bind(i,30954)),meta:{alwaysRefresh:!0,role:"ADMIN_TENANT",isTenantSettings:!0},beforeEnter:YR},{path:"/website-builder/page/new",name:"WebsiteAdminPageCreate",component:()=>i.e(954).then(i.bind(i,30954)),meta:{alwaysRefresh:!0,role:"ADMIN_TENANT",isTenantSettings:!0},beforeEnter:YR},{path:"/website-builder/page/:uuid",name:"WebsiteAdminPageEdit",component:()=>i.e(954).then(i.bind(i,30954)),meta:{alwaysRefresh:!0,role:"ADMIN_TENANT",isTenantSettings:!0},beforeEnter:YR},{path:"/p/:slug",name:"WebsitePage",component:$U,meta:{layout:"website",anonymous:!0,websiteEditable:!0}},{path:"/website-template/:key/:slug?",name:"WebsiteTemplateDemo",component:()=>i.e(1136).then(i.bind(i,1136)),meta:{layout:"website",role:"ADMIN_TENANT",websiteTemplateDemo:!0},beforeEnter:YR},{path:"/chapter/:id",name:"ChapterPublic",component:FU,meta:{layout:"website",anonymous:!0}},{path:"/chapters",name:"ChaptersPublic",component:TU,meta:{layout:"website",anonymous:!0}},{path:"/community-events",name:"EventsPublic",component:SU,meta:{layout:"website",anonymous:!0}},{path:"/news",name:"WebsiteArticles",component:AU,meta:{layout:"website",anonymous:!0}},{path:"/news/:slug",name:"WebsiteArticle",component:PU,meta:{layout:"website",anonymous:!0,websiteEditable:!0}},{path:"/community-events/:item",name:"EventsPublicShow",component:IU,meta:{layout:"website",anonymous:!0}},{path:"/join/:slug",name:"RegisterUserType",component:MU,meta:{layout:"simple",anonymous:!0}},{path:"/adhesion",alias:"/adeziune",name:"Adhesion",component:Ta,meta:{layout:"start",alwaysRefresh:!0,hideMobileFooterNavbar:!0}},{path:"/chart",name:"OrganisationalChart",component:xU,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/adhesion/:item/log",name:"AdhesionLogs",component:NU,meta:{alwaysRefresh:!0,role:"HR_LOCAL"}},{path:"/adhesions",name:"Adhesions",component:io,meta:{alwaysRefresh:!0,role:"HR_LOCAL"}},{path:"/adhesion-form/:item",name:"AdhesionForm",component:_a,meta:{layout:"start",alwaysRefresh:!0,hideMobileFooterNavbar:!0}}
1,{path:"/login",name:"Login",component:zU,meta:{layout:"simple",alwaysRefresh:!0,anonymous:!0,noScrollLogin:!0}},{path:"/auth",name:"AdminLogin",component:qU,meta:{layout:"simple",alwaysRefresh:!0,anonymous:!0}},{path:"/oauth",name:"Oauth",component:JU,meta:{layout:"simple",alwaysRefresh:!0,anonymous:!0}},{path:"/oauth-native/:hash",name:"OauthNative",component:hR,meta:{layout:"simple",alwaysRefresh:!0,anonymous:!0}},{path:"/oauth-authorize-return",name:"OauthAuthorizeReturn",component:gR,meta:{layout:"simple",alwaysRefresh:!0,anonymous:!0}},{path:"/w/:slug",name:"Workspace",component:HU,meta:{layout:"start",alwaysRefresh:!0,anonymous:!0}},{path:"/w/:with/:lang",name:"DemoWith",component:hU},{path:"/add",name:"WorkspaceEmpty",component:HU,meta:{layout:"start",anonymous:!0}},{path:"/start",name:"StartTenant",component:KU,meta:{layout:"start",anonymous:!0}},{path:"/start/demo",name:"StartDemoTenant",component:KU,meta:{layout:"start",anonymous:!0}},{path:"/hello-member",name:"OnBoardingUser",component:YU,meta:{hideMobileFooterNavbar:!0}},{path:"/password-forgot",name:"ForgotPassword",component:eD,meta:{layout:"simple",anonymous:!0}},{path:"/password-setup",name:"PasswordSetup",component:eD,meta:{layout:"simple",anonymous:!0}},{path:"/unsubscribe/:token/:type",name:"Unsubscribe",component:BX,meta:{layout:"simple",anonymous:!0}},{path:"/confirm-email-change/:token",name:"ConfirmEmailChange",component:PV,meta:{layout:"simple",anonymous:!0}},{path:"/users",name:"UserList",component:xg,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/me/documents",name:"UserShowMyDocuments",component:nD,meta:{hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/me/products",name:"UserProducts",component:rD,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/me",name:"UserShowMyProfile",component:nD,meta:{alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/user/:item",name:"UserShow",component:nD,meta:{alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/users/show/:item",name:"UserShowOld",component:nD,meta:{hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/users/edit/:item",name:"UserUpdate",component:Q_,meta:{hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/delete-account",name:"UserDeleteAccount",component:Q_,meta:{hasAppSidebarMenu:!0}},{path:"/me/update",name:"MeUpdate",component:oD,meta:{role:"ROLE_USER",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/users/create",name:"UserCreate",component:lD,meta:{role:"HR_LOCAL",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/ask-orgo",name:"NaturalQuery",component:kU,meta:{role:"ADMIN_TENANT",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/waitlist",name:"WaitlistManagement",component:yR,meta:{role:"ADMIN_LOCAL",hasAppSidebarMenu:!0}},{path:"/waitlist/status/:uuid",name:"WaitlistStatus",component:vR,meta:{layout:"simple",layoutSize:"full",anonymous:!0}},{path:"/pay-fee/:card",name:"FeePayByCardId",component:UU,meta:{layout:"simple"}},{path:"/pay-fee",name:"FeePay",component:UU,meta:{layout:"simple"}},{path:"/pay/i/:item",name:"ProductPay",component:Tc,meta:{layout:"payment",anonymous:!0}},{path:"/pay/:item",name:"ProductPayBySlug",component:Tc,meta:{layout:"payment",anonymous:!0}},{path:"/donate",name:"DonatePage",component:Tc,meta:{layout:"payment",anonymous:!0}},{path:"/presedinte",name:"PresidentDonatePage",component:Tc,meta:{layout:"payment",anonymous:!0}},{path:"/doneaza",name:"DonateRoPage",component:Tc,meta:{layout:"payment",anonymous:!0}},{path:"/subscription/cancel/:token",name:"PaymentUnsubscribe",component:VU,meta:{layout:"simple",anonymous:!0}},{path:"/subscription/confirm-identity/:token",name:"SubscriptionIdentityConfirmation",component:lR,meta:{layout:"simple",anonymous:!0}},{path:"/subscription/checkout/:item",name:"PaymentSubscriptionCheckoutRedirect",component:RU,meta:{layout:"simple",anonymous:!0}},{path:"/payment/thank-you",name:"PaymentThankYou",component:DU,meta:{layout:"simple",layoutSize:"medium",anonymous:!0}},{path:"/payment/thank-you-id",name:"PaymentThankYouIdentity",component:XU,meta:{layout:"simple",anonymous:!0}},{path:"/event/thank-you",name:"EventThankYou",component:IV,meta:{layout:"simple",anonymous:!0}},{path:"/event/:eventUuid/ticket/:token/details",name:"TicketDetailsPublic",component:vD,meta:{layout:"simple",anonymous:!0}},{path:"/identity/user/payment/:payment",name:"ValidateIdentityByUserOnPayment",component:pV,meta:{layout:"simple",layoutSize:"medium",anonymous:!0}},{path:"/identity/user",name:"ValidateIdentityUserNoPayment",component:xV},{path:"/identity/admin/:item",name:"ValidateIdentityAdmin",component:hV},{path:"/product/payments/:item",name:"ProductPayments",component:Sc.A,meta:{hasProductMenu:!0,alwaysRefresh:!0}},{path:"/product/subscribers/:item",name:"ProductSubscribers",component:qu,meta:{hasProductMenu:!0,alwaysRefresh:!0}},{path:"/product/comments/:item",name:"ProductComments",component:VV,meta:{hasProductMenu:!0}},{path:"/product/:item",name:"ProductShow",component:sD,meta:{hasProductMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/product/create",name:"ProductCreate",component:aD,meta:{hasAppSidebarMenu:!0}},{path:"/products/:type",name:"ProductList",component:iD,meta:{alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0,role:"FINANCIAL_LOCAL"}},{path:"/stats/finance",redirect:{name:"Stats",query:{tab:"finance"}}},{path:"/notifications",name:"UserNotifications",component:dD,meta:{hasAppSidebarMenu:!0}},{path:"/events",name:"EventList",component:B_.A,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/events/attend/:item",name:"EventAttend",component:fD,meta:{hasEventSidebar:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/event-attend/check-ticket/:qrCode",name:"CheckEventAttendQR",component:NV,meta:{layout:"simple",hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/event-attend/confirm-invite/:hash",name:"ConfirmEventInvite",component:UV,meta:{layout:"simple",anonymous:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/events/trainers/:item",name:"EventTrainers",component:kD,meta:{hasEventSidebar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/speakers/:item",name:"EventSpeakers",component:CD,meta:{hasEventSidebar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/networking-spaces/:item",name:"EventNetworkingSpaces",component:LD,meta:{hasEventSidebar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/agenda/:item",name:"EventAgenda",component:wD,meta:{hasEventSidebar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/votes/:item",name:"EventVotes",component:_D,meta:{hasEventSidebar:!0,hideMobileHeaderNavbar:!0}},{path:"/event/:item",name:"EventShow",component:mD,meta:{hasEventSidebar:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/my-events",name:"EventAppMyEvents",component:()=>i.e(466).then(i.bind(i,10466)),meta:{layout:"event-app-contact",anonymous:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/profile",name:"EventAppContactProfile",component:()=>i.e(9226).then(i.bind(i,79226)),meta:{layout:"event-app-contact",anonymous:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item",redirect:e=>({name:"EventAppAgenda",params:{item:e.params.item},query:e.query})},{path:"/event-app/:item/agenda",name:"EventAppAgenda",component:()=>i.e(2561).then(i.bind(i,62561)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/feed",name:"EventAppFeed",component:()=>i.e(667).then(i.bind(i,80667)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/feed/:postId",name:"EventAppFeedPost",component:()=>i.e(667).then(i.bind(i,80667)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/participants",name:"EventAppParticipants",component:()=>i.e(2638).then(i.bind(i,12638)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/details",name:"EventAppDetails",component:()=>i.e(9467).then(i.bind(i,79467)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/profile",name:"EventAppProfile",component:()=>i.e(9531).then(i.bind(i,59531)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/networking",name:"EventAppNetworking",component:()=>i.e(3228).then(i.bind(i,13228)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/votes",name:"EventAppVotes",component:()=>i.e(7944).then(i.bind(i,87944)),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/event-app/:item/networking/meetings",name:"EventAppNetworkingMeetings",component:()=>i.e(3228).then(i.bind(i,13228)),props:()=>({}),meta:{layout:"event-app",anonymous:!0,hasEventSidebar:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/events/edit/:item",name:"EventUpdate",component:pD,meta:{hasEventSidebar:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/edit/registration-form/:item",name:"EventRegistrationForm",component:ED,meta:{hasEventSidebar:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/edit/ticketing/:item",name:"EventTicketingSettings",component:bV,meta:{hasEventSidebar:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/payments/:item",name:"EventPayments",component:bD,meta:{hasEventSidebar:!0}},{path:"/events/analytics/:item",name:"EventAnalytics",component:yD,meta:{hasEventSidebar:!0}},{path:"/events/create",name:"EventCreate",component:gD,meta:{hasAppSidebarMenu:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/events/report/:item",name:"EventReportUpdate",component:hD,meta:{hasEventSidebar:!0}},{path:"/events/annual-report/:item",name:"AnnualReport",component:uD,meta:{alwaysRefresh:!0,noScroll:!0}},{path:"/public/event/:item",name:"EventPublicPage",component:DV,meta:{layout:"payment",anonymous:!0,alwaysRefresh:!0}},{path:"/public/event-agenda/:item",name:"EventAgendaEmbed",component:XV,meta:{layout:"simple",layoutSize:"full",anonymous:!0,alwaysRefresh:!0}},{path:"/public/vote/:hash/:voteCollectionId",name:"PublicVote",component:()=>i.e(7873).then(i.bind(i,27873)),meta:{layout:"simple",anonymous:!0,alwaysRefresh:!0}},{path:"/public/events",name:"PublicEventsList",component:B_.A,meta:{layout:"simple",layoutSize:"medium",anonymous:!0,alwaysRefresh:!0}},{path:"/public/form/:item",name:"FormPublicPage",component:JR,meta:{layout:"simple",layoutSize:"medium",anonymous:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/share/newsletter/:item",name:"NewsletterSharePage",component:CV,meta:{alwaysRefresh:!0,layout:"simple",anonymous:!0},props:!0},{path:"/share/product/:item",name:"ProductSharePage",component:Tc,meta:{layout:"payment",anonymous:!0}},{path:"/share/form/:slugGo",name:"FormSharePage",component:JR,meta:{layout:"simple",layoutSize:"medium",anonymous:!0,alwaysRefresh:!0}},{path:"/public/video/:slugGo",name:"VideoSharePage",component:()=>i.e(1102).then(i.bind(i,51102)),meta:{layout:"simple",layoutSize:"full",anonymous:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/public/video-embed/:slugGo",name:"VideoEmbedPage",component:()=>i.e(2058).then(i.bind(i,52058)),meta:{layout:"iframe",anonymous:!0,alwaysRefresh:!0}},{path:"/contact-form/:uuid",name:"ContactPublicForm",component:()=>i.e(4740).then(i.bind(i,24740)),meta:{layout:"iframe",anonymous:!0,alwaysRefresh:!0}},{path:"/public/folder/:slugGo/:folderId?",name:"FolderSharePage",component:()=>i.e(1993).then(i.bind(i,61993)),meta:{layout:"simple",layoutSize:"full",anonymous:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/share/:slugGo",name:"FormSharePageLegacy",component:JR,meta:{layout:"simple",layoutSize:"medium",anonymous:!0,alwaysRefresh:!0}},{path:"/queries",name:"QueryList",redirect:{name:"Stats",query:{tab:"dbquery"}}},{path:"/tenant/support",name:"TenantSupport",component:mX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/discussion-namespace",name:"DiscussionNamespaceList",component:pX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/discussion-namespace/edit/:item",name:"DiscussionNamespaceUpdate",component:gX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/discussion-namespace/create",name:"DiscussionNamespaceCreate",component:hX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/custom-menu",name:"CustomMenuList",component:RV,meta:{role:"ROLE_ADMIN_TENANT",hasAppSidebarMenu:!0}},{path:"/queries/:item",name:"QueryShow",component:cD},{path:"/dev-docs",name:"DevDocs",component:vX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/api-tokens",name:"ApiTokens",component:CX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/apps",name:"AppList",component:kX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/apps/edit/:item",name:"AppUpdate",component:LX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/apps/create",name:"AppCreate",component:wX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/local-centers/:parent",name:"LocalCenterList",component:$D,meta:{anonymous:!0,hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/local-center/:item",name:"LocalCenterShow",component:FD,meta:{hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/local-center/analytics",name:"LocalCenterAnalytics",component:()=>Promise.all([i.e(6801),i.e(6118),i.e(1288),i.e(6478),i.e(1892),i.e(5927)]).then(i.bind(i,28482)),meta:{hasAppSidebarMenu:!0}},{path:"/local-center/edit/:item",name:"LocalCenterUpdate",component:SD,meta:{role:"ADMIN_LOCAL",hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/local-center/create",name:"LocalCenterCreate",component:TD,meta:{role:"ADMIN_TENANT",hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/local-center-map/",name:"MapView",component:kR,meta:{anonymous:!0,layout:"simple",layoutSize:"big"}},{path:"/getting-started",name:"OnBoardingTenant",component:ZU,meta:{hasAppSidebarMenu:!0,role:"ADMIN_TENANT"}},{path:"/professional-network",name:"ProfessionalList",component:tD,meta:{hasAppSidebarMenu:!0}},{path:"/groups/browse",name:"GroupBrowse",component:ID,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/group/edit/:item",name:"GroupUpdate",component:ND,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/group/create",name:"GroupCreate",component:MD,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/group/:item/join",name:"GroupJoin",component:xD,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/group/info",name:"GroupInfo",component:ZV,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/projects",name:"ProjectList",component:NR,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/my-tasks",name:"ProjectMyTasks",component:OR,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/project/create",name:"ProjectCreate",component:UR,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/project/:id",name:"ProjectShow",component:DR,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0},redirect:e=>{const t={overview:"ProjectOverview",tasks:"ProjectTasks",board:"ProjectBoard",gantt:"ProjectGantt",about:"ProjectAbout"},i=a.M.state.projectLastTab?.[e.params.id];return{name:t[i]||"ProjectOverview",params:e.params}},children:[{path:"overview",name:"ProjectOverview",component:VR},{path:"tasks",name:"ProjectTasks",component:RR},{path:"board",name:"ProjectBoard",component:QR},{path:"gantt",name:"ProjectGantt",component:BR},{path:"about",name:"ProjectAbout",component:GR},{path:"task/:taskId",name:"ProjectTaskShow",component:jR,meta:{alwaysRefresh:!0}},{path:"goals",name:"Project
1Goals",component:WR},{path:"settings",name:"ProjectSettings",component:XR}]},{path:"/drive",name:"DriveList",component:G_.A,meta:{hasAppSidebarMenu:!0,hideGroupHeader:!0,hideMobileFooterNavbar:!1,hideMobileHeaderNavbar:!0,alwaysRefresh:!0}},{path:"/drive/:item",name:"DriveItem",component:UD},{path:"/drive-doc/:id",name:"DriveDoc",component:DD,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/discuss",name:"DiscussList",component:VE,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/discuss/moderation-queue",name:"ModerationQueue",component:XD,meta:{hasAppSidebarMenu:!0,anonymous:!1}},{path:"/discuss/:item",name:"DiscussShow",component:CI,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0}},{path:"/discuss/show/:item",name:"DiscussShowOld",component:CI,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0}},{path:"/issue/:item",name:"IssueShow",component:CI,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0}},{path:"/issues",name:"IssueList",component:NI,meta:{hasAppSidebarMenu:!0,alwaysRefresh:!0,hideMobileHeaderNavbar:!0}},{path:"/units",name:"UnitList",component:BD,meta:{role:"HR_LOCAL",hasAppSidebarMenu:!0,alwaysRefresh:!0}},{path:"/units/segmented",name:"FilteredList",component:MV,meta:{role:"HR_LOCAL",allowUnitAdmin:!0,hasAppSidebarMenu:!0,alwaysRefresh:!0}},{path:"/gazette",name:"GazetteList",component:GD,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/gazette/:item",name:"GazetteShow",component:WD,hasAppSidebarMenu:!0},{path:"/gazette/edit/:item",name:"GazetteUpdate",component:jD,meta:{role:"HR_TENANT",hasAppSidebarMenu:!0}},{path:"/gazette/create",name:"GazetteCreate",component:zD,meta:{role:"HR_TENANT",hasAppSidebarMenu:!0}},{path:"/role",name:"RoleList",component:qD,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/event-type",name:"EventTypeList",component:_X,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/profile-status",name:"ProfileStatusList",component:FX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/profession-type",name:"ProfessionTypeList",component:JD,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/region",name:"RegionList",component:cV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/region/edit/:item",name:"RegionUpdate",component:uV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/region/create",name:"RegionCreate",component:mV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/badge-users",name:"BadgeUsers",component:xX,meta:{hasAppSidebarMenu:!0}},{path:"/badge-type",name:"BadgeTypeList",component:TX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/badge-type/edit/:item",name:"BadgeTypeUpdate",component:SX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/badge-type/create",name:"BadgeTypeCreate",component:AX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/gamification-settings",name:"GamificationSettings",component:NX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/badge",name:"BadgeList",component:PX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/badge/edit/:item",name:"BadgeUpdate",component:IX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/badge/create",name:"BadgeCreate",component:MX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/tags",name:"TagsList",component:fR,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/dashboard/configure",name:"DashboardBuilder",component:bR,meta:{role:"ROLE_ADMIN_TENANT",hasAppSidebarMenu:!1}},{path:"/custom-field",name:"CustomFieldList",component:UX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/custom-field/edit/:item",name:"CustomFieldUpdate",component:DX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/custom-field/create",name:"CustomFieldCreate",component:XX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/reports",name:"ReportList",component:VX,meta:{role:"ROLE_ADMIN_TENANT",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/reports/create",name:"ReportCreate",component:RX,meta:{role:"ROLE_ADMIN_TENANT",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/reports/edit/:item",name:"ReportUpdate",component:OX,meta:{role:"ROLE_ADMIN_TENANT",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/reports/:item",name:"ReportShow",component:QX,meta:{role:"ROLE_ADMIN_TENANT",hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/tenant/custom-domain",name:"TenantCustomDomain",component:fX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/logs",name:"TenantLogs",component:QM,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/settings/online-payments",name:"TenantSettingsPayments",component:bX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/local/settings/online-payments",name:"LocalCenterSettingsPayments",component:bX,meta:{role:"ADMIN_LOCAL",hasAppSidebarMenu:!0}},{path:"/local/settings/fee",name:"LocalCenterSettingsFees",component:yX,meta:{role:"ADMIN_LOCAL",hasAppSidebarMenu:!0}},{path:"/local/settings/waitlist",name:"LocalCenterWaitlistSettings",component:CR,meta:{role:"FINANCIAL_LOCAL",hasAppSidebarMenu:!0}},{path:"/tenant/settings/waitlist-priorities",name:"TenantWaitlistPrioritySettings",component:LR,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/texts",name:"TenantTexts",component:cX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/terminology",name:"TenantTerminology",component:uX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/billing",name:"Billing",component:sX,meta:{role:"FINANCIAL_TENANT",isTenantSettings:!0}},{path:"/tenant/usage",name:"TenantUsage",component:nX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"/billing-due",name:"BillingDue",component:aX},{path:"/tenant/forms-register",name:"TenantFormsRegister",component:oX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/forms-profile",name:"TenantFormsProfile",component:lX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/forms-adhesion",name:"TenantFormsAdhesion",component:dX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/forms",name:"FormBuilderList",component:ER,meta:{roles:["HR_TENANT","COMMUNICATION_TENANT","EVENT_TENANT"],hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/form/update/:item",name:"FormBuilderUpdate",component:$R,meta:{roles:["HR_TENANT","COMMUNICATION_TENANT","EVENT_TENANT"],hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/form/preview/:item",name:"FormBuilderPreview",component:()=>i.e(3423).then(i.bind(i,33423)),meta:{layout:"simple",layoutSize:"full",role:"HR_TENANT",hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/tenants/update",name:"TenantUpdate",component:tX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/branding",name:"TenantBranding",component:ZD,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/languages",name:"TenantLanguages",component:eX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/demo-notification",name:"DemoNotification",component:iX}
1,{path:"/tenants/settings/features",name:"TenantSettingFeatures",component:YD,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/modules/users",component:()=>i.e(3538).then(i.bind(i,33538)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleUsersConfig",component:()=>i.e(4510).then(i.bind(i,44510)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"custom-fields",name:"ModuleUsersCustomFields",component:UX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"custom-fields/create",name:"ModuleUsersCustomFieldCreate",component:XX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"custom-fields/edit/:item",name:"ModuleUsersCustomFieldUpdate",component:DX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"tags",name:"ModuleUsersTags",component:fR,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"roles",name:"ModuleUsersRoles",component:qD,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"forms/register",name:"ModuleUsersFormsRegister",component:oX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"forms/profile",name:"ModuleUsersFormsProfile",component:rX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"forms/adhesion",name:"ModuleAdhesionFormsProfile",component:dX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"adhesion-template",name:"ModuleAdhesionTemplate",component:()=>i.e(7585).then(i.bind(i,47585)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"referral",name:"ModuleUsersReferral",component:()=>i.e(6226).then(i.bind(i,56226)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"waitlist",name:"ModuleUsersWaitlist",component:()=>i.e(8947).then(i.bind(i,8947)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"privacy-defaults",name:"ModuleUsersPrivacyDefaults",component:()=>i.e(2466).then(i.bind(i,72466)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"security-permissions",name:"ModuleUsersSecurityPermissions",component:()=>i.e(3827).then(i.bind(i,93827)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"user-type-forms",name:"ModuleUsersUserTypeForms",component:()=>i.e(3519).then(i.bind(i,23519)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"user-type-forms/:id",name:"ModuleUsersUserTypeFormEdit",component:()=>i.e(9275).then(i.bind(i,49275)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/admin/merge",name:"MergeIndex",component:HR,meta:{role:"HR_TENANT",isTenantSettings:!0}},{path:"/admin/merge/history",name:"MergeHistory",component:KR,meta:{role:"HR_TENANT",isTenantSettings:!0}},{path:"/tenants/modules/events",component:()=>i.e(9643).then(i.bind(i,89643)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleEventsConfig",component:()=>i.e(3009).then(i.bind(i,43009)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"event-types",name:"ModuleEventsEventTypes",component:_X,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"event-statuses",name:"ModuleEventsEventStatuses",component:EX,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"attendance-reminder",name:"ModuleEventsAttendanceReminder",component:$X,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"event-templates",name:"ModuleEventsTemplates",component:()=>i.e(1484).then(i.bind(i,61484)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"event-templates/create",name:"ModuleEventsTemplateCreate",component:()=>i.e(7703).then(i.bind(i,67703)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"event-templates/:id/edit",name:"ModuleEventsTemplateEdit",component:()=>i.e(7703).then(i.bind(i,67703)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/discussions",component:()=>i.e(2721).then(i.bind(i,22721)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleDiscussionsConfig",component:()=>i.e(1704).then(i.bind(i,41704)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"categories",name:"ModuleDiscussionsCategories",component:pX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"categories/create",name:"ModuleDiscussionsCategoryCreate",component:hX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"categories/edit/:item",name:"ModuleDiscussionsCategoryUpdate",component:gX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/payments",component:()=>i.e(3241).then(i.bind(i,73241)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModulePaymentsConfig",component:()=>i.e(9433).then(i.bind(i,99433)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"gateway",name:"ModulePaymentsGateway",component:bX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"product-setup",name:"ModulePaymentsProductSetup",component:()=>i.e(4295).then(i.bind(i,44295)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"membership-fees",name:"ModulePaymentsMembershipFees",component:()=>i.e(8312).then(i.bind(i,8312)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"invoice-product",name:"ModulePaymentsInvoiceProduct",component:()=>i.e(4617).then(i.bind(i,14617)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"invoice-templates",name:"InvoiceTemplateList",component:()=>i.e(7558).then(i.bind(i,97558)),meta:{role:"ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/groups",component:()=>i.e(4543).then(i.bind(i,14543)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleGroupsConfig",component:()=>i.e(6550).then(i.bind(i,6550)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"categories",name:"ModuleGroupsCategories",component:eR,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"role-groups",name:"ModuleGroupsRoleGroups",redirect:{name:"GroupBrowse",query:{filter:"role_groups"}},meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"unit-types",name:"ModuleGroupsUnitTypes",component:VD,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0,alwaysRefresh:!0}},{path:"local-centers",name:"ModuleLocalCentersConfig",component:()=>i.e(6237).then(i.bind(i,16237)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"local-centers/regions",name:"ModuleLocalCentersRegions",component:()=>i.e(8144).then(i.bind(i,95763)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/emails",component:()=>i.e(4680).then(i.bind(i,84680)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleEmailsConfig",component:()=>i.e(4475).then(i.bind(i,54475)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"notifications",name:"ModuleEmailsNotifications",component:()=>i.e(3770).then(i.bind(i,43770)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"system-emails",name:"ModuleEmailsSystem",component:()=>i.e(9091).then(i.bind(i,19091)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"templates",name:"ModuleEmailsTemplates",component:ZX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"contact-forms",name:"ContactWidgetList",component:()=>i.e(9015).then(i.bind(i,79015)),meta:{roles:["COMMUNICATION_TENANT","ADMIN_TENANT"],isTenantSettings:!0,alwaysRefresh:!0}}]},{path:"/tenants/modules/professions",component:()=>i.e(7043).then(i.bind(i,7043)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleProfessionsConfig",component:()=>i.e(3725).then(i.bind(i,33725)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"industries",name:"ModuleProfessionsIndustries",component:JD,meta:{role:"ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/gamification",component:()=>i.e(4064).then(i.bind(i,84064)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleGamificationConfig",component:()=>i.e(6464).then(i.bind(i,64083)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"badges",name:"ModuleGamificationBadges",component:()=>i.e(6551).then(i.bind(i,86551)),meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"badge-types",name:"ModuleGamificationBadgeTypes",component:()=>i.e(5796).then(i.bind(i,45796)),meta:{role:"ADMIN_TENANT",isTenantSettings:!0}},{path:"courses",name:"ModuleGamificationCourses",component:()=>i.e(9826).then(i.bind(i,59826)),meta:{role:"ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/helpdesk",component:()=>i.e(7919).then(i.bind(i,77919)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleHelpdeskConfig",component:()=>i.e(4147).then(i.bind(i,84147)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/projects",component:()=>i.e(2664).then(i.bind(i,72664)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleProjectsConfig",component:()=>i.e(3558).then(i.bind(i,53558)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/voting",component:()=>i.e(6042).then(i.bind(i,86042)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleVotingConfig",component:()=>i.e(5501).then(i.bind(i,95501)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/identity-validation",component:()=>i.e(7616).then(i.bind(i,37616)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleIdentityValidationConfig",component:()=>i.e(142).then(i.bind(i,70142)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/company",component:()=>i.e(273).then(i.bind(i,60273)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleCompanyConfig",component:()=>i.e(3106).then(i.bind(i,73106)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/form-builder",component:()=>i.e(9070).then(i.bind(i,79070)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleFormBuilderConfig",component:()=>i.e(630).then(i.bind(i,20630)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/drive",component:()=>i.e(839).then(i.bind(i,20839)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleDriveConfig",component:()=>i.e(2391).then(i.bind(i,82391)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"official-gazette",name:"ModuleOfficialGazetteConfig",component:()=>i.e(2758).then(i.bind(i,42758)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"edocuments",name:"ModuleEDocumentsConfig",component:()=>i.e(3260).then(i.bind(i,73260)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"edocuments/templates",name:"ModuleEDocumentsTemplates",component:()=>i.e(8662).then(i.bind(i,48662)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"edocuments/templates/create",name:"ModuleEDocumentsTemplateCreate",component:()=>i.e(9105).then(i.bind(i,49105)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"edocuments/templates/update/:item",name:"ModuleEDocumentsTemplateUpdate",component:()=>i.e(8991).then(i.bind(i,41372)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/modules/contacts",component:()=>i.e(5488).then(i.bind(i,55488)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0},children:[{path:"",name:"ModuleContactsConfig",component:()=>i.e(9085).then(i.bind(i,99085)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"statuses",name:"ModuleContactsStatuses",component:()=>i.e(8595).then(i.bind(i,8595)),meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}}]},{path:"/tenants/update/:item",name:"TenantUpdateAdmin",component:tX,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants",name:"TenantList",component:HD,meta:{role:"ROLE_SUPER_ADMIN"}},{path:"/tenant/:item",name:"TenantShow",component:KD,meta:{role:"ROLE_SUPER_ADMIN"}},{path:"/tenants/import",name:"TenantImport",component:RD,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/import-demo",name:"TenantImportDemo",component:OD,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/provisioning",name:"TenantProvisioning",component:QD,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/fee/payments",name:"FeePayments",component:jX,meta:{hasProductMenu:!0,role:"FINANCIAL_LOCAL",allowUnitAdmin:!0}}
1,{path:"/fee/members-local-center",name:"FeeMembersLocalCenter",component:WX,meta:{role:"FINANCIAL_LOCAL",allowUnitAdmin:!0}},{path:"/e-document-templates",name:"DocumentList",redirect:{name:"DocumentUser",query:{templates:""}},meta:{role:"HR_TENANT",hasAppSidebarMenu:!0}},{path:"/e-document/create",name:"DocumentCreate",component:qX,meta:{role:"HR_TENANT",hasAppSidebarMenu:!0}},{path:"/e-document/update/:item",name:"DocumentUpdate",component:JX,meta:{role:"HR_TENANT",hasAppSidebarMenu:!0}},{path:"/e-documents",name:"DocumentUser",component:HX,meta:{role:"HR_TENANT",alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/e-document/preview/contract/:contractId",name:"DocumentPreview",component:HV,meta:{alwaysRefresh:!0,hideMobileFooterNavbar:!0}},{path:"/e-document/preview/user/:contractUserId",name:"DocumentPreviewUser",component:HV,meta:{alwaysRefresh:!0,hideMobileFooterNavbar:!0}},{path:"/public/document/:hash",name:"PublicDocumentPreview",component:KV,meta:{anonymous:!0,layout:"simple",layoutSize:"big",alwaysRefresh:!0}},{path:"/contacts",name:"ContactList",component:pU,meta:{alwaysRefresh:!0,hideMobileFooterNavbar:!0,hideMobileHeaderNavbar:!0,hasAppSidebarMenu:!0}},{path:"/contacts/create",name:"ContactCreate",component:KX,meta:{hasAppSidebarMenu:!0}},{path:"/contacts/show/:item",name:"ContactShow",component:YX,meta:{hasAppSidebarMenu:!0}},{path:"/companies",name:"CompanyList",component:AR,meta:{hasAppSidebarMenu:!0},beforeEnter:(e,t,i)=>{const s=a.M.getters.tenant;if(!s?.settingFeatures?.company?.isActive)return void i({name:"Dashboard"});const n=s.settingFeatures.company.whoCanCreateCompany||"USER";a.M.getters.isGranted(n)||a.M.getters.isGranted("ADMIN_TENANT")?i():i({name:"Dashboard"})}},{path:"/organizations",name:"CompanyDirectory",component:PR,meta:{hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0},beforeEnter:(e,t,i)=>{a.M.getters.tenant?.settingFeatures?.company?.isActive?i():i({name:"Dashboard"})}},{path:"/companies-directory",redirect:{name:"CompanyDirectory"}},{path:"/companies/create",name:"CompanyCreate",component:IR,meta:{hasAppSidebarMenu:!0}},{path:"/my-company",name:"MyCompany",component:FR,meta:{hasAppSidebarMenu:!0}},{path:"/my-company/edit",name:"MyCompanyUpdate",component:TR,meta:{hasAppSidebarMenu:!0}},{path:"/companies/:uuid",name:"CompanyShow",component:FR,meta:{hasAppSidebarMenu:!0}},{path:"/companies/:uuid/edit",name:"CompanyUpdate",component:TR,meta:{hasAppSidebarMenu:!0}},{path:"/company-invitation/:hash",name:"CompanyAcceptInvitation",component:SR,meta:{hasAppSidebarMenu:!0}},{path:"/company-fee-required",name:"CompanyFeeRequired",component:MR,meta:{layout:"simple",layoutSize:"medium"}},{path:"/company-fee-payment",name:"CompanyFeePayment",component:xR,meta:{layout:"simple",layoutSize:"medium"}},{path:"/email-templates",name:"EmailTemplates",component:ZX,meta:{roles:["COMMUNICATION_TENANT","ADMIN_TENANT"],isTenantSettings:!0}},{path:"/tenants/workflows",name:"WorkflowList",component:eV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenants/workflows/create",name:"WorkflowCreate",component:tV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0,hideSettingsSidebar:!0}},{path:"/tenants/workflows/:uuid",name:"WorkflowEdit",component:tV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0,hideSettingsSidebar:!0}},{path:"/tenants/workflows/:uuid/logs",name:"WorkflowLogs",component:iV,meta:{role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/user-invite",name:"UserInvite",redirect:()=>({name:"UserShowMyProfile",query:{tab:"referrals"}}),meta:{hasAppSidebarMenu:!0}},{path:"/fee/stats",name:"FeeStats",component:zX,meta:{role:"FINANCIAL_TENANT",hasAppSidebarMenu:!0}},{path:"/privacy",name:"PrivacyTenantMember",component:AD,meta:{anonymous:!0,layout:"simple",layoutSize:"medium"}},{path:"/terms",name:"TermsTenantMember",component:PD,meta:{anonymous:!0,layout:"simple",layoutSize:"medium"}},{path:"/vote/share/:token",name:"VoteShare",component:oV,meta:{layout:"simple",anonymous:!0,alwaysRefresh:!0}},{path:"/vote/:item",name:"VoteShow",component:aV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0},beforeEnter:qR},{path:"/vote/box/:item",name:"VoteBox",component:nV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/vote/integrity/:item",name:"VoteIntegrity",component:lV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/vote/create",name:"VoteCreate",component:rV,meta:{alwaysRefresh:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/vote/edit/:item",name:"VoteUpdate",component:dV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0,hideMobileFooterNavbar:!0}},{path:"/vote",name:"VoteList",component:sV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,hideMobileHeaderNavbar:!0}},{path:"/resignation-request/:item",name:"ResignationRequestShow",component:gV,meta:{hasAppSidebarMenu:!0}},{path:"/resignation-requests",name:"ResignationRequestList",component:fV,meta:{hasAppSidebarMenu:!0}},{path:"/newsletter-widgets",name:"NewsletterWidget",component:LV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/newsletter/:item",name:"NewsletterShow",component:wV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"},beforeEnter:zR,props:!0},{path:"/public/newsletter/:item",name:"NewsletterPreview",component:CV,meta:{alwaysRefresh:!0,layout:"simple",anonymous:!0},props:!0},{path:"/newsletter/create",component:_V,name:"NewsletterCreate",meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"},beforeEnter:zR},{path:"/event/message/create",component:_V,name:"EventMessageCreate",meta:{alwaysRefresh:!0,hasEventSidebar:!0}},{path:"/newsletter/templates",component:$V,name:"NewsletterTemplateSelection",meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/newsletter/edit/:item",name:"NewsletterUpdate",redirect:e=>({name:"NewsletterShow",params:{item:e.params.item},query:{tab:"configure"}})},{path:"/newsletter/builder/:item",name:"NewsletterBuilder",component:EV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"},beforeEnter:(e,t,i)=>{e.query.createEditTemplate?zR(e,t,i):i({name:"NewsletterShow",params:{item:e.params.item},query:{tab:"content"}})}},{path:"/newsletter-gallery",name:"NewsletterGalleryList",component:vV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/newsletter/list",name:"NewsletterList",component:kV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/contact-messages",name:"ContactRequestList",component:()=>i.e(5627).then(i.bind(i,75627)),meta:{roles:["COMMUNICATION_TENANT","ADMIN_TENANT"],alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/event/messages/:item",name:"EventMessageList",component:kV,meta:{alwaysRefresh:!0,hasEventSidebar:!0}},{path:"/import",name:"ILADataImport",component:FV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}}
1,{path:"/local-center-change/form",name:"LocalCenterChangeForm",component:TV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/local-center-change/list",name:"LocalCenterChangeList",component:SV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/local-center-change/show/:item",name:"LocalCenterChangeShow",component:AV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/email-template/edit",name:"EmailTemplateEditor",component:QV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!1,isTenantSettings:!0,roles:["COMMUNICATION_TENANT","ADMIN_TENANT"]}},{path:"/dashboard-welcome-template",name:"DashboardWelcomeTemplate",component:OV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!1,isTenantSettings:!0}},{path:"/invoice",name:"InvoiceList",component:BV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0}},{path:"/invoice/:item",name:"InvoiceShow",component:GV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,role:"ADMIN_TENANT"}},{path:"/invoice/update/:item",name:"InvoiceUpdate",component:WV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,role:"ADMIN_TENANT"}},{path:"/invoice/create",name:"InvoiceCreate",component:jV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,role:"ADMIN_TENANT"}},{path:"/email-log",name:"EmailLogList",component:zV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration",roles:["COMMUNICATION_TENANT","ADMIN_TENANT"]}},{path:"/email-log/:item",name:"EmailLogShow",component:qV,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration",roles:["COMMUNICATION_TENANT","ADMIN_TENANT"]}},{path:"/invoice/checkout/:item",name:"PaymentInvoiceCheckoutRedirect",component:JV,meta:{layout:"simple",anonymous:!0}},{path:"/pay-membership-redirect/:item",name:"PaymentMembershipCheckoutRedirect",component:tR,meta:{layout:"simple",anonymous:!0}},{path:"/refer/:hash",name:"Refer",component:YV,meta:{layout:"simple"}},{path:"/tenant/settings/integrations",name:"TenantSettingsIntegrations",component:iR,meta:{alwaysRefresh:!0,role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/settings/webhooks",name:"WebhookList",component:sR,meta:{alwaysRefresh:!0,role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/settings/webhooks/create",name:"WebhookCreate",component:aR,meta:{alwaysRefresh:!0,role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/settings/webhooks/:item/edit",name:"WebhookUpdate",component:nR,meta:{alwaysRefresh:!0,role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/tenant/settings/webhooks/:id/logs",name:"WebhookDeliveryLogs",component:oR,meta:{alwaysRefresh:!0,role:"ROLE_ADMIN_TENANT",isTenantSettings:!0}},{path:"/utm-stats/:hash",name:"UTMStats",component:rR,meta:{layout:"simple",anonymous:!0}},{path:"/platform-usage-stats",name:"StatsPlatformUsage",redirect:{name:"Stats",query:{tab:"platform"}}},{path:"/organization-stats",name:"OrganizationStats",redirect:{name:"Stats"}},{path:"/404",name:"NotFound",component:GX,meta:{layout:"simple",anonymous:!0}},{path:"/email-lists",name:"UserListIndex",component:dR,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/email-lists/create",name:"UserListCreate",component:cR,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/email-lists/:item",name:"UserListView",component:uR,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/email-lists/:item/edit",name:"UserListEdit",component:mR,meta:{alwaysRefresh:!0,hasAppSidebarMenu:!0,sidebarMode:"administration"}},{path:"/newsletter-builder-embed",name:"NewsletterBuilderEmbed",component:pR,meta:{layout:"simple",anonymous:!0}},{path:"/courses",name:"CourseList",component:QU,meta:{hasAppSidebarMenu:!0}},{path:"/courses/create",name:"CourseCreate",component:GU,meta:{hasAppSidebarMenu:!0}},{path:"/courses/:id/edit",name:"CourseUpdate",component:GU,meta:{hasAppSidebarMenu:!0}},{path:"/courses/:id",name:"CourseShow",component:BU,meta:{hasAppSidebarMenu:!0}},{path:"/courses/:id/learn",name:"CourseLearn",component:WU,meta:{hasAppSidebarMenu:!0}},{path:"/course-mandatory/:id?",name:"CourseEnforced",component:jU,meta:{layout:"simple",layoutSize:"medium"}},{path:"/lessons/:id/edit",name:"LessonUpdate",component:wR,meta:{hasAppSidebarMenu:!0}},{path:"/lessons/create",name:"LessonCreate",component:wR,meta:{hasAppSidebarMenu:!0}},{path:"/quizzes/:id/edit",name:"QuizUpdate",component:_R,meta:{hasAppSidebarMenu:!0}},{path:"/role-group/:item",name:"RoleGroupUpdate",redirect:e=>({name:"GroupUpdate",params:{item:e.params.item},query:{type:"role_group"}})},{path:"/:pathMatch(.*)*",redirect:"/404"}],eO=(0,s.aE)({history:(0,s.LA)("/"),routes:ZR,scrollBehavior(e,t,i){const s=document.getElementById("oMain");if(e.path!==t.path)return("DiscussList"!==e.name||!a.M.state.listValues?.discussion?.pendingScrollRestore)&&(("Dashboard"!==e.name||!a.M.state.dashboardPendingScrollRestore)&&(("EventAppFeed"!==e.name||!a.M.state.eventAppFeedPendingScrollRestore)&&(i?(s&&(s.scrollTop=i.top||0),i):(s&&(s.scrollTop=0),{top:0}))))}});eO.onError(e=>{console.error("Routing error:",e);const t=e&&e.message?e.message:"",i=e&&("ChunkLoadError"===e.name||t.includes("Failed to fetch dynamically imported module")||t.includes("Loading chunk")||t.includes("Importing a module script failed"));if(i){window.__orgoReportError&&window.__orgoReportError({type:"ChunkLoadError",message:t,stack:e&&e.stack});const i="orgo:chunk-reload:"+window.location.pathname;window.sessionStorage.getItem(i)||(window.sessionStorage.setItem(i,"1"),window.location.reload())}}),eO.afterEach(e=>{try{window.sessionStorage.removeItem("orgo:chunk-reload:"+e.path)}catch{}(0,d.pt)(e),e.meta.sidebarMode&&a.M.commit("setSidebarMode",e.meta.sidebarMode),(0,n.UL)(e)&&a.M.getters.isGranted("ADMIN_TENANT")?a.M.commit("setSidebarMode","localAdministration"):"localAdministration"===a.M.state.sidebarMode&&a.M.commit("setSidebarMode","administration"),"Discu
1ssList"!==e.name&&"DiscussShow"!==e.name&&"DiscussShowOld"!==e.name&&a.M.state.listValues?.discussion&&(a.M.state.listValues.discussion.cache=null,a.M.state.listValues.discussion.pendingScrollRestore=!1),"Dashboard"!==e.name&&"DiscussShow"!==e.name&&"DiscussShowOld"!==e.name&&(a.M.state.dashboardFeedCache=null,a.M.state.dashboardPendingScrollRestore=!1),"EventAppFeed"!==e.name&&"EventAppFeedPost"!==e.name&&(a.M.state.eventAppFeedCache=null,a.M.state.eventAppFeedPendingScrollRestore=!1)}),eO.beforeEach((e,t,i)=>{const s=e.query&&e.query.h;if(s&&"string"===typeof s&&""!==s.trim()){try{sessionStorage.setItem("eventApp.contactHash",s.trim())}catch(a){}const t={...e.query};return delete t.h,void i({...e,query:t,replace:!0})}i()});var tO=eO},59905:function(e,t,i){"use strict";i.d(t,{A:function(){return pe}});var s=i(20641),a=i(90033);const n={class:"profile-timeline card"},o={class:"timeline-header"},l={class:"timeline-title"},r={key:0,class:"timeline-state"},d={class:"timeline-state-icon"},c={key:1,"data-test":"timeline-empty",class:"timeline-state"},u={class:"timeline-state-icon"},m={key:2,class:"timeline-rail"},p={class:"timeline-day","data-test":"timeline-day"},h=["onClick"],g={class:"timeline-marker"},f={class:"timeline-body"},b={class:"timeline-label"},y={class:"timeline-label-text"},v={class:"timeline-meta"},k={key:0,class:"timeline-actor"},C={key:1,class:"timeline-sep","aria-hidden":"true"},L={class:"timeline-time"},w={key:0,class:"timeline-more-wrap"},_=["disabled"],E={key:0,class:"modal-card note-modal"},$={class:"modal-card-head note-modal-head"},F={class:"modal-card-title note-modal-title"},T={class:"modal-card-body note-modal-body"},S={value:"called"},A={value:"emailed"},P={key:1,class:"preserve-whitespace note-modal-text"},I={class:"modal-card-foot note-modal-foot"},M={class:"note-modal-author"},x={class:"note-modal-date"},N={key:0,class:"note-modal-actions"},U=["disabled"],D=["disabled"],X={class:"icon is-small"},V={class:"icon is-small"},R={class:"modal-card form-modal"},O={class:"modal-card-head note-modal-head"},Q={class:"modal-card-title note-modal-title"},B={class:"modal-card-body form-modal-body"},G={key:0,class:"form-modal-state"};function W(e,t,i,W,j,z){const q=(0,s.g2)("TimelineFilters"),J=(0,s.g2)("b-icon"),H=(0,s.g2)("b-input"),K=(0,s.g2)("b-select"),Y=(0,s.g2)("b-field"),Z=(0,s.g2)("LogoThumbnail"),ee=(0,s.g2)("font-awesome-icon"),te=(0,s.g2)("b-modal"),ie=(0,s.g2)("FormSubmissionAnswers");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("header",o,[(0,s.Lk)("h3",l,(0,a.v_)(e.$t("Activity")),1)]),((0,s.uX)(),(0,s.Wv)(q,{key:j.filtersKey,modelValue:j.filters,"onUpdate:modelValue":[t[0]||(t[0]=e=>j.filters=e),z.onFiltersChange],actors:j.actors},null,8,["modelValue","actors","onUpdate:modelValue"])),j.isLoading&&!j.events.length?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("span",d,[(0,s.bF)(J,{icon:"spinner","custom-class":"fa-spin"})]),(0,s.eW)(" "+(0,a.v_)(e.$t("Loading"))+"⦠",1)])):j.events.length?((0,s.uX)(),(0,s.CE)("div",m,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(z.grouped,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.day},[(0,s.Lk)("div",p,(0,a.v_)(t.day),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.items,t=>((0,s.uX)(),(0,s.CE)("div",{key:t.id,class:(0,a.C4)(["timeline-event",{"is-clickable":z.isClickable(t)}]),"data-test":"timeline-event",onClick:e=>z.isClickable(t)&&z.openEvent(t)},[(0,s.Lk)("span",g,[(0,s.Lk)("span",{class:"timeline-dot",style:(0,a.Tr)({"--dot-color":z.typeColor(t.type)})},[(0,s.bF)(J,{icon:z.typeIcon(t.type),size:"is-small"},null,8,["icon"])],4)]),(0,s.Lk)("div",f,[(0,s.Lk)("div",b,[(0,s.Lk)("span",y,(0,a.v_)(z.label(t)),1),z.isClickable(t)?((0,s.uX)(),(0,s.Wv)(J,{key:0,class:"timeline-chevron",icon:"chevron-right",size:"is-small"})):(0,s.Q3)("",!0)]),(0,s.Lk)("div",v,[t.actorName?((0,s.uX)(),(0,s.CE)("span",k,(0,a.v_)(t.actorName),1)):(0,s.Q3)("",!0),t.actorName?((0,s.uX)(),(0,s.CE)("span",C," · ")):(0,s.Q3)("",!0),(0,s.Lk)("span",L,(0,a.v_)(e.$filters.format(t.timestamp,"HH:mm")),1)])])],10,h))),128))],64))),128)),j.hasMore?((0,s.uX)(),(0,s.CE)("div",w,[(0,s.Lk)("button",{class:"timeline-more",disabled:j.isLoading,onClick:t[2]||(t[2]=(...e)=>z.loadMore&&z.loadMore(...e))},(0,a.v_)(e.$t("Load more")),9,_)])):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("span",u,[(0,s.bF)(J,{icon:"clock-rotate-left"})]),z.filtersActive?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("No activity matches your filters"))+" ",1),(0,s.Lk)("button",{type:"button",class:"timeline-empty-clear is-rounded","data-test":"timeline-empty-clear",onClick:t[1]||(t[1]=(...e)=>z.clearFilters&&z.clearFilters(...e))},(0,a.v_)(e.$t("Clear filters")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(e.$t("No activity yet")),1)],64))])),(0,s.bF)(te,{modelValue:j.showNoteModal,"onUpdate:modelValue":t[10]||(t[10]=e=>j.showNoteModal=e),"has-modal-card":"","trap-focus":"","destroy-on-hide":!0,"aria-role":"dialog","aria-modal":""},{default:(0,s.k6)(()=>[j.selectedNote?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.Lk)("header",$,[(0,s.Lk)("span",{class:"note-modal-icon",style:(0,a.Tr)({"--dot-color":z.typeColor("note")})},[(0,s.bF)(J,{icon:z.typeIcon("note"),size:"is-small"},null,8,["icon"])],4),(0,s.Lk)("p",F,(0,a.v_)(e.$t("Note")),1),j.selectedNote.meta.action?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"note-modal-badge",style:(0,a.Tr)({"--dot-color":z.typeColor("note")})},[(0,s.bF)(J,{icon:z.actionIcon(j.selectedNote.meta.action),size:"is-small"},null,8,["icon"]),(0,s.eW)(" "+(0,a.v_)(z.noteActionLabel(j.selectedNote.meta.action)),1)],4)):(0,s.Q3)("",!0),(0,s.Lk)("button",{type:"button",class:"delete note-modal-close",onClick:t[3]||(t[3]=e=>j.showNoteModal=!1)})]),(0,s.Lk)("section",T,[j.isEditingNote?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.bF)(H,{modelValue:j.editText,"onUpdate:modelValue":t[4]||(t[4]=e=>j.editText=e),type:"textarea",maxlength:"512",rows:"4"},null,8,["modelValue"]),(0,s.bF)(Y,{label:e.$t("Action"),class:"mt-2"},{default:(0,s.k6)(()=>[(0,s.bF)(K,{modelValue:j.editAction,"onUpdate:modelValue":t[5]||(t[5]=e=>j.editAction=e),expanded:""},{default:(0,s.k6)(()=>[t[13]||(t[13]=(0,s.Lk)("option",{value:null},"â",-1)),(0,s.Lk)("option",S,(0,a.v_)(e.$t("Called")),1),(0,s.Lk)("option",A,(0,a.v_)(e.$t("Emailed")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):((0,s.uX)(),(0,s.CE)("p",P,(0,a.v_)(j.selectedNote.meta.text),1))]),(0,s.Lk)("footer",I,[(0,s.Lk)("span",M,[j.selectedNote.actorName?((0,s.uX)(),(0,s.Wv)(Z,{key:0,item:{logo:j.selectedNote.actorLogo,fullName:j.selectedNote.actorName},"is-type":"roundXSmall"},null,8,["item"])):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(j.selectedNote.actorName),1)]),(0,s.Lk)("span",x,(0,a.v_)(e.$filters.format(j.selectedNote.timestamp,"dateTime")),1),z.canManageSelectedNote?((0,s.uX)(),(0,s.CE)("span",N,[j.isEditingNote?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("button",{class:"button is-small is-rounded",disabled:j.isSavingNote,onClick:t[6]||(t[6]=(...e)=>z.cancelEditNote&&z.cancelEditNote(...e))},(0,a.v_)(e.$t("Cancel")),9,U),(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-small is-rounded",{"is-loading":j.isSavingNote}]),disabled:!j.editText.trim()||j.isSavingNote,onClick:t[7]||(t[7]=(...e)=>z.saveNote&&z.saveNote(...e))},(0,a.v_)(e.$t("Save")),11,D)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("button",{class:"button is-small is-rounded","data-test":"edit-note",onClick:t[8]||(t[8]=(...e)=>z.startEditNote&&z.startEditNote(...e))},[(0,s.Lk)("span",X,[(0,s.bF)(ee,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Edit")),1)]),(0,s.Lk)("button",{class:"button is-small is-rounded is-danger is-light","data-test":"delete-note",onClick:t[9]||(t[9]=(...e)=>z.confirmDeleteNote&&z.confirmDeleteNote(...e))},[(0,s.Lk)("span",V,[(0,s.bF)(ee,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Delete")),1)])],64))])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)]),_:1},8,["modelValue"]),(0,s.bF)(te,{modelValue:j.showFormModal,"onUpdate:modelValue":t[12]||(t[12]=e=>j.showFormModal=e),"has-modal-card":"","trap-focus":"","destroy-on-hide":!0,"aria-role":"dialog","aria-modal":""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",R,[(0,s.Lk)("header",O,[(0,s.Lk)("span",{class:"note-modal-icon",style:(0,a.Tr)({"--dot-color":z.typeColor("form")})},[(0,s.bF)(J,{icon:z.typeIcon("form"),size:"is-small"},null,8,["icon"])],4),(0,s.Lk)("p",Q,(0,a.v_)(j.selectedFormName||e.$t("Form")),1),(0,s.Lk)("button",{type:"button",class:"delete note-modal-close",onClick:t[11]||(t[11]=e=>j.showFormModal=!1)})]),(0,s.Lk)("section",B,[j.formLoading?((0,s.uX)(),(0,s.CE)("div",G,[(0,s.bF)(J,{icon:"spinner","custom-class":"fa-spin"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Loading"))+"⦠",1)])):j.selectedFormSubmission?((0,s.uX)(),(0,s.Wv)(ie,{key:1,answers:j.selectedFormSubmission.answers},null,8,["answers"])):(0,s.Q3)("",!0)])])]),_:1},8,["modelValue"])])}i(44114),i(18111),i(7588);var j=i(40834);const z={class:"timeline-filters"},q=["data-test","onClick"];function J(e,t,i,n,o,l){const r=(0,s.g2)("ListFilterPill"),d=(0,s.g2)("ListFilterPillText");return(0,s.uX)(),(0,s.CE)("div",z,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(l.typeOptions,t=>((0,s.uX)(),(0,s.CE)("button",{key:t.key,"data-test":"type-chip-"+t.key,type:"button",class:(0,a.C4)(["timeline-chip",{"is-active":o.local.types.includes(t.key)}]),onClick:e=>l.toggleType(t.key)},(0,a.v_)(e.$t(t.label)),11,q))),128)),(0,s.bF)(r,{ref:"datePill",label:e.$t("Date"),options:l.dateOptions,"model-value":o.datePreset,"filter-title":e.$t("Date"),"data-test":"date-pill",onOpen:t[0]||(t[0]=e=>l.closeOtherPills("date")),"onUpdate:modelValue":l.onDatePreset},null,8,["label","options","model-value","filter-title","onUpdate:modelValue"]),(0,s.bF)(r,{ref:"authorPill",label:e.$t("Author"),options:l.actorOptions,"model-value":o.local.actor,searchable:"","filter-title":e.$t("Author"),"data-test":"actor-pill",onOpen:t[1]||(t[1]=e=>l.closeOtherPills("author")),"onUpdate:modelValue":l.setActor},null,8,["label","options","model-value","filter-title","onUpdate:modelValue"]),(0,s.bF)(d,{ref:"searchPill",label:e.$t("Search"),"model-value":o.local.q||null,placeholder:e.$t("Search activity"),"filter-title":e.$t("Search activity"),"data-test":"search-pill",onOpen:t[2]||(t[2]=e=>l.closeOtherPills("search")),"onUpdate:modelValue":l.onSearch},null,8,["label","model-value","placeholder","filter-title","onUpdate:modelValue"])])}i(22489),i(61701);var H=i(38221),K=i.n(H),Y=i(43432),Z=i(15770);const ee=[{key:"donation",label:"Donations"},{key:"note",label:"Notes"},{key:"tag",label:"Tags"},{key:"form",label:"Forms"},{key:"resignation",label:"Resignations"},{key:"email",label:"Emails"}],te={types:[],from:null,to:null,actor:null,q:""};function ie(e){if(!e)return null;const t=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),s=String(e.getDate()).padStart(2,"0");return`${t}-${i}-${s}`}var se={name:"TimelineFilters",components:{ListFilterPill:Y.A,ListFilterPillText:Z.A},props:{actors:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>({...te})}},emits:["update:modelValue"],data(){return{local:{...te,...this.modelValue}
1,datePreset:this.modelValue.from||this.modelValue.to?"custom":null}},computed:{typeOptions(){return ee},dateOptions(){return[{value:"last7",label:this.$t("Last 7 days")},{value:"last30",label:this.$t("Last 30 days")},{value:"year",label:this.$t("This year")}]},actorOptions(){return this.actors.map(e=>({value:e.id,label:e.name}))}},watch:{modelValue:{deep:!0,handler(e){this.local={...te,...e},e.from||e.to||(this.datePreset=null)}}},created(){this.debouncedEmitSearch=K()(e=>{this.local={...this.local,q:e},this.emitChange()},300)},beforeUnmount(){this.debouncedEmitSearch.cancel()},methods:{emitChange(){this.$emit("update:modelValue",{...this.local})},toggleType(e){const t=this.local.types.includes(e)?this.local.types.filter(t=>t!==e):[...this.local.types,e];this.local={...this.local,types:t},this.emitChange()},onDatePreset(e){this.datePreset=e;const t=new Date;let i=null,s=null;if("last7"===e){s=ie(t);const e=new Date(t);e.setDate(e.getDate()-6),i=ie(e)}else if("last30"===e){s=ie(t);const e=new Date(t);e.setDate(e.getDate()-29),i=ie(e)}else"year"===e&&(s=ie(t),i=`${t.getFullYear()}-01-01`);this.local={...this.local,from:i,to:s},this.emitChange()},setActor(e){this.local={...this.local,actor:e},this.emitChange()},onSearch(e){this.debouncedEmitSearch(e||"")},closeOtherPills(e){const t={date:this.$refs.datePill,author:this.$refs.authorPill,search:this.$refs.searchPill};Object.keys(t).forEach(i=>{i!==e&&t[i]?.close?.()})}}},ae=i(66262);const ne=(0,ae.A)(se,[["render",J],["__scopeId","data-v-7d425b2b"]]);var oe=ne,le=i(31823),re=i(63898);const de={tag:{icon:"tag",color:"var(--violet-500)"},donation:{icon:"hand-holding-heart",color:"var(--emerald-500)"},form:{icon:"file-lines",color:"var(--sky-500)"},note:{icon:"note-sticky",color:"var(--amber-500)"},resignation:{icon:"door-open",color:"var(--rose-500)"},profile_edit:{icon:"pen",color:"var(--slate-500)"},email:{icon:"paper-plane",color:"var(--indigo-500)"}},ce=40;var ue={name:"ProfileTimeline",components:{TimelineFilters:oe,LogoThumbnail:le.A,FormSubmissionAnswers:re.A},props:{entityType:{type:String,required:!0,validator:e=>["user","contact"].includes(e)},entityId:{type:[Number,String],required:!0}},data(){return{events:[],isLoading:!1,hasMore:!1,selectedNote:null,showNoteModal:!1,showFormModal:!1,selectedFormSubmission:null,selectedFormName:"",formLoading:!1,filters:{types:[],from:null,to:null,actor:null,q:""},actors:[],filtersKey:0,isEditingNote:!1,editText:"",editAction:null,isSavingNote:!1}},computed:{...(0,j.L8)(["user","isGranted"]),canManageSelectedNote(){return!!this.selectedNote?.meta?.noteUuid&&(this.selectedNote.actorId===this.user.id||this.isGranted("ADMIN_TENANT"))},noteCollection(){return"contact"===this.entityType?"/contact_notes":"/user_notes"},filtersActive(){return this.filters.types.length>0||!!this.filters.from||!!this.filters.to||!!this.filters.actor||!!this.filters.q},grouped(){const e=[];let t=null;return this.events.forEach(i=>{const s=this.$filters.format(i.timestamp,"date");t&&t.day===s||(t={day:s,items:[]},e.push(t)),t.items.push(i)}),e}},created(){this.fetchActors(),this.fetch()},methods:{fetchActors(){this.$http.plain.get("/timeline-actors?"+this.entityType+"="+this.entityId).then(e=>{this.actors=e.data["hydra:member"]}).catch(e=>{console.log(e)})},typeIcon(e){return(de[e]||de.profile_edit).icon},typeColor(e){return(de[e]||de.profile_edit).color},label(e){const t=e.type+"."+e.action;switch(t){case"tag.added":return this.$t('Tag "{name}" added',{name:e.meta.tagName});case"tag.removed":return this.$t('Tag "{name}" removed',{name:e.meta.tagName});case"donation.made":return this.$t("Donated {amount}",{amount:this.$filters.money(e.meta.amount,e.meta.currency)});case"form.completed":return this.$t('Completed form "{name}"',{name:e.meta.formName});case"note.added":return e.meta.action?this.noteActionLabel(e.meta.action):this.$t("Note added");case"note.modified":return e.meta.action?this.noteActionLabel(e.meta.action):this.$t("Note modified");case"note.removed":return this.$t("Note removed");case"resignation.requested":return this.$t("Resignation request submitted");case"resignation.approved":return e.actorName?this.$t("Resignation request approved by {name}",{name:e.actorName}):this.$t("Resignation request approved");case"resignation.rejected":return e.actorName?this.$t("Resignation request rejected by {name}",{name:e.actorName}):this.$t("Resignation request rejected");case"resignation.withdrawn":return this.$t("Resignation request withdrawn");case"email.sent":return e.meta.subject?this.$t('Email "{subject}" sent',{subject:e.meta.subject}):this.$t("Email sent");case"profile_edit.edited":return this.$t("Profile edited");case"personal_id.changed":return"donation"===e.meta?.source?this.$t("Personal ID number changed during donation"):this.$t("Personal ID number changed on profile");default:return this.$t("Activity")}},fetch(e=null){this.isLoading=!0;
1let t="/timeline?"+this.entityType+"="+this.entityId;this.filters.types.forEach(e=>{t+="&types[]="+encodeURIComponent(e)}),this.filters.from&&(t+="&from="+encodeURIComponent(this.filters.from)),this.filters.to&&(t+="&to="+encodeURIComponent(this.filters.to)),this.filters.actor&&(t+="&actor="+encodeURIComponent(this.filters.actor)),this.filters.q&&(t+="&q="+encodeURIComponent(this.filters.q)),e&&(t+="&before="+encodeURIComponent(e)),t+="&limit="+ce,this.$http.plain.get(t).then(t=>{const i=t.data["hydra:member"];this.events=e?this.events.concat(i):i,this.hasMore=i.length===ce}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1})},loadMore(){const e=this.events[this.events.length-1];e&&this.fetch(e.timestamp)},onFiltersChange(){this.events=[],this.hasMore=!1,this.fetch()},clearFilters(){this.filters={types:[],from:null,to:null,actor:null,q:""},this.filtersKey++,this.onFiltersChange()},noteActionLabel(e){return"called"===e?this.$t("Called"):this.$t("Emailed")},actionIcon(e){return"called"===e?"phone":"envelope"},isNoteClickable(e){return"note"===e.type&&e.meta&&!!e.meta.text},isFormClickable(e){return"form"===e.type&&e.meta&&!!e.meta.submissionId},isClickable(e){return this.isNoteClickable(e)||this.isFormClickable(e)},openEvent(e){this.isNoteClickable(e)?this.openNote(e):this.isFormClickable(e)&&this.openForm(e)},openNote(e){this.selectedNote=e,this.isEditingNote=!1,this.showNoteModal=!0},reload(){this.fetch()},startEditNote(){this.editText=this.selectedNote.meta.text??"",this.editAction=this.selectedNote.meta.action??null,this.isEditingNote=!0},cancelEditNote(){this.isEditingNote=!1,this.editText="",this.editAction=null},saveNote(){const e=this.editText.trim();e&&(this.isSavingNote=!0,this.$http.plain.patch(this.noteCollection+"/"+this.selectedNote.meta.noteUuid,{text:e,action:this.editAction}).then(()=>{this.showNoteModal=!1,this.isEditingNote=!1,this.$buefy.toast.open({type:"is-success",message:this.$t("Note updated"),duration:2e3}),this.fetch()}).catch(e=>{console.log(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Failed to update note"),duration:3e3})}).finally(()=>{this.isSavingNote=!1}))},confirmDeleteNote(){this.$buefy.dialog.confirm({title:this.$t("Delete note"),message:this.$t("Are you sure you want to delete this note?"),confirmText:this.$t("Delete"),cancelText:this.$t("Cancel"),type:"is-danger",hasIcon:!0,onConfirm:()=>this.deleteNote()})},deleteNote(){this.$http.plain.delete(this.noteCollection+"/"+this.selectedNote.meta.noteUuid).then(()=>{this.showNoteModal=!1,this.$buefy.toast.open({type:"is-success",message:this.$t("Note deleted"),duration:2e3}),this.fetch()}).catch(e=>{console.log(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("Failed to delete note"),duration:3e3})})},openForm(e){this.selectedFormName=e.meta.formName,this.selectedFormSubmission=null,this.formLoading=!0,this.showFormModal=!0,this.$http.plain.get("/form_submissions/"+e.meta.submissionId+"/timeline-details").then(e=>{this.selectedFormSubmission=e.data}).catch(e=>{console.log(e)}).finally(()=>{this.formLoading=!1})}}};const me=(0,ae.A)(ue,[["render",W],["__scopeId","data-v-f9ff20ce"]]);var pe=me},60253:function(e,t,i){"use strict";i.d(t,{E4:function(){return n},GT:function(){return y},Lf:function(){return F},Ug:function(){return P},ZQ:function(){return h},c6:function(){return o},fY:function(){return E},gI:function(){return d},gu:function(){return w},mJ:function(){return l},n_:function(){return A},q$:function(){return r},qC:function(){return $},r:function(){return L},s$:function(){return I},vZ:function(){return _}});i(18111),i(81148),i(7588);var s=i(32148);const a="tenant",n="tenant-light",o="tenant-dark",l=[a,n,o];function r(e){return l.includes(e)}function d(e,t){return e===n?"light":e===o?"dark":"light"===t?.defaultTone?"light":"dark"}const c="#ffffff",u=4.5,m=45,p=14,h=[{key:"primary",band:null},{key:"menuLight",band:[88,100]},{key:"menuDark",band:[8,24]},{key:"eventCover",band:[8,30]}],g=h.map(e=>e.key),f=h.reduce((e,t)=>(e[t.key]=t,e),{}),b={eventCover:"menuDark"},y={name:"",primary:"#012bf7",menuLight:"#f5f7f9",menuDark:"#1f2633",eventCover:null,defaultTone:"dark"};function v(e,t){const{h:i,s:a,l:n}=(0,s.o5)(e),[o,l]=t;return(0,s.Sf)(i,a,n<o?o:l)}function k(e,t){for(let i=100;i>=0;i-=.5)if((0,s.yN)((0,s.Sf)(e,t,i),c)>=u)return i;return 0}function C(e){const{h:t,s:i}=(0,s.o5)(e);return(0,s.Sf)(t,i,k(t,i))}function L(e,t){const i=(0,s.Tv)(t),a=f[e];if(!i||!a)return{valid:!1,ok:!1,hex:null,hue:0,saturation:0,lightness:0,contrast:null,band:a?.band??null,readableUpTo:null,suggestion:null};const{h:n,s:o,l:l}=(0,s.o5)(i),r={valid:!0,hex:i,hue:n,saturation:o,lightness:l,band:a.band};if(!a.band){const e=(0,s.yN)(i,c),t=e>=u;return{...r,ok:t,contrast:e,readableUpTo:k(n,o),suggestion:t?null:C(i)}}const[d,m]=a.band,p=l>=d&&l<=m;return{...r,ok:p,contrast:null,readableUpTo:null,suggestion:p?null:v(i,a.band)}}function w(e,t){const i=(0,s.Tv)(e?.[t]);if(i)return i;const a=b[t];return a?(0,s.Tv)(e?.[a]):null}function _(e){return!!e&&g.every(t=>{const i=w(e,t);return Boolean(i)&&L(t,i).ok})}function E(e){return e&&"object"===typeof e?{name:"string"===typeof e.name?e.name.trim().slice(0,60):"",primary:(0,s.Tv)(e.primary),menuLight:(0,s.Tv)(e.menuLight),menuDark:(0,s.Tv)(e.menuDark),eventCover:(0,s.Tv)(e.eventCover),defaultTone:"light"===e.defaultTone?"light":"dark"}:null}function $(e){const t=E(e?.settingFeatures?.general?.brandPalette);return t&&_(t)?t:null}function F(e,{tone:t="dark",darkMode:i=!1}={}){const a={},n=w(e,"primary");if(n){const{h:e,s:t,l:o}=(0,s.o5)(n),l=Math.round(i?Math.max(o,m):o);a["--bulma-primary-h"]=String(Math.round(e)),a["--bulma-primary-s"]=Math.round(t)+"%",a["--bulma-primary-l"]=l+"%";const r=i?(0,s.Sf)(e,t,l):n;a["--bulma-primary"]=r,a["--bulma-primary-invert"]="#ffffff",a["--bulma-primary-light"]=(0,s.Sf)(e,t,90),a["--bulma-primary-dark"]=(0,s.Sf)(e,t,20),a["--bulma-primary-soft"]=(0,s.Sf)(e,t,90),a["--bulma-primary-bold"]=(0,s.Sf)(e,t,20),a["--bulma-primary-on-scheme"]=(0,s.Sf)(e,t,30),a["--orgo-color-primary"]=r,a["--orgo-brand-primary-h"]=String(Math.round(e)),a["--orgo-brand-primary-s"]=Math.round(t)+"%",a["--orgo-brand-primary-l"]=Math.round(o)+"%",a["--orgo-brand-primary-surface"]=n}const o=w(e,"light"===t?"menuLight":"menuDark");if(!o)return a;const{h:l,s:r}=(0,s.o5)(o);a["--orgo-mono-hue"]=String(Math.round(l));const d=Math.min(r,p)/p,c=e=>e*d;if(a["--orgo-mono-sat-scale"]=String(Math.round(1e3*d)/1e3),i)return a;const u=w(e,"eventCover");if(u){const{h:e,s:t,l:i}=(0,s.o5)(u);a["--orgo-card-bg-dark"]=u,a["--orgo-card-bg-dark-ink"]=(0,s.Sf)(e,t,Math.min(i,20))}return a["--orgo-header-bg"]=o,a["--orgo-workspaces-bg"]=o,a["--bulma-background"]=(0,s.Sf)(l,c(14),96.5),a["--orgo-app-bg"]=(0,s.Sf)(l,c(14),96.5),a["--orgo-card-bg"]=(0,s.Sf)(l,c(22),99),a["--orgo-card-border"]=(0,s.Sf)(l,c(14),91),a["--orgo-hr"]=(0,s.Sf)(l,c(14),91),a["--bulma-text"]=(0,s.Sf)(l,c(40),15),a["--bulma-text-strong"]=(0,s.Sf)(l,c(45),12),a["--bulma-text-weak"]=(0,s.Sf)(l,c(15),48),"light"===t?(a["--orgo-sidebar-border"]=(0,s.MI)(o,-6),a):(a["--orgo-sidebar-border"]=(0,s.MI)(o,10),a["--orgo-color-sidebar-titles"]=(0,s.Sf)(l,c(8),92),a["--orgo-color-sidebar-icons"]=(0,s.Sf)(l,c(8),72),a["--orgo-nav-icon"]=(0,s.Sf)(l,c(8),72),a["--orgo-color-slategrey"]=(0,s.Sf)(l,c(8),72),a["--orgo-color-slategrey-light"]=(0,s.Sf)(l,c(8),60),a["--orgo-input-placeholder"]="hsla("+Math.round(l)+", "+Math.round(10*c(6))/10+"%, 75%, 0.7)",a)}const T=["--bulma-primary-h","--bulma-primary-s","--bulma-primary-l","--bulma-primary","--bulma-primary-invert","--bulma-primary-light","--bulma-primary-dark","--bulma-primary-soft","--bulma-primary-bold","--bulma-primary-on-scheme","--orgo-color-primary","--orgo-brand-primary-h","--orgo-brand-primary-s","--orgo-brand-primary-l","--orgo-brand-primary-surface","--bulma-background","--orgo-app-bg","--orgo-card-bg","--orgo-card-border","--orgo-hr","--bulma-text","--bulma-text-strong","--bulma-text-weak","--orgo-card-bg-dark","--orgo-card-bg-dark-ink","--orgo-mono-hue","--orgo-mono-sat-scale","--orgo-header-bg","--orgo-workspaces-bg","--orgo-sidebar-border","--orgo-color-sidebar-titles","--orgo-color-sidebar-icons","--orgo-nav-icon","--orgo-color-slategrey","--orgo-color-slategrey-light","--orgo-input-placeholder"];function S(){return"undefined"!==typeof document&&"dark"===document.documentElement.getAttribute("data-theme")}function A(e,t){if("undefined"===typeof document||!_(e))return!1;const i=t||e.defaultTone||"dark",s=document.documentElement;P();const a=F(e,{tone:i,darkMode:S()});
1return Object.keys(a).forEach(e=>s.style.setProperty(e,a[e])),s.setAttribute("data-chrome","dark"===i?o:n),"dark"===i?s.setAttribute("data-chrome-tone","dark"):s.removeAttribute("data-chrome-tone"),!0}function P(){if("undefined"===typeof document)return;const e=document.documentElement;T.forEach(t=>e.style.removeProperty(t)),r(e.getAttribute("data-chrome"))&&e.removeAttribute("data-chrome")}function I(e,t){const i=t||e?.defaultTone||"dark",a=w(e,"light"===i?"menuLight":"menuDark");if(!a)return{sidebar:"transparent",content:"transparent"};const{h:n}=(0,s.o5)(a);return{sidebar:a,content:(0,s.Sf)(n,14,96.5)}}},60259:function(e,t,i){"use strict";i.d(t,{Ct:function(){return o},Jk:function(){return l},UL:function(){return a},hz:function(){return n}});const s=["LocalCenterUpdate","LocalCenterSettingsFees","LocalCenterSettingsPayments","LocalCenterWaitlistSettings","FeeMembersLocalCenter"];function a(e){return!(!e||!e.name)&&("ProductList"===e.name?"local"===(e.params?.type||null):s.includes(e.name))}function n(e){if(!e)return null;if("LocalCenterUpdate"===e.name&&e.params?.item)return String(e.params.item);const t=e.query?.localCenter;return t?String(t):null}function o(e,t,i){const s=n(e);return s&&t("ADMIN_TENANT")?s:i?.localCenter?.id?String(i.localCenter.id):null}function l(e,t){return t?"LocalCenterUpdate"===e.name?{...e,params:{...e.params||{},item:t}}:{...e,query:{...e.query||{},localCenter:t}}:e}},60534:function(e,t,i){"use strict";i.d(t,{A:function(){return y}});var s=i(20641),a=i(90033);const n={key:0,class:"profile-cf-tags"},o={key:0,class:"profile-cf-tags-list"},l={class:"icon is-small"},r={key:2,class:"has-text-grey is-size-7 mt-1"},d={key:1,class:"mt-1"},c={class:"has-text-grey has-text-centered py-1 is-size-7"},u={class:"buttons mt-1"};function m(e,t,i,m,p,h){const g=(0,s.g2)("font-awesome-icon"),f=(0,s.g2)("b-taginput"),b=(0,s.g2)("b-field"),y=(0,s.g2)("b-button");return i.field?((0,s.uX)(),(0,s.CE)("div",n,[p.editing?((0,s.uX)(),(0,s.CE)("div",d,[(0,s.bF)(b,{class:"mb-1"},{default:(0,s.k6)(()=>[(0,s.bF)(f,{ref:"input",modelValue:p.draftSelected,"onUpdate:modelValue":t[1]||(t[1]=e=>p.draftSelected=e),data:h.filteredOptions,field:"label",autocomplete:"","open-on-focus":!0,"allow-new":!1,size:"is-small","close-type":"is-white",placeholder:h.addLabelText+"...",onTyping:h.onType},{empty:(0,s.k6)(()=>[(0,s.Lk)("div",c,(0,a.v_)(e.$t("No options found")),1)]),_:1},8,["modelValue","data","placeholder","onTyping"])]),_:1}),(0,s.Lk)("div",u,[(0,s.bF)(y,{type:"is-primary is-rounded is-small",loading:p.isSaving,onClick:h.save},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Save")),1)]),_:1},8,["loading","onClick"]),(0,s.bF)(y,{class:"is-rounded is-small",disabled:p.isSaving,onClick:h.cancelEdit},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])])):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[h.selectedOptions.length?((0,s.uX)(),(0,s.CE)("div",o,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(h.selectedOptions,e=>((0,s.uX)(),(0,s.CE)("span",{key:e.key,class:"tag is-rounded is-small mr-1 mb-1"},(0,a.v_)(e.label),1))),128))])):(0,s.Q3)("",!0),h.canEdit?((0,s.uX)(),(0,s.CE)("a",{key:1,class:(0,a.C4)(["icon-text has-text-primary is-size-7",{"mt-1":h.selectedOptions.length}]),onClick:t[0]||(t[0]=(...e)=>h.startEdit&&h.startEdit(...e))},[(0,s.Lk)("span",l,[(0,s.bF)(g,{icon:"fa-light fa-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(h.selectedOptions.length?e.$t("Edit"):h.addLabelText),1)],2)):h.selectedOptions.length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",r," - "))],64))])):(0,s.Q3)("",!0)}i(44114),i(18111),i(22489),i(20116),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var p=i(40834),h=i(61273),g={name:"ProfileCustomFieldTags",components:{FontAwesomeIcon:h.gc},props:{item:{type:Object,required:!0},field:{type:Object,required:!0},addLabel:{type:String,default:null}},data(){return{editing:!1,isSaving:!1,selectedKeys:[],draftSelected:[],searchText:""}},computed:{...(0,p.L8)(["user","isGranted"]),addLabelText(){return this.addLabel||this.$t("Add")},optionsList(){const e=this.field.fieldOptions?.options||this.field.fieldOptions||{};return Object.entries(e).map(([e,t])=>({key:String(e),label:String(t)}))},selectedOptions(){return this.selectedKeys.map(e=>this.optionsList.find(t=>t.key===String(e))||{key:String(e),label:String(e)})},filteredOptions(){const e=new Set(this.draftSelected.map(e=>e.key)),t=this.searchText.toLowerCase();return this.optionsList.filter(i=>!e.has(i.key)&&(!t||i.label.toLowerCase().includes(t)))},canEdit(){return this.item.id===this.user.id||this.isGranted("HR_LOCAL",this.item.localCenter)}},created(){this.loadCurrent()},methods:{loadCurrent(){this.selectedKeys=this.parseValue(this.findValueRow())},findValueRow(){const e=this.item.customFieldValues;return Array.isArray(e)&&e.find(e=>(e.field?.["@id"]||e.field)===this.field["@id"])||null},parseValue(e){if(!e||!e.value)return[];let t=e.value;if("string"===typeof t)try{t=JSON.parse(t)}catch(i){return console.error("Failed to parse custom field value",i),[]}return Array.isArray(t)?t.map(String):[]},startEdit(){this.draftSelected=this.selectedOptions.map(e=>({...e})),this.searchText="",this.editing=!0,this.$nextTick(()=>{this.$refs.input&&"function"===typeof this.$refs.input.focus&&this.$refs.input.focus()})},cancelEdit(){this.editing=!1,this.searchText="",this.draftSelected=[]},onType(e){this.searchText=e||""},save(){const e=this.draftSelected.map(e=>e.key);this.isSaving=!0,this.$http.plain.post("/custom_field_values",{user:this.item["@id"],field:this.field["@id"],value:JSON.stringify(e)}).then(t=>{this.applyValue(t.data,e),this.editing=!1,this.searchText="",this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})}).catch(e=>
1{console.error(e),this.$buefy.toast.open({type:"is-danger",message:this.$t("An error occurred")})}).finally(()=>{this.isSaving=!1})},applyValue(e,t){Array.isArray(this.item.customFieldValues)||(this.item.customFieldValues=[]);const i={...e};"string"===typeof i.field&&(i.field={"@id":i.field});const s=this.item.customFieldValues.findIndex(e=>(e.field?.["@id"]||e.field)===this.field["@id"]);-1!==s?this.item.customFieldValues.splice(s,1,i):this.item.customFieldValues.push(i),this.selectedKeys=t.map(String)}}},f=i(66262);const b=(0,f.A)(g,[["render",m],["__scopeId","data-v-494dee39"]]);var y=b},60560:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(90033);const n={class:"bio-container"},o=["textContent"],l={class:"is-small"};function r(e,t,i,r,d,c){const u=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",{ref:"bioContent",class:(0,a.C4)(["bio-content",{"is-expanded":d.isExpanded,"is-collapsed":!d.isExpanded&&d.shouldTruncate}])},[(0,s.Lk)("p",{ref:"bioText",class:"bio-text",textContent:(0,a.v_)(i.bio)},null,8,o)],2),d.shouldTruncate?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"bio-toggle-btn is-size-7 has-text-weight-semibold",onClick:t[0]||(t[0]=(...e)=>c.toggleExpand&&c.toggleExpand(...e))},[(0,s.Lk)("span",null,(0,a.v_)(d.isExpanded?e.$t("See less"):e.$t("See more")),1),(0,s.Lk)("span",l,[(0,s.bF)(u,{icon:"fa-light fa-chevron-down",class:(0,a.C4)(["chevron-icon",{"is-rotated":d.isExpanded}])},null,8,["class"])])])):(0,s.Q3)("",!0)])}const d=4.5,c=2;var u={props:{bio:{type:String,required:!0}},data(){return{isExpanded:!1,shouldTruncate:!1}},watch:{bio(){this.$nextTick(this.checkTruncation)}},mounted(){this.checkTruncation(),window.addEventListener("resize",this.checkTruncation)},beforeUnmount(){window.removeEventListener("resize",this.checkTruncation)},methods:{checkTruncation(){const e=this.$refs.bioContent;if(!e||!this.bio)return void(this.shouldTruncate=!1);const t=parseFloat(getComputedStyle(e).fontSize),i=t*d;this.shouldTruncate=e.scrollHeight>i+c},toggleExpand(){this.isExpanded=!this.isExpanded}}},m=i(66262);const p=(0,m.A)(u,[["render",r],["__scopeId","data-v-31854c09"]]);var h=p},60770:function(e,t,i){"use strict";i.d(t,{A:function(){return S}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"modal-card discuss_reactions_modal"},l={class:"modal-card-body"},r={class:"tabs-pill mt-1 mb-4"},d={class:"tabs"},c={class:"tab-count"},u=["onClick"],m={class:"icon is-small"},p={class:"tab-count"},h={key:0,class:"reaction-list nice-scrollbar"},g={key:0,class:"has-text-centered has-text-grey py-5"},f={key:1},b={class:"reaction-user-left"},y={class:"icon is-small"},v={key:0,class:"has-text-centered has-text-grey py-5"},k={class:"reaction-user-left"},C={class:"icon is-small"};function L(e,t,i,L,w,_){const E=(0,s.g2)("font-awesome-icon"),$=(0,s.g2)("LogoThumbnail"),F=(0,s.g2)("router-link"),T=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.Wv)(T,{modelValue:w.localIsActive,"onUpdate:modelValue":t[2]||(t[2]=e=>w.localIsActive=e),"has-modal-card":"","full-screen":e.$isMobile(),onClose:_.close},{default:(0,s.k6)(()=>[(0,s.Lk)("div",o,[t[3]||(t[3]=(0,s.Lk)("header",{class:"modal-card-head is-hidden"},null,-1)),(0,s.Lk)("section",l,[(0,s.Lk)("button",{class:"delete","aria-label":"close",onClick:t[0]||(t[0]=(...e)=>_.close&&_.close(...e))}),(0,s.Lk)("div",r,[(0,s.Lk)("nav",d,[(0,s.Lk)("ul",null,[(0,s.Lk)("li",{class:(0,a.C4)({"is-active":"all"===w.activeTab}),onClick:t[1]||(t[1]=e=>_.setActiveTab("all"))},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Reactions")),1),(0,s.Lk)("span",c,(0,a.v_)(_.totalReactionsCount),1)])],2),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(_.reactionsObject,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t},[i.reactionData[e.id]?.length>0?((0,s.uX)(),(0,s.CE)("li",{key:0,class:(0,a.C4)({"is-active":w.activeTab===e.id}),onClick:t=>_.setActiveTab(e.id)},[(0,s.Lk)("a",null,[(0,s.Lk)("span",{class:(0,a.C4)(["reactionButton",`reaction-${e.id}`])},[(0,s.Lk)("span",m,[(0,s.bF)(E,{icon:e.icon},null,8,["icon"])])],2),(0,s.Lk)("span",p,(0,a.v_)(i.reactionData[e.id]?.length??0),1)])],10,u)):(0,s.Q3)("",!0)],64))),128))])])]),"all"===w.activeTab?((0,s.uX)(),(0,s.CE)("div",h,[0===_.totalReactionsCount?((0,s.uX)(),(0,s.CE)("p",g,(0,a.v_)(e.$t("No reactions yet")),1)):((0,s.uX)(),(0,s.CE)("ul",f,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(_.allReactions,(e,t)=>((0,s.uX)(),(0,s.CE)("li",{key:t,class:"reaction-user-row"},[(0,s.Lk)("div",b,[i.reactions[e.reactionId]?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["reactionButton",`reaction-${e.reactionId}`])},[(0,s.Lk)("span",y,[(0,s.bF)(E,{icon:i.reactions[e.reactionId].icon},null,8,["icon"])])],2)):(0,s.Q3)("",!0),(0,s.bF)($,{key:"profile_picture_header",item:e,"is-type":"roundSmaller"},null,8,["item"]),(0,s.bF)(F,{to:{name:"UserShow",params:{item:e.id}},class:"reaction-user-name",onClick:_.close},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.fullName),1)]),_:2},1032,["to","onClick"])])]))),128))]))])):((0,s.uX)(!0),(0,s.CE)(s.FK,{key:1},(0,s.pI)(_.reactionsObject,(t,o)=>(0,s.bo)(((0,s.uX)(),(0,s.CE)("div",{key:o,class:"reaction-list nice-scrollbar"},[i.reactionData[t.id]&&i.reactionData[t.id].length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",v,(0,a.v_)(e.$t("No reactions yet")),1)),(0,s.Lk)("ul",null,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.reactionData[t.id],e=>((0,s.uX)(),(0,s.CE)("li",{key:e.id,class:"reaction-user-row"},[(0,s.Lk)("div",k,[(0,s.Lk)("span",{class:(0,a.C4)(["reactionButton",`reaction-${t.id}`])},[(0,s.Lk)("span",C,[(0,s.bF)(E,{icon:t.icon},null,8,["icon"])])],2),(0,s.bF)($,{key:"profile_picture_header",item:e,"is-type":"roundSmaller"},null,8,["item"]),(0,s.bF)(F,{to:{name:"UserShow",params:{item:e.id}},class:"reaction-user-name",onClick:_.close},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.fullName),1)]),_:2},1032,["to","onClick"])])]))),128))])])),[[n.aG,w.activeTab===t.id]])),128))])])]),_:1},8,["modelValue","full-screen","onClose"])}i(18111),i(61701);var w=i(31823),_=i(40834),E=i(28994),$={components:{LogoThumbnail:w.A},mixins:[E.A],props:{isActive:{type:Boolean,default:!1},reactions:{type:Object,required:!0},reactionData:{type:Object,required:!0}},data(){return{activeTab:"all",localIsActive:!1}},computed:{...(0,_.L8)(["tenant","user"]),reactionsObject(){return Object.values(this.reactions)},allReactions(){let e=[];for(let t in this.reactionData){let i=this.reactionData[t].map(e=>({...e,reactionId:t}));e=e.concat(i)}return e},totalReactionsCount(){return this.allReactions.length}},watch:{isActive:{immediate:!0,handler(e){this.localIsActive=e,e&&(this.activeTab="all")}},localIsActive(e){this.$emit("update:isActive",e)}},methods:{close(){this.localIsActive=!1},setActiveTab(e){this.activeTab=e}}},F=i(66262);const T=(0,F.A)($,[["render",L],["__scopeId","data-v-6d6f7af0"]]);var S=T},61486:function(e,t,i){"use strict";i.d(t,{_h:function(){return l},zk:function(){return o}});const s=".orgo.cloud",a=["-local","-staging","-dev"];function n(e){const t=a.find(t=>e.endsWith(t));return t&&e.length!==t.length?e.slice(0,-t.length):e}function o(e){const t=String(e||"").toLowerCase();if(!t.endsWith(s))return null;const i=n(t.slice(0,-s.length));return""===i||i.includes(".")?null:i}function l(e,t){const i=String(t||"/"),s=String(e||"").trim().toLowerCase().replace(/^https?:\/\//,"").replace(/\/+$/,"");return s&&s.includes(".")?`https://${s}${i}`:i}},63520:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033);const n={key:0,class:"o-textarea-icons"},o={key:0,class:"media"},l={key:1};function r(e,t,i,r,d,c){const u=(0,s.g2)("b-input"),m=(0,s.g2)("font-awesome-icon"),p=(0,s.g2)("EmojiPicker"),h=(0,s.g2)("MentionDropdown"),g=(0,s.g2)("OpenGraphLinkPreview");return(0,s.uX)(),(0,s.CE)("section",{class:(0,a.C4)(["from-post-input",{"pl-2":e.$isMobile()}])},[(0,s.Lk)("div",{id:"commentInput",class:(0,a.C4)(["o-comment-area is-relative",{"pt-0 pl-3 pr-3":i.isComment&&!e.$isMobile(),"is-comment-input"
1:i.isComment}])},[(0,s.bF)(u,{ref:"newComment",modelValue:i.newComment.content,"onUpdate:modelValue":t[0]||(t[0]=e=>i.newComment.content=e),rows:d.contentRows,type:"textarea",placeholder:i.placeholder,onKeydown:c.handleKeydown,onKeyup:c.processText,onFocus:t[1]||(t[1]=t=>{c.mercureTyping("typing"),e.$emit("focus")}),onBlur:c.handleBlur},null,8,["modelValue","rows","placeholder","onKeydown","onKeyup","onBlur"]),e.$isMobile()||i.hideEmoji?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",n,[i.showMediaIcons?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"icon is-clickable o-media-icon",onClick:t[2]||(t[2]=t=>e.$emit("upload-image"))},[(0,s.bF)(m,{icon:"fa-light fa-image"})])):(0,s.Q3)("",!0),i.showMediaIcons?((0,s.uX)(),(0,s.CE)("span",{key:1,class:"icon is-clickable o-media-icon",onClick:t[3]||(t[3]=t=>e.$emit("upload-video"))},[(0,s.bF)(m,{icon:"fa-light fa-video"})])):(0,s.Q3)("",!0),i.showMediaIcons?((0,s.uX)(),(0,s.CE)("span",{key:2,class:"icon is-clickable o-media-icon",onClick:t[4]||(t[4]=t=>e.$emit("upload-file"))},[(0,s.bF)(m,{icon:"fa-light fa-folder"})])):(0,s.Q3)("",!0),(0,s.Lk)("span",{class:"icon is-clickable o-emoji-icon",onClick:t[5]||(t[5]=e=>c.toggleEmojiPicker("right"))},[(0,s.bF)(m,{icon:"fal fa-smile"})])])),d.showEmojiPicker&&!e.$isMobile()?((0,s.uX)(),(0,s.CE)("div",{key:1,class:"emoji-picker-backdrop",onClick:t[6]||(t[6]=e=>d.showEmojiPicker=!1)})):(0,s.Q3)("",!0),d.showEmojiPicker&&!e.$isMobile()?((0,s.uX)(),(0,s.Wv)(p,{key:2,native:!0,class:(0,a.C4)(["emoji-picker",{"emoji-picker-left":"left"===d.emojiPickerSide,"emoji-picker-right":"right"===d.emojiPickerSide}]),theme:e.$store.state.theme,onSelect:c.addEmoji},null,8,["class","theme","onSelect"])):(0,s.Q3)("",!0)],2),(0,s.bF)(h,{show:e.showMentionDropdown,users:e.mentionResults,contacts:e.contactResults,"search-term":e.mentionSearchTerm,"is-loading":e.isLoadingMentions,"selected-index":e.selectedMentionIndex,"dropdown-style":d.dropdownStyle,onSelecting:t[7]||(t[7]=t=>e.isSelectingMention=!0),onPickUser:e.selectMention,onPickContact:e.selectContactMention},null,8,["show","users","contacts","search-term","is-loading","selected-index","dropdown-style","onPickUser","onPickContact"]),d.openGraphEmbed?((0,s.uX)(),(0,s.CE)("article",o,[(0,s.bF)(g,{embed:d.openGraphEmbed.openGraph,"is-comment":!1,"write-mode":!0,"reset-embed-link":c.resetEmbedLink},null,8,["embed","reset-embed-link"])])):(0,s.Q3)("",!0),d.isLoadingOpenGraph?((0,s.uX)(),(0,s.CE)("article",l,(0,a.v_)(e.$t("fetchingPreview"))+"...",1)):(0,s.Q3)("",!0)],2)}i(44114);var d=i(97850),c=i(53755),u=i(85619),m=i(28782),p=i(95256),h=i(38221),g=i.n(h),f=i(40834),b=i(51114),y={mixins:[u.Ay],props:["newComment","saved","isComment","discussion","project","rows","focusOnMount","isReply","placeholder","hideEmoji","showMediaIcons"],emits:["rows-changed","mentions-changed","contact-mentions-changed","focus","blur","upload-image","upload-video","upload-file","navigate-up"],data(){return{photos:[],contentRows:this.rows,postPhotos:[],postFiles:[],openGraphEmbed:null,openGraphEmbedLink:null,openGraphLinksChecked:[],isLoadingOpenGraph:!1,showEmojiPicker:!1,emojiPickerSide:"right",focusedInput:null,dropdownStyle:{}}},created(){this.dynamicContentRows()},mounted(){this.focusOnMount&&this.focusInput()},methods:{mediaSrc:p.F9,mentionText(){return this.newComment.content},setMentionText(e){this.newComment.content=e},mentionInputEl(){return this.$refs.newComment?.$el?.querySelector("textarea")||null},mentionContext(){return{project:this.project,discussion:this.discussion}},focusInput(){this.$refs.newComment.focus()},triggerMention(){const e=this.newComment.content||"";this.newComment.content=e+"@",this.$nextTick(()=>{this.focusInput(),this.$nextTick(()=>{this.detectMention(),this.positionDropdown()})})},toggleEmojiPicker(e){this.emojiPickerSide=e||"right",this.showEmojiPicker=!this.showEmojiPicker},addEmoji(e){let t=this.newComment.content?this.newComment.content:"";this.newComment.content=t+e.i},resetEmbedLink(){this.openGraphEmbed=null,this.openGraphEmbedLink=null,this.isLoadingOpenGraph=!1,this.newComment.openGraphEmbed=null},mercureTyping(e){this.showEmojiPicker=!1,!1!==m.uW&&!1!==this.tenant?.settingFeatures?.realtime?.isActive&&this.discussion&&this.$http.plain.post("/mercure-comment-typing/"+this.discussion.id+"/"+("reset"===e?"1":"0")).then(e=>{}).catch(e=>{console.error(e)})},handleBlur(){this.mercureTyping("reset"),this.$emit("blur"),setTimeout(()=>{this.isSelectingMention||(this.showMentionDropdown=!1)},300)},dynamicContentRows(){let e=8;if(this.rows&&(e=this.rows),this.newComment.content){let t=this.newComment.content.split(/\r|\r\n|\n/),i=t.length,s=this.$isMobile()?18:60;1===i&&(i=Math.floor(this.newComment.content.length/s+1)),i+1>e?i>1&&(this.contentRows=i+1):this.contentRows=e}else this.contentRows=e},handleKeydown(e){if(this.dynamicContentRows(),"ArrowUp"===e.key&&!this.showMentionDropdown){const t=e.target,i=t.selectionStart,s=t.value||"",a=s.slice(0,i);if(!a.includes("\n"))return e.preventDefault(),void this.$emit("navigate-up")}this.handleMentionKeydown(e)},processText:g()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"].includes(e.ke
1y))return!1;if(this.mercureTyping(),this.isComment||(this.$store.state.newDiscussion.content=this.newComment.content),this.detectMention(),this.positionDropdown(),!this.newComment.content)return!1;const t=/https?:\/\/[^\s/$.?#].[^\s]*/g,i=this.newComment.content.match(t)||[];if(i.length&&!this.openGraphEmbed)for(let s of i)this.openGraphLinksChecked.includes(s)||(this.isLoadingOpenGraph=!0,this.$http.plain.post("/open-graph?url="+encodeURI(s),{}).then(e=>{this.openGraphEmbedLink=s,this.openGraphEmbed=Object.assign({},e.data),this.newComment.openGraphEmbed=this.isComment?this.openGraphEmbed["@id"]:this.openGraphEmbed.id,this.openGraphLinksChecked.push(s),this.isLoadingOpenGraph=!1}).catch(e=>{console.error(e),this.isLoadingOpenGraph=!1}))},500),positionDropdown(){if(!this.showMentionDropdown||!this.$refs.newComment?.$el)return;const e=this.$refs.newComment.$el.querySelector("textarea");if(!e)return;const t=e.getBoundingClientRect();if(this.$isMobile())return void(this.dropdownStyle={position:"fixed",left:"8px",right:"8px",bottom:window.innerHeight-t.top+8+"px",maxWidth:"none",width:"calc(100% - 16px)"});const i=this.getPositionCoordinates(e,this.mentionStartIndex),s=320;let a=t.left+i.left;a+s>window.innerWidth-16&&(a=window.innerWidth-s-16),a=Math.max(16,a),this.isComment?this.dropdownStyle={position:"fixed",left:a+"px",bottom:window.innerHeight-t.top-i.top+4+"px"}:this.dropdownStyle={position:"fixed",left:a+"px",top:t.top+i.top+i.lineHeight+4+"px"}},getCaretCoordinates(e){return this.getPositionCoordinates(e,e.selectionStart)},getPositionCoordinates(e,t){null!==t&&void 0!==t||(t=e.selectionStart);const i=e.value.substring(0,t),s=document.createElement("div"),a=window.getComputedStyle(e);s.style.position="absolute",s.style.visibility="hidden",s.style.whiteSpace="pre-wrap",s.style.wordWrap="break-word",s.style.width=a.width,s.style.font=a.font,s.style.padding=a.padding,s.style.border=a.border,s.style.lineHeight=a.lineHeight,s.textContent=i;const n=document.createElement("span");n.textContent="|",s.appendChild(n),document.body.appendChild(s);const o=parseInt(a.lineHeight)||1.2*parseInt(a.fontSize),l={left:Math.min(n.offsetLeft,e.clientWidth-20),top:n.offsetTop-e.scrollTop,lineHeight:o};return document.body.removeChild(s),l}},computed:{...(0,f.L8)(["tenant","isGranted"])},watch:{contentRows(e){this.$emit("rows-changed",e)},saved:function(){this.resetEmbedLink(),this.contentRows=1,this.clearMentions()},newComment:{handler:function(e){""===e.content&&(this.contentRows=this.rows||1,this.openGraphEmbed=null,this.openGraphEmbedLink=null,this.openGraphLinksChecked=[],this.clearMentions())},deep:!0}},components:{MentionDropdown:d.A,OpenGraphLinkPreview:c.A,EmojiPicker:b.A}},v=i(66262);const k=(0,v.A)(y,[["render",r],["__scopeId","data-v-867c8a94"]]);var C=k},63898:function(e,t,i){"use strict";i.d(t,{A:function(){return N}});var s=i(20641),a=i(90033);const n={class:"content form-submission-answers"},o={class:"label"},l={key:0,class:"has-text-danger"},r={key:0,class:"help mb-2"},d={key:1,class:"control"},c=["value"],u={key:2,class:"control"},m=["value"],p={key:3,class:"control"},h=["value"],g={key:4,class:"control"},f={class:"select is-fullwidth"},b={disabled:""},y={key:5,class:"is-flex is-flex-direction-column",style:{gap:"8px"}},v=["checked"],k={class:"control-label"},C={key:6,class:"is-flex is-flex-direction-column",style:{gap:"8px"}},L=["checked"],w={class:"control-label"},_={key:7,class:"control"},E={key:8,class:"control"},$=["value"],F={key:9,class:"control"},T=["value"],S={key:10,class:"box"},A={key:0,class:"has-text-grey"};function P(e,t,i,P,I,M){const x=(0,s.g2)("b-switch");return(0,s.uX)(),(0,s.CE)("div",n,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.answers,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.fieldId,class:"mb-5"},[(0,s.Lk)("label",o,[(0,s.eW)((0,a.v_)(i.fieldName)+" ",1),i.isMandatory?((0,s.uX)(),(0,s.CE)("span",l," * ")):(0,s.Q3)("",!0)]),i.description?((0,s.uX)(),(0,s.CE)("p",r,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0),"input"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",d,[(0,s.Lk)("input",{value:i.rawValue,class:"input",type:"text",disabled:""},null,8,c)])):"number"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("input",{value:i.rawValue,class:"input",type:"number",disabled:""},null,8,m)])):"textarea"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("textarea",{value:i.rawValue,class:"textarea",rows:"3",disabled:""},null,8,h)])):"dropdown"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",g,[(0,s.Lk)("div",f,[(0,s.Lk)("select",b,[(0,s.Lk)("option",null,(0,a.v_)(i.formattedValue),1)])])])):"radio"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",y,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.fieldOptions?.options,
1(e,n)=>((0,s.uX)(),(0,s.CE)("label",{key:n,class:"b-radio radio"},[(0,s.Lk)("input",{type:"radio",checked:i.rawValue===n||i.rawValue===String(n),disabled:""},null,8,v),t[0]||(t[0]=(0,s.Lk)("span",{class:"check"},null,-1)),(0,s.Lk)("span",k,(0,a.v_)(e),1)]))),128))])):"checkboxes"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",C,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.fieldOptions?.options,(e,n)=>((0,s.uX)(),(0,s.CE)("label",{key:n,class:"b-checkbox checkbox"},[(0,s.Lk)("input",{type:"checkbox",checked:M.isCheckboxSelected(i.rawValue,n),disabled:""},null,8,L),t[1]||(t[1]=(0,s.Lk)("span",{class:"check"},null,-1)),(0,s.Lk)("span",w,(0,a.v_)(e),1)]))),128))])):"boolean"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",_,[(0,s.bF)(x,{"model-value":"Yes"===i.formattedValue,disabled:""},null,8,["model-value"])])):"local_center"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.Lk)("input",{value:i.formattedValue,class:"input",type:"text",disabled:""},null,8,$)])):"date"===i.fieldType?((0,s.uX)(),(0,s.CE)("div",F,[(0,s.Lk)("input",{value:i.rawValue?e.$filters.format(i.rawValue):"",class:"input",type:"text",disabled:""},null,8,T)])):((0,s.uX)(),(0,s.CE)("div",S,(0,a.v_)(i.formattedValue),1))]))),128)),i.answers.length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",A,(0,a.v_)(e.$t("No answers")),1))])}var I={name:"FormSubmissionAnswers",props:{answers:{type:Array,default:()=>[]}},methods:{isCheckboxSelected(e,t){return!!Array.isArray(e)&&(e.includes(t)||e.includes(String(t)))}}},M=i(66262);const x=(0,M.A)(I,[["render",P]]);var N=x},63958:function(e,t,i){var s={"./bg.json":[73753,3753],"./cs.json":[19504,9504],"./de.json":[90369,369],"./el.json":[3835,3835],"./en.json":[10389,389],"./es.json":[18302,8302],"./et.json":[35347,5347],"./fr.json":[75222,5222],"./it.json":[34895,4895],"./lt.json":[77742,7742],"./nl.json":[26920,6920],"./pr.json":[45092,5092],"./ro.json":[77825,7825],"./sk.json":[85608,5608],"./ua.json":[77868,7868]};function a(e){if(!i.o(s,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=s[e],a=t[0];return i.e(t[1]).then(function(){return i.t(a,19)})}a.keys=function(){return Object.keys(s)},a.id=63958,e.exports=a},64601:function(e,t,i){"use strict";i.d(t,{A:function(){return v}});var s=i(20641),a=i(90033),n=i(53751);const o={ref:"pillContainer",class:"list-filter-pill"},l={class:"pill-label"},r={class:"pill-value is-full"},d={class:"pill-label"},c={class:"pill-dropdown-header"},u={class:"pill-date-body"};function m(e,t,i,m,p,h){const g=(0,s.g2)("font-awesome-icon"),f=(0,s.g2)("b-datepicker"),b=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:(0,a.C4)(["pill-trigger",{"is-active":h.hasSelection}]),onClick:t[1]||(t[1]=(0,n.D$)((...e)=>h.toggleDropdown&&h.toggleDropdown(...e),["stop"]))},[h.hasSelection?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"pill-clear",onClick:t[0]||(t[0]=(0,n.D$)((...e)=>h.clearSelection&&h.clearSelection(...e),["stop"]))},[(0,s.bF)(g,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",l,(0,a.v_)(e.displayLabel),1),t[4]||(t[4]=(0,s.Lk)("span",{class:"pill-divider"},null,-1)),(0,s.Lk)("span",r,(0,a.v_)(h.rangeLabel),1),(0,s.bF)(g,{icon:"fa-light fa-chevron-down",class:"pill-chevron"})],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.bF)(g,{icon:"fa-light fa-plus",class:"pill-icon"}),(0,s.Lk)("span",d,(0,a.v_)(e.displayLabel),1)],64))],2),(0,s.bo)((0,s.Lk)("div",{ref:"dropdown",class:(0,a.C4)(["pill-dropdown",{"is-align-right":h.isAlignedRight}])},[(0,s.Lk)("div",c,(0,a.v_)(i.filterTitle||e.$t("Filter by")+": "+e.displayLabel),1),(0,s.Lk)("div",u,[(0,s.bF)(b,{label:e.$t("From")},{default:(0,s.k6)(()=>[(0,s.bF)(f,{"model-value":i.from,size:"is-small",rounded:"",inline:"","onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update:from",t))},null,8,["model-value"])]),_:1},8,["label"]),(0,s.bF)(b,{label:e.$t("Until")},{default:(0,s.k6)(()=>[(0,s.bF)(f,{"model-value":i.to,size:"is-small",rounded:"",inline:"","onUpdate:modelValue":t[3]||(t[3]=t=>e.$emit("update:to",t))},null,8,["model-value"])]),_:1},8,["label"])])],2),[[n.aG,p.isOpen]])],512)}i(44114);var p=i(37440),h=i(46093),g=i(28906),f={name:"ListFilterPillDate",mixins:[g.A],props:{label:{type:String,required:!0},from:{type:Date,default:null},to:{type:Date,default:null},filterTitle:{type:String,default:null},align:{type:String,default:"left"}},emits:["update:from","update:to","open"],data(){return{isOpen:!1,flipped:!1}},computed:{isAlignedRight(){return"right"===this.align||this.flipped},hasSelection(){return!(!this.from&&!this.to)},rangeLabel(){const e=[];return this.from&&e.push(this.$filters.format(this.from)),this.to&&e.push(this.$filters.format(this.to)),e.join(" - ")}},mounted(){document.addEventListener("click",this.onClickOutside),this.unregisterPill=(0,p.f)(this.close)},beforeUnmount(){document.removeEventListener("click",this.onClickOutside),this.unregisterPill&&this.unregisterPill()},methods:{toggleDropdown(){this.isOpen=!this.isOpen,this.isOpen&&((0,p.r)(this.close),(0,h.Mj)(this),this.$emit("open"))},open(){this.isOpen||this.toggleDropdown()},close(){this.isOpen=!1},clearSelection(){this.$emit("update:from",null),this.$emit("update:to",null),this.isOpen=!1},onClickOutside(e){this.isOpen&&this.$refs.pillContainer&&!this.$refs.pillContainer.contains(e.target)&&(this.isOpen=!1)}}},b=i(66262);const y=(0,b.A)(f,[["render",m]]);var v=y},65284:function(e,t,i){"use strict";i.d(t,{A:function(){return y}});var s=i(20641),a=i(90033);const n={class:"is-flex is-align-items-center group-select-wrapper"},o={class:"icon mr-3"},l=["label"],r={key:0,value:null},d=["value"],c=["label"],u=["value"],m=["value"];function p(e,t,i,p,h,g){const f=(0,s.g2)("font-awesome-icon"),b=(0,s.g2)("b-select"),y=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("span",o,[(0,s.bF)(f,{icon:"fa-light fa-users"})]),(0,s.bF)(y,{class:"is-flex-grow-1"},{default:(0,s.k6)(()=>[(0,s.bF)(b,{id:"groupSelect",modelValue:h.unit,"onUpdate:modelValue":[t[0]||(t[0]=e=>h.unit=e),g.emitChange],expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("optgroup",{label:e.$t("Main groups")},[!i.isIssue&&g.hasGeneralUnitAccess?((0,s.uX)(),(0,s.CE)("option",r,(0,a.v_)(e.tenant.shortName),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(g.filteredGroups,e=>((0,s.uX)(),(0,s.CE)("option",{key:e["@id"],value:e["@id"]},(0,a.v_)(e.name),9,d))),128))],8,l),"discussion_category"!==i.namespace?
1((0,s.uX)(),(0,s.CE)("optgroup",{key:0,label:e.$t("groups")},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(g.filteredGroupsForNamespace,e=>((0,s.uX)(),(0,s.CE)("option",{key:e["@id"],value:e["@id"]},(0,a.v_)(e.name),9,u))),128))],8,c)):(0,s.Q3)("",!0),g.fallbackOption?((0,s.uX)(),(0,s.CE)("option",{key:1,value:g.fallbackOption["@id"]},(0,a.v_)(g.fallbackOption.name),9,m)):(0,s.Q3)("",!0)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})])}i(18111),i(22489),i(20116);var h=i(40834),g={props:["item","itemDiscussionCategory","namespace","isIssue","resolvedUnit"],data(){return{unit:this.item?.unit?"string"===typeof this.item.unit?this.item.unit:this.item.unit["@id"]:null,myGroups:[],setting:this.$store.state.tenant.settingFeatures}},watch:{"item.unit"(e){const t="string"===typeof e?e:e?.["@id"]??null;t!==this.unit&&(this.unit=t)}},mounted(){if(this.getMyGroups(),this.emitChange(),!this.myGroups||0===this.myGroups.length){const e=this.$watch(()=>this.$store.state.spaces[this.tenant.slug]?.myGroups,t=>{t&&t.length&&(this.myGroups=t,this.initUnit(),this.emitChange(),e())})}},methods:{emitChange(){this.$emit("update:modelValue",this.unit)},getMyGroups(){this.myGroups=this.$store.state.spaces[this.tenant.slug].myGroups,this.initUnit()},initUnit(){if(this.unit||this.hasGeneralUnitAccess&&!this.isIssue||(this.unit=this.getFirstOptionForEmpty()),!this.unit&&this.$route.query.unit){let e=this.myGroups.find(e=>e.id===parseInt(this.$route.query.unit));void 0!==e&&(this.unit=e["@id"])}},getFirstOptionForEmpty(){const e=this.myGroups.filter(e=>!this.isIssue||e.isProject),t=this.user?.localCenter?.id??null;if(!this.isIssue&&t){const i=e.find(e=>"LocalCenter"===e["@type"]&&e.id===t);if(i)return i["@id"]}return e.length?e[0]["@id"]:null}},computed:{...(0,h.L8)(["user","tenant","isGranted"]),hasGeneralUnitAccess(){const e={drive:this.setting.drive.whoCanPostPublic,event:this.setting.events.whoCanPostPublic,discussion:this.setting.discussions.whoCanPostPublic||this.item.namespace&&this.itemDiscussionCategory&&this.itemDiscussionCategory.hasPublicPosting,discussion_category:"HR_TENANT",vote:"HR_TENANT",newsletter:"HR_TENANT",contract:"HR_TENANT"};return this.namespace in e&&this.isGranted(e[this.namespace])},filteredGroups(){return this.myGroups.filter(e=>!this.isIssue&&"LocalCenter"===e["@type"]||!this.isIssue&&(!0===e.isRoleGroup||e.unitType))},filteredGroupsForNamespace(){return"discussion_category"!==this.namespace?this.myGroups.filter(e=>"Group"===e["@type"]):[]},fallbackOption(){if(!this.unit||!this.resolvedUnit||!this.resolvedUnit.name)return null;const e=this.resolvedUnit["@id"];if(e!==this.unit)return null;const t=[...this.filteredGroups,...this.filteredGroupsForNamespace].some(e=>e["@id"]===this.unit);return t?null:this.resolvedUnit}}},f=i(66262);const b=(0,f.A)(g,[["render",p],["__scopeId","data-v-693c908d"]]);var y=b},65593:function(e,t,i){"use strict";i.d(t,{A:function(){return v}});var s=i(20641),a=i(90033);const n={key:0,class:"profile-completion-inline"},o={class:"completion-text"},l={class:"dropdown-header"},r={class:"has-text-weight-semibold"},d={class:"completion-percentage"},c={class:"is-small"},u={class:"field-label mb-0"},m={class:"is-small"};function p(e,t,i,p,h,g){const f=(0,s.g2)("b-progress"),b=(0,s.g2)("font-awesome-icon"),y=(0,s.g2)("b-dropdown-item"),v=(0,s.g2)("b-dropdown");return g.show?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.bF)(v,{position:"is-bottom-left","mobile-modal":!1,triggers:["hover","click"],"aria-role":"menu"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["completion-badge",{"is-desktop":!e.$isMobile()}])},[(0,s.bF)(f,{value:i.percentage,type:g.progressType,size:"is-small",class:"completion-progress"},null,8,["value","type"]),(0,s.Lk)("span",o,(0,a.v_)(i.percentage)+"%",1),e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(b,{key:0,icon:"fa-light fa-chevron-down",class:"dropdown-icon"}))],2)]),default:(0,s.k6)(()=>[(0,s.Lk)("div",l,[(0,s.Lk)("span",r,(0,a.v_)(e.$t("Profile completion")),1),(0,s.Lk)("span",d,(0,a.v_)(i.percentage)+"%",1)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(g.allFields,e=>((0,s.uX)(),(0,s.Wv)(y,{key:e,class:"py-2","aria-role":"menuitem",onClick:t=>g.handleFieldClick(e)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["dropdown-field-link",{"is-completed":g.isFieldCompleted(e)}])},[(0,s.Lk)("span",c,[(0,s.bF)(b,{icon:g.getFieldIcon(e)},null,8,["icon"])]),(0,s.Lk)("span",u,(0,a.v_)(g.getFieldLabel(e)),1),(0,s.Lk)("span",m,[g.isFieldCompleted(e)?((0,s.uX)(),(0,s.Wv)(b,{key:0,icon:"fa-light fa-circle-check",class:"has-text-success"})):(0,s.Q3)("",!0)])],2)]),_:2},1032,["onClick"]))),128))]),_:1})])):(0,s.Q3)("",!0)}i(44114);var h=i(61273),g=i(40834),f={components:{FontAwesomeIcon:h.gc},props:{percentage:{type:Number,default:0},missingFields:{type:Array,default:()=>[]},userId:{type:[Number,String],required:!0}},emits:["focus-field"],computed:{...(0,g.L8)(["tenant"]),show(){return this.percentage<100},progressType(){return this.percentage>
1=75?"is-success":this.percentage>=50?"is-warning":"is-primary"},profileFields(){return this.tenant?.settingForms?.profileForm?.profileFields||[]},allFields(){const e={firstName:"first_name",lastName:"last_name",dateBirth:"birthday",phoneNumber:"phone_number",gender:"gender",townCurrent:"town_current"},t=["website","facebook","linkedin","twitter","instagram","telegram","tiktok","bsky","signal","skype"],i=["logo","email"],s=["logo","firstName","lastName","email","dateBirth","phoneNumber","gender","townCurrent","socialMedia"];return s.filter(s=>{if(i.includes(s))return!0;if("socialMedia"===s)return t.some(e=>this.profileFields.includes(e));const a=e[s];return a&&this.profileFields.includes(a)})}},methods:{isFieldCompleted(e){return!this.missingFields.includes(e)},getFieldLabel(e){const t={logo:this.$t("Profile picture"),firstName:this.$t("First name"),lastName:this.$t("Last name"),email:this.$t("Email"),dateBirth:this.$t("Date of birth"),phoneNumber:this.$t("Phone number"),gender:this.$t("Gender"),townCurrent:this.$t("Location"),socialMedia:this.$t("Social media")};return t[e]||e},getFieldIcon(e){const t={logo:"fa-light fa-camera",firstName:"fa-light fa-user",lastName:"fa-light fa-user",email:"fa-light fa-envelope",dateBirth:"fa-light fa-cake-candles",phoneNumber:"fa-light fa-phone",gender:"fa-light fa-venus-mars",townCurrent:"fa-light fa-location-dot",socialMedia:"fa-light fa-share-nodes"};return t[e]||"fa-light fa-circle"},handleFieldClick(e){const t=this.$route,i="UserUpdate"===t.name&&String(t.params.item)===String(this.userId),s=["UserShow","UserShowMyProfile","UserShowMyDocuments"],a=s.includes(t.name)&&!t.params.item||"UserShow"===t.name&&String(t.params.item)===String(this.userId);if("logo"===e)a?this.$emit("focus-field",e):this.$router.push({name:"UserShow",params:{item:this.userId},query:{focusField:"logo"}});else if(i)this.$emit("focus-field",e);else{const t={focusField:e};"email"===e&&(t.tab="settings"),this.$router.push({name:"UserUpdate",params:{item:this.userId},query:t})}}}},b=i(66262);const y=(0,b.A)(f,[["render",p],["__scopeId","data-v-9cbfdfbe"]]);var v=y},66261:function(e,t,i){"use strict";const s=320,a=8,n=26,o=180;t.A={data(){return{hoverPreview:null}},computed:{hoverPreviewStyle(){if(!this.hoverPreview)return null;const{x:e,y:t,width:i,height:l}=this.hoverPreview,r=s/2,d=Math.min(Math.max(e,r+a),Math.max(r+a,i-r-a)),c=t<o;return{width:s+"px",left:d+"px",top:(c?Math.min(t+n,l-n):t-n)+"px",transform:c?"translate(-50%, 0)":"translate(-50%, -100%)"}}},methods:{openHoverPreview(e,t,i){const s=i?.getContainer(),a=t?.containerPoint;s&&a&&(this.hoverPreview={marker:e,x:a.x,y:a.y,width:s.clientWidth,height:s.clientHeight})},closeHoverPreview(){return!!this.hoverPreview&&(this.hoverPreview=null,!0)}}}},66288:function(e,t,i){"use strict";i.d(t,{A:function(){return oe}});var s=i(20641),a=i(90033);const n={ref:"container",class:"drive-lightbox",tabindex:"0"},o={class:"drive-lightbox__topbar"},l={class:"drive-lightbox__topbar-left"},r=["title"],d={class:"icon"},c={key:1,class:"drive-lightbox__counter"},u={key:0,class:"drive-lightbox__topbar-right"},m={class:"icon"},p={class:"icon"},h={class:"icon"},g={class:"icon"},f={class:"drive-lightbox__iconbtn"},b={class:"icon"},y={class:"icon-text"},v={class:"icon is-small"},k={class:"icon-text"},C={class:"icon is-small"},L={class:"icon-text"},w={class:"icon is-small"},_={class:"icon-text"},E={class:"icon is-small"},$=["disabled","title"],F={class:"icon"},T=["disabled","title"],S={class:"icon"},A={class:"drive-lightbox__content"},P=["src","alt"],I={key:1,class:"drive-lightbox__fallback"},M={class:"icon is-large mb-3"},x={class:"mb-4"},N={class:"icon-text"},U={class:"icon is-small"},D=["data"],X={class:"drive-lightbox__fallback"},V=["href"],R=["data"],O={class:"drive-lightbox__fallback"},Q=["href"],B={key:5,class:"drive-lightbox__fallback"},G={class:"is-size-5 mb-4"},W={class:"icon-text"},j={class:"icon is-small"};function z(e,t,i,z,q,J){const H=(0,s.g2)("font-awesome-icon"),K=(0,s.g2)("b-tooltip"),Y=(0,s.g2)("b-dropdown-item"),Z=(0,s.g2)("b-dropdown"),ee=(0,s.g2)("DriveEmbedPlayer"),te=(0,s.g2)("DriveVideoPlayer"),ie=(0,s.g2)("b-button"),se=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.Wv)(se,{"model-value":i.active,"can-cancel":i.bare?[]:["escape","outside"],"full-screen":"",class:"drive-lightbox-modal","onUpdate:modelValue":J.close},{default:(0,s.k6)(()=>[(0,s.Lk)("div",n,[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[i.bare?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"drive-lightbox__iconbtn",title:e.$t("Close"),onClick:t[0]||(t[0]=(...e)=>J.close&&J.close(...e))},[(0,s.Lk)("span",d,[(0,s.bF)(H,{icon:"fa-light fa-arrow-left"})])],8,r)),!i.bare&&i.items.length?((0,s.uX)(),(0,s.CE)("span",c,(0,a.v_)(i.index+1)+" / "+(0,a.v_)(i.items.length),1)):(0,s.Q3)("",!0)]),J.current?((0,s.uX)(),(0,s.CE)("div",u,[e.$isMobile()?((0,s.uX)(),(0,s.Wv)(Z,{key:1,"aria-role":"list",position:"is-bottom-left","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",f,[(0,s.Lk)("span",b,[(0,s.bF)(H,{icon:"fa-light fa-ellipsis-vertical"})])])]),default:(0,s.k6)(()=>[i.canShare(J.current)?((0,s.uX)(),(0,s.Wv)(Y,{key:0,"aria-role":"listitem",onClick:t[5]||(t[5]=e=>J.emitAction("share"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",y,[(0,s.Lk)("span",v,[(0,s.bF)(H,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),_:1})):(0,s.Q3)("",!0),J.canEmbed(J.current)?((0,s.uX)(),(0,s.Wv)(Y,{key:1,"aria-role":"listitem",onClick:t[6]||(t[6]=e=>J.emitAction("embed"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",k,[(0,s.Lk)("span",C,[(0,s.bF)(H,{icon:"fa-light fa-code"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Embed")),1)])]),_:1})):(0,s.Q3)("",!0),J.current.media?((0,s.uX)(),(0,s.Wv)(Y,{key:2,"aria-role":"listitem",onClick:t[7]||(t[7]=e=>J.emitAction("download"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",L,[(0,s.Lk)("span",w,[(0,s.bF)(H,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("download")),1)])]),_:1})):(0,s.Q3)("",!0),i.canEdit(J.current)?((0,s.uX)(),(0,s.Wv)(Y,{key:3,"aria-role":"listitem",onClick:t[8]||(t[8]=e=>J.emitAction("remove"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",_,[(0,s.Lk)("span",E,[(0,s.bF)(H,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("remove")),1)])]),_:1})):(0,s.Q3)("",!0)]),_:1})):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[i.canShare(J.current)?((0,s.uX)(),(0,s.Wv)(K,{key:0,label:e.$t("Share"),position:"is-bottom"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"drive-lightbox__iconbtn",onClick:t[1]||(t[1]=e=>J.emitAction("share"))},[(0,s.Lk)("span",m,[(0,s.bF)(H,{icon:"fa-light fa-share-nodes"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),J.canEmbed(J.current)?((0,s.uX)(),(0,s.Wv)(K,{key:1,label:e.$t("Embed"),position:"is-bottom"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"drive-lightbox__iconbtn",onClick:t[2]||(t[2]=e=>J.emitAction("embed"))},[(0,s.Lk)("span",p,[(0,s.bF)(H,{icon:"fa-light fa-code"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),J.current.media?((0,s.uX)(),(0,s.Wv)(K,{key:2,label:e.$t("download"),position:"is-bottom"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"drive-lightbox__iconbtn",onClick:t[3]||(t[3]=e=>J.emitAction("download"))},[(0,s.Lk)("span",h,[(0,s.bF)(H,{icon:"fa-light fa-cloud-arrow-down"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0),i.canEdit(J.current)?((0,s.uX)(),(0,s.Wv)(K,{key:3,label:e.$t("remove"),position:"is-bottom"},{default:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"drive-lightbox__iconbtn",onClick:t[4]||(t[4]=e=>J.emitAction("remove"))},[(0,s.Lk)("span",g,[(0,s.bF)(H,{icon:"fa-light fa-trash"})])])]),_:1},8,["label"])):(0,s.Q3)("",!0)],64))])):(0,s.Q3)("",!0)]),i.bare?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"drive-lightbox__nav is-prev",disabled:!J.hasPrev,title:e.$t("Previous"),onClick:t[9]||(t[9]=(...e)=>J.previous&&J.previous(...e))},[(0,s.Lk)("span",F,[(0,s.bF)(H,{icon:"fa-light fa-chevron-left"})])],8,$)),i.bare?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:1,class:"drive-lightbox__nav is-next",disabled:!J.hasNext,title:e.$t("Next"),onClick:t[10
1]||(t[10]=(...e)=>J.next&&J.next(...e))},[(0,s.Lk)("span",S,[(0,s.bF)(H,{icon:"fa-light fa-chevron-right"})])],8,T)),(0,s.Lk)("div",A,[J.current?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},["embed"===J.current.type&&J.current.metadata?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["drive-lightbox__embed",{"is-audio":"audio"===J.current.metadata.kind}])},[((0,s.uX)(),(0,s.Wv)(ee,{key:"embed_"+J.current.id,"embed-url":J.current.metadata.embedUrl,title:J.current.title,kind:J.current.metadata.kind||"video","aspect-ratio":J.current.metadata.aspectRatio||"16:9",height:J.current.metadata.height||152},null,8,["embed-url","title","kind","aspect-ratio","height"]))],2)):"image"===J.mime(J.current.media)?((0,s.uX)(),(0,s.CE)("img",{key:1,src:i.srcResolver(J.current),class:"drive-lightbox__image",alt:J.current.title},null,8,P)):"video"===J.mime(J.current.media)?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[J.isWebPlayable(J.current.media)?((0,s.uX)(),(0,s.Wv)(te,{key:"player_"+J.current.id,src:i.srcResolver(J.current)},null,8,["src"])):((0,s.uX)(),(0,s.CE)("div",I,[(0,s.Lk)("span",M,[(0,s.bF)(H,{icon:"fa-light fa-file-video",size:"3x"})]),(0,s.Lk)("p",x,(0,a.v_)(e.$t("This video format cannot be played in the browser. Download to play.")),1),(0,s.bF)(ie,{class:"is-primary is-rounded",onClick:t[11]||(t[11]=e=>J.emitAction("download"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",N,[(0,s.Lk)("span",U,[(0,s.bF)(H,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("download")),1)])]),_:1})]))],64)):"pdf"===J.mime(J.current.media)?((0,s.uX)(),(0,s.CE)("object",{key:3,data:i.srcResolver(J.current),type:"application/pdf",class:"drive-lightbox__doc"},[(0,s.Lk)("p",X,[(0,s.eW)((0,a.v_)(e.$t("pdfNotSupported"))+" ",1),(0,s.Lk)("a",{href:i.srcResolver(J.current)},(0,a.v_)(e.$t("openPdf")),9,V)])],8,D)):"text"===J.mime(J.current.media)?((0,s.uX)(),(0,s.CE)("object",{key:4,data:i.srcResolver(J.current),type:"text/plain",class:"drive-lightbox__doc"},[(0,s.Lk)("p",O,[(0,s.eW)((0,a.v_)(e.$t("txtNotSupported"))+" ",1),(0,s.Lk)("a",{href:i.srcResolver(J.current)},(0,a.v_)(e.$t("openTextFile")),9,Q)])],8,R)):((0,s.uX)(),(0,s.CE)("div",B,[(0,s.Lk)("h1",G,(0,a.v_)(e.$t("document"))+' "'+(0,a.v_)(J.current.title)+'" '+(0,a.v_)(e.$t("notPreviewable")),1),(0,s.bF)(ie,{class:"is-primary is-rounded",onClick:t[12]||(t[12]=e=>J.emitAction("download"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",W,[(0,s.Lk)("span",j,[(0,s.bF)(H,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("downloadDocument")),1)])]),_:1})]))],64)):(0,s.Q3)("",!0)])],512)]),_:1},8,["model-value","can-cancel","onUpdate:modelValue"])}var q=i(16430);const J=["src","title"],H=["title","aria-label"];function K(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{ref:"wrapper",class:(0,a.C4)(["drive-embed","drive-embed--"+i.kind]),style:(0,a.Tr)(l.wrapperStyle)},[(0,s.Lk)("iframe",{class:"drive-embed__iframe",src:i.embedUrl,title:i.title||e.$t("Embedded media"),loading:"lazy",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",allowfullscreen:"",referrerpolicy:"strict-origin-when-cross-origin"},null,8,J),"audio"!==i.kind?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"drive-embed__fullscreen",title:e.$t("Fullscreen"),"aria-label":e.$t("Fullscreen"),onClick:t[0]||(t[0]=(...e)=>l.toggleFullscreen&&l.toggleFullscreen(...e))},[(0,s.bF)(r,{icon:"fa-light fa-expand"})],8,H)):(0,s.Q3)("",!0)],6)}i(18111),i(61701);var Y={name:"DriveEmbedPlayer",props:{embedUrl:{type:String,required:!0},title:{type:String,default:null},kind:{type:String,default:"video"},aspectRatio:{type:String,default:"16:9"},height:{type:Number,default:152}},computed:{wrapperStyle(){if("audio"===this.kind)return{height:this.height+"px"};const[e,t]=(this.aspectRatio||"16:9").split(":").map(Number),i=e&&t?t/e*100:56.25;return{paddingBottom:i+"%"}}},methods:{toggleFullscreen(){const e=this.$refs.wrapper;e&&(document.fullscreenElement?document.exitFullscreen():e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}}},Z=i(66262);const ee=(0,Z.A)(Y,[["render",K],["__scopeId","data-v-42a6574e"]]);var te=ee,ie=i(56178),se=i(16104),ae={name:"DriveLightbox",components:{DriveVideoPlayer:q.A,DriveEmbedPlayer:te},props:{active:{type:Boolean,default:!1},items:{type:Array,default:()=>[]},index:{type:Number,default:0},bare:{type:Boolean,default:!1},canEdit:{type:Function,default:()=>!1},canShare:{type:Function,default:()=>!1},srcResolver:{type:Function,required:!0}},emits:["update:active","update:index","action"],data(){return{swipeStartX:null,swipeThreshold:50}},computed:{current(){return this.items[this.index]||null},hasPrev(){return this.index>0},hasNext(){return this.index<this.items.length-1}},watch:{active(e){e&&this.$nextTick(this.attachContainer)}},mounted(){window.addEventListener("keydown",this.onKeyDown)},beforeUnmount(){window.removeEventListener("keydown",this.onKeyDown),this.detachContainer()},methods:{mime(e){return(0,ie.xX)(e)},isWebPlayable(e){if(!e)return!1;const t=e.mime||e.mimeType||null,i=e.contentUrl||e.fileName||null;return(0,se.e)(t,i)},canEmbed(e){return!!e&&"video"===this.mime(e.media)&&this.isWebPlayable(e.media)&&this.canShare(e)},close(){this.$emit("update:active",!1)},next(){this.hasNext&&this.$emit("update:index",this.index+1)},previous(){this.hasPrev&&this.$emit("update:index",this.index-1)},emitAction(e){this.current&&this.$emit("action",{type:e,row:this.current})},onKeyDown(e){this.active&&!this.bare&&("ArrowRight"===e.key?this.next():"ArrowLeft"===e.key?this.previous():"Escape"===e.key&&this.close())},attachContainer(){const e=this.$refs.container;e&&(e.focus(),e.addEventListener("touchstart",this.onTouchStart),e.addEventListener("touchmove",this.onTouchMove),e.addEventListener("touchend",this.onTouchEnd))},detachContainer(){const e=this.$refs.container;e&&(e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("touchmove",this.onTouchMove),e.removeEventListener("touchend",this.onTouchEnd))},onTouchStart(e){this.swipeStartX=e.touches[0].clientX},onTouchMove(e){if(null===this.swipeStartX)return;const t=this.swipeStartX-e.touches[0].clientX;Math.abs(t)>10&&e.preventDefault()},onTouchEnd(e){if(null===this.swipeStartX)return;const t=this.swipeStartX-e.changedTouches[0].clientX;t>this.swipeThreshold?this.next():t<-this.swipeThreshold&&this.previous(),this.swipeStartX=null}}};const ne=(0,Z.A)(ae,[["render",z],["__scopeId","data-v-2b899728"]]
1);var oe=ne},66733:function(e,t,i){"use strict";i.d(t,{A:function(){return c}});var s=i(20641);function a(e,t,i,a,n,o){const l=(0,s.g2)("b-loading"),r=(0,s.g2)("VoteForm");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bF)(l,{modelValue:n.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>n.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),(0,s.bF)(r,{ref:"voteForm",operation:"create",item:n.item,onSaved:o.handleSaved,onPublished:o.handlePublished,onClose:t[1]||(t[1]=t=>e.$emit("close")),onStateChange:t[2]||(t[2]=t=>e.$emit("state-change",t))},null,8,["item","onSaved","onPublished"])])}var n=i(21152),o=i(40834),l={name:"VoteCreateContent",components:{VoteForm:n.A},props:{eventId:{type:[Number,String],default:null}},emits:["created","cancel","close","published","state-change"],data(){const e=!!this.eventId;return{isLoading:!1,item:{isGeneral:!e,isAnonymous:!0,isEditable:!0,dateStart:null,dateEnd:null,timeStart:null,timeEnd:null,createdNow:!1}}},computed:{...(0,o.L8)(["user","tenant","isGranted"])},created(){this.isGranted("HR_LOCAL")?this.eventId&&this.loadEvent():this.$emit("cancel")},methods:{loadEvent(){this.isLoading=!0,this.$http.plain.get("/events/"+this.eventId).then(e=>{this.item.event=e.data,this.item.isGeneral=!1}).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})},handleSaved(e){this.$emit("created",e)},handlePublished(e){this.$emit("published",e)},saveDraftAndClose(){this.$refs.voteForm?.saveDraftAndClose()},publishAndClose(){this.$refs.voteForm?.publishAndClose()},isPublishing(){return!!this.$refs.voteForm?.isPublishing},isBootstrapping(){return!!this.$refs.voteForm?.isBootstrapping},canSubmit(){return!!this.$refs.voteForm?.canSubmit}}},r=i(66262);const d=(0,r.A)(l,[["render",a]]);var c=d},67124:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"tab-list"},l=["onClick"],r={class:"tab-label"};function d(e,t,i,d,c,u){const m=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("nav",{class:(0,a.C4)(["app-tab-navbar",{"is-hidden":i.isHidden,"tabs-native-app":e.isNativeApp}])},[(0,s.Lk)("ul",o,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(u.tabs,t=>((0,s.uX)(),(0,s.CE)("li",{key:t.label},[(0,s.Lk)("a",{href:"#",class:(0,a.C4)(["tab-link",{active:u.isActive(t.route)}]),onClick:(0,n.D$)(e=>u.navigateToTab(t),["prevent"])},[(0,s.bF)(m,{icon:["fal",t.icon],class:"tab-icon"},null,8,["icon"]),(0,s.Lk)("span",r,(0,a.v_)(e.$t(t.label)),1)],10,l)]))),128))])],2)}i(44114),i(18111),i(20116);var c=i(40834),u=i(8277);const m={EventList:{routes:["events","EventList"],feature:"events.isActive"},VoteList:{routes:["Voting","VoteList"],feature:"voting.isActive"},DriveList:{routes:["files","DriveList"],feature:"drive.isActive"}};var p={name:"AppTabNavbar",mixins:[u.A],props:{isHidden:{type:Boolean,default:!1},activeRoute:{type:String,default:null}},computed:{...(0,c.L8)(["isNativeApp","tenant","user","isGranted"]),tabs(){return[{label:"Home",icon:"home",route:"Dashboard"},{label:"groups",icon:"users",route:"GroupBrowse"},{label:"Events",icon:"calendar",route:"EventList"},{label:"Voting",icon:"box-ballot",route:"VoteList"},{label:"Files",icon:"folder",route:"DriveList"}].filter(e=>!m[e.route]||this.isTabVisible(m[e.route]))}},methods:{isTabVisible({routes:e,feature:t}){for(const i of this.tenant?.settingMenu?.categories||[]){const t=(i.items||[]).find(t=>"route"===t.type&&e.includes(t.route));if(t)return!!t.isActive&&this.isMenuEntryAccessible(i)&&this.isMenuEntryAccessible(t)}return this.safeEvaluateFeature(t)},isActive(e){return(this.activeRoute||this.$route.name)===e},navigateToTab(e){const t=["EventList","DriveList","VoteList"];t.includes(e.route)&&(this.$store.state.currentGroup=null),this.$router.push({name:e.route})}}},h=i(66262);const g=(0,h.A)(p,[["render",d],["__scopeId","data-v-2915fa7e"]]);var f=g},67503:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033);const n={key:0,class:"event-about-section"},o={class:"has-text-weight-semibold mb-1 has-text-grey is-size-7 is-uppercase"},l={class:"about-event-content"},r={key:0,class:"description-fade"},d={key:0,class:"is-flex"},c={class:"icon-text has-text-weight-semibold is-size-6-half"},u={class:"is-small mt-1 ml-1"},m={class:"icon-text has-text-weight-semibold is-size-6-half"},p={class:"is-small mt-1 ml-1"},h={key:0,class:"is-flex is-flex-wrap-wrap mt-5"},g=["src","alt","title"];function f(e,t,i,f,b,y){const v=(0,s.g2)("TipTap"),k=(0,s.g2)("font-awesome-icon");return y.isEmpty?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("p",o,(0,a.v_)(e.$t("About Event")),1),t[2]||(t[2]=(0,s.Lk)("hr",{class:"mt-0 mb-4"},null,-1)),(0,s.Lk)("div",l,[(0,s.Lk)("div",{ref:"descriptionWrapper",class:(0,a.C4)(["description-wrapper",{"is-truncated":i.truncate&&!b.showMore&&b.isOverflowing}]),style:(0,a.Tr)(i.truncate&&!b.showMore&&b.isOverflowing?{maxHeight:i.maxHeight+"px"}:{})},[(0,s.bF)(v,{"model-value":i.description,"is-editable":!1},null,8,["model-value"]),i.truncate&&!b.showMore&&b.isOverflowing?((0,s.uX)(),(0,s.CE)("div",r)):(0,s.Q3)("",!0)],6),i.truncate&&b.isOverflowing?((0,s.uX)(),(0,s.CE)("div",d,[b.showMore?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"unstyled-button mt-3",onClick:t[1]||(t[1]=e=>b.showMore=!1)},[(0,s.Lk)("span",m,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Show less")),1),(0,s.Lk)("span",p,[(0,s.bF)(k,{icon:"fa-light fa-angle-up"})])])])):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"unstyled-button mt-3",onClick:t[0]||(t[0]=e=>b.showMore=!0)},[(0,s.Lk)("span",c,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Show more")),1),(0,s.Lk)("span",u,[(0,s.bF)(k,{icon:"fa-light fa-angle-down"})])])]))])):(0,s.Q3)("",!0)]),i.showSdg&&i.sdg&&i.sdg.length>0?((0,s.uX)(),(0,s.CE)("div",h,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.sdg,t=>((0,s.uX)(),(0,s.CE)("figure",{key:t,class:"mr-2 mb-2"},[(0,s.Lk)("img",{src:"https://orgostatic.s3.eu-central-1.amazonaws.com/sdg/E-WEB-Goal-"+(t<10?"0"+t:t)+".png",width:"85px",style:{"border-radius":"8px"},alt:t+". "+e.$t("GOAL"+t),title:t+". "+e.$t("GOAL"+t)},null,8,g)]))),128))])):(0,s.Q3)("",!0),(0,s.RG)(e.$slots,"media",{},void 0,!0)]))}var b=i(53719),y={name:"EventAboutSection",components:{TipTap:b.A},props:{description:{type:String,default:null},sdg:{type:Array,default:()=>[]},showSdg:{type:Boolean,default:!1},truncate:{type:Boolean,default:!1},maxHeight:{type:Number,default:200}},data(){return{showMore:!1,isOverflowing:!1}},computed:{isEmpty(){return!this.description||(this.description.length<=1||("<p></p>"===this.description||"<p> </p>"===this.description))}},watch:{description:{immediate:!0,handler(){this.$nextTick(()=>{setTimeout(()=>this.checkOverflow(),100)})}}},mounted(){setTimeout(()=>this.checkOverflow(),500)},methods:{checkOverflow(){if(!this.truncate||!this.$refs.descriptionWrapper)return;const e=this.$refs.descriptionWrapper;this.isOverflowing=e.scrollHeight>this.maxHeight}}},v=i(66262);const k=(0,v.A)(y,[["render",f],["__scopeId","data-v-5d48d50b"]]);var C=k},68866:function(e,t,i){"use strict";i(44114);var s=i(95256),a=i(40834);t.A={computed:{...(0,a.L8)(["tenant"]),permissionsAvailable(){let e=[],t=this.tenant.settingFeatures;for(const[a,n]of Object.entries(s.P)){if(a.includes("_LOCAL")&&!t.localCenter.isActive)continue;if(!0===n){e.push(a);continue}let i=n.split(".");t[i[0]]&&!0===t[i[0]][i[1]]&&e.push(a)}const i=Object.keys(s.P);return e.sort((e,t)=>
1e.includes("_TENANT")&&!t.includes("_TENANT")?-1:!e.includes("_TENANT")&&t.includes("_TENANT")||e.includes("_PARENT_LOCAL")&&!t.includes("_PARENT_LOCAL")?1:!e.includes("_PARENT_LOCAL")&&t.includes("_PARENT_LOCAL")?-1:e.includes("_LOCAL")&&!t.includes("_LOCAL")?1:!e.includes("_LOCAL")&&t.includes("_LOCAL")?-1:i.indexOf(e)-i.indexOf(t)),e}}}},69133:function(e,t,i){"use strict";i.d(t,{A:function(){return u}});var s=i(20641),a=i(90033);const n=["data-debug-bg","data-original-bg"];function o(e,t,i,o,l,r){return(0,s.uX)(),(0,s.CE)("span",{class:(0,a.C4)(["user-type-tag mr-1",i.isSmall?"":"is-pill"]),style:(0,a.Tr)({"background-color":r.computedBackgroundColor,color:r.contrastingTextColor,"box-shadow":"inset 0 0 5px rgba(0, 0, 0, 0.1)"}),"data-debug-bg":r.computedBackgroundColor,"data-original-bg":i.userType?.options?.bgcolor},(0,a.v_)(i.isSmall?r.text?.toUpperCase().slice(0,1):r.text),15,n)}var l=i(40834),r={props:["userType","isSmall"],data(){return{}},watch:{userType:{handler(e,t){this.isSmall?this.text?.toUpperCase().slice(0,1):this.text},immediate:!0,deep:!0}},methods:{calculateContrastColor(e){if(e&&e.startsWith("var(--"))return e.includes("scheme-main")?"var(--bulma-scheme-invert)":"var(--bulma-text)";if(!e||"string"!==typeof e||!e.startsWith("#"))return"var(--bulma-scheme-invert)";try{const t=e.replace("#","");if(6!==t.length)return"var(--bulma-scheme-invert)";const i=parseInt(t.substr(0,2),16),s=parseInt(t.substr(2,2),16),a=parseInt(t.substr(4,2),16);if(isNaN(i)||isNaN(s)||isNaN(a))return"var(--bulma-scheme-invert)";const n=(.299*i+.587*s+.114*a)/255,o=n>.5?"#000000":"#ffffff";return o}catch(t){return"var(--bulma-scheme-invert)"}}},computed:{...(0,l.L8)(["tenant"]),text(){return this.userType&&this.userType.name?this.userType.name:"-"},contrastingTextColor(){this.userType,this.isSmall?this.text?.toUpperCase().slice(0,1):this.text;const e=this.userType?.options?.color;if(e)return e;const t=this.computedBackgroundColor;return this.calculateContrastColor(t)},computedBackgroundColor(){const e=this.userType?.options?.bgcolor,t=e||"var(--bulma-scheme-main)";return t}},components:{}},d=i(66262);const c=(0,d.A)(r,[["render",o],["__scopeId","data-v-ed6318f8"]]);var u=c},71537:function(e,t,i){"use strict";i.d(t,{A:function(){return p}});var s=i(20641),a=i(90033);const n=["src"],o=["width"];function l(e,t,i,l,r,d){return(0,s.uX)(),(0,s.CE)("section",null,[((0,s.uX)(),(0,s.Wv)((0,s.$y)(i.noLink?"span":"router-link"),{to:i.noLink?void 0:d.logoRoute},{default:(0,s.k6)(()=>[e.$store.state.tenant?.logo&&!d.hideTenantLogo?((0,s.uX)(),(0,s.CE)("img",{key:"logo_"+e.$store.state.tenant.id,src:d.logo,class:(0,a.C4)({tenantLogo:!i.isAppHeader,tenantLogoBig:["simple","payment"].includes(e.$route.meta.layout),tenantLogoSmall:!e.$route.meta.layout||!["simple","payment"].includes(e.$route.meta.layout),loginLogo:"Login"===e.$route.name})},null,10,n)):((0,s.uX)(),(0,s.CE)("img",{key:"orgo-fallback-logo",src:"/img/orgo-logo.svg",alt:"Orgo",style:{maxWidth:"100%",height:"auto"},width:"Login"===e.$route.name?"110px":"60px"},null,8,o))]),_:1},8,["to"]))])}var r=i(28782),d=i(3095),c={components:{},props:{targetRouteName:{type:[String,Object],default:null},isAppHeader:{type:Boolean,default:!1},noLink:{type:Boolean,default:!1}},data(){return{}},computed:{hideTenantLogo(){if("StartTenant"===this.$route.name)return!0;if("Login"===this.$route.name){if(this.$store.getters.isCustomDomain)return!1;if(Object.keys(this.$store.state.spaces).length>1)return!0;if(this.$store.state.loginOtpFlowActive&&1!==Object.keys(this.$store.state.spaces).length)return!0}return!1},logoRoute(){return this.targetRouteName&&"object"===typeof this.targetRouteName?this.targetRouteName:{name:this.targetRouteName||"Dashboard"}},isDarkMode(){return"default"===this.$store.state.theme?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:"dark"===this.$store.state.theme},isOnDarkSurface(){return"dark"===this.$store.state.theme||this.isAppHeader&&"dark"===d._m.tone},logo(){let e=this.$store.state.tenant.logo;return this.isOnDarkSurface&&this.$store.state.tenant.logoDark&&(e=this.$store.state.tenant.logoDark),e&&(e.startsWith("http://")||e.startsWith("https://"))?e:e?r.hd+r.DJ+"tenant/"+e:"/img/orgo-logo.svg"}},methods:{}},u=i(66262);const m=(0,u.A)(c,[["render",l],["__scopeId","data-v-11fc87c4"]]);var p=m},72554:function(e,t,i){"use strict";function s(e,t,i=null){return!(!e||!e.email)&&((!i||e.id!==i.id)&&!!t("COMMUNICATION_LOCAL",e.localCenter))}i.d(t,{y:function(){return s}})},72623:function(e,t,i){"use strict";i.d(t,{A:function(){return R}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"modal-card-head pb-0"},l={class:"modal-card-title"},r={class:"modal-card-head-actions"},d=["title"],c={class:"icon is-small"},u={class:"icon is-small"},m={class:"modal-card-body nice-v-scrollbar pb-0 pt-4"},p={key:0,class:"columns is-variable is-4"},h={class:"column is-two-thirds"},g={class:"modal-message"},f={class:"modal-title mb-3 is-relative"},b={class:"modal-textarea"},y={class:"pt-4"},v={key:1},k={class:"composer-merged"},C={class:"composer-title-row"},L=["placeholder","required"],w={class:"composer-content-row"},_={class:"pt-4"},E={class:"modal-card-foot"},$={key:0,class:"composer-icons"},F={key:1,class:"composer-action-extras"},T={class:"modal-footer-posting-in"},S=["disabled"];function A(e,t,i,A,P,I){const M=(0,s.g2)("LogoThumbnail"),x=(0,s.g2)("font-awesome-icon"),N=(0,s.g2)("b-loading"),U=(0,s.g2)("b-input"),D=(0,s.g2)("b-field"),X=(0,s.g2)("EmojiPicker"),V=(0,s.g2)("PostInput"),R=(0,s.g2)("MediaUpload"),O=(0,s.g2)("b-tooltip");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["modal-card formModalBase",{"two-column-modal":i.useTwoColumns,"is-fullscreen-desktop":P.isFullscreen&&!e.$isMobile()}]),onDragover:t[34]||(t[34]=(0,n.D$)(()=>{},["prevent"])),onDragenter:t[35]||(t[35]=(0,n.D$)((...e)=>I.onDragToggle&&I.onDragToggle(...e),["prevent"])),onDragleave:t[36]||(t[36]=(0,n.D$)((...e)=>I.onDragToggle&&I.onDragToggle(...e),["prevent"])),onDrop:t[37]||(t[37]=(0,n.D$)((...e)=>I.onDropFiles&&I.onDropFiles(...e),["prevent"]))},[(0,s.Lk)("header",o,[(0,s.bF)(M,{item:e.user,"is-type":"roundSmall",class:"mr-3"},null,8,["item"]),(0,s.Lk)("span",l,[(0,s.RG)(e.$slots,"title",{},()=>[(0,s.eW)((0,a.v_)(i.defaultTitle),1)],!0)]),(0,s.Lk)("div",r,[(0,s.RG)(e.$slots,"header-actions",{},void 0,!0),e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",{key:0,class:"button is-white fullscreen-btn",title:e.$t(P.isFullscreen?"Exit fullscreen":"Enter fullscreen"),onClick:t[0]||(t[0]=(...e)=>I.toggleFullscreen&&I.toggleFullscreen(...e))},[(0,s.Lk)("span",c,[(0,s.bF)(x,{icon:P.isFullscreen?"fa-light fa-compress":"fa-light fa-expand"},null,8,["icon"])])],8,d)),(0,s.Lk)("span",{class:"button is-white close-btn",onClick:t[1]||(t[1]=(...e)=>I.closeModal&&I.closeModal(...e))},[(0,s.Lk)("span",u,[(0,s.bF)(x,{icon:"fa-light fa-times"})])])])]),(0,s.Lk)("section",m,[(0,s.bF)(N,{modelValue:P.isSaving,"onUpdate:modelValue":t[2]||(t[2]=e=>P.isSaving=e),"is-full-page":!1},null,8,["modelValue"]),i.useTwoColumns?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("div",h,[(0,s.Lk)("div",g,[(0,s.Lk)("div",f,[(0,s.Lk)("span",{class:"icon is-clickable o-emoji-icon is-
1hidden-mobile",onClick:t[3]||(t[3]=e=>P.showEmojiPicker=!P.showEmojiPicker)},[(0,s.bF)(x,{icon:"fal fa-smile"})]),(0,s.bF)(D,null,{default:(0,s.k6)(()=>[(0,s.bF)(U,{ref:"titleInput",modelValue:P.itemData.title,"onUpdate:modelValue":[t[4]||(t[4]=e=>P.itemData.title=e),I.onTitleChange],expanded:"",placeholder:i.titlePlaceholder,class:"modal-input",type:"text",required:"","status-icon":!1,"validation-message":e.$t("Please fill in this field"),onFocus:t[5]||(t[5]=e=>P.showEmojiPicker=!1),onKeyup:(0,n.jR)(I.handleSave,["enter"])},null,8,["modelValue","placeholder","validation-message","onUpdate:modelValue","onKeyup"])]),_:1}),P.showEmojiPicker?((0,s.uX)(),(0,s.Wv)(X,{key:0,native:!0,class:"emoji-picker",style:{position:"absolute",top:"0",right:"30px",height:"350px"},theme:e.$store.state.theme,onSelect:I.addEmoji},null,8,["theme","onSelect"])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",b,[(0,s.bF)(D,null,{default:(0,s.k6)(()=>[(0,s.bF)(V,{ref:"postInput","new-comment":P.itemData,project:i.project,discussion:i.discussion,"is-comment":!1,"show-media-icons":!0,placeholder:e.$t("Write more")+"...",rows:e.$isMobile()?6:8,onMentionsChanged:t[6]||(t[6]=t=>e.$emit("inline-mentions-changed",t)),onContactMentionsChanged:t[7]||(t[7]=t=>e.$emit("inline-contact-mentions-changed",t)),onUploadImage:t[8]||(t[8]=t=>e.$refs.mediaUpload.triggerPhotoUpload()),onUploadVideo:t[9]||(t[9]=t=>e.$refs.mediaUpload.triggerVideoUpload()),onUploadFile:t[10]||(t[10]=t=>e.$refs.mediaUpload.triggerFileUpload())},null,8,["new-comment","project","discussion","placeholder","rows"])]),_:1})]),(0,s.Lk)("div",y,[(0,s.bF)(R,{ref:"mediaUpload",item:P.itemData,"is-form-modal":!0,medias:P.itemData.medias,"is-comment":!1,"is-dragging":P.isDragging,"resize-images":i.resizeImages,"hide-buttons":!0,"onUpdate:modelValue":t[11]||(t[11]=e=>P.itemData.uploadedMedia=e)},null,8,["item","medias","is-dragging","resize-images"])]),(0,s.RG)(e.$slots,"main-content-below",{},void 0,!0)])]),(0,s.Lk)("div",{class:(0,a.C4)(["column is-one-third",{"issue-sidebar":!e.$isMobile()}])},[(0,s.RG)(e.$slots,"additional-fields",{},void 0,!0)],2)])):((0,s.uX)(),(0,s.CE)("div",v,[(0,s.Lk)("div",k,[(0,s.Lk)("div",C,[(0,s.bo)((0,s.Lk)("input",{ref:"titleInput","onUpdate:modelValue":t[12]||(t[12]=e=>P.itemData.title=e),placeholder:i.titlePlaceholder,required:i.titleRequired,class:"composer-title-input",type:"text",onInput:t[13]||(t[13]=(...e)=>I.onTitleChange&&I.onTitleChange(...e)),onFocus:t[14]||(t[14]=e=>P.lastFocusedField="title"),onBlur:t[15]||(t[15]=(...e)=>I.rememberTitleCaret&&I.rememberTitleCaret(...e)),onKeyup:[t[16]||(t[16]=(...e)=>I.rememberTitleCaret&&I.rememberTitleCaret(...e)),t[19]||(t[19]=(0,n.jR)((...e)=>I.handleSave&&I.handleSave(...e),["enter"]))],onClick:t[17]||(t[17]=(...e)=>I.rememberTitleCaret&&I.rememberTitleCaret(...e)),onKeydown:t[18]||(t[18]=(0,n.jR)((0,n.D$)((...e)=>I.focusContent&&I.focusContent(...e),["prevent"]),["down"]))},null,40,L),[[n.Jo,P.itemData.title]])]),(0,s.Lk)("div",w,[(0,s.bF)(V,{ref:"postInput","new-comment":P.itemData,project:i.project,discussion:i.discussion,"is-comment":!1,"show-media-icons":!1,"hide-emoji":!0,placeholder:e.$t("Write")+"...",rows:8,onMentionsChanged:t[20]||(t[20]=t=>e.$emit("inline-mentions-changed",t)),onContactMentionsChanged:t[21]||(t[21]=t=>e.$emit("inline-contact-mentions-changed",t)),onNavigateUp:I.focusTitle,onUploadImage:t[22]||(t[22]=t=>e.$refs.mediaUpload.triggerPhotoUpload()),onUploadVideo:t[23]||(t[23]=t=>e.$refs.mediaUpload.triggerVideoUpload()),onUploadFile:t[24]||(t[24]=t=>e.$refs.mediaUpload.triggerFileUpload())},null,8,["new-comment","project","discussion","placeholder","onNavigateUp"])]),(0,s.Lk)("div",_,[(0,s.bF)(R,{ref:"mediaUpload",item:P.itemData,"is-form-modal":!0,medias:P.itemData.medias,"is-comment":!1,"is-dragging":P.isDragging,"resize-images":i.resizeImages,"hide-buttons":!0,"onUpdate:modelValue":t[25]||(t[25]=e=>P.itemData.uploadedMedia=e)},null,8,["item","medias","is-dragging","resize-images"])])]),(0,s.RG)(e.$slots,"additional-fields",{},void 0,!0)]))]),(0,s.Lk)("footer",E,[i.useTwoColumns?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",$,[e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(O,{key:0,label:e.$t("Insert emoji"),position:"is-top",class:"emoji-tooltip-left"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",{ref:"emojiAnchor",class:"icon is-clickable composer-action-icon footer-emoji-anchor",onMousedown:t[26]||(t[26]=(...e)=>
1I.rememberCaret&&I.rememberCaret(...e)),onClick:t[27]||(t[27]=(0,n.D$)((...e)=>I.toggleFooterEmoji&&I.toggleFooterEmoji(...e),["stop"]))},[(0,s.bF)(x,{icon:"fa-light fa-face-smile"})],544),((0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[P.showFooterEmojiPicker?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"emoji-picker-backdrop",onClick:t[28]||(t[28]=(0,n.D$)(e=>P.showFooterEmojiPicker=!1,["stop"]))})):(0,s.Q3)("",!0),P.showFooterEmojiPicker?((0,s.uX)(),(0,s.Wv)(X,{key:1,native:!0,class:"footer-emoji-picker",style:(0,a.Tr)(P.footerEmojiPickerStyle),theme:e.$store.state.theme,onClick:t[29]||(t[29]=(0,n.D$)(()=>{},["stop"])),onSelect:I.addEmojiToContent},null,8,["style","theme","onSelect"])):(0,s.Q3)("",!0)]))]),_:1},8,["label"])),(0,s.bF)(O,{label:e.$t("Upload image"),position:"is-top"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",{class:"icon is-clickable composer-action-icon",onClick:t[30]||(t[30]=t=>e.$refs.mediaUpload&&e.$refs.mediaUpload.triggerPhotoUpload())},[(0,s.bF)(x,{icon:"fa-light fa-image"})])]),_:1},8,["label"]),(0,s.bF)(O,{label:e.$t("Upload video"),position:"is-top"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",{class:"icon is-clickable composer-action-icon",onClick:t[31]||(t[31]=t=>e.$refs.mediaUpload&&e.$refs.mediaUpload.triggerVideoUpload())},[(0,s.bF)(x,{icon:"fa-light fa-video"})])]),_:1},8,["label"]),(0,s.bF)(O,{label:e.$t("Upload file"),position:"is-top"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",{class:"icon is-clickable composer-action-icon",onClick:t[32]||(t[32]=t=>e.$refs.mediaUpload&&e.$refs.mediaUpload.triggerFileUpload())},[(0,s.bF)(x,{icon:"fa-light fa-folder"})])]),_:1},8,["label"]),e.$slots["footer-extras"]?((0,s.uX)(),(0,s.CE)("span",F,[(0,s.RG)(e.$slots,"footer-extras",{},void 0,!0)])):(0,s.Q3)("",!0)])),(0,s.Lk)("div",T,[(0,s.RG)(e.$slots,"footer-right",{},void 0,!0)]),(0,s.RG)(e.$slots,"footer-before-save",{},void 0,!0),(0,s.Lk)("button",{class:"button is-primary is-rounded publish-btn",disabled:I.isSaveDisabled,onClick:t[33]||(t[33]=(...e)=>I.handleSave&&I.handleSave(...e))},(0,a.v_)(i.saveButtonText),9,S)])],34)}var P=i(63520),I=i(31823),M=i(95256),x=i(40834),N=i(86827),U=i(51114),D={name:"BaseFormModal",components:{MediaUpload:N.A,PostInput:P.A,LogoThumbnail:I.A,EmojiPicker:U.A},props:{itemLoaded:{type:Object,default:null},showDiscussionModalPhotosDialog:{type:Boolean,default:!1},showDiscussionModalVideosDialog:{type:Boolean,default:!1},showDiscussionModalFilesDialog:{type:Boolean,default:!1},titlePlaceholder:{type:String,default:""},defaultTitle:{type:String,default:""},saveButtonText:{type:String,default:""},useTwoColumns:{type:Boolean,default:!1},resizeImages:{type:Boolean,default:!0},titleRequired:{type:Boolean,default:!0},fullscreenStorageKey:{type:String,default:"baseFormModalFullscreen"},project:{type:Object,default:null},discussion:{type:Object,default:null}},emits:["save","title-changed","inline-mentions-changed","inline-contact-mentions-changed","close"],data(){return{itemData:{title:null,content:null,medias:[],uploadedMedia:[],removedMedia:[],openGraphEmbed:null},isSaving:!1,showEmojiPicker:!1,showFooterEmojiPicker:!1,footerEmojiPickerStyle:{},isDragging:!1,isFullscreen:!1,lastFocusedField:"content",lastCaretPos:0,bypassDirtyCheck:!1,pristineData:{title:"",content:""}}},computed:{...(0,x.L8)(["user","tenant"]),hasUnsavedChanges(){if(this.bypassDirtyCheck)return!1;const e=this.itemData?.title?String(this.itemData.title).trim():"",t=this.itemData?.content?String(this.itemData.content).trim():"",i=Array.isArray(this.itemData?.uploadedMedia)&&this.itemData.uploadedMedia.length>0,s=Array.isArray(this.itemData?.removedMedia)&&this.itemData.removedMedia.length>0;return e!==this.pristineData.title||t!==this.pristineData.content||i||s},isSaveDisabled(){if(this.isSaving)return!0;const e=this.itemData?.title?String(this.itemData.title).trim():"",t=this.itemData?.content?String(this.itemData.content).trim():"",i=Array.isArray(this.itemData?.medias)&&this.itemData.medias.length>0,s=Array.isArray(this.itemData?.uploadedMedia)&&this.itemData.uploadedMedia.length>0;return this.titleRequired?e.length<3:e.length<3&&t.length<1&&!i&&!s}},mounted(){!0===this.showDiscussionModalPhotosDialog&&this.$refs.photosButton&&this.$refs.photosButton.click(),!0===this.showDiscussionModalVideosDialog&&this.$refs.videosButton&&this.$refs.videosButton.click(),this.$nextTick(()=>
1{if(this.$refs.titleInput){const e=this.$refs.titleInput.$el?this.$refs.titleInput.$el.querySelector("input"):this.$refs.titleInput;e&&e.focus&&e.focus()}}),document.addEventListener("keydown",this.handleEscapeCapture,!0),document.addEventListener("mousedown",this.handleOutsideClickCapture,!0)},beforeUnmount(){document.removeEventListener("keydown",this.handleEscapeCapture,!0),document.removeEventListener("mousedown",this.handleOutsideClickCapture,!0),this.itemData.content=null,this.$store.state.newDiscussion={title:null,content:null}},methods:{formatBytes:M.z3,mediaSrc:M.F9,toggleFullscreen(){this.isFullscreen=!this.isFullscreen},triggerContentEmoji(){this.$refs.postInput&&"function"===typeof this.$refs.postInput.toggleEmojiPicker&&this.$refs.postInput.toggleEmojiPicker("right")},toggleFooterEmoji(){this.showFooterEmojiPicker||this.computeEmojiPickerPosition(),this.showFooterEmojiPicker=!this.showFooterEmojiPicker},computeEmojiPickerPosition(){const e=this.$refs.emojiAnchor;if(!e)return;const t=e.getBoundingClientRect(),i=350,s=400,a=8;let n=t.left;n+i+a>window.innerWidth&&(n=Math.max(a,window.innerWidth-i-a));let o=t.top-s-a;o<a&&(o=t.bottom+a),this.footerEmojiPickerStyle={position:"fixed",top:o+"px",left:n+"px",zIndex:10002}},rememberCaret(){const e=document.activeElement,t=this.$refs.titleInput,i=this.$refs.postInput?.$refs?.newComment?.$el?.querySelector("textarea");t&&e===t?(this.lastFocusedField="title",this.lastCaretPos=t.selectionStart??(this.itemData.title||"").length):i&&e===i&&(this.lastFocusedField="content",this.lastCaretPos=i.selectionStart??(this.itemData.content||"").length)},rememberTitleCaret(){const e=this.$refs.titleInput;e&&(this.lastFocusedField="title",this.lastCaretPos=e.selectionStart??(this.itemData.title||"").length)},addEmojiToContent(e){const t="title"===this.lastFocusedField?"title":"content",i=this.itemData[t]?String(this.itemData[t]):"",s=Math.min(Math.max(this.lastCaretPos||0,0),i.length),a=i.slice(0,s)+e.i+i.slice(s);this.itemData[t]=a;const n=s+e.i.length;this.lastCaretPos=n,this.showFooterEmojiPicker=!1,this.$nextTick(()=>{if("title"===t&&this.$refs.titleInput)this.$refs.titleInput.focus(),this.$refs.titleInput.setSelectionRange(n,n);else{const e=this.$refs.postInput?.$refs?.newComment?.$el?.querySelector("textarea");e&&(e.focus(),e.setSelectionRange(n,n))}})},decodeHtmlEntities(e){if(!e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value},onDragToggle(){this.isDragging=!this.isDragging},onDropFiles(e){this.isDragging=!1;const t=Array.from(e.dataTransfer.files||[]);t.length&&this.$refs.mediaUpload&&this.$refs.mediaUpload.addExternalFiles(t,!1)},addEmoji(e){let t=this.itemData.title?this.itemData.title:"";this.itemData.title=t+e.i},onTitleChange(){this.$emit("title-changed",this.itemData.title)},async uploadMedia(e){await this.$refs.mediaUpload.uploadMedia(e)},confirmClose(){return!this.hasUnsavedChanges||window.confirm(this.$t("You have unsaved changes. Are you sure you want to leave?"))},closeModal(){this.confirmClose()&&(this.itemData.content=null,this.$store.state.newDiscussion={title:null,content:null},this.$store.state.isFormModalVisible=!1,this.$emit("close"))},handleEscapeCapture(e){"Escape"===e.key&&this.hasUnsavedChanges&&(e.stopPropagation(),e.preventDefault(),window.confirm(this.$t("You have unsaved changes. Are you sure you want to leave?"))&&(this.itemData.content=null,this.$store.state.newDiscussion={title:null,content:null},this.$store.state.isFormModalVisible=!1,this.$emit("close")))},handleOutsideClickCapture(e){if(!this.hasUnsavedChanges)return;const t=this.$el;if(!t)return;if(t.contains(e.target))return;const i=e.target.closest(".animation-content");i&&(e.stopPropagation(),e.preventDefault(),window.confirm(this.$t("You have unsaved changes. Are you sure you want to leave?"))&&(this.itemData.content=null,this.$store.state.newDiscussion={title:null,content:null},this.$store.state.isFormModalVisible=!1,this.$emit("close")))},focusContent(){this.$refs.postInput&&"function"===typeof this.$refs.postInput.focusInput&&this.$refs.postInput.focusInput()},focusTitle(){if(this.$refs.titleInput&&this.$refs.titleInput.focus&&(this.$refs.titleInput.focus(),"function"===typeof this.$refs.titleInput.setSelectionRange)){const e=(this.itemData.title||"").length;this.$refs.titleInput.setSelectionRange(e,e)}},handleSave(){this.$emit("save",this.itemData)}
1,setLoading(e){this.isSaving=e},setBypassDirtyCheck(e){this.bypassDirtyCheck=!!e},initItem(e){this.itemData={...this.itemData,...e},this.snapshotPristine()},snapshotPristine(){this.pristineData={title:this.itemData?.title?String(this.itemData.title).trim():"",content:this.itemData?.content?String(this.itemData.content).trim():""}}}},X=i(66262);const V=(0,X.A)(D,[["render",A],["__scopeId","data-v-8b4c2e2a"]]);var R=V},73139:function(e,t,i){"use strict";i.d(t,{A:function(){return ue}});var s=i(20641),a=i(90033);const n={class:"card p-5"},o={key:0,class:"buttons"},l={key:1,class:"bank-transfer-details"},r={class:"has-text-centered mb-5"},d={class:"has-text-weight-semibold is-size-4 mt-3"},c={key:0,class:"mb-5"},u={class:"has-text-weight-semibold mb-3"},m={class:"is-flex is-flex-direction-column",style:{gap:"0.5rem"}},p={key:0},h={class:"has-text-grey"},g={class:"has-text-weight-semibold ml-2"},f={key:1},b={class:"has-text-weight-semibold ml-2"},y={key:2},v={class:"has-text-grey"},k={class:"has-text-weight-semibold ml-2"},C={class:"has-text-centered"},L={key:1,class:"timeline"},w={key:0,class:"mt-5 mb-2",style:{"margin-top":"calc(1.5rem + 4px)"}},_={class:"notification is-warning is-light p-4",style:{"border-radius":"8px",border:"1px solid hsl(44, 100%, 77%)"}},E={class:"is-flex is-align-items-center is-justify-content-space-between is-flex-wrap-wrap",style:{gap:"1rem"}},$={class:"is-flex is-align-items-center",style:{gap:"0.75rem"}},F={class:"has-text-weight-semibold"},T={class:"is-size-7 has-text-grey-dark"},S={key:1,class:"is-flex is-flex-wrap-wrap my-5 ml-3",style:{gap:"0.5rem"}},A=["disabled"],P={class:"icon is-small"},I=["disabled"],M={class:"icon is-small"},x={key:2,class:"mb-5 mt-5"},N={class:"icon is-small"},U={key:0,class:"ml-3"},D={class:"icon is-small mr-1"},X=["disabled"],V={class:"icon is-small"},R={key:0,class:"ml-3"},O={class:"icon is-small mr-1"},Q={key:0,class:"timeline-marker",style:{background:"none",border:"0"}},B={key:1,class:"timeline-marker is-icon is-default"},G={key:2,class:"timeline-marker is-icon is-default"},W={key:3,class:"timeline-marker is-icon is-success"},j=["onClick"],z={key:0},q={key:0,class:"tag is-success opacity",style:{"margin-right":"8px"}},J={key:1},H={key:0,class:"tag is-default",style:{"margin-right":"8px"}},K={key:2},Y={class:"tag is-warning is-rounded"},Z={key:3},ee={class:"tag is-light is-rounded"},te={key:3,class:"timeline-item"},ie={class:"timeline-content"},se={key:4,style:{padding:"20px 0 0 60px"}};function ae(e,t,i,ae,ne,oe){const le=(0,s.g2)("StripeFeePayModal"),re=(0,s.g2)("b-loading"),de=(0,s.g2)("b-button"),ce=(0,s.g2)("b-modal"),ue=(0,s.g2)("font-awesome-icon"),me=(0,s.g2)("b-checkbox");return(0,s.uX)(),(0,s.CE)("section",null,[oe.hasFeeOnlinePayments&&ne.showPayModal?((0,s.uX)(),(0,s.Wv)(le,{key:0,payload:{productId:i.feeProduct.id,fees:ne.newPayment,userId:i.item.id},amount:oe.totalToPay,"choose-amount":oe.feeChooseAmount,currency:e.tenant.currency,"vat-rate":oe.feePriceForPay?oe.feePriceForPay.priceVatRate:null,"vat-exempt":!!oe.feePriceForPay&&!!oe.feePriceForPay.priceVatExempt,"copy-link":ne.copyLinkMode,onLoading:oe.setIsLoading,onPaid:oe.onFeePaid,onClose:oe.onPayModalClose},null,8,["payload","amount","choose-amount","currency","vat-rate","vat-exempt","copy-link","onLoading","onPaid","onClose"])):(0,s.Q3)("",!0),(0,s.bF)(ce,{id:"payment-method-modal",modelValue:ne.showPaymentMethodModal,"onUpdate:modelValue":t[3]||(t[3]=e=>ne.showPaymentMethodModal=e),"has-modal-card":"",onClose:oe.resetBankTransferDetails},{default:(0,s.k6)(()=>[(0,s.Lk)("div",n,[(0,s.bF)(re,{modelValue:ne.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>ne.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),ne.bankTransferSeries?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",o,[(0,s.bF)(de,{class:(0,a.C4)(["is-primary is-rounded mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:ne.isLoading,type:"button",size:"is-small",onClick:t[1]||(t[1]=e=>oe.proceedToCheckout(!1))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Pay now online")),1)]),_:1},8,["disabled","class"]),(0,s.bF)(de,{class:(0,a.C4)(["is-light is-rounded is-small mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:ne.isLoading,size:"is-small",type:"button",onClick:t[2]||(t[2]=e=>oe.proceedToCheckout(!0))},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Copy payment link")),1)]),_:1},8,["disabled","class"]),oe.isBankTransferAvailable?((0,s.uX)(),(0,s.Wv)(de,{key:0,class:(0,a.C4)(["is-light is-rounded is-small mr-2",{"is-fullwidth mb-2":e.$isMobile()}]),disabled:ne.isLoading,type:"button",size:"is-small",onClick:oe.bankTransferCheckout},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Bank transfer")),1)]),_:1},8,["disabled","class","onClick"])):(0,s.Q3)("",!0)])),ne.bankTransferSeries?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("div",r,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("Please include the following identifier in your bank transfer details:")),1),(0,s.Lk)("p",d,(0,a.v_)(ne.bankTransferSeries),1)]),ne.bankTransferBankingInfo?((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("p",u,(0,a.v_)(e.$t("Bank transfer details"))+":",1),(0,s.Lk)("div",m,[ne.bankTransferBankingInfo.accountHolder?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("span",h,(0,a.v_)(e.$t("Account holder"))+":",1),(0,s.Lk)("span",g,(0,a.v_)(ne.bankTransferBankingInfo.accountHolder),1)])):(0,s.Q3)("",!0),ne.bankTransferBankingInfo.iban?((0,s.uX)(),(0,s.CE)("div",f,[t[12]||(t[12]=(0,s.Lk)("span",{class:"has-text-grey"},"IBAN:",-1)),(0,s.Lk)("span",b,(0,a.v_)(ne.bankTransferBankingInfo.iban),1)])):(0,s.Q3)("",!0),ne.bankTransferAmount?((0,s.uX)(),(0,s.CE)("div",y,[(0,s.Lk)("span",v,(0,a.v_)(e.$t("Amount"))+":",1),(0,s.Lk)("span",k,(0,a.v_)(e.$filters.money(ne.bankTransferAmount)),1)])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),(0,s.Lk)("div",C,[(0,s.bF)(de,{class:"is-primary is-rounded",onClick:oe.closeBankTransferModal},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Done")),1)]),_:1},8,["onClick"])])])):(0,s.Q3)("",!0)])]),_:1},8,["modelValue","onClose"]),i.history?((0,s.uX)(),(0,s.CE)("div",L,[!i.item.membershipBankTransferInProgress||ne.payingNowOptions||ne.markingAsPaidMode?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",w,[(0,s.Lk)("div",_,[(0,s.Lk)("div",E,[(0,s.Lk)("div",$,[(0,s.bF)(ue,{icon:"fa-light fa-clock",class:"has-text-warning-dark is-size-5"}),(0,s.Lk)("div",null,[(0,s.Lk)("p",F,(0,a.v_)(e.$t("Pending bank transfer")),1),(0,s.Lk)("p",T,[(0,s.eW)((0,a.v_)(e.$t("Reference"))+": ",1),(0,s.Lk)("strong",null,(0,a.v_)(i.item.membershipBankTransferInProgress),1)])])]),(0,s.bF)(de,{type:"is-light",size:"is-small",class:"is-rounded",onClick:oe.showPendingBankTransferDetails},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Details")),1)]),_:1},8,["onClick"])])])])),ne.payingNowOptions||ne.markingAsPaidMode||!e.userTypeEligibleForFee(i.item)||i.item.membershipBankTransferInProgress?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",S,[(i.item.id===e.user.id||oe.externalPayForm||ne.canManageThisProfile)&&oe.hasFeeOnlinePayments&&!e.isNativeAppIos?((0,s.uX)(),(0,s.CE)("button",{key:0,disabled:ne.isLoading,class:"button is-primary is-rounded is-small",onClick:t[4]||(t[4]=e=>ne.payingNowOptions=!0)},[(0,s.Lk)("span",P,[(0,s.bF)(ue,{icon:"fa-light fa-credit-card"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("payNow")),1)],8,A)):(0,s.Q3)("",!0),oe.canMarkAsPaid&&oe.hasUnpaidPeriods?((0,s.uX)(),(0,s.CE)("button",{key:1,disabled:ne.isLoading,class:"button is-outlined is-primary is-rounded is-small",onClick:t[5]||(t[5]=e=>ne.markingAsPaidMode=!0)},[(0,s.Lk)("span",M,[(0,s.bF)(ue,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Mark as Paid")),1)],8,I)):(0,s.Q3)("",!0)])),e.userTypeEligibleForFee(i.item)&&!e.isNativeAppIos&&(ne.payingNowOptions||ne.markingAsPaidMode)?((0,s.uX)(),(0,s.CE)("section",x,[ne.payingNowOptions?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-primary is-rounded is-small ml-2",onClick:t[6]||(t[6]=(...e)=>oe.stripeCheckout&&oe.stripeCheckout(...e))},[(0,s.Lk)("span",N,[(0,s.bF)(ue,{icon:"fa-light fa-credit-card"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("payNow")),1),oe.totalToPay>0?((0,s.uX)(),(0,s.CE)("span",U,(0,a.v_)(e.$filters.money(oe.totalToPay)),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),ne.payingNowOptions?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-primary is-rounded is-outlined is-small ml-3",onClick:t[7]||(t[7]=(...e)=>oe.selectAllCheckboxes&&oe.selectAllCheckboxes(...e))},[(0,s.Lk)("span",D,[(0,s.bF)(ue,{icon:"fa-light fa-square-check"})]),(0,s.eW)(" "+(0,a.v_)(e.$t("Select all intervals")),1)])):(0,s.Q3)("",!0),ne.payingNowOptions?((0,s.uX)(),(0,s.CE)("button",{key:2,class:"button is-rounded is-small ml-3",onClick:t[8]||(t[8]=(...e)=>oe.cancelPaying&&oe.cancelPaying(...e))},(0,a.v_)(e.$t("cancel")),1)):(0,s.Q3)("",!0),ne.markingAsPaidMode?((0,s.uX)(),(0,s.CE)("button",{key:3,class:"button is-primary is-rounded is-small ml-2",disabled:0===oe.totalToPay||ne.isLoading,onClick:t[9]||(t[9]=(...e)=>oe.confirmMarkAsPaid&&oe.confirmMarkAsPaid(...e))},[(0,s.Lk)("span",V,[(0,s.bF)(ue,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Mark as Paid")),1),oe.totalToPay>0?((0,s.uX)(),(0,s.CE)("span",R,(0,a.v_)(e.$filters.money(oe.totalToPay)),1)):(0,s.Q3)("",!0)],8,X)):(0,s.Q3)("",!0),ne.markingAsPaidMode?((0,s.uX)(),(0,s.CE)("button",{key:4,class:"button is-primary is-rounded is-outlined is-small ml-3",onClick:t[10
1]||(t[10]=(...e)=>oe.selectAllCheckboxes&&oe.selectAllCheckboxes(...e))},[(0,s.Lk)("span",O,[(0,s.bF)(ue,{icon:"fa-light fa-square-check"})]),(0,s.eW)(" "+(0,a.v_)(e.$t("Select all intervals")),1)])):(0,s.Q3)("",!0),ne.markingAsPaidMode?((0,s.uX)(),(0,s.CE)("button",{key:5,class:"button is-rounded is-small ml-3",onClick:t[11]||(t[11]=(...e)=>oe.cancelMarkingAsPaid&&oe.cancelMarkingAsPaid(...e))},(0,a.v_)(e.$t("cancel")),1)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.history,t=>((0,s.uX)(),(0,s.CE)("div",{key:t.intervalId,class:"timeline-item"},[(ne.payingNowOptions||ne.markingAsPaidMode)&&t.unpaid&&t.unpaid>0?((0,s.uX)(),(0,s.CE)("div",Q,[(0,s.bF)(me,{modelValue:ne.newPayments[t.intervalId],"onUpdate:modelValue":e=>ne.newPayments[t.intervalId]=e},null,8,["modelValue","onUpdate:modelValue"])])):!ne.payingNowOptions&&!ne.markingAsPaidMode&&t.unpaid&&t.unpaid>0&&void 0===t.paid?((0,s.uX)(),(0,s.CE)("div",B)):!ne.payingNowOptions&&!ne.markingAsPaidMode&&t.unpaid&&t.unpaid>0?((0,s.uX)(),(0,s.CE)("div",G)):((0,s.uX)(),(0,s.CE)("div",W)),(0,s.Lk)("div",{class:"timeline-content fee-interval-title",onClick:e=>(ne.payingNowOptions||ne.markingAsPaidMode)&&oe.updateCheckboxValue(t.intervalId)},[(0,s.Lk)("p",null,[(0,s.Lk)("strong",null,(0,a.v_)(t.periodStartLabel)+" - "+(0,a.v_)(t.periodEndLabel),1)]),t.paid&&t.paid>0?((0,s.uX)(),(0,s.CE)("p",z,[(0,s.eW)((0,a.v_)(e.$t("paid"))+": "+(0,a.v_)(e.$filters.money(t.paid))+" "+(0,a.v_)(t.priceName)+" ",1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.intervals,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.intervalId},[e&&t.unpaid&&t.unpaid>0&&void 0===e.missing?((0,s.uX)(),(0,s.CE)("span",q,(0,a.v_)(e.periodStartLabel)+" - "+(0,a.v_)(e.periodEndLabel),1)):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0),t.unpaid&&t.unpaid>0&&e.userTypeEligibleForFee(i.item)?((0,s.uX)(),(0,s.CE)("p",J,[(0,s.eW)((0,a.v_)(e.$t("unpaid"))+": "+(0,a.v_)(e.$filters.money(t.unpaid))+" ",1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.intervals,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.intervalId},[e&&t.paid&&void 0!==e.missing?((0,s.uX)(),(0,s.CE)("span",H,(0,a.v_)(e.periodStartLabel)+" - "+(0,a.v_)(e.periodEndLabel),1)):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0),t.unpaid&&t.unpaid>0&&!e.userTypeEligibleForFee(i.item)?((0,s.uX)(),(0,s.CE)("p",K,[(0,s.Lk)("span",Y,(0,a.v_)(e.$t("not applying")),1)])):(0,s.Q3)("",!0),t.exempt?((0,s.uX)(),(0,s.CE)("p",Z,[(0,s.Lk)("span",ee,(0,a.v_)(e.$t("Exempt")),1)])):(0,s.Q3)("",!0)],8,j)]))),128)),i.item.dateJoinedFullMember?((0,s.uX)(),(0,s.CE)("div",te,[t[13]||(t[13]=(0,s.Lk)("div",{class:"timeline-marker is-icon is-info"},null,-1)),(0,s.Lk)("div",ie,[(0,s.Lk)("p",null,[(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.format(i.item.dateJoinedFullMember)),1)]),(0,s.Lk)("p",null,(0,a.v_)(e.$t("joining")),1)])])):(0,s.Q3)("",!0),i.displayPaid&&oe.allTimeTotalFeePaid>0?((0,s.uX)(),(0,s.CE)("div",se,[(0,s.Lk)("p",null,[(0,s.eW)((0,a.v_)(e.$t("All time paid"))+", ",1),(0,s.Lk)("strong",null,(0,a.v_)(e.$filters.money(oe.allTimeTotalFeePaid))+".",1)])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)])}i(18111),i(13579);var ne=i(40834),oe=i(36803),le=i(95256),re={props:["history","item","feeType","feeProduct","loadFeeHistory","displayPaid"],data(){return{StripeFeePayModal:oe.A,payingNowOptions:!1,markingAsPaidMode:!1,newPayments:{},newPayment:{},showPayModal:!1,showPaymentMethodModal:!1,isLoading:!1,canManageThisProfile:!1,copyLinkMode:!1,bankTransferSeries:null,bankTransferAmount:null,bankTransferBankingInfo:null,isNewBankTransfer:!1}},mounted(){this.canManageThisProfile=this.canManageProfileAsParent(this.item)},methods:{copyToClipboard:le.lW,setIsLoading(e){this.isLoading=e,this.$emit("loading",e)},updateCheckboxValue(e){if(this.newPayments.hasOwnProperty(e)){let t=this.newPayments[e];this.newPayments[e]=!t}else this.newPayments[e]=!0},selectAllCheckboxes(){for(let e of this.history)e.unpaid&&e.unpaid>0&&(this.newPayments[e.intervalId]=!0)},cancelPaying(){this.payingNowOptions=!1;for(let e of this.history)this.newPayments[e.intervalId]=!1},cancelMarkingAsPaid(){this.markingAsPaidMode=!1;for(let e of this.history)this.newPayments[e.intervalId]=!1},confirmMarkAsPaid(){this.$buefy.dialog.confirm({title:this.$t("Mark as Paid"),message:this.$t("Are you sure you want to mark the selected periods as paid?"),confirmText:this.$t("Confirm"),cancelText:this.$t("cancel"),type:"is-primary",onConfirm:()=>this.markAsPaid()})},markAsPaid(){const e={};for(let i of this.history)if(!0===this.newPayments[i.intervalId]&&i.unpaid&&i.unpaid>0){const t=`${this.item.id}:${i.intervalId}`;e[t]=i.unpaid}
1if(0===Object.keys(e).length)return void this.$buefy.toast.open({message:this.$t("Please select at least one unpaid period"),type:"is-danger"});this.isLoading=!0;const t={markAsPaid:!0,userId:this.item.id,fees:e,type:this.feeType,method:"check",productId:this.feeProduct.id,productPriceId:"tenant"===this.feeType?this.item.feeTenantProductPrice?.id:this.item.feeLocalProductPrice?.id};this.$http.plain.post("/fee_payments",t).then(()=>{this.$buefy.toast.open({message:this.$t("Periods marked as paid"),type:"is-success"}),this.markingAsPaidMode=!1;for(let e of this.history)this.newPayments[e.intervalId]=!1;this.loadFeeHistory&&this.loadFeeHistory(),this.$emit("reload")}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Error marking periods as paid"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},stripeCheckout(){let e=0,t=0;this.newPayment={};for(let r of this.history)void 0!==this.newPayments[r.intervalId]&&!0===this.newPayments[r.intervalId]&&(this.newPayment[this.item.id+":"+r.intervalId]=r.unpaid,e+=r.unpaid,t++);if(t++>12)return void this.$buefy.toast.open({message:this.$t("You can pay for maximum 12 intervals at a time."),type:"is-danger",duration:6e3});const i=this.tenant.settingFeatures.fees.minimumCyclesToPay;if(i&&i>1){let e=0;for(let i of this.history)i.unpaid&&i.unpaid>0&&e++;const t=Object.values(this.newPayment).length;if(t<i&&e>=i)return void this.$buefy.toast.open({message:this.$t("You must select at least {count} cycles to pay",{count:i}),type:"is-danger",duration:6e3})}let s=this.history.slice().reverse(),a=!1,n=!1,o=!1;for(let r of s)if(void 0!==this.newPayments[r.intervalId]&&!0===this.newPayments[r.intervalId]){if(o=!0,n){a=!0;break}}else 0===r.unpaid||void 0!==this.newPayments[r.intervalId]&&!1!==this.newPayments[r.intervalId]||(n=!0);let l=this.tenant.settingFeatures.fees.continuityMandatory;a&&l?this.$buefy.toast.open({message:this.$t("Your account has unpaid balances from previous fee periods"),type:"is-danger",duration:6e3}):e?this.showPaymentMethodModal=!0:this.$buefy.toast.open({message:this.$t("Please select fee period(s) for payment"),type:"is-danger"})},proceedToCheckout(e=!1){this.copyLinkMode=e,this.showPaymentMethodModal=!1,this.showPayModal=!0},onFeePaid(){this.$buefy.toast.open({message:this.$t("Card payment successful"),type:"is-success"}),this.payingNowOptions=!1;for(let e of this.history)this.newPayments[e.intervalId]=!1;this.reloadFeeHistoryWithPoll(3)},onPayModalClose(){this.showPayModal=!1,this.copyLinkMode=!1,this.loadFeeHistory&&this.loadFeeHistory(),this.$emit("reload")},reloadFeeHistoryWithPoll(e){this.loadFeeHistory&&this.loadFeeHistory(),this.$emit("reload"),e>0&&setTimeout(()=>this.reloadFeeHistoryWithPoll(e-1),2e3)},bankTransferCheckout(){this.isLoading=!0,this.$http.plain.post("/invoices/create-for-bank-transfer",{productId:this.feeProduct.id,fees:this.newPayment,userId:this.item.id}).then(e=>{this.bankTransferSeries=e.data.series,this.bankTransferAmount=e.data.amount,this.bankTransferBankingInfo=e.data.bankingInfo,this.isNewBankTransfer=!0,this.payingNowOptions=!1;for(let t of this.history)this.newPayments[t.intervalId]=!1}).catch(e=>{console.error(e),this.$buefy.toast.open({message:e.response?.data?.message||e.response?.data?.["hydra:description"]||this.$t("An error occurred while processing your request"),type:"is-danger",duration:5e3})}).finally(()=>{this.isLoading=!1})},resetBankTransferDetails(){this.bankTransferSeries=null,this.bankTransferAmount=null,this.bankTransferBankingInfo=null,this.isNewBankTransfer=!1},closeBankTransferModal(){const e=this.isNewBankTransfer;this.showPaymentMethodModal=!1,this.resetBankTransferDetails(),e&&(this.loadFeeHistory&&this.loadFeeHistory(),this.$emit("reload"))},showPendingBankTransferDetails(){this.bankTransferSeries=this.item.membershipBankTransferInProgress,this.bankTransferBankingInfo={accountHolder:this.tenant.legalName,iban:this.tenant.bankIbanNative},this.bankTransferAmount=null,this.isNewBankTransfer=!1,this.showPaymentMethodModal=!0}},computed:{...(0,ne.L8)(["user","userTypeEligibleForFee","isNativeAppIos","tenant","canManageProfileAsParent","isGranted"]),isBankTransferAvailable(){return this.tenant.settingFeatures.fees.enableMembershipPaymentsViaBankTransfer&&this.tenant.settingFeatures.invoices.isActive&&this.tenant.settingFeatures.invoices.productId}
1,canMarkAsPaid(){return!1!==this.tenant.settingFeatures.fees.allowMarkAsPaid&&("local"===this.feeType?this.isGranted("FINANCIAL_LOCAL",this.item.localCenter):this.isGranted("FINANCIAL_TENANT"))},hasUnpaidPeriods(){return this.history?.some(e=>e.unpaid&&e.unpaid>0)??!1},feePriceForPay(){return"tenant"===this.feeType?this.item?.feeTenantProductPrice:this.item?.feeLocalProductPrice},feeChooseAmount(){const e=this.feePriceForPay;return e?.isCustomAmount?{min:e.customMinPrice??null,max:e.customMaxPrice??null,suggested:e.price??null,suggestedAmounts:Array.isArray(e.suggestedAmounts)?e.suggestedAmounts:[],periods:Object.keys(this.newPayment).length||1,prompt:null}:null},totalToPay(){let e=0;for(let t of this.history)void 0!==this.newPayments[t.intervalId]&&!0===this.newPayments[t.intervalId]&&(e+=t.unpaid);return e},allTimeTotalFeePaid(){let e=0;for(let t of this.history)t.paid&&t.paid>0&&(e+=t.paid);return parseFloat(e.toFixed(2))},externalPayForm(){return["FeePay","FeePayByCardId"].includes(this.$route.name)},hasFeeOnlinePayments(){return this.tenant.settingFeatures.onlinePayments.isActive&&this.tenant.settingFeatures.onlinePayments.fees&&(this.tenant.settingFeatures.onlinePayments.allMembersFeeEligible||this.user&&this.user.localCenter&&this.user.localCenter.isOnlinePaymentFeeEligible)}},components:{StripeFeePayModal:oe.A}},de=i(66262);const ce=(0,de.A)(re,[["render",ae],["__scopeId","data-v-0c89389e"]]);var ue=ce},73432:function(e,t,i){"use strict";i.d(t,{A:function(){return Pe}});i(18111),i(20116);var s=i(20641),a=i(90033),n=i(53751);const o={class:"o-comment-wrap"},l=["value"],r={class:"columns is-mobile is-gapless"},d={class:"column is-narrow"},c={class:"column has-text-dark ml-1 mr-2"},u={class:"o-comment-text"},m={class:"level is-mobile mt-1 mb-2 contents-top"},p={class:"level-left"},h={key:0,class:"has-text-grey has-text-weight-normal"},g={key:1,class:"has-text-grey has-text-weight-normal"},f={class:"is-block is-size-7 has-text-grey"},b={class:"level-right"},y={class:"button is-small is-white p-2"},v={class:"icon is-small"},k={class:"icon-text"},C={class:"mr-2 is-small"},L={class:"icon-text"},w={class:"mr-2 is-small"},_={class:"icon-text"},E={class:"mr-2 is-small"},$={class:"icon-text"},F={class:"mr-2 is-small"},T={class:"icon-text"},S={class:"mr-2 is-small"},A={class:"icon-text"},P={class:"mr-2 is-small"},I={key:0,class:"mb-1"},M={key:0},x={key:0,class:"is-size-6"},N={key:1,class:"is-size-6"},U={class:"has-text-grey-light"},D={key:2,class:"o-discuss-gallery"},X={key:0,class:"o-gallery-item"},V=["src","onClick"],R={key:3},O={key:0},Q=["href"],B={key:1,class:"is-size-6"},G={key:1,class:"pb-3"},W={class:"mt-2 is-right"},j={class:"comment-actions-left"},z={key:0,class:"comment-action-link"},q={key:1,class:"comment-action-link is-active"},J={class:"reactionsButtonContainer ml-1 mr-1"},H=["onClick","onMouseover"],K={class:"icon"},Y={class:"icon is-small"},Z={class:"reaction-count-number mr-2"},ee={class:"comment-actions-right"},te={key:1,class:"comment-reply-count pl-1"},ie={key:2,class:"comment-reply-count pl-1"},se=["title"],ae={key:0,class:"comment-reply"},ne={class:"thread-collapse-dot-inline"},oe={class:"thread-collapsed-text"},le={class:"is-flex is-align-items-flex-start",style:{position:"relative"}},re={class:"o-comment-form is-flex-grow-1"},de={class:"o-comment-content",style:{position:"relative"}},ce={key:0,class:"reply-form-inline-icons is-hidden-mobile"},ue={class:"mobile-comment-actions is-hidden-tablet"},me=["disabled"],pe={key:0,class:"is-size-7 has-text-grey mt-1"},he={key:0,class:"reply-form-actions is-hidden-mobile"},ge={class:"reply-form-icons"},fe=["disabled"],be={key:0,class:"icon"},ye={key:1,class:"icon"};function ve(e,t,i,ve,ke,Ce){const Le=(0,s.g2)("LogoThumbnail"),we=(0,s.g2)("router-link"),_e=(0,s.g2)("font-awesome-icon"),Ee=(0,s.g2)("b-dropdown-item"),$e=(0,s.g2)("b-dropdown"),Fe=(0,s.g2)("OpenGraphLinkPreview"),Te=(0,s.g2)("PostInput"),Se=(0,s.g2)("CommentItem",!0),Ae=(0,s.g2)("MediaUpload"),Pe=(0,s.g2)("ReactionsModal"),Ie=(0,s.gN)("safe-html");return(0,s.uX)(),(0,s.CE)(s.FK,null,[(0,s.Lk)("div",o,[(0,s.Lk)("input",{type:"hidden",value:i.updatedCommentId},null,8,l),(0,s.Lk)("div",{class:(0,a.C4)(["o-comment-content",{"has-thread-line":i.comment.childrenCount>0&&void 0!==i.replies[i.comment.id]}])},[(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[((0,s.uX)(),(0,s.CE)("div",{key:"author_"+i.comment.id,class:"o-comment-author mt-2 mr-1"},[(0,s.bF)(we,{to:{name:"UserShow",params:{item:i.comment.owner.id}}},{default:(0,s.k6)(()=>[e.$isMobile()?((0,s.uX)(),(0,s.Wv)(Le,{key:0,item:i.comment.owner,"
1is-type":(i.depth||0)>=1?"roundXSmall":"roundSmall"},null,8,["item","is-type"])):((0,s.uX)(),(0,s.Wv)(Le,{key:1,item:i.comment.owner,"is-type":(i.depth||0)>=1?"roundSmaller":"roundXMedium"},null,8,["item","is-type"]))]),_:1},8,["to"])]))]),(0,s.Lk)("div",c,[(0,s.Lk)("div",u,[(0,s.Lk)("div",m,[(0,s.Lk)("div",p,[(0,s.Lk)("div",null,[(0,s.bF)(we,{class:"is-size-6-half has-text-dark title is-block mb-1",to:{name:"UserShow",params:{item:i.comment.owner.id}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(i.comment.owner.fullName)+" ",1),i.comment.owner&&(i.item.mainPost?.owner&&i.comment.owner.id===i.item.mainPost.owner.id||i.item.createdBy&&i.comment.owner.id===i.item.createdBy.id)?((0,s.uX)(),(0,s.CE)("span",h," ⢠"+(0,a.v_)(e.$t("Author")),1)):i.comment.owner.isModerator?((0,s.uX)(),(0,s.CE)("span",g," ⢠"+(0,a.v_)(e.$t("Moderator")),1)):(0,s.Q3)("",!0)]),_:1},8,["to"]),(0,s.Lk)("span",f,(0,a.v_)(e.$filters.formatDateCool(i.comment.dateCreated)),1)])]),(0,s.Lk)("div",b,[Ce.isCommentDeleted||i.comment.owner.id!==e.user.id&&!i.isModerator&&!i.canAdministerDiscussion?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)($e,{key:0,triggers:["click"],class:"ml-2","aria-role":"list",position:"is-bottom-left"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",y,[(0,s.Lk)("span",v,[(0,s.bF)(_e,{icon:"fa-light fa-ellipsis-v"})])])]),default:(0,s.k6)(()=>[i.comment.owner.id===e.user.id?((0,s.uX)(),(0,s.Wv)(Ee,{key:0,"aria-role":"listitem","is-clickable":"",onClick:Ce.editComment},{default:(0,s.k6)(()=>[(0,s.Lk)("span",k,[(0,s.Lk)("span",C,[(0,s.bF)(_e,{icon:"fa-light fa-pencil-alt"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("edit")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0),i.comment.owner.id===e.user.id||i.canAdministerDiscussion?((0,s.uX)(),(0,s.Wv)(Ee,{key:1,"aria-role":"listitem","is-clickable":"",onClick:t[0]||(t[0]=e=>
1Ce.removeComment(i.comment,i.index))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",L,[(0,s.Lk)("span",w,[(0,s.bF)(_e,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("remove")),1)])]),_:1})):(0,s.Q3)("",!0),i.isModerator&&!i.comment.moderated&&i.comment.owner.id!==e.user.id?((0,s.uX)(),(0,s.Wv)(Ee,{key:2,"aria-role":"listitem","is-clickable":"",onClick:t[1]||(t[1]=e=>i.moderatePost(i.comment,i.index,!1))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",_,[(0,s.Lk)("span",E,[(0,s.bF)(_e,{icon:"fa-light fa-ban"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Moderate")),1)])]),_:1})):(0,s.Q3)("",!0),i.isModerator&&i.comment.moderated?((0,s.uX)(),(0,s.Wv)(Ee,{key:3,"aria-role":"listitem","is-clickable":"",onClick:t[2]||(t[2]=e=>i.moderatePost(i.comment,i.index,!0))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",$,[(0,s.Lk)("span",F,[(0,s.bF)(_e,{icon:"fa-light fa-comment-arrow-up"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Remove moderation")),1)])]),_:1})):(0,s.Q3)("",!0),i.comment.moderated||i.comment.owner.id===e.user.id?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(Ee,{key:4,"aria-role":"listitem","is-clickable":"",onClick:t[3]||(t[3]=e=>Ce.reportPost(i.comment))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",T,[(0,s.Lk)("span",S,[(0,s.bF)(_e,{icon:"fa-light fa-comment-exclamation"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Report")),1)])]),_:1})),i.blockUser&&!i.item?.isIssue&&Ce.canBlock(i.comment.owner)?((0,s.uX)(),(0,s.Wv)(Ee,{key:5,"aria-role":"listitem","is-clickable":"",onClick:t[4]||(t[4]=e=>i.blockUser(i.comment.owner))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",A,[(0,s.Lk)("span",P,[(0,s.bF)(_e,{icon:"fa-light fa-user-slash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Block user")),1)])]),_:1})):(0,s.Q3)("",!0)]),_:1}))])]),ke.commentEditing?ke.commentEditing?((0,s.uX)(),(0,s.CE)("div",G,[(0,s.Lk)("div",null,[(0,s.bF)(Te,{ref:"editPostInput","new-comment":ke.editingComment,discussion:i.item,project:i.project,"is-comment":!0,placeholder:e.$t("Edit comment"),rows:3,onMentionsChanged:t[6]||(t[6]=e=>ke.editMentions=e),onContactMentionsChanged:t[7]||(t[7]=e=>ke.editContactMentions=e)},null,8,["new-comment","discussion","project","placeholder"])]),(0,s.Lk)("div",W,[(0,s.Lk)("button",{class:"button is-primary is-small is-rounded mr-2",onClick:t[8]||(t[8]=(...e)=>Ce.saveEditingComment&&Ce.saveEditingComment(...e))},(0,a.v_)(e.$t("save")),1),(0,s.Lk)("button",{class:"button is-light is-small is-rounded",onClick:t[9]||(t[9]=(...e)=>Ce.cancelEditingComment&&Ce.cancelEditingComment(...e))},(0,a.v_)(e.$t("cancel")),1)])])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",I,[i.comment.moderated?((0,s.uX)(),(0,s.CE)("div",B,[(0,s.Lk)("em",null,(0,a.v_)(e.$t("Moderated comment")),1)])):((0,s.uX)(),(0,s.CE)("section",M,[i.comment.content&&!Ce.isCommentDeleted?((0,s.uX)(),(0,s.CE)("div",x,[(0,s.bo)((0,s.Lk)("div",{onClick:t[5]||(t[5]=(...e)=>Ce.handleMentionClick&&Ce.handleMentionClick(...e))},null,512),[[Ie,Ce.renderedContent]]),i.comment.embedOpenGraph?((0,s.uX)(),(0,s.Wv)(Fe,{key:0,embed:i.comment.embedOpenGraph.openGraph,"is-comment":!0},null,8,["embed"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),Ce.isCommentDeleted?((0,s.uX)(),(0,s.CE)("div",N,[(0,s.Lk)("em",U,(0,a.v_)(e.$t("this message was deleted")),1)])):(0,s.Q3)("",!0),i.comment.medias.length>0&&i.comment.medias.find(e=>"postimage"===e.type)?((0,s.uX)(),(0,s.CE)("div",D,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.comment.medias,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},["postimage"===e.type?((0,s.uX)(),(0,s.CE)("figure",X,[(0,s.Lk)("img",{src:Ce.mediaSrc(e),onClick:e=>i.openGallery(t,i.comment)},null,8,V)])):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0),i.comment.medias.length>0?((0,s.uX)(),(0,s.CE)("div",R,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.comment.medias,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},["postfile"===e.type?((0,s.uX)(),(0,s.CE)("p",O,[(0,s.Lk)("a",{href:Ce.mediaSrc(e),target:"_blank"},(0,a.v_)(e.originalName),9,Q)])):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0)]))]))]),i.comment.moderated||Ce.isCommentDeleted?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)([{"mb-0":!e.$isMobile(),"mb-2":e.$isMobile()},"comment-actions-inline mt-1"])},[(0,s.Lk)("div",j,[i.reactions&&Object.keys(i.reactions).length>0?((0,s.uX)(),(0,s.Wv)($e,{key:0,triggers:["hover"],"aria-role":"list",position:"is-top-right",class:"reactionPopup"},{trigger:(0,s.k6)(()=>[0===i.comment.myReactions.length?((0,s.uX)(),(0,s.CE)("span",z,(0,a.v_)(e.$t("Like")),1)):((0,s.uX)(),(0,s.CE)("span",q,(0,a.v_)(e.$t("Liked")),1
1))]),default:(0,s.k6)(()=>[(0,s.Lk)("div",J,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.reactions,n=>((0,s.uX)(),(0,s.CE)("span",{key:"cc_"+n.id,class:(0,a.C4)(["reactionButtonAnimated",[i.comment.myReactions.includes(n.id)?"myReaction":"",`reaction-${n.id}`]]),onClick:e=>i.reactToComment(i.comment,n),onMouseover:t=>ke.tooltipReactionButton=e.$t(n.title),onMouseout:t[10]||(t[10]=t=>ke.tooltipReactionButton=e.$t("pickYourReaction"))},[(0,s.Lk)("span",K,[((0,s.uX)(),(0,s.Wv)(_e,{key:"ccr_"+n.id,icon:n.icon},null,8,["icon"]))])],42,H))),128))])]),_:1})):(0,s.Q3)("",!0),i.reactionsTotal(i.comment)>0?((0,s.uX)(),(0,s.CE)("span",{key:1,class:"comment-reactions-inline",onClick:t[11]||(t[11]=e=>Ce.openReactionsModal(i.comment))},[t[45]||(t[45]=(0,s.Lk)("span",{class:"separator-dot"},"·",-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.reactions,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"c_"+e.id},[i.comment.reactionData[e.id]&&i.comment.reactionData[e.id]>0?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["reactionButton reactionButtonComment",[i.comment.myReactions.includes(e.id)?"myReaction":"","reaction-"+e.id]])},[(0,s.Lk)("span",Y,[((0,s.uX)(),(0,s.Wv)(_e,{key:"cc_r_"+e.id,icon:e.icon},null,8,["icon"]))])],2)):(0,s.Q3)("",!0)],64))),128)),(0,s.Lk)("span",Z,(0,a.v_)(i.reactionsTotal(i.comment)),1)])):(0,s.Q3)("",!0)]),t[47]||(t[47]=(0,s.Lk)("span",{class:"separator-pipe"},"|",-1)),(0,s.Lk)("div",ee,[i.item.isReadOnly?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",{key:0,class:"comment-action-link",onClick:t[12]||(t[12]=t=>e.$emit("changedReplyParent",i.comment.id))},(0,a.v_)(e.$t("Reply comment")),1)),i.comment.childrenCount>0&&!e.$isMobile()?((0,s.uX)(),(0,s.CE)("span",te,[t[46]||(t[46]=(0,s.Lk)("span",{class:"separator-dot"},"·",-1)),(0,s.eW)(" "+(0,a.v_)(i.comment.childrenCount)+" "+(0,a.v_)(e.$t("replies")),1)])):i.comment.childrenCount>0&&e.$isMobile()?((0,s.uX)(),(0,s.CE)("span",ie,(0,a.v_)(i.comment.childrenCount),1)):(0,s.Q3)("",!0)])],2))])]),i.comment.childrenCount>0&&void 0!==i.replies[i.comment.id]?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["comment-replies","reply-depth-"+Math.min((i.depth||0)+1,2)])},[ke.isThreadCollapsed?((0,s.uX)(),(0,s.CE)("div",{key:1,class:"thread-collapsed-row",onClick:t[19]||(t[19]=e=>ke.isThreadCollapsed=!1)},[(0,s.Lk)("span",ne,[(0,s.bF)(_e,{icon:"fa-light fa-plus",class:"thread-collapse-icon"})]),(0,s.Lk)("span",oe,(0,a.v_)(i.replies[i.comment.id].length)+" "+(0,a.v_)(e.$t("replies")),1)])):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("span",{class:"thread-collapse-dot",title:e.$t("Collapse thread"),onClick:t[13]||(t[13]=e=>ke.isThreadCollapsed=!0)},[(0,s.bF)(_e,{icon:"fa-light fa-minus",class:"thread-collapse-icon"})],8,se),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.replies[i.comment.id],(a,n)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:a?a.id:"reply-"+n},[a?((0,s.uX)(),(0,s.CE)("div",ae,[((0,s.uX)(),(0,s.Wv)(Se,{ref_for:!0,ref:"comment_"+a.id,key:"comment_"+a.id,depth:(i.depth||0)+1,"parent-owner-name":i.comment.owner?i.comment.owner.fullName||i.comment.owner.firstName:null,"updated-comment-id":i.updatedCommentId,"reactions-total":i.reactionsTotal,"moderate-post":i.moderatePost,"block-user":i.blockUser,"comment-saved":i.commentSaved,"react-to-comment":i.reactToComment,"load-replies":i.loadReplies,"new-comment":i.newComment,"is-moderator":i.isModerator,"can-administer-discussion":i.canAdministerDiscussion,"open-gallery":i.openGallery,"is-saving-comment":i.isSavingComment,item:i.item,project:i.project,"reply-parent-id":i.replyParentId,reactions:i.reactions,comment:a,index:n,replies:i.replies,onChangedReplyParent:t[14]||(t[14]=t=>e.$emit("changedReplyParent",t)),onRemoved:e=>Ce.removedReply(i.comment,n),onRemovedReply:t[15]||(t[15]=t=>e.$emit("removedReply",t)),onReplySaved:t[16]||(t[16]=t=>e.$emit("reply-saved",t)),onMentionClicked:t[17]||(t[17]=t=>e.$emit("mention-clicked",t)),onContactMentionClicked:t[18]||(t[18]=t=>e.$emit("contact-mention-clicked",t))},null,8,["depth","parent-owner-name","updated-comment-id","reactions-total","moderate-post","block-user","comment-saved","react-to-comment","load-replies","new-comment","is-moderator","can-administer-discussion","open-gallery","is-saving-comment","item","project","reply-parent-id","reactions","comment","index","replies","onRemoved"]))])):(0,s.Q3)("",!0)],64))),128))],64))],2)):(0,s.Q3)("",!0),(0,s.bF)(n.eB,{name:"slide-reply"},{default:(0,s.k6)(()=>
1[i.replyParentId!==i.comment.id||i.comment.isModerated||i.item.isReadOnly?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["o-comment-addnew reply-inline-form",{"reply-expanded":Ce.isReplyExpanded}]),onDragover:t[40]||(t[40]=(0,n.D$)(()=>{},["prevent"])),onDragenter:t[41]||(t[41]=(0,n.D$)((...e)=>Ce.onDragToggle&&Ce.onDragToggle(...e),["prevent"])),onDragleave:t[42]||(t[42]=(0,n.D$)((...e)=>Ce.onDragToggle&&Ce.onDragToggle(...e),["prevent"])),onDrop:t[43]||(t[43]=(0,n.D$)((...e)=>Ce.onDropFiles&&Ce.onDropFiles(...e),["prevent"]))},[(0,s.Lk)("div",le,[(0,s.bF)(Le,{class:"o-comment-author mr-2 mt-1 is-hidden-mobile",item:e.user,"is-type":"roundSmaller"},null,8,["item"]),(0,s.Lk)("div",re,[(0,s.Lk)("div",de,[(0,s.bF)(Te,{ref:"postInput","new-comment":ke.localNewComment,discussion:i.item,project:i.project,"is-comment":!0,placeholder:Ce.mobileReplyPlaceholder,saved:i.commentSaved,"focus-on-mount":!0,"is-reply":!1,rows:1,"hide-emoji":!0,onFocus:t[20]||(t[20]=e=>ke.isReplyFocused=!0),onBlur:Ce.onReplyBlur,onMentionsChanged:t[21]||(t[21]=e=>ke.replyMentions=e)},null,8,["new-comment","discussion","project","placeholder","saved","onBlur"]),(0,s.bF)(n.eB,{name:"fade-icons"},{default:(0,s.k6)(()=>[Ce.isReplyExpanded?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ce,[(0,s.Lk)("span",{class:"icon is-clickable",onMousedown:t[22]||(t[22]=(0,n.D$)(()=>{},["prevent"])),onClick:t[23]||(t[23]=t=>e.$refs.postInput.toggleEmojiPicker("right"))},[(0,s.bF)(_e,{icon:"fal fa-smile"})],32),(0,s.Lk)("span",{class:"icon is-clickable",onMousedown:t[24]||(t[24]=(0,n.D$)(()=>{},["prevent"])),onClick:t[25]||(t[25]=t=>e.$refs.mediaUpload.triggerPhotoUpload())},[(0,s.bF)(_e,{icon:"fa-light fa-image"})],32),(0,s.Lk)("span",{class:"icon is-clickable",onMousedown:t[26]||(t[26]=(0,n.D$)(()=>{}
1,["prevent"])),onClick:t[27]||(t[27]=t=>e.$refs.mediaUpload.triggerFileUpload())},[(0,s.bF)(_e,{icon:"fa-light fa-folder"})],32)]))]),_:1}),(0,s.Lk)("div",ue,[ke.localNewComment.content.length>0||ke.isSavingReply?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"mobile-send-btn",disabled:ke.isSavingReply,onClick:t[28]||(t[28]=(...e)=>Ce.saveReply&&Ce.saveReply(...e))},[ke.isSavingReply?((0,s.uX)(),(0,s.Wv)(_e,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(_e,{key:1,icon:"fa-light fa-paper-plane-top"}))],8,me)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("span",{class:"mobile-comment-icon",onMousedown:t[29]||(t[29]=(0,n.D$)(()=>{},["prevent"])),onClick:t[30]||(t[30]=t=>e.$refs.mediaUpload.triggerPhotoUpload())},[(0,s.bF)(_e,{icon:"fa-light fa-image"})],32),(0,s.Lk)("span",{class:"mobile-comment-icon",onMousedown:t[31]||(t[31]=(0,n.D$)(()=>{},["prevent"])),onClick:t[32]||(t[32]=t=>e.$refs.postInput.triggerMention())},[(0,s.bF)(_e,{icon:"fa-light fa-at"})],32)],64))]),ke.someoneIsTyping?((0,s.uX)(),(0,s.CE)("div",pe,(0,a.v_)(ke.someoneIsTyping)+" "+(0,a.v_)(e.$t("isWriting"))+" ... ",1)):(0,s.Q3)("",!0)]),(0,s.bF)(n.eB,{name:"slide-actions"},{default:(0,s.k6)(()=>[Ce.isReplyExpanded?((0,s.uX)(),(0,s.CE)("div",he,[(0,s.Lk)("div",ge,[(0,s.Lk)("span",{class:"icon is-clickable",onMousedown:t[33]||(t[33]=(0,n.D$)(()=>{},["prevent"])),onClick:t[34]||(t[34]=t=>e.$refs.postInput.toggleEmojiPicker("left"))},[(0,s.bF)(_e,{icon:"fal fa-smile"})],32),(0,s.Lk)("span",{class:"icon is-clickable",onMousedown:t[35]||(t[35]=(0,n.D$)(()=>{},["prevent"])),onClick:t[36]||(t[36]=t=>e.$refs.mediaUpload.triggerPhotoUpload())},[(0,s.bF)(_e,{icon:"fa-light fa-image"})],32),(0,s.Lk)("span",{class:"icon is-clickable",onMousedown:t[37]||(t[37]=(0,n.D$)(()=>{},["prevent"])),onClick:t[38]||(t[38]=t=>e.$refs.mediaUpload.triggerFileUpload())},[(0,s.bF)(_e,{icon:"fa-light fa-folder"})],32)])])):(0,s.Q3)("",!0)]),_:1}),(0,s.bF)(Ae,{ref:"mediaUpload",photos:ke.photos,videos:ke.videos,files:ke.files,item:i.item,medias:ke.medias,"is-comment":!0,"is-dragging":ke.isDragging,"hide-buttons":!0,"onUpdate:modelValue":Ce.handleMediaUpload},null,8,["photos","videos","files","item","medias","is-dragging","onUpdate:modelValue"]),ke.localNewComment.content.length>0||ke.medias.length>0||ke.isSavingReply?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"comment-form-send-bottom is-hidden-mobile",disabled:ke.isSavingReply,type:"submit",onClick:t[39]||(t[39]=(...e)=>Ce.saveReply&&Ce.saveReply(...e))},[ke.isSavingReply?((0,s.uX)(),(0,s.CE)("span",be,[(0,s.bF)(_e,{icon:"fa-light fa-spinner-third",spin:""})])):((0,s.uX)(),(0,s.CE)("span",ye,[(0,s.bF)(_e,{icon:"fa-light fa-paper-plane-top"})]))],8,fe)):(0,s.Q3)("",!0)])])],34))]),_:1})],2)]),(0,s.bF)(Pe,{"is-active":ke.isReactionsModalActive,reactions:i.reactions,"reaction-data":ke.reactionsData,"onUpdate:isActive":t[44]||(t[44]=e=>ke.isReactionsModalActive=e)},null,8,["is-active","reactions","reaction-data"])],64)}i(44114),i(61701);var ke=i(40834),Ce=i(95256),Le=i(31823),we=i(53755),_e=i(63520),Ee=i(86827),$e=i(76675),Fe=i(60770),Te={name:"CommentItem",props:["depth","parentOwnerName","updatedCommentId","comment","newComment","replies","index","item","project","replyParentId","isModerator","canAdministerDiscussion","reactions","moderatePost","blockUser","loadReplies","commentCancel","commentSaved","reactionsTotal","isSavingComment","openGallery","reactToComment"],emits:["changedReplyParent","removed","removedReply","replyUploadMedia","mention-clicked","contact-mention-clicked","reply-saved"],data(){return{update:!1,commentEditing:null,editingComment:{content:""},editMentions:[],existingEditMentions:[],editContactMentions:[],existingEditContactMentions:[],uploadedMedia:[],photos:[],videos:[],medias:[],files:[],someoneIsTyping:null,isSavingReply:!1,isThreadCollapsed:!1,isReplyFocused:!1,isDragging:!1,tooltipReactionButton:this.$t("pickYourReaction"),reactionsData:{},isReactionsModalActive:!1,localNewComment:{content:"",postType:"text"},replyMentions:[]}},watch:{commentSaved:function(){this.uploadedMedia=[],this.photos=[],this.videos=[],this.files=[],this.medias=[],this.replyMentions=[]}},mounted(){this.comment?.childrenCount&&void 0===this.replies[this.comment.id]&&this.loadReplies(this.comment.id)},methods:{mediaSrc:Ce.F9,nl2br:Ce.HA,onReplyBlur(){setTimeout(()=>{this.isReplyFocused=!1},80)},handleMentionClick(e){const t=e.target.closest(".mention-link[data-user-id]");if(t){e.preventDefault();const i=t.dataset.userId;return void(i&&this.$emit("mention-clicked",parseInt(i)))}const i=e.target.closest(".mention-link[data-contact-id]");if(i){e.preventDefault();const t=i.dataset.contactId;t&&this.$emit("contact-mention-clicked",parseInt(t))}},onDragToggle(){this.isDragging=!this.isDragging},onDropFiles(e){this.onDragToggle();const t=Array.from(e.dataTransfer.files||[]);t.length&&this.$refs.mediaUpload&&this.$refs.mediaUpload.addExternalFiles(t,!0)},handleMediaUpload(e){this.uploadedMedia=e},editComment(){this.commentEditing=!0;let e=this.comment.content||"";e=e.replace(/@/g,"@"),this.editingComment.content=e,this.existingEditMentions=(this.comment.mentions||[]).map(e=>e.id),this.editMentions=[],this.existingEditContactMentions=(this.comment.contactMentions||[]).map(e=>e.id),this.editContactMentions=[]},cancelEditingComment(){this.editingComment.content="",this.commentEditing=!1,this.editMentions=[],this.existingEditMentions=[],this.editContactMentions=[],this.existingEditContactMentions=[]},saveEditingComment(){let e=this.comment.content,t=this.comment.mentions;this.commentEditing=!1,this.comment.content=this.editingComment.content;const i=[...this.existingEditMentions];for(const n of this.editMentions)i.includes(n)||i.push(n);const s=this.comment.contactMentions,a=[...this.existingEditContactMentions];for(const n of this.editContactMentions)a.includes(n)||a.push(n);this.$http.plain.patch("/posts/"+this.comment.id,{content:this.comment.content,mentions:i,contactMentions:a,embedOpenGraph:this.comment?.embedOpenGraph?.["@id"]}
1).then(e=>{this.$buefy.snackbar.open({message:this.$t("Comment updated successfully")}),e.data.mentions&&(this.comment.mentions=e.data.mentions),e.data.contactMentions&&(this.comment.contactMentions=e.data.contactMentions)}).catch(i=>{this.comment.content=e,this.comment.mentions=t,this.comment.contactMentions=s,console.error(i)}).finally(()=>{this.editingComment.content="",this.editMentions=[],this.existingEditMentions=[],this.editContactMentions=[],this.existingEditContactMentions=[]})},canBlock(e){return(0,Ce.cm)(e,this.user)},reportPost(e){this.isLoading=!0,this.$http.plain.patch("/posts/"+e.id+"/report",{}).then(e=>{this.$buefy.toast.open({message:this.$t("Post content was reported to the group administrator."),duration:6e3,type:"is-success"})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},removeComment(e){this.isLoading=!0,this.$http.plain.delete("/posts/"+e.id).then(t=>{t.data&&t.data.isDeleted?(e.isDeleted=!0,e.content=null,e.medias=[],e.embedOpenGraph=null):this.$emit("removed")}).catch(e=>{console.error(e),this.$buefy.toast.open({message:e?.response?.data?.detail||this.$t("Failed to delete"),type:"is-danger"})}).finally(()=>{this.isLoading=!1})},removedReply(e,t){this.$emit("removedReply",{parentId:e.id,index:t})},saveReply(){if(this.isSavingReply)return;this.isSavingReply=!0;const e={};e.content=this.localNewComment.content,e.parent=this.comment.id,this.item?.uuid||(e.discussion=this.item.id),e.mentions=this.$refs.postInput?this.$refs.postInput.getMentions():[],e.contactMentions=this.$refs.postInput?this.$refs.postInput.getContactMentions():[],Promise.resolve().then(()=>this.$refs.mediaUpload?this.$refs.mediaUpload.uploadMedia("postimage"):null).then(()=>this.$refs.mediaUpload?this.$refs.mediaUpload.uploadMedia("postvideo"):null).then(()=>this.$refs.mediaUpload?this.$refs.mediaUpload.uploadMedia("postfile"):null).then(()=>{if(e.uploadedMedia=this.$refs.mediaUpload?.uploadedMedia||[],e.medias=this.medias||[],e.content||e.uploadedMedia.length>0||e.medias.length>0){const t=this.item?.uuid?"/tasks/"+this.item.uuid+"/comments/reply":"/post-reply";return this.$http.plain.post(t,e)}return null}).then(e=>{e&&(this.localNewComment.content="",this.$refs.mediaUpload&&(this.$refs.mediaUpload.photos=[],this.$refs.mediaUpload.videos=[],this.$refs.mediaUpload.files=[],this.$refs.mediaUpload.uploadedMedia=[],this.$refs.mediaUpload.removedMedia=[]),this.medias=[],this.replyMentions=[],this.$emit("reply-saved",{parentId:this.comment.id,reply:e.data}))}).catch(e=>{console.error(e)}).finally(()=>{this.isSavingReply=!1})},getPostsReactions(e){this.isLoading=!0,this.$http.plain.get("/posts/get_reactions_list/"+e).then(e=>{this.reactionsData=e.data}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},openReactionsModal(e){this.getPostsReactions(e.id),this.isReactionsModalActive=!0}},computed:{...(0,ke.L8)(["user","tenant"]),mobileReplyPlaceholder(){return this.$isMobile()&&this.user?this.$t("Reply"):this.$t("Reply to")+" "+(this.comment.owner?this.comment.owner.firstName:"")+"..."},isReplyExpanded(){return this.isReplyFocused||this.localNewComment.content&&this.localNewComment.content.length>0},isCommentDeleted(){return this.comment.deleted||this.comment.isDeleted},isReply(){return(this.depth||0)>0},renderedContent(){if(!this.comment.content)return"";let e=(0,Ce.YQ)(this.comment.content,this.comment.mentions,this.comment.contactMentions);return e=(0,Ce.JP)(e),this.nl2br(e)}},components:{ReactionsModal:Fe.A,LogoThumbnail:Le.A,OpenGraphLinkPreview:we.A,PostInput:_e.A,MediaUpload:Ee.A,Gallery:$e.A}},Se=i(66262);const Ae=(0,Se.A)(Te,[["render",ve],["__scopeId","data-v-840f5ee0"]]);var Pe=Ae},74410:function(e,t,i){"use strict";i.d(t,{A:function(){return L}});var s=i(20641),a=i(90033);const n={class:"registration-status-box"},o={class:"registration-status-icon"},l={class:"registration-status-text"},r={key:1,class:"invited-actions mt-4"},d={class:"buttons is-centered"},c=["disabled"],u={class:"icon"},m=["disabled"],p={class:"icon"},h={key:2,class:"has-text-centered mt-4 p-4 registration-qr-container"},g={class:"is-size-7 has-text-grey mt-2"};function f(e,t,i,f,b,y){const v=(0,s.g2)("font-awesome-icon"),k=(0,s.g2)("qrcode-vue");return(0,s.uX)(),(0,s.CE)("div",n,[i.isAttending&&y.statusRegistration?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["registration-current-status",y.registrationStatusClass])},[(0,s.Lk)("span",o,[(0,s.bF)(v,{icon:y.registrationStatusIcon},null,8,["icon"])]),(0,s.Lk)("span",l,(0,a.v_)(y.registrationStatusText),1)],2)):(0,s.Q3)("",!0),"invited"===y.statusRegistration?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("div",d,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded",{"is-loading":b.isAccepting}]),disabled:b.isAccepting||b.isDeclining,onClick:t[0]||(t[0]=(...e)=>y.acceptInvitation&&y.acceptInvitation(...e))},[(0,s.Lk)("span",u,[(0,s.bF)(v,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Accept")),1)],10,c),(0,s.Lk)("button",{class:(0,a.C4)(["button is-light is-rounded",{"is-loading":b.isDeclining}]),disabled:b.isAccepting||b.isDeclining,onClick:t[1]||(t[1]=(...e)=>y.declineInvitation&&y.declineInvitation(...e))},[(0,s.Lk)("span",p,[(0,s.bF)(v,{icon:"fa-light fa-times"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Decline")),1)],10,m)])])):(0,s.Q3)("",!0),"success"===y.statusRegistration&&i.ticketQrCodeUrl?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.bF)(k,{value:i.ticketQrCodeUrl,size:180,level:"H","render-as":"svg",class:"qr-code-svg"},null,8,["value"]),(0,s.Lk)("p",g,(0,a.v_)(e.$t("Show this QR code at the entrance")),1)])):(0,s.Q3)("",!0)])}var b=i(61273),y=i(67944),v={name:"EventRegistrationStatusBox",components:{FontAwesomeIcon:b.gc,QrcodeVue:y.Ay},props:{isAttending:{type:Object,default:null},ticketQrCodeUrl:{type:String,default:null},eventLocation:{type:String,default:null}},emits:["accept-invitation","decline-invitation"],data(){return{isAccepting:!1,isDeclining:!1}},computed:{statusRegistration(){return this.isAttending?.statusRegistration?this.isAttending.statusRegistration:this.isAttending?.productPayment?"success":null},registrationStatusClass(){const e=this.statusRegistration;return"success"===e?"is-registration-success":"pending_approval"===e?"is-registration-pending":"waiting_list"===e?"is-registration-waiting":"invited"===e?"is-registration-invited":"awaiting_invoice_payment"===e?"is-registration-pending":"canceled"===e?"is-registration-canceled":"is-registration-default"},registrationStatusIcon(){const e=this.statusRegistration;return"success"===e?"fa-light fa-circle-check":"pending_approval"===e?"fa-light fa-clock":"waiting_list"===e?"fa-light fa-list-ol":"invited"===e?"fa-light fa-envelope":"awaiting_invoice_payment"===e?"fa-light fa-file-invoice":"canceled"===e?"fa-light fa-circle-xmark":"fa-light fa-file-lines"},registrationStatusText(){const e=this.statusRegistration;return"success"===e?this.$t("Registration confirmed"):"pending_approval"===e?this.$t("Pending approval"):"waiting_list"===e?this.$t("On waiting list"):"invited"===e?this.$t("Invited"):"awaiting_invoice_payment"===e?this.$t("Awaiting invoice payment"):"canceled"===e?this.$t("Registration canceled"):this.$t("Registration status unknown")}},methods:{acceptInvitation(){console.log("acceptInvitation called"),this.isAccepting=!0,this.$emit("accept-invitation")},declineInvitation(){console.log("declineInvitation called"),this.isDeclining=!0,this.$emit("decline-invitation")},resetLoadingStates(){this.isAccepting=!1,this.isDeclining=!1}}},k=i(66262);const C=(0,k.A)(v,[["render",f],["__scopeId","data-v-d6489b5e"]]);var L=C},74581:function(e,t,i){"use strict";i.d(t,{A:function(){return X}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"theme-picker"},l={class:"is-size-7 has-text-grey mb-5"},r={class:"has-text-weight-semibold mb-3"},d={class:"theme-preset-grid"},c=["title","onClick"],u={class:"theme-swatch-check"},m={class:"theme-swatch-name"},p={class:"has-text-weight-semibold mb-2 mt-5"},h={class:"theme-hue-block"},g={class:"hue-slider-labels"},f={class:"hue-value"},b={class:"is-size-7 has-text-grey mb-3"},y={class:"theme-preset-grid"},v=["title","onClick"],k={class:"theme-swatch-check"},C={class:"theme-swatch-name"},L={class:"has-text-weight-semibold mb-2 mt-5"},w={class:"theme-hue-block"},_={class:"hue-slider-labels"},E={class:"hue-value"},$={class:"theme-actions mt-5"};
1function F(e,t,i,F,T,S){const A=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("p",l,(0,a.v_)(e.$t("Choose a chrome color for sidebar, header, and surfaces. The primary brand color stays unchanged.")),1),S.isDarkMode?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("p",r,(0,a.v_)(e.$t("Light menu")),1),(0,s.Lk)("div",d,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(S.lightSwatches,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.name,class:(0,a.C4)(["theme-swatch",{"is-active":T.activePreset===e.name,"is-org":e.isOrg}]),title:e.title,onClick:t=>S.applyPreset(e.name)},[(0,s.Lk)("span",{class:"theme-swatch-half theme-swatch-sidebar",style:(0,a.Tr)({background:e.sidebar})},null,4),(0,s.Lk)("span",{class:"theme-swatch-half theme-swatch-content",style:(0,a.Tr)({background:e.content})},null,4),(0,s.Lk)("span",u,[(0,s.bF)(A,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",m,(0,a.v_)(e.title),1)],10,c))),128))]),(0,s.Lk)("p",p,(0,a.v_)(e.$t("Or set a custom hue")),1),(0,s.Lk)("div",h,[(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>T.customHue=e),type:"range",min:"0",max:"360",step:"1",class:"hue-slider",onInput:t[1]||(t[1]=(...e)=>S.applyCustomHue&&S.applyCustomHue(...e))},null,544),[[n.Jo,T.customHue,void 0,{number:!0}]]),(0,s.Lk)("div",g,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Cold")),1),(0,s.Lk)("span",f,(0,a.v_)(T.customHue)+"°",1),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Warm")),1)])])],64)),(0,s.Lk)("p",{class:(0,a.C4)(["has-text-weight-semibold mb-3",{"mt-6":!S.isDarkMode}])},(0,a.v_)(e.$t("Dark menu")),3),(0,s.Lk)("p",b,(0,a.v_)(e.$t("Dark sidebar + header, light content. Separate from full dark mode.")),1),(0,s.Lk)("div",y,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(S.darkSwatches,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.name,class:(0,a.C4)(["theme-swatch",{"is-active":T.activePreset===e.name,"is-org":e.isOrg}]),title:e.title,onClick:t=>S.applyPreset(e.name)},[(0,s.Lk)("span",{class:"theme-swatch-half theme-swatch-sidebar",style:(0,a.Tr)({background:e.sidebar})},null,4),(0,s.Lk)("span",{class:"theme-swatch-half theme-swatch-content",style:(0,a.Tr)({background:e.content})},null,4),(0,s.Lk)("span",k,[(0,s.bF)(A,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",C,(0,a.v_)(e.title),1)],10,v))),128))]),(0,s.Lk)("p",L,(0,a.v_)(e.$t("Or set a custom dark hue")),1),(0,s.Lk)("div",w,[(0,s.bo)((0,s.Lk)("input",{"onUpdate:modelValue":t[2]||(t[2]=e=>T.customDarkHue=e),type:"range",min:"0",max:"360",step:"1",class:"hue-slider",onInput:t[3]||(t[3]=(...e)=>S.applyCustomDarkHue&&S.applyCustomDarkHue(...e))},null,544),[[n.Jo,T.customDarkHue,void 0,{number:!0}]]),(0,s.Lk)("div",_,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Cold")),1),(0,s.Lk)("span",E,(0,a.v_)(T.customDarkHue)+"°",1),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Warm")),1)])]),(0,s.Lk)("div",$,[(0,s.Lk)("button",{class:"button is-light is-rounded is-small",onClick:t[4]||(t[4]=(...e)=>S.resetTheme&&S.resetTheme(...e))},[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Reset to default")),1)])])])}i(18111),i(61701);var T=i(3095),S=i(60253),A=i(38221),P=i.n(A),I=i(61273),M=i(40834);const x={default:{label:"Default Cool",hue:220,swatchSidebar:"hsl(220, 14%, 95%)",swatchBg:"hsl(220, 14%, 88%)"},warm:{label:"Warm",hue:35,swatchSidebar:"hsl(35, 14%, 95%)",swatchBg:"hsl(35, 14%, 88%)"},sage:{label:"Sage",hue:150,swatchSidebar:"hsl(150, 14%, 95%)",swatchBg:"hsl(150, 14%, 88%)"},lavender:{label:"Lavender",hue:270,swatchSidebar:"hsl(270, 14%, 95%)",swatchBg:"hsl(270, 14%, 88%)"},rose:{label:"Rose",hue:350,swatchSidebar:"hsl(350, 14%, 95%)",swatchBg:"hsl(350, 14%, 88%)"},sand:{label:"Sand",hue:50,swatchSidebar:"hsl(50, 22%, 92%)",swatchBg:"hsl(50, 18%, 85%)"},gray:{label:"Gray",hue:0,swatchSidebar:"hsl(0, 0%, 32%)",swatchBg:"hsl(0, 0%, 96%)"},graphite:{label:"Graphite",hue:205,swatchSidebar:"hsl(205, 25%, 16%)",swatchBg:"hsl(205, 14%, 96%)"},midnight:{label:"Midnight",hue:225,swatchSidebar:"hsl(225, 28%, 16%)",swatchBg:"hsl(225, 14%, 96%)"},forest:{label:"Forest",hue:150,swatchSidebar:"hsl(150, 22%, 14%)",swatchBg:"hsl(150, 12%, 96%)"},amber:{label:"Amber",hue:35,swatchSidebar:"hsl(35, 24%, 17%)",swatchBg:"hsl(35, 14%, 96%)"},ruby:{label:"Ruby",hue:0,swatchSidebar:"hsl(0, 28%, 17%)",swatchBg:"hsl(0, 14%, 96%)"},plum:{label:"Plum",hue:340,swatchSidebar:"hsl(340, 22%, 17%)",swatchBg:"hsl(340, 14%, 96%)"}};var N={name:"ThemePicker",components:{FontAwesomeIcon:I.gc},props:{showNote:{type:Boolean,default:!0},target:{type:String,default:"user",validator:e=>["user","tenant","local"].includes(e)},tenant:{type:Object,default:null}},emits:["saved","update:tenant"],data(){return{activePreset:null,customHue:220,customDarkHue:225,presetsLight:T.tF.map(e=>({name:e,...x[e]})),presetsDark:T.HD.map(e=>({name:e,...x[e]}))}},computed:{...(0,M.L8)(["user"]),isDarkMode(){return"dark"===this.$store.state.theme},activeTenant(){return this.tenant||this.$store.getters.tenant},orgPalette(){return(0,S.qC)(this.activeTenant)},orgPresetLabel(){return this.orgPalette?.name||this.activeTenant?.name||this.$t("Your organization")},lightSwatches(){return[...this.orgSwatchFor("light",T.E4),...this.presetsLight.map(this.toSwatch)]},darkSwatches(){return[...this.orgSwatchFor("dark",T.c6),...this.presetsDark.map(this.toSwatch)]}},watch:{"tenant.settingFeatures.general.theme"(e){"tenant"===this.target&&e&&this.applyPickerSelection(e)},isDarkMode(){this.syncFromSource()}},created(){this.orgPalette&&(0,T.m3)(this.orgPalette),this.syncFromSource()},methods:{toSwatch(e){return{name:e.name,title:this.$t(e.label),sidebar:e.swatchSidebar,content:e.swatchBg,isOrg:!1}},orgSwatchFor(e,t){if(!this.orgPalette)return[];const i=(0,S.s$)(this.orgPalette,e);return[{name:t,title:this.orgPresetLabel,sidebar:i.sidebar,content:i.content,isOrg:!0}]}
1,syncFromSource(){if("tenant"===this.target){const e=this.tenant?.settingFeatures?.general?.theme||T.Mu;return void this.applyPickerSelection(e)}const e=(0,T.O5)(),t=(0,T.Tl)(),i=(0,T.Hv)();null!==t?(this.activePreset=null,"dark"===i?this.customDarkHue=t:this.customHue=t):e?this.applyPickerSelection(e):this.applyPickerSelection(T.Mu)},applyPickerSelection(e){if(this.activePreset=e,(0,T.q$)(e))return;const t=x[e]?.hue??220;T.HD.includes(e)?this.customDarkHue=t:this.customHue=t},applyPreset(e){(0,T.I4)(e),this.applyPickerSelection(e),this.persistPreset(e)},applyCustomHue:P()(function(){(0,T.NI)(this.customHue),this.activePreset=null},80),applyCustomDarkHue:P()(function(){(0,T.nb)(this.customDarkHue),this.activePreset=null},80),resetTheme(){(0,T.TV)(T.Mu),this.customHue=220,this.customDarkHue=225,this.applyPickerSelection(T.Mu),this.persistPreset(T.Mu)},persistPreset(e){"local"!==this.target&&("tenant"!==this.target?this.persistUserPreset(e):this.persistTenantPreset(e))},persistUserPreset(e){if(!this.user?.id)return;const t=this.$isMobile&&this.$isMobile()?"mobileTheme":"desktopTheme",i={...this.user.notificationSettings||{},[t]:e};this.user.notificationSettings=i,this.$http.plain.patch("/profile-update/"+this.user.id,{notificationSettings:i}).then(()=>{}).catch(e=>console.log(e)),this.$emit("saved",{target:"user",field:t,preset:e})},persistTenantPreset(e){if(!this.tenant?.id)return;const t={...this.tenant.settingFeatures||{}};t.general={...t.general||{},theme:e};const i={...this.tenant,settingFeatures:t};this.$emit("update:tenant",i),this.$http.plain.patch("/tenants/"+this.tenant.id,{settingFeatures:t}).then(()=>{this.$store.commit("setTenant",i),this.$emit("saved",{target:"tenant",preset:e})}).catch(e=>console.log(e))}}},U=i(66262);const D=(0,U.A)(N,[["render",F],["__scopeId","data-v-fe2747f0"]]);var X=D},74961:function(e,t,i){"use strict";i.d(t,{Q7:function(){return n},Z3:function(){return a},oj:function(){return s}});const s=[{id:1,title:"Like",icon:"fa-light fa-thumbs-up"},{id:3,title:"love",icon:"fa-light fa-heart"},{id:4,title:"celebrate",icon:"fa-light fa-hands-clapping"},{id:5,title:"informative",icon:"fa-light fa-lightbulb-on"}],a=s.reduce((e,t)=>(e[t.id]=t,e),{});function n(e){return a[Number(e)]||null}},75583:function(e,t,i){"use strict";i.d(t,{A:function(){return Y}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"card mb-4 card-discuss"},l={class:"discuss-card-head"},r={class:"discuss-card-head-info"},d={class:"is-size-6-half has-text-grey"},c={key:2,class:"discuss-card-head-dot"},u={key:3,class:"is-size-6-half has-text-grey"},m={key:1,class:"discuss-card-head-actions"},p={key:0,class:"discuss-card-title mt-3 mb-3"},h={key:0,class:"discuss-card-media"},g={class:"o-video-item"},f={key:0,controls:""},b=["src"],y={key:0,class:"o-media-counter-images o-media-counter-videos"},v={key:1,class:"discuss-card-media"},k={class:"discuss-cover"},C=["src"],L={key:1,class:"o-media-counter-images"},w={key:2,class:"discuss-card-body"},_={class:"card-file-preview is-flex is-align-items-center is-justify-content-space-between"},E={class:"icon-text"},$={class:"icon is-small"},F=["href"],T={key:0},S={class:"o-media-counter-files"},A={key:3,class:"discuss-card-media"},P={key:4,class:"pb-3"},I={class:"icon is-small"},M={key:0,class:"discuss-card-like-count"},x={class:"discuss-card-actions"},N={class:"icon is-small"},U={key:0},D=["onMouseenter"],X={class:"icon"},V={key:0,class:"discuss-reactors-tooltip"},R={key:0,class:"is-size-7"},O={class:"discuss-reactors-group-header"},Q={class:"icon is-small"},B={key:0,class:"discuss-reactor-more"};function G(e,t,i,G,W,j){const z=(0,s.g2)("LogoThumbnail"),q=(0,s.g2)("router-link"),J=(0,s.g2)("font-awesome-icon"),H=(0,s.g2)("OpenGraphLinkPreview"),K=(0,s.gN)("safe-html");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[j.displayOwner?((0,s.uX)(),(0,s.Wv)(q,{key:0,to:{name:"UserShow",params:{item:j.displayOwner.id}}},{default:(0,s.k6)(()=>[(0,s.bF)(z,{item:j.displayOwner,"is-type":"roundSmall"},null,8,["item"])]),_:1},8,["to"])):(0,s.Q3)("",!0),(0,s.Lk)("div",r,[j.displayOwner?((0,s.uX)(),(0,s.Wv)(q,{key:0,to:{name:"UserShow",params:{item:j.displayOwner.id}},class:"is-size-6-half has-text-weight-semibold has-text-black"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(j.displayOwnerName),1)]),_:1},8,["to"])):(0,s.Q3)("",!0),j.displayMainRole?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[t[6]||(t[6]=(0,s.Lk)("span",{class:"discuss-card-head-dot"},"·",-1)),(0,s.Lk)("span",d,(0,a.v_)(j.displayMainRole.name),1)],64)):(0,s.Q3)("",!0),j.displayPost&&j.displayPost.dateCreated?((0,s.uX)(),(0,s.CE)("span",c," · ")):(0,s.Q3)("",!0),j.displayPost&&j.displayPost.dateCreated?((0,s.uX)(),(0,s.CE)("span",u,(0,a.v_)(e.$filters.formatDateCool(j.displayPost.dateCreated)),1)):(0,s.Q3)("",!0),(0,s.RG)(e.$slots,"header-extra")]),e.$slots["header-actions"]?((0,s.uX)(),(0,s.CE)("div",m,[(0,s.RG)(e.$slots,"header-actions")])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:(0,a.C4)(["discuss-card-body is-clickable",{"pt-3":!j.displayTitle}]),onClick:t[1]||(t[1]=t=>e.$emit("open-discussion",j.emitPayload))},[j.displayTitle?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.bF)(q,{class:"titleLink",to:{name:i.toRoute,params:j.displayToParams}},{default:(0,s.k6)(()=>
1[(0,s.eW)((0,a.v_)(j.displayTitle),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0),j.displayPost&&j.displayPost.content?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[j.displayContent.length<=j.truncateLimit||W.isExpanded||i.forceExpanded?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["mb-2",{"og-content-link":j.hasEmbed}])},[(0,s.bo)((0,s.Lk)("span",{class:(0,a.C4)({"og-content-link-text":j.hasEmbed})},null,2),[[K,j.nl2br(j.linkifyUrls(j.displayContent))]]),(0,s.RG)(e.$slots,"tags-inline")],2)):((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(["mb-2",{"og-content-link":j.hasEmbed}])},[(0,s.bo)((0,s.Lk)("span",null,null,512),[[K,j.nl2br(j.linkifyUrls(j.displayContent.substring(0,j.truncateLimit)))+"..."]]),(0,s.Lk)("span",{class:"read-more-link",onClick:t[0]||(t[0]=(0,n.D$)(e=>W.isExpanded=!0,["stop"]))},(0,a.v_)(e.$t("See more")),1)],2))],64)):(0,s.Q3)("",!0)],2),j.hasVideo?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.bF)(q,{to:{name:i.toRoute,params:j.displayToParams}},{default:(0,s.k6)(()=>[(0,s.Lk)("figure",g,["postvideo"===j.displayPost.medias[0].type?((0,s.uX)(),(0,s.CE)("video",f,[(0,s.Lk)("source",{src:j.mediaSrc(j.displayPost.medias[0]),type:"video/mp4"},null,8,b)])):(0,s.Q3)("",!0)]),j.displayPost.medias.length>1?((0,s.uX)(),(0,s.CE)("span",y," +"+(0,a.v_)(j.displayPost.medias.length-1),1)):(0,s.Q3)("",!0)]),_:1},8,["to"])])):(0,s.Q3)("",!0),j.hasImage?((0,s.uX)(),(0,s.CE)("div",v,[(0,s.bF)(q,{to:{name:i.toRoute,params:j.displayToParams}},{default:(0,s.k6)(()=>[(0,s.Lk)("figure",k,["postimage"===j.displayPost.medias[0].type?((0,s.uX)(),(0,s.CE)("img",{key:0,src:j.mediaSrc(j.displayPost.medias[0])},null,8,C)):(0,s.Q3)("",!0),j.displayPost.medias.length>1?((0,s.uX)(),(0,s.CE)("span",L," +"+(0,a.v_)(j.displayPost.medias.length-1),1)):(0,s.Q3)("",!0)])]),_:1},8,["to"])])):(0,s.Q3)("",!0),j.hasFile?((0,s.uX)(),(0,s.CE)("div",w,[(0,s.Lk)("div",_,[(0,s.Lk)("div",E,[(0,s.Lk)("span",$,[(0,s.bF)(J,{icon:"fa-light fa-file fileTitleIcon"})]),(0,s.Lk)("span",null,[(0,s.Lk)("a",{href:j.mediaSrc(j.displayPost.medias[0]),class:"is-size-6-half",target:"_blank"},(0,a.v_)(j.displayPost.medias[0].originalName.length>44?j.displayPost.medias[0].originalName.substring(0,44)+"...":j.displayPost.medias[0].originalName),9,F)])]),j.displayPost.medias.length>1?((0,s.uX)(),(0,s.CE)("div",T,[(0,s.bF)(q,{to:{name:i.toRoute,params:j.displayToParams}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",S,"+"+(0,a.v_)(j.displayPost.medias.length-1),1)]),_:1},8,["to"])])):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),j.hasEmbed&&!j.hasImage?((0,s.uX)(),(0,s.CE)("div",A,[j.displayPost.embedOpenGraph?((0,s.uX)(),(0,s.Wv)(H,{key:0,embed:j.displayPost.embedOpenGraph.openGraph,"is-comment":!1},null,8,["embed"])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),j.isTextOnly?((0,s.uX)(),(0,s.CE)("div",P)):(0,s.Q3)("",!0),(0,s.Lk)("div",{class:(0,a.C4)(["discuss-card-foot",{"discuss-card-foot-bordered":j.isTextOnly}])},[(0,s.RG)(e.$slots,"like-button",{onClick:j.onLikeClick,hasMyReaction:j.hasMyReaction,myReactionIcon:j.myReactionIcon,myReactionId:j.myReactionId,reactionsCount:j.displayReactionsCount},()=>[(0,s.Lk)("div",{class:(0,a.C4)(["discuss-card-like-btn is-clickable",j.hasMyReaction?"reacted reaction-"+j.myReactionId:""]),onClick:t[2]||(t[2]=(...e)=>j.onLikeClick&&j.onLikeClick(...e))},[(0,s.Lk)("span",I,[(0,s.bF)(J,{icon:j.myReactionIcon},null,8,["icon"])]),j.displayReactionsCount>0?((0,s.uX)(),(0,s.CE)("span",M,(0,a.v_)(j.displayReactionsCount),1)):(0,s.Q3)("",!0)],2)]),(0,s.Lk)("div",x,[(0,s.Lk)("div",{class:"discuss-card-action-btn is-clickable",onClick:t[3]||(t[3]=t=>e.$emit("open-discussion",j.emitPayload))},[(0,s.Lk)("span",N,[(0,s.bF)(J,{icon:"fa-light fa-comment-lines"})]),j.displayPostsCount>0?((0,s.uX)(),(0,s.CE)("span",U,(0,a.v_)(j.displayPostsCount),1)):(0,s.Q3)("",!0)])]),j.hasReactions?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"discuss-card-reactions",onClick:t[5]||(t[5]=(0,n.D$)(t=>e.$emit("open-reactions",j.emitPayload),["stop"]))},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(W.reactionTypes,i=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"rt_"+i.id},[j.displayPost&&j.displayPost.reactionData&&j.displayPost.reactionData[i.id]>0?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"discuss-card-reaction-item",onMouseenter:e=>j.onReactionHover(i.id),onMouseleave:t[4]||(t[4]=e=>W.activeReactionTooltip=null)},[(0,s.Lk)("span",{class:(0,a.C4)(["discuss-card-reaction-icon",`reaction-${i.id}`])},[(0,s.Lk)("span",X,[(0,s.bF)(J,{icon:i.icon},null,8,["icon"])])],2),W.activeReactionTooltip===i.id?((0,s.uX)(),(0,s.CE)("div",V,[W.isLoadingReactors&&!W.reactorsLoaded?((0,s.uX)(),(0,s.CE)("span",R,(0,a.v_)(e.$t("Loading"))+"...",1)):W.reactorsData[i.id]&&W.reactorsData[i.id].length>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("div",O,[(0,s.Lk)("span",{class:(0,a.C4)(["discuss-card-reaction-icon",`reaction-${i.id}`])},[(0,s.Lk)("span",Q,[(0,s.bF)(J,{icon:i.icon},null,8,["icon"])])],2),(0,s.Lk)("strong",null,(0,a.v_)(j.getReactionTitle(i.id)),1)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(W.reactorsData[i.id].slice(0,20),e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"discuss-reactor-name"},(0,a.v_)(e.fullName||(e.firstName+" "+e.lastName).trim()),1))),128)),W.reactorsData[i.id].length>20?((0,s.uX)(),(0,s.CE)("div",B,(0,a.v_)(e.$t("and"))+" "+(0,a.v_)(W.reactorsData[i.id].length-20)+" "+(0,a.v_)(e.$t("more"))+"... ",1)):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)],40,D)):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0)],2)])}i(18111),i(18237);var W=i(95256),j=i(31823),z=i(53755),q=i(74961),J={name:"DiscussionCardComfortable",components:{LogoThumbnail:j.A,OpenGra
1phLinkPreview:z.A},props:{row:{type:Object,default:null},post:{type:Object,default:null},title:{type:String,default:null},mainRole:{type:Object,default:null},reactionsCount:{type:Number,default:null},postsCount:{type:Number,default:null},toRoute:{type:String,default:"DiscussShow"},toParams:{type:Object,default:null},forceExpanded:{type:Boolean,default:!1}},emits:["open-discussion","react","open-reactions"],data(){return{isExpanded:!1,activeReactionTooltip:null,isLoadingReactors:!1,reactorsData:{},reactorsLoaded:!1,reactionTypes:q.oj}},computed:{displayPost(){return this.post||this.row&&this.row.mainPost||null},displayTitle(){return null!==this.title&&void 0!==this.title?this.title:this.row&&this.row.title||null},displayMainRole(){return this.mainRole||this.row&&this.row.mainRole||null},displayId(){return this.row?this.row.id:this.displayPost?this.displayPost.id:null},displayToParams(){return this.toParams?this.toParams:{item:this.displayId}},displayOwner(){const e=this.displayPost;return e&&(e.owner||e.ownerContact)||null},displayOwnerName(){const e=this.displayOwner;return e?e.fullName?e.fullName:[e.firstName,e.lastName].filter(Boolean).join(" "):""},displayReactionsCount(){if(null!==this.reactionsCount&&void 0!==this.reactionsCount)return this.reactionsCount;if(this.row&&"number"===typeof this.row.reactionsCount)return this.row.reactionsCount;const e=this.displayPost&&this.displayPost.reactionData;return e?Object.values(e).reduce((e,t)=>e+(parseInt(t,10)||0),0):0},displayPostsCount(){return null!==this.postsCount&&void 0!==this.postsCount?this.postsCount:this.row&&"number"===typeof this.row.postsCount?this.row.postsCount:this.displayPost&&this.displayPost.childrenCount||0},emitPayload(){return this.row||this.displayPost},hasMyReaction(){const e=this.displayPost;return Array.isArray(e&&e.myReactions)&&e.myReactions.length>0},myReactionId(){return this.hasMyReaction?Number(this.displayPost.myReactions[0]):null},myReactionIcon(){const e=(0,q.Q7)(this.myReactionId);return e?e.icon:"fa-light fa-thumbs-up"},isTextOnly(){return!this.hasImage&&!this.hasVideo&&!this.hasFile&&!this.hasEmbed},truncateLimit(){return this.hasImage?110:320},displayContent(){const e=this.displayPost;return e?e.content:""},hasReactions(){return this.displayReactionsCount>0},hasImage(){const e=this.displayPost;return!!(e&&e.medias&&e.medias.length>0&&"postimage"===e.medias[0].type)},hasVideo(){const e=this.displayPost;return!!(e&&e.medias&&e.medias.length>0&&"postvideo"===e.medias[0].type)},hasFile(){const e=this.displayPost;return!!(e&&e.medias&&e.medias.length>0&&"postfile"===e.medias[0].type)},hasEmbed(){const e=this.displayPost;return!!(e&&e.embedOpenGraph&&e.embedOpenGraph.openGraph)}},methods:{mediaSrc:W.F9,nl2br:W.HA,linkifyUrls:W.JP,onLikeClick(){this.$emit("react",this.emitPayload)},getReactionTitle(e){const t=(0,q.Q7)(e);return t?this.$t(t.title):""},onReactionHover(e){if(this.activeReactionTooltip=e,this.reactorsLoaded)return;const t=this.displayPost&&this.displayPost.id;t&&(this.isLoadingReactors=!0,this.$http.plain.get("/posts/get_reactions_list/"+t).then(e=>{this.reactorsData=e.data,this.reactorsLoaded=!0}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingReactors=!1}))}}},H=i(66262);const K=(0,H.A)(J,[["render",G]]);var Y=K},76446:function(e,t,i){"use strict";i.d(t,{A:function(){return ie}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"mb-5"},l={class:"mb-3 is-size-6 has-text-weight-semibold"},r={class:"privacy-card privacy-card-main mb-5"},d={class:"privacy-card-content"},c={class:"privacy-card-left"},u={class:"privacy-icon"},m={class:"privacy-info"},p={class:"privacy-title"},h={class:"privacy-description"},g={class:"privacy-card-content"},f={class:"privacy-card-left"},b={class:"privacy-icon"},y={class:"privacy-info"},v={class:"privacy-title"},k={class:"privacy-description"},C={class:"privacy-card-content"},L={class:"privacy-card-left"},w={class:"privacy-icon"},_={class:"privacy-info"},E={class:"privacy-title"},$={class:"privacy-description"},F={class:"privacy-card-content"},T={class:"privacy-card-left"},S={class:"privacy-icon"},A={class:"privacy-info"},P={class:"privacy-title"},I={class:"privacy-description"},M={class:"privacy-card-content"},x={class:"privacy-card-left"},N={class:"privacy-icon"},U={class:"privacy-info"},D={class:"privacy-title"},X={class:"privacy-description"},V={class:"privacy-card-content"},R={class:"privacy-card-left"},O={class:"privacy-icon"},Q={class:"privacy-info"},B={class:"privacy-title"},G={class:"privacy-description"},W={class:"privacy-card-content"},j={class:"privacy-card-left"},z={class:"privacy-icon"},q={class:"privacy-info"},J={class:"privacy-title"},H={class:"privacy-description"};function K(e,t,i,K,Y,Z){const ee=(0,s.g2)("font-awesome-icon"),te=(0,s.g2)("b-switch");return Z.privacyData?((0,s.uX)(),(0,s.CE)("form",{key:0,onSubmit:t[6]||(t[6]=(0,a.D$)(e=>i.save("privacy"),["prevent"]))},[(0,s.Lk)("div",o,[(0,s.Lk)("p",l,(0,n.v_)(e.$t("Set up how much personal data you want to share with the community")),1),t[7]||
1(t[7]=(0,s.Lk)("hr",null,null,-1))]),(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[(0,s.Lk)("div",c,[(0,s.Lk)("span",u,[(0,s.bF)(ee,{icon:"fa-light fa-shield-check"})]),(0,s.Lk)("div",m,[(0,s.Lk)("span",p,(0,n.v_)(e.$t("Make my profile completely private")),1),(0,s.Lk)("span",h,(0,n.v_)(e.$t("Only organization admins can view your profile")),1)])]),(0,s.bF)(te,{"model-value":Z.privacyData.profile,"true-value":!0,"false-value":!1,type:"is-warning","onUpdate:modelValue":Z.updateProfilePrivacy},null,8,["model-value","onUpdate:modelValue"])])]),i.item.id===e.user.id||e.isGranted("ADMIN_LOCAL")||Y.canManageThisProfile?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,n.C4)(["privacy-settings",{"is-disabled":Z.privacyData.profile}])},[(0,s.Lk)("div",{class:(0,n.C4)(["privacy-card",{"is-private":Z.privacyData.name}])},[(0,s.Lk)("div",g,[(0,s.Lk)("div",f,[(0,s.Lk)("span",b,[(0,s.bF)(ee,{icon:"fa-light fa-user"})]),(0,s.Lk)("div",y,[(0,s.Lk)("span",v,(0,n.v_)(e.$t("privateName")),1),(0,s.Lk)("span",k,(0,n.v_)(Z.privacyData.name?e.$t("Community will see only one first name and initial of your last name"):e.$t("Your full name is visible to community members")),1)])]),(0,s.bF)(te,{"model-value":!Z.privacyData.name,"true-value":!0,"false-value":!1,type:"is-success",disabled:Z.privacyData.profile,"onUpdate:modelValue":t[0]||(t[0]=e=>Z.updatePrivacy("name",!e))},null,8,["model-value","disabled"])])],2),(0,s.Lk)("div",{class:(0,n.C4)(["privacy-card",{"is-private":Z.privacyData.email}])},[(0,s.Lk)("div",C,[(0,s.Lk)("div",L,[(0,s.Lk)("span",w,[(0,s.bF)(ee,{icon:"fa-light fa-envelope"})]),(0,s.Lk)("div",_,[(0,s.Lk)("span",E,(0,n.v_)(e.$t("privateEmail")),1),(0,s.Lk)("span",$,(0,n.v_)(Z.privacyData.email?e.$t("privacyOnlyAdmin"):e.$t("privacyCommunity")),1)])]),(0,s.bF)(te,{"model-value":!Z.privacyData.email,"true-value":!0,"false-value":!1,type:"is-success",disabled:Z.privacyData.profile,"onUpdate:modelValue":t[1]||(t[1]=e=>Z.updatePrivacy("email",!e))},null,8,["model-value","disabled"])])],2),(0,s.Lk)("div",{class:(0,n.C4)(["privacy-card",{"is-private":Z.privacyData.phone}])},[(0,s.Lk)("div",F,[(0,s.Lk)("div",T,[(0,s.Lk)("span",S,[(0,s.bF)(ee,{icon:"fa-light fa-phone"})]),(0,s.Lk)("div",A,[(0,s.Lk)("span",P,(0,n.v_)(e.$t("privatePhone")),1),(0,s.Lk)("span",I,(0,n.v_)(Z.privacyData.phone?e.$t("privacyOnlyAdmin"):e.$t("privacyCommunity")),1)])]),(0,s.bF)(te,{"model-value":!Z.privacyData.phone,"true-value":!0,"false-value":!1,type:"is-success",disabled:Z.privacyData.profile,"onUpdate:modelValue":t[2]||(t[2]=e=>Z.updatePrivacy("phone",!e))},null,8,["model-value","disabled"])])],2),(0,s.Lk)("div",{class:(0,n.C4)(["privacy-card",{"is-private":Z.privacyData.age}])},[(0,s.Lk)("div",M,[(0,s.Lk)("div",x,[(0,s.Lk)("span",N,[(0,s.bF)(ee,{icon:"fa-light fa-cake-candles"})]),(0,s.Lk)("div",U,[(0,s.Lk)("span",D,(0,n.v_)(e.$t("privateAge")),1),(0,s.Lk)("span",X,(0,n.v_)(Z.privacyData.age?e.$t("privacyOnlyAdmin"):e.$t("privacyCommunity")),1)])]),(0,s.bF)(te,{"model-value":!Z.privacyData.age,"true-value":!0,"false-value":!1,type:"is-success",disabled:Z.privacyData.profile,"onUpdate:modelValue":t[3]||(t[3]=e=>Z.updatePrivacy("age",!e))},null,8,["model-value","disabled"])])],2),(0,s.Lk)("div",{class:(0,n.C4)(["privacy-card",{"is-private":Z.groupedImageTown}])},[(0,s.Lk)("div",V,[(0,s.Lk)("div",R,[(0,s.Lk)("span",O,[(0,s.bF)(ee,{icon:"fa-light fa-id-card"})]),(0,s.Lk)("div",Q,[(0,s.Lk)("span",B,(0,n.v_)(e.$t("Profile image & town")),1
1),(0,s.Lk)("span",G,(0,n.v_)(Z.groupedImageTown?e.$t("privacyOnlyAdmin"):e.$t("privacyCommunity")),1)])]),(0,s.bF)(te,{"model-value":!Z.groupedImageTown,"true-value":!0,"false-value":!1,type:"is-success",disabled:Z.privacyData.profile,"onUpdate:modelValue":t[4]||(t[4]=e=>Z.updateImageTown(!e))},null,8,["model-value","disabled"])])],2),(0,s.Lk)("div",{class:(0,n.C4)(["privacy-card",{"is-private":Z.groupedProfessionSocial}])},[(0,s.Lk)("div",W,[(0,s.Lk)("div",j,[(0,s.Lk)("span",z,[(0,s.bF)(ee,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("div",q,[(0,s.Lk)("span",J,(0,n.v_)(e.$t("Profession & social media")),1),(0,s.Lk)("span",H,(0,n.v_)(Z.groupedProfessionSocial?e.$t("privacyOnlyAdmin"):e.$t("privacyCommunity")),1)])]),(0,s.bF)(te,{"model-value":!Z.groupedProfessionSocial,"true-value":!0,"false-value":!1,type:"is-success",disabled:Z.privacyData.profile,"onUpdate:modelValue":t[5]||(t[5]=e=>Z.updateProfessionSocial(!e))},null,8,["model-value","disabled"])])],2)],2)):(0,s.Q3)("",!0)],32)):(0,s.Q3)("",!0)}var Y=i(40834),Z={props:["item","save","isOnboarding"],data(){return{profileFields:null,canManageThisProfile:null,localPrivacy:null}},created(){this.canManageThisProfile=this.canManageProfileAsParent(this.item),this.initPrivacyValue(),this.profileFields=this.tenant.settingForms.profileForm.profileFields},methods:{isMandatoryField(e){return this.user.id===this.item.id&&this.tenant.settingForms.profileForm.profileFieldsMandatory&&this.tenant.settingForms.profileForm.profileFieldsMandatory.includes(e)},isEmpty(e){return null===e||void 0===e||(Array.isArray(e)?0===e.length:"object"===typeof e&&0===Object.keys(e).length)},updatePrivacy(e,t){this.privacyData[e]=t,this.syncToItem(),this.$nextTick(()=>{this.save("privacy")})},updateProfilePrivacy(e){this.privacyData.profile=e,e?(this.privacyData.name=!0,this.privacyData.email=!0,this.privacyData.phone=!0,this.privacyData.age=!0,this.privacyData.image=!0,this.privacyData.social=!0,this.privacyData.profession=!0,this.privacyData.town=!0):(this.privacyData.name=!1,this.privacyData.email=!1,this.privacyData.phone=!1,this.privacyData.age=!1,this.privacyData.image=!1,this.privacyData.social=!1,this.privacyData.profession=!1,this.privacyData.town=!1),this.syncToItem(),this.$nextTick(()=>{this.save("privacy")})},updateImageTown(e){this.privacyData.image=e,this.privacyData.town=e,this.syncToItem(),this.$nextTick(()=>{this.save("privacy")})},updateProfessionSocial(e){this.privacyData.profession=e,this.privacyData.social=e,this.syncToItem(),this.$nextTick(()=>{this.save("privacy")})},syncToItem(){this.item.privacy||(this.item.privacy={}),Object.assign(this.item.privacy,this.localPrivacy)},initPrivacyValue(){const e=this.tenant?.settingFeatures?.permission||{};this.isOnboarding?(this.localPrivacy={town:e.profilePrivacyDefaultTown??!1,name:e.profilePrivacyDefaultName??!1,email:e.profilePrivacyDefaultEmail??!0,phone:e.profilePrivacyDefaultPhone??!0,social:e.profilePrivacyDefaultSocial??!1,image:e.profilePrivacyDefaultImage??!1,profession:e.profilePrivacyDefaultProfession??!1,age:e.profilePrivacyDefaultAge??!0,profile:!1},this.item.privacy||(this.item.privacy={}),Object.assign(this.item.privacy,this.localPrivacy)):((null===this.item.privacy||void 0===this.item.privacy||this.isEmpty(this.item.privacy))&&(this.item.privacy={}),this.localPrivacy={town:this.item.privacy.town??null,name:this.item.privacy.name??null,email:this.item.privacy.email??null,phone:this.item.privacy.phone??null,social:this.item.privacy.social??null,image:this.item.privacy.image??null,profession:this.item.privacy.profession??null,age:this.item.privacy.age??null,profile:this.item.privacy.profile??!1})}},computed:{...(0,Y.L8)(["user","tenant","isGranted","canManageProfileAsParent"]),privacyData(){return this.localPrivacy},groupedImageTown:{get(){if(!this.privacyData)return null;const{image:e,town:t}=this.privacyData;return e===t?e:null},set(e){this.privacyData.image=e,this.privacyData.town=e}},groupedProfessionSocial:{get(){if(!this.privacyData)return null;const{profession:e,social:t}=this.privacyData;return e===t?e:null},set(e){this.privacyData.profession=e,this.privacyData.social=e}}
1}},ee=i(66262);const te=(0,ee.A)(Z,[["render",K],["__scopeId","data-v-06533e36"]]);var ie=te},76675:function(e,t,i){"use strict";i.d(t,{A:function(){return k}});var s=i(20641),a=i(90033);const n=["id"],o={class:"prev"},l={class:"icon is-large"},r={class:"next"},d={class:"icon is-large"},c={key:0,class:"close"},u={class:"icon is-medium"},m={key:1,class:"indicator"},p={key:2,class:"play-pause"};function h(e,t,i,h,g,f){const b=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",{id:i.id,class:(0,a.C4)(["blueimp-gallery blueimp-gallery-controls",{"blueimp-gallery-carousel":i.carousel}])},[t[0]||(t[0]=(0,s.Lk)("div",{class:"slides"},null,-1)),t[1]||(t[1]=(0,s.Lk)("h3",{class:"title"},null,-1)),t[2]||(t[2]=(0,s.Lk)("p",{class:"description"},null,-1)),(0,s.Lk)("a",o,[(0,s.RG)(e.$slots,"prev",{},()=>[(0,s.Lk)("span",l,[(0,s.bF)(b,{icon:"fa-light fa-chevron-left"})])])]),(0,s.Lk)("a",r,[(0,s.RG)(e.$slots,"next",{},()=>[(0,s.Lk)("span",d,[(0,s.bF)(b,{icon:"fa-light fa-chevron-right"})])])]),i.carousel?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("a",c,[(0,s.RG)(e.$slots,"close",{},()=>[(0,s.Lk)("span",u,[(0,s.bF)(b,{icon:"fa-light fa-xmark"})])])])),i.carousel?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("ol",m)),i.carousel?((0,s.uX)(),(0,s.CE)("a",p)):(0,s.Q3)("",!0)],10,n)}i(44114),i(18111),i(20116),i(7588),i(2899),i(89855),i(47221);var g=i(88409),f=i.n(g),b={props:{images:{type:Array,default(){return[]}},videos:{type:Array,default(){return[]}},options:{type:Object,default(){return{}}},carousel:{type:Boolean,default:!1},index:{type:Number},id:{type:String,default:"blueimp-gallery"}},data(){return{instance:null}},computed:{combinedMedia(){const e=[];return this.images&&this.images.length>0&&this.images.forEach(t=>{"string"===typeof t?e.push({href:t,type:"image"}):e.push({...t,type:"image"})}),this.videos&&this.videos.length>0&&this.videos.forEach(t=>{"string"===typeof t?e.push({href:t,type:"video/mp4"}):e.push({...t,type:t.type||"video/mp4"})}),e}},watch:{index(e){this.carousel||(null!==e?this.open(e):(this.instance&&this.instance.close(),this.$emit("close")))}},mounted(){this.carousel&&this.open()},unmounted(){null!==this.instance&&(this.instance.destroyEventListeners(),this.instance.close(),this.instance=null)},methods:{open(e=0){const t="undefined"!==typeof f().Gallery?f().Gallery:f(),i=Object.assign({toggleControlsOnReturn:!1,toggleControlsOnSlideClick:!1,closeOnSlideClick:!1,carousel:this.carousel,container:`#${this.id}`,index:e,onopen:()=>this.$emit("onopen"),onopened:()=>this.$emit("onopened"),onslide:this.onSlideCustom,onslideend:(e,t)=>this.$emit("onslideend",{index:e,slide:t}),onslidecomplete:(e,t)=>this.$emit("onslidecomplete",{index:e,slide:t}),onclose:()=>this.$emit("close"),onclosed:()=>this.$emit("onclosed")},this.options);this.carousel&&(i.container=this.$el),this.instance=t(this.combinedMedia,i)},onSlideCustom(e,t){this.$emit("onslide",{index:e,slide:t});const i=this.combinedMedia[e];if(void 0!==i&&i.description){const e=this.instance.container.find(".description");e.empty(),e[0].appendChild(document.createTextNode(i.description))}}}},y=i(66262);const v=(0,y.A)(b,[["render",h]]);var k=v},77467:function(e,t,i){"use strict";i.d(t,{A:function(){return g}});var s=i(20641),a=i(90033);const n={class:"odb-stub-wrap"},o={key:0,class:"odb-stub-banner"},l={key:1,class:"odb-stub-date"},r={key:2,class:"odb-stub-avatar"},d={key:3,class:"odb-stub-pill"},c={key:0,class:"odb-stub-swipe"};function u(e,t,i,u,m,p){return(0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("div",{class:(0,a.C4)(["odb-stub",`is-${i.shape}`,{"is-strip":i.isStrip,"is-animated":i.animated}])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.count,e=>((0,s.uX)(),(0,s.CE)("div",{key:"stub"+e,class:"odb-stub-card"},["member"===i.shape&&i.isStrip?((0,s.uX)(),(0,s.CE)("span",o)):(0,s.Q3)("",!0),"event"===i.shape?((0,s.uX)(),(0,s.CE)("span",l)):((0,s.uX)(),(0,s.CE)("span",r)),t[0]||(t[0]=(0,s.Lk)("span",{class:"odb-stub-lines"},[(0,s.Lk)("span",{class:"odb-stub-line",style:{width:"74%"}}),(0,s.Lk)("span",{class:"odb-stub-line is-faint",style:{width:"48%"}})],-1)),"vote"===i.shape||"member"===i.shape?((0,s.uX)(),(0,s.CE)("span",d)):(0,s.Q3)("",!0)]))),128))],2),i.isStrip&&!i.animated?((0,s.uX)(),(0,s.CE)("p",c,[t[1]||(t[1]=(0,s.Lk)("span",{class:"odb-stub-dots"},[(0,s.Lk)("i"),(0,s.Lk)("i"),(0,s.Lk)("i")],-1)),(0,s.eW)(" "+(0,a.v_)(e.$t("swipes sideways")),1)])):(0,s.Q3)("",!0)])}var m={name:"SystemStub",props:{shape:{type:String,default:"avatar"},isStrip:{type:Boolean,default:!1},count:{type:Number,default:3},animated:{type:Boolean,default:!1}}},p=i(66262);const h=(0,p.A)(m,[["render",u],["__scopeId","data-v-17129ebc"]]);var g=h},78103:function(e,t,i){"use strict";i.d(t,{I:function(){return a},T:function(){return s}});i(44114),i(18111),i(22489),i(61701),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);function s(e){const t=new Set(e.map(e=>e.id)),i={};for(const n of e){const e=n.parentId&&t.has(n.parentId)?n.parentId:"root";(i[e]=i[e]||[]).push(n)}const s=[],a=(e,t)=>{for(const n of i[e]||[])s.push({...n,_depth:t}),a(n.id,t+1)};return a("root",0),s}function a({homeChapterIds:e=[],userRoles:t=[],units:i=[]}){const s=new Set(e.filter(Boolean)),a=new Map;for(const l of i)l&&"LocalCenter"===l["@type"]&&l.id&&a.set(l.id,l.parent&&l.parent.id?l.parent.id:null);const n=e=>{for(let t=e,i=0;t&&t.id&&i<20;t=t.parent,i++)s.add(t.id)};for(const l of t){const e=l&&!l.dateEnded?l.unit:null;e&&"LocalCenter"===e["@type"]&&n(e)}let o=!0;while(o){o=!1;for(const e of[...s]){const t=a.get(e);t&&!s.has(t)&&(s.add(t),o=!0)}}return s}},78348:function(e,t,i){"use strict";i.d(t,{A:function(){return p}});var s=i(20641),a=i(90033);const n={key:0,class:"region-option-count"};function o(e,t,i,o,l,r){const d=(0,s.g2)("b-autocomplete"),c=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.Wv)(c,{label:i.label,class:(0,a.C4)(i.isRequired?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(d,{modelValue:l.countyName,"onUpdate:modelValue":t[0]||(t[0]=e=>l.countyName=e),data:r.filteredCounties,placeholder:i.placeholder?i.placeholder:null,field:"name",loading:l.isFetching,disabled:i.isDisabled||!r.countryId,clearable:!i.isDisabled,required:!!i.isRequired,size:i.isFilter?"is-small":"",rounded:i.isFilter,expanded:i.isFilter,"open-on-focus":"",onSelect:r.change},{default:(0,s.k6)(e=>[(0,s.Lk)("span",{class:(0,a.C4)(["region-option",{"region-option-empty":e.option.isEmpty}])},[(0,s.Lk)("span",null,(0,a.v_)(e.option.name),1),void 0!==e.option.memberCount?((0,s.uX)(),(0,s.CE)("span",n,(0,a.v_)(e.option.memberCount),1)):(0,s.Q3)("",!0)],2)]),_:1},8,["modelValue","data","placeholder","loading","disabled","clearable","required","size","rounded","expanded","onSelect"])]),_:1},8,["label","class"])}i(44114);var l=i(41183);const r=new Map;function d(e,t,i){const s=i?t+"|"+i:String(t);if(r.has(s))return r.get(s);const a=i?"&state="+encodeURIComponent(i):"",n=e.plain.get("/counties?country="+t+a+"&itemsPerPage=1000").then(e=>e.data["hydra:member"]).catch(e=>{throw r.delete(s),e});return r.set(s,n),n}var c={props:["county","country","state","label","placeholder","isResultObject","isRequired","isDisabled","isFilter","counts"],data(){return{countyName:null,allCounties:[],isFetching:!1}},computed:{countryId(){return this.country?"object"===typeof this.country?this.country.id:this.country:null},countyScope(){return this.countryId?this.countryId+"|"+(this.state||""):null},countyOptions(){return(0,l.F2)(this.allCounties,this.counts)},filteredCounties(){const e=(this.countyName||"").trim().toLowerCase();if(!e)return this.countyOptions;const t=[],i=[];for(const s of this.countyOptions){const a=(s.name||"").toLowerCase();a.startsWith(e)?t.push(s):a.includes(e)&&i.push(s)}return[...t,...i]}},watch:{county(e){this.setCountyName(e)},countyScope:{immediate:!0,handler(){this.loadCounties(this.countryId,this.state)}}},created(){this.setCountyName(this.county)},methods:{setCountyName(e){this.countyName=e?e.name:null},loadCounties(e,t){if(this.allCounties=[],!e)return;this.isFetching=!0;const i=this.countyScope;d(this.$http,e,t).then(e=>{this.countyScope===i&&(this.allCounties=e)}).catch(e=>{this.countyScope===i&&(this.allCounties=[]),console.log(e)}).finally(()=>{this.countyScope===i&&(this.isFetching=!1)})},change(e){if(e&&e.isEmpty)return void(this.countyName=null);let t=null;t=this.isResultObject?e||null:e?e["@id"]:null,this.$emit("update:modelValue",t)}}},u=i(66262);const m=(0,u.A)(c,[["render",o]]);var p=m},80121:function(e,t,i){"use strict";i.d(t,{A:function(){return O}});var s=i(20641),a=i(90033),n=i(53751);const o=["src","alt"],l={key:1,class:"o-gallery-tile__embedicon o-gallery-tile__iconbox"},r={class:"icon is-large"},d={class:"o-gallery-tile__playbadge"},c=["src","alt","width","height"],u={key:0,class:"o-gallery-tile__playbadge"},m={class:"o-gallery-tile__skeleton"},p=["src","alt"],h=["src"],g={key:1,class:"o-gallery-tile__media o-gallery-tile__videofallback"},f={class:"icon is-large has-text-white"},b={class:"o-gallery-tile__playbadge"},y=["title"],v={key:5,class:"o-gallery-tile__iconbox"},k={class:"icon is-large"},C={class:"o-gallery-tile__scrim"},L={class:"o-gallery-tile__label"},w=["title"],_=["title"],E={class:"icon-text"},$={class:"icon is-small"},F={class:"icon-text"},T={class:"icon is-small"},S={class:"icon-text"},A={class:"icon is-small"},P={class:"icon-text"},I={class:"icon is-small"},M={class:"icon-text"},x={class:"icon is-small"},N={class:"icon-text"},U={class:"icon is-small"};function D(e,t,i,D,X,V){const R=(0,s.g2)("font-awesome-icon"),O=(0,s.g2)("b-dropdown-item"),Q=(0,s.g2)("b-dropdown");return(0,s.uX)(),(0,s.CE)("div",{class:(0,a.C4)(["o-gallery-tile",{"is-icon":"icon"===V.displayMode}]),onClick:t[11]||(t[11]=t=>e.$emit("open"))},["embed"===V.displayMode?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[V.embedThumb?((0,s.uX)(),(0,s.CE)("img",{key:0,class:"o-gallery-tile__media",src:V.embedThumb,alt:i.row.title,loading:"lazy",decoding:"async"},null,8,o)):((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("span",r,[(0,s.bF)(R,{icon:V.embedProviderIcon,size:"2x"},null,8,["icon"])])])),(0,s.Lk)("span",d,[(0,s.bF)(R,{icon:"fa-light fa-circle-play"})])],64)):"thumb"===V.displayMode?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.Lk)("img",{class:"o-gallery-tile__media",src:i.thumbnailSrc,alt:i.row.title,width:V.thumbWidth||null,height:V.thumbHe
1ight||null,loading:"lazy",decoding:"async"},null,8,c),"video"===i.kind?((0,s.uX)(),(0,s.CE)("span",u,[(0,s.bF)(R,{icon:"fa-light fa-circle-play"})])):(0,s.Q3)("",!0)],64)):"image"===V.displayMode?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.bo)((0,s.Lk)("div",m,null,512),[[n.aG,!X.loaded]]),(0,s.bo)((0,s.Lk)("img",{class:"o-gallery-tile__media",src:i.mediaSrc,alt:i.row.title,loading:"lazy",onLoad:t[0]||(t[0]=(...e)=>V.onImageLoad&&V.onImageLoad(...e)),onError:t[1]||(t[1]=e=>X.imageFailed=!0)},null,40,p),[[n.aG,X.loaded]])],64)):"video"===V.displayMode?((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[X.videoFailed?((0,s.uX)(),(0,s.CE)("div",g,[(0,s.Lk)("span",f,[(0,s.bF)(R,{icon:"fa-light fa-file-video",size:"2x"})])])):((0,s.uX)(),(0,s.CE)("video",{key:0,class:"o-gallery-tile__media",src:V.videoFrameSrc,preload:"metadata",muted:"",playsinline:"",onLoadedmetadata:t[2]||(t[2]=(...e)=>V.onVideoMeta&&V.onVideoMeta(...e)),onError:t[3]||(t[3]=e=>X.videoFailed=!0)},null,40,h)),(0,s.Lk)("span",b,[(0,s.bF)(R,{icon:"fa-light fa-circle-play"})])],64)):"skeleton"===V.displayMode?((0,s.uX)(),(0,s.CE)("div",{key:4,class:"o-gallery-tile__skeleton",title:e.$t("Preview generating")},null,8,y)):((0,s.uX)(),(0,s.CE)("div",v,[(0,s.Lk)("span",k,[(0,s.bF)(R,{icon:"fa-light "+i.iconConfig.icon,size:"2x",style:(0,a.Tr)({color:i.iconConfig.color})},null,8,["icon","style"])])])),(0,s.Lk)("div",C,[(0,s.Lk)("span",L,[(0,s.bF)(R,{icon:V.isEmbed?V.embedProviderIcon:"fa-light "+i.iconConfig.icon,class:"o-gallery-tile__labelicon"},null,8,["icon"]),(0,s.Lk)("span",{class:"o-gallery-tile__title",title:i.row.title},(0,a.v_)(i.row.title),9,w),"public"===i.shareBadge?((0,s.uX)(),(0,s.Wv)(R,{key:0,icon:"fa-light fa-globe",class:"o-gallery-tile__badge",title:e.$t("Shared publicly")},null,8,["title"])):"publishing"===i.shareBadge||"unpublishing"===i.shareBadge?((0,s.uX)(),(0,s.Wv)(R,{key:1,icon:"fa-light fa-circle-notch",class:"o-gallery-tile__badge fa-spin",title:e.$t("Publishingâ¦")},null,8,["title"])):(0,s.Q3)("",!0)]),V.hasMenu?((0,s.uX)(),(0,s.Wv)(Q,{key:0,ref:"menu","aria-role":"list",position:"is-bottom-left",class:"o-gallery-tile__menu","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"o-gallery-tile__menubtn",title:e.$t("Actions"),onClick:t[4]||(t[4]=(0,n.D$)((...e)=>V.toggleMenu&&V.toggleMenu(...e),["stop"]))},[(0,s.bF)(R,{icon:"fa-light fa-ellipsis-vertical"})],8,_)]),default:(0,s.k6)(()=>[V.showCopyLink?((0,s.uX)(),(0,s.Wv)(O,{key:0,"aria-role":"listitem",onClick:t[5]||(t[5]=e=>V.emitAction("copy-link"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",E,[(0,s.Lk)("span",$,[(0,s.bF)(R,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Copy link")),1)])]),_:1})):(0,s.Q3)("",!0),i.canShare?((0,s.uX)(),(0,s.Wv)(O,{key:1,"aria-role":"listitem",onClick:t[6]||(t[6]=e=>V.emitAction("share"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",F,[(0,s.Lk)("span",T,[(0,s.bF)(R,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share")),1)])]),_:1})):(0,s.Q3)("",!0),i.row.media?((0,s.uX)(),(0,s.Wv)(O,{key:2,"aria-role":"listitem",onClick:t[7]||(t[7]=e=>V.emitAction("download"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",S,[(0,s.Lk)("span",A,[(0,s.bF)(R,{icon:"fa-light fa-cloud-arrow-down"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("download")),1)])]),_:1})):(0,s.Q3)("",!0),i.canEdit?((0,s.uX)(),(0,s.Wv)(O,{key:3,"aria-role":"listitem",onClick:t[8]||(t[8]=e=>V.emitAction("remove"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",P,[(0,s.Lk)("span",I,[(0,s.bF)(R,{icon:"fa-light fa-trash"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("remove")),1)])]),_:1})):(0,s.Q3)("",!0),i.canEdit?((0,s.uX)(),(0,s.Wv)(O,{key:4,"aria-role":"listitem",onClick:t[9]||(t[9]=e=>V.emitAction("move"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",M,[(0,s.Lk)("span",x,[(0,s.bF)(R,{icon:"fa-light fa-folders"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Move")),1)])]),_:1})):(0,s.Q3)("",!0),i.canEdit?((0,s.uX)(),(0,s.Wv)(O,{key:5,"aria-role":"listitem",onClick:t[10]||(t[10]=e=>V.emitAction("rename"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",N,[(0,s.Lk)("span",U,[(0,s.bF)(R,{icon:"fa-light fa-pen"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Rename")),1)])]),_:1})):(0,s.Q3)("",!0)]),_:1},512)):(0,s.Q3)("",!0)])],2)}var X={name:"DriveGalleryTile",props:{row:{type:Object,required:!0},kind:{type:String,default:"icon"},mediaSrc:{type:String,default:null},thumbnailSrc:{type:String,default:null},iconConfig:{type:Object,default:()=>({icon:"fa-file",color:"grey"})},shareBadge:{type:String,default:null},canEdit:{type:Boolean,default:!1},canShare:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},openMenuId:{type:[Number,String],default:null}},emits:["open","aspect","action","menu-open"],data(){return{loaded:!1,imageFailed:!1,videoFailed:!1}},computed:{displayMode(){if(this.isEmbed)return"embed";if(this.thumbnailSrc)return"thumb";if("image"===this.kind&&this.mediaSrc&&!this.imageFailed)return"image";const e=this.row.media&&this.row.media.thumbnailStatus;return"PENDING"===e?"skeleton":"video"===this.kind&&this.mediaSrc?"video":"icon"},isEmbed(){return"embed"===this.row.type},embedThumb(){return this.row.metadata&&this.row.metadata.thumbnailUrl||null},embedProviderIcon(){return this.row.metadata&&"spotify"===this.row.metadata.provider?"fa-brands fa-spotify":"fa-brands fa-youtube"},videoFrameSrc(){return this.mediaSrc?this.mediaSrc+"#t=0.1":""},thumbWidth(){return this.row.media&&this.row.media.thumbnailWidth||0}
1,thumbHeight(){return this.row.media&&this.row.media.thumbnailHeight||0},showCopyLink(){return!this.readonly&&(!this.row.media||this.canShare)},hasMenu(){return!this.readonly||!!this.row.media}},watch:{openMenuId(e){e!==this.row.id&&this.$refs.menu?.isActive&&this.$refs.menu.toggle()}},created(){"thumb"===this.displayMode&&this.thumbWidth&&this.thumbHeight&&this.$emit("aspect",{id:this.row.id,ratio:this.thumbWidth/this.thumbHeight})},methods:{onImageLoad(e){this.loaded=!0;const t=e.target;t&&t.naturalWidth&&t.naturalHeight&&this.$emit("aspect",{id:this.row.id,ratio:t.naturalWidth/t.naturalHeight})},onVideoMeta(e){const t=e.target;t&&t.videoWidth&&t.videoHeight&&this.$emit("aspect",{id:this.row.id,ratio:t.videoWidth/t.videoHeight})},toggleMenu(){const e=this.$refs.menu;e&&(e.isActive||this.$emit("menu-open",this.row.id),e.toggle())},emitAction(e){this.$emit("action",{type:e,row:this.row})}}},V=i(66262);const R=(0,V.A)(X,[["render",D],["__scopeId","data-v-08c0b0c4"]]);var O=R},80762:function(e,t,i){"use strict";i.d(t,{A:function(){return T}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"item-view-modal-card pb-6"},l={class:"item-view-modal-header"},r={class:"header-left"},d={class:"icon is-small"},c={class:"is-hidden-touch"},u={class:"header-center"},m={class:"item-view-modal-title"},p={class:"header-right"},h={class:"header-actions-group"},g=["href"],f={class:"icon is-small"},b={class:"icon is-small"},y=["id"],v={key:0,class:"item-view-mobile-overlay"},k={class:"item-view-mobile-container"},C={class:"is-medium mr-1"},L=["id"];function w(e,t,i,w,_,E){const $=(0,s.g2)("font-awesome-icon"),F=(0,s.g2)("router-link"),T=(0,s.g2)("b-modal"),S=(0,s.g2)("MobileViewHeader");return(0,s.uX)(),(0,s.CE)(s.FK,null,[e.$isMobile()?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(T,{key:0,"model-value":i.modelValue,width:i.modalWidth,scroll:"keep","can-cancel":i.canCancel,animation:"modal-slide",onClose:E.handleClose},{default:(0,s.k6)(()=>[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("div",r,[i.hideHeaderBack?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=(...e)=>E.handleClose&&E.handleClose(...e))},[(0,s.Lk)("span",d,[(0,s.bF)($,{icon:"fa-light fa-arrow-left"})]),(0,s.Lk)("span",c,(0,a.v_)(e.$t("Back")),1)])),(0,s.RG)(e.$slots,"left-actions",{},void 0,!0)]),(0,s.Lk)("div",u,[(0,s.Lk)("h2",m,[(0,s.RG)(e.$slots,"title",{},()=>[(0,s.eW)((0,a.v_)(i.title),1)],!0)])]),(0,s.Lk)("div",p,[(0,s.Lk)("div",h,[(0,s.RG)(e.$slots,"actions",{},void 0,!0),i.maximizeRoute?((0,s.uX)(),(0,s.Wv)(F,{key:0,to:E.maximizeRouteLocation,custom:""},{default:(0,s.k6)(({href:e})=>[(0,s.Lk)("a",{href:e,class:"button is-small is-light is-rounded item-view-modal-maximize",onClick:t[1]||(t[1]=(0,n.D$)((...e)=>E.handleMaximize&&E.handleMaximize(...e),["exact","prevent"]))},[(0,s.Lk)("span",f,[(0,s.bF)($,{icon:"fa-light fa-expand"})])],8,g)]),_:1},8,["to"])):(0,s.Q3)("",!0),i.hideHeaderClose?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-small is-light is-rounded ml-2",onClick:t[2]||(t[2]=(...e)=>E.handleClose&&E.handleClose(...e))},[(0,s.Lk)("span",b,[(0,s.bF)($,{icon:"fa-light fa-xmark"})])]))])])]),(0,s.Lk)("div",{id:i.scrollContainerId,class:"item-view-modal-body"},[(0,s.RG)(e.$slots,"default",{},void 0,!0)],8,y)])]),_:3},8,["model-value","width","can-cancel","onClose"])),(0,s.bF)(n.eB,{name:"mobile-slide"},{default:(0,s.k6)(()=>[e.$isMobile()&&i.modelValue?((0,s.uX)(),(0,s.CE)("div",v,[(0,s.Lk)("div",k,[(0,s.bF)(S,{title:i.title,"is-item-view-modal":!0,"show-back-button":!1,"is-overlay":!0,"emit-only":!0,"scroll-container-id":i.scrollContainerId,onBack:E.handleClose},{left:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"o-mobile-back-button is-white is-rounded",onClick:t[3]||(t[3]=(...e)=>E.handleClose&&E.handleClose(...e))},[(0,s.Lk)("span",C,[(0,s.bF)($,{icon:"fa-light fa-chevron-left"})])]),(0,s.RG)(e.$slots,"left-actions",{},void 0,!0)]),actions:(0,s.k6)(()=>[(0,s.RG)(e.$slots,"actions",{},void 0,!0)]),_:3},8,["title","scroll-container-id","onBack"]),(0,s.Lk)("div",{id:i.scrollContainerId,class:"item-view-mobile-body"},[(0,s.RG)(e.$slots,"default",{},void 0,!0)],8,L)])])):(0,s.Q3)("",!0)]),_:3})],64)}i(44114);var _=i(81084),E={name:"ItemViewModal",components:{MobileViewHeader:_.A},props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:""},modalWidth:{type:Number,default:1200},maximizeRoute:{type:[String,Object],default:null},scrollContainerId:{type:String,default:"itemViewModalBody"},canCancel:{type:Array,default:()=>["escape","outside"]},hideHeaderBack:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1}},emits:["update:modelValue","close","maximize"],computed:{maximizeRouteLocation(){return"string"===typeof this.maximizeRoute?{name:this.maximizeRoute}:this.maximizeRoute}},watch:{modelValue(e){e&&this.$nextTick(()=>{setTimeout(()=>{const e=document.getElementById(this.scrollContainerId);e&&(e.scrollTop=0)},50)})}},methods:{handleClose(){this.$emit("update:modelValue",!1),this.$emit("close")},handleMaximize(){this.maximizeRoute&&(this.$router.push(this.maximizeRouteLocation),this.$emit("maximize"))}}},$=i(66262);const F=(0,$.A)(E,[["render",w],["__scopeId","data-v-80637532"]]);var T=F},81084:function(e,t,i){"use strict";i.d(t,{A:function(){return b}});var s=i(20641),a=i(90033);const n={key:0,class:"o-mobile-header-spacer"},o={class:"o-mobile-header-layout"},l={class:"o-mobile-header-left"},r={class:"is-small mr-1"},d={class:"o-mobile-header-center"},c={key:0,class:"o-mobile-header-title"},u={class:"o-mobile-header-right"};function m(e,t,i,m,p,h){const g=(0,s.g2)("font-awesome-icon");return e.$isMobile()?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)({"native-app-mobile-header":e.isNativeApp})},[!i.sticky||i.isOverlay||i.isItemViewPage||i.noHeaderPadding?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",n)),(0,s.Lk)("div",{class:(0,a.C4)(["o-mobile-sticky-header",{"is-fixed":i.sticky&&!i.isOverlay,"is-overlay-header":i.isOverlay}]),style:(0,a.Tr)({zIndex:i.zIndex,backgroundColor:i.backgroundColor})},[(0,s.Lk)("div",o,[(0,s.Lk)("div",l,[(0,s.RG)(e.$slots,"left",{},()=>[h.shouldShowBackButton?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"o-mobile-back-button is-white is-rounded",onClick:t[0]||(t[0]=(...e)=>h.handleBack&&h.handleBack(...e))},[(0,s.Lk)("span",r,[(0,s.bF)(g,{icon:"fa-light fa-chevron-left"})])])):(0,s.Q3)("",!0)],!0)]),(0,s.Lk)("div",d,[(0,s.RG)(e.$slots,"center",{},()=>[i.title?((0,s.uX)(),(0,s.CE)("h2",c,(0,a.v_)(i.title),1)):(0,s.Q3)("",!0)],!0)]),(0,s.Lk)("div",u,[(0,s.RG)(e.$slots,"actions",{},void 0,!0),(0,s.RG)(e.$slots,"dropdown",{},void 0,!0)])])],6)],2)):(0,s.Q3)("",!0)}i(44114);var p=i(40834),h={name:"MobileViewHeader",props:{title:{type:String,default:null},isItemViewModal:{default:!1},showBackButton:{type:Boolean,default:null},backRoute:{type:[Object,String],default:null},showShadowOnScroll:{type:Boolean,default:!0},backgroundColor:{type:String,default:"var(--orgo-header-bg)"},sticky:{type:Boolean,default:!0},zIndex:{type:Number,default:40},isOverlay:{type:Boolean,default:!1},noHeaderPadding:{type:Boolean,default:!1},isItemViewPage:{type:Boolean,default:!1},emitOnly:{type:Boolean,default:!1},scrollContainerId:{type:String,default:null}},emits:["back"],data(){return{showShadow:!1,hasBackListener:!1,scrollContainer:null}},computed:{...(0,p.L8)(["isNativeApp"]),hasHistory(){return window.history.length>1},shouldShowBackButton(){return null!==this.showBackButton?this.showBackButton:this.hasHistory}},mounted(){this.showShadowOnScroll&&(this.scrollContainerId?this.scrollContainer=document.getElementById(this.scrollContainerId):this.scrollContainer=document.getElementById("oMain"),this.scrollContainer&&this.scrollContainer.addEventListener("scroll",this.handleScroll),this.handleScroll()),this.hasBackListener=void 0!==this.$attrs.onBack},beforeUnmount(){this.showShadowOnScroll&&this.scrollContainer&&this.scrollContainer.removeEventListener("scroll",this.handleScroll)},methods:{handleScroll(){const e=this.scrollContainer?this.scrollContainer.scrollTop:0;this.showShadow=e>10},handleBack(){this.$emit("back"),this.emitOnly||this.hasBackListener||(this.backRoute?"string"===typeof this.backRoute?this.$router.push({name:this.backRoute}):this.$router.push(this.backRoute):this.hasHistory?this.$router.go(-1):this.$router.push({name:"Dashboard"}))}}},g=i(66262);const f=(0,g.A)(h,[["render",m],["__scopeId","data-v-1bca33ee"]]);var b=f},81320:function(e,t){"use strict";t.A={data(){return{subEventAttendance:{},subEventAttendLoading:{}}},methods:{getSubEventItems(){return Array.isArray(this.items)?this.items:Array.isArray(this.subEvents)?this.subEvents:this.item&&Array.isArray(this.item.subEvents)?this.item.subEvents:[]},getConflictingSession(e){if(!e.dateTimeBegin||!e.dateTimeEnd)return null;const t=new Date(e.dateTimeBegin).getTime(),i=new Date(e.dateTimeEnd).getTime();
1for(const s of this.getSubEventItems()){if(s.uuid===e.uuid)continue;if(!this.subEventAttendance[s.uuid])continue;if(!s.dateTimeBegin||!s.dateTimeEnd)continue;const a=new Date(s.dateTimeBegin).getTime(),n=new Date(s.dateTimeEnd).getTime();if(t<n&&i>a)return s}return null},handleAttendSubEvent(e){const t=this.getConflictingSession(e);if(!t)return void this.attendSubEvent(e);const i=t.dateTimeBegin?this.$filters.format(t.dateTimeBegin,"HH:mm")+" - "+this.$filters.format(t.dateTimeEnd,"HH:mm"):"";this.$buefy.dialog.confirm({title:this.$t("Schedule conflict"),message:this.$t("This session overlaps with")+" <b>"+t.name+"</b>"+(i?" ("+i+")":"")+". "+this.$t("Would you like to switch sessions?"),confirmText:this.$t("Switch"),cancelText:this.$t("Cancel"),type:"is-warning",onConfirm:()=>{this.unattendSubEvent(t),setTimeout(()=>this.attendSubEvent(e),500)}})}}}},81458:function(e,t,i){"use strict";function s(e){return!!e?.settingFeatures?.fees?.hasVat}function a(e){return!!e?.settingFeatures?.fees?.hasRegistrationFee}function n(e){const t=Number(e);return Number.isFinite(t)?Math.round(100*t)/100:0}function o(e){const t=parseFloat(e);return Number.isFinite(t)?String(Math.round(100*t)/100):""}function l(e,t,{exempt:i=!1,enabled:s=!0}={}){const a=Number(e),n=parseFloat(t);return!s||i||!Number.isFinite(a)||!Number.isFinite(n)||n<=0?0:a*(n/100)}function r(e,t,i){if(!a(e)||t?.validFeeDate)return 0;const s=parseFloat(i?.registrationFee);return Number.isFinite(s)&&s>0?s:0}function d({tenant:e,amount:t=0,vatRate:i=null,vatExempt:o=!1,registrationFee:r=0,registrationFeeVatRate:d=null,registrationFeeVatExempt:c=!1,donation:u=0}={}){const m=s(e),p=Number.isFinite(parseFloat(t))?parseFloat(t):0,h=l(p,i,{exempt:o,enabled:m}),g=parseFloat(r),f=a(e)&&Number.isFinite(g)&&g>0?g:0,b=l(f,d,{exempt:c,enabled:m}),y=parseFloat(u),v=Number.isFinite(y)&&y>0?y:0;return{net:n(p),vat:n(h),gross:n(p+h),registration:n(f),registrationVat:n(b),registrationGross:n(f+b),donation:n(v),total:n(p+h+f+b+v)}}function c(e){return e?.isCustomAmount?e.price??e.customMinPrice??0:e?.price??0}function u(e,t,i,s=0){return d({tenant:e,amount:c(i),vatRate:i?.priceVatRate??null,vatExempt:!!i?.priceVatExempt,registrationFee:r(e,t,i),registrationFeeVatRate:i?.registrationFeeVatRate??null,registrationFeeVatExempt:!!i?.registrationFeeVatExempt,donation:s})}i.d(t,{OR:function(){return d},QU:function(){return u},gt:function(){return r},nU:function(){return o}})},82920:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(90033);const n={key:0},o={key:0,class:"buttons pt-3 is-right",style:{"margin-top":"-55px"}},l=["disabled"];function r(e,t,i,r,d,c){const u=(0,s.g2)("b-loading"),m=(0,s.g2)("VoteForm");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.bF)(u,{modelValue:d.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>d.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),d.item?((0,s.uX)(),(0,s.CE)("section",n,[(0,s.Lk)("div",null,[(0,s.bF)(m,{ref:"voteForm",item:d.item,operation:"update",onSaved:c.handleSaved,onPublished:c.handlePublished,onClose:t[1]||(t[1]=t=>e.$emit("close")),onStateChange:t[2]||(t[2]=t=>e.$emit("state-change",t)),onDelete:t[3]||(t[3]=e=>c.confirmDelete("deleting"))},null,8,["item","onSaved","onPublished"]),d.item.isEditable||d.item.isArchived?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{class:"button is-warning is-outlined is-rounded",disabled:d.isLoading,onClick:t[4]||(t[4]=(...e)=>c.confirmArchive&&c.confirmArchive(...e))},(0,a.v_)(e.$t("Archive")),9,l)]))])])):(0,s.Q3)("",!0)])}var d=i(21152),c=i(84743),u=i.n(c),m=i(40834),p={name:"VoteUpdateContent",components:{VoteForm:d.A},props:{voteId:{type:[Number,String],required:!0}},emits:["updated","deleted","archived","loaded","cancel","close","published","state-change"],data(){return{item:null,isLoading:!1}},computed:{...(0,m.L8)(["user","isGranted","tenant"])},watch:{voteId:{immediate:!0,handler(e){e&&this.retrieve()}}},created(){this.isGranted("HR_LOCAL")||this.$emit("cancel")},methods:{retrieve(){this.isLoading=!0,this.$http.plain.get("/vote_collections/"+this.voteId).then(e=>{e.data.dateStart?e.data.dateStart=u().utc(e.data.dateStart).tz(e.data.timezone).toDate():e.data.dateStart=null,e.data.dateEnd?e.data.dateEnd=u().utc(e.data.dateEnd).tz(e.data.timezone).toDate():e.data.dateEnd=null,this.item=e.data,this.$emit("loaded",this.item)}
1).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})},confirmArchive(){this.$buefy.dialog.confirm({title:this.$t("Archive"),confirmText:this.$t("Archive"),type:"is-warning",message:this.$t("Are you sure you want to archive this voting? It will be hidden from the list."),onConfirm:()=>this.archive()})},archive(){this.isLoading=!0,this.$http.plain.patch("/vote_collections/"+this.item.id+"/archive").then(()=>{this.$buefy.toast.open(this.$t("Voting archived")),this.$emit("archived",this.item)}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1})},confirmDelete(e){this.$buefy.dialog.confirm({title:this.$t(e),confirmText:this.$t("deleting"===e?"delete":"archive"),type:"is-danger",message:this.$t("Are you sure to delete this voting? This cannot be undone."),onConfirm:()=>this.delete(e)})},delete(){this.isLoading=!0,this.$http.plain.delete("/vote_collections/"+this.item.id).then(e=>this.deleteSuccess(e)).catch(e=>console.log(e)).finally(()=>{this.isLoading=!1})},deleteSuccess(){this.$buefy.toast.open(this.$t("saved")),this.$emit("deleted",this.item)},handleSaved(e){this.$emit("updated",e)},handlePublished(e){this.$emit("published",e)},saveDraftAndClose(){this.$refs.voteForm?.saveDraftAndClose()},publishAndClose(){this.$refs.voteForm?.publishAndClose()}}},h=i(66262);const g=(0,h.A)(p,[["render",r]]);var f=g},83016:function(e,t,i){"use strict";i.d(t,{A:function(){return M}});var s=i(20641),a=i(90033);const n={class:"modal-card send-custom-email-modal"},o={class:"modal-card-head send-email-head"},l={class:"send-email-recipient"},r={class:"send-email-recipient-name"},d={class:"send-email-recipient-address"},c=["aria-label"],u={class:"modal-card-body"},m={class:"send-email-sender"},p={class:"send-email-message-label"},h={class:"label"},g={type:"button",class:"button is-text is-small is-rounded"},f={class:"icon is-small"},b={class:"send-email-placeholder-item"},y={class:"send-email-placeholder-token"},v={class:"modal-card-foot send-email-foot"},k={class:"send-email-hint"},C={class:"send-email-actions"},L=["disabled"],w={class:"icon-text"},_={class:"icon is-small"};function E(e,t,i,E,$,F){const T=(0,s.g2)("LogoThumbnail"),S=(0,s.g2)("b-input"),A=(0,s.g2)("b-field"),P=(0,s.g2)("font-awesome-icon"),I=(0,s.g2)("b-dropdown-item"),M=(0,s.g2)("b-dropdown"),x=(0,s.g2)("TipTap"),N=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.Wv)(N,{"model-value":i.isOpen,"has-modal-card":"","trap-focus":"","can-cancel":["escape","x"],"onUpdate:modelValue":F.handleModalState},{default:(0,s.k6)(()=>[(0,s.Lk)("div",n,[(0,s.Lk)("header",o,[(0,s.bF)(T,{item:i.recipient,"is-type":"roundMedium"},null,8,["item"]),(0,s.Lk)("div",l,[(0,s.Lk)("p",r,(0,a.v_)(F.recipientName),1),(0,s.Lk)("p",d,(0,a.v_)(i.recipient.email),1)]),(0,s.Lk)("button",{class:"delete","aria-label":e.$t("Close"),onClick:t[0]||(t[0]=(...e)=>F.close&&F.close(...e))},null,8,c)]),(0,s.Lk)("section",u,[(0,s.Lk)("p",m,(0,a.v_)(F.senderLine),1),(0,s.bF)(A,{label:e.$t("Subject"),type:$.subjectError?"is-danger":"",message:$.subjectError},{default:(0,s.k6)(()=>[(0,s.bF)(S,{ref:"subjectInput",modelValue:$.subject,"onUpdate:modelValue":t[1]||(t[1]=e=>$.subject=e),maxlength:"200","has-counter":!1,placeholder:e.$t("What is this email about?")},null,8,["modelValue","placeholder"])]),_:1},8,["label","type","message"]),(0,s.Lk)("div",p,[(0,s.Lk)("label",h,(0,a.v_)(e.$t("Message")),1),(0,s.bF)(M,{"aria-role":"list",position:"is-bottom-left",class:"send-email-placeholders"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",g,[(0,s.Lk)("span",f,[(0,s.bF)(P,{icon:"fa-light fa-brackets-curly"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Insert name")),1)])]),default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(F.emailPlaceholders,e=>((0,s.uX)(),(0,s.Wv)(I,{key:e.value,"aria-role":"listitem",onClick:t=>F.insertPlaceholder(e)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",b,[(0,s.Lk)("span",null,(0,a.v_)(e.description),1),(0,s.Lk)("span",y,(0,a.v_)(e.value),1)])]),_:2},1032,["onClick"]))),128))]),_:1})]),(0,s.bF)(x,{ref:"editor",modelValue:$.body,"onUpdate:modelValue":t[2]||(t[2]=e=>$.body=e),"is-editable":!0,"has-placeholders":!0,"initial-height":"220px"},null,8,["modelValue"])]),(0,s.Lk)("footer",v,[(0,s.Lk)("p",k,(0,a.v_)(e.$t("The message is sent with your organisation branding and an unsubscribe link.")),1),(0,s.Lk)("div",C,[(0,s.Lk)("button",{class:"button is-rounded",onClick:t[3]||(t[3]=(...e)=>F.close&&F.close(...e))},(0,a.v_)(e.$t("Cancel")),1),(0,s.Lk)("button",{class:(0,a.C4)(["button is-primary is-rounded",{"is-loading":$.isSending}]),disabled:!F.canSend,onClick:t[4]||(t[4]=(...e)=>F.send&&F.send(...e))},[(0,s.Lk)("span",w,[(0,s.Lk)("span",_,[(0,s.bF)(P,{icon:"fa-light fa-paper-plane"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Send email")),1)])],10,L)])])])]),_:1},8,["model-value","onUpdate:modelValue"])}var $=i(40834),F=i(53719),T=i(31823),S=i(61273),A={name:"SendCustomEmailModal",components:{TipTap:F.A,LogoThumbnail:T.A,FontAwesomeIcon:S.gc},props:{isOpen:{type:Boolean,default:!1},recipientType:{type:String,required:!0,validator:e=>["user","contact"].includes(e)},recipient:{type:Object,required:!0}},emits:["close","sent"],data(){return{subject:"",body:"",isSending:!1,subjectError:""}},computed:{...(0,$.L8)(["tenant"]),recipientName(){return this.recipient.fullName||this.recipient.name||""},senderLine(){const e=this.tenant?.name||"",t=this.tenant?.contactEmail;return t?this.$t("Sent as {organisation}, replies go to {email}",{organisation:e,email:t}):this.$t("Sent as {organisation}",{organisation:e})},canSend(){return!this.isSending&&""!==this.subject.trim()&&this.hasBodyContent},hasBodyContent(){return""!==this.body.replace(/<[^>]*>/g,"").replace(/ /g," ").trim()||/<img\b/i.test(this.body)},endpoint(){const e="user"===this.recipientType?"users":"contacts";return`/${e}/${this.recipient.id}/send-email`},emailPlaceholders(){return[{value:"{{firstName}}",description:this.$t("Recipient first name")},{value:"{{lastName}}",description:this.$t("Recipient last name")},{value:"{{fullName}}",description:this.$t("Recipient full name")},{value:"{{organizationName}}",description:this.$t("Organization name")},{value:"{{platformLink}}",description:this.$t("Platform link")}]}},watch:{isOpen(e){e&&(this.subjectError="",this.$nextTick(()=>this.$refs.subjectInput?.focus()))},"recipient.id"(){this.reset()}},methods:{reset(){this.subject="",this.body="",this.subjectError="",this.isSending=!1},handleModalState(e){e||this.close()},close(){this.$emit("close")},insertPlaceholder(e){const t=this.$refs.editor?.editor;if(!t)return;const i=e.value.replace(/[{}]/g,"").trim();t.chain().focus().insertContent(`<span data-placeholder="${i}" class="email-placeholder">${e.value}</span>`).run()},send(){this.canSend&&(this.subjectError="",this.isSending=!0,this.$http.plain.post(this.endpoint,{subject:this.subject.trim(),body:this.body}).then(()=>
1{this.$buefy.toast.open({message:this.$t("Email sent to {name}",{name:this.recipientName}),type:"is-success",duration:4e3}),this.reset(),this.$emit("sent"),this.close()}).catch(e=>{console.error(e);const t=e.response?.status;let i=this.$t("The email could not be sent");409===t?i=this.$t("This person has unsubscribed and cannot be emailed"):429===t?i=this.$t("Too many emails sent recently, please try again later"):403===t?i=this.$t("You are not allowed to email this person"):400===t&&(i=e.response?.data?.detail||this.$t("The email could not be sent")),this.$buefy.toast.open({message:i,type:"is-danger",duration:5e3})}).finally(()=>{this.isSending=!1}))}}},P=i(66262);const I=(0,P.A)(A,[["render",E],["__scopeId","data-v-2571fa64"]]);var M=I},83806:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(90033);const n={key:0,class:"mt-3"},o=["href"],l=["src"];function r(e,t,i,r,d,c){const u=(0,s.g2)("b-autocomplete"),m=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.CE)("div",null,[(0,s.bF)(m,{label:i.label,class:(0,a.C4)(i.isRequired?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(u,{modelValue:d.selectedLocation,"onUpdate:modelValue":t[0]||(t[0]=e=>d.selectedLocation=e),data:d.placesAPIData,placeholder:i.placeholder,loading:d.isFetching,clearable:!0,"clear-on-select":!1,required:i.isRequired,onInput:c.getAsyncData,onFocus:c.onLocationFocus,onSelect:c.handleSelect},null,8,["modelValue","data","placeholder","loading","required","onInput","onFocus","onSelect"])]),_:1},8,["label","class"]),d.staticMapImageUrl&&d.selectedLocation?((0,s.uX)(),(0,s.CE)("p",n,[(0,s.Lk)("a",{href:d.googleMapsCoordinatesRedirect,target:"_blank"},[(0,s.Lk)("img",{src:d.staticMapImageUrl,style:{width:"713px","border-radius":"12px"}},null,8,l)],8,o)])):(0,s.Q3)("",!0)])}i(44114),i(18111),i(7588);var d=i(38221),c=i.n(d),u={props:{modelValue:{type:Object,default:null},label:{type:String,default:"Location on members map"},placeholder:{type:String,default:"Location"},isRequired:{type:Boolean,default:!1}},data(){return{selectedLocation:null,placesAPIData:[],placesAPIDataIDs:[],isFetching:!1,staticMapImageUrl:null,googleMapsCoordinatesRedirect:null,placeId:null}},watch:{modelValue(e){e&&e.placeName&&!this.selectedLocation&&this.initFromModelValue()}},created(){this.modelValue&&this.modelValue.placeName&&this.initFromModelValue()},methods:{initFromModelValue(){this.selectedLocation=this.modelValue.placeName,this.placeId=this.modelValue.placeId,this.modelValue.latitude&&this.modelValue.longitude&&(this.googleMapsCoordinatesRedirect=`https://www.google.com/maps/place/${this.modelValue.latitude},${this.modelValue.longitude}`,this.placeId&&this.getStaticMapImage())},getStaticMapImage(){this.isFetching=!0,this.$http.plain.get("get-static-image/"+this.placeId).then(e=>{this.staticMapImageUrl=e.data.imageUrl;const t=e.data.latitude,i=e.data.longitude;this.googleMapsCoordinatesRedirect=`https://www.google.com/maps/place/${t},${i}`;const s={placeName:this.selectedLocation,placeId:this.placeId,latitude:t,longitude:i,formattedAddress:e.data.formattedAddress};this.$emit("update:modelValue",s)}).catch(e=>{console.log(e)}).finally(()=>{this.isFetching=!1})},getAsyncData:c()(function(e){if("object"===typeof e&&e?.key&&["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.key))return;const t="string"===typeof e?e:this.selectedLocation;!t||t.length<3?this.placesAPIData=[]:(this.isFetching=!0,this.placesAPIData=[],this.$http.plain.get("google-places-search/"+encodeURIComponent(t)).then(e=>{const t=[],i=[];e.data.forEach(e=>{t.push(e.name),i.push({name:e.name,placeId:e.placeId})}),this.placesAPIData=t,this.placesAPIDataIDs=i}).catch(e=>{console.log(e)}).finally(()=>{this.isFetching=!1}))},300),onLocationFocus(){this.selectedLocation&&this.selectedLocation.length>=3&&this.getAsyncData(this.selectedLocation)},handleSelect(e){if(e){for(let t=0;t<this.placesAPIDataIDs.length;t++)if(this.placesAPIDataIDs[t].name===e){this.placeId=this.placesAPIDataIDs[t].placeId,this.staticMapImageUrl=null;const i={placeName:e,placeId:this.placeId};this.$emit("update:modelValue",i);break}
1this.selectedLocation=e,this.getStaticMapImage()}}}},m=i(66262);const p=(0,m.A)(u,[["render",r]]);var h=p},85124:function(e,t,i){"use strict";i.d(t,{A:function(){return H}});var s=i(20641),a=i(90033),n=i(53751);const o={key:0,class:"ndm-carousel-section"},l={class:"ndm-section-header"},r={class:"ndm-section-title"},d=["onClick"],c={class:"ndm-member-avatar"},u={class:"ndm-member-info"},m={class:"ndm-member-name"},p={class:"ndm-member-meta"},h={key:0},g={key:1},f=["disabled","onClick"],b={key:1,class:"button is-small is-rounded is-light ndm-member-btn",disabled:""},y={class:"ndm-member-avatar"},v={class:"ndm-load-more-icon"},k={class:"ndm-member-info"},C={class:"ndm-member-name"},L={key:1,class:"ndm-member-card"},w={class:"ndm-member-avatar"},_={class:"ndm-member-info"},E={key:1,class:"nd-sidebar-card"},$={class:"nd-sidebar-header"},F={class:"nd-sidebar-title"},T=["onClick"],S={class:"nd-member-info"},A={class:"nd-member-name"},P={class:"nd-member-meta"},I={key:0},M={key:1},x={key:2},N=["disabled","onClick"],U={key:1,class:"button is-small is-rounded is-light nd-member-btn",disabled:""},D={key:1,class:"nd-member-item"},X={class:"nd-member-info"},V={class:"nd-member-load-more-icon"},R={class:"nd-member-info"},O={class:"nd-member-name"};function Q(e,t,i,Q,B,G){const W=(0,s.g2)("SystemStub"),j=(0,s.g2)("LogoThumbnail"),z=(0,s.g2)("font-awesome-icon"),q=(0,s.g2)("b-skeleton");return"mobile"===e.device&&e.showsShell?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[(0,s.Lk)("span",r,(0,a.v_)(e.$t("Discover members").toUpperCase()),1)]),e.showsStub?((0,s.uX)(),(0,s.Wv)(W,{key:0,animated:e.isPending,shape:"member",count:3,"is-strip":""},null,8,["animated"])):(0,s.Q3)("",!0),(0,s.Lk)("div",{class:(0,a.C4)(["ndm-scroll-row ndm-member-row",{"is-single":1===G.recommendedUsers.length}])},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(G.recommendedUsers,i=>((0,s.uX)(),(0,s.CE)("div",{key:"mmember_"+i.id,class:"ndm-member-card",onClick:e=>G.openProfile(i)},[t[2]||(t[2]=(0,s.Lk)("div",{class:"ndm-member-banner"},null,-1)),(0,s.Lk)("div",c,[(0,s.bF)(j,{item:i,"is-type":"roundLarge"},null,8,["item"])]),(0,s.Lk)("div",u,[(0,s.Lk)("div",m,(0,a.v_)(i.fullName),1),(0,s.Lk)("div",p,[i.professionHeadline?((0,s.uX)(),(0,s.CE)("span",h,(0,a.v_)(i.professionHeadline),1)):i.townCurrent?((0,s.uX)(),(0,s.CE)("span",g,(0,a.v_)(i.townCurrent.name),1)):(0,s.Q3)("",!0)])]),e.tenant?.settingFeatures?.users?.hasConnections&&!i.connectionPending?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-rounded is-light ndm-member-btn",{"is-loading":B.connectingUserIds.includes(i.id)}]),disabled:B.connectingUserIds.includes(i.id),onClick:(0,n.D$)(e=>G.connect(i),["stop"])},[(0,s.bF)(z,{icon:"fa-light fa-user-plus"}),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Connect")),1)],10,f)):i.connectionPending?((0,s.uX)(),(0,s.CE)("button",b,(0,a.v_)(e.$t("Pending")),1)):(0,s.Q3)("",!0)],8,d))),128)),G.hasMoreMembers?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"ndm-member-card ndm-member-load-more",onClick:t[0]||(t[0]=(...e)=>G.loadMore&&G.loadMore(...e))},[t[3]||(t[3]=(0,s.Lk)("div",{class:"ndm-member-banner"},null,-1)),(0,s.Lk)("div",y,[(0,s.Lk)("div",v,[(0,s.bF)(z,{icon:"fa-light fa-users"})])]),(0,s.Lk)("div",k,[(0,s.Lk)("div",C,(0,a.v_)(e.$t("Discover more people")),1)])])):(0,s.Q3)("",!0),B.isLoadingMoreMembers?((0,s.uX)(),(0,s.CE)("div",L,[t[4]||(t[4]=(0,s.Lk)("div",{class:"ndm-member-banner"},null,-1)),(0,s.Lk)("div",w,[(0,s.bF)(q,{circle:"",width:"72px",height:"72px"})]),(0,s.Lk)("div",_,[(0,s.bF)(q,{width:"80%"}),(0,s.bF)(q,{width:"60%",height:"10px"})])])):(0,s.Q3)("",!0)],2)])):e.showsShell?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.Lk)("div",$,[(0,s.Lk)("span",F,(0,a.v_)(e.$t("Discover members").toUpperCase()),1)]),e.showsStub?((0,s.uX)(),(0,s.Wv)(W,{key:0,animated:e.isPending,shape:"member",count:3,"is-strip":e.isCarousel},null,8,["animated","is-strip"])):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(G.recommendedUsers,t=>((0,s.uX)(),(0,s.CE)("div",{key:"member_"+t.id,class:"nd-member-item is-clickable",onClick:e=>G.openProfile(t)},[(0,s.bF)(j,{item:t,"is-type":"roundSmall"},null,8,["item"]),(0,s.Lk)("div",S,[(0,s.Lk)("div",A,(0,a.v_)(t.fullName),1),(0,s.Lk)("div",P,[t.professionHeadline?((0,s.uX)(),(0,s.CE)("span",I,(0,a.v_)(t.professionHeadline),1)):(0,s.Q3)("",!0),t.professionHeadline&&t.townCurrent?((0,s.uX)(),(0,s.CE)("span",M,"·")):(0,s.Q3)("",!0),t.townCurrent?((0,s.uX)(),(0,s.CE)("span",x,(0,a.v_)(t.townCurrent.name),1)):(0,s.Q3)("",!0)])]),e.tenant?.settingFeatures?.users?.hasConnections&&!t.connectionPending?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-rounded is-outlined is-primary nd-member-btn",{"is-loading":B.connectingUserIds.includes(t.id)}]),disabled:B.connectingUserIds.includes(t.id),onClick:(0,n.D$)(e=>G.connect(t),["stop"])},(0,a.v_)(e.$t("Connect")),11,N)):t.connectionPending?((0,s.uX)(),(0,s.CE)("button",U,(0,a.v_)(e.$t("Pending")),1)):(0,s.Q3)("",!0)],8,T))),128)),B.isLoadingMoreMembers?((0,s.uX)(),(0,s.CE)("div",D,[(0,s.bF)(q,{circle:"",width:"36px",height:"36px"}),(0,s.Lk)("div",X,[(0,s.bF)(q,{width:"60%"}),(0,s.bF)(q,{width:"40%",height:"10px"})])])):(0,s.Q3)("",!0),G.hasMoreMembers&&!B.isLoadingMoreMembers?((0,s.uX)(),(0,s.CE)("div",{key:2,class:"nd-member-item nd-member-load-more is-cl
1ickable",onClick:t[1]||(t[1]=(...e)=>G.loadMore&&G.loadMore(...e))},[(0,s.Lk)("div",V,[(0,s.bF)(z,{icon:"fa-light fa-users"})]),(0,s.Lk)("div",R,[(0,s.Lk)("div",O,(0,a.v_)(e.$t("Discover more people")),1)])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)}i(44114),i(18111),i(22489);var B=i(40834),G=i(31823),W=i(77467),j=i(18024),z={name:"SystemMembers",components:{SystemStub:W.A,LogoThumbnail:G.A},mixins:[j.A],emits:["connection-sent"],data(){return{total:0,page:1,isLoadingMoreMembers:!1,connectingUserIds:[]}},computed:{...(0,B.L8)(["tenant","user"]),recommendedUsers(){return this.items},hasMoreMembers(){return this.items.length<this.total}},methods:{fetch(){this.isLoading=!0,this.$http.plain.get("/user-recommendations",{params:{page:this.page,itemsPerPage:5}}).then(e=>{this.items=[...this.items,...this.hydraMembers(e.data)],this.total=e.data["hydra:totalItems"]||this.items.length}).catch(e=>{console.log(e)}).finally(()=>{this.isLoading=!1,this.isLoadingMoreMembers=!1})},loadMore(){this.isLoadingMoreMembers||(this.isLoadingMoreMembers=!0,this.page+=1,this.fetch())},openProfile(e){this.$router.push({name:"UserShow",params:{item:e.id}})},connect(e){this.connectingUserIds.push(e.id),this.$http.plain.post("/user-connections",{recipient:`/api/v1/users/${e.id}`}).then(t=>{e.connectionPending=!0,this.$emit("connection-sent",t.data)}).catch(e=>{console.log(e)}).finally(()=>{this.connectingUserIds=this.connectingUserIds.filter(t=>t!==e.id)})}}},q=i(66262);const J=(0,q.A)(z,[["render",Q],["__scopeId","data-v-1ded7aa5"]]);var H=J},85619:function(e,t,i){"use strict";i(44114);var s=i(38221),a=i.n(s),n=i(95256);const o=5,l=function(e,t){const i="string"===typeof e?e:"",s="number"===typeof t?t:i.length,a=i.substring(0,s),n=a.lastIndexOf("@");if(-1===n)return{active:!1,startIndex:null,term:""};if(n>0&&!/\s/.test(i[n-1]))return{active:!1,startIndex:null,term:""};const l=a.substring(n+1);return l.includes(" ")&&l.split(" ").length>o?{active:!1,startIndex:null,term:""}:{active:!0,startIndex:n,term:l}},r=function(e,t,i,s){const a="string"===typeof e?e:"",n="number"===typeof t?t:a.length,o=a.substring(0,i),l=a.substring(n),r=`@${s} `;return{text:o+r+l,caret:o.length+r.length}};t.Ay={data(){return{showMentionDropdown:!1,mentionResults:[],contactResults:[],mentionSearchTerm:"",mentionStartIndex:null,selectedMentionIndex:0,isLoadingMentions:!1,isSelectingMention:!1,trackedMentions:[],trackedContactMentions:[]}},computed:{canMentionContacts(){const{project:e}=this.mentionContext();return!!e&&(0,n.U4)(this.isGranted)},totalMentionResults(){return this.mentionResults.length+this.contactResults.length}},created(){this.searchMentionPeopleDebounced=a()(this.searchMentionPeople,300)},methods:{detectMention(){const e=this.mentionInputEl(),t=this.mentionText()||"",{active:i,startIndex:s,term:a}=l(t,e?e.selectionStart:t.length);i?(this.mentionStartIndex=s,this.mentionSearchTerm=a,this.showMentionDropdown=!0,a.length>=1?(this.isLoadingMentions=!0,this.searchMentionPeopleDebounced(a)):(this.mentionResults=[],this.isLoadingMentions=!1)):this.closeMentionDropdown()},searchMentionPeople(e){if(!e)return;this.isLoadingMentions=!0,this.selectedMentionIndex=0;const{project:t,discussion:i}=this.mentionContext();let s;s=t?"/search-project-user/"+t.uuid+"/"+encodeURIComponent(e):i?"/search-discussion-user/"+i.id+"/"+encodeURIComponent(e):"/search-user/"+encodeURIComponent(e),this.$http.plain.get(s).then(e=>{this.mentionResults=e.data}).catch(e=>{console.error(e),this.mentionResults=[]}).finally(()=>{this.isLoadingMentions=!1}),this.canMentionContacts?this.$http.plain.get("/search-mention-contact/"+encodeURIComponent(e)).then(e=>{this.contactResults=e.data}).catch(e=>{console.error(e),this.contactResults=[]}):this.contactResults=[]},handleMentionKeydown(e){return!(!this.showMentionDropdown||0===this.totalMentionResults)&&("ArrowDown"===e.key?(e.preventDefault(),this.selectedMentionIndex=Math.min(this.selectedMentionIndex+1,this.totalMentionResults-1),!0):"ArrowUp"===e.key?(e.preventDefault(),this.selectedMentionIndex=Math.max(this.selectedMentionIndex-1,0),!0):"Enter"===e.key||"Tab"===e.key?(e.preventDefault(),this.selectedMentionIndex<this.mentionResults.length?this.selectMention(this.mentionResults[this.selectedMentionIndex]):this.selectContactMention(this.contactResults[this.selectedMentionIndex-this.mentionResults.length]),!0):"Escape"===e.key&&(e.preventDefault(),this.closeMentionDropdown(),!0))},selectMention(e){if(!e)return;const t=[e.firstName,e.lastName].filter(e=>"string"===typeof e&&e.length>0).join(" ")||e.email||`user${e.id}`;this.applyMention(t),this.trackedMentions.includes(e.id)||(this.trackedMentions.push(e.id),this.$emit("mentions-changed",this.trackedMentions))},selectContactMention(e){e&&(this.applyMention(e.name||`contact${e.id}`),this.trackedContactMentions.includes(e.id)||(this.trackedContactMentions.push(e.id),this.$emit("contact-mentions-changed",this.trackedContactMentions)))},applyMention(e){const t=this.mentionInputEl(),i=this.mentionText()||"",{text:s,caret:a}=r(i,t?t.selectionStart:i.length,this.mentionStartIndex,e);this.setMentionText(s),this.closeMentionDropdown(),this.isSelectingMention=!1,this.$nextTick(()=>{t&&(t.focus(),t.setSelectionRange(a,a))})},closeMentionDropdown(){this.showMentionDropdown=!1,this.mentionResults=[],this.contactResults=[],this.mentionSearchTerm="",this.mentionStartIndex=null,this.selectedMentionIndex=0},getMentions(){return this.trackedMentions},getContactMentions(){return this.trackedContactMentions},clearMentions(){this.trackedMentions=[],this.trackedContactMentions=[],this.$emit("mentions-changed",this.trackedMentions),this.$emit("contact-mentions-changed",this.trackedContactMentions)}}}},86489:function(e,t,i){"use strict";i.d(t,{A:function(){return _}});var s=i(20641),a=i(90033),n=i(53751);const o=["href"],l={class:"o-website-link__label"},r={key:0,class:"o-website-link__description"},d={class:"o-website-link__label"},c={key:0,class:"o-website-link__description"},u=["href"],m={class:"o-website-link__label"},p={key:0,class:"o-website-link__description"},h=["href"],g={class:"o-website-link__label"},f={key:0,class:"o-website-link__description"},b={class:"o-website-link__label"};function y(e,t,i,y,v,k){const C=(0,s.g2)("router-link");return k.appHref?((0,s.uX)(),(0,s.CE)("a",{key:0,class:(0,a.C4)(i.linkClass),href:k.appHref,onClick:t[0]||(t[0]=t=>e.$emit("navigate"))},[(0,s.Lk)("span",l,(0,a.v_)(i.item.label),1),i.description?((0,s.uX)(),(0,s.CE)("span",r,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0)],10,o)):k.routeTarget?((0,s.uX)(),(0,s.Wv)(C,{key:1,class:(0,a.C4)(i.linkClass),to:k.routeTarget,onClick:t[1]||(t[1]=t=>e.$emit("navigate"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",d,(0,a.v_)(i.item.label),1),i.description?((0,s.uX)(),(0,s.CE)("span",c,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0)]),_:1},8,["class","to"])):"URL"===i.item.linkType?((0,s.uX)(),(0,s.CE)("a",{key:2,class:(0,a.C4)(i.linkClass),href:i.item.target,target:"_blank",rel:"noopener noreferrer",onClick:t[2]||(t[2]=t=>e.$emit("navigate"))},[(0,s.Lk)("span",m,(0,a.v_)(i.item.label),1),i.description?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0)],10,u)):"ANCHOR"===i.item.linkType?((0,s.uX)(),(0,s.CE)("a",{key:3,class:(0,a.C4)(i.linkClass),href:`#${i.item.target}`,onClick:t[3]||(t[3]=(0,n.D$)((...e)=>k.goAnchor&&k.goAnchor(...e),["prevent"]))},[(0,s.Lk)("span",g,(0,a.v_)(i.item.label),1),i.description?((0,s.uX)(),(0,s.CE)("span",f,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0)],10,h)):i.hasChildren?((0,s.uX)(),(0,s.CE)("span",{key:4,class:(0,a.C4)(i.linkClass)},[(0,s.Lk)("span",b,(0,a.v_)(i.item.label),1)],2)):(0,s.Q3)("",!0)}i(44114);var v=i(91495),k=i(14470),C={name:"WebsiteMenuLink",inject:{website:{default:null}},props:{item:{type:Object,required:!0},linkClass:{type:String,default:null},hasChildren:{type:Boolean,default:!1},description:{type:String,default:null}}
1,emits:["navigate"],computed:{appHref(){if("ROUTE"!==this.item.linkType||!k.JQ[this.item.target])return null;const e=this.website?.site?.tenant?.appHost||null;if("undefined"!==typeof window&&window.location.hostname.toLowerCase()===String(e||"").toLowerCase())return null;const t="undefined"!==typeof window?window.location.href:this.website?.site?.publicOrigin||this.website?.site?.origin||null;return(0,k.pV)(e,this.item.target,t)},routeTarget(){return this.item.target?"PAGE"===this.item.linkType?(0,v.K7)(this.website?.site,this.item.target):"ROUTE"===this.item.linkType?{name:this.item.target}:"URL"===this.item.linkType?(0,k.es)(this.item.target):null:null}},methods:{goAnchor(){const e=document.getElementById(this.item.target);e?e.scrollIntoView({behavior:"smooth",block:"start"}):this.$router.push({...(0,v.ww)(this.website?.site),hash:`#${this.item.target}`}),this.$emit("navigate")}}},L=i(66262);const w=(0,L.A)(C,[["render",y]]);var _=w},86827:function(e,t,i){"use strict";i.d(t,{A:function(){return G}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"upload-wrap ml-3"},l={key:0,class:"upload-buttons"},r={class:"drop-zone"},d={class:"title is-3 has-text-black"},c={key:1,class:"upload-buttons"},u={class:"icon-text"},m={class:"is-small"},p={class:"icon-text"},h={class:"is-small"},g={class:"icon-text"},f={class:"is-small"},b={key:0,class:"drop-zone"},y={class:"title is-3 has-text-black"},v={class:"icon"},k={class:"icon"},C={key:3,class:"o-discuss-gallery"},L=["src"],w=["onClick"],_={key:0,class:"o-gallery-item"},E=["src"],$=["onClick"],F={key:4,class:"o-discuss-gallery"},T=["src","type"],S=["onClick"],A={key:0,class:"o-gallery-item"},P=["src"],I=["onClick"],M={key:5,class:"o-discuss-files"},x=["href"],N=["onClick"],U=["onClick"];function D(e,t,i,D,X,V){const R=(0,s.g2)("b-upload"),O=(0,s.g2)("font-awesome-icon"),Q=(0,s.g2)("b-tag");return(0,s.uX)(),(0,s.CE)("div",o,[!i.isComment&&i.isDragging?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("div",r,[(0,s.bF)(R,{multiple:"","drag-drop":"","onUpdate:modelValue":V.checkUploadSize},{default:(0,s.k6)(()=>[(0,s.Lk)("h1",d,(0,a.v_)(e.$t("Drop Here")),1)]),_:1},8,["onUpdate:modelValue"])])])):(0,s.Q3)("",!0),i.isComment?((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,a.C4)(["is-flex align-items-center is-justify-content-flex-end",{"is-hidden-visually":i.hideButtons&&!i.isDragging}])},[i.isDragging?((0,s.uX)(),(0,s.CE)("div",b,[(0,s.bF)(R,{multiple:"","drag-drop":"","onUpdate:modelValue":V.checkUploadSize},{default:(0,s.k6)(()=>[(0,s.Lk)("span",y,(0,a.v_)(e.$t("Drop Here")),1)]),_:1},8,["onUpdate:modelValue"])])):(0,s.Q3)("",!0),(0,s.bF)(R,{ref:"photosButton",modelValue:X.photos,"onUpdate:modelValue":[t[3]||(t[3]=e=>X.photos=e),V.checkUploadSize],class:"commentUploadButton",multiple:"","drag-drop":"",disabled:i.isDragging,accept:"image/*"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",v,[(0,s.bF)(O,{icon:"fa-light fa-image"})])]),_:1},8,["modelValue","disabled","onUpdate:modelValue"]),(0,s.bF)(R,{ref:"filesButton",modelValue:X.files,"onUpdate:modelValue":[t[4]||(t[4]=e=>X.files=e),V.checkUploadSize],multiple:"",class:"commentUploadButton","drag-drop":"",disabled:i.isDragging},{default:(0,s.k6)(()=>[(0,s.Lk)("span",k,[(0,s.bF)(O,{icon:"fa-light fa-folder"})])]),_:1},8,["modelValue","disabled","onUpdate:modelValue"])],2)):(0,s.bo)(((0,s.uX)(),(0,s.CE)("div",c,[(0,s.bF)(R,{ref:"photosButton",modelValue:X.photos,"onUpdate:modelValue":[t[0]||(t[0]=e=>X.photos=e),V.checkUploadSize],multiple:"","drag-drop":"",disabled:i.isDragging,accept:"image/*"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",u,[(0,s.Lk)("span",m,[(0,s.bF)(O,{icon:"fa-light fa-image"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Images")),1)])]),_:1},8,["modelValue","disabled","onUpdate:modelValue"]),(0,s.bF)(R,{ref:"videosButton",modelValue:X.videos,"onUpdate:modelValue":[t[1]||(t[1]=e=>X.videos=e),V.checkUploadSize],multiple:"","drag-drop":"",disabled:i.isDragging,accept:"video/*"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",p,[(0,s.Lk)("span",h,[(0,s.bF)(O,{icon:"fa-light fa-video"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Videos")),1)])]),_:1},8,["modelValue","disabled","onUpdate:modelValue"]),(0,s.bF)(R,{ref:"filesButton",modelValue:X.files,"onUpdate:modelValue":[t[2]||(t[2]=e=>X.files=e),V.checkUploadSize],multiple:"","drag-drop":"",disabled:i.isDragging},{default:(0,s.k6)(()=>[(0,s.Lk)("span",g,[(0,s.Lk)("span",f,[(0,s.bF)(O,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("files")),1)])]),_:1},8,["modelValue","disabled","onUpdate:modelValue"])],512)),[[n.aG,!i.hideButtons]]),i.medias&&i.medias.length>0||X.photos&&X.photos.length>0?((0,s.uX)(),(0,s.CE)("div",C,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(X.photos,(e,t)=>((0,s.uX)(),(0,s.CE)("figure",{key:e.id,class:"o-gallery-item"},[((0,s.uX)(),(0,s.CE)("img",{key:t,src:X.url.createObjectURL(e)},null,8,L)),(0,s.Lk)("button",{class:"delete is-small",onClick:e=>V.deletePostPhotos(t)},null,8,w)]))),128)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.medias,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},["postimage"===e.type?((0,s.uX)(),(0,s.CE)("figure",_,[((0,s.uX)(),(0,s.CE)("img",{key:t,src:V.mediaSrc(e)},null,8,E)),(0,s.Lk)("button",{class:"delete is-small",onClick:i=>V.deleteCurrentMedia(t,e)},null,8,$)])):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0),i.medias&&i.medias.length>0||X.videos&&X.videos.length>0?((0,s.uX)(),(0,s.CE)("div",F,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(X.videos,(e,i)=>((0,s.uX)(),(0,s.CE)("figure",{key:e.id,class:"o-gallery-item"},[((0,s.uX)(),(0,s.CE)("video",{key:i,preload:"metadata",muted:""},[(0,s.Lk)("source",{src:X.url.createObjectURL(e),type:e.mimeType},null,8,T),t[5]||(t[5]=(0,s.eW)(" Your browser does not support the video tag. ",-1))])),(0,s.Lk)("button",{class:"delete is-small",type:"button",onClick:e=>V.deletePostVideos(i)},null,8,S)]))),128)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.medias,(e,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id},["postvideo"===e.type?((0,s.uX)(),(0,s.CE)("figure",A,[((0,s.uX)(),(0,s.CE)("video",{key:i,preload:"metadata",muted:""},[(0,s.Lk)("source",{src:V.mediaSrc(e),type:"video/mp4"},null,8,P),t[6]||(t[6]=(0,s.eW)(" Your browser does not support the video tag. ",-1))])),(0,s.Lk)("button",{class:"delete is-small",type:"button",onClick:t=>V.deleteCurrentMedia(i,e)},null,8,I)])):(0,s.Q3)("",!0)],64))),128))])):(0,s.Q3)("",!0),i.medias&&i.medias.length>0||X.files&&X.files.length>0?((0,s.uX)(),(0,s.CE)("div",M,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.medias,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.id}
1,["postfile"===e.type?((0,s.uX)(),(0,s.Wv)(Q,{key:0,type:"is-default"},{default:(0,s.k6)(()=>[((0,s.uX)(),(0,s.CE)("a",{key:t,href:V.mediaSrc(e),target:"_blank"},(0,a.v_)(e.originalName),9,x)),(0,s.Lk)("button",{class:"delete is-small",onClick:i=>V.deleteCurrentMedia(t,e)},null,8,N)]),_:2},1024)):(0,s.Q3)("",!0)],64))),128)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(X.files,(e,t)=>((0,s.uX)(),(0,s.Wv)(Q,{key:t,type:"is-info"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.name)+" "+(0,a.v_)(V.formatBytes(e.size))+" ",1),(0,s.Lk)("button",{class:"delete is-small",onClick:e=>V.deletePostFiles(t)},null,8,U)]),_:2},1024))),128))])):(0,s.Q3)("",!0)])}i(44114),i(18111),i(7588),i(14603),i(47566),i(98721);var X=i(28782),V=i(95256),R=i(78048),O={components:{BUpload:R.g9},props:{medias:{type:Array,default:()=>[]},item:{type:Object,default:null},isFormModal:{type:Boolean,default:!1},isDragAndDropActive:{type:Boolean,default:!1},isComment:{type:Boolean,default:!1},isDragging:{type:Boolean,default:!1},hideButtons:{type:Boolean,default:!1},resizeImages:{type:Boolean,default:!0}},data(){return{photos:[],videos:[],files:[],uploadedMedia:[],removedMedia:[],url:URL}},created(){},methods:{formatBytes:V.z3,mediaSrc:V.F9,triggerPhotoUpload(){this.$refs.photosButton?.$el?.querySelector("input")?.click()},triggerVideoUpload(){this.$refs.videosButton?.$el?.querySelector("input")?.click()},triggerFileUpload(){this.$refs.filesButton?.$el?.querySelector("input")?.click()},deletePostPhotos(e){this.photos.splice(e,1),this.$emit("selection-changed")},deletePostVideos(e){this.videos.splice(e,1),this.$emit("selection-changed")},deleteCurrentMedia(e,t){this.medias.splice(e,1),this.removedMedia.push(t.id),this.$emit("selection-changed")},deletePostFiles(e){this.files.splice(e,1),this.$emit("selection-changed")},addExternalFiles(e,t){e.forEach(e=>{e.type.startsWith("image/")?this.photos.push(e):e.type.startsWith("video/")&&!t?this.videos.push(e):this.files.push(e)}),this.checkUploadSize()},checkUploadSize(){let e=0;for(let t of this.photos)e+=t.size;
1for(let t of this.videos)e+=t.size;for(let t of this.files)e+=t.size;e>X.w3&&(this.$buefy.toast.open({duration:1e4,message:this.$t("selectedFiles")+": "+this.formatBytes(e)+". "+this.$t("errorMaxFileSize"),type:"is-danger"}),this.photos=[],this.videos=[],this.files=[]),this.$emit("selection-changed"),this.$emit("drop-handled")},async uploadMedia(e){let t="postimage"===e?this.photos:"postvideo"===e?this.videos:this.files;if(t&&t.length){for await(let i of t)await this.signS3Upload(i,e);this.$emit("update:modelValue",this.uploadedMedia)}},resizeImage(e,t=1400){return new Promise(i=>{if(!e.type.startsWith("image/")||"image/gif"===e.type)return void i(e);const s=new Image;s.onload=()=>{if(URL.revokeObjectURL(s.src),s.width<=t)return void i(e);const a=t/s.width,n=document.createElement("canvas");n.width=t,n.height=Math.round(s.height*a);const o=n.getContext("2d");o.drawImage(s,0,0,n.width,n.height);const l="image/png"===e.type?"image/png":"image/jpeg",r="image/png"===l?void 0:.85;n.toBlob(t=>{i(new File([t],e.name,{type:l}))},l,r)},s.onerror=()=>{URL.revokeObjectURL(s.src),i(e)},s.src=URL.createObjectURL(e)})},async signS3Upload(e,t){this.resizeImages&&"postimage"===t&&(e=await this.resizeImage(e));const i=e.type,s=e.size,a=e.name;await this.$http.plain.get("/s3-upload?fileType="+encodeURIComponent(i)+"&fileName="+encodeURIComponent(a)+"&type="+t).then(a=>{let n=new FormData;for(const[e,t]of Object.entries(a.data.additionalData))n.append(e,t);return n.append("Content-type",i),n.append("acl","public-read"),n.append("file",e,a.data.newFileName),fetch(X.ze+"/",{method:"POST",body:n}).then(e=>{if(200===e.status||204===e.status)return this.$http.plain.post("/medias",{contentUrl:a.data.newFileName,mimeType:i,type:t,size:s}).then(e=>{this.uploadedMedia.push(e.data.id)})})}).catch(e=>console.error(e))}}},Q=i(66262);const B=(0,Q.A)(O,[["render",D]]);var G=B},87651:function(e,t,i){"use strict";i.d(t,{A:function(){return ee}});var s=i(20641),a=i(53751),n=i(90033);const o={class:"columns"},l={key:0,class:"notification is-warning is-light mb-5 mandatory-fields-notification"},r={class:"has-text-weight-semibold mb-3"},d={class:"missing-fields-list"},c=["onClick"],u={class:"field-icon"},m={class:"field-name"},p={class:"field-arrow"},h=["onClick"],g={class:"field-icon"},f={class:"field-name"},b={class:"field-arrow"},y={key:2,class:"is-size-7 mb-5"},v={key:3,class:"is-size-7 mb-5"},k={key:0,class:"card p-4 mb-5"},C={class:"has-text-weight-bold has-text-dark is-size-6 mb-2"},L={key:1,class:"columns"},w={key:0,class:"is-size-7 mb-4 has-text-grey"},_={class:"is-size-7 mb-5 has-text-grey"},E={class:"phone-field-wrapper"},$={key:0,class:"is-size-7 mt-2 mb-3"},F={class:"field has-addons"},T={class:"control"},S={class:"control is-expanded"},A={class:"is-size-7 mb-4 has-text-grey"},P={class:"is-size-7 mb-5 has-text-grey"},I={class:"is-size-7 mb-4 has-text-grey"},M={key:5,class:"card p-4 mb-5"},x={class:"has-text-weight-bold has-text-dark is-size-6 mb-2"},N={key:0,class:"column is-one-quarter"},U={class:"control saveButtonSticky ml-4"},D=["disabled"],X={key:1,class:"ml-4 mr-4"},V=["disabled"];function R(e,t,i,R,O,Q){const B=(0,s.g2)("font-awesome-icon"),G=(0,s.g2)("b-input"),W=(0,s.g2)("b-field"),j=(0,s.g2)("ProfileCustomFieldTags"),z=(0,s.g2)("TownAutocomplete"),q=(0,s.g2)("MapLocationSelector"),J=(0,s.g2)("PersonalIdField"),H=(0,s.g2)("PhoneCountryPrefixSelect"),K=(0,s.g2)("BirthdaySelect"),Y=(0,s.g2)("b-radio"),Z=(0,s.g2)("CustomFieldWidget");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.Lk)("form",{onSubmit:t[38]||(t[38]=(0,a.D$)((...e)=>Q.submitForm&&Q.submitForm(...e),["prevent"]))},[(0,s.Lk)("div",o,[(0,s.Lk)("div",{class:(0,n.C4)(["column",{"mb-6":"OnBoardingUser"!==e.$route.name}])},[i.onBoarding&&(Q.missingMandatoryFields.length>0||Q.missingMandatoryCustomFields.length>0)?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("p",r,(0,n.v_)(e.$t("The following required fields are missing"))+":",1),(0,s.Lk)("div",d,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Q.missingMandatoryFields,t=>((0,s.uX)(),(0,s.CE)("div",{key:t,class:"missing-field-item",onClick:i=>e.$emit("focus-mandatory-field",t)},[(0,s.Lk)("span",u,[(0,s.bF)(B,{icon:"fa-light fa-circle-exclamation",size:"sm"})]),(0,s.Lk)("span",m,(0,n.v_)(Q.getFieldLabel(t)),1),(0,s.Lk)("span",p,[(0,s.bF)(B,{icon:"fa-light fa-arrow-down",size:"sm"})])],8,c))),128)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Q.missingMandatoryCustomFields,t=>((0,s.uX)(),(0,s.CE)("div",{key:t,class:"missing-field-item",onClick:i=>e.$emit("focus-mandatory-custom-field",t)},[(0,s.Lk)("span",g,[(0,s.bF)(B,{icon:"fa-light fa-circle-exclamation",size:"sm"})]),(0,s.Lk)("span",f,(0,n.v_)(Q.getCustomFieldLabel(t)),1),(0,s.Lk)("span",b,[(0,s.bF)(B,{icon:"fa-light fa-arrow-down",size:"sm"})])],8,h))),128))])])):(0,s.Q3)("",!0),i.item.id?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(W,{key:1,label:"Email ("+e.$t("optional")+")",class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(G,{modelValue:i.item.email,"onUpdate:modelValue":t[0]||(t[0]=e=>i.item.email=e),type:"email"},null,8,["modelValue"])]),_:1},8,["label"])),i.item.id?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",y,(0,n.v_)(e.$t("Enables the possibility for the user to login")),1)),(0,s.bo)((0,s.bF)(W,{label:e.$t("Choose a password")+" ("+e.$t("optional")+")",class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(G,{modelValue:i.item.plainPassword,"onUpdate:modelValue":t[1]||(t[1]=e=>i.item.plainPassword=e),type:"password",class:"passwordInput","min-length":"8","password-reveal":""},null,8,["modelValue"]),(0,s.Lk)("button",{class:"button is-primary is-small ml-4 is-outlined is-rounded",type:"button",onClick:t[2]||(t[2]=(...e)=>Q.changePassword&&Q.changePassword(...e))},(0,n.v_)(e.$t("Generate password")),1)]),_:1},8,["label"]),[[a.aG,!i.item.id&&i.item.email&&i.item.email.includes("@")]]),!i.item.id&&i.item.email&&i.item.email.includes("@")?((0,s.uX)(),(0,s.CE)("p",v,(0,n.v_)(e.$t("User will have to reset password if none")),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Q.orderedFieldGroups,(a,o)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"group-"+o},[Q.skillField&&i.item.id&&o===Q.firstCustomGroupIndex?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.Lk)("p",C,(0,n.v_)(e.$t("Skills")),1),(0,s.bF)(j,{item:i.item,field:Q.skillField,"add-label":e.$t("Add a skill")},null,8,["item","field","add-label"])])):(0,s.Q3)("",!0),"name_pair"===a.type?((0,s.uX)(),(0,s.CE)("div",L,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(a.fields,a=>((0,s.uX)(),(0,s.CE)("div",{key:a,class:"column"},["first_name"===a?((0,s.uX)(),(0,s.Wv)(W,{key:0,label:e.$t("firstName"),class:(0,n.C4)(Q.isMandatoryField("first_name")?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"firstNameInput",modelValue:i.item.firstName,"onUpdate:modelValue":t[3]||(t[3]=e=>i.item.firstName=e),required:Q.isMandatoryField("first_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"last_name"===a?((0,s.uX)(),(0,s.Wv)(W,{key:1,label:e.$t("lastName"),class:(0,n.C4)(Q.isMandatoryField("last_name")?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"lastNameInput",modelValue:i.item.lastName,"onUpdate:modelValue":t[4]||(t[4]=e=>i.item.lastName=e),required:Q.isMandatoryField("last_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0)]))),128))])):"location_card"===a.type?((0,s.uX)(),(0,s.CE)("div",{key:2,ref_for:!0,ref:"townCurrentCard",class:"card pr-5 pl-5 pt-1 pb-5 mb-6"},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(a.fields,a=>((0,s.uX)(),(0,s.CE)(s.FK,{key:a},["town_current"===a?((0,s.uX)(),(0,s.Wv)(z,{key:0,ref_for:!0,ref:"townCurrentInput",modelValue:i.item.townCurrent,"onUpdate:modelValue":[t[5]||(t[5]=e=>i.item.townCurrent=e),t[6]||(t[6]=e=>i.item.townCurrent=e)],label:e.$t("townCurrent"),town:i.item.townCurrent,class:"mt-5","is-result-object":!0,"is-required":Q.isMandatoryField("town_current")},null,8,["modelValue","label","town","is-required"])):(0,s.Q3)("",!0),"town_from"===a?((0,s.uX)(),(0,s.Wv)(z,{key:1,modelValue:i.item.townFrom,"onUpdate:modelValue":t[7]||(t[7]=e=>i.item.townFrom=e),label:e.$t("townFrom"),town:i.item.townFrom,"is-result-object":!0,class:"mt-5 mb-5","is-required":Q.isMandatoryField("town_from")},null,8,["modelValue","label","town","is-required"])):(0,s.Q3)("",!0),"map_location"===a?((0,s.uX)(),(0,s.Wv)(q,{key:2,modelValue:Q.mapLocation,"onUpdate:modelValue":t[8]||(t[8]=e=>Q.mapLocation=e),label:e.$t("Location on members map"),placeholder:e.$t("Location"),"is-required":Q.isMandatoryField("map_location"),class:"mt-5"},null,8,["modelValue","label","placeholder","is-required"])):(0,s.Q3)("",!0)],64))),128)),a.fields.includes("town_current")||a.fields.includes("town_from")?((0,s.uX)(),(0,s.CE)("p",w,(0,n.v_)(e.$t("townAutocompleteExplanation")),1)):(0,s.Q3)("",!0),a.fields.includes("town_current")?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[i.item.townCurrent&&i.item.townCurrent.country&&i.item.townCurrent.country.name?((0,s.uX)(),(0,s.Wv)(W,{key:0,label:e.$t("Country of residence")+": "+i.item.townCurrent.country.name,class:"mt-5"},null,8,["label"])):i.item.townCurrent&&i.item.townCurrent.country?((0,s.uX)(),(0,s.Wv)(W,{key:1,label:e.$t("Country of residence")+": "+Q.countryName(i.item.townCurrent.country),class:"mt-5"},null,8,["label"])):(0,s.Q3)("",!0),(0,s.Lk)("p",_,(0,n.v_)(e.$t("Country is set automatically based on selected town of residence")),1)],64)):(0,s.Q3)("",!0)],512)):((0,s.uX)(),(0,s.CE)(s.FK,{key:3},["first_name"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:0,label:e.$t("firstName"),class:(0,n.C4)(Q.isMandatoryField("first_name")?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"firstNameInput",modelValue:i.item.firstName,"onUpdate:modelValue":t[9]||(t[9]=e=>i.item.firstName=e),required:Q.isMandatoryField("first_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"middle_name"===a.field||"first_name"===a.field&&Q.showMiddleNameFallback?((0,s.uX)(),(0,s.Wv)(W,{key:1,label:e.$t("Middle name"),class:(0,n.C4)(Q.isMandatoryField("middle_name")?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"middleNameInput",modelValue:i.item.middleName,"onUpdate:modelValue":t[10]||(t[10]=e=>i.item.middleName=e),autocomplete:"additional-name",required:Q.isMandatoryField("middle_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"personal_id_number"===a.field&&i.item.id&&Q.canRevealPersonalId?((0,s.uX)(),(0,s.Wv)(J,{key:2,modelValue:i.item.personalIdNumber,"onUpdate:modelValue":t[11]||(t[11]=e=>i.item.personalIdNumber=e),"subject-type":"user","subject-id":i.item.id,"has-value":!!i.item.hasPersonalIdNumber,"can-reveal":Q.canRevealPersonalId,label:e.$t("Personal identification number"),hint:e.$t("Stored encrypted. Leave empty to keep the current value.")},null,8,["modelValue","subject-id","has-value","can-reveal","label","hint"])):(0,s.Q3)("",!0),"last_name"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:3,label:e.$t("lastName"),class:(0,n.C4)(Q.isMandatoryField("last_name")?"required":"")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"lastNameInput",modelValue:i.item.lastName,"onUpdate:modelValue":t[12]||(t[12]=e=>i.item.lastName=e),required:Q.isMandatoryField("last_name")},null,8,["modelValue","required"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"phoneNumber"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:4,class:(0,n.C4)(["mt-5 mb-5",Q.isMandatoryField("phoneNumber")?"required":""]),label:e.$t("phoneNumber")},{default:(0,s.k6)(()=>[(0,s.Lk)("div",E,[!i.item.phoneLocalNumber&&i.item.phoneNumber?((0,s.uX)(),(0,s.CE)("p",$,[(0,s.eW)((0,n.v_)(e.$t("Your saved phone number is"))+" ",1),(0,s.Lk)("strong",null,(0,n.v_)(i.item.phoneNumber),1),(0,s.eW)(" . "+(0,n.v_)(e.$t("Fill below, a valid number including country prefix"))+". ",1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",F,[(0,s.Lk)("div",T,[(0,s.bF)(H,{modelValue:i.item.phoneCountry,"onUpdate:modelValue":[t[13]||(t[13]=e=>i.item.phoneCountry=e),t[14]||(t[14]=e=>i.item.phoneNumber=null)],placeholder:e.$t("Prefix"),"is-required":Q.isMandatoryField("phoneNumber")},null,8,["modelValue","placeholder","is-required"])]),(0,s.Lk)("div",S,[(0,s.bF)(G,{ref_for:!0,ref:"phoneNumberInput",modelValue:i.item.phoneLocalNumber,"onUpdate:modelValue":t[15]||(t[15]=e=>i.item.phoneLocalNumber=e),type:"tel",disabled:!i.item.phoneCountry,required:Q.isMandatoryField("phoneNumber"),placeholder:Q.getPhonePlaceholder},null,8,["modelValue","disabled","required","placeholder"])])])])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"birthday"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:5,ref_for:!0,ref:"dateBirthField",class:"mt-5"},{default:(0,s.k6)(()=>[(0,s.bF)(K,{modelValue:i.item.dateBirth,"onUpdate:modelValue":t[16]||(t[16]=e=>i.item.dateBirth=e),user:i.item,"is-required":Q.isMandatoryField("birthday")},null,8,["modelValue","user","is-required"])]),_:1},512)):(0,s.Q3)("",!0),"gender"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:6,ref_for:!0,ref:"genderField",grouped:"",label:e.$t("gender"),class:(0,n.C4)(["mt-4 mb-4",Q.isMandatoryField("gender")?"required":""]),style:{padding:"12px 0"}},{default:(0,s.k6)(()=>[(0,s.bF)(Y,{modelValue:i.item.gender,"onUpdate:modelValue":t[17]||(t[17]=e=>i.item.gender=e),"native-value":"f",name:"gender",class:"mt-2",required:Q.isMandatoryField("gender")},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("female")),1)]),_:1},8,["modelValue","required"]),(0,s.bF)(Y,{modelValue:i.item.gender,"onUpdate:modelValue":t[18]||(t[18]=e=>i.item.gender=e),"native-value":"m",name:"gender",class:"mt-2 ml-3",required:Q.isMandatoryField("gender")},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("male")),1)]),_:1},8,["modelValue","required"]),(0,s.bF)(Y,{modelValue:i.item.gender,"onUpdate:modelValue":t[19]||(t[19]=e=>i.item.gender=e),"native-value":"n",name:"gender",class:"mt-2 ml-3",required:Q.isMandatoryField("gender")},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Other gender")),1)]),_:1},8,["modelValue","required"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"bio"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:7,label:e.$t("Bio"),class:"mb-5"},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"bioInput",modelValue:i.item.bio,"onUpdate:modelValue":t[20]||(t[20]=e=>i.item.bio=e),type:"textarea",placeholder:e.$t("A short biography or description"),onInput:Q.autoResizeBio},null,8,["modelValue","placeholder","onInput"])]),_:1},8,["label"])):(0,s.Q3)("",!0),"profession_headline"!==a.field||e.tenant.settingFeatures.professions.isActive?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(W,{key:8,ref_for:!0,ref:"professionHeadlineField",label:e.$t("professionHeadline"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("profession_headline")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"professionHeadlineInput",modelValue:i.item.professionHeadline,"onUpdate:modelValue":t[21]||(t[21]=e=>i.item.professionHeadline=e),required:Q.isMandatoryField("profession_headline")},null,8,["modelValue","required"])]),_:1},8,["label","class"])),"town_current"===a.field?((0,s.uX)(),(0,s.CE)(s.FK,{key:9},[(0,s.bF)(z,{ref_for:!0,ref:"townCurrentInput",modelValue:i.item.townCurrent,"onUpdate:modelValue":[t[22]||(t[22]=e=>i.item.townCurrent=e),t[23]||(t[23]=e=>i.item.townCurrent=e)],label:e.$t("townCurrent"),town:i.item.townCurrent,class:"mt-5","is-result-object":!0,"is-required":Q.isMandatoryField("town_current")},null,8,["modelValue","label","town","is-required"]),(0,s.Lk)("p",A,(0,n.v_)(e.$t("townAutocompleteExplanation")),1),i.item.townCurrent&&i.item.townCurrent.country&&i.item.townCurrent.country.name?((0,s.uX)(),(0,s.Wv)(W,{key:0,label:e.$t("Country of residence")+": "+i.item.townCurrent.country.name,class:"mt-5"},null,8,["label"])):i.item.townCurrent&&i.item.townCurrent.country?((0,s.uX)(),(0,s.Wv)(W,{key:1,label:e.$t("Country of residence")+": "+Q.countryName(i.item.townCurrent.country),class:"mt-5"},null,8,["label"])):(0,s.Q3)("",!0),(0,s.Lk)("p",P,(0,n.v_)(e.$t("Country is set automatically based on selected town of residence")),1)],64)):(0,s.Q3)("",!0),"town_from"===a.field?((0,s.uX)(),(0,s.CE)(s.FK,{key:10},[(0,s.bF)(z,{modelValue:i.item.townFrom,"onUpdate:modelValue":t[24]||(t[24]=e=>i.item.townFrom=e),label:e.$t("townFrom"),town:i.item.townFrom,"is-result-object":!0,class:"mt-5 mb-5","is-required":Q.isMandatoryField("town_from")},null,8,["modelValue","label","town","is-required"]),(0,s.Lk)("p",I,(0,n.v_)(e.$t("townAutocompleteExplanation")),1)],64)):(0
1,s.Q3)("",!0),"map_location"===a.field?((0,s.uX)(),(0,s.Wv)(q,{key:11,modelValue:Q.mapLocation,"onUpdate:modelValue":t[25]||(t[25]=e=>Q.mapLocation=e),label:e.$t("Location on members map"),placeholder:e.$t("Location"),"is-required":Q.isMandatoryField("map_location"),class:"mt-5 mb-5"},null,8,["modelValue","label","placeholder","is-required"])):(0,s.Q3)("",!0),"address"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:12,label:e.$t("Address"),class:(0,n.C4)(Q.isMandatoryField("address")?"required":""),placeholder:e.$t("Address")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"addressInput",modelValue:i.item.address,"onUpdate:modelValue":t[26]||(t[26]=e=>i.item.address=e)},null,8,["modelValue"])]),_:1},8,["label","class","placeholder"])):(0,s.Q3)("",!0),"postal_code"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:13,label:e.$t("Postal code"),class:(0,n.C4)(Q.isMandatoryField("postal_code")?"required":""),placeholder:e.$t("Postal code")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{modelValue:i.item.postalCode,"onUpdate:modelValue":t[27]||(t[27]=e=>i.item.postalCode=e)},null,8,["modelValue"])]),_:1},8,["label","class","placeholder"])):(0,s.Q3)("",!0),"website"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:14,ref_for:!0,ref:"socialProfileField",label:e.$t("Website"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("website")?"required":""]),placeholder:e.$t("Website")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"socialProfileInput",modelValue:i.item.profileWebsite,"onUpdate:modelValue":t[28]||(t[28]=e=>i.item.profileWebsite=e)},null,8,["modelValue"])]),_:1},8,["label","class","placeholder"])):(0,s.Q3)("",!0),"signal"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:15,label:e.$t("Signal username"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("signal")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{modelValue:i.item.profileSignal,"onUpdate:modelValue":t[29]||(t[29]=e=>i.item.profileSignal=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"bsky"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:16,label:e.$t("Bluesky"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("bsky")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{modelValue:i.item.profileBsky,"onUpdate:modelValue":t[30]||(t[30]=e=>i.item.profileBsky=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"facebook"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:17,label:e.$t("Facebook"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("facebook")?"required":""]),placeholder:e.$t("Facebook")},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"facebookInput",modelValue:i.item.profileFacebook,"onUpdate:modelValue":t[31]||(t[31]=e=>i.item.profileFacebook=e)},null,8,["modelValue"])]),_:1},8,["label","class","placeholder"])):(0,s.Q3)("",!0),"twitter"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:18,label:e.$t("Twitter"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("twitter")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"twitterInput",modelValue:i.item.profileTwitter,"onUpdate:modelValue":t[32]||(t[32]=e=>i.item.profileTwitter=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"linkedin"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:19,label:e.$t("Linkedin"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("linkedin")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"linkedinInput",modelValue:i.item.profileLinkedin,"onUpdate:modelValue":t[33]||(t[33]=e=>i.item.profileLinkedin=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"instagram"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:20,label:e.$t("Instagram"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("instagram")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"instagramInput",modelValue:i.item.profileInstagram,"onUpdate:modelValue":t[34]||(t[34]=e=>i.item.profileInstagram=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"telegram"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:21,label:e.$t("Telegram"),class:(0,n.C4)(["mb-5",Q.isMandatoryField("telegram")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"telegramInput",modelValue:i.item.profileTelegram,"onUpdate:modelValue":t[35]||(t[35]=e=>i.item.profileTelegram=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0),"tiktok"===a.field?((0,s.uX)(),(0,s.Wv)(W,{key:22,label:e.$t("Tiktok"),
1class:(0,n.C4)(["mb-5",Q.isMandatoryField("tiktok")?"required":""])},{default:(0,s.k6)(()=>[(0,s.bF)(G,{ref_for:!0,ref:"tiktokInput",modelValue:i.item.profileTiktok,"onUpdate:modelValue":t[36]||(t[36]=e=>i.item.profileTiktok=e)},null,8,["modelValue"])]),_:1},8,["label","class"])):(0,s.Q3)("",!0)],64)),"custom"===a.type&&i.item.id?((0,s.uX)(),(0,s.CE)(s.FK,{key:4},[Q.isProfileCustomField(a.customFieldId)&&Q.getCustomFieldById(a.customFieldId)?((0,s.uX)(),(0,s.CE)("div",{key:"custom-inline-"+a.customFieldId},[(0,s.bF)(Z,{ref_for:!0,ref:`customField_${a.customFieldId}`,modelValue:O.customFieldValues[a.customFieldId],"onUpdate:modelValue":[e=>O.customFieldValues[a.customFieldId]=e,e=>O.customFieldValues[a.customFieldId]=e],class:"mb-5","hide-visibility-hint":!0,"is-required":e.tenant.settingForms.profileForm.profileCustomFieldsMandatory.includes(a.customFieldId),"is-admin":"admin"===Q.getCustomFieldById(a.customFieldId).visibility,disabled:Q.isCustomFieldReadonly(Q.getCustomFieldById(a.customFieldId)),"custom-field-values":i.item.customFieldValues,field:Q.getCustomFieldById(a.customFieldId),onPendingUpload:Q.handlePendingUpload},null,8,["modelValue","onUpdate:modelValue","is-required","is-admin","disabled","custom-field-values","field","onPendingUpload"])])):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0)],64))),128)),Q.showPersonalId?((0,s.uX)(),(0,s.Wv)(J,{key:4,modelValue:i.item.personalIdNumber,"onUpdate:modelValue":t[37]||(t[37]=e=>i.item.personalIdNumber=e),"subject-type":"user","subject-id":i.item.id,"has-value":!!i.item.hasPersonalIdNumber,"can-reveal":Q.canRevealPersonalId,label:e.$t("Personal identification number"),hint:e.$t("Stored encrypted. Leave empty to keep the current value."),class:"mb-5"},null,8,["modelValue","subject-id","has-value","can-reveal","label","hint"])):(0,s.Q3)("",!0),Q.skillField&&i.item.id&&-1===Q.firstCustomGroupIndex?((0,s.uX)(),(0,s.CE)("div",M,[(0,s.Lk)("p",x,(0,n.v_)(e.$t("Skills")),1),(0,s.bF)(j,{item:i.item,field:Q.skillField,"add-label":e.$t("Add a skill")},null,8,["item","field","add-label"])])):(0,s.Q3)("",!0)],2),e.$isMobile()||i.onBoarding?e.$isMobile()&&!i.onBoarding?((0,s.uX)(),(0,s.CE)("div",X,[(0,s.Lk)("button",{ref:"submitXHR",class:(0,n.C4)(["button is-primary is-rounded is-fullwidth",{"is-loading":e.$store.state.isLoadingButton}]),disabled:e.$store.state.isLoadingButton,type:"submit"},(0,n.v_)(e.$t("save")),11,V)])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",N,[(0,s.Lk)("div",U,[(0,s.Lk)("button",{ref:"submitXHR",class:(0,n.C4)(["button is-primary is-rounded",{"is-loading":O.isLoadingButton}]),disabled:O.isLoadingButton,type:"submit"},(0,n.v_)(e.$t("save")),11,D)])]))])],32)])}i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(13579);var O=i(19378),Q=i(40834),B=i(53369),G=i(95256),W=i(48431),j=i(60534),z=i(61273),q=i(83806),J=i(99440),H=i(99914),K={props:["item","save","onBoarding"],emits:["focus-mandatory-field","focus-mandatory-custom-field"],data(){return{profileFields:null,localCenters:[],countries:G.Xr,customFieldValues:{},profileCustomFields:null,isLoadingButton:!1,pendingUploads:[]}},created(){this.item.id||(this.item.plainPassword=this.generateStrongPassword(8)),this.profileFields=this.tenant.settingForms.profileForm.profileFields,this.profileCustomFields=this.tenant.settingForms.profileForm.profileCustomFields,this.initPhoneCountry()},mounted(){setTimeout(()=>{this.focusFieldFromQuery(),this.autoResizeBio()},800)},methods:{autoResizeBio(){const e=this.$refs.bioInput;if(!e)return;const t=e.$el?.querySelector("textarea");t&&(t.style.overflow="hidden",t.style.height="auto",t.style.height=t.scrollHeight+"px")},focusField(e){if(!e)return;const t={firstName:"firstNameInput",lastName:"lastNameInput",phoneNumber:"phoneNumberInput",dateBirth:"dateBirthField",gender:"genderField",townCurrent:"townCurrentInput",address:"addressInput"};let i=t[e];if("socialMedia"===e){const e=[{field:"facebook",ref:"facebookInput"},{field:"twitter",ref:"twitterInput"},{field:"linkedin",ref:"linkedinInput"},{field:"instagram",ref:"instagramInput"},{field:"telegram",ref:"telegramInput"},{field:"tiktok",ref:"tiktokInput"},{field:"website",ref:"socialProfileInput"}];for(const t of e){let e=this.$refs[t.ref];if(Array.isArray(e)&&(e=e[0]),this.isProfileField(t.field)&&e){i=t.ref;break}}}if(!i)return;let s=this.$refs[i];if(Array.isArray(s)&&(s=s[0]),!s)return;const a=s.$el||s;if(!a)return;const n=a.closest(".field")||a.closest(".b-field")||a.parentElement;n&&n.classList.add("highlight-focus-field"),a.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{if(s.focus)s.focus();else{const e=a.querySelector("input, textarea, select");e&&e.focus()}setTimeout(()=>{n&&n.classList.remove("highlight-focus-field")},1e3)},600)},focusFieldFromQuery(){const e=this.$route.query.focusField;e&&this.focusField(e)},countryName:G.GL,handlePendingUpload(e){this.pendingUploads=this.pendingUploads.filter(t=>t.fieldId!==e.fieldId),this.pendingUploads.push(e)}
1,async submitForm(){if(this.pendingUploads.length>0){this.isLoadingButton=!0;try{for(const e of this.pendingUploads)await e.upload();this.pendingUploads=[]}catch(e){return console.error(e),this.$buefy.toast.open({message:this.$t("Failed to upload file"),type:"is-danger",duration:5e3}),void(this.isLoadingButton=!1)}this.isLoadingButton=!1}this.$props.save&&this.$props.save(this.customFieldValues)},changePassword(){this.item.plainPassword=this.generateStrongPassword(8)},generateStrongPassword(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-+=";let i="";for(let s=0;s<e;s++){const e=Math.floor(Math.random()*t.length);i+=t.charAt(e)}return i},isProfileField(e){if(this.profileFields.includes(e))return!0},isMandatoryField(e){return this.user.id===this.item.id&&this.tenant.settingForms.profileForm.profileFieldsMandatory&&this.tenant.settingForms.profileForm.profileFieldsMandatory.includes(e)},initPhoneCountry(){if(!this.item.phoneCountry&&this.tenant.country){let e=G.Xr.find(e=>e.v===this.tenant.country.id);this.item.phoneCountry=e?e.c:null}},isProfileCustomField(e){if(!this.profileCustomFields.includes(e))return!1;const t=this.tenant?.settingFeatures?.users?.hasSkills,i=this.tenant?.settingFeatures?.users?.skillsCustomFieldId;if(t&&null!==i&&void 0!==i&&parseInt(i,10)===e)return!1;const s=this.getCustomFieldById(e);return!(s&&"admin"===s.visibility&&!this.isGranted("HR_LOCAL"))},isCustomFieldReadonly(e){if(void 0!==this.tenant.settingForms.profileForm.profileCustomFieldsImmutable&&this.tenant.settingForms.profileForm.profileCustomFieldsImmutable.includes(e.id)){const t=this.item.customFieldValues.some(t=>{const i=t.field==="/api/v1/custom_fields/"+parseInt(e.id)||"object"===typeof t.field&&t.field.id===e.id;return i&&t.value});return t}return!1},getFieldLabel(e){const t={first_name:this.$t("firstName"),last_name:this.$t("lastName"),birthday:this.$t("birthday"),gender:this.$t("gender"),bio:this.$t("Bio"),phoneNumber:this.$t("phoneNumber"),town_current:this.$t("townCurrent"),town_from:this.$t("townFrom"),address:this.$t("Address"),postal_code:this.$t("Postal code"),website:this.$t("Website"),facebook:this.$t("Facebook"),twitter:this.$t("Twitter"),linkedin:this.$t("Linkedin"),instagram:this.$t("Instagram"),telegram:this.$t("Telegram"),tiktok:this.$t("Tiktok"),signal:this.$t("Signal username"),bsky:this.$t("Bluesky"),profession_headline:this.$t("professionHeadline")};return t[e]||e},getCustomFieldLabel(e){const t=this.tenant.customFields.find(t=>t.id===e);return t?t.name:this.$t("Custom field")},getCustomFieldById(e){return this.tenant?.customFields&&this.tenant.customFields.find(t=>t.id===e)||null}},computed:{...(0,Q.L8)(["user","tenant","isGranted","isCustomFieldVisible","checkMandatoryProfileFields"]),showMiddleNameFallback(){return!this.isProfileField("middle_name")&&(!!this.tenant?.settingFeatures?.onlinePayments?.checkoutRequireMiddleName||!!this.item?.middleName)},showPersonalId(){return!(!this.item?.id||this.isProfileField("personal_id_number"))&&(!!this.canRevealPersonalId&&(!!this.tenant?.settingFeatures?.onlinePayments?.checkoutRequirePersonalId||!!this.item?.hasPersonalIdNumber))},canRevealPersonalId(){return this.item?.id===this.user?.id||this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT")},skillField(){if(!this.tenant?.settingFeatures?.users?.hasSkills)return null;const e=this.tenant?.settingFeatures?.users?.skillsCustomFieldId;return e&&this.tenant?.customFields?.find(t=>t.id===parseInt(e,10))||null},firstCustomGroupIndex(){return this.orderedFieldGroups.findIndex(e=>"custom"===e.type)},orderedFieldGroups(){const e=["first_name","last_name"],t=["town_current","town_from","map_location"],i=this.tenant?.settingForms?.profileForm?.profileFieldsOrder;let s;if(i&&i.length>0)s=i.map(e=>"custom"===e.type?{key:"custom_"+e.id,customFieldId:e.id,isCustom:!0}:{key:e.key,isCustom:!1});else{if(s=[...this.profileFields].map(e=>({key:e,isCustom:!1})),!s.some(e=>"bio"===e.key)){const e=s.findIndex(e=>"gender"===e.key);-1!==e?s.splice(e+1,0,{key:"bio",isCustom:!1}):s.push({key:"bio",isCustom:!1})}this.profileCustomFields&&this.profileCustomFields.length>
10&&this.profileCustomFields.forEach(e=>{s.push({key:"custom_"+e,customFieldId:e,isCustom:!0})})}const a=[];let n=0;while(n<s.length){const i=s[n];if(i.isCustom){a.push({type:"custom",customFieldId:i.customFieldId}),n++;continue}const o=i.key;if(e.includes(o)){const t=s[n+1];if(t&&!t.isCustom&&e.includes(t.key)&&o!==t.key){a.push({type:"name_pair",fields:[o,t.key]}),n+=2;continue}}if(t.includes(o)){const e=[o];let i=n+1;while(i<s.length&&!s[i].isCustom&&t.includes(s[i].key))e.push(s[i].key),i++;if(e.length>1){a.push({type:"location_card",fields:e}),n=i;continue}}a.push({type:"single",field:o}),n++}return a},mapLocation:{get(){return this.item.mapLatitude||this.item.mapLongitude||this.item.mapPlaceName?{latitude:this.item.mapLatitude,longitude:this.item.mapLongitude,placeName:this.item.mapPlaceName}:null},set(e){e?(this.item.mapLatitude=e.latitude?String(e.latitude):null,this.item.mapLongitude=e.longitude?String(e.longitude):null,this.item.mapPlaceName=e.placeName||null):(this.item.mapLatitude=null,this.item.mapLongitude=null,this.item.mapPlaceName=null)}},getPhonePlaceholder(){let e=G.Xr.find(e=>e.c===this.item.phoneCountry);return void 0!==e?e.s:""},hasCustomFields(){return this.profileCustomFields&&this.profileCustomFields.length>0},sortedCustomFields(){return this.tenant?.customFields&&this.profileCustomFields?[...this.tenant.customFields].sort((e,t)=>{const i=this.profileCustomFields.indexOf(e.id),s=this.profileCustomFields.indexOf(t.id);return-1===i&&-1===s?0:-1===i?1:-1===s?-1:i-s}):this.tenant?.customFields||[]},missingMandatoryFields(){if(!this.onBoarding||!this.item.id)return[];const e=this.checkMandatoryProfileFields();return e.fields},missingMandatoryCustomFields(){if(!this.onBoarding||!this.item.id)return[];const e=this.checkMandatoryProfileFields();return e.customFields}},components:{FontAwesomeIcon:z.gc,BirthdaySelect:O.A,TownAutocomplete:B.A,CustomFieldWidget:W.A,PersonalIdField:H.A,ProfileCustomFieldTags:j.A,MapLocationSelector:q.A,PhoneCountryPrefixSelect:J.A}},Y=i(66262);const Z=(0,Y.A)(K,[["render",R],["__scopeId","data-v-539bca9e"]]);var ee=Z},88722:function(e,t,i){"use strict";i.d(t,{T:function(){return s}});i(14603),i(47566),i(98721);function s(e,t=window.location.origin){if(!e)return null;let i;try{i=new URL(e,t)}catch(s){return null}return i.origin!==t?null:i.pathname+i.search+i.hash}},89490:function(e,t,i){"use strict";i.d(t,{A:function(){return U}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"event-agenda-viewer"},l={class:"event-agenda-viewer__sticky-nav"},r={key:0,class:"event-agenda-viewer__view-toggle"},d={class:"event-agenda-viewer__view-badge"},c={key:1,class:"event-agenda-viewer__day-strip",role:"tablist"},u=["aria-selected","onClick"],m={class:"event-agenda-viewer__day-num"},p={class:"event-agenda-viewer__day-meta"},h={class:"event-agenda-viewer__day-name"},g={class:"event-agenda-viewer__day-month"},f={key:"strip",class:"event-agenda-viewer__stage-strip"},b=["aria-label"],y=["aria-selected"],v=["aria-selected","onClick"],k={key:"bar",class:"event-agenda-viewer__search-bar"},C={key:0,class:"event-agenda-viewer__empty"},L={key:1,class:"event-agenda-viewer__empty"},w={key:2,class:"event-agenda-viewer__empty"},_={key:3,class:"agenda-readonly-list"},E={key:0,class:"agenda-readonly-list__day-header"};function $(e,t,i,$,F,T){const S=(0,s.g2)("font-awesome-icon"),A=(0,s.g2)("b-input"),P=(0,s.g2)("SubEventAttendButton"),I=(0,s.g2)("AgendaRow");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",l,[i.showMyAgendaToggle&&T.canManageAttendance&&T.hasAnyAttendance?((0,s.uX)(),(0,s.CE)("div",r,[(0,s.Lk)("span",{class:(0,a.C4)(["event-agenda-viewer__view-thumb",{"is-right":F.showMyAgendaOnly}])},null,2),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["event-agenda-viewer__view-btn",{"is-active":!F.showMyAgendaOnly}]),onClick:t[0]||(t[0]=e=>F.showMyAgendaOnly=!1)},[(0,s.bF)(S,{icon:"fa-light fa-calendar-lines-pen"}),(0,s.eW)(" "+(0,a.v_)(e.$t("All sessions")),1)],2),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["event-agenda-viewer__view-btn",{"is-active":F.showMyAgendaOnly}]),onClick:t[1]||(t[1]=e=>F.showMyAgendaOnly=!0)},[(0,s.bF)(S,{icon:"fa-light fa-calendar-check"}),(0,s.eW)(" "+(0,a.v_)(e.$t("My Agenda"))+" ",1),(0,s.Lk)("span",d,(0,a.v_)(T.myAgendaCount),1)],2)])):(0,s.Q3)("",!0),T.days.length>1?((0,s.uX)(),(0,s.CE)("div",c,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.days,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.key,ref_for:!0,ref:"dayChips",type:"button",role:"tab","aria-selected":e.key===F.selectedDayKey,class:(0,a.C4)(["event-agenda-viewer__day",{"is-active":e.key===F.selectedDayKey}]),onClick:t=>T.selectDay(e.key,t.currentTarget)},[(0,s.Lk)("span",m,(0,a.v_)(e.dayNumber),1),(0,s.Lk)("span",p,[(0,s.Lk)("span",h,(0,a.v_)(e.weekdayShort),1),(0,s.Lk)("span",g,(0,a.v_)(e.monthShort),1)])],10,u))),128))])):(0,s.Q3)("",!0),(0,s.bF)(n.eB,{name:"event-agenda-viewer-search",mode:"out-in"},{default:(0,s.k6)(()=>[!F.searchOpen&&T.availableStages.length?((0,s.uX)(),(0,s.CE)("div",f,[(0,s.Lk)("button",{type:"button",class:"event-agenda-viewer__icon-chip","aria-label":e.$t("Search"),onClick:t[2]||(t[2]=(...e)=>T.openSearch&&T.openSearch(...e))},[(0,s.bF)(S,{icon:"fa-light fa-magnifying-glass"})],8,b),(0,s.Lk)("button",{type:"button","aria-selected":!F.selectedStage,class:(0,a.C4)(["event-agenda-viewer__stage-chip",{"is-active":!F.selectedStage}]),onClick:t[3]||(t[3]=e=>T.selectStage(null,e.currentTarget))},(0,a.v_)(e.$t("All stages")),11,y),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.availableStages,e=>((0,s.uX)(),(0,s.CE)("button",{key:e,type:"button",role:"tab","aria-selected":e===F.selectedStage,class:(0,a.C4)(["event-agenda-viewer__stage-chip",{"is-active":e===F.selectedStage}]),onClick:t=>T.selectStage(e,t.currentTarget)},[(0,s.Lk)("span",{class:"event-agenda-viewer__stage-chip-dot",style:(0,a.Tr)({background:T.getStageColor(e,T.allStages,i.event?.settings?.stageColors)})},null,4),(0,s.eW)(" "+(0,a.v_)(e),1)],10,v))),128))])):F.searchOpen?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.bF)(A,{ref:"searchInput",modelValue:F.search,"onUpdate:modelValue":t[4]||(t[4]=e=>F.search=e),placeholder:e.$t("Search sessions or speakers"),icon:"magnifying-glass","icon-right":"xmark","icon-right-clickable":"",rounded:"",expanded:"",onIconRightClick:T.closeSearch,onKeyup:(0,n.jR)(T.closeSearch,["esc"])},null,8,["modelValue","placeholder","onIconRightClick","onKeyup"])])):(0,s.Q3)("",!0)]),_:1})]),F.showMyAgendaOnly&&!T.visibleSubEvents.length?((0,s.uX)(),(0,s.CE)("div",C,[(0,s.bF)(S,{icon:"fa-light fa-calendar-check",size:"2x"}),(0,s.Lk)("p",null,(0,a.v_)(e.$t("You haven't joined any sessions yet")),1)])):!F.selectedDayKey||T.filteredDayItems.length||T.isSearchActive?T.isSearchActive&&!T.visibleSubEvents.length?((0,s.uX)(),(0,s.CE)("div",w,[(0,s.bF)(S,{icon:"fa-light fa-magnifying-glass",size:"2x"}),(0,s.Lk)("p",null,(0,a.v_)(e.$t("No results found")),1)])):((0,s.uX)(),(0,s.CE)("div",_,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(T.filteredGroupedItems,n=>((0,s.uX)(),(0,s.CE)(s.FK,{key:n.dayKey||"all"},[n.dayLabel?((0,s.uX)(),(0,s.CE)("div",E,(0,a.v_)(n.dayLabel),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(n.items,a=>((0,s.uX)(),(0,s.Wv)(I,{key:a.uuid||a.id,"sub-event":a,"is-highlighted":F.highlightedSession===a.uuid,"stage-color":T.getStageColor(a.location,T.allStages,i.event?.settings?.stageColors),"show-share":i.showShare,"cover-media-path":i.coverMediaPath,timezone:i.timezone,onShare:t=>e.$emit("share",a),onSpeakerClick:t[5]||(t[5]=t=>e.$emit("speaker-click",t))},{"content-actions":(0,s.k6)(()=>[(0,s.RG)(e.$slots,"item-actions",{subEvent:a,isAttending:!!i.attendance[a.uuid],isLoading:!!i.loading[a.uuid]},()=>[T.canManageAttendance?((0,s.uX)(),(0,s.Wv)(P,{key:0,"is-attending":!!i.attendance[a.uuid],"is-loading":!!i.loading[a.uuid],onAttend:t=>e.$emit("attend",a),onUnattend:t=>e.$emit("unattend",a)},null,8,["is-attending","is-loading","onAttend","onUnattend"])):(0,s.Q3)("",!0)],!0)]),_:2}
1,1032,["sub-event","is-highlighted","stage-color","show-share","cover-media-path","timezone","onShare"]))),128))],64))),128))])):((0,s.uX)(),(0,s.CE)("div",L,[(0,s.bF)(S,{icon:"fa-light fa-calendar",size:"2x"}),(0,s.Lk)("p",null,(0,a.v_)(e.$t("No sessions on this day")),1)]))])}i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(13579);var F=i(84743),T=i.n(F),S=i(22536),A=i(41863),P=i(54148);const I=["public","registered","admin"];var M={name:"EventAgendaViewer",components:{AgendaRow:S.A,SubEventAttendButton:A.A},props:{event:{type:Object,default:null},items:{type:Array,default:()=>[]},attendance:{type:Object,default:()=>({})},loading:{type:Object,default:()=>({})},permission:{type:String,default:"public",validator:e=>I.includes(e)},showMyAgendaToggle:{type:Boolean,default:!0},showShare:{type:Boolean,default:!0},coverMediaPath:{type:String,default:"event_public"},timezone:{type:String,default:null}},emits:["attend","unattend","speaker-click","share"],data(){return{selectedDayKey:null,selectedStage:null,search:"",showMyAgendaOnly:!1,searchOpen:!1,highlightedSession:null}},computed:{canManageAttendance(){return"public"!==this.permission},isSearchActive(){return!(!this.search||!this.search.trim())},hasAnyAttendance(){return Object.keys(this.attendance).length>0},myAgendaCount(){return Object.keys(this.attendance).length},sortedSubEvents(){return[...this.items].sort((e,t)=>{const i=(e.dateTimeBegin||"").localeCompare(t.dateTimeBegin||"");return 0!==i?i:(e.position||0)-(t.position||0)})},days(){const e=new Map;return this.sortedSubEvents.forEach(t=>{if(!t.dateTimeBegin)return;const i=this.momentInTz(t.dateTimeBegin),s=i.format("YYYY-MM-DD");e.has(s)||e.set(s,{key:s,dayNumber:i.format("D"),monthShort:i.format("MMM"),weekdayShort:i.format("ddd")})}),[...e.values()].sort((e,t)=>e.key.localeCompare(t.key))},visibleSubEvents(){let e=this.sortedSubEvents;if(this.showMyAgendaOnly&&(e=e.filter(e=>this.attendance[e.uuid])),this.selectedStage&&(e=e.filter(e=>e.location===this.selectedStage)),this.isSearchActive){const t=this.search.trim().toLowerCase();e=e.filter(e=>e.name&&e.name.toLowerCase().includes(t)||e.speakers&&e.speakers.some(e=>e.speakerName&&e.speakerName.toLowerCase().includes(t)))}return e},allStages(){return(0,P.j5)(this.sortedSubEvents)},availableStages(){if(this.isSearchActive)return this.allStages;if(!this.selectedDayKey)return this.allStages;const e=this.sortedSubEvents.filter(e=>this.dayKeyFor(e.dateTimeBegin)===this.selectedDayKey);return(0,P.j5)(e)},filteredDayItems(){return this.isSearchActive?this.visibleSubEvents:this.selectedDayKey?this.visibleSubEvents.filter(e=>this.dayKeyFor(e.dateTimeBegin)===this.selectedDayKey):this.visibleSubEvents},filteredGroupedItems(){const e=this.filteredDayItems;if(!this.isSearchActive)return[{dayKey:null,dayLabel:null,items:e}];const t={};return e.forEach(e=>{const i=this.dayKeyFor(e.dateTimeBegin)||"unknown";t[i]||(t[i]=[]),t[i].push(e)}),Object.keys(t).sort().map(e=>({dayKey:e,dayLabel:"unknown"===e?"":T()(e,"YYYY-MM-DD").format(this.$filters.datePattern("weekdayLong")),items:t[e]}))}},watch:{days:{immediate:!0,handler(e){if(null===this.selectedDayKey&&e.length){const t=this.timezone?T()().tz(this.timezone).format("YYYY-MM-DD"):T()().format("YYYY-MM-DD"),i=e.find(e=>e.key===t);this.selectedDayKey=i?i.key:e[0].key}}}},methods:{getStageColor:P.mh,momentInTz(e){const t=T().utc(e);return this.timezone?t.tz(this.timezone):t.local()},dayKeyFor(e){return e?this.momentInTz(e).format("YYYY-MM-DD"):null},selectDay(e,t){if(this.selectedDayKey=e,this.selectedStage){const t=this.sortedSubEvents.some(t=>t.location===this.selectedStage&&this.dayKeyFor(t.dateTimeBegin)===e);t||(this.selectedStage=null)}this.scrollChipIntoView(t)},selectStage(e,t){this.selectedStage=e,this.scrollChipIntoView(t)},scrollChipIntoView(e){if(!e||"function"!==typeof e.scrollIntoView)return;const t=e.parentElement;!t||t.scrollWidth<=t.clientWidth||e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},openSearch(){this.searchOpen=!0,this.$nextTick(()=>{const e=this.$refs.searchInput;e&&e.focus&&e.focus()})},closeSearch(){this.searchOpen=!1,this.search=""},focusSession(e){const t=this.sortedSubEvents.find(t=>t.uuid===e);if(!t)return;if(this.search="",this.selectedStage=null,this.showMyAgendaOnly=!1,this.searchOpen=!1,t.dateTimeBegin){const e=this.dayKeyFor(t.dateTimeBegin);e&&this.days.some(t=>t.key===e)&&(this.selectedDayKey=e)}const i=t=>{const s=document.querySelector('[data-session-uuid="'+e+'"]');s?(s.scrollIntoView({block:"center"}),this.highlightedSession=e,setTimeout(()=>{this.highlightedSession=null},3e3),setTimeout(()=>{s.scrollIntoView({behavior:"smooth",block:"center"})},600)):t>0&&setTimeout(()=>i(t-1),50)};this.$nextTick(()=>i(20))}}},x=i(66262);const N=(0,x.A)(M,[["render",$],["__scopeId","data-v-42ac9708"]]);var U=N},90065:function(e,t,i){"use strict";i.d(t,{A:function(){return f}});var s=i(20641),a=i(90033);const n={key:0,class:"mobile-hscroll"},o={class:"table invoices-info",style:{width:"100%"}},l={key:0},r={key:0},d=["onClick"],c=["href"],u={key:1};function m(e,t,i,m,p,h){return i.item&&i.item.hasPaidInvoice?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.Lk)("table",o,[(0,s.Lk)("thead",null,[(0,s.Lk)("tr",null,[(0,s.Lk)("td",null,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("date")),1)]),(0,s.Lk)("td",null,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("amount")),1)]),(0,s.Lk)("td",null,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("status")),1)]),t[0]||(t[0]=(0,s.Lk)("td",null,"Â ",-1)),t[1]||(t[1]=(0,s.Lk)("td",null,"Â ",-1))])]),(0,s.Lk)("tbody",null,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.item.invoices,(t,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:i},[t&&0!==t.total&&!["draft","void"].includes(t.status)?((0,s.uX)(),(0,s.CE)("tr",l,[(0,s.Lk)("td",null,(0,a.v_)(e.$filters.format(new Date(1e3*t.created))),1),(0,s.Lk)("td",null,(0,a.v_)(e.$filters.money(h.invoiceAmount(t),t.currency)),1),(0,s.Lk)("td",{class:(0,a.C4)("paid"===t.status?"has-text-success":"has-text-danger")},(0,a.v_)("paid"===t.status?t.total<0?e.$t("credited"):e.$t("paid"):e.$t("failed")),3),(0,s.Lk)("td",null,[["uncollectible","open"].includes(t.status)?((0,s.uX)(),(0,s.CE)("span",r,[(0,s.Lk)("a",{href:"javascript:void(0)",onClick:i=>e.payNow(t.id)},(0,a.v_)(e.$t("payNow")),9,d)])):(0,s.Q3)("",!0)]),(0,s.Lk)("td",null,[(0,s.Lk)("a",{href:t.invoice_pdf,target:"_blank"},(0,a.v_)(e.$t("download")),9,c)])])):(0,s.Q3)("",!0)],64))),128))])])])):i.item?((0,s.uX)(),(0,s.CE)("div",u,[(0,s.Lk)("p",null,(0,a.v_)(e.$t("noInvoices"))+".",1)])):(0,s.Q3)("",!0)}var p={props:["item"],data(){return{}},methods:{invoiceAmount(e){return"paid"!==e.status?e.total/100:0!==e.amount_paid?e.amount_paid/100:e.total<0?e.total/100:0}}},h=i(66262);const g=(0,h.A)(p,[["render",m],["__scopeId","data-v-17bab0fc"]]);var f=g},90257:function(e,t,i){"use strict";i.d(t,{A:function(){return bi}});var s=i(20641),a=i(53751),n=i(90033);const o={key:0,class:"checkout-overlay"},l={class:"checkout-container"},r={class:"checkout-left"},d={class:"checkout-left-content"},c={class:"checkout-logo"},u={class:"checkout-header"},m={class:"checkout-title"},p={class:"checkout-subtitle"},h={key:0,class:"attendee-section"},g={class:"details-toggle"},f={key:1,class:"attendee-forms"},b=["onClick"],y={class:"attendee-card-left"},v={key:1},k={class:"attendee-card-info"},C={class:"attendee-ticket-type"},L={key:0,class:"attendee-filled-name"},w={key:0,class:"addon-count-badge"},_={key:1,class:"attendee-unfilled"},E={class:"attendee-expand-icon"},$={key:0,class:"help attendee-pinned-note"},F={class:"attendee-form-fields"},T={class:"control"},S={class:"control is-expanded"},A={value:null},P=["value"],I={key:7,class:"field is-full-width custom-boolean-field"},M={key:1,class:"addon-attendees-nested"},x={class:"addon-attendee-header"},N={class:"addon-attendee-label"},U={key:0,class:"addon-attendee-filled"},D={class:"addon-attendee-fields"},X={key:2,class:"attendee-form-actions"},V=["disabled"],R={key:2,class:"send-later-info"},O={class:"info-card"},Q={key:3,class:"checkout-custom-text mt-6"},B={class:"checkout-right"},G={class:"checkout-right-content"},W={class:"order-summary-card"},j={key:"loading",class:"payment-step-loading"},z={class:"loading-animation"},q={class:"loading-text"},J={class:"loading-subtext"},H={class:"secure-note"},K={key:"payment",class:"payment-step-form"},Y={class:"icon is-small"},Z={class:"payment-title"},ee={class:"icon has-text-success"},te={class:"payment-summary"},ie={key:0,class:"payment-summary-row"},se={class:"payment-amount"},ae={key:1,class:"payment-summary-row voucher-discount-row"},ne={class:"has-text-success"},oe={class:"payment-summary-row"},le={class:"payment-amount"},re={key:0,class:"notification is-danger is-light mt-4"},de=["disabled"],ce={class:"secure-note"},ue={key:"billing",class:"payment-step-form"},me={class:"icon is-small"},pe={class:"payment-title"},he={class:"icon"},ge={class:"payment-summary"},fe={key:0,class:"payment-summary-row"},be={class:"payment-amount"},ye={key:1,class:"payment-summary-row voucher-discount-row"},ve={class:"has-text-success"},ke={class:"payment-summary-row"},Ce={class:"payment-amount"},Le={class:"billing-form-fields"},we={key:0,class:"notification is-danger is-light mt-4"},_e=["disabled"],Ee={class:"invoice-switch-link"},$e={class:"secure-note"},Fe={key:"processing",class:"payment-step-processing"},Te={class:"processing-animation"},Se={class:"processing-text"},Ae={class:"processing-subtext"},Pe={class:"secure-note is-size-7 mt-5"},Ie={key:"success",class:"payment-step-success"},Me={class:"success-animation"},xe={class:"success-title"},Ne={class:"success-text"},Ue={class:"secure-note is-size-7 mt-5"},De={key:"invoice-success",class:"payment-step-success"},Xe={class:"success-animation"},Ve={class:"success-title"},Re={class:"success-text"},Oe={class:"invoice-details-box"},Qe={class:"invoice-detail-row"},Be={class:"invoice-detail-label"},Ge={class:"invoice-detail-value"},We={class:"invoice-detail-row"},je={class:"invoice-detail-label"},ze={class:"invoice-detail-value"},qe={class:"invoice-detail-row"},Je={class:"invoice-detail-label"},He={class:"invoice-detail-value"},Ke={class:"invoice-note"},Ye={class:"secure-note"},Ze={key:"error",class:"payment-step-error"},et={class:"error-animation"},tt={class:"error-title"},it={class:"error-text"},st={class:"buttons is-centered mt-4"},at={class:"secure-note is-size-7 mt-5"},nt={key:"details",class:"order-summary-details"},ot={class:"summary-title"},lt={key:0,class:"free-event-info"},rt={class:"free-event-badge"},dt={class:"free-event-description"},ct={key:1,class:"summary-items"},ut={class:"summary-item"},mt={class:"item-details"},pt={class:"item-quantity"},ht={class:"item-name"},gt={class:"item-price"},ft={class:"item-details"},bt={class:"item-quantity"},yt={class:"item-name has-text-grey"},vt={class:"item-price"},kt={key:2,class:"addons-section"},Ct={class:"addons-section-title"},Lt={key:0,class:"addon-ticket-name"},wt={class:"addon-info"},_t={class:"addon-name"},Et={key:0,class:"addon-description"},$t={class:"addon-price"},Ft={key:0,class:"addon-attendee-note"},Tt={class:"addon-quantity-picker"},St=["disabled","onClick"],At={class:"addon-qty-value"},Pt=["disabled","onClick"],It={key:3,class:"voucher-section"},Mt={key:0,class:"voucher-applied"},xt={class:"summary-item"},Nt={class:"voucher-applied-label"},Ut={key:0},Dt={class:"voucher-applied-amount"},Xt={key:0,class:"is-size-7 has-text-grey mt-1"},Vt={key:1,class:"is-size-7 has-text-grey mt-1"},Rt={key:1,class:"voucher-toggle"},Ot={key:2,class:"voucher-input-row"},Qt={key:4,class:"summary-divider"},Bt={key:5,class:"summary-total"},Gt={class:"total-label"},Wt={key:0,class:"total-amount-wrapper"},jt={class:"total-amount-original"},zt={class:"total-amount"},qt={key:1,class:"total-amount"},Jt={class:"payment-section"},Ht={key:0,class:"buyer-info-section"},Kt={class:"buyer-info-label"},Yt={class:"legal-consent-section"},Zt={class:"consent-text"},ei={key:1,class:"consent-text"},ti={class:"consent-text"},ii={class:"consent-text"},si=["href"],ai={class:"consent-text"},ni=["href"],oi=["disabled"],li={key:1,class:"help is-danger has-text-centered mt-2"},ri={class:"secure-note is-size-7 mt-5"};function di(e,t,i,di,ci,ui){const mi=(0,s.g2)("font-awesome-icon"),pi=(0,s.g2)("OrgoLogo"),hi=(0,s.g2)("PhoneCountryPrefixSelect"),gi=(0,s.g2)("b-input"),fi=(0,s.g2)("b-field"),bi=(0,s.g2)("b-select"),yi=(0,s.g2)("b-datepicker"),vi=(0,s.g2)("b-radio"),ki=(0,s.g2)("b-checkbox"),Ci=(0,s.g2)("b-switch"),Li=(0,s.g2)("b-button");return(0,s.uX)(),(0,s.Wv)(a.eB,{name:"checkout-overlay"},{default:(0,s.k6)(()=>[i.active?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("button",{type:"button",class:"checkout-close-btn",onClick:t[0]||(t[0]=(...e)=>ui.handleClose&&ui.handleClose(...e))},[(0,s.bF)(mi,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("div",l,[(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[(0,s.Lk)("div",c,[(0,s.bF)(pi)]),(0,s.Lk)("div",u,[(0,s.Lk)("h2",m,(0,n.v_)(i.event.name),1),(0,s.Lk)("p",p,(0,n.v_)(i.isFreeEvent?e.$t("Register for this event"):e.$t("Complete your order")),1)]),ci.attendees.length>1&&i.event.settings&&i.event.settings.allowSendLinksLater?((0,s.uX)(),(0,s.CE)("div",h,[(0,s.Lk)("div",g,[(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["toggle-btn",{"is-active":"now"===ci.detailsOption}]),onClick:t[1]||(t[1]=e=>ci.detailsOption="now")},[(0,s.bF)(mi,{icon:"fa-light fa-user-pen",class:"toggle-icon"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Fill details now")),1)],2),(0,s.Lk)("button",{type:"button",class:(0,n.C4)(["toggle-btn",{"is-active":"later"===ci.detailsOption}]),onClick:t[2]||(t[2]=e=>ci.detailsOption="later")},[(0,s.bF)(mi,{icon:"fa-light fa-link",class:"toggle-icon"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Send links later")),1)],2)])])):(0,s.Q3)("",!0),"now"===ci.detailsOption?((0,s.uX)(),(0,s.CE)("div",f,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ci.attendees,(i,o)=>((0,s.uX)(),(0,s.CE)("div",{key:o,class:(0,n.C4)(["attendee-card",{"is-completed":ui.isTicketGroupComplete(i,o),"is-expanded":ci.expandedTicket===o||1===ci.attendees.length,"is-single":1===ci.attendees.length}])},[ci.attendees.length>1?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"attendee-card-header",onClick:e=>
1ui.toggleTicket(o)},[(0,s.Lk)("div",y,[(0,s.Lk)("span",{class:(0,n.C4)(["attendee-status-icon",{"is-complete":ui.isTicketGroupComplete(i,o)}])},[ui.isTicketGroupComplete(i,o)?((0,s.uX)(),(0,s.Wv)(mi,{key:0,icon:"fa-light fa-check"})):((0,s.uX)(),(0,s.CE)("span",v,(0,n.v_)(o+1),1))],2),(0,s.Lk)("div",k,[(0,s.Lk)("span",C,(0,n.v_)(i.ticketName),1),ui.isTicketGroupComplete(i,o)?((0,s.uX)(),(0,s.CE)("span",L,[(0,s.eW)((0,n.v_)(i.name)+" ",1),ui.getAddonAttendeesForTicket(o).length>0?((0,s.uX)(),(0,s.CE)("span",w," +"+(0,n.v_)(ui.getAddonAttendeesForTicket(o).length),1)):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("span",_,(0,n.v_)(e.$t("Click to fill details")),1))])]),(0,s.Lk)("span",E,[(0,s.bF)(mi,{icon:ci.expandedTicket===o?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])],8,b)):(0,s.Q3)("",!0),ci.expandedTicket===o||1===ci.attendees.length?((0,s.uX)(),(0,s.CE)("div",{key:1,class:"attendee-card-form",onClick:t[15]||(t[15]=(0,a.D$)(()=>{},["stop"]))},[ui.isPinnedAttendee(i)?((0,s.uX)(),(0,s.CE)("p",$,(0,n.v_)(e.$t("Members-only tickets are issued to your account, so the name and email are taken from your profile.")),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",F,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ui.formFields,o=>((0,s.uX)(),(0,s.CE)(s.FK,{key:ui.getFieldKey(o)},["standard"===o.type&&"phone"===o.key?((0,s.uX)(),(0,s.Wv)(fi,{key:0,label:e.$t("Phone")+(o.mandatory||o.alwaysRequired?" *":""),class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:"field has-addons",onClick:t[3]||(t[3]=(0,a.D$)(()=>{},["stop"]))},[(0,s.Lk)("div",T,[(0,s.bF)(hi,{modelValue:i.fields.phoneCountry,"onUpdate:modelValue":e=>i.fields.phoneCountry=e,placeholder:e.$t("Prefix")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),(0,s.Lk)("div",S,[(0,s.bF)(gi,{modelValue:i.fields.phone,"onUpdate:modelValue":e=>i.fields.phone=e,type:"tel",disabled:!i.fields.phoneCountry,placeholder:ui.getPhonePlaceholder(i)},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])])])]),_:2},1032,["label"])):"standard"===o.type&&"name"===o.key?((0,s.uX)(),(0,s.Wv)(fi,{key:1,label:e.$t(o.label||o.key)+(o.mandatory||o.alwaysRequired?" *":""),type:ui.nameFieldType(i.fields[o.key]),message:ui.nameFieldMessage(i.fields[o.key])},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:i.fields[o.key],"onUpdate:modelValue":e=>i.fields[o.key]=e,disabled:ui.isPinnedAttendee(i),placeholder:e.$t("Enter")+" "+e.$t(o.label||o.key).toLowerCase(),onClick:t[4]||(t[4]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","disabled","placeholder"])]),_:2},1032,["label","type","message"])):"standard"===o.type?((0,s.uX)(),(0,s.Wv)(fi,{key:2,label:e.$t(o.label||o.key)+(o.mandatory||o.alwaysRequired?" *":"")},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:i.fields[o.key],"onUpdate:modelValue":e=>i.fields[o.key]=e,type:o.inputType||"text",disabled:"email"===o.key&&ui.isPinnedAttendee(i),placeholder:e.$t("Enter")+" "+e.$t(o.label||o.key).toLowerCase(),onClick:t[5]||(t[5]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","type","disabled","placeholder"])]),_:2},1032,["label"])):"custom"===o.type&&o.customField&&["input","dropdown","date"].includes(o.customField.fieldType)?((0,s.uX)(),(0,s.Wv)(fi,{key:3,label:o.customField.name+(o.mandatory?" *":""),class:"is-full-width"},{default:(0,s.k6)(()=>["input"===o.customField.fieldType?((0,s.uX)(),(0,s.Wv)(gi,{key:0,modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,placeholder:o.customField.name,onClick:t[6]||(t[6]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","placeholder"])):"dropdown"===o.customField.fieldType?((0,s.uX)(),(0,s.Wv)(bi,{key:1,modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,expanded:"",onClick:t[7]||(t[7]=(0,a.D$)(()=>{},["stop"]))},{default:(0,s.k6)(()=>[(0,s.Lk)("option",A,(0,n.v_)(e.$t("Select"))+"...",1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.customField.fieldOptions?.options,(e,t)=>((0,s.uX)(),(0,s.CE)("option",{key:t,value:t},(0,n.v_)(e),9,P))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):"date"===o.customField.fieldType?((0,s.uX)(),(0,s.Wv)(yi,{key:2,modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,placeholder:o.customField.name,icon:"calendar",position:"is-top-right","append-to-body":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(0,s.Q3)("",!0)]),_:2},1032,["label"])):"custom"===o.type&&"textarea"===o.customField?.fieldType?((0,s.uX)(),(0,s.Wv)(fi,{key:4,label:o.customField.name+(o.mandatory?" *":""),class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,type:"textarea",placeholder:o.customField.name,onClick:t[8]||(t[8]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"])):"custom"===o.type&&"radio"===o.customField?.fieldType?((0,s.uX)(),(0,s.Wv)(fi,{key:5,label:o.customField.name+(o.mandatory?" *":""),class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:"radio-options",onClick:t[9]||(t[9]=(0,a.D$)(()=>{},["stop"]))},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.customField.fieldOptions?.options,
1(e,t)=>((0,s.uX)(),(0,s.Wv)(vi,{key:t,modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,"native-value":t},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e),1)]),_:2},1032,["modelValue","onUpdate:modelValue","native-value"]))),128))])]),_:2},1032,["label"])):"custom"===o.type&&"checkboxes"===o.customField?.fieldType?((0,s.uX)(),(0,s.Wv)(fi,{key:6,label:o.customField.name+(o.mandatory?" *":""),class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",{class:"checkbox-options",onClick:t[10]||(t[10]=(0,a.D$)(()=>{},["stop"]))},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(o.customField.fieldOptions?.options,(e,t)=>((0,s.uX)(),(0,s.Wv)(ki,{key:t,modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,"native-value":t},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e),1)]),_:2},1032,["modelValue","onUpdate:modelValue","native-value"]))),128))])]),_:2},1032,["label"])):"custom"===o.type&&"boolean"===o.customField?.fieldType?((0,s.uX)(),(0,s.CE)("div",I,[(0,s.bF)(Ci,{modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(o.customField.name)+(0,n.v_)(o.mandatory?" *":""),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])])):"custom"===o.type&&o.customField?((0,s.uX)(),(0,s.Wv)(fi,{key:8,label:o.customField.name+(o.mandatory?" *":""),class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:i.fields["custom_"+o.customFieldId],"onUpdate:modelValue":e=>i.fields["custom_"+o.customFieldId]=e,placeholder:o.customField.name,onClick:t[11]||(t[11]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"])):(0,s.Q3)("",!0)],64))),128))]),ui.getAddonAttendeesForTicket(o).length>0?((0,s.uX)(),(0,s.CE)("div",M,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ui.getAddonAttendeesForTicket(o),(i,l)=>((0,s.uX)(),(0,s.CE)("div",{key:"addon-"+l,ref_for:!0,ref:"addonCard-"+o+"-"+l,class:(0,n.C4)(["addon-attendee-nested-card",{"is-highlighted":ui.isAddonHighlighted(o,l)}])},[(0,s.Lk)("div",x,[(0,s.Lk)("span",N,[(0,s.bF)(mi,{icon:"fa-light fa-user-plus",class:"addon-icon"}),(0,s.eW)(" "+(0,n.v_)(i.addonName),1)]),ui.isAddonAttendeeComplete(i)?((0,s.uX)(),(0,s.CE)("span",U,(0,n.v_)(i.name),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("div",D,[(0,s.bF)(fi,{label:e.$t("Full Name")+" *",type:ui.nameFieldType(i.fields.name),message:ui.nameFieldMessage(i.fields.name)},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:i.fields.name,"onUpdate:modelValue":e=>i.fields.name=e,placeholder:e.$t("Enter")+" "+e.$t("name").toLowerCase(),onClick:t[12]||(t[12]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label","type","message"]),(0,s.bF)(fi,{label:e.$t("Email")+" *"},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:i.fields.email,"onUpdate:modelValue":e=>i.fields.email=e,type:"email",placeholder:e.$t("Enter")+" "+e.$t("email").toLowerCase(),onClick:t[13]||(t[13]=(0,a.D$)(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"])])],2))),128))])):(0,s.Q3)("",!0),ci.attendees.length>1?((0,s.uX)(),(0,s.CE)("div",X,[(0,s.Lk)("button",{class:"button is-primary is-rounded",disabled:!ui.isTicketGroupComplete(i,o),onClick:t[14]||(t[14]=(0,a.D$)((...e)=>ui.collapseTicket&&ui.collapseTicket(...e),["stop"]))},(0,n.v_)(e.$t("Done")),9,V)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)],2))),128))])):"later"===ci.detailsOption?((0,s.uX)(),(0,s.CE)("div",R,[(0,s.Lk)("div",O,[(0,s.bF)(mi,{icon:"fa-light fa-envelope",class:"info-icon"}),(0,s.Lk)("p",null,(0,n.v_)(e.$t("You will receive unique links for each ticket that you can share with attendees.")),1)])])):(0,s.Q3)("",!0),i.event.registrationFormText?((0,s.uX)(),(0,s.CE)("div",Q,(0,n.v_)(i.event.registrationFormText),1)):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",B,[(0,s.Lk)("div",G,[(0,s.Lk)("div",W,[(0,s.bF)(a.eB,{name:"step-slide",mode:"out-in"},{default:(0,s.k6)(()=>["loading"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",j,[(0,s.Lk)("div",z,[(0,s.bF)(mi,{icon:"fa-light fa-credit-card",class:"loading-icon"})]),(0,s.Lk)("p",q,(0,n.v_)(e.$t("Preparing secure payment"))+"...",1),(0,s.Lk)("p",J,(0,n.v_)(e.$t("This will only take a moment")),1),(0,s.Lk)("p",H,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Payment secured by"))+" ",1),t[45]||(t[45]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[46]||(t[46]=(0,s.eW)(" & ",-1)),t[47]||(t[47]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))])])):"payment"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",K,[(0,s.Lk)("button",{class:"button is-ghost is-small mb-4",onClick:t[16]||(t[16]=(...e)=>ui.goBackToDetails&&ui.goBackToDetails(...e))},[(0,s.Lk)("span",Y,[(0,s.bF)(mi,{icon:"fa-light fa-arrow-left"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Back")),1)]),(0,s.Lk)("h3",Z,[(0,s.Lk)("span",ee,[(0,s.bF)(mi,{icon:"fa-light fa-lock"})]),(0,s.eW)(" "+(0,n.v_)(e.$t("Secure Payment")),1)]),(0,s.Lk)("div",te,[ci.voucherApplied?.valid?((0,s.uX)(),(0,s.CE)("div",ie,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Subtotal")),1),(0,s.Lk)("span",se,(0,n.v_)(ui.formatPrice(ui.totalAmount,ui.primaryCurrency)),1)])):(0,s.Q3)("",!0),ci.voucherApplied?.valid?((0,s.uX)(),(0,s.CE)("div",ae,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Voucher"))+" "+(0,n.v_)(ci.voucherApplied.code),1),(0,s.Lk)("span",ne,"-"+(0,n.v_)(ui.formatPrice(ci.voucherApplied.discountAmount/100,ui.primaryCurrency)),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",oe,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Total")),1),(0,s.Lk)("span",le,(0,n.v_)(ui.formatPrice(ui.finalAmount,ui.primaryCurrency)),1)])]),t[51]||
1(t[51]=(0,s.Lk)("div",{id:"event-payment-element",class:"stripe-element-container"},null,-1)),ci.paymentErrorMessage?((0,s.uX)(),(0,s.CE)("div",re,[(0,s.Lk)("button",{class:"delete",onClick:t[17]||(t[17]=e=>ci.paymentErrorMessage=null)}),(0,s.eW)(" "+(0,n.v_)(ci.paymentErrorMessage),1)])):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:(0,n.C4)(["button is-primary is-rounded is-medium checkout-btn mt-4",{"is-loading":ci.isPaymentProcessing}]),disabled:ci.isPaymentProcessing||!ci.isPaymentElementReady||!ci.isPaymentElementComplete,onClick:t[18]||(t[18]=(...e)=>ui.confirmPayment&&ui.confirmPayment(...e))},(0,n.v_)(e.$t("Pay")),11,de),(0,s.Lk)("p",ce,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Payment secured by"))+" ",1),t[48]||(t[48]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[49]||(t[49]=(0,s.eW)(" & ",-1)),t[50]||(t[50]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))])])):"billing"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",ue,[(0,s.Lk)("button",{class:"button is-ghost is-small mb-4",onClick:t[19]||(t[19]=(...e)=>ui.goBackToDetails&&ui.goBackToDetails(...e))},[(0,s.Lk)("span",me,[(0,s.bF)(mi,{icon:"fa-light fa-arrow-left"})]),(0,s.Lk)("span",null,(0,n.v_)(e.$t("Back")),1)]),(0,s.Lk)("h3",pe,[(0,s.Lk)("span",he,[(0,s.bF)(mi,{icon:"fa-light fa-file-invoice"})]),(0,s.eW)(" "+(0,n.v_)(e.$t("Billing Details")),1)]),(0,s.Lk)("div",ge,[ci.voucherApplied?.valid?((0,s.uX)(),(0,s.CE)("div",fe,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Subtotal")),1),(0,s.Lk)("span",be,(0,n.v_)(ui.formatPrice(ui.totalAmount,ui.primaryCurrency)),1)])):(0,s.Q3)("",!0),ci.voucherApplied?.valid?((0,s.uX)(),(0,s.CE)("div",ye,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Voucher"))+" "+(0,n.v_)(ci.voucherApplied.code),1),(0,s.Lk)("span",ve,"-"+(0,n.v_)(ui.formatPrice(ci.voucherApplied.discountAmount/100,ui.primaryCurrency)),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",ke,[(0,s.Lk)("span",null,(0,n.v_)(e.$t("Total")),1),(0,s.Lk)("span",Ce,(0,n.v_)(ui.formatPrice(ui.finalAmount,ui.primaryCurrency)),1)])]),(0,s.Lk)("div",Le,[(0,s.bF)(fi,{label:e.$t("Company/Organization Name"),class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.billing.companyName,"onUpdate:modelValue":t[20]||(t[20]=e=>ci.billing.companyName=e),placeholder:e.$t("Optional - leave blank for personal")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(fi,{label:e.$t("Billing Address")+" *",class:"is-full-width"},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.billing.address,"onUpdate:modelValue":t[21]||(t[21]=e=>ci.billing.address=e),type:"textarea",rows:"2",placeholder:e.$t("Street, City, Postal Code, Country")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(fi,{label:e.$t("VAT Number")},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.billing.vatNumber,"onUpdate:modelValue":t[22]||(t[22]=e=>ci.billing.vatNumber=e),placeholder:e.$t("Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(fi,{label:e.$t("Registration Number")},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.billing.registrationNumber,"onUpdate:modelValue":t[23]||(t[23]=e=>ci.billing.registrationNumber=e),placeholder:e.$t("Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(fi,{label:e.$t("Billing Email")},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.billing.email,"onUpdate:modelValue":t[24]||(t[24]=e=>ci.billing.email=e),type:"email",placeholder:e.$t("Defaults to buyer email")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),(0,s.bF)(fi,{label:e.$t("Billing Phone")},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.billing.phone,"onUpdate:modelValue":t[25]||(t[25]=e=>ci.billing.phone=e),type:"tel",placeholder:e.$t("Optional")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),ci.paymentErrorMessage?((0,s.uX)(),(0,s.CE)("div",we,[(0,s.Lk)("button",{class:"delete",onClick:t[26]||(t[26]=e=>ci.paymentErrorMessage=null)}),(0,s.eW)(" "+(0,n.v_)(ci.paymentErrorMessage),1)])):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:(0,n.C4)(["button is-primary is-rounded is-medium checkout-btn mt-4",{"is-loading":ci.isProcessing}
1]),disabled:!ui.canProceedWithInvoice||ci.isProcessing,onClick:t[27]||(t[27]=(...e)=>ui.handleBillingCardCheckout&&ui.handleBillingCardCheckout(...e))},[(0,s.bF)(mi,{icon:"fa-light fa-credit-card",class:"mr-2"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Pay with Card")),1)],10,_e),(0,s.Lk)("div",Ee,[(0,s.Lk)("a",{href:"#",class:(0,n.C4)({"is-disabled":!ui.canProceedWithInvoice}),onClick:t[28]||(t[28]=(0,a.D$)((...e)=>ui.handleBankTransfer&&ui.handleBankTransfer(...e),["prevent"]))},[(0,s.bF)(mi,{icon:"fa-light fa-building-columns",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Pay via bank transfer")),1)],2)]),(0,s.Lk)("p",$e,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Payment secured by"))+" ",1),t[52]||(t[52]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[53]||(t[53]=(0,s.eW)(" & ",-1)),t[54]||(t[54]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))])])):"processing"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",Fe,[(0,s.Lk)("div",Te,[(0,s.bF)(mi,{icon:"fa-light fa-spinner",class:"fa-spin processing-icon"})]),(0,s.Lk)("p",Se,(0,n.v_)(ui.isZeroTotalOrder?e.$t("Processing your registration"):e.$t("Processing your payment"))+"...",1),(0,s.Lk)("p",Ae,(0,n.v_)(e.$t("Please do not close this window")),1),(0,s.Lk)("p",Pe,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),ui.isZeroTotalOrder?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,n.v_)(e.$t("Community platform powered by"))+" ",1),t[55]||(t[55]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1))],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,n.v_)(e.$t("Payment secured by"))+" ",1),t[56]||(t[56]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[57]||(t[57]=(0,s.eW)(" & ",-1)),t[58]||(t[58]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))],64))])])):"success"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",Ie,[(0,s.Lk)("div",Me,[(0,s.bF)(mi,{icon:"fa-light fa-check-circle",class:"success-icon"})]),(0,s.Lk)("h3",xe,(0,n.v_)(ui.isZeroTotalOrder?e.$t("Registration successful!"):e.$t("Payment successful!")),1),(0,s.Lk)("p",Ne,(0,n.v_)(ui.isZeroTotalOrder?e.$t("You are now registered for this event. A confirmation email has been sent."):e.$t("Your tickets have been confirmed.")),1),(0,s.Lk)("button",{class:"button is-primary is-rounded is-medium mt-5",onClick:t[29]||(t[29]=(...e)=>ui.handleSuccessClose&&ui.handleSuccessClose(...e))},(0,n.v_)(e.$t("Done")),1),(0,s.Lk)("p",Ue,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),ui.isZeroTotalOrder?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,n.v_)(e.$t("Community platform powered by"))+" ",1),t[59]||(t[59]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1))],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,n.v_)(e.$t("Payment secured by"))+" ",1),t[60]||(t[60]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[61]||(t[61]=(0,s.eW)(" & ",-1)),t[62]||(t[62]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))],64))])])):"invoice-success"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",De,[(0,s.Lk)("div",Xe,[(0,s.bF)(mi,{icon:"fa-light fa-file-invoice",class:"success-icon invoice-success-icon"})]),(0,s.Lk)("h3",Ve,(0,n.v_)(e.$t("Invoice Created!")),1),(0,s.Lk)("p",Re,[(0,s.eW)((0,n.v_)(e.$t("An invoice has been sent to"))+" ",1),(0,s.Lk)("strong",null,(0,n.v_)(ci.invoiceResult?.billingEmail),1)]),(0,s.Lk)("div",Oe,[(0,s.Lk)("div",Qe,[(0,s.Lk)("span",Be,(0,n.v_)(e.$t("Invoice Number")),1),(0,s.Lk)("span",Ge,(0,n.v_)(ci.invoiceResult?.invoiceNumber),1)]),(0,s.Lk)("div",We,[(0,s.Lk)("span",je,(0,n.v_)(e.$t("Amount")),1),(0,s.Lk)("span",ze,(0,n.v_)(ui.formatPrice(ci.invoiceResult?.amount,ui.primaryCurrency)),1)]),(0,s.Lk)("div",qe,[(0,s.Lk)("span",Je,(0,n.v_)(e.$t("Tickets")),1),(0,s.Lk)("span",He,(0,n.v_)(ci.invoiceResult?.ticketCount),1)])]),(0,s.Lk)("p",Ke,[(0,s.bF)(mi,{icon:"fa-light fa-info-circle"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Your tickets will be confirmed once payment is received.")),1)]),(0,s.Lk)("button",{class:"button is-primary is-rounded is-medium mt
1-4",onClick:t[30]||(t[30]=(...e)=>ui.handleSuccessClose&&ui.handleSuccessClose(...e))},(0,n.v_)(e.$t("Done")),1),(0,s.Lk)("p",Ye,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Payment secured by"))+" ",1),t[63]||(t[63]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[64]||(t[64]=(0,s.eW)(" & ",-1)),t[65]||(t[65]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))])])):"error"===ci.paymentStep?((0,s.uX)(),(0,s.CE)("div",Ze,[(0,s.Lk)("div",et,[(0,s.bF)(mi,{icon:"fa-light fa-times-circle",class:"error-icon"})]),(0,s.Lk)("h3",tt,(0,n.v_)(ui.isZeroTotalOrder?e.$t("Registration Failed"):e.$t("Payment Failed")),1),(0,s.Lk)("p",it,(0,n.v_)(ci.paymentErrorMessage||(ui.isZeroTotalOrder?e.$t("An error occurred while processing your registration."):e.$t("An error occurred while processing your payment."))),1),(0,s.Lk)("div",st,[(0,s.Lk)("button",{class:"button is-primary is-rounded",onClick:t[31]||(t[31]=e=>ui.isZeroTotalOrder?ui.goBackToDetails():ui.retryPayment())}
1,(0,n.v_)(e.$t("Try Again")),1),(0,s.Lk)("button",{class:"button is-light is-rounded",onClick:t[32]||(t[32]=(...e)=>ui.goBackToDetails&&ui.goBackToDetails(...e))},(0,n.v_)(e.$t("Cancel")),1)]),(0,s.Lk)("p",at,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),ui.isZeroTotalOrder?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,n.v_)(e.$t("Community platform powered by"))+" ",1),t[66]||(t[66]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1))],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,n.v_)(e.$t("Payment secured by"))+" ",1),t[67]||(t[67]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[68]||(t[68]=(0,s.eW)(" & ",-1)),t[69]||(t[69]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))],64))])])):((0,s.uX)(),(0,s.CE)("div",nt,[(0,s.Lk)("h3",ot,(0,n.v_)(i.isFreeEvent?e.$t("Registration"):e.$t("Order summary")),1),i.isFreeEvent?((0,s.uX)(),(0,s.CE)("div",lt,[(0,s.Lk)("div",rt,[(0,s.bF)(mi,{icon:"fa-light fa-calendar-check",class:"mr-2"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Free event")),1)]),(0,s.Lk)("p",dt,(0,n.v_)(e.$t("Complete the form to register for this event. You will receive a confirmation email.")),1)])):(0,s.Q3)("",!0),i.isFreeEvent?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",ct,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ci.selections,e=>((0,s.uX)(),(0,s.CE)(s.FK,{key:e.productPriceId},[(0,s.Lk)("div",ut,[(0,s.Lk)("div",mt,[(0,s.Lk)("span",pt,(0,n.v_)(e.quantity)+"Ã",1),(0,s.Lk)("span",ht,(0,n.v_)(e.name),1)]),(0,s.Lk)("span",gt,(0,n.v_)(ui.formatPrice(e.price*e.quantity,e.currency)),1)]),e.ticketAddons?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:0},(0,s.pI)(e.ticketAddons,(t,i)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"ta-"+e.productPriceId+"-"+i},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t,t=>((0,s.uX)(),(0,s.CE)("div",{key:"ta-"+e.productPriceId+"-"+i+"-"+t.addonId,class:"summary-item summary-item-addon"},[(0,s.Lk)("div",ft,[(0,s.Lk)("span",bt,(0,n.v_)(t.quantity)+"Ã",1),(0,s.Lk)("span",yt,[(0,s.eW)(" â³ "+(0,n.v_)(t.name)+" ",1),e.quantity>1?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("(#"+(0,n.v_)(i+1)+")",1)],64)):(0,s.Q3)("",!0)])]),(0,s.Lk)("span",vt,(0,n.v_)(ui.formatPrice(t.price*t.quantity,e.currency)),1)]))),128))],64))),128)):(0,s.Q3)("",!0)],64))),128))])),ui.hasAvailableAddons&&!i.isFreeEvent?((0,s.uX)(),(0,s.CE)("div",kt,[t[70]||(t[70]=(0,s.Lk)("div",{class:"summary-divider"},null,-1)),(0,s.Lk)("p",Ct,(0,n.v_)(e.$t("Extras")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ui.selectionsWithAvailableAddons,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"addons-"+t.productPriceId},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(t.quantity,i=>((0,s.uX)(),(0,s.CE)("div",{key:t.productPriceId+"-ticket-"+i,class:"addon-ticket-group card"},[ui.totalTickets>1?((0,s.uX)(),(0,s.CE)("p",Lt,(0,n.v_)(t.name)+" #"+(0,n.v_)(i),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(ui.getAvailableAddonsForTicket(t.productPriceId),a=>((0,s.uX)(),(0,s.CE)("div",{key:t.productPriceId+"-"+(i-1)+"-"+a.id,class:"addon-row"},[(0,s.Lk)("div",wt,[(0,s.Lk)("span",_t,(0,n.v_)(a.name),1),a.description?((0,s.uX)(),(0,s.CE)("span",Et,(0,n.v_)(a.description),1)):(0,s.Q3)("",!0),(0,s.Lk)("span",$t,[(0,s.eW)(" +"+(0,n.v_)(ui.formatPrice(a.price,t.currency))+" ",1),a.createsAttendee?((0,s.uX)(),(0,s.CE)("span",Ft," · "+(0,n.v_)(e.$t("per attendee")),1)):(0,s.Q3)("",!0)])]),(0,s.Lk)("div",Tt,[(0,s.Lk)("button",{type:"button",class:"addon-qty-btn",disabled:0===ui.getAddonQuantity(t.productPriceId,i-1,a.id),onClick:e=>ui.decrementAddon(t.productPriceId,i-1,a)},[(0,s.bF)(mi,{icon:"fa-light fa-minus"})],8,St),(0,s.Lk)("span",At,(0,n.v_)(ui.getAddonQuantity(t.productPriceId,i-1,a.id)),1),(0,s.Lk)("button",{type:"button",class:"addon-qty-btn",disabled:!ui.canIncrementAddon(t.productPriceId,i-1,a),onClick:e=>ui.incrementAddon(t.productPriceId,i-1,a)},[(0,s.bF)(mi,{icon:"fa-light fa-plus"})],8,Pt)])]))),128))]))),128))],64))),128))])):(0,s.Q3)("",!0),!i.isFreeEvent&&ui.totalAmount>0?((0,s.uX)(),(0,s.CE)("div",It,[ci.voucherApplied?.valid?((0,s.uX)(),(0,s.CE)("div",Mt,[(0,s.Lk)("div",xt,[(0,s.Lk)("span",Nt,[(0,s.bF)(mi,{icon:"fa-light fa-tag",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Voucher"))+" "+(0,n.v_)(ci.voucherApplied.code)+" ",1),"percentage"===ci.voucherApplied.discountType?((0,s.uX)(),(0,s.CE)("span",Ut,"-"+(0,n.v_)(ci.voucherApplied.discountValue)+"%",1)):(0,s.Q3)("",!0)]),(0,s.Lk)("span",Dt,"-"+(0,n.v_)(ui.formatPrice(ci.voucherApplied.discountAmount/100,ui.primaryCurrency)),1)]),(0,s.Lk)("a",{class:"voucher-remove-link",onClick:t[33]||(t[33]=(...e)=>ui.removeVoucher&&ui.removeVoucher(...e))},(0,n.v_)(e.$t("Remove")),1),ci.voucherApplied.allowedTicketTypeIds&&ci.voucherApplied.allowedTicketTypeIds.length>0?((0,s.uX)(),(0,s.CE)("p",Xt,(0,n.v_)(e.$t("Applies to:"))+" "+(0,n.v_)(ui.getVoucherEligibleTicketNames(ci.voucherApplied.allowedTicketTypeIds).join(", ")),1)):(0,s.Q3)("",!0),ci.voucherApplied.maxDiscountAmount&&"percentage"===ci.voucherApplied.discountType?((0,s.uX)(),(0,s.CE)("p",Vt,(0,n.v_)(e.$t("Max discount:"))+" "+(0,n.v_)(ui.formatPrice(ci.voucherApplied.maxDiscountAmount,ui.primaryCurrency)),1)):(0,s.Q3)("",!0)])):ci.showVoucherInput?((0,s.uX)(),(0,s.CE)("div",Ot,[(0,s.bF)(fi,{type:ci.voucherError?"is-danger":"",message:ci.voucherError,class:"voucher-input-field"},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{modelValue:ci.voucherCode,"onUpdate:modelValue":t[35]||(t[35]=e=>
1ci.voucherCode=e),placeholder:e.$t("Enter voucher code"),style:{"text-transform":"uppercase"},onKeyup:(0,a.jR)(ui.applyVoucher,["enter"])},null,8,["modelValue","placeholder","onKeyup"])]),_:1},8,["type","message"]),(0,s.bF)(Li,{type:"is-primary",class:"is-small is-rounded",loading:ci.isValidatingVoucher,disabled:!ci.voucherCode.trim()||i.isPreview,onClick:ui.applyVoucher},{default:(0,s.k6)(()=>[(0,s.eW)((0,n.v_)(e.$t("Apply")),1)]),_:1},8,["loading","disabled","onClick"])])):((0,s.uX)(),(0,s.CE)("div",Rt,[(0,s.Lk)("a",{class:"voucher-toggle-link",onClick:t[34]||(t[34]=e=>ci.showVoucherInput=!0)},[(0,s.bF)(mi,{icon:"fa-light fa-tag",class:"mr-1"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Have a voucher code?")),1)])]))])):(0,s.Q3)("",!0),i.isFreeEvent?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Qt)),i.isFreeEvent?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Bt,[(0,s.Lk)("span",Gt,(0,n.v_)(e.$t("Total")),1),ci.voucherApplied?.valid?((0,s.uX)(),(0,s.CE)("span",Wt,[(0,s.Lk)("span",jt,(0,n.v_)(ui.formatPrice(ui.totalAmount,ui.primaryCurrency)),1),(0,s.Lk)("span",zt,(0,n.v_)(0===ui.finalAmount?e.$t("Free"):ui.formatPrice(ui.finalAmount,ui.primaryCurrency)),1)])):((0,s.uX)(),(0,s.CE)("span",qt,(0,n.v_)(ui.formatPrice(ui.totalAmount,ui.primaryCurrency)),1))])),t[75]||(t[75]=(0,s.Lk)("div",{class:"summary-divider"},null,-1)),(0,s.Lk)("div",Jt,[!i.isLoggedIn&&ci.attendees.length>1?((0,s.uX)(),(0,s.CE)("div",Ht,[(0,s.Lk)("p",Kt,(0,n.v_)(e.$t("Invoice information")),1),(0,s.bF)(fi,{label:e.$t("Full Name"),type:ui.nameFieldType(ui.effectiveBuyerName),message:ui.nameFieldMessage(ui.effectiveBuyerName)},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{"model-value":ui.effectiveBuyerName,placeholder:e.$t("Enter your name"),"onUpdate:modelValue":t[36]||(t[36]=e=>ci.buyerName=e)},null,8,["model-value","placeholder"])]),_:1},8,["label","type","message"]),(0,s.bF)(fi,{label:e.$t("Email")},{default:(0,s.k6)(()=>[(0,s.bF)(gi,{"model-value":ui.effectiveBuyerEmail,type:"email",placeholder:e.$t("Enter your email"),"onUpdate:modelValue":t[37]||(t[37]=e=>ci.buyerEmail=e)},null,8,["model-value","placeholder"])]),_:1},8,["label"])])):(0,s.Q3)("",!0),(0,s.Lk)("div",Yt,[ui.showNewsletterCheckbox?((0,s.uX)(),(0,s.Wv)(fi,{key:0,class:"consent-field"},{default:(0,s.k6)(()=>[ui.autoSubscribeNewsletter?((0,s.uX)(),(0,s.CE)("span",ei,(0,n.v_)(e.$t("By continuing, you will be subscribed to our newsletter. You can unsubscribe at any time.")),1)):((0,s.uX)(),(0,s.Wv)(ki,{key:0,modelValue:ci.isNewsletter,"onUpdate:modelValue":t[38]||(t[38]=e=>ci.isNewsletter=e),size:"is-small"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Zt,(0,n.v_)(e.$t("I want to subscribe to the newsletter")),1)]),_:1},8,["modelValue"]))]),_:1})):(0,s.Q3)("",!0),ui.invoicePaymentEnabled&&!i.isFreeEvent?((0,s.uX)(),(0,s.Wv)(fi,{key:1,class:"consent-field"},{default:(0,s.k6)(()=>[(0,s.bF)(ki,{modelValue:ci.wantCompanyInvoice,"onUpdate:modelValue":t[39]||(t[39]=e=>ci.wantCompanyInvoice=e),size:"is-small"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ti,(0,n.v_)(e.$t("I want company invoice")),1)]),_:1},8,["modelValue"])]),_:1})):(0,s.Q3)("",!0),e.tenant?.urlGDPR?((0,s.uX)(),(0,s.Wv)(fi,{key:2,class:"consent-field"},{default:(0,s.k6)(()=>[(0,s.bF)(ki,{modelValue:ci.agreeGdpr,"onUpdate:modelValue":t[41]||(t[41]=e=>ci.agreeGdpr=e),size:"is-small"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ii,[(0,s.eW)((0,n.v_)(e.$t("agreeGDPR"))+" ",1),(0,s.Lk)("a",{href:e.tenant.urlGDPR,target:"_blank",class:"consent-link",onClick:t[40]||(t[40]=(0,a.D$)(()=>{},["stop"]))},(0,n.v_)(e.tenant.urlGDPR),9,si)])]),_:1},8,["modelValue"])]),_:1})):(0,s.Q3)("",!0),ui.eventTermsUrl?((0,s.uX)(),(0,s.Wv)(fi,{key:3,class:"consent-field"},{default:(0,s.k6)(()=>[(0,s.bF)(ki,{modelValue:ci.agreeTerms,"onUpdate:modelValue":t[43]||(t[43]=e=>ci.agreeTerms=e),size:"is-small"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ai,[(0,s.eW)((0,n.v_)(e.$t("agreeTerms"))+" ",1),(0,s.Lk)("a",{href:ui.eventTermsUrl,target:"_blank",class:"consent-link",onClick:t[42]||(t[42]=(0,a.D$)(()=>{},["stop"]))},(0,n.v_)(e.tenant?.urlTermsEvents?e.$t("eventTermsOfService"):e.$t("termsOfService")),9,ni)])]),_:1},8,["modelValue"])]),_:1})):(0,s.Q3)("",!0)]),(0,s.Lk)("button",{class:(0,n.C4)(["button is-primary is-rounded is-medium checkout-btn",{"is-loading":ci.isProcessing}]),disabled:ci.isProcessing||i.isPreview,onClick:t[44]||(t[44]=(...e)=>ui.handleCardCheckout&&ui.handleCardCheckout(...e))},[i.isPreview?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,n.v_)(e.$t("Registrations open when you publish")),1)],64)):ui.isZeroTotalOrder?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,n.v_)(e.$t("Complete Registration")),1)],64)):ci.wantCompanyInvoice?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.eW)((0,n.v_)(e.$t("Continue"))+" ",1),(0,s.bF)(mi,{icon:"fa-light fa-arrow-right",class:"ml-2"})],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[(0,s.bF)(mi,{icon:"fa-light fa-credit-card",class:"mr-2"}),(0,s.eW)(" "+(0,n.v_)(e.$t("Pay with Card")),1)],64))],10,oi),ci.showValidationErrors&&!ui.canProceed?((0,s.uX)(),(0,s.CE)("p",li,[(0,s.eW)((0,n.v_)(e.$t("The following required fields are missing"))+" ",1),ui.missingRequiredFieldLabels.length?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)(": "+(0,n.v_)(ui.missingRequiredFieldLabels.join(", ")),1)],64)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),(0,s.Lk)("p",ri,[(0,s.bF)(mi,{icon:"fa-light fa-shield-check"}),ui.isZeroTotalOrder?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,n.v_)(e.$t("Community platform powered by"))+" ",1),t[71]||(t[71]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1))],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,n.v_)(e.$t("Payment secured by"))+" ",1),t[72]||(t[72]=(0,s.Lk)("a",{href:"https://orgo.space",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Orgo")],-1)),t[73]||(t[73]=(0,s.eW)(" & ",-1)),t[74]||(t[74]=(0,s.Lk)("a",{href:"https://stripe.com",target:"_blank",rel:"noopener noreferrer"},[(0,s.Lk)("strong",null,"Stripe")],-1))],64))])])]))]),_:1})])])])])])):(0,s.Q3)("",!0)]),_:1})}i(44114),i(18111),i(81148),i(22489),i(20116),i(61701),i(18237),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var ci=i(95256),ui=i(99440),mi=i(71537),pi=i(40834),hi={name:"EventCheckoutModal",components:{PhoneCountryPrefixSelect:ui.A,OrgoLogo:mi.A},props:{active:{type:Boolean,default:!1},event:{type:Object,required:!0},currentTickets:{type:Array,default:()=>[]},upcomingTickets:{type:Array,default:()=>[]},expiredTickets:{type:Array,default:()=>[]},availability:{type:Object,default:null},isLoggedIn:{type:Boolean,default:!1},user:{type:Object,default:null},initialSelections:{type:Array,default:()=>[]},startAtDetails:{type:Boolean,default:!1},isFreeEvent:{type:Boolean,default:!1},isPreview:{type:Boolean,default:!1}},emits:["close","success"],data(){return{selections:[],detailsOption:"now",attendees:[],addonAttendees:[],expandedAddonAttendee:null,highlightedAddon:null,buyerName:"",buyerEmail:"",expandedTicket:0,isProcessing:!1,showValidationErrors:!1,registrationResult:null,paymentStep:"details",stripe:null,stripeElements:null,stripePaymentElement:null,stripeConfig:null,clientSecret:null,paymentIntentId:null,paymentUniqueId:null,isPaymentElementReady:!1,isPaymentElementComplete:!1,isPaymentProcessing:!1,paymentErrorMessage:null,voucherCode:"",voucherApplied:null,isValidatingVoucher:!1,voucherError:null,showVoucherInput:!1,agreeGdpr:!1,agreeTerms:!1,isNewsletter:!0,wantCompanyInvoice:!1,billing:{companyName:"",address:"",vatNumber:"",registrationNumber:"",email:"",ph
1one:""},invoiceResult:null}},computed:{...(0,pi.L8)(["tenant","isNativeApp"]),formFields(){const e=this.event?.registrationFormConfig;return e?.fields?.length>0?e.fields:[{type:"standard",key:"name",label:"Full Name",inputType:"text",mandatory:!0,alwaysRequired:!0},{type:"standard",key:"email",label:"Email",inputType:"email",mandatory:!0,alwaysRequired:!0}]},membersOnlyPriceIds(){const e=new Set;for(const t of[this.currentTickets,this.upcomingTickets,this.expiredTickets])for(const i of t||[])i&&"members"===i.isRestricted&&e.add(i.id);return e},totalTickets(){return this.selections.reduce((e,t)=>e+t.quantity,0)},totalAmount(){let e=this.selections.reduce((e,t)=>e+t.price*t.quantity,0);for(const t of this.selections)if(t.ticketAddons)for(const i of t.ticketAddons)for(const t of i)e+=t.price*t.quantity;return e},finalAmount(){return this.voucherApplied?.valid?this.voucherApplied.finalAmount/100:this.totalAmount},addonAttendeesCount(){let e=0;for(const t of this.selections)if(t.ticketAddons)for(const i of t.ticketAddons)for(const t of i)t.createsAttendee&&(e+=t.quantity);return e},primaryCurrency(){return this.selections[0]?.currency||this.currentTickets[0]?.currency||"EUR"},allAttendeesComplete(){return this.attendees.every(e=>this.isAttendeeComplete(e))},allAddonAttendeesComplete(){return this.addonAttendees.every(e=>this.isAddonAttendeeComplete(e))},missingRequiredFieldLabels(){const e=[];for(const t of this.attendees)for(const i of this.formFields){const s=i.mandatory||i.alwaysRequired;if(!s)continue;if(this.isFieldFilled(i,t))continue;const a=i.label||i.customField?.name||i.key;a&&!e.includes(a)&&e.push(a)}return e},eventTermsUrl(){return this.tenant?.urlTermsEvents||this.tenant?.urlTerms||null},canProceed(){if(!this.isLoggedIn){const e=this.effectiveBuyerName,t=this.effectiveBuyerEmail;if(!e?.trim()||!t?.trim()||!this.isValidEmail(t)||!this.isValidName(e))return!1}return!!("now"!==this.detailsOption||this.allAttendeesComplete&&this.allAddonAttendeesComplete)&&(!(this.tenant?.urlGDPR&&!this.agreeGdpr)&&!(this.eventTermsUrl&&!this.agreeTerms))},hasAvailableAddons(){return this.selections.some(e=>{const t=this.getAvailableAddonsForTicket(e.productPriceId);return t&&t.length>0})},selectionsWithAvailableAddons(){return this.selections.filter(e=>{const t=this.getAvailableAddonsForTicket(e.productPriceId);return t&&t.length>0})},invoicePaymentEnabled(){return this.tenant?.settingFeatures?.invoices?.isActive&&!this.tenant?.settingFeatures?.events?.disableCompanyInvoice&&this.finalAmount>0},canProceedWithInvoice(){if(!this.isLoggedIn){const e=this.effectiveBuyerName,t=this.effectiveBuyerEmail;if(!e?.trim()||!t?.trim()||!this.isValidEmail(t)||!this.isValidName(e))return!1}return!!("now"!==this.detailsOption||this.allAttendeesComplete&&this.allAddonAttendeesComplete)&&(!(this.tenant?.urlGDPR&&!this.agreeGdpr)&&(!(this.eventTermsUrl&&!this.agreeTerms)&&!!this.billing.address?.trim()))},effectiveBuyerName(){return this.isLoggedIn?this.user?.fullName||"":1===this.attendees.length?this.attendees[0]?.fields?.name||"":this.buyerName||this.attendees[0]?.fields?.name||""},effectiveBuyerEmail(){return this.isLoggedIn?this.user?.email||"":1===this.attendees.length?this.attendees[0]?.fields?.email||"":this.buyerEmail||this.attendees[0]?.fields?.email||""},isZeroTotalOrder(){return this.isFreeEvent||0===this.finalAmount},showNewsletterCheckbox(){return!this.event?.settings?.disableSubscribe},autoSubscribeNewsletter(){return!!this.tenant?.newsletterAutoSubscribe}},watch:{active(e){e?(this.reset(),document.body.style.overflow="hidden"):document.body.style.overflow=""},selections:{handler(){this.buildAttendeesList(),this.voucherApplied&&(this.voucherApplied=null,this.voucherCode="",this.voucherError=null,this.showVoucherInput=!1)},deep:!0}},mounted(){document.addEventListener("keydown",this.handleEscKey)},beforeUnmount(){document.body.style.overflow="",document.removeEventListener("keydown",this.handleEscKey)},methods:{reset(){this.selections=[...this.initialSelections];for(const e of this.selections)this.ensureTicketAddons(e);if(this.detailsOption="now",this.buyerName=this.user?.fullName||"",this.buyerEmail=this.user?.email||"",this.expandedTicket=0,this.isProcessing=!1,this.registrationResult=null,this.addonAttendees=[],this.expandedAddonAttendee=null,this.teardownStripeElement(),this.paymentStep="details",this.stripe=null,this.stripeElements=null,this.stripePaymentElement=null,this.stripeConfig=null,this.clientSecret=null,this.paymentIntentId=null,this.paymentUniqueId=null,this.isPaymentElementReady=!1,this.isPaymentElementComplete=!1,this.isPaymentProcessing=!1,this.paymentErrorMessage=null,this.voucherCode="",this.voucherApplied=null,this.isValidatingVoucher=!1,this.voucherError=null,this.showVoucherInput=!1,this.agreeGdpr=!1,this.agreeTerms=!1,this.isNewsletter=!0,this.wantCompanyInvoice=!1,this.billing={companyName:"",address:"",vatNumber:"",registrationNumber:"",email:"",ph
1one:""},this.invoiceResult=null,this.buildAttendeesList(),this.user&&this.attendees.length>0&&this.attendees[0].fields){const e=this.attendees[0].fields;void 0!==e.name&&(e.name=this.user.fullName||""),void 0!==e.email&&(e.email=this.user.email||""),void 0!==e.phone&&(this.user.phoneCountry?(e.phoneCountry=this.user.phoneCountry,e.phone=this.user.phoneLocalNumber||""):e.phone=this.user.phoneNumber||""),void 0!==e.organisation&&(e.organisation=this.user.professionOrganisation||""),void 0!==e.role&&(e.role=this.user.professionOrganisationRole||""),void 0!==e.linkedin&&(e.linkedin=this.user.profileLinkedin||""),void 0!==e.twitter&&(e.twitter=this.user.profileTwitter||""),void 0!==e.instagram&&(e.instagram=this.user.profileInstagram||"")}},handleEscKey(e){"Escape"===e.key&&this.active&&this.handleClose()},handleClose(){"processing"===this.paymentStep||this.isPaymentProcessing||this.$emit("close")},formatPrice(e,t){return 0===e?this.$t("Free"):this.$filters.money(e,t)},isValidEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)},isValidName(e){return null===e||void 0===e||""===String(e).trim()||/^[\p{L}\p{M}\s'.-]+$/u.test(String(e))},nameFieldType(e){return e&&!this.isValidName(e)?"is-danger":""},nameFieldMessage(e){return e&&!this.isValidName(e)?this.$t("Name can only contain letters, spaces, hyphens, apostrophes and periods."):""},isAttendeeComplete(e){for(const t of this.formFields){const i=t.mandatory||t.alwaysRequired;if(i&&!this.isFieldFilled(t,e))return!1}return!0},isFieldFilled(e,t){if("standard"===e.type){const i=t.fields?.[e.key];return null!==i&&void 0!==i&&""!==String(i).trim()&&(!("email"===e.key&&!this.isValidEmail(i))&&!("name"===e.key&&!this.isValidName(i)))}if("custom"===e.type){const i=t.fields?.["custom_"+e.customFieldId],s=e.customField?.fieldType;return"checkboxes"===s?Array.isArray(i)&&i.length>0:"boolean"===s?"boolean"===typeof i:null!==i&&void 0!==i&&("string"!==typeof i||""!==i.trim())}return!0},buildAttendeesList(){const e=[],t=[];let i=0;if(this.isFreeEvent&&0===this.selections.length){const t=this.attendees[0],i=t?.fields?{...t.fields}:{};for(const e of this.formFields)if("standard"===e.type)void 0===i[e.key]&&(i[e.key]=""),"phone"===e.key&&void 0===i.phoneCountry&&(i.phoneCountry=null);else if("custom"===e.type){const t="custom_"+e.customFieldId;if(void 0===i[t]){const s=e.customField?.fieldType;i[t]="checkboxes"===s?[]:"dropdown"===s||"radio"===s?null:"boolean"!==s&&""}}return e.push({productPriceId:null,ticketName:this.$t("Registration"),ticketIndex:0,fields:i,get name(){return this.fields?.name||""},get email(){return this.fields?.email||""}}),this.attendees=e,void(this.addonAttendees=[])}for(const s of this.selections)for(let a=0;a<s.quantity;a++){const n=e.length,o=this.attendees[n],l=o?.fields?{...o.fields}:{};for(const e of this.formFields)if("standard"===e.type)void 0===l[e.key]&&(l[e.key]=""),"phone"===e.key&&void 0===l.phoneCountry&&(l.phoneCountry=null);else if("custom"===e.type){const t="custom_"+e.customFieldId;if(void 0===l[t]){const i=e.customField?.fieldType;l[t]="checkboxes"===i?[]:"dropdown"===i||"radio"===i?null:"boolean"!==i&&""}}if(this.applyPinnedIdentity(s.productPriceId,l),e.push({productPriceId:s.productPriceId,ticketName:s.name,ticketIndex:i,fields:l,get name(){return this.fields?.name||""},get email(){return this.fields?.email||""}}),s.ticketAddons&&s.ticketAddons[a])for(const e of s.ticketAddons[a])if(e.createsAttendee)for(let a=0;a<e.quantity;a++){const a=t.length,n=this.addonAttendees[a],o=n?.fields?{...n.fields}:{name:"",email:""};t.push({addonId:e.addonId,addonName:e.name,ticketProductPriceId:s.productPriceId,ticketIndex:i,fields:o,get name(){return this.fields?.name||""},get email(){return this.fields?.email||""}})}i++}this.attendees=e,this.addonAttendees=t},getFieldKey(e){return"standard"===e.type?"std-"+e.key:"custom-"+e.customFieldId},getPhonePlaceholder(e){if(!e.fields?.phoneCountry)return"";const t=ci.Xr.find(t=>t.c===e.fields.phoneCountry);return t?.s||""},toggleTicket(e){this.expandedTicket===e?this.expandedTicket=null:this.expandedTicket=e},getAvailableAddonsForTicket(e){const t=this.currentTickets.find(t=>
1t.id===e);if(!t)return[];const i=t.addons||t.activeAddons||[];return i.filter(e=>!e.isArchived&&!(null!==e.maxTotal&&e.soldCount>=e.maxTotal))},ensureTicketAddons(e){e.ticketAddons||(e.ticketAddons=[]);while(e.ticketAddons.length<e.quantity)e.ticketAddons.push([]);while(e.ticketAddons.length>e.quantity)e.ticketAddons.pop()},getAddonQuantity(e,t,i){const s=this.selections.find(t=>t.productPriceId===e);if(!s||!s.ticketAddons||!s.ticketAddons[t])return 0;const a=s.ticketAddons[t].find(e=>e.addonId===i);return a?a.quantity:0},canIncrementAddon(e,t,i){const s=this.getAddonQuantity(e,t,i.id);if(null!==i.maxQuantityPerTicket&&s>=i.maxQuantityPerTicket)return!1;if(null!==i.maxTotal){let e=0;for(const s of this.selections)if(s.ticketAddons)for(const t of s.ticketAddons){const s=t.find(e=>e.addonId===i.id);s&&(e+=s.quantity)}const t=i.maxTotal-(i.soldCount||0);if(e+1>t)return!1}return!0},incrementAddon(e,t,i){const s=this.selections.findIndex(t=>t.productPriceId===e);if(-1===s)return;const a=this.selections[s];this.ensureTicketAddons(a);const n=a.ticketAddons[t],o=n.findIndex(e=>e.addonId===i.id);o>=0?n[o].quantity++:n.push({addonId:i.id,name:i.name,price:i.price,quantity:1,createsAttendee:i.createsAttendee}),this.selections=[...this.selections],i.createsAttendee&&"now"===this.detailsOption&&this.$nextTick(()=>{const i=this.attendees.findIndex(t=>t.productPriceId===e);if(-1!==i){const e=i+t;this.expandedTicket=e;const s=this.getAddonAttendeesForTicket(e),a=s.length-1;this.highlightedAddon={ticketIndex:e,addonIndex:a},this.$nextTick(()=>{const t="addonCard-"+e+"-"+a,i=this.$refs[t];i&&i[0]&&i[0].scrollIntoView({behavior:"smooth",block:"center"}),this.clearHighlightAfterDelay()})}})},decrementAddon(e,t,i){const s=this.selections.findIndex(t=>t.productPriceId===e);if(-1===s)return;const a=this.selections[s];if(!a.ticketAddons||!a.ticketAddons[t])return;const n=a.ticketAddons[t],o=n.findIndex(e=>e.addonId===i.id);o>=0&&(n[o].quantity>1?n[o].quantity--:n.splice(o,1),this.selections=[...this.selections])},getMaxAddonQuantity(e,t){const i=t.maxQuantityPerTicket;if(null===t.maxTotal||void 0===t.maxTotal)return i;const s=this.selections.find(t=>t.productPriceId===e),a=s?.quantity||1,n=t.maxTotal-(t.soldCount||0),o=Math.floor(n/a);return Math.max(0,Math.min(i,o))},setAddonQuantity(e,t,i){const s=this.getAddonQuantity(e,t.id),a=String(i.target.value).trim();let n;if(""===a)n=0;else{const o=parseInt(a,10);if(Number.isNaN(o)||o<0)return void(i.target.value=String(s));n=Math.min(o,this.getMaxAddonQuantity(e,t))}if(i.target.value=String(n),n===s)return;const o=this.selections.findIndex(t=>t.productPriceId===e);if(-1===o)return;const l=this.selections[o];l.addons||(l.addons=[]);const r=l.addons.findIndex(e=>e.addonId===t.id);0===n?r>=0&&l.addons.splice(r,1):r>=0?l.addons[r].quantity=n:l.addons.push({addonId:t.id,name:t.name,price:t.price,quantity:n,createsAttendee:t.createsAttendee}),this.selections=[...this.selections],n>s&&t.createsAttendee&&"now"===this.detailsOption&&this.$nextTick(()=>{const t=this.attendees.findIndex(t=>t.productPriceId===e);if(-1===t)return;this.expandedTicket=t;const i=this.getAddonAttendeesForTicket(t),s=i.length-1;this.highlightedAddon={ticketIndex:t,addonIndex:s},this.$nextTick(()=>{const e="addonCard-"+t+"-"+s,i=this.$refs[e];i&&i[0]&&i[0].scrollIntoView({behavior:"smooth",block:"center"}),this.clearHighlightAfterDelay()})})},collapseTicket(){const e=this.attendees.findIndex((e,t)=>t>this.expandedTicket&&!this.isTicketGroupComplete(e,t));this.expandedTicket=-1!==e?e:null},isAddonAttendeeComplete(e){return e.fields?.name?.trim()&&e.fields?.email?.trim()&&this.isValidEmail(e.fields.email)&&this.isValidName(e.fields.name)},toggleAddonAttendee(e){this.expandedAddonAttendee===e?this.expandedAddonAttendee=null:this.expandedAddonAttendee=e},collapseAddonAttendee(){const e=this.addonAttendees.findIndex((e,t)=>t>this.expandedAddonAttendee&&!this.isAddonAttendeeComplete(e));this.expandedAddonAttendee=-1!==e?e:null},getAddonAttendeesForTicket(e){return this.addonAttendees.filter(t=>t.ticketIndex===e)},isTicketGroupComplete(e,t){if(!this.isAttendeeComplete(e))return!1;const i=this.getAddonAttendeesForTicket(t);return i.every(e=>this.isAddonAttendeeComplete(e))},isAddonHighlighted(e,t){return this.highlightedAddon&&this.highlightedAddon.ticketIndex===e&&this.highlightedAddon.addonIndex===t},clearHighlightAfterDelay(){setTimeout(()=>{this.highlightedAddon=null},3500)},handleCardCheckout(){this.isPreview||(this.canProceed?this.isFreeEvent?this.completeFreeEventRegistration():0!==this.totalAmount?0===this.finalAmount&&this.voucherApplied?.valid?this.completeFreeVoucherRegistration():this.wantCompanyInvoice?this.paymentStep="billing":this.initInlinePayment():this.completeFreeRegistration():this.showValidationErrors=!0)}
1,handleBillingCardCheckout(){!this.isPreview&&this.canProceedWithInvoice&&this.initInlinePayment()},handleBankTransfer(){!this.isPreview&&this.canProceedWithInvoice&&this.submitInvoiceCheckout()},submitInvoiceCheckout(){if(!this.canProceedWithInvoice)return;this.isProcessing=!0,this.paymentStep="processing";const e={tickets:this.buildTicketsPayload(),buyerName:this.effectiveBuyerName,buyerEmail:this.effectiveBuyerEmail,billing:{companyName:this.billing.companyName,address:this.billing.address,vatNumber:this.billing.vatNumber,registrationNumber:this.billing.registrationNumber,email:this.billing.email||this.effectiveBuyerEmail,phone:this.billing.phone},fillNow:"now"===this.detailsOption};this.voucherApplied?.valid&&(e.voucherCode=this.voucherApplied.code),"now"===this.detailsOption&&(e.attendees=this.buildAttendeesPayload(),this.addonAttendees.length>0&&(e.addonAttendees=this.buildAddonAttendeesPayload())),this.$http.plain.post(`/public/event/${this.event.uuid}/invoice-checkout`,e).then(e=>{this.invoiceResult=e.data,this.paymentStep="invoice-success"}).catch(e=>{console.log(e),this.paymentErrorMessage=e.response?.data?.error||this.$t("Failed to create invoice"),this.paymentStep="error"}).finally(()=>{this.isProcessing=!1})},initInlinePayment(){this.paymentStep="loading",this.paymentErrorMessage=null,this.isNativeApp?this.initCheckoutRedirect():this.loadStripeScript().then(()=>this.fetchStripeConfig()).then(()=>this.saveAttendeesData()).then(()=>this.createPaymentIntent()).then(()=>this.setupStripeElements()).catch(e=>{console.log(e),this.paymentErrorMessage=e.message||this.$t("Failed to initialize payment"),this.paymentStep="error"})},initCheckoutRedirect(){const e={eventUuid:this.event.uuid,tickets:this.buildTicketsPayload(),email:this.effectiveBuyerEmail,name:this.effectiveBuyerName,fillNow:"now"===this.detailsOption};this.voucherApplied?.valid&&(e.voucherCode=this.voucherApplied.code),"now"===this.detailsOption&&this.attendees.length>0&&(e.attendees=this.buildAttendeesPayload().map(({productPriceId:e,name:t,email:i})=>({productPriceId:e,name:t,email:i})),this.addonAttendees.length>0&&(e.addonAttendees=this.buildAddonAttendeesPayload())),this.$http.plain.post("/connected/stripe-checkout-session/anonymous/payment-multi",e).then(e=>{if(!e.data?.url)throw new Error("No checkout URL received");window.location.href=e.data.url}).catch(e=>{console.log(e),this.paymentErrorMessage=e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("Failed to initialize payment"),this.paymentStep="error"})},loadStripeScript(){return new Promise((e,t)=>{if(window.Stripe)return void e();const i=document.createElement("script");i.src="https://js.stripe.com/v3/",i.async=!0,i.onload=e,i.onerror=()=>t(new Error(this.$t("Failed to load payment system"))),document.head.appendChild(i)})},fetchStripeConfig(){return new Promise((e,t)=>{this.$http.plain.get(`/public/event/${this.event.uuid}/stripe-config`).then(t=>{this.stripeConfig=t.data,this.stripe=window.Stripe(this.stripeConfig.publishableKey,{stripeAccount:this.stripeConfig.stripeAccount}),e()}).catch(e=>{console.log(e),t(new Error(this.$t("Failed to load payment configuration")))})})},saveAttendeesData(){return new Promise((e,t)=>{const i={tickets:this.selections.map(e=>{const t={productPriceId:e.productPriceId,quantity:e.quantity};return e.ticketAddons&&e.ticketAddons.length>0&&(t.ticketAddons=e.ticketAddons.map(e=>e.map(e=>({addonId:e.addonId,quantity:e.quantity})))),t}),buyerName:this.effectiveBuyerName,buyerEmail:this.effectiveBuyerEmail,fillNow:"now"===this.detailsOption};this.voucherApplied?.valid&&(i.voucherCode=this.voucherApplied.code),this.wantCompanyInvoice&&this.billing.address?.trim()&&(i.wantCompanyInvoice=!0,i.billing={companyName:this.billing.companyName,address:this.billing.address,vatNumber:this.billing.vatNumber,registrationNumber:this.billing.registrationNumber,email:this.billing.email||this.effectiveBuyerEmail,phone:this.billing.phone}),"now"===this.detailsOption&&(i.attendees=this.buildAttendeesPayload(),this.addonAttendees.length>0&&(i.addonAttendees=this.addonAttendees.map(e=>
1({addonId:e.addonId,ticketProductPriceId:e.ticketProductPriceId,ticketIndex:e.ticketIndex,name:e.fields?.name||"",email:e.fields?.email||"",fields:e.fields})))),this.$http.plain.post(`/public/event/${this.event.uuid}/save-attendees`,i).then(t=>{this.paymentUniqueId=t.data.uniqueId,e()}).catch(e=>{console.log(e);const i=e.response?.data?.error||this.$t("Failed to save attendee information");t(new Error(i))})})},createPaymentIntent(){return new Promise((e,t)=>{const i=Math.round(100*this.finalAmount),s={uniqueId:this.paymentUniqueId,amount:i,currency:this.primaryCurrency};this.voucherApplied?.valid&&(s.voucherCode=this.voucherApplied.code),this.$http.plain.post(`/public/event/${this.event.uuid}/payment-intent`,s).then(t=>{this.clientSecret=t.data.clientSecret,this.paymentIntentId=t.data.paymentIntentId,e()}).catch(e=>{console.log(e);const i=e.response?.data?.error||this.$t("Failed to initialize payment");t(new Error(i))})})},setupStripeElements(){try{const e=this.$i18n?.locale||"en";console.log("Setting up Stripe Elements with clientSecret:",this.clientSecret?"present":"missing"),this.stripeElements=this.stripe.elements({clientSecret:this.clientSecret,locale:e,appearance:{theme:"stripe",variables:{borderRadius:"8px",fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'}}}),this.stripePaymentElement=this.stripeElements.create("payment",{layout:"accordion",wallets:{applePay:"auto",googlePay:"auto"}}),this.stripePaymentElement.on("ready",()=>{this.isPaymentElementReady=!0}),this.stripePaymentElement.on("change",e=>{this.isPaymentElementComplete=e.complete}),this.stripePaymentElement.on("loaderror",e=>{console.log("Stripe loaderror:",e),this.paymentErrorMessage=e?.error?.message||this.$t("Failed to load payment form"),this.paymentStep="error"}),this.paymentStep="payment",this.mountPaymentElement(0)}catch(e){console.log("Stripe Elements setup error:",e),this.paymentErrorMessage=e.message||this.$t("Failed to load payment form"),this.paymentStep="error"}},mountPaymentElement(e){this.$nextTick(()=>{const t=document.getElementById("event-payment-element");t?this.stripePaymentElement.mount("#event-payment-element"):e<40?setTimeout(()=>this.mountPaymentElement(e+1),50):(this.paymentErrorMessage=this.$t("Failed to load payment form"),this.paymentStep="error")})},confirmPayment(){!this.isPaymentProcessing&&this.isPaymentElementReady&&this.isPaymentElementComplete&&(this.isPaymentProcessing=!0,this.paymentErrorMessage=null,this.stripe.confirmPayment({elements:this.stripeElements,confirmParams:{return_url:window.location.href},redirect:"if_required"}).then(e=>{e.error?this.handlePaymentError(e.error):(this.paymentStep="processing",this.handlePaymentSuccess(e))}).catch(e=>{console.log(e),this.handlePaymentError(e)}))},handlePaymentError(e){this.isPaymentProcessing=!1,this.paymentErrorMessage=e.message||this.$t("Payment failed")},handlePaymentSuccess(e){const t=e.paymentIntent,i=t?.status;"succeeded"===i?this.completePayment():"processing"===i?this.paymentStep="processing":"requires_payment_method"===i?this.handlePaymentError({message:this.$t("Payment failed. Please try a different payment method.")}):this.handlePaymentError({message:this.$t("Unexpected payment status")+": "+i})},completePayment(){this.$http.plain.post(`/public/event/${this.event.uuid}/complete`,{paymentIntentId:this.paymentIntentId,uniqueId:this.paymentUniqueId}).then(e=>{this.registrationResult=e.data,this.paymentStep="success"}).catch(e=>{console.log(e),this.paymentStep="success"}).finally(()=>{this.isPaymentProcessing=!1})},goBackToDetails(){this.paymentStep="details",this.paymentErrorMessage=null,this.isPaymentProcessing=!1},retryPayment(){if(this.teardownStripeElement(),this.stripe&&this.clientSecret)return this.paymentErrorMessage=null,void this.setupStripeElements();this.initInlinePayment()},teardownStripeElement(){try{this.stripePaymentElement?.destroy()}catch(e){console.log(e)}this.stripeElements=null,this.stripePaymentElement=null,this.isPaymentElementReady=!1,this.isPaymentElementComplete=!1,this.isPaymentProcessing=!1},handleSuccessClose(){this.$emit("success",this.registrationResult)},isPinnedPrice(e){return this.isLoggedIn&&!!this.user?.id&&this.membersOnlyPriceIds.has(e)},isPinnedAttendee(e){return!!e&&this.isPinnedPrice(e.productPriceId)},applyPinnedIdentity(e,t){return this.isPinnedPrice(e)&&t&&(void 0!==t.name&&(t.name=this.user.fullName||""),void 0!==t.email&&(t.email=this.user.email||"")),t},buildTicketsPayload(){return this.selections.map(e=>{const t={productPriceId:e.productPriceId,quantity:e.quantity};return e.ticketAddons&&e.ticketAddons.length>0&&(t.ticketAddons=e.ticketAddons.map(e=>e.map(e=>
1({addonId:e.addonId,quantity:e.quantity})))),t})},buildAddonAttendeesPayload(){return this.addonAttendees.map(e=>({addonId:e.addonId,ticketProductPriceId:e.ticketProductPriceId,ticketIndex:e.ticketIndex,name:e.fields?.name||"",email:e.fields?.email||"",fields:e.fields}))},buildAttendeesPayload(){return this.attendees.map(e=>{const t=this.applyPinnedIdentity(e.productPriceId,{...e.fields||{}});return{productPriceId:e.productPriceId,name:t.name||"",email:t.email||"",fields:t}})},applyVoucher(){if(this.isPreview||!this.voucherCode.trim())return;this.isValidatingVoucher=!0,this.voucherError=null;const e={code:this.voucherCode.trim().toUpperCase(),tickets:this.buildTicketsPayload()};this.$http.plain.post(`/public/event/${this.event.uuid}/validate-voucher`,e).then(e=>{e.data.valid?0===e.data.discountAmount&&e.data.allowedTicketTypeIds?.length>0?this.voucherError=this.$t("This voucher does not apply to your selected ticket types."):(this.voucherApplied=e.data,this.voucherError=null):this.voucherError=e.data.error||this.$t("Invalid voucher code")}).catch(e=>{console.log(e),this.voucherError=e.response?.data?.error||this.$t("Invalid voucher code")}).finally(()=>{this.isValidatingVoucher=!1})},removeVoucher(){this.voucherApplied=null,this.voucherCode="",this.voucherError=null,this.showVoucherInput=!1},getVoucherEligibleTicketNames(e){return e&&this.event?.product?.productPrices?e.map(e=>{const t=this.event.product.productPrices.find(t=>t.id===e);return t?t.name:null}).filter(e=>null!==e):[]},completeFreeVoucherRegistration(){this.isProcessing=!0,this.paymentStep="processing";const e={tickets:this.buildTicketsPayload(),voucherCode:this.voucherApplied.code,buyerName:this.effectiveBuyerName,buyerEmail:this.effectiveBuyerEmail,fillNow:"now"===this.detailsOption};"now"===this.detailsOption&&(e.attendees=this.buildAttendeesPayload(),this.addonAttendees.length>0&&(e.addonAttendees=this.buildAddonAttendeesPayload())),this.$http.plain.post(`/public/event/${this.event.uuid}/save-attendees`,e).then(e=>{const t=e.data.uniqueId;return this.$http.plain.post(`/public/event/${this.event.uuid}/complete-free`,{uniqueId:t,voucherCode:this.voucherApplied.code})}).then(e=>{this.registrationResult=e.data,this.paymentStep="success"}).catch(e=>{console.log(e),this.paymentErrorMessage=e.response?.data?.error||this.$t("Registration failed. Please try again."),this.paymentStep="error"}).finally(()=>{this.isProcessing=!1})},completeFreeRegistration(){this.isProcessing=!0,this.paymentStep="processing";const e={tickets:this.buildTicketsPayload(),fillNow:"now"===this.detailsOption,buyerName:this.effectiveBuyerName,buyerEmail:this.effectiveBuyerEmail};"now"===this.detailsOption&&(e.attendees=this.buildAttendeesPayload(),this.addonAttendees.length>0&&(e.addonAttendees=this.buildAddonAttendeesPayload())),this.$http.plain.post(`/public/event/${this.event.uuid}/save-attendees`,e).then(e=>this.$http.plain.post(`/public/event/${this.event.uuid}/complete-free`,{uniqueId:e.data.uniqueId})).then(e=>{this.registrationResult=e.data,this.paymentStep="success"}).catch(e=>{console.log(e),this.paymentErrorMessage=e.response?.data?.error||this.$t("Registration failed. Please try again."),this.paymentStep="error"}).finally(()=>{this.isProcessing=!1})},completeFreeEventRegistration(){this.isProcessing=!0,this.paymentStep="processing";const e=this.attendees[0]?.fields||{};if(this.isLoggedIn&&this.user?.id){const t={user:this.user.id,event:this.event.uuid,productPrice:null,fields:e,fieldOrganisation:e.organisation||null,fieldRole:e.role||null,fieldLinkedin:e.linkedin||null,fieldX:e.twitter||null,fieldInstagram:e.instagram||null,isNewsletter:this.isNewsletter};this.$http.plain.post("/event-attend/free-registration-user",t).then(()=>{this.paymentStep="success",this.registrationResult={success:!0}}).catch(e=>{console.error(e),this.paymentErrorMessage=e.response?.data?.detail||this.$t("Registration failed. Please try again."),this.paymentStep="error"}).finally(()=>{this.isProcessing=!1})}else{const t={customer:{name:e.name||"",email:e.email||"",phone:e.phone||null,fields:e,fieldOrganisation:e.organisation||null,fieldRole:e.role||null,fieldLinkedin:e.linkedin||null,fieldX:e.twitter||null,fieldInstagram:e.instagram||null},event:this.event.uuid,productPrice:null,isNewsletter:this.isNewsletter};this.$http.plain.post("/event-attend/free-registration-external",t).then(e=>{this.paymentStep="success",this.registrationResult=e.data||{success:!0}}).catch(e=>{console.error(e),this.paymentErrorMessage=e.response?.data?.detail||this.$t("Registration failed. Please try again."),this.paymentStep="error"}).finally(()=>{this.isProcessing=!1})}}}},gi=i(66262);const fi=(0,gi.A)(hi,[["render",di],["__scopeId","data-v-ce2a7270"]]);var bi=fi},90957:function(e,t,i){"use strict";i.d(t,{A:function(){return c}});var s=i(20641);function a(e,t,i,a,n,o){const l=(0,s.g2)("b-autocomplete");return(0,s.uX)(),(0,s.Wv)(l,{modelValue:n.search,"onUpdate:modelValue":t[0]||(t[0]=e=>n.search=e),placeholder:i.placeholder?e.$t(i.placeholder):e.$t("Type to find timezone")+"...",field:"timezone",clearable:"","dropdown-position":"bottom",data:o.filteredDataArray,"open-on-focus":"",onSelect:o.change},null,8,["modelValue","placeholder","data","onSelect"])}i(44114),i(18111),i(22489),i(20116);var n=i(84743),o=i.n(n),l={name:"TimezoneSelect",props:["modelValue","initValue","placeholder"],data(){return{search:null,localSelectedTimezone:null,timezones:[]}},computed:{filteredDataArray(){return this.search?this.timezones.filter(e=>e&&e.value.toString().toLowerCase().includes(this.search.toLowerCase())):this.timezones}},created(){for(let e of o().tz.names())this.timezones.push({value:e,timezone:this.formatTimezonesWithOffset(e)});this.initValue?(this.localSelectedTimezone=this.timezones.find(e=>e.value===this.initValue),this.search=this.localSelectedTimezone?this.formatShortTimezone(this.localSelectedTimezone.value):null):(this.localSelectedTimezone=this.timezones.find(e=>e.value===o().tz.guess()),this.search=this.localSelectedTimezone?this.formatShortTimezone(this.localSelectedTimezone.value):null,this.$emit("update:modelValue",this.localSelectedTimezone.value))},methods:{change(e){e&&(this.localSelectedTimezone=e.value,this.$emit("update:modelValue",this.localSelectedTimezone),this.$nextTick(()=>{this.search=this.formatShortTimezone(e.value)}))},formatTimezonesWithOffset(e){const t=o()().tz(e).format("Z");return`${e} (UTC${t})`},formatShortTimezone(e){const t=e.split("/"),i=t[t.length-1].replace(/_/g," "),s=o()().tz(e).format("Z");return`${i} (UTC${s})`}}},r=i(66262);const d=(0,r.A)(l,[["render",a]]);var c=d},91495:function(e,t,i){"use strict";i.d(t,{K7:function(){return o},m6:function(){return l},ww:function(){return n}});i(18111),i(20116);var s=i(94335),a=i(28782);function n(e){const t=(e?.pages||[]).find(e=>e.isHomepage);return t?o(e,t.slug):{path:"/"}}function o(e,t){return e?.demo?.key?{name:"WebsiteTemplateDemo",params:{key:e.demo.key,slug:t}}:{name:"WebsitePage",params:{slug:t}}}function l(e){const t=e?{tenant:e}:{};return s.A.get(`${a.QU}${a.H$}/website-public/bootstrap`,{params:t}).then(e=>(e.data?.pages||[]).find(e=>
1e.isHomepage)?.slug||null).catch(()=>null)}},93231:function(e,t,i){"use strict";i.d(t,{A:function(){return st}});i(44114);var s=i(20641),a=i(90033);const n={class:"is-small mr-1"},o={class:"mobile-group-info"},l={key:1,class:"group-header-emoji mr-2"},r={class:"mobile-group-title"},d=["disabled"],c={class:"icon is-small"},u=["disabled"],m={class:"icon is-small"},p=["disabled"],h={class:"icon is-small"},g={class:"button is-white is-small is-rounded"},f={class:"icon"},b={class:"icon-text"},y={class:"icon is-small"},v={class:"icon-text"},k={class:"icon is-small"},C={class:"icon-text"},L={class:"icon is-small"},w={class:"icon-text"},_={class:"icon is-small"},E={class:"icon-text"},$={class:"icon is-small"},F={class:"icon-text"},T={class:"icon is-small"},S={class:"icon-text"},A={class:"icon is-small"},P={class:"icon-text"},I={class:"icon is-small"},M={class:"icon-text"},x={class:"icon is-small"},N={class:"header-left"},U={key:1,class:"group-header-emoji mr-2"},D={key:1,class:"icon is-small mr-1"},X={key:2,class:"icon is-small mr-1"},V={key:3,class:"group-title"},R={key:4,class:"group-title"},O={key:0},Q={key:1},B={key:2,class:"group-name-truncate"},G={key:3,class:"ml-3 tag is-rounded is-small is-warning"},W={key:4},j={key:1},z={key:5},q={key:6},J={key:7},H={key:8,class:"title-actions ml-5"},K=["disabled"],Y={class:"icon is-small"},Z=["disabled"],ee={class:"icon is-small"},te=["disabled"],ie={class:"icon is-small"},se={class:"header-right"},ae={class:"is-hidden-mobile"},ne={class:"is-small ml-1"},oe={class:"icon is-small"},le={class:"is-hidden-mobile"},re={class:"icon is-small"},de={class:"is-hidden-mobile"},ce={class:"icon is-small"},ue={class:"ml-1"},me={class:"icon-text"},pe={class:"icon is-small"},he={class:"is-hidden-mobile"},ge={class:"icon is-small"},fe={class:"icon-text"},be={class:"icon is-small"},ye={class:"is-hidden-mobile"},ve={class:"icon-text"},ke={class:"icon is-small"},Ce={class:"is-hidden-mobile"},Le={class:"icon-text"},we={class:"icon is-small"},_e={class:"is-hidden-mobile"},Ee={class:"icon-text"},$e={class:"icon is-small"},Fe={class:"is-hidden-mobile"},Te={class:"icon-text"},Se={class:"icon is-small"},Ae={class:"is-hidden-mobile"},Pe={class:"icon-text"},Ie={class:"icon is-small"},Me={class:"is-hidden-mobile"},xe={class:"icon is-small"},Ne={class:"is-hidden-mobile"},Ue={key:2,class:"tabs-pill"},De={class:"tabs"},Xe={ref:"groupTabsList",class:"group-tabs"},Ve=["onClick"],Re={key:0,class:"ml-2"},Oe={key:0,class:"ml-2"};function Qe(e,t,i,Qe,Be,Ge){const We=(0,s.g2)("font-awesome-icon"),je=(0,s.g2)("LogoThumbnailGroup"),ze=(0,s.g2)("b-dropdown-item"),qe=(0,s.g2)("b-dropdown"),Je=(0,s.g2)("MobileViewHeader"),He=(0,s.g2)("router-link");return(0,s.uX)(),(0,s.CE)("section",{class:(0,a.C4)({"pb-4":!e.$isMobile()&&Ge.hasTabsVisible,"pb-5":!e.$isMobile()&&!Ge.hasTabsVisible,"pb-3":e.$isMobile()})},[e.$isMobile()?((0,s.uX)(),(0,s.Wv)(Je,{key:0,title:Ge.mobileTitle,"show-back-button":!0,"back-route":"GroupBrowse"},{left:(0,s.k6)(()=>[(0,s.Lk)("button",{class:"o-mobile-back-button is-white is-rounded",onClick:t[0]||(t[0]=t=>e.$router.push({name:"GroupBrowse"}))},[(0,s.Lk)("span",n,[(0,s.bF)(We,{icon:"fa-light fa-chevron-left"})])])]),center:(0,s.k6)(()=>[(0,s.Lk)("div",o,[Ge.item&&Ge.item.id?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[Ge.item.logo?((0,s.uX)(),(0,s.Wv)(je,{key:"mobile_thumb_"+Ge.item.id,item:Ge.item,"is-type":"roundSmaller",class:"mr-2"},null,8,["item"])):Ge.item.emoji?((0,s.uX)(),(0,s.CE)("span",l,(0,a.v_)(Ge.item.emoji),1)):((0,s.uX)(),(0,s.CE)("span",{key:2,class:"group-header-bullet mr-2",style:(0,a.Tr)({backgroundColor:Ge.groupBulletColor})},null,4))],64)):(0,s.Q3)("",!0),(0,s.Lk)("span",r,(0,a.v_)(Ge.mobileTitle),1)])]),actions:(0,s.k6)(()=>[(0,s.RG)(e.$slots,"mobile-action",{},void 0,!0),Ge.isOpenAccessLC?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-rounded subscribe-btn",{"is-subscribed":!Ge.item.isMuted||Be.showMuteAnimation,"is-loading-state":Be.isLoadingMute}]),disabled:Be.isLoadingMute,onClick:t[1]||(t[1]=e=>Ge.item.isMuted?Ge.unmuteLocalCenter():Ge.muteLocalCenter())},[(0,s.Lk)("span",c,[Be.isLoadingMute?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:!Ge.item.isMuted||Be.showMuteAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,a.C4)({"bell-ring-animation":Be.showMuteAnimation})},null,8,["icon","class"]))]),(0,s.Lk)("span",null,(0,a.v_)(!Ge.item.isMuted||Be.showMuteAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,d)):(0,s.Q3)("",!0),Ge.item&&Ge.item.id&&!Be.isGeneralUnit&&!Ge.isOpenAccessLC?((0,s.uX)(),(0,s.CE)("button",{key:1,class:(0,a.C4)(["button is-small is-rounded subscribe-btn",{"is-subscribed":Ge.item.isSubscribed||Be.showSubscribeAnimation,"is-loading-state":Be.isLoadingFollow}]),disabled:Be.isLoadingFollow,onClick:t[2]||(t[2]=e=>Ge.item.isSubscribed?Ge.unsubscribeFromGroup():Ge.subscribeToGroup())},[(0,s.Lk)("span",m,[Be.isLoadingFollow?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:Ge.item.isSubscribed||Be.showSubscribeAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,a.C4)({"bell-ring-animation":Be.showSubscribeAnimation})},null,8,["icon","class"]))]),(0,s.Lk)("span",null,(0,a.v_)(Ge.item.isSubscribed||Be.showSubscribeAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,u)):(0,s.Q3)("",!0),Be.isGeneralUnit?((0,s.uX)(),(0,s.CE)("button",{key:2,class:(0,a.C4)(["button is-small is-rounded subscribe-btn",{"is-subscribed":Be.isFollowGeneralUnit||Be.showSubscribeAnimation,"is-loading-state":Be.isLoadingFollow}]),disabled:Be.isLoadingFollow,onClick:t[3]||(t[3]=e=>Be.isFollowGeneralUnit?Ge.unsubscribeFromGeneralUnit():Ge.subscribeToGeneralUnit())},[(0,s.Lk)("span",h,[Be.isLoadingFollow?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:Be.isFollowGeneralUnit||Be.showSubscribeAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,a.C4)({"bell-ring-animation":Be.showSubscribeAnimation})},null,8,["icon","class"]))]),(0,s.Lk)("span",null,(0,a.v_)(Be.isFollowGeneralUnit||Be.showSubscribeAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,p)):(0,s.Q3)("",!0)]),dropdown:(0,s.k6)(()=>[Ge.hasMobileDropdownOptions?((0,s.uX)(),(0,s.Wv)(qe,{key:0,position:"is-bottom-left","aria-role":"menu","append-to-body":""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",g,[(0,s.Lk)("span",f,[(0,s.bF)(We,{icon:"fa-light fa-ellipsis-vertical"})])])]),default:(0,s.k6)(()=>[Ge.item&&"LocalCenter"===Ge.item["@type"]?((0,s.uX)(),(0,s.Wv)(ze,{key:0,"aria-role":"menuitem",onClick:t[4]||(t[4]=t=>e.$router.push({name:"LocalCenterShow",params:{item:Ge.item.id}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",b,[(0,s.Lk)("span",y,[(0,s.bF)(We,{icon:"fa-light fa-circle-info"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Info")),1)])]),_:1})):(0,s.Q3)("",!0),Ge.item&&"Group"===Ge.item["@type"]&&(Ge.item.owner&&Ge.item.owner.id===e.user.id||e.isCurrentGroupAdmin)?((0,s.uX)(),(0,s.Wv)(ze,{key:1,"aria-role":"menuitem",onClick:t[5]||(t[5]=t=>e.$router.push({name:"GroupUpdate",params:{item:Ge.item.id}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",v,[(0,s.Lk)("span",k,[(0,s.bF)(We,{icon:"fa-light fa-gear"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("settings")),1)])]),_:1})):(0,s.Q3)("",!0),Ge.item&&"RoleGroup"===Ge.item["@type"]&&e.isGranted("ADMIN_TENANT")?((0,s.uX)(),(0,s.Wv)(ze,{key:2,"aria-role":"menuitem",onClick:t[6]||(t[6]=t=>e.$router.push({name:"RoleGroupUpdate",params:{item:Ge.item.id}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",C,[(0,s.Lk)("span",L,[(0,s.bF)(We,{icon:"fa-light fa-gear"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("settings")),1)])]),_:1})):(0,s.Q3)("",!0),Ge.item&&"LocalCenter"===Ge.item["@type"]&&e.isGrantedOwner(Ge.item)?((0,s.uX)(),(0,s.Wv)(ze,{key:3,"aria-role":"menuitem",onClick:t[7]||(t[7]=t=>e.$router.push({name:"LocalCenterUpdate",params:{item:Ge.item.id}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",w,[(0,s.Lk)("span",_,[(0,s.bF)(We,{icon:"fa-light fa-pencil-alt"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("modify")),1)])]),_:1})):(0,s.Q3)("",!0),Ge.item&&"LocalCenter"===Ge.item["@type"]&&e.tenant.settingFeatures.fees.hasLocalCenterMembersTable&&e.isGranted("FINANCIAL_LOCAL",Ge.item)?((0,s.uX)(),(0,s.Wv)(ze,{key:4,"aria-role":"menuitem",onClick:t[8]||(t[8]=t=>e.$router.push({name:"FeeMembersLocalCenter",query:{localCenter:Ge.item.id,localCenterName:Ge.item.name}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",E,[(0,s.Lk)("span",$,[(0,s.bF)(We,{icon:"fa-light fa-money-bill-alt"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("fees")),1)])]),_:1})):(0,s.Q3)("",!0),"events"===i.tab&&null===e.$store.state.currentGroup?((0,s.uX)(),(0,s.Wv)(ze,{key:5,"aria-role":"menuitem",onClick:t[9]||(t[9]=t=>e.$router.push({name:"PublicEventsList",query:{workspace:e.tenant.slug,upcoming:1}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",F,[(0,s.Lk)("span",T,[(0,s.bF)(We,{icon:"fa-light fa-share-nodes"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Public events")),1)])]),_:1})):(0,s.Q3)("",!0),Be.isSupport&&e.isGranted("ROLE_ADMIN_TENANT")?((0,s.uX)(),(0,s.Wv)(ze,{key:6,"aria-role":"menuitem",onClick:t[10
1]||(t[10]=t=>e.$router.push({name:"TenantSupport"}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",S,[(0,s.Lk)("span",A,[(0,s.bF)(We,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Support team")),1)])]),_:1})):(0,s.Q3)("",!0),e.isGranted("ADMIN_TENANT")&&Be.itemId&&Ge.item&&"RoleGroup"===Ge.item["@type"]?((0,s.uX)(),(0,s.Wv)(ze,{key:7,"aria-role":"menuitem",onClick:t[11]||(t[11]=t=>e.$router.push({name:"UserList",query:{unit:Be.itemId,role_group_admin:!0}}))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",P,[(0,s.Lk)("span",I,[(0,s.bF)(We,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Extra members/Admins")),1)])]),_:1})):(0,s.Q3)("",!0),Ge.canLeaveGroup?((0,s.uX)(),(0,s.Wv)(ze,{key:8,"aria-role":"menuitem",class:"has-text-danger",onClick:Ge.leaveGroup},{default:(0,s.k6)(()=>[(0,s.Lk)("span",M,[(0,s.Lk)("span",x,[(0,s.bF)(We,{icon:"fa-light fa-sign-out-alt"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("leaveGroup")),1)])]),_:1},8,["onClick"])):(0,s.Q3)("",!0)]),_:1})):(0,s.Q3)("",!0)]),_:3},8,["title"])):(0,s.Q3)("",!0),(0,s.Lk)("div",{class:(0,a.C4)(["group-header is-hidden-mobile",{"is-hidden-mobile":!Ge.item&&null===e.$store.state.currentGroup}])},[(0,s.Lk)("div",N,[Ge.item&&Ge.item.id&&!Be.isGeneralUnit?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[Ge.item.logo?((0,s.uX)(),(0,s.Wv)(je,{key:0,item:Ge.item,"is-type":"roundSmall",class:"mr-2"},null,8,["item"])):Ge.item.emoji?((0,s.uX)(),(0,s.CE)("span",U,(0,a.v_)(Ge.item.emoji),1)):((0,s.uX)(),(0,s.CE)("span",{key:2,class:"group-header-bullet mr-2",style:(0,a.Tr)({backgroundColor:Ge.groupBulletColor})},null,4))],64)):Be.isGeneralUnit?((0,s.uX)(),(0,s.CE)("span",D,[(0,s.bF)(We,{icon:"fa-light fa-hashtag"})])):Ge.item||null!==e.$store.state.currentGroup?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",X,["DiscussList"===e.$route.name?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-comments"})):"EventList"===e.$route.name?((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:"fa-light fa-calendar"})):"DriveList"===e.$route.name?((0,s.uX)(),(0,s.Wv)(We,{key:2,icon:"fa-light fa-database"})):(0,s.Q3)("",!0)])),e.$route.query.hotlink?((0,s.uX)(),(0,s.CE)("span",V,(0,a.v_)(e.$route.query.hotlink),1)):((0,s.uX)(),(0,s.CE)("span",R,[Ge.item&&Ge.item["@type"]&&"LocalCenter"===Ge.item["@type"]&&e.tenant.settingFeatures.localCenter.hasParent&&Ge.item.isParent?((0,s.uX)(),(0,s.CE)("span",O,(0,a.v_)(e.$t("LP")),1)):Ge.item&&Ge.item["@type"]&&"LocalCenter"===Ge.item["@type"]&&e.tenant.settingFeatures.localCenter.hasParent&&!Ge.item.isParent?((0,s.uX)(),(0,s.CE)("span",Q,(0,a.v_)(e.$t("LC")),1
1)):(0,s.Q3)("",!0),Ge.item?((0,s.uX)(),(0,s.CE)("span",B,(0,a.v_)(Ge.item.name),1)):(0,s.Q3)("",!0),Ge.item&&"Group"===Ge.item["@type"]&&"CLOSED"===Ge.item.status?((0,s.uX)(),(0,s.CE)("span",G,(0,a.v_)(e.$t("archived")),1)):(0,s.Q3)("",!0),Ge.item&&Ge.item["@type"]&&"Unit"===Ge.item["@type"]&&Ge.item.unitType?((0,s.uX)(),(0,s.CE)("span",W,[t[33]||(t[33]=(0,s.eW)(" - ",-1)),Ge.item.userType&&Ge.item.userType.options?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"pl-2 pr-2",style:(0,a.Tr)({"background-color":Ge.item.userType.options.bgcolor||"none",color:Ge.item.userType.options.color||"none"})},(0,a.v_)(Ge.item.unitType.name)+" "+(0,a.v_)(Ge.item.userType.namePlural),5)):((0,s.uX)(),(0,s.CE)("span",j,(0,a.v_)(Ge.item.unitType.name),1))])):null!==e.$store.state.currentGroup||"DiscussList"!==e.$route.name||Ge.item?null!==e.$store.state.currentGroup||"EventList"!==e.$route.name||Ge.item?null!==e.$store.state.currentGroup||"DriveList"!==e.$route.name||Ge.item?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("span",J,(0,a.v_)(e.$t("files")),1)):((0,s.uX)(),(0,s.CE)("span",q,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("events")),1)])):((0,s.uX)(),(0,s.CE)("span",z,(0,a.v_)(e.$t("discussions")),1)),i.showTitleActions?((0,s.uX)(),(0,s.CE)("span",H,[(0,s.RG)(e.$slots,"title-actions",{},void 0,!0)])):((0,s.uX)(),(0,s.CE)(s.FK,{key:9},[Ge.isOpenAccessLC?((0,s.uX)(),(0,s.CE)("button",{key:0,class:(0,a.C4)(["button is-small is-rounded ml-5 subscribe-btn",{"is-subscribed":!Ge.item.isMuted||Be.showMuteAnimation,"is-loading-state":Be.isLoadingMute}]),disabled:Be.isLoadingMute,onClick:t[12]||(t[12]=e=>Ge.item.isMuted?Ge.unmuteLocalCenter():Ge.muteLocalCenter())},[(0,s.Lk)("span",Y,[Be.isLoadingMute?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:!Ge.item.isMuted||Be.showMuteAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,a.C4)({"bell-ring-animation":Be.showMuteAnimation})},null,8,["icon","class"]))]),(0,s.Lk)("span",null,(0,a.v_)(!Ge.item.isMuted||Be.showMuteAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,K)):(0,s.Q3)("",!0),Ge.item&&Ge.item.id&&!Be.isGeneralUnit&&!Ge.isOpenAccessLC?((0,s.uX)(),(0,s.CE)("button",{key:1,class:(0,a.C4)(["button is-small is-rounded ml-5 subscribe-btn",{"is-subscribed":Ge.item.isSubscribed||Be.showSubscribeAnimation,"is-loading-state":Be.isLoadingFollow}]),disabled:Be.isLoadingFollow,onClick:t[13]||(t[13]=e=>Ge.item.isSubscribed?Ge.unsubscribeFromGroup():Ge.subscribeToGroup())},[(0,s.Lk)("span",ee,[Be.isLoadingFollow?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:Ge.item.isSubscribed||Be.showSubscribeAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,a.C4)({"bell-ring-animation":Be.showSubscribeAnimation})},null,8,["icon","class"]))]),(0,s.Lk)("span",null,(0,a.v_)(Ge.item.isSubscribed||Be.showSubscribeAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,Z)):(0,s.Q3)("",!0),Be.isGeneralUnit?((0,s.uX)(),(0,s.CE)("button",{key:2,class:(0,a.C4)(["button is-small is-rounded ml-5 subscribe-btn",{"is-subscribed":Be.isFollowGeneralUnit||Be.showSubscribeAnimation,"is-loading-state":Be.isLoadingFollow}]),disabled:Be.isLoadingFollow,onClick:t[14]||(t[14]=e=>Be.isFollowGeneralUnit?Ge.unsubscribeFromGeneralUnit():Ge.subscribeToGeneralUnit())},[(0,s.Lk)("span",ie,[Be.isLoadingFollow?((0,s.uX)(),(0,s.Wv)(We,{key:0,icon:"fa-light fa-spinner-third",spin:""})):((0,s.uX)(),(0,s.Wv)(We,{key:1,icon:Be.isFollowGeneralUnit||Be.showSubscribeAnimation?"fa-light fa-bell-ring":"fa-light fa-bell",class:(0,a.C4)({"bell-ring-animation":Be.showSubscribeAnimation})},null,8,["icon","class"]))]),(0,s.Lk)("span",null,(0,a.v_)(Be.isFollowGeneralUnit||Be.showSubscribeAnimation?e.$t("Subscribed"):e.$t("Subscribe")),1)],10,te)):(0,s.Q3)("",!0)],64))]))]),(0,s.Lk)("div",se,["events"===i.tab&&null===e.$store.state.currentGroup?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"button is-small is-rounded",target:"_blank",onClick:t[15]||(t[15]=t=>e.$router.push({name:"PublicEventsList",query:{workspace:e.tenant.slug,upcoming:1}}))},[(0,s.Lk)("span",ae,(0,a.v_)(e.$t("Public events")),1),(0,s.Lk)("span",ne,[(0,s.bF)(We,{icon:"fa-light fa-arrow-up-right"})])])):(0,s.Q3)("",!0),Ge.groupHasOnlyTasks&&"members"!==i.tab?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"button is-small is-rounded",onClick:t[16]||(t[16]=e=>Ge.changeTab("members"))},[(0,s.Lk)("span",oe,[(0,s.bF)(We,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",le,(0,a.v_)(e.$t("Members")),1)])):(0,s.Q3)("",!0),Ge.groupHasOnlyTasks&&"issues"!==i.tab?((0,s.uX)(),(0,s.CE)("a",{key:2,class:"button is-small is-rounded",onClick:t[17]||(t[17]=e=>Ge.changeTab("issues"))},[(0,s.Lk)("span",re,[(0,s.bF)(We,{icon:"fa-light fa-list-check"})]),(0,s.Lk)("span",de,(0,a.v_)(e.$t("Tasks")),1)])):(0,s.Q3)("",!0),Be.isSupport&&e.isGranted("ROLE_ADMIN_TENANT")?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"button is-small is-rounded",onClick:t[18]||(t[18]=t=>e.$router.push({name:"TenantSupport"}))},[(0,s.Lk)("span",ce,[(0,s.bF)(We,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",ue,(0,a.v_)(e.$t("Support team")),1)])):(0,s.Q3)("",!0),Ge.item&&Ge.item["@type"]&&"Group"===Ge.item["@type"]&&(Ge.item.owner&&Ge.item.owner.id===e.user.id||e.isCurrentGroupAdmin)?((0,s.uX)(),(0,s.CE)("button",{key:4,class:"button is-rounded is-small is-clickable",onClick:t[19]||(t[19]=t=>e.$router.push({name:"GroupUpdate",params:{item:Ge.item.id}}))},[(0,s.Lk)("span",me,[(0,s.Lk)("span",pe,[(0,s.bF)(We,{icon:"fa-light fa-gear"})]),(0,s.Lk)("span",he,(0,a.v_)(e.$t("settings")),1)])])):(0,s.Q3)("",!0),e.isGranted("ADMIN_TENANT")&&Ge.item&&Ge.item["@type"]&&"RoleGroup"===Ge.item["@type"]?((0,s.uX)(),(0,s.CE)("button",{key:5,class:"button is-small is-rounded is-clickable",onClick:t[20]||(t[20]=(...e)=>Ge.syncMembers&&Ge.syncMembers(...e))},[(0,s.Lk)("span",ge,[(0,s.bF)(We,{icon:"fal fa-sync"})])])):(0,s.Q3)("",!0),Ge.item&&Ge.item["@type"]&&"RoleGroup"===Ge.item["@type"]&&e.isGranted("ADMIN_TENANT")?((0,s.uX)(),(0,s.CE)("button",{key:6,class:"button is-small is-rounded is-clickable",onClick:t[21]||(t[21]=t=>e.$router.push({name:"RoleGroupUpdate",params:{item:Ge.item.id}}))},[(0,s.Lk)("span",fe,[(0,s.Lk)("span",be,[(0,s.bF)(We,{icon:"fa-light fa-gear"})]),(0,s.Lk)("span",ye,(0,a.v_)(e.$t("settings")),1)])])):(0,s.Q3)("",!0),Ge.item&&"Unit"===Ge.item["@type"]&&Ge.item.localCenter&&Ge.item.unitType&&(e.isGranted("HR_LOCAL",Ge.item.localCenter)||Ge.isUnitAdminOfThisUnit)?((0,s.uX)(),(0,s.Wv)(He,{key:7,class:"button is-small is-rounded",to:{name:"FilteredList",query:{unit:Ge.item.localCenter.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ve,[(0,s.Lk)("span",ke,[(0,s.bF)(We,{icon:"fa-light fa-layer-group"})]),(0,s.Lk)("span",Ce,(0,a.v_)(e.$t("units")),1)])]),_:1},8,["to"])):(0,s.Q3)("",!0),Ge.item&&"Unit"===Ge.item["@type"]&&Ge.item.localCenter&&e.tenant.settingFeatures.fees.hasLocalCenterMembersTable&&(e.isGranted("FINANCIAL_LOCAL",Ge.item.localCenter)||Ge.isUnitAdminForFees)?((0,s.uX)(),(0,s.Wv)(He,{key:8,class:"button is-small is-rounded",to:{name:"FeeMembersLocalCenter",query:{localCenter:Ge.item.localCenter.id,localCenterName:Ge.item.localCenter.name,unit:Ge.item.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Le,[(0,s.Lk)("span",we,[(0,s.bF)(We,{icon:"fa-light fa-money-bill-alt"})]),(0,s.Lk)("span",_e,(0,a.v_)(e.$t("fees")),1)])]),_:1},8,["to"])):(0,s.Q3)("",!0),Ge.item&&Ge.item["@type"]&&"LocalCenter"===Ge.item["@type"]?((0,s.uX)(),(0,s.CE)(s.FK,{key:9},[(0,s.bF)(He,{class:"button is-small is-rounded",to:{name:"LocalCenterShow",params:{item:Ge.item.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ee,[(0,s.Lk)("span",$e,[(0,s.bF)(We,{icon:"fa-light fa-circle-info"})]),(0,s.Lk)("span",Fe,(0,a.v_)(e.$t("info")),1)])]),_:1},8,["to"]),e.tenant.settingFeatures.fees.hasLocalCenterMembersTable&&e.isGranted("FINANCIAL_LOCAL",Ge.item)?((0,s.uX)(),(0,s.Wv)(He,{key:0,class:"button is-small is-rounded",to:{name:"FeeMembersLocalCenter",query:{localCenter:Ge.item.id,localCenterName:Ge.item.name}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Te,[(0,s.Lk)("span",Se,[(0,s.bF)(We,{icon:"fa-light fa-money-bill-alt"})]),(0,s.Lk)("span",Ae,(0,a.v_)(e.$t("fees")),1)])]),_:1},8,["to"])):(0,s.Q3)("",!0),e.isGrantedOwner(Ge.item)?((0,s.uX)(),(0,s.Wv)(He,{key:1,class:"button is-small is-rounded",to:{name:"LocalCenterUpdate",params:{item:Ge.item.id}}},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Pe,[(0,s.Lk)("span",Ie,[(0,s.bF)(We,{icon:"fa-light fa-gear"})]),(0,s.Lk)("span",Me,(0,a.v_)(e.$t("settings")),1)])]),_:1},8,["to"])):(0,s.Q3)("",!0)],64)):(0,s.Q3)("",!0),Ge.canLeaveGroup?((0,s.uX)(),(0,s.CE)("button",{key:10,class:"button is-small is-rounded",onClick:t[22]||(t[22]=(...e)=>Ge.leaveGroup&&Ge.leaveGroup(...e))},[(0,s.Lk)("span",xe,[(0,s.bF)(We,{icon:"fa-light fa-sign-out-alt"})]),(0,s.Lk)("span",Ne,(0,a.v_)(e.$t("leaveGroup")),1)])):(0,s.Q3)("",!0)])],2),Ge.hasTabsVisible?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("hr",{key:1,class:(0,a.C4)(["mt-3 mb-0",{"is-hidden-mobile":!Ge.item&&null===e.$store.state.currentGroup}])},null,2)),Ge.hasTabsVisible?((0,s.uX)(),(0,s.CE)("div",Ue,[(0,s.Lk)("div",De,[(0,s.Lk)("ul",Xe,[e.tenant?.settingFeatures?.discussions?.isActive&&Ge.enabledDiscussion?((0,s.uX)(),(0,s.CE)("li",{key:0,class:(0,a.C4)({"is-active":"discuss"===i.tab}),onClick:t[23]||(t[23]=e=>{Ge.changeTab("discuss"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("discussions")),1)])],2)):(0,s.Q3)("",!0),!Be.isGeneralUnit&&i.namespaces&&i.namespaces.length>0?((0,s.uX)(!0),(0,s.CE)(s.FK,{key:1},(0,s.pI)(i.namespaces,t=>((0,s.uX)(),(0,s.CE)(s.FK,{key:t.id},[Ge.item&&t.unit&&(t.unit===Ge.item["@id"]||!t.unit&&"Tenant"===Ge.item["@type"])?((0,s.uX)(),(0,s.CE)("li",{key:0,class:(0,a.C4)({"is-active":i.tab===("namespace_"+t.id).toString()}),onClick:e=>{Ge.changeTabDiscussNamespace(t),Ge.scrollTabIntoView(e)}},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(t.translation&&t.translation[e.$i18n.locale]?t.translation[e.$i18n.locale].button:t.name),1)])],10,Ve)):(0,s.Q3)("",!0)],64))),128)):(0,s.Q3)("",!0),e.tenant?.settingFeatures?.events?.isActive&&Ge.enabledEvents?((0,s.uX)(),(0,s.CE)("li",{key:2,class:(0,a.C4)({"is-active":"events"===i.tab}),onClick:t[24]||(t[24]=e=>{Ge.changeTab("events"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("events")),1)])],2)):(0,s.Q3)("",!0),Ge.item&&Ge.item["@type"]&&"Group"===Ge.item["@type"]&&Ge.item.isProject&&e.isCurrentGroupMember?((0,s.uX)(),(0,s.CE)("li",{key:3,class:(0,a.C4)({"is-active":"issues"===i.tab}),onClick:t[25]||(t[25]=e=>{Ge.changeTab("issues"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("issues")),1)])],2)):(0,s.Q3)("",!0),e.tenant.settingFeatures.drive.isActive&&Ge.enabledFiles?((0,s.uX)(),(0,s.CE)("li",{key:4,class:(0,a.C4)({"is-active":"files"===i.tab}),onClick:t[26]||(t[26]=e=>{Ge.changeTab("files"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("files")),1)])],2)):(0,s.Q3)("",!0),Ge.hasMembersView
1Rights?((0,s.uX)(),(0,s.CE)("li",{key:5,class:(0,a.C4)({"is-active":"members"===i.tab&&!e.$route.query.role_group_admin}),onClick:t[27]||(t[27]=e=>{Ge.changeTab("members"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("members")),1),i.countMembers&&!e.$route.query.role_group_admin?((0,s.uX)(),(0,s.CE)("span",Re,(0,a.v_)(i.countMembers),1)):(0,s.Q3)("",!0)])],2)):(0,s.Q3)("",!0),Ge.hasCompanyDirectory?((0,s.uX)(),(0,s.CE)("li",{key:6,class:(0,a.C4)({"is-active":"companies"===i.tab}),onClick:t[28]||(t[28]=e=>{Ge.changeTab("companies"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Companies")),1),i.countCompanies?((0,s.uX)(),(0,s.CE)("span",Oe,(0,a.v_)(i.countCompanies),1)):(0,s.Q3)("",!0)])],2)):(0,s.Q3)("",!0),e.$route.query.role_group_admin||e.isGranted("ADMIN_TENANT")&&Ge.item&&Ge.item["@type"]&&"RoleGroup"===Ge.item["@type"]?((0,s.uX)(),(0,s.CE)("li",{key:7,class:(0,a.C4)({"is-active":e.$route.query.role_group_admin}),onClick:t[29]||(t[29]=e=>{Ge.changeTab("members_custom"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("Extra members/Admins")),1)])],2)):(0,s.Q3)("",!0),Ge.item&&Ge.item["@type"]&&"LocalCenter"===Ge.item["@type"]&&Ge.localUnitTypes&&Ge.localUnitTypes.length&&(e.isGranted("HR_LOCAL",Ge.item)||Be.hasUnitAdminScopeHere)?((0,s.uX)(),(0,s.CE)("li",{key:8,class:(0,a.C4)({"is-active":"unit"===i.tab&&!e.$route.query.role_group_admin}),onClick:t[30]||(t[30]=e=>{Ge.changeTab("unit"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,(0,a.v_)(Ge.localUnitTypesNames.join(" / ")),1)],2)):(0,s.Q3)("",!0),Ge.item&&"Group"===Ge.item["@type"]&&Ge.item.description?((0,s.uX)(),(0,s.CE)("li",{key:9,class:(0,a.C4)({"is-active":"group_info"===i.tab}),onClick:t[31]||(t[31]=e=>{Ge.changeTab("group_info"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("About")),1)])],2)):(0,s.Q3)("",!0),Ge.canSeeLocalCenterAnalytics?((0,s.uX)(),(0,s.CE)("li",{key:10,class:(0,a.C4)({"is-active":"analytics"===i.tab}),onClick:t[32]||(t[32]=e=>{Ge.changeTab("analytics"),Ge.scrollTabIntoView(e)})},[(0,s.Lk)("a",null,[(0,s.Lk)("span",null,(0,a.v_)(e.$t("analytics")),1)])],2)):(0,s.Q3)("",!0)],512)])])):(0,s.Q3)("",!0)],2)}i(18111),i(13579);var Be=i(40834);function Ge(e,t,i,n,o,l){return(0,s.uX)(),(0,s.CE)("div",{key:i.item.id?"g_"+i.item.id:"t_logo",class:"logo-thumbnail"},["roundXSmall"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(`o-userimg-xs${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"roundSmaller"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(`o-userimg-smaller${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"roundSmall"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:2,class:(0,a.C4)(`o-userimg-sm${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):"roundMedium"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:3,class:(0,a.C4)(`o-userimg-md${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):"roundXMedium"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:4,class:(0,a.C4)(`o-userimg-xm${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"roundLarge"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:5,class:(0,a.C4)(`o-userimg-lg${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):(0,s.Q3)("",!0),"eventListThumb"===o.cssClass?((0,s.uX)(),(0,s.CE)("div",{key:6,class:(0,a.C4)(`o-event-list-thumb${o.extraCSS}`),style:(0,a.Tr)({"background-image":l.imageCss(),"background-color":l.backgroundColor(),color:l.fontColor()})},[(0,s.Lk)("span",null,(0,a.v_)(l.itemFirstLetter),1)],6)):(0,s.Q3)("",!0)])}var We=i(28782),je=i(95256),ze={components:{},props:["item","isType","emptyImage","isInline"],data(){return{cssClass:this.isType?this.isType:"roundMedium",image:this.item.logo?this.item.logo:null,type:this.item["@type"]?this.item["@type"].toLowerCase():"user",extraCSS:this.isInline?" inline-class":""}}
1,computed:{itemFirstLetter(){if(!this.image&&!this.emptyImage){if("user"===this.type&&this.item&&this.item.firstName&&this.item.lastName)return this.item.firstName.slice(0,1).toUpperCase()+this.item.lastName.slice(0,1).toUpperCase();if("contact"===this.type&&this.item&&this.item.name)return this.item.name.slice(0,2).toUpperCase();if(this.item&&["group","unit","rolegroup","localcenter","tenant"].includes(this.type))return"tenant"===this.type&&this.item.logoSquare?null:this.item.name.slice(0,1).toUpperCase()}return null}},created(){},methods:{stringToColour:je.ly,imageCss(){if("demo"===this.image)return"url(https://picsum.photos/id/"+(this.item.id%1e3+1)+"/600/600.jpg)";if("demo_f"===this.image)return"url(https://randomuser.me/api/portraits/women/"+this.item.id%100+".jpg)";if("demo_m"===this.image)return"url(https://randomuser.me/api/portraits/men/"+this.item.id%100+".jpg)";if("tenant"===this.type){if(this.item.logoSquare)return"url("+We.hd+We.DJ+"tenant/"+this.item.logoSquare+")";if(this.item.logoSquareDark)return"url("+We.hd+We.DJ+"tenant/"+this.item.logoSquareDark+")";this.type="group",this.item.logo=null}if(this.image){if(this.image.includes("demo__"))return"url("+this.image.replace("demo__","")+")";let e=this.type;return"rolegroup"===e&&(e="unit"),"url("+We.ze+We.DJ+e+"/"+this.image+")"}return this.emptyImage?"url("+this.emptyImage+")":["user","group","rolegroup","unit","localcenter"].includes(this.type)?"none":"url("+We.ze+We.DJ+"defaults/"+this.type+".png)"},backgroundColor(){return this.image?"transparent":["group","rolegroup","unit","localcenter"].includes(this.type)&&this.item&&this.item.name?this.stringToColour(this.item.name):"user"===this.type&&this.item&&this.item.lastName?this.stringToColour(this.item.lastName):"lightgrey"},fontColor(){return"user"===this.type&&this.item&&this.item.lastName?"#fff":"#111"}}},qe=i(66262);const Je=(0,qe.A)(ze,[["render",Ge]]);var He=Je,Ke=i(81084),Ye=i(61273),Ze=i(28994),et=i(48108),tt={mixins:[Ze.A],props:["tab","countMembers","countCompanies","isPastEvents","namespaces","showTitleActions"],data(){return{isGeneralUnit:void 0!==this.$route.query.generalUnit||"CompanyDirectory"===this.$route.name||void 0,isSupport:this.$route.query.isSupport&&"IssueList"===this.$route.name,seeMembersInGeneralUnitGroup:this.$store.state.tenant.settingFeatures.users.seeMembersInGeneralUnitGroup,unitDiscriminator:this.$route.query.type,itemId:void 0!==this.$route.query.unit?parseInt(this.$route.query.unit):void 0,cached:this.$route.query.cached,showCoverImageButton:!1,coverImageFile:null,groupUsers:[],isFollowGeneralUnit:!0,isLoadingFollow:!1,isLoadingMute:!1,showSubscribeAnimation:!1,showMuteAnimation:!1,hasUnitAdminScopeHere:!1}},created(){this.isFollowGeneralUnit=this.user.isFollowGeneralUnit,this.reloadCurrentGroup()},watch:{"item.id":{immediate:!0,handler(){this.checkUnitAdminScopeHere()}}},methods:{checkUnitAdminScopeHere(){this.hasUnitAdminScopeHere=!1;const e=this.item;e&&"LocalCenter"===e["@type"]&&e.id&&!this.isGranted("HR_LOCAL",e)&&(0,et.T)(this.user)&&this.$http.plain.get("/local-centers/"+e.id+"/unit-tree").then(e=>{const t=Array.isArray(e.data)?e.data:[];this.hasUnitAdminScopeHere=t.some(e=>e&&e.canAccess)}).catch(e=>console.error(e))},reloadCurrentGroup(){let e=this.$store.state.currentGroup;this.itemId&&(void 0===e||!e)||this.itemId&&e&&this.itemId!==e.id||e&&["Group","RoleGroup"].includes(e["@type"])&&!e.userRoles||e&&"Unit"===e["@type"]&&!e.localCenter?this.loadUnit():(this.checkAccess(),this.itemId&&(this.retrieveUserFollow(),this.retrieveUserMute()))},checkAccess(){let e=this.$store.state.currentGroup;if(e&&"Group"===e["@type"]&&e.isJoinable&&!this.isCurrentGroupMember&&"UserList"!==this.$route.name)return this.$router.push({name:"UserList",query:{unit:e.id}});this.$emit("update:modelValue",this.item)},retrieveUserFollow(){return this.$http.plain.get("/search/user-follow-unit/"+this.itemId).then(e=>{this.$store.state.currentGroup&&this.$store.state.currentGroup.id===this.itemId&&(this.$store.commit("setIsSubscribed",e.data&&e.data.id),this.$store.commit("setUserFollowId",e.data.id?e.data.id:null),this.$emit("update:modelValue",this.item))}).catch(e=>console.error(e))},retrieveGroupMembers(){return this.$http.plain.get("/user_roles?exists[dateEnded
1]=false&unit="+this.itemId).then(e=>{this.$store.state.currentGroup.userRoles=e.data["hydra:member"]}).catch(e=>console.error(e))},leaveGroup(){this.$buefy.dialog.confirm({title:this.$t("leaveGroup"),message:this.$t("leaveGroupConfirm")+" "+this.item.name+"?",confirmText:this.$t("leaveGroup"),type:"is-danger",onConfirm:()=>{this.$http.plain.delete("/user_leave_group/"+this.item.id).then(e=>{this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success"}),this.$router.push({name:"GroupBrowse"})}).catch(e=>console.error(e))}})},toggleFollowUnit(){let e=this.item.isSubscribed?"/"+this.item.userFollowId:"",t=this.item.isSubscribed?this.$http.plain.delete:this.$http.plain.post;this.isLoadingFollow=!0,t("/user_follow_units"+e,{unit:"/api/v1/units/"+this.item.id}).then(e=>this.retrieveUserFollow()).catch(e=>console.log(e)).finally(()=>{this.isLoadingFollow=!1})},subscribeToGroup(){this.isLoadingFollow=!0,this.$http.plain.post("/user_follow_units",{unit:"/api/v1/units/"+this.item.id}).then(e=>{this.retrieveUserFollow(),this.triggerSubscribeAnimation()}).catch(e=>console.log(e)).finally(()=>{this.isLoadingFollow=!1})},unsubscribeFromGroup(){this.item.userFollowId&&(this.isLoadingFollow=!0,this.$http.plain.delete("/user_follow_units/"+this.item.userFollowId).then(e=>this.retrieveUserFollow()).catch(e=>console.log(e)).finally(()=>{this.isLoadingFollow=!1}))},subscribeToGeneralUnit(){this.isLoadingFollow=!0,this.$http.plain.patch("/profile-update/"+this.user.id,{isFollowGeneralUnit:!0}).then(e=>{this.$store.commit("setCurrentUser",e.data),this.isFollowGeneralUnit=e.data.isFollowGeneralUnit,this.triggerSubscribeAnimation()}).catch(e=>console.log(e)).finally(()=>{this.isLoadingFollow=!1})},unsubscribeFromGeneralUnit(){this.isLoadingFollow=!0,this.$http.plain.patch("/profile-update/"+this.user.id,{isFollowGeneralUnit:!1}).then(e=>{this.$store.commit("setCurrentUser",e.data),this.isFollowGeneralUnit=e.data.isFollowGeneralUnit}).catch(e=>console.log(e)).finally(()=>{this.isLoadingFollow=!1})},toggleFollowUnitGeneral(){this.isLoadingFollow=!0,this.$http.plain.patch("/profile-update/"+this.user.id,{isFollowGeneralUnit:!this.isFollowGeneralUnit}).then(e=>{this.$store.commit("setCurrentUser",e.data),this.isFollowGeneralUnit=e.data.isFollowGeneralUnit}).catch(e=>console.log(e)).finally(()=>{this.isLoadingFollow=!1})},triggerSubscribeAnimation(){this.showSubscribeAnimation=!0,setTimeout(()=>{this.showSubscribeAnimation=!1},600)},retrieveUserMute(){if(this.isOpenAccessLC)return this.$http.plain.get("/search/user-mute-unit/"+this.itemId).then(e=>{this.$store.state.currentGroup&&this.$store.state.currentGroup.id===this.itemId&&(this.$store.commit("setIsMuted",e.data&&e.data.id),this.$store.commit("setUserMuteId",e.data.id?e.data.id:null))}).catch(e=>console.error(e))},muteLocalCenter(){this.isLoadingMute=!0,this.$http.plain.post("/user_mute_units",{unit:"/api/v1/units/"+this.item.id}).then(e=>{this.retrieveUserMute()}).catch(e=>console.error(e)).finally(()=>{this.isLoadingMute=!1})},unmuteLocalCenter(){this.item.userMuteId&&(this.isLoadingMute=!0,this.$http.plain.delete("/user-mute-unit-delete/"+this.item.userMuteId).then(e=>{this.retrieveUserMute(),this.triggerMuteAnimation()}).catch(e=>console.error(e)).finally(()=>{this.isLoadingMute=!1}))},triggerMuteAnimation(){this.showMuteAnimation=!0,setTimeout(()=>{this.showMuteAnimation=!1},600)},loadUnit(){void 0!==this.itemId&&this.$http.plain.get("/units/"+this.itemId).then(e=>{this.$store.state.currentGroup=e.data,this.$emit("update:modelValue",this.item),this.checkAccess(),this.item&&"Group"===this.item["@type"]&&this.item.isProject&&this.retrieveGroupMembers(),this.itemId&&(this.retrieveUserFollow(),this.retrieveUserMute()),this.entityLoaded()}).catch(e=>console.error(e))},entityLoaded(){this.item&&"Group"===this.item["@type"]&&this.item.isProject&&this.isCurrentGroupMember&&this.$http.plain.get("/issue_statuses?unit="+this.itemId).then(e=>{this.item["issueStatuses"]=e.data["hydra:member"],this.$http.plain.get("/issue_types?unit="+this.itemId).then(e=>{this.item["issueTypes"]=e.data["hydra:member"],this.$store.state.currentGroup=this.item})}).catch(e=>console.error(e))},changeTab(e){switch(e){case"members":this.$router.push({name:"UserList",query:{unit:this.itemId,generalUnit:this.isGeneralUnit}});break;
1case"members_custom":this.$router.push({name:"UserList",query:{unit:this.itemId,role_group_admin:!0}});break;case"discuss":this.$router.push({name:"DiscussList",query:{unit:this.itemId,generalUnit:this.isGeneralUnit}});break;case"events":this.$router.push({name:"EventList",query:{unit:this.itemId,generalUnit:this.isGeneralUnit}});break;case"files":this.$router.push({name:"DriveList",query:{unit:this.itemId,generalUnit:this.isGeneralUnit}});break;case"issues":this.$router.push({name:"IssueList",query:{unit:this.itemId}});break;case"unit":this.$router.push({name:"FilteredList",query:{unit:this.itemId}});break;case"companies":this.$router.push({name:"CompanyDirectory"});break;case"group_info":this.$router.push({name:"GroupInfo",query:{unit:this.itemId}});break;case"analytics":this.$router.push({name:"LocalCenterAnalytics",query:{unit:this.itemId}});break}},changeTabDiscussNamespace(e){return this.$router.push({name:"DiscussList",query:{...this.itemId?{unit:this.itemId}:{},...this.isGeneralUnit?{generalUnit:this.isGeneralUnit}:{},category:e.id}})},syncMembers(){this.isLoadingFollow=!0,this.$http.plain.patch("/role_groups/"+this.item.id,{}).then(()=>{this.reloadCurrentGroup()}).catch(e=>{console.error(e)}).finally(()=>{this.isLoadingFollow=!1})},goToInfo(){this.item&&"Group"===this.item["@type"]?this.$router.push({name:"GroupInfo",query:{unit:this.itemId}}):this.item&&"LocalCenter"===this.item["@type"]&&this.$router.push({name:"LocalCenterShow",params:{item:this.item.id}})},scrollTabIntoView(e){if(!this.$isMobile())return;const t=e.target.closest("li");t&&this.$nextTick(()=>{t.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})})}},computed:{...(0,Be.L8)(["user","isGranted","tenant","isGrantedOwner","isCurrentGroupMember","isCurrentGroupAdmin"]),isUnitAdminForFees(){return(0,et.T)(this.user)},isUnitAdminOfThisUnit(){return!(!this.item||!this.item.id)&&(0,et.Z)(this.user,this.item.id)},groupBulletColor(){if(!this.item)return"var(--orgo-color-primary)";
1const e=this.tenant?.settingMenu?.groupColors||{};if("RoleGroup"===this.item["@type"]||this.item.isRoleGroup)return e.roleGroup||"#9b7def";if("Tenant"===this.item["@type"]||"LocalCenter"===this.item["@type"])return e.general||"#5b7def";if("Group"===this.item["@type"]&&this.item.category){const t=this.item.category.color||e.category||"#ec4899";if(!t||t.startsWith("#"))return t;const i="dark"===this.$store.state.theme;return i?`var(--${t}-400, var(--${t}-200))`:`var(--${t}-500, var(--${t}-200))`}return"Group"===this.item["@type"]&&this.item.isJoinable?e.joinable||"#43b581":"Group"!==this.item["@type"]||this.item.isJoinable?e.general||"#5b7def":e.private||"#e8a44a"},isOpenAccessLC(){return this.tenant?.settingFeatures?.localCenter?.openAccess&&this.item&&"LocalCenter"===this.item["@type"]||this.item&&this.item.includesAllMembers},canSeeLocalCenterAnalytics(){if(!this.item||"LocalCenter"!==this.item["@type"])return!1;const e=this.tenant?.settingFeatures?.analytics;if(!e?.isActive)return!1;const t=e=>"string"===typeof e?e.replace(/_TENANT$/,"_LOCAL"):e,i=[e.grantPlatform||"ADMIN_TENANT",e.grantMembership||"HR_TENANT",e.grantGeography||"USER",e.grantLeaderboards||"USER",e.grantFinance||"FINANCIAL_TENANT"];return i.some(e=>this.isGranted(t(e),this.item))},groupHasOnlyTasks(){let e=this.$store.state.currentGroup;return e?.isProject&&!e.hasDiscussion},hasTabsVisible(){return"support"!==this.$store.state.currentGroup&&!this.isSupport&&(!this.groupHasOnlyTasks&&(this.$store.state.currentGroup||this.isGeneralUnit))},hasCompanyDirectory(){return!0===this.isGeneralUnit&&(this.tenant?.settingFeatures?.company?.isActive??!1)},hasMembersViewRights(){if(this.item&&"Group"===this.item["@type"]&&this.item.includesAllMembers)return!1;if(this.item&&("Group"===this.item["@type"]||"Unit"===this.item["@type"]||"RoleGroup"===this.item["@type"]))return!0;if(this.item&&"LocalCenter"===this.item["@type"]){const e=this.tenant?.settingFeatures?.users?.seeMembersInLocalCenter;if(e&&!this.isGranted(e,this.item))return!1;const t=this.user.localCenter&&this.user.localCenter.ancestors;let i=null;return Array.isArray(t)&&t.length?i=t[0]:this.user.localCenterParent&&this.user.localCenter&&this.user.localCenterParent.id!==this.user.localCenter.id&&(i=this.user.localCenterParent),!this.user.isGuest&&this.user.localCenter&&(this.user.localCenter.id===this.item.id||i&&i.id===this.item.id)||this.isGranted("HR_LOCAL",this.item)||this.isGranted("FINANCIAL_LOCAL",this.item)}return!!(this.isGeneralUnit&&(!this.seeMembersInGeneralUnitGroup||this.isGranted(this.seeMembersInGeneralUnitGroup))||this.isGranted("HR_TENANT")||this.isGranted("FINANCIAL_TENANT"))},item(){if(this.isGeneralUnit||["generalUnit","support"].includes(this.$store.state.currentGroup)){let e={"@type":"Tenant"};return e.logoSquare=this.tenant.logoSquare,e.logoSquareDark=this.tenant.logoSquareDark,e.name=this.tenant.shortName,e.id=null,("support"===this.$store.state.currentGroup||this.isSupport)&&(e.name=this.$t("support")),e}return this.$store.state.currentGroup},localUnitTypesNames(){let e=[];for(let t of this.localUnitTypes)e.push(t.namePlural);return e},localUnitTypes(){let e=this.$store.state.tenant.unitTypes,t=[];for(let i of e)i.isLocal&&t.push(i);return t},enabledDiscussion(){return!!(!this.item||"Group"!==this.item["@type"]||this.item.hasDiscussion&&this.isCurrentGroupMember)},enabledEvents(){return!!(!this.item||"Group"!==this.item["@type"]||this.item.hasEvents&&this.isCurrentGroupMember)&&(!this.$route.query.category||!this.$route.query.hotlink)},enabledFiles(){return!!(!this.item||"Group"!==this.item["@type"]||this.item.hasFiles&&this.isCurrentGroupMember)&&(!this.$route.query.category||!this.$route.query.hotlink)},canLeaveGroup(){return this.item&&this.item.owner&&"Group"===this.item["@type"]&&this.isCurrentGroupMember&&this.item.owner.id!==this.user.id&&!this.item.includesAllMembers},mobileTitle(){if(this.$route.query.hotlink)return this.$route.query.hotlink;if(this.item&&this.item.name)return this.item.name;if(null===this.$store.state.currentGroup){if("DiscussList"===this.$route.name)return this.$t("discussions");if("EventList"===this.$route.name)return this.$t("events");if("DriveList"===this.$route.name)return this.$t("files")}return""},hasMobileDropdownOptions(){return!!this.item&&("LocalCenter"===this.item["@type"]||(!("Group"!==this.item["@type"]||!(this.item.owner&&this.item.owner.id===this.user.id||this.isCurrentGroupAdmin))||
1(!("RoleGroup"!==this.item["@type"]||!this.isGranted("ADMIN_TENANT"))||(!("LocalCenter"!==this.item["@type"]||!this.isGrantedOwner(this.item))||(!!this.canLeaveGroup||("events"===this.tab&&null===this.$store.state.currentGroup||!(!this.isSupport||!this.isGranted("ROLE_ADMIN_TENANT"))))))))}},components:{FontAwesomeIcon:Ye.gc,LogoThumbnailGroup:He,MobileViewHeader:Ke.A}};const it=(0,qe.A)(tt,[["render",Qe],["__scopeId","data-v-73d8c1f4"]]);var st=it},93811:function(e,t,i){"use strict";i.d(t,{_:function(){return s}});const s=[{network:"facebook",icon:"facebook",label:"Facebook"},{network:"instagram",icon:"instagram",label:"Instagram"},{network:"linkedin",icon:"linkedin",label:"LinkedIn"},{network:"youtube",icon:"youtube",label:"YouTube"},{network:"tiktok",icon:"tiktok",label:"TikTok"},{network:"x",icon:"x-twitter",label:"X"}]},94692:function(e,t,i){"use strict";i.d(t,{A:function(){return b}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"agenda-toolbar mb-2"},l=["aria-label"],r={class:"agenda-search-toggle-label"},d={class:"agenda-search-toggle-label"},c={class:"agenda-stage-option"},u={class:"agenda-stage-option"};function m(e,t,i,m,p,h){const g=(0,s.g2)("font-awesome-icon"),f=(0,s.g2)("b-input"),b=(0,s.g2)("b-dropdown-item"),y=(0,s.g2)("b-dropdown");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",{class:(0,a.C4)(["agenda-search",{"is-expanded":p.isOpen||p.isClosing}])},[p.isOpen||p.isClosing?((0,s.uX)(),(0,s.CE)("div",{key:1,class:(0,a.C4)(p.isClosing?"agenda-search-input-collapse":"agenda-search-input-animate")},[(0,s.bF)(f,{ref:"searchInput","model-value":i.search,class:"agenda-search-input",placeholder:e.$t("Search sessions or speakers"),icon:"magnifying-glass","icon-right":"xmark","icon-right-clickable":"",rounded:"","onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:search",t)),onIconRightClick:h.close,onKeyup:(0,n.jR)(h.close,["esc"]),onBlur:h.onBlur},null,8,["model-value","placeholder","onIconRightClick","onKeyup","onBlur"])],2)):((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:(0,a.C4)(["agenda-search-toggle",{"agenda-search-toggle-animate":!p.hasClosedOnce}]),"aria-label":e.$t("Search sessions or speakers"),onClick:t[0]||(t[0]=(...e)=>h.open&&h.open(...e))},[(0,s.bF)(g,{icon:"fa-light fa-magnifying-glass"}),(0,s.Lk)("span",r,(0,a.v_)(e.$t("Search")),1)],10,l))],2),!i.stages.length||p.isOpen||p.isClosing?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)(y,{key:0,"model-value":i.selectedStage,"aria-role":"list",position:"is-bottom-right",class:"agenda-stage-filter","onUpdate:modelValue":t[2]||(t[2]=t=>e.$emit("update:selectedStage",t))},{trigger:(0,s.k6)(({active:t})=>[(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["agenda-search-toggle",{"is-active":i.selectedStage}])},[i.selectedStage?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"agenda-stage-dot",style:(0,a.Tr)({background:h.getStageColor(i.selectedStage,h.colorBasisStages)})},null,4)):((0,s.uX)(),(0,s.Wv)(g,{key:1,icon:"fa-light fa-location-dot"})),(0,s.Lk)("span",d,(0,a.v_)(i.selectedStage||e.$t("All stages")),1),(0,s.bF)(g,{icon:t?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])],2)]),default:(0,s.k6)(()=>[(0,s.bF)(b,{value:null,"aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",c,[t[3]||(t[3]=(0,s.Lk)("span",{class:"agenda-stage-dot is-neutral"},null,-1)),(0,s.Lk)("span",null,(0,a.v_)(e.$t("All stages")),1)])]),_:1}),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.stages,e=>((0,s.uX)(),(0,s.Wv)(b,{key:e,value:e,"aria-role":"listitem"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",u,[(0,s.Lk)("span",{class:"agenda-stage-dot",style:(0,a.Tr)({background:h.getStageColor(e,h.colorBasisStages)})},null,4),(0,s.Lk)("span",null,(0,a.v_)(e),1)])]),_:2},1032,["value"]))),128))]),_:1},8,["model-value"]))])}var p=i(54148),h={name:"AgendaToolbar",props:{search:{type:String,default:""},selectedStage:{type:String,default:null},stages:{type:Array,default:()=>[]},allStages:{type:Array,default:null},stageColorMap:{type:Object,default:null}},emits:["update:search","update:selectedStage"],data(){return{isOpen:!1,isClosing:!1,hasClosedOnce:!1}},computed:{colorBasisStages(){return this.allStages&&this.allStages.length?this.allStages:this.stages}},methods:{getStageColor(e,t){return(0,p.mh)(e,t,this.stageColorMap)},open(){this.isOpen=!0,this.$nextTick(()=>{const e=this.$refs.searchInput,t=e&&e.$el?e.$el.querySelector("input"):null;t&&t.focus()})},close(){!this.isClosing&&this.isOpen&&(this.$emit("update:search",""),this.isClosing=!0,this.isOpen=!1,setTimeout(()=>{this.isClosing=!1,this.hasClosedOnce=!0},200))},onBlur(){this.isClosing||this.search&&this.search.trim()||this.close()}}},g=i(66262);const f=(0,g.A)(h,[["render",m],["__scopeId","data-v-18119af9"]]);var b=f},95256:function(e,t,i){"use strict";i.d(t,{$I:function(){return E},D2:function(){return ze},D8:function(){return f},DT:function(){return ae},EM:function(){return me},EX:function(){return Ne},F0:function(){return M},F9:function(){return C},GG:function(){return De},GL:function(){return de},GU:function(){return ve},Gp:function(){return Me},H2:function(){return Be},HA:function(){return Q},HZ:function(){return R},Hc:function(){return le},Hp:function(){return c},JM:function(){return Pe},JP:function(){return G},Jt:function(){return ke},KN:function(){return oe},KO:function(){return Ee},LN:function(){return et},ND:function(){return Ze},NW:function(){return N},OS:function(){return Ve},Oh:function(){return b},Ou:function(){return Ke},P:function(){return _},QE:function(){return Xe},QX:function(){return Je},S1:function(){return p},U4:function(){return z},Ve:function(){return Te},Vl:function(){return ye},WA:function(){return w},WZ:function(){return Re},X:function(){return Ge},Xr:function(){return be},YQ:function(){return q},YV:function(){return m},Yv:function(){return g},ZC:function(){return Se},ZD:function(){return W},ZV:function(){return $},Zz:function(){return P},_J:function(){return xe},__:function(){return B},a6:function(){return v},bm:function(){return ee},c8:function(){return We},cm:function(){return d},cn:function(){return X},dG:function(){return U},eD:function(){return $e},eo:function(){return he},ey:function(){return Oe},fV:function(){return ce},fq:function(){return te},g$:function(){return Ce},gZ:function(){return _e},gt:function(){return J},hL:function(){return Ae},ii:function(){return D},jT:function(){return H},ko:function(){return ie},l0:function(){return L},lW:function(){return Z},lp:function(){return ue},ly:function(){return I},mF:function(){return qe},mZ:function(){return K},mw:function(){return re},mx:function(){return x},nj:function(){return y},pc:function(){return Le},pz:function(){return O},q3:function(){return Ie},rP:function(){return je},sX:function(){return j},sb:function(){return we},tZ:function(){return He},tt:function(){return h},vK:function(){return k},vW:function(){return Ue},wt:function(){return r},x3:function(){return Fe},y1:function(){return u},z3:function(){return V},z4:function(){return ne},z7:function(){return Ye},zL:function(){return pe},z_:function(){return ge},zn:function(){return se}});i(44114),i(18111),i(81148),i(22489),i(20116),i(7588),i(61701),i(13579),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(64979),i(14603),i(47566),i(98721);var s=i(28782),a=i(95093),n=i.n(a),o=i(54481),l=i(5833);const r=function(e){return e.split(/\r?\n/).map(e=>{const t=e.trim(),i=/^\[x\]\s*/i.test(t),s=t.replace(/^(\d+[\.\)]\s*|[-â¢*]\s*|\[[ x]\]\s*)/i,"").trim();return{title:s,done:i}}).filter(e=>e.title.length>0)},d=function(e,t){return!!e&&!!t&&e.id!==t.id&&!e.isBlockProtected},c=function(e){const t="string"===typeof e?e.trim():"";if(!t)return null;if(t.startsWith("//"))return null;if(t.startsWith("/"))return t;try{const e=new URL(t);return"http:"===e.protocol||"https:"===e.protocol?t:null}catch(i){return null}},u=function(e,t,i=1){var s=[e],a=e;while(a<t)a+=i||1,s.push(a);return s},m=function(e,t=null){return e&&e.includes("demo__")?e.replace("demo__",""):s.hd+s.DJ+t+"/"+e},p=function(e){return(0,l.H)(e)},h=function(e){return new Intl.NumberFormat("en-US",{style:"decimal",maximumFractionDigits:0,notation:"standard",thousandSeparator:"â¯"}).format(e)},g=function(e){return e?e.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-"):e},f=function(e){if(e&&"object"===typeof e&&null!=e.id)return e.id;if("string"===typeof e){const t=e.split("/").pop(),i=Number(t);return Number.isFinite(i)?i:null}return null},b=function(e){return!!e&&(null!=e.isOneTime?!!e.isOneTime:!0!==e.isSubscription)},y=function(e){return!(!e||!0!==e.isSubscription)},v=function(e,t,i){if(!e)return!1;if("subscription"===i&&!e.hasSubscription)return!1;if("one"===i&&!e.hasOneTimePayment)return!1;if(e.abTestingEnabled)return!0;const s=(e.productPrices||[]).filter(e=>e&&!e.isArchived&&e.currency===t);return!s.length||s.some(e=>"subscription"===i?y(e):b(e))},k=function(e,t,i,s){return s?e:"subscription"!==e&&!t&&i?"subscription":"subscription"===e&&!i&&t?"one":e},C=function(e,t=null){if(e&&void 0!==e.contentUrl&&e.contentUrl)return"demo"===e.contentUrl?"https://picsum.photos/id/"+Math.floor(1e3*Math.random())+"/600/600.jpg":e.contentUrl&&e.contentUrl.includes("/demo?")?"https://picsum.photos/600/300?random="+e.id:e.contentUrl&&e.contentUrl.includes("demo__")?e.contentUrl.replace("demo__",""):e.contentUrl.includes("https")||e.contentUrl.includes("http://")?e.contentUrl:(!e.type&&t&&(e.type=t),s.ze+s.DJ+e.type+"/"+e.contentUrl);if("string"===typeof e||e instanceof String){if(e.includes("demo__"))return e.replace("demo__","");if(e.includes("https")||e.includes("http://"))return e}},L=function(e){const t=e&&e.media;return t&&"READY"===t.thumbnailStatus&&t.thumbnailUrl?t.thumbnailUrl.includes("https")||t.thumbnailUrl.includes("http://")?t.thumbnailUrl:s.ze+s.DJ+"drive-thumbnail/"+t.thumbnailUrl:null},w=function(e){return e?e.startsWith("http://")||e.startsWith("https://")?e:s.ze+s.DJ+"company/"+e:null},_={ADMIN_TENANT:!0,HR_TENANT:!0,HR_ASSISTANT_TENANT:!0,FINANCIAL_TENANT:"fees.isActive",COMMUNICATION_TENANT:!0,EVENT_TENANT:"events.isActive",ADMIN_PARENT_LOCAL:"localCenter.hasParent",HR_PARENT_LOCAL:"localCenter.hasParent",HR_ASSISTANT_PARENT_LOCAL:"localCenter.hasParent",FINANCIAL_PARENT_LOCAL:"localCenter.hasParent",COMMUNICATION_PARENT_LOCAL:"localCenter.hasParent",EVENT_PARENT_LOCAL:"localCenter.hasParent",ADMIN_LOCAL:"localCenter.isActive",HR_LOCAL:"localCenter.isActive",HR_ASSISTANT_LOCAL:"localCenter.isActive",FINANCIAL_LOCAL:"localCenter.isActive",COMMUNICATION_LOCAL:"localCenter.isActive",EVENT_LOCAL:"localCenter.isActive"},E=function(e){return e&&"string"===typeof e?e.includes("_PARENT_LOCAL")?"PARENT_LOCAL":e.includes("_TENANT")?"TENANT":e.includes("_LOCAL")?"LOCAL":null:null},$={ADMIN_PARENT_LOCAL:["ADMIN_LOCAL","HR_PARENT_LOCAL","HR_LOCAL","HR_ASSISTANT_PARENT_LOCAL","HR_ASSISTANT_LOCAL","FINANCIAL_PARENT_LOCAL","FINANCIAL_LOCAL","COMMUNICATION_PARENT_LOCAL","COMMUNICATION_LOCAL","EVENT_PARENT_LOCAL","EVENT_LOCAL"],FINANCIAL_TENANT:["HR_ASSISTANT_TENANT"],FINANCIAL_LOCAL:["HR_ASSISTANT_LOCAL"],FINANCIAL_PARENT_LOCAL:["FINANCIAL_LOCAL","HR_ASSISTANT_LOCAL","HR_ASSISTANT_PARENT_LOCAL"],HR_TENANT:["HR_ASSISTANT_TENANT"],HR_PARENT_LOCAL:["HR_LOCAL","HR_ASSISTANT_LOCAL"],HR_LOCAL:["HR_ASSISTANT_LOCAL"],COMMUNICATION_PARENT_LOCAL:["COMMUNICATION_LOCAL"],EVENT_PARENT_LOCAL:["EVENT_LOCAL"]},F={USER:1,USER_LOCAL:2,EVENT_LOCAL:10,EVENT_PARENT_LOCAL:15,EVENT_TENANT:20,COMMUNICATION_LOCAL:10,COMMUNICATION_PARENT_LOCAL:15,COMMUNICATION_TENANT:20,HR_ASSISTANT_LOCAL:30,HR_ASSISTANT_PARENT_LOCAL:35,HR_ASSISTANT_TENANT:40,FINANCIAL_LOCAL:50,FINANCIAL_PARENT_LOCAL:55,FINANCIAL_TENANT:60,HR_LOCAL:70,HR_PARENT_LOCAL:75,HR_TENANT:80,ADMIN_LOCAL:90,ADMIN_PARENT_LOCAL:95,ADMIN_TENANT:100},T=function(e){if(!e||!e.permissions)return 0;if(e.roles&&e.roles.includes("ROLE_ADMIN_TENANT"))return F.ADMIN_TENANT;let t=0;
1return e.permissions.forEach(e=>{const i=F[e]||0;i>t&&(t=i)}),t},S=function(e){return e.includes("_TENANT")?"TENANT":e.includes("_PARENT_LOCAL")?"PARENT_LOCAL":e.includes("_LOCAL")?"LOCAL":"UNKNOWN"},A=function(e){if(!e||!e.permissions)return"LOCAL";if(e.roles&&(e.roles.includes("ROLE_ADMIN_TENANT")||e.roles.includes("ROLE_SUPER_ADMIN")))return"TENANT";const t=e.permissions.some(e=>e.includes("_TENANT"));if(t)return"TENANT";const i=e.permissions.some(e=>e.includes("_PARENT_LOCAL"));return i?"PARENT_LOCAL":"LOCAL"},P=function(e,t){if(!e)return!1;if(e.roles&&(e.roles.includes("ROLE_ADMIN_TENANT")||e.roles.includes("ROLE_SUPER_ADMIN")))return!0;const i=A(e),s=S(t),a={TENANT:3,PARENT_LOCAL:2,LOCAL:1},n=a[i]||0,o=a[s]||0;if(n<o)return!1;const l=T(e),r=F[t]||0;return l>=r},I=function(e){const t=["#38C6FA","#CB1969","#F39315","#3173ED","#F1642E","#EC1E5A","#379FF7","#886FDF"];return e?t[e.length%t.length]:t[0]},M=function(e){if(!e)return 1;let t=0;for(let i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);return Math.abs(t)%6+1},x=function(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},N=function(e){let t=(new Date).getTime()+1728e5;return!!e&&(e=new Date(e),t>e.getTime())},U=function(e){return"number"===typeof e&&e<18},D=function(e){let t=null;return e.role&&(t=e.role.name,e.unit&&(t=t+" - "+e.unit.name)),t},X=function(e,t){let i=null,s=e.customFieldValues;if("object"===typeof s){let e=[];for(const[t,i]of Object.entries(s))e.push(i);s=e}s&&(i=s.find(e=>e.field["@id"]===t["@id"]));let a=i?i.value:null;if("file"===t.fieldType)return i&&i.media?i.media:null;if(!a||""===a)return null;if(["dropdown","radio"].includes(t.fieldType)&&t.fieldOptions){const e=t.fieldOptions?.options||t.fieldOptions||{};a=e[a]??e[String(a)]??e[parseInt(a,10)]??String(a)}else if(["checkboxes"].includes(t.fieldType)&&t.fieldOptions){let e="";if("string"===typeof a)try{a=JSON.parse(a)}catch(n){console.error("Failed to parse checkbox value",n),a=[]}Array.isArray(a)||(a=[]);const i=t.fieldOptions?.options||t.fieldOptions||{};for(let t of a){const s=i[t]??i[String(t)]??i[parseInt(t,10)]??String(t),a=String(s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");e+='<span class="tag mr-2 is-small is-default is-rounded">'+a+"</span>"}a=e}else["date"].includes(t.fieldType)&&(a=new Date(a),a=a.getDate()+"-"+(a.getMonth()+1)+"-"+a.getFullYear());return a},V=function(e,t=2){if(0===e)return"0 Bytes";const i=1024,s=t<0?0:t,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],n=Math.floor(Math.log(e)/Math.log(i));return parseFloat((e/Math.pow(i,n)).toFixed(s))+" "+a[n]},R=function(e){let t=["","January","February","March","April","May","June","July","August","September","October","November","December"];return t[e]},O=function(e){e=Math.round(100*(e+Number.EPSILON))/100;let t=100*e%100;return t>90&&t<=99?Math.round(e):e},Q=function(e){return null===e?null:e.replace(/\n/g,"<br>")},B=function(e){return e?e.replace(/(href\s*=\s*["'])([^"']*)(["'])/gi,(e,t,i,s)=>{const a=i.replace(/%7B/gi,"{").replace(/%7D/gi,"}");return t+a+s}):e},G=function(e){if(!e)return e;const t=e.split(/(<\/?[a-zA-Z][^>]*>)/);let i=!1;return t.map(function(e){return e.startsWith("<")?(/^<a[\s>]/i.test(e)&&(i=!0),/^<\/a>/i.test(e)&&(i=!1),e):i?e:e.replace(/(https?:\/\/[^\s<]+)/g,function(e){e=e.replace(/[.,;:!?)]+$/,"");let t=e.replace(/\?.*$/,"");return'<a href="'+W(e)+'" target="_blank" rel="noopener noreferrer" style="cursor: pointer;">'+W(t)+"</a>"})}).join("")},W=function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML},j=function(e){if(!e||"string"!==typeof e)return null;let t=e.trim();if(""===t||"-"===t)return null;/^[a-z][a-z0-9+.-]*:/i.test(t)||(t="https://"+t);try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.href:null}catch(i){return null}},z=function(e){return e("HR_LOCAL")||e("FINANCIAL_LOCAL")||e("HR_TENANT")||e("FINANCIAL_TENANT")},q=function(e,t,i){if(!e)return e||"";const s=Array.isArray(t)?t:[],a=Array.isArray(i)?i:[];let n=e;const o=(e,t)=>{const i=e?' data-user-id="'+W(String(e))+'"':"";return'<span class="mention-link"'+i+">@"+W(t)+"</span>"},l=(e,t)=>
1{const i=e?' data-contact-id="'+W(String(e))+'"':"";return'<span class="mention-link"'+i+">@"+W(t)+"</span>"},r=[],d=e=>{const t="\0MENTION"+r.length+"\0";return r.push(e),t};return s.forEach(e=>{if(!e||void 0===e.id||null===e.id)return;const t=[e.firstName,e.lastName].filter(e=>"string"===typeof e&&e.length>0).join(" ")||("string"===typeof e.fullName?e.fullName:"");if(!t)return;const i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp("(?:@|@)"+i+"(?![\\p{L}\\p{N}])","giu");n=n.replace(s,()=>d(o(e.id,t)))}),a.forEach(e=>{if(!e||void 0===e.id||null===e.id)return;const t="string"===typeof e.name&&e.name.length>0?e.name:"";if(!t)return;const i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp("(?:@|@)"+i+"(?![\\p{L}\\p{N}])","giu");n=n.replace(s,()=>d(l(e.id,t)))}),n=n.replace(/(?:@|@)\[([^\]]+)\]\((\d+)\)/g,(e,t,i)=>d(o(i,t))),n=n.replace(/(?:@|@)(\p{Lu}\p{L}*\p{Ll}\p{L}*(?:-\p{L}+)*(?:\s\p{Lu}\p{L}*\p{Ll}\p{L}*(?:-\p{L}+)*)*)/gu,(e,t)=>{const i=s.find(e=>{const i=[e.firstName,e.lastName].filter(e=>"string"===typeof e&&e.length>0).join(" ");return i===t});return d(o(i?i.id:null,t))}),n=n.replace(/(?:@|@)([A-Z][a-z]+(?:[A-Z][a-z]+)+)/g,(e,t)=>{const i=s.find(e=>{const i=[e.firstName,e.lastName].filter(e=>"string"===typeof e&&e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join("");return i===t}),a=t.replace(/([A-Z])/g," $1").trim();return d(o(i?i.id:null,a))}),r.forEach((e,t)=>{n=n.replace("\0MENTION"+t+"\0",e)}),n},J=function(e,t,i){return e?Q(G(q(e,t,i))):""},H=function(e){if(!e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value},K=function(e,t){if(e.type?.isNotEligibleForFee)return!1;if(t&&e.type?.id===parseInt(t))return!1;if(Array.isArray(e.userRoles))for(const i of e.userRoles)if(!i.dateEnded&&i.role&&i.role.isUserType&&i.role.isNotEligibleForFee)return!1;return!0};function Y(e){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let i=!1;try{i=document.execCommand("copy")}catch(s){}return document.body.removeChild(t),i}const Z=function(e){navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).catch(()=>{Y(e)}):Y(e)},ee=async function(e){if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(t){return Y(e)}return Y(e)},te="https://go.orgo.space/d/",ie=function(e,t){const i=e=>String(e??"").replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"),s=window.location.origin+"/public/video-embed/"+e;return'<iframe src="'+s+'" width="560" height="315" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen title="'+i(t)+'"></iframe>'},se=function(e){const t=new Date;if(e.dateTimeEnd)return new Date(e.dateTimeEnd)<t;if(e.dateTimeBegin){const i=new Date(e.dateTimeBegin),s=new Date(i.getTime()+864e5);return s<t}return!1},ae=function(e){var t=/\S+@\S+\.\S+/;return t.test(e)},ne=function(e){return null===e||void 0===e?e:String(e).normalize("NFKD").replace(/[^\x20-\x7E]/g,"")},oe=function(e,t){const i=(e,i)=>le(e,t).localeCompare(le(i,t),void 0,{numeric:!0});if(t.settingFeatures.localCenter.hasParent){const t=[],s=new Set,a=[...e].sort(i),n=new Map;for(const e of a){const t=e.parent?e.parent.id:null;n.has(t)||n.set(t,[]),n.get(t).push(e)}const o=e=>{for(const i of n.get(e)||[])s.has(i.id)||(t.push(i),s.add(i.id),o(i.id))};for(const e of a)!0!==e.isParent||e.parent||s.has(e.id)||(t.push(e),s.add(e.id),o(e.id));for(const e of a)s.has(e.id)||(t.push(e),s.add(e.id));return t}return e.sort(i),e},le=function(e,t){let i="%name% - %town%";return void 0!==t.settingFeatures.localCenter.selectorNameFormat&&(i=t.settingFeatures.localCenter.selectorNameFormat),i.includes("%name%")&&(i=i.replace("%name%",e.name)),i.includes("%town%")&&e.town&&(e.town.name?i=i.replace("%town%",e.town.name):"string"===typeof e.town&&(i=i.replace("%town%",e.town))),i.includes("%county%")&&e.town&&e.town.county&&(i=i.replace("%county%",e.town.county.name)),i=i.replace("%town%",""),i=i.replace("%name%",""),i=i.replace("%county%",""),i}
1,re={base:{color:"#32325d",fontFamily:'"Helvetica Neue", Helvetica, sans-serif',fontSmoothing:"antialiased",fontSize:"16px","::placeholder":{color:"#aab7c4"}},invalid:{color:"#fa755a",iconColor:"#fa755a"}},de=function(e){if(!e)return null;if("object"===typeof e)return e.name||null;e=e.split("/");let t=parseInt(e[e.length-1]),i=be.find(e=>e.v===t);return i?i.n:null},ce=function(e){return e.meet?e.meet.includes("zoom.us")?"Zoom Online":e.meet.includes("meet.google")?"Google Meet Online":e.meet.includes("teams")?"Teams Online":"Online Meeting":null},ue=function(e,t){return e=new Date(e),t=new Date(t),e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()},me=function(e,t){return e.logo&&e.logo.includes("/demo?")?"https://picsum.photos/600/300?random="+e.id:e.logo&&e.logo.includes("demo__")?e.logo.replace("demo__",""):e.logo?e.logo.includes("https")?e.logo:s.ze+s.DJ+t+"/"+e.logo:null},pe=function(){return"accept"===localStorage.getItem("vue-cookie-accept-decline-myPanel1")},he={cs:"ÄeÅ¡tina",de:"Deutsch",el:"Îλληνικά",en:"English",es:"Español",et:"Eesti",fr:"Français",it:"Italiano",lt:"Lietuvių",pr:"Português",bg:"бÑлгаÑÑки",nl:"Dutch",ro:"RomânÄ",sk:"SlovenÄina",ua:"УкÑаÑнÑÑка"},ge=function(e,t,i=null){if(!i)return i;let s=i;const a=[["{organizationName}",e?.name||""],["{firstName}",t?.firstName||""],["{lastName}",t?.lastName||""]];for(const[n,o]of a){const e=n.replace(/[{}]/g,"\\$&");s=s.replace(new RegExp(e,"g"),o)}for(const[n,o]of a){const e="(?:<[^>]*>)*",t=n.split("").map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(e);s=s.replace(new RegExp(t,"g"),e=>{const t=(e.match(/<[^>]*>/g)||[]).join("");return t+o})}return s},fe=[{v:1,c:"AD",n:"Andorra",p:"376",s:"312 345",flag:"ð¦ð©"},{v:2,c:"AE",n:"United Arab Emirates",p:"971",s:"050 123 4567",flag:"ð¦ðª"},{v:3,c:"AF",n:"Afghanistan",p:"93",s:"070 123 4567",flag:"ð¦ð«"},{v:4,c:"AG",n:"Antigua and Barbuda",p:"1",s:"(268) 464-1234",flag:"ð¦ð¬"},{v:5,c:"AI",n:"Anguilla",p:"1",s:"(264) 235-1234",flag:"ð¦ð®"},{v:6,c:"AL",n:"Albania",p:"355",s:"067 212 3456",flag:"ð¦ð±"},{v:7,c:"AM",n:"Armenia",p:"374",s:"077 123456",flag:"ð¦ð²"},{v:8,c:"AN",n:"Netherlands Antilles",p:null,s:null,flag:"ð³ð±"},{v:9,c:"AO",n:"Angola",p:"244",s:"923 123 456",flag:"ð¦ð´"},{v:10,c:"AQ",n:"Antarctica",p:null,s:null,flag:"ð¦ð¶"},{v:11,c:"AR",n:"Argentina",p:"54",s:"011 15-2345-6789",flag:"ð¦ð·"},{v:12,c:"AS",n:"American Samoa",p:"1",s:"(684) 733-1234",flag:"ð¦ð¸"},{v:13,c:"AT",n:"Austria",p:"43",s:"0664 123456",flag:"ð¦ð¹"},{v:14,c:"AU",n:"Australia",p:"61",s:"0412 345 678",flag:"ð¦ðº"},{v:15,c:"AW",n:"Aruba",p:"297",s:"560 1234",flag:"ð¦ð¼"},{v:16,c:"AX",n:"Ã
land Islands",p:"358",s:"041 2345678",flag:"ð¦ð½"},{v:17,c:"AZ",n:"Azerbaijan",p:"994",s:"040 123 45 67",flag:"ð¦ð¿"},{v:18,c:"BA",n:"Bosnia and Herzegovina",p:"387",s:"061 123 456",flag:"ð§ð¦"},{v:19,c:"BB",n:"Barbados",p:"1",s:"(246) 250-1234",flag:"ð§ð§"},{v:20,c:"BD",n:"Bangladesh",p:"880",s:"01812-345678",flag:"ð§ð©"},{v:21,c:"BE",n:"Belgium",p:"32",s:"0470 12 34 56",flag:"ð§ðª"},{v:22,c:"BF",n:"Burkina Faso",p:"226",s:"70 12 34 56",flag:"ð§ð«"},{v:23,c:"BG",n:"Bulgaria",p:"359",s:"043 012 345",flag:"ð§ð¬"},{v:24,c:"BH",n:"Bahrain",p:"973",s:"3600 1234",flag:"ð§ð"},{v:25,c:"BI",n:"Burundi",p:"257",s:"79 56 12 34",flag:"ð§ð®"},{v:26,c:"BJ",n:"Benin",p:"229",s:"90 01 12 34",flag:"ð§ð¯"},{v:27,c:"BL",n:"Saint Barthélemy",p:"590",s:"0690 00 12 34",flag:"ð§ð±"},{v:28,c:"BM",n:"Bermuda",p:"1",s:"(441) 370-1234",flag:"ð§ð²"},{v:29,c:"BN",n:"Brunei",p:"673",s:"712 3456",flag:"ð§ð³"},{v:30,c:"BO",n:"Bolivia",p:"591",s:"71234567",flag:"ð§ð´"},{v:31,c:"BR",n:"Brazil",p:"55",s:"(11) 96123-4567",flag:"ð§ð·"},{v:32,c:"BS",n:"Bahamas",p:"1",s:"(242) 359-1234",flag:"ð§ð¸"},{v:33,c:"BT",n:"Bhutan",p:"975",s:"17 12 34 56",flag:"ð§ð¹"},{v:34,c:"BV",n:"Bouvet Island",p:null,s:null,flag:"ð³ð´"},{v:35,c:"BW",n:"Botswana",p:"267",s:"71 123 456",flag:"ð§ð¼"},{v:36,c:"BY",n:"Belarus",p:"375",s:"8 029 491-19-11",flag:"ð§ð¾"}
1,{v:37,c:"BZ",n:"Belize",p:"501",s:"622-1234",flag:"ð§ð¿"},{v:38,c:"CA",n:"Canada",p:"1",s:"(506) 234-5678",flag:"ð¨ð¦"},{v:39,c:"CC",n:"Cocos [Keeling] Islands",p:"61",s:"0412 345 678",flag:"ð¨ð¨"},{v:40,c:"CD",n:"Congo [DRC]",p:"243",s:"0991 234 567",flag:"ð¨ð©"},{v:41,c:"CF",n:"Central African Republic",p:"236",s:"70 01 23 45",flag:"ð¨ð«"},{v:42,c:"CG",n:"Congo [Republic] Brazzaville",p:"242",s:"06 123 4567",flag:"ð¨ð¬"},{v:43,c:"CH",n:"Switzerland",p:"41",s:"078 123 45 67",flag:"ð¨ð"},{v:44,c:"CI",n:"Côte d'Ivoire",p:"225",s:"01 23 45 6789",flag:"ð¨ð®"},{v:45,c:"CK",n:"Cook Islands",p:"682",s:"71 234",flag:"ð¨ð°"},{v:46,c:"CL",n:"Chile",p:"56",s:"(2) 2123 4567",flag:"ð¨ð±"},{v:47,c:"CM",n:"Cameroon",p:"237",s:"6 71 23 45 67",flag:"ð¨ð²"},{v:48,c:"CN",n:"China",p:"86",s:"131 2345 6789",flag:"ð¨ð³"},{v:49,c:"CO",n:"Colombia",p:"57",s:"321 1234567",flag:"ð¨ð´"},{v:50,c:"CR",n:"Costa Rica",p:"506",s:"8312 3456",flag:"ð¨ð·"},{v:51,c:"CU",n:"Cuba",p:"53",s:"05 1234567",flag:"ð¨ðº"},{v:52,c:"CV",n:"Cape Verde",p:"238",s:"991 12 34",flag:"ð¨ð»"},{v:53,c:"CX",n:"Christmas Island",p:"61",s:"0412 345 678",flag:"ð¨ð½"},{v:54,c:"CY",n:"Cyprus",p:"357",s:"96 123456",flag:"ð¨ð¾"},{v:55,c:"CZ",n:"Czech Republic",p:"420",s:"601 123 456",flag:"ð¨ð¿"},{v:56,c:"DE",n:"Germany",p:"49",s:"01512 3456789",flag:"ð©ðª"},{v:57,c:"DJ",n:"Djibouti",p:"253",s:"77 83 10 01",flag:"ð©ð¯"},{v:58,c:"DK",n:"Denmark",p:"45",s:"32 12 34 56",flag:"ð©ð°"},{v:59,c:"DM",n:"Dominica",p:"1",s:"(767) 225-1234",flag:"ð©ð²"},{v:60,c:"DO",n:"Dominican Republic",p:"1",s:"(809) 234-5678",flag:"ð©ð´"},{v:61,c:"DZ",n:"Algeria",p:"213",s:"0551 23 45 67",flag:"ð©ð¿"},{v:62,c:"EC",n:"Ecuador",p:"593",s:"099 123 4567",flag:"ðªð¨"},{v:63,c:"EE",n:"Estonia",p:"372",s:"5123 4567",flag:"ðªðª"},{v:64,c:"EG",n:"Egypt",p:"20",s:"0100 123 4567",flag:"ðªð¬"},{v:65,c:"EH",n:"Western Sahara",p:"212",s:"0650-123456",flag:"ðªð"},{v:66,c:"ER",n:"Eritrea",p:"291",s:"07 123 456",flag:"ðªð·"},{v:67,c:"ES",n:"Spain",p:"34",s:"612 34 56 78",flag:"ðªð¸"},{v:68,c:"ET",n:"Ethiopia",p:"251",s:"091 123 4567",flag:"ðªð¹"},{v:69,c:"FI",n:"Finland",p:"358",s:"041 2345678",flag:"ð«ð®"},{v:70,c:"FJ",n:"Fiji",p:"679",s:"701 2345",flag:"ð«ð¯"},{v:71,c:"FK",n:"Falkland Islands",p:"500",s:"51234",flag:"ð«ð°"},{v:72,c:"FM",n:"Micronesia",p:"691",s:"350 1234",flag:"ð«ð²"},{v:73,c:"FO",n:"Faroe Islands",p:"298",s:"211234",flag:"ð«ð´"},{v:74,c:"FR",n:"France",p:"33",s:"06 12 34 56 78",flag:"ð«ð·"},{v:75,c:"GA",n:"Gabon",p:"241",s:"06 03 12 34",flag:"ð¬ð¦"},{v:76,c:"GB",n:"United Kingdom",p:"44",s:"07400 123456",flag:"ð¬ð§"},{v:77,c:"GD",n:"Grenada",p:"1",s:"(473) 403-1234",flag:"ð¬ð©"},{v:78,c:"GE",n:"Georgia",p:"995",s:"555 12 34 56",flag:"ð¬ðª"},{v:79,c:"GF",n:"French Guiana",p:"594",s:"0694 20 12 34",flag:"ð¬ð«"},{v:80,c:"GG",n:"Guernsey",p:"44",s:"07781 123456",flag:"ð¬ð¬"},{v:81,c:"GH",n:"Ghana",p:"233",s:"023 123 4567",flag:"ð¬ð"},{v:82,c:"GI",n:"Gibraltar",p:"350",s:"57123456",flag:"ð¬ð®"},{v:83,c:"GL",n:"Greenland",p:"299",s:"22 12 34",flag:"ð¬ð±"},{v:84,c:"GM",n:"Gambia",p:"220",s:"301 2345",flag:"ð¬ð²"},{v:85,c:"GN",n:"Guinea",p:"224",s:"601 12 34 56",flag:"ð¬ð³"},{v:86,c:"GP",n:"Guadeloupe",p:"590",s:"0690 00 12 34",flag:"ð¬ðµ"},{v:87,c:"GQ",n:"Equatorial Guinea",p:"240",s:"222 123 456",flag:"ð¬ð¶"},{v:88,c:"GR",n:"Greece",p:"30",s:"691 234 5678",flag:"ð¬ð·"},{v:89,c:"GS",n:"South Georgia and the South Sandwich Islands",p:null,s:null,flag:"ð¬ð¸"},{v:90,c:"GT",n:"Guatemala",p:"502",s:"5123 4567",flag:"ð¬ð¹"},{v:91,c:"GU",n:"Guam",p:"1",s:"(671) 300-1234",flag:"ð¬ðº"},{v:92,c:"GW",n:"Guinea-Bissau",p:"245",s:"955 012 345",flag:"ð¬ð¼"},{v:93,c:"GY",n:"Guyana",p:"592",s:"609 1234",flag:"ð¬ð¾"},{v:94,c:"HK",n:"Hong Kong SAR China",p:"852",s:"5123 4567",flag:"ðð°"},{v:95,c:"HM",n:"Heard Island and McDonald Islands",p:null,s:null,flag:"ð¦ðº"},{v:96,c:"HN",n:"Honduras",p:"504",s:"9123-4567",flag:"ðð³"},{v:97,c:"HR",n:"Croatia",p:"385",s:"092 123 4567",flag:"ðð·"},{v:98,c:"HT",n:"Haiti",p:"509",s:"34 10 1234",flag:"ðð¹"},{v:99,c:"HU",n:"Hungary",p:"36",s:"06 20 123 4567",flag:"ððº"},{v:100,c:"ID",n:"Indonesia",p:"62",s:"0812-345-678",flag:"ð®ð©"},{v:101,c:"IE",n:"Ireland",p:"353",s:"085 012 3456",flag:"ð®ðª"},{v:102,c:"IL",n:"Israel",p:"972",s:"050-123-4567",flag:"ð®ð±"},{v:103,c:"IM",n:"Isle of Man",p:"44",s:"07924 123456",flag:"ð®ð²"},{v:104,c:"IN",n:"India",p:"91",s:"099876 54321",flag:"ð®ð³"},{v:105,c:"IO",n:"British Indian Ocean Territory",p:"246",s:"380 1234",flag:"ð®ð´"},{v:106,c:"IQ",n:"Iraq",p:"964",s:"0791 234 5678",flag:"ð®ð¶"},{v:107,c:"IR",n:"Iran",p:"98",s:"0912 345 6789",flag:"ð®ð·"},{v:108,c:"IS",n:"Iceland",p:"354",s:"611 1234",flag:"ð®ð¸"},{v:109,c:"IT",n:"Italy",p:"39",s:"312 345 6789",flag:"ð®ð¹"},{v:110,c:"JE",n:"Jersey",p:"44",s:"07797 123456",flag:"ð¯ðª"},{v:111,c:"JM",n:"Jamaica",p:"1",s:"(876) 210-1234",flag:"ð¯ð²"},{v:112,c:"JO",n:"Jordan",p:"962",s:"079 123 4567",flag:"ð¯ð´"},{v:113,c:"JP",n:"Japan",p:"81",s:"090-1234-5678",flag:"ð¯ðµ"},{v:114,c:"KE",n:"Kenya",p:"254",s:"0712 123456",flag:"ð°ðª"}
1,{v:115,c:"KG",n:"Kyrgyzstan",p:"996",s:"0700 123 456",flag:"ð°ð¬"},{v:116,c:"KH",n:"Cambodia",p:"855",s:"091 234 567",flag:"ð°ð"},{v:117,c:"KI",n:"Kiribati",p:"686",s:"72012345",flag:"ð°ð®"},{v:118,c:"KM",n:"Comoros",p:"269",s:"321 23 45",flag:"ð°ð²"},{v:119,c:"KN",n:"Saint Kitts and Nevis",p:"1",s:"(869) 765-2917",flag:"ð°ð³"},{v:120,c:"KP",n:"North Korea",p:"850",s:"(0)192 123 4567",flag:"ð°ðµ"},{v:121,c:"KR",n:"South Korea",p:"82",s:"010-1234-5678",flag:"ð°ð·"},{v:122,c:"KW",n:"Kuwait",p:"965",s:"500 12345",flag:"ð°ð¼"},{v:123,c:"KY",n:"Cayman Islands",p:"1",s:"(345) 323-1234",flag:"ð°ð¾"},{v:124,c:"KZ",n:"Kazakhstan",p:"7",s:"(701) 123-4567",flag:"ð°ð¿"},{v:125,c:"LA",n:"Laos",p:"856",s:"020 23 123 456",flag:"ð±ð¦"},{v:126,c:"LB",n:"Lebanon",p:"961",s:"71 123 456",flag:"ð±ð§"},{v:127,c:"LC",n:"Saint Lucia",p:"1",s:"(758) 284-5678",flag:"ð±ð¨"},{v:128,c:"LI",n:"Liechtenstein",p:"423",s:"660 234 567",flag:"ð±ð®"},{v:129,c:"LK",n:"Sri Lanka",p:"94",s:"071 234 5678",flag:"ð±ð°"},{v:130,c:"LR",n:"Liberia",p:"231",s:"077 012 3456",flag:"ð±ð·"},{v:131,c:"LS",n:"Lesotho",p:"266",s:"5012 3456",flag:"ð±ð¸"},{v:132,c:"LT",n:"Lithuania",p:"370",s:"612 34567",flag:"ð±ð¹"},{v:133,c:"LU",n:"Luxembourg",p:"352",s:"628 123 456",flag:"ð±ðº"},{v:134,c:"LV",n:"Latvia",p:"371",s:"21 234 567",flag:"ð±ð»"},{v:135,c:"LY",n:"Libya",p:"218",s:"091-2345678",flag:"ð±ð¾"},{v:136,c:"MA",n:"Morocco",p:"212",s:"0650-123456",flag:"ð²ð¦"},{v:137,c:"MC",n:"Monaco",p:"377",s:"06 12 34 56 78",flag:"ð²ð¨"},{v:138,c:"MD",n:"Moldova",p:"373",s:"0621 12 345",flag:"ð²ð©"},{v:139,c:"ME",n:"Montenegro",p:"382",s:"067 622 901",flag:"ð²ðª"},{v:140,c:"MF",n:"Saint Martin",p:"590",s:"0690 00 12 34",flag:"ð²ð«"},{v:141,c:"MG",n:"Madagascar",p:"261",s:"032 12 345 67",flag:"ð²ð¬"},{v:142,c:"MH",n:"Marshall Islands",p:"692",s:"235-1234",flag:"ð²ð"},{v:143,c:"MK",n:"Macedonia",p:"389",s:"072 345 678",flag:"ð²ð°"},{v:144,c:"ML",n:"Mali",p:"223",s:"65 01 23 45",flag:"ð²ð±"},{v:145,c:"MM",n:"Burma - Myanmar",p:"95",s:"09 212 3456",flag:"ð²ð²"},{v:146,c:"MN",n:"Mongolia",p:"976",s:"8812 3456",flag:"ð²ð³"},{v:147,c:"MO",n:"Macau SAR China",p:"853",s:"6612 3456",flag:"ð²ð´"},{v:148,c:"MP",n:"Northern Mariana Islands",p:"1",s:"(670) 234-5678",flag:"ð²ðµ"},{v:149,c:"MQ",n:"Martinique",p:"596",s:"0696 20 12 34",flag:"ð²ð¶"},{v:150,c:"MR",n:"Mauritania",p:"222",s:"22 12 34 56",flag:"ð²ð·"},{v:151,c:"MS",n:"Montserrat",p:"1",s:"(664) 492-3456",flag:"ð²ð¸"},{v:152,c:"MT",n:"Malta",p:"356",s:"9696 1234",flag:"ð²ð¹"},{v:153,c:"MU",n:"Mauritius",p:"230",s:"5251 2345",flag:"ð²ðº"},{v:154,c:"MV",n:"Maldives",p:"960",s:"771-2345",flag:"ð²ð»"},{v:155,c:"MW",n:"Malawi",p:"265",s:"0991 23 45 67",flag:"ð²ð¼"},{v:156,c:"MX",n:"Mexico",p:"52",s:"222 123 4567",flag:"ð²ð½"},{v:157,c:"MY",n:"Malaysia",p:"60",s:"012-345 6789",flag:"ð²ð¾"},{v:158,c:"MZ",n:"Mozambique",p:"258",s:"82 123 4567",flag:"ð²ð¿"},{v:159,c:"NA",n:"Namibia",p:"264",s:"081 123 4567",flag:"ð³ð¦"},{v:160,c:"NC",n:"New Caledonia",p:"687",s:"75.12.34",flag:"ð³ð¨"},{v:161,c:"NE",n:"Niger",p:"227",s:"93 12 34 56",flag:"ð³ðª"},{v:162,c:"NF",n:"Norfolk Island",p:"672",s:"3 81 234",flag:"ð³ð«"},{v:163,c:"NG",n:"Nigeria",p:"234",s:"0802 123 4567",flag:"ð³ð¬"},{v:164,c:"NI",n:"Nicaragua",p:"505",s:"8123 4567",flag:"ð³ð®"},{v:165,c:"NL",n:"Netherlands",p:"31",s:"06 12345678",flag:"ð³ð±"},{v:166,c:"NO",n:"Norway",p:"47",s:"406 12 345",flag:"ð³ð´"},{v:167,c:"NP",n:"Nepal",p:"977",s:"984-1234567",flag:"ð³ðµ"},{v:168,c:"NR",n:"Nauru",p:"674",s:"555 1234",flag:"ð³ð·"},{v:169,c:"NU",n:"Niue",p:"683",s:"7012",flag:"ð³ðº"},{v:170,c:"NZ",n:"New Zealand",p:"64",s:"021 123 4567",flag:"ð³ð¿"},{v:171,c:"OM",n:"Oman",p:"968",s:"9212 3456",flag:"ð´ð²"},{v:172,c:"PA",n:"Panama",p:"507",s:"6123-4567",flag:"ðµð¦"},{v:173,c:"PE",n:"Peru",p:"51",s:"912 345 678",flag:"ðµðª"},{v:174,c:"PF",n:"French Polynesia",p:"689",s:"87 12 34 56",flag:"ðµð«"},{v:175,c:"PG",n:"Papua New Guinea",p:"675",s:"7012 3456",flag:"ðµð¬"},{v:176,c:"PH",n:"Philippines",p:"63",s:"0905 123 4567",flag:"ðµð"},{v:177,c:"PK",n:"Pakistan",p:"92",s:"0301 2345678",flag:"ðµð°"},{v:178,c:"PL",n:"Poland",p:"48",s:"512 345 678",flag:"ðµð±"},{v:179,c:"PM",n:"Saint Pierre and Miquelon",p:"508",s:"055 12 34",flag:"ðµð²"},{v:180,c:"PN",n:"Pitcairn Islands",p:"870",s:null,flag:"ðµð³"},{v:181,c:"PR",n:"Puerto Rico",p:"1",s:"(787) 234-5678",flag:"ðµð·"},{v:182,c:"PS",n:"Palestinian Territories",p:"970",s:"0599 123 456",flag:"ðµð¸"},{v:183,c:"PT",n:"Portugal",p:"351",s:"912 345 678",flag:"ðµð¹"},{v:184,c:"PW",n:"Palau",p:"680",s:"620 1234",flag:"ðµð¼"},{v:185,c:"PY",n:"Paraguay",p:"595",s:"0961 456789",flag:"ðµð¾"},{v:186,c:"QA",n:"Qatar",p:"974",s:"3312 3456",flag:"ð¶ð¦"},{v:187,c:"RE",n:"Réunion",p:"262",s:"0692 12 34 56",flag:"ð·ðª"},{v:188,c:"RO",n:"Romania",p:"40",s:"0712 034 567",flag:"ð·ð´"},{v:189,c:"RS",n:"Serbia",p:"381",s:"060 1234567",flag:"ð·ð¸"}
1,{v:190,c:"RU",n:"Russia",p:"7",s:"8 (912) 123-45-67",flag:"ð·ðº"},{v:191,c:"RW",n:"Rwanda",p:"250",s:"0720 123 456",flag:"ð·ð¼"},{v:192,c:"SA",n:"Saudi Arabia",p:"966",s:"055 123 4567",flag:"ð¸ð¦"},{v:193,c:"SB",n:"Solomon Islands",p:"677",s:"74 21234",flag:"ð¸ð§"},{v:194,c:"SC",n:"Seychelles",p:"248",s:"2 510 123",flag:"ð¸ð¨"},{v:195,c:"SD",n:"Sudan",p:"249",s:"091 123 1234",flag:"ð¸ð©"},{v:196,c:"SE",n:"Sweden",p:"46",s:"070-123 45 67",flag:"ð¸ðª"},{v:197,c:"SG",n:"Singapore",p:"65",s:"8123 4567",flag:"ð¸ð¬"},{v:198,c:"SH",n:"Saint Helena",p:"290",s:"51234",flag:"ð¸ð"},{v:199,c:"SI",n:"Slovenia",p:"386",s:"031 234 567",flag:"ð¸ð®"},{v:200,c:"SJ",n:"Svalbard and Jan Mayen",p:"47",s:"412 34 567",flag:"ð¸ð¯"},{v:201,c:"SK",n:"Slovakia",p:"421",s:"0912 123 456",flag:"ð¸ð°"},{v:202,c:"SL",n:"Sierra Leone",p:"232",s:"(025) 123456",flag:"ð¸ð±"},{v:203,c:"SM",n:"San Marino",p:"378",s:"66 66 12 12",flag:"ð¸ð²"},{v:204,c:"SN",n:"Senegal",p:"221",s:"70 123 45 67",flag:"ð¸ð³"},{v:205,c:"SO",n:"Somalia",p:"252",s:"7 1123456",flag:"ð¸ð´"},{v:206,c:"SR",n:"Suriname",p:"597",s:"741-2345",flag:"ð¸ð·"},{v:207,c:"ST",n:"São Tomé and PrÃncipe",p:"239",s:"981 2345",flag:"ð¸ð¹"},{v:208,c:"SV",n:"El Salvador",p:"503",s:"7012 3456",flag:"ð¸ð»"},{v:209,c:"SY",n:"Syria",p:"963",s:"0944 567 890",flag:"ð¸ð¾"},{v:210,c:"SZ",n:"Swaziland",p:"268",s:"7612 3456",flag:"ð¸ð¿"},{v:211,c:"TC",n:"Turks and Caicos Islands",p:"1",s:"(649) 231-1234",flag:"ð¹ð¨"},{v:212,c:"TD",n:"Chad",p:"235",s:"63 01 23 45",flag:"ð¹ð©"},{v:213,c:"TF",n:"French Southern Territories",p:null,s:null,flag:"ð¹ð«"},{v:214,c:"TG",n:"Togo",p:"228",s:"90 11 23 45",flag:"ð¹ð¬"},{v:215,c:"TH",n:"Thailand",p:"66",s:"08 1234 5678",flag:"ð¹ð"},{v:216,c:"TJ",n:"Tajikistan",p:"992",s:"(8) 917 12 3456",flag:"ð¹ð¯"},{v:217,c:"TK",n:"Tokelau",p:"690",s:"5 1234",flag:"ð¹ð°"},{v:218,c:"TL",n:"Timor-Leste",p:"670",s:"7723 4567",flag:"ð¹ð±"},{v:219,c:"TM",n:"Turkmenistan",p:"993",s:"8 66 123456",flag:"ð¹ð²"},{v:220,c:"TN",n:"Tunisia",p:"216",s:"20 123 456",flag:"ð¹ð³"},{v:221,c:"TO",n:"Tonga",p:"676",s:"771 5123",flag:"ð¹ð´"},{v:222,c:"TR",n:"Turkey",p:"90",s:"0501 234 56 78",flag:"ð¹ð·"},{v:223,c:"TT",n:"Trinidad and Tobago",p:"1",s:"(868) 291-1234",flag:"ð¹ð¹"},{v:224,c:"TV",n:"Tuvalu",p:"688",s:"901234",flag:"ð¹ð»"},{v:225,c:"TW",n:"Taiwan",p:"886",s:"0912 345 678",flag:"ð¹ð¼"},{v:226,c:"TZ",n:"Tanzania",p:"255",s:"0621 234 567",flag:"ð¹ð¿"},{v:227,c:"UA",n:"Ukraine",p:"380",s:"039 123 4567",flag:"ðºð¦"},{v:228,c:"UG",n:"Uganda",p:"256",s:"0712 345678",flag:"ðºð¬"},{v:229,c:"UM",n:"U.S. Minor Outlying Islands",p:"1",s:null,flag:"ðºð²"},{v:230,c:"US",n:"United States",p:"1",s:"(201) 555-0123",flag:"ðºð¸"},{v:231,c:"UY",n:"Uruguay",p:"598",s:"094 231 234",flag:"ðºð¾"},{v:232,c:"UZ",n:"Uzbekistan",p:"998",s:"8 91 234 56 78",flag:"ðºð¿"},{v:233,c:"VA",n:"Vatican City",p:"39",s:"312 345 6789",flag:"ð»ð¦"},{v:234,c:"VC",n:"Saint Vincent and the Grenadines",p:"1",s:"(784) 430-1234",flag:"ð»ð¨"},{v:235,c:"VE",n:"Venezuela",p:"58",s:"0412-1234567",flag:"ð»ðª"},{v:236,c:"VG",n:"British Virgin Islands",p:"1",s:"(284) 300-1234",flag:"ð»ð¬"},{v:237,c:"VI",n:"U.S. Virgin Islands",p:"1",s:"(340) 642-1234",flag:"ð»ð®"},{v:238,c:"VN",n:"Vietnam",p:"84",s:"091 234 56 78",flag:"ð»ð³"},{v:239,c:"VU",n:"Vanuatu",p:"678",s:"591 2345",flag:"ð»ðº"},{v:240,c:"WF",n:"Wallis and Futuna",p:"681",s:"50 12 34",flag:"ð¼ð«"},{v:241,c:"WS",n:"Samoa",p:"685",s:"72 12345",flag:"ð¼ð¸"},{v:242,c:"YE",n:"Yemen",p:"967",s:"0712 345 678",flag:"ð¾ðª"},{v:243,c:"YT",n:"Mayotte",p:"262",s:"0639 12 34 56",flag:"ð¾ð¹"},{v:244,c:"ZA",n:"South Africa",p:"27",s:"071 123 4567",flag:"ð¿ð¦"},{v:245,c:"ZM",n:"Zambia",p:"260",s:"095 5123456",flag:"ð¿ð²"},{v:246,c:"ZW",n:"Zimbabwe",p:"263",s:"071 234 5678",flag:"ð¿ð¼"},{v:248,c:"XK",n:"Kosovo",p:"383",s:"043 123 456",flag:"ð½ð°"},{v:249,c:"SS",n:"South Sudan",p:"211",s:"(0)977 123 456",flag:"ð¸ð¸"}];fe.sort((e,t)=>
1e.n.localeCompare(t.n));const be=fe,ye=[{v:"AL",n:"Alabama"},{v:"AK",n:"Alaska"},{v:"AZ",n:"Arizona"},{v:"AR",n:"Arkansas"},{v:"CA",n:"California"},{v:"CO",n:"Colorado"},{v:"CT",n:"Connecticut"},{v:"DE",n:"Delaware"},{v:"DC",n:"District of Columbia"},{v:"FL",n:"Florida"},{v:"GA",n:"Georgia"},{v:"HI",n:"Hawaii"},{v:"ID",n:"Idaho"},{v:"IL",n:"Illinois"},{v:"IN",n:"Indiana"},{v:"IA",n:"Iowa"},{v:"KS",n:"Kansas"},{v:"KY",n:"Kentucky"},{v:"LA",n:"Louisiana"},{v:"ME",n:"Maine"},{v:"MD",n:"Maryland"},{v:"MA",n:"Massachusetts"},{v:"MI",n:"Michigan"},{v:"MN",n:"Minnesota"},{v:"MS",n:"Mississippi"},{v:"MO",n:"Missouri"},{v:"MT",n:"Montana"},{v:"NE",n:"Nebraska"},{v:"NV",n:"Nevada"},{v:"NH",n:"New Hampshire"},{v:"NJ",n:"New Jersey"},{v:"NM",n:"New Mexico"},{v:"NY",n:"New York"},{v:"NC",n:"North Carolina"},{v:"ND",n:"North Dakota"},{v:"OH",n:"Ohio"},{v:"OK",n:"Oklahoma"},{v:"OR",n:"Oregon"},{v:"PA",n:"Pennsylvania"},{v:"RI",n:"Rhode Island"},{v:"SC",n:"South Carolina"},{v:"SD",n:"South Dakota"},{v:"TN",n:"Tennessee"},{v:"TX",n:"Texas"},{v:"UT",n:"Utah"},{v:"VT",n:"Vermont"},{v:"VA",n:"Virginia"},{v:"WA",n:"Washington"},{v:"WV",n:"West Virginia"},{v:"WI",n:"Wisconsin"},{v:"WY",n:"Wyoming"}],ve=function(e){const t=String(e).split("||").map(e=>e.trim()).filter(Boolean);return 0!==t.length&&t.some(e=>{const t=e.split("&&").map(e=>e.trim()).filter(Boolean);return 0!==t.length&&t.every(e=>this.evaluateFeaturePart(e))})},ke=function(e,t,i){if(null==e)return i;const s=String(t).replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let a=e;for(const n of s){if(null==a)return i;a=a[n]}return void 0===a?i:a},Ce=function(e){if(!e)return;if(e=e.trim(),e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.slice(1,-1);if(!isNaN(e)&&!isNaN(parseFloat(e)))return parseFloat(e);if("true"===e)return!0;if("false"===e)return!1;if("null"===e)return null;if("undefined"===e)return;if(!e.includes(".")&&Object.prototype.hasOwnProperty.call(this,e)){if("function"===typeof this[e]){const t=new Set(["isGrantedAdhesion","userTypeEligibleForFee"]);return t.has(e)?this[e](this.user):this[e]()}if(e in this)return this[e]}if(e.startsWith("user."))return this.get(this.user,e.slice(5),void 0);if(e.startsWith("tenant."))return this.get(this.tenant,e.slice(7),void 0);const t=this?.tenant?.settingFeatures||{};return e.includes(".")?this.get(t,e,void 0):t[e]},Le=function(e){const t=new Set(["isGrantedAdhesion","userTypeEligibleForFee"]);let i=String(e).trim(),s=!1;i.startsWith("!")&&(s=!0,i=i.slice(1).trim());const a=["===","!==",">=","<=",">","<","==","!="];for(const l of a)if(i.includes(l)){const[e,t]=i.split(l).map(e=>e.trim()),a=this.resolveValue(e),n=this.resolveValue(t);let o;switch(l){case"===":o=a===n;break;case"!==":o=a!==n;break;case"==":o=a==n;break;case"!=":o=a!=n;break;case">":o=a>n;break;case"<":o=a<n;break;case">=":o=a>=n;break;case"<=":o=a<=n;break;default:o=!1}return s?!o:o}if(!i.includes(".")&&Object.prototype.hasOwnProperty.call(this,i)){if("function"===typeof this[i]){const e=t.has(i)?this[i](this.user):this[i]();return s?!e:!!e}if(i in this){const e=this[i];return s?!e:!!e}}if(i.startsWith("user.")){const e=this.get(this.user,i.slice(5),void 0);return s?!e:!!e}if(i.startsWith("tenant.")){const e=this.get(this.tenant,i.slice(7),void 0);return s?!e:!!e}const n=this?.tenant?.settingFeatures||null;if(!n)return s;const o=i.includes(".")?this.get(n,i,void 0):n[i];return s?!o:!!o},we=function(e={}){const t={circles:10,circleColorVar:"--circle-color",minSize:5,maxSize:20,minThickness:.1,maxThickness:10,feather:.1,thicknessMultiplier:1.3},i={...t,...e},s=25,a=1;let n=parseInt(i.circles,10)||10;n=Math.min(Math.max(n,a),s),"undefined"!==typeof window&&window.innerWidth<768&&(n=Math.max(1,Math.floor(n/2)));const o=Number(i.minSize)||15,l=Number(i.maxSize)||35,r=Number(i.minThickness)||1,d=Number(i.maxThickness)||3,c=Number(i.feather)||.1,u=(e=0,t=100,i=1)=>(Math.random()*(t-e)+e).toFixed(i)+"%",m=(e,t,i=2)=>Number((Math.random()*(t-e)+e).toFixed(i)),p=[],h=Number(i.thicknessMultiplier)||1.5;let g=r;for(let f=0;f<n;f++){const e=u(50,100,1),t=u(0,100,1),s=m(o,l,1);let a=Math.max(r,Math.min(d,g));g*=h;const n=Math.max(0,s-a/2),f=Math.min(100,s+a/2),b=Math.max(0,n-c),y=Math.max(0,f+c),v=`radial-gradient(circle at ${e} ${t}, transparent 0%, transparent ${b}%, var(${i.circleColorVar}) ${Math.max(0,n)}%, var(${i.circleColorVar}) ${Math.max(0,f)}%, transparent ${y}%)`;p.push(v)}return{background:p.join(",\n")}},_e=async function(e,t,i){const s=t.map(async t=>{const{fieldName:s,refName:a}=t,n=e.$refs[a];if(i[s]&&n)try{const e=await n.uploadPendingImages();i[s]=e}catch(o){throw console.error(`Error uploading images for ${s}:`,o),o}});await Promise.all(s)},Ee=function(e,t,i){if(!e)return"";if(!e.tenant||null===e.tenant)return e.translation&&e.translation[i]?e.translation[i]:e.translation&&e.translation["en"]?e.translation["en"]:e.name?t(e.name):"";const s=e.translation;return s&&s[i]?s[i]:e.name||""},$e=function(e,t=!1){if(!e)return"";if(e.startsWith("#"))return e;const i=t?"800":"200";return`var(--${e}-${i})`},Fe=function(e,t=!1){return e?e.startsWith("#")?{backgroundColor:e}:{backgroundColor:`var(--${e}-${t?"800":"200"})`,color:`var(--${e}-${t?"200":"800"})`,borderColor:`var(--${e}-${t?"700":"300"})`}:{}},Te=function(e){return!!e&&/[^\x00-\x7F]/.test(e)},Se=function(e){if("boolean"===typeof e)return e;if(null===e||void 0===e)return!0;
1if("number"===typeof e)return e>0;const t=String(e).replace(/^"|"$/g,"").replace(/\\"/g,"");return"instant"===t||"daily"===t||"weekly"===t||"true"===t},Ae=function(e){if(!1===e||0===e)return 0;if("number"===typeof e)return e;if(null===e||void 0===e)return 1;const t=String(e).replace(/^"|"$/g,"").replace(/\\"/g,"");return"false"===t||"0"===t?0:"instant"===t||"1"===t?1:"daily"===t||"2"===t?2:"weekly"===t||"3"===t?3:1},Pe=function(e){return 0!==e&&(1===e?"instant":2===e?"daily":3===e?"weekly":"instant")},Ie=function(e,t){return e?null!=e.placeLatitude&&null!=e.placeLongitude?e.timezone:t?.timezone||e.timezone||null:null},Me=function(e,t,i){return!!e?.timezone&&(null!=e.placeLatitude&&null!=e.placeLongitude&&(i===e.timezone&&(!t?.timezone||t.timezone!==e.timezone)))},xe=function(e){if(!e)return null;if("object"===typeof e){if(e.id)return e.id;if(e["@id"]){const t=e["@id"].match(/\/(\d+)$/);if(t)return parseInt(t[1])}return null}if("string"===typeof e){const t=e.match(/\/(\d+)$/);if(t)return parseInt(t[1])}return null},Ne=function(e){e.scrollWheelZoom.disable(),e.on("click dragstart",()=>e.scrollWheelZoom.enable()),e.on("mouseout",()=>e.scrollWheelZoom.disable())},Ue=function(e){return e?n()(e).format("YYYY-MM-DD"):null},De=function(e){if(!e)return null;const t=n()(e);return t.isValid()?t.toISOString():null},Xe=function(e){return e?n()(String(e).substring(0,10),"YYYY-MM-DD").toDate():null},Ve=function(e,t=!1){return e?n()(e).format((0,o.Wq)("monthDayYear",t)):""},Re=function(e){if(!e)return null;const t=n()(e,["MMMM Do YYYY","MMMM D, YYYY","MMMM D YYYY","M/D/YYYY","D/M/YYYY","YYYY-MM-DD"],!0);return t.isValid()?t.toDate():null},Oe=function(e){if(!e||!/orgo-app/i.test(e))return null;const t=e.match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i),i=e.match(/\b(android|ios)\b/i);return t&&i?{oneSignalId:t[0].toLowerCase(),platform:"android"===i[1].toLowerCase()?"Android":"iOS"}:null},Qe="orgoOneSignalOid",Be=function(e){try{const t=new URL(e).searchParams.get("oid");if(t)return localStorage.setItem(Qe,t),t}catch(t){}return null},Ge=function(){try{return localStorage.getItem(Qe)}catch(e){return null}},We=function(){try{localStorage.removeItem(Qe)}catch(e){}},je=function(){try{const e=document.createElement("canvas").getContext("webgl"),t=e&&e.getExtension("WEBGL_debug_renderer_info"),i=t&&e.getParameter(t.UNMASKED_RENDERER_WEBGL);if(i)return btoa(i)}catch(e){}try{let e=localStorage.getItem("orgoPushDeviceId");return e||(e=window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():"gen-"+Date.now().toString(16)+"-"+Math.random().toString(16).slice(2),localStorage.setItem("orgoPushDeviceId",e)),e}catch(e){return"unknown-device"}},ze=function(e,t){if(!e||!e.name)return null;const i=e.country?.code||null;return"US"===i?e.county?.state?e.name+", "+e.county.state:e.name:t?.isInternational&&i&&i!==t?.country?.code?e.country?.name?e.name+", "+e.country.name:e.name:e.nameWithCounty||e.name},qe=function(e,t){if(!e)return null;if(t?.settingFeatures?.professions?.isActive){const t=[e.professionHeadline,e.professionOrganisation].filter(Boolean);if(t.length)return t.join(", ")}return t?.settingFeatures?.localCenter?.isActive&&e.localCenter?.name?e.localCenter.name:e.type?.name||null},Je=function(e,t){return e&&(ze(e.town,t)||e.country?.name)||null},He=function(e){return e?/^https?:\/\//i.test(e)?e:"https://"+e:null},Ke=function(e){return e?e.replace(/^https?:\/\//i,"").replace(/\/$/,""):""},Ye=function(e){return{...e,"@type":"User"}},Ze=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):e},et=function(e,t){if(!e||!Array.isArray(t)||!t.length)return null;const i=e=>{if(null===e||void 0===e)return null;if("object"===typeof e)return e.id??i(e["@id"]);const t=parseInt(String(e).split("/").pop(),10);return Number.isNaN(t)?null:t},s=new Map(t.map(e=>[e.id,e]));let a=s.get(i(e))||null;const n=new Set;while(a&&!n.has(a.id)){if(a.isParent)return a;n.add(a.id),a=s.get(i(a.parent))||null}return null}},95439:function(e,t,i){"use strict";i.d(t,{A:function(){return k}});var s=i(20641),a=i(90033);const n={autocomplete:"off"},o={class:"field mb-3"},l={class:"is-size-6-half"},r={class:"has-text-grey"},d={key:0,class:"is-flex is-align-items-center"},c={class:"pl-2 text-overflow-trim"},u={key:0,class:"has-text-grey is-size-7 ml-1"};function m(e,t,i,m,p,h){const g=(0,s.g2)("b-checkbox"),f=(0,s.g2)("LogoThumbnail"),b=(0,s.g2)("b-autocomplete");return(0,s.uX)(),(0,s.CE)("section",null,[(0,s.Lk)("form",n,[(0,s.bF)(b,{ref:"userSearch",modelValue:p.memberName,"onUpdate:modelValue":t[1]||(t[1]=e=>p.memberName=e),data:p.data,placeholder:p.title,field:"fullName",loading:p.isFetching||i.loading,"open-on-focus":!0,"clear-on-select":"",autocomplete:"off",rounded:i.isRounded,size:i.size,expanded:"","append-to-body":i.isAppendToBody,onKeyup:h.getAsyncData,onSelect:h.change},(0,s.eX)({empty:(0,s.k6)(()=>[(0,s.Lk)("span",r,(0,a.v_)(e.$t("No results")),1)]),default:(0,s.k6)(e=>[e?((0,s.uX)(),(0,s.CE)("div",d,[((0,s.uX)(),(0,s.Wv)(f,{key:e.option.id,item:e.option,"is-type":"roundSmall"},null,8,["item"])),(0,s.Lk)("span",c,[(0,s.eW)((0,a.v_)(e.option.fullName)+" ",1),e.option.localCenterName?((0,s.uX)(),(0,s.CE)("span",u,(0,a.v_)(e.option.localCenterName),1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0)]),_:2},[h.localCenterFilterOption?{name:"header",fn:(0,s.k6)(()=>[(0,s.Lk)("div",o,[(0,s.bF)(g,{modelValue:p.isOnlyLocalCenter,"onUpdate:modelValue":[t[0]||(t[0]=e=>p.isOnlyLocalCenter=e),h.search]},{default:(0,s.k6)(()=>[(0,s.Lk)("span",l,(0,a.v_)(e.$t("onlyLocalCenter")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])])]),key:"0"}:void 0]),1032,["modelValue","data","placeholder","loading","rounded","size","append-to-body","onKeyup","onSelect"])])])}i(18111),i(22489);var p=i(38221),h=i.n(p),g=i(40834),f=i(31823),b={props:{label:{type:String,required:!1,default:null},size:{type:String,required:!1,default:null},item:{type:Object,required:!1,default:null},excludeCurrentUser:{type:Boolean,required:!1,default:!1},showLocalCenterFilterOption:{type:Boolean,required:!1,default:!0},modelValue:{type:Object},onlyLocalCenter:{type:Boolean,required:!1,default:!1},onlyAwaitingReferralStatus:{type:Boolean,required:!1,default:!1},excludeUsersWithCompany:{type:Boolean,required:!1,default:!1},includeMinors:{type:Boolean,required:!1,default:!1},isRounded:{type:Boolean,required:!1,default:!0},isAppendToBody:{type:Boolean,required:!1,default:!1},userTypeId:{type:Number,required:!1,default:null},localCenterId:{type:[Number,String],required:!1,default:null},loading:{type:Boolean,required:!1,default:!1},placement:{type:Boolean,required:!1,default:!1}},data(){return{title:null,isOnlyLocalCenter:!!this.onlyLocalCenter&&this.onlyLocalCenter,memberName:null,data:[],isFetching:!1}},created(){this.title=this.label?this.$t(this.label):this.$t("Add member")},methods:{getAsyncData:h()(function(e){if(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Enter"].includes(e.ke
1y))return!1;this.search()},400),search(){if(this.memberName&&this.memberName.length<3||""===this.memberName)return this.data=[],!1;this.isFetching=!0,this.data=[];let e="?";this.localCenterId?e+="&localCenter="+this.localCenterId:this.isOnlyLocalCenter&&this.user.localCenter&&(e+="&isOnlyLocalCenter=true"),this.onlyAwaitingReferralStatus&&(e+="&onlyAwaitingReferralStatus=true"),this.excludeUsersWithCompany&&(e+="&excludeUsersWithCompany=true"),this.includeMinors&&(e+="&includeMinors=true"),this.placement&&(e+="&forPlacement=true"),this.$http.plain.get("/search-user/"+encodeURIComponent(this.memberName)+e).then(e=>{this.data=e.data,this.excludeCurrentUser&&(this.data=this.data.filter(e=>e.id!==this.user.id))}).catch(e=>{throw this.data=[],e}).finally(()=>{this.isFetching=!1})},change(e){let t=e||null;t&&t.id&&this.$emit("update:modelValue",t)},focus(){this.$refs.userSearch?.focus?.()}},computed:{...(0,g.L8)(["user","isGranted","tenant"]),localCenterFilterOption(){return this.tenant.settingFeatures.localCenter.isActive&&this.user.localCenter&&this.showLocalCenterFilterOption&&(this.item&&this.item.owner.id===this.user.id||this.isGranted("HR_TENANT"))}},components:{LogoThumbnail:f.A}},y=i(66262);const v=(0,y.A)(b,[["render",m],["__scopeId","data-v-4cf891c5"]]);var k=v},95991:function(e,t,i){"use strict";i.d(t,{A:function(){return C}});var s=i(20641),a=i(90033);const n=["onClick"],o={key:0,class:"icon is-small posting-in-prefix-icon"},l={class:"posting-in-label"},r={class:"posting-in-value"},d={key:0,class:"posting-in-emoji"},c={class:"posting-in-name"},u={key:0,class:"posting-in-group-label"},m={class:"icon is-small posting-in-icon"},p={key:0,class:"posting-in-emoji"},h={key:0,class:"posting-in-empty"},g={class:"posting-in-search-wrap"};function f(e,t,i,f,b,y){const v=(0,s.g2)("font-awesome-icon"),k=(0,s.g2)("b-dropdown-item"),C=(0,s.g2)("b-input"),L=(0,s.g2)("b-dropdown");return(0,s.uX)(),(0,s.Wv)(L,{ref:"dropdown",modelValue:b.selectedUnit,"onUpdate:modelValue":t[1]||(t[1]=e=>b.selectedUnit=e),triggers:["click"],"mobile-modal":!1,position:"is-top-right","append-to-body":!1,"close-on-click":!0,class:"posting-in-selector",onActiveChange:y.onActiveChange},{trigger:(0,s.k6)(({active:t,toggle:u})=>[(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["posting-in-trigger",{"is-active":t}]),onClick:u},[i.triggerIcon?((0,s.uX)(),(0,s.CE)("span",o,[(0,s.bF)(v,{icon:i.triggerIcon},null,8,["icon"])])):(0,s.Q3)("",!0),(0,s.Lk)("span",l,(0,a.v_)(i.triggerLabel||e.$t("Posting in"))+":",1),(0,s.Lk)("span",r,[y.selectedOption&&y.selectedOption.emoji?((0,s.uX)(),(0,s.CE)("span",d,(0,a.v_)(y.selectedOption.emoji),1)):(0,s.Q3)("",!0),(0,s.Lk)("span",c,(0,a.v_)(y.selectedName),1)]),(0,s.Lk)("span",{class:(0,a.C4)(["icon is-small posting-in-chevron",{"is-open":t}])},[(0,s.bF)(v,{icon:"fa-light fa-angle-down"})],2)],10,n)]),default:(0,s.k6)(()=>[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(y.filteredGroupedOptions,(e,t)=>((0,s.uX)(),(0,s.CE)(s.FK,{key:"group_"+t},[e.options.length>0?((0,s.uX)(),(0,s.CE)("div",u,(0,a.v_)(e.label),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.options,e=>((0,s.uX)(),(0,s.Wv)(k,{key:e.value||"general",value:e.value,class:"posting-in-item"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",m,[e.emoji?((0,s.uX)(),(0,s.CE)("span",p,(0,a.v_)(e.emoji),1)):((0,s.uX)(),(0,s.Wv)(v,{key:1,icon:"fa-light fa-users"}))]),(0,s.Lk)("span",null,(0,a.v_)(e.label),1)]),_:2},1032,["value"]))),128))],64))),128)),y.hasAnyOptions?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",h,(0,a.v_)(e.$t("No results")),1)),(0,s.Lk)("div",g,[(0,s.bF)(C,{ref:"search",modelValue:b.searchTerm,"onUpdate:modelValue":t[0]||(t[0]=e=>b.searchTerm=e),placeholder:e.$t("Search space")+"...",icon:"fa-search",size:"is-small",expanded:""},null,8,["modelValue","placeholder"])])]),_:1},8,["modelValue","onActiveChange"])}i(44114),i(18111),i(22489),i(20116),i(30531),i(7588),i(61701),i(13579);var b=i(40834),y={name:"PostingInSelector",props:{modelValue:{type:[String,Object],default:null},item:{type:Object,required:!0},itemDiscussionCategory:{type:[Object,String],default:null},namespace:{type:String,default:"discussion"},isIssue:{type:Boolean,default:!1},triggerLabel:{type:String,default:null},triggerIcon:{type:[String,Array],default:null}},emits:["update:modelValue"],data(){return{selectedUnit:this.extractIri(this.modelValue),searchTerm:"",myGroups:[],setting:this.$store.state.tenant.settingFeatures}},computed:{...(0,b.L8)(["user","tenant","isGranted"]),hasGeneralUnitAccess(){const e={drive:this.setting.drive.whoCanPostPublic,event:this.setting.events.whoCanPostPublic,discussion:this.setting.discussions.whoCanPostPublic||this.item.namespace&&this.itemDiscussionCategory&&this.itemDiscussionCategory.hasPublicPosting,discu
1ssion_category:"HR_TENANT",vote:"HR_TENANT",newsletter:"HR_TENANT",contract:"HR_TENANT"};return this.namespace in e&&this.isGranted(e[this.namespace])},filteredMainGroups(){return this.myGroups.filter(e=>!this.isIssue&&"LocalCenter"===e["@type"]||!this.isIssue&&(!0===e.isRoleGroup||e.unitType))},currentUnitOption(){if(this.isIssue)return null;const e=this.$store.state.currentGroup;if(!e||"object"!==typeof e||!e["@id"])return null;const t="LocalCenter"===e["@type"]||"Group"===e["@type"]||!0===e.isRoleGroup||!!e.unitType;return t?this.myGroups.some(t=>t["@id"]===e["@id"])?null:{value:e["@id"],label:e.name,emoji:e.emoji||null}:null},filteredSubGroups(){return"discussion_category"!==this.namespace?this.myGroups.filter(e=>"Group"===e["@type"]):[]},groupedOptions(){const e=[],t=[];!this.isIssue&&this.hasGeneralUnitAccess&&t.push({value:null,label:this.tenant.shortName||this.tenant.name,emoji:this.tenant.emoji||null}),this.currentUnitOption&&t.push(this.currentUnitOption);for(const i of this.filteredMainGroups)t.push({value:i["@id"],label:i.name,emoji:i.emoji||null});if(t.length>0&&e.push({label:this.$t("Main groups"),options:t}),"discussion_category"!==this.namespace&&this.filteredSubGroups.length>0){const t=new Map,i=[];for(const e of this.filteredSubGroups){const s={value:e["@id"],label:e.name,emoji:e.emoji||null};e.category&&e.category.id?(t.has(e.category.id)||t.set(e.category.id,{label:e.category.name,options:[]}),t.get(e.category.id).options.push(s)):i.push(s)}0===t.size?e.push({label:this.$t("groups"),options:i}):(t.forEach(t=>e.push(t)),i.length>0&&e.push({label:this.$t("Other groups"),options:i}))}return e},filteredGroupedOptions(){const e=this.searchTerm.trim().toLowerCase();return e?this.groupedOptions.map(t=>({label:t.label,options:t.options.filter(t=>t.label.toLowerCase().includes(e))})).filter(e=>e.options.length>0):this.groupedOptions},hasAnyOptions(){return this.filteredGroupedOptions.some(e=>e.options.length>0)},allOptions(){return this.groupedOptions.flatMap(e=>e.options)},selectedOption(){return this.allOptions.find(e=>e.value===this.selectedUnit)||null},selectedName(){return this.selectedOption?this.selectedOption.label:this.tenant.shortName||this.tenant.name}},watch:{modelValue(e){this.selectedUnit=this.extractIri(e)},selectedUnit(e){this.$emit("update:modelValue",e)}},mounted(){this.myGroups=this.$store.state.spaces[this.tenant.slug].myGroups||[],this.initUnit()},methods:{extractIri(e){return e?"string"===typeof e?e:e["@id"]||null:null},initUnit(){if(!this.selectedUnit&&(!this.hasGeneralUnitAccess||this.isIssue)){const e=this.myGroups.find(e=>!this.isIssue||e.isProject);e&&(this.selectedUnit=e["@id"])}if(!this.selectedUnit&&this.$route.query.unit){const e=this.myGroups.find(e=>e.id===parseInt(this.$route.query.unit));e&&(this.selectedUnit=e["@id"])}},onActiveChange(e){e&&(this.searchTerm="",this.$nextTick(()=>{this.$refs.search&&this.$refs.search.focus&&this.$refs.search.focus()}))}}},v=i(66262);const k=(0,v.A)(y,[["render",f],["__scopeId","data-v-639385bd"]]);var C=k},96189:function(e,t,i){"use strict";i.d(t,{A:function(){return M}});i(18111),i(22489),i(61701);var s=i(20641),a=i(90033),n=i(53751);const o={class:"my-tickets-container"},l=["onClick"],r={class:"ticket-info"},d={class:"ticket-type"},c={class:"ticket-attendee"},u={class:"ticket-status-row"},m={class:"expand-icon"},p={key:0,class:"ticket-details"},h={class:"detail-row"},g={class:"detail-label"},f={class:"detail-value"},b={key:0,class:"detail-row"},y={class:"detail-label"},v={class:"detail-value"},k={key:1,class:"detail-row"},C={class:"detail-label"},L={class:"detail-value"},w={key:2,class:"qr-section"},_={class:"qr-hint"},E={key:3,class:"awaiting-notice"};function $(e,t,i,$,F,T){const S=(0,s.g2)("font-awesome-icon"),A=(0,s.g2)("qrcode-vue");return(0,s.uX)(),(0,s.CE)("div",o,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.attendances,t=>((0,s.uX)(),(0,s.CE)("div",{key:t.id,class:(0,a.C4)(["ticket-card",{"is-expanded":F.expandedTickets.includes(t.id),"is-confirmed":T.isConfirmed(t)}])},[(0,s.Lk)("div",{class:(0,a.C4)(["ticket-header",{"is-confirmed-header":T.isConfirmed(t)}]),onClick:e=>T.toggleTicket(t.id)},[(0,s.Lk)("div",r,[(0,s.Lk)("span",d,(0,a.v_)(t.productPrice?.name||e.$t("Ticket")),1),(0,s.Lk)("span",c,(0,a.v_)(T.getAttendeeName(t)),1)]),(0,s.Lk)("div",u,[(0,s.Lk)("span",{class:(0,a.C4)(["status-badge",T.getStatusClass(t)])},(0,a.v_)(T.getStatusLabel(t)),3),(0,s.Lk)("span",m,[(0,s.bF)(S,{icon:F.expandedTickets.includes(t.id)?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])])],10,l),(0,s.bF)(n.eB,{name:"slide"},{default:(0,s.k6)(()=>[F.expandedTickets.includes(t.id)?((0,s.uX)(),(0,s.CE)("div",p,[(0,s.Lk)("div",h,[(0,s.Lk)("span",g,(0,a.v_)(e.$t("Email")),1),(0,s.Lk)("span",f,(0,a.v_)(T.getAttendeeEmail(t)),1)]),t.productPrice?.price?((0,s.uX)(),(0,s.CE)("div",b,[(0,s.Lk)("span",y,(0,a.v_)(e.$t("Price")),1),(0,s.Lk)("span",v,(0,a.v_)(e.$filters.money(t.productPrice.price,t.productPrice.currency)),1)])):(0,s.Q3)("",!0),t.addons&&t.addons.length>0?((0,s.uX)(),(0,s.CE)("div",k,[(0,s.Lk)("span",C,(0,a.v_)(e.$t("Addons")),1),(0,s.Lk)("span",L,(0,a.v_)(t.addons.map(e=>
1e.productPriceAddon?.name).filter(Boolean).join(", ")),1)])):(0,s.Q3)("",!0),T.isConfirmed(t)&&t.hash?((0,s.uX)(),(0,s.CE)("div",w,[(0,s.bF)(A,{value:T.getQrCodeUrl(t),size:150,level:"H","render-as":"svg",class:"qr-code"},null,8,["value"]),(0,s.Lk)("p",_,(0,a.v_)(e.$t("Show this QR code at the entrance")),1)])):(0,s.Q3)("",!0),"awaiting_invoice_payment"===T.getEffectiveStatus(t)?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.bF)(S,{icon:"fa-light fa-clock"}),(0,s.Lk)("span",null,(0,a.v_)(e.$t("QR code will be available after payment is confirmed")),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),_:2},1024)],2))),128))])}i(44114);var F=i(61273),T=i(67944),S=i(40834),A={name:"EventMyTickets",components:{FontAwesomeIcon:F.gc,QrcodeVue:T.Ay},props:{attendances:{type:Array,required:!0},eventLocation:{type:String,default:null}},data(){return{expandedTickets:[]}},computed:{...(0,S.L8)(["tenant"])},mounted(){1===this.attendances.length&&(this.expandedTickets=[this.attendances[0].id])},methods:{toggleTicket(e){const t=this.expandedTickets.indexOf(e);t>-1?this.expandedTickets.splice(t,1):this.expandedTickets.push(e)},getAttendeeName(e){return e.user?.fullName?e.user.fullName:e.external?.name?e.external.name:this.$t("Guest")},getAttendeeEmail(e){return e.user?.email?e.user.email:e.external?.email?e.external.email:"-"},getEffectiveStatus(e){return e.statusRegistration?e.statusRegistration:e.productPayment?"success":null},isConfirmed(e){return"success"===this.getEffectiveStatus(e)},getStatusClass(e){const t=this.getEffectiveStatus(e);return"success"===t?"is-success":"awaiting_invoice_payment"===t||"pending_approval"===t?"is-warning":"waiting_list"===t||"invited"===t?"is-info":"canceled"===t?"is-danger":"is-light"},getStatusLabel(e){const t=this.getEffectiveStatus(e);return"success"===t?this.$t("Confirmed"):"awaiting_invoice_payment"===t?this.$t("Awaiting payment"):"pending_approval"===t?this.$t("Pending approval"):"waiting_list"===t?this.$t("On waiting list"):"invited"===t?this.$t("Invited"):"canceled"===t?this.$t("Canceled"):this.$t("Pending")},getQrCodeUrl(e){if(!e.hash)return"";const t=this.tenant?.appHost||window.location.host;return`https://${t}/ticket/${e.hash}`}}},P=i(66262);const I=(0,P.A)(A,[["render",$],["__scopeId","data-v-32001996"]]);var M=I},96991:function(e,t,i){var s={"./BG.json":[20898,898],"./CA.json":[21317,1317],"./GR.json":[31044,1044],"./LB.json":[70603,603],"./PT.json":[36885,6885],"./RO.json":[51530,1530],"./SK.json":[84355,4355],"./UA.json":[11091,1091],"./US-AK.json":[22636,2636],"./US-AL.json":[97421,7421],"./US-AR.json":[46087,6087],"./US-AZ.json":[94543,6924],"./US-CA.json":[74044,4044],"./US-CO.json":[49546,9546],"./US-CT.json":[25491,5491],"./US-DC.json":[14861,4861],"./US-DE.json":[81119,1119],"./US-FL.json":[14114,4114],"./US-GA.json":[84536,4536],"./US-HI.json":[8055,8055],"./US-IA.json":[37518,7518],"./US-ID.json":[41405,1405],"./US-IL.json":[13173,3173],"./US-IN.json":[77659,7659],"./US-KS.json":[91926,1926],"./US-KY.json":[50188,188],"./US-LA.json":[18027,8027],"./US-MA.json":[77098,7098],"./US-MD.json":[70049,49],"./US-ME.json":[58598,8598],"./US-MI.json":[30034,34],"./US-MN.json":[7663,7663],"./US-MO.json":[1596,1596],"./US-MS.json":[82280,2280],"./US-MT.json":[1489,1489],"./US-NC.json":[77231,7231],"./US-ND.json":[55122,5122],"./US-NE.json":[96573,6573],"./US-NH.json":[20870,870],"./US-NJ.json":[69844,9844],"./US-NM.json":[15701,5701],"./US-NV.json":[70544,544],"./US-NY.json":[1681,1681],"./US-OH.json":[19115,9115],"./US-OK.json":[75834,5834],"./US-OR.json":[30205,205],"./US-PA.json":[24503,4503],"./US-PR.json":[41606,1606],"./US-RI.json":[91085,1085],"./US-SC.json":[43998,3998],"./US-SD.json":[69715,9715],"./US-TN.json":[47878,7878],"./US-TX.json":[40936,936],"./US-UT.json":[9577,9577],"./US-VA.json":[60769,769],"./US-VI.json":[75241,5241],"./US-VT.json":[75258,5258],"./US-WA.json":[3400,3400],"./US-WI.json":[33616,3616],"./US-WV.json":[7521,7521],"./US-WY.json":[73376,3376],"./US.json":[13181,3181]};function a(e){if(!i.o(s,e))return Promise.resolve().then(function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=s[e],a=t[0];return i.e(t[1]).then(function(){return i.t(a,19)})}a.keys=function(){return Object.keys(s)},a.id=96991,e.exports=a},97278:function(e,t,i){"use strict";i.d(t,{A:function(){return _}});var s=i(20641),a=i(90033);const n={key:0,class:"modal-categories modal-field mt-4"},o=["onClick"],l={class:"category-label"},r={class:"category-value"},d={class:"icon is-small category-icon"},c={class:"icon is-small category-icon"},u={key:0,class:"category-empty"},m={class:"category-search-wrap"},p={key:1,class:"modal-topics-container my-4"},h={key:1,class:"posting-in-static"},g={class:"icon mr-1"};function f(e,t,i,f,b,y){const v=(0,s.g2)("font-awesome-icon"),k=(0,s.g2)("b-dropdown-item"),C=(0,s.g2)("b-input"),L=(0,s.g2)("b-dropdown"),w=(0,s.g2)("b-taginput"),_=(0,s.g2)("b-field"),E=(0,s.g2)("b-tooltip"),$=(0,s.g2)("PostingInSelector"),F=(0,s.g2)("BaseFormModal");return(0,s.uX)(),(0,s.Wv)(F,{ref:"baseModal","item-loaded":i.itemLoaded,"show-discussion-modal-photos-dialog":i.showDiscussionModalPhotosDialog,"show-discussion-modal-videos-dialog":i.showDiscussionModalVideosDialog,"show-discussion-modal-files-dialog":i.showDiscussionModalFilesDialog,"title-placeholder":y.titlePlaceholder,"default-title":y.modalTitle,"save-button-text":y.saveButtonText,"title-required":!1,"fullscreen-storage-key":"discussionFormModalFullscreen",onSave:y.saveDiscussion,onT
1itleChanged:y.onTitleChanged,onInlineMentionsChanged:y.onInlineMentionsChanged},{"additional-fields":(0,s.k6)(()=>[i.categories.length>0&&!y.isCategoryHotlink?((0,s.uX)(),(0,s.CE)("div",n,[(0,s.bF)(L,{ref:"categoryDropdown",modelValue:b.itemCategory,"onUpdate:modelValue":[t[1]||(t[1]=e=>b.itemCategory=e),y.onCategoryChange],triggers:["click"],"mobile-modal":!1,position:"is-top-right","append-to-body":!1,"close-on-click":!0,class:"category-selector",onActiveChange:y.onCategoryActiveChange},{trigger:(0,s.k6)(({active:t,toggle:i})=>[(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["category-trigger",{"is-active":t}]),onClick:i},[(0,s.Lk)("span",l,(0,a.v_)(e.$t("Category"))+":",1),(0,s.Lk)("span",r,(0,a.v_)(y.selectedCategoryName),1),(0,s.Lk)("span",{class:(0,a.C4)(["icon is-small category-chevron",{"is-open":t}])},[(0,s.bF)(v,{icon:"fa-light fa-angle-down"})],2)],10,o)]),default:(0,s.k6)(()=>[(0,s.bF)(k,{value:null,class:"category-item"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",d,[(0,s.bF)(v,{icon:"fa-light fa-ban"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("No category")),1)]),_:1}),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(y.searchedCategories,e=>((0,s.uX)(),(0,s.Wv)(k,{key:e["@id"],value:e["@id"],class:"category-item"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",c,[(0,s.bF)(v,{icon:"fa-light fa-hashtag"})]),(0,s.Lk)("span",null,(0,a.v_)(e.name),1)]),_:2},1032,["value"]))),128)),0===y.filteredCategories.length?((0,s.uX)(),(0,s.CE)("div",u,(0,a.v_)(e.$t("No results")),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",m,[(0,s.bF)(C,{ref:"categorySearch",modelValue:b.categorySearchTerm,"onUpdate:modelValue":t[0]||(t[0]=e=>b.categorySearchTerm=e),placeholder:e.$t("Search")+"...",icon:"fa-search",size:"is-small",expanded:""},null,8,["modelValue","placeholder"])])]),_:1},8,["modelValue","onUpdate:modelValue","onActiveChange"])])):(0,s.Q3)("",!0),b.itemCategory&&null!==y.itemCategoryObject&&y.itemCategoryObject.topicTypes.length?((0,s.uX)(),(0,s.CE)("div",p,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(y.itemCategoryObject.topicTypes,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"modal-topics"},[(0,s.bF)(_,null,{default:(0,s.k6)(()=>[((0,s.uX)(),(0,s.Wv)(w,{ref_for:!0,ref:"namespaceTopic_"+e.id,key:"namespaceTopic_"+e.id,modelValue:b.categoryTopicsSelected[e.id],"onUpdate:modelValue":t=>b.categoryTopicsSelected[e.id]=t,data:b.filteredNamespaceTopics[e.id],autocomplete:"","allow-new":!1,"open-on-focus":!0,field:"name",icon:"fa-hashtag",placeholder:e.name,onBlur:y.activateEscapeCanCancel,onFocus:t=>y.initNamespaceTopics(e),onAdd:t=>y.initNamespaceTopics(e),onClick:t=>y.keepNamespaceTagFocused(e),onTyping:y.getFilteredNamespaceTopics},null,8,["modelValue","onUpdate:modelValue","data","placeholder","onBlur","onFocus","onAdd","onClick","onTyping"]))]),_:2},1024)]))),128))])):(0,s.Q3)("",!0)]),"footer-extras":(0,s.k6)(()=>[(0,s.bF)(E,{label:b.item&&b.item.isReadOnly?e.$t("enableComments"):e.$t("disableComments"),position:"is-top"},{default:(0,s.k6)(()=>[(0,s.Lk)("span",{class:(0,a.C4)(["icon is-clickable composer-action-icon comments-toggle-icon",{"is-active":b.item&&b.item.isReadOnly}]),onClick:t[2]||(t[2]=(...e)=>y.toggleComments&&y.toggleComments(...e))},[(0,s.bF)(v,{icon:b.item&&b.item.isReadOnly?"fa-light fa-comment-slash":"fa-light fa-comment-dots"},null,8,["icon"])],2)]),_:1},8,["label"])]),"footer-right":(0,s.k6)(()=>[!b.item||b.item.id||y.isUnitLocked?y.lockedUnitLabel?((0,s.uX)(),(0,s.CE)("span",h,[(0,s.Lk)("span",g,[(0,s.bF)(v,{icon:"fa-light fa-users"})]),(0,s.Lk)("span",null,[(0,s.eW)((0,a.v_)(e.$t("Posting in"))+": ",1),(0,s.Lk)("strong",null,(0,a.v_)(y.lockedUnitLabel),1)])])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.Wv)($,{key:0,modelValue:b.item.unit,"onUpdate:modelValue":t[3]||(t[3]=e=>b.item.unit=e),item:b.item,"is-issue":!1,"item-discussion-category":y.itemDiscussionCategory,namespace:"discussion"},null,8,["modelValue","item","item-discussion-category"]))]),_:1},8,["item-loaded","show-discussion-modal-photos-dialog","show-discussion-modal-videos-dialog","show-discussion-modal-files-dialog","title-placeholder","default-title","save-button-text","onSave","onTitleChanged","onInlineMentionsChanged"])}i(44114),i(18111),i(22489),i(20116),i(61701);var b=i(72623),y=i(95991),v=i(31823),k=i(40834),C={name:"DiscussionFormModal",components:{BaseFormModal:b.A,PostingInSelector:y.A,LogoThumbnail:v.A},props:{showDiscussionModalPhotosDialog:{type:Boolean,default:!1},showDiscussionModalVideosDialog:{type:Boolean,default:!1},showDiscussionModalFilesDialog:{type:Boolean,default:!1}
1,itemLoaded:{type:Object,default:null},categories:{type:Array,default:()=>[]},filters:{type:Object,default:()=>({})}},data(){return{item:null,itemCategory:null,itemMentions:[],inlineMentions:[],categoryTopicsSelected:{},categorySearchTerm:"",filteredTopics:[],filteredMentions:[],filteredNamespaceTopics:{},filterNamespaceEditing:null,isLoadingTopics:!1,isLoadingMentions:!1}},computed:{...(0,k.L8)(["user","tenant"]),titlePlaceholder(){return this.$t("Title")+" ("+this.$t("optional")+")"},modalTitle(){return this.item?.id?this.$t("modify"):this.$t("Create post")},saveButtonText(){return this.itemLoaded?this.$t("save"):this.$t("post")},selectedCategoryName(){if(!this.itemCategory)return"...";const e=this.categories.find(e=>e["@id"]===this.itemCategory);if(!e)return"...";const t=30;return e.name.length>t?e.name.substring(0,t).trimEnd()+"...":e.name},itemCategoryObject(){if(!this.itemCategory)return null;let e=this.categories.find(e=>e["@id"]===this.itemCategory);return void 0!==e?e:null},isCategoryHotlink(){return this.$route.query.category&&this.$route.query.hotlink},itemDiscussionCategory(){return this.filters&&this.filters.category?this.filters.category:this.item.namespace},filteredCategories(){const e=e=>{if(!e)return null;if("object"===typeof e)return e.id;const t=String(e).match(/\/(\d+)$/);return t?t[1]:e},t=e(this.item.unit);return this.categories.filter(i=>!i.unit||!!t&&e(i.unit)===t)},searchedCategories(){const e=this.categorySearchTerm.trim().toLowerCase();return e?this.filteredCategories.filter(t=>(t.name||"").toLowerCase().includes(e)):this.filteredCategories},isUnitLocked(){const e=this.$store.state.currentGroup;return!(!e||"object"!==typeof e)},lockedUnitLabel(){if(this.itemLoaded)return this.itemLoaded.unit?this.itemLoaded.unit.name:this.tenant.name;const e=this.$store.state.currentGroup;return e&&!["support","generalUnit"].includes(e)?e.name:"generalUnit"===e?this.tenant.name:null}},created(){this.initDiscussion()},mounted(){this.$refs.baseModal&&this.item&&this.$refs.baseModal.initItem(this.item)},methods:{decodeHtmlEntities(e){if(!e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value},onCategoryActiveChange(e){e&&(this.categorySearchTerm="",this.$nextTick(()=>{this.$refs.categorySearch&&this.$refs.categorySearch.focus&&this.$refs.categorySearch.focus()}))},onCategoryChange(e){if(!e)return;const t=this.categories.find(t=>t["@id"]===e);t&&t.unit&&(this.item.unit=t.unit["@id"]||t.unit)},getFilteredTopics(e){this.filteredTopics=[],e&&(this.isLoadingTopics=!0,this.$http.plain.get("/topics?exists[type]=false&name="+e).then(e=>{this.filteredTopics=e.data["hydra:member"].map(e=>e.name)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingTopics=!1}))},getFilteredMentions(e){this.filteredMentions=[],e&&(this.isLoadingMentions=!0,this.$http.plain.get("/user_roles?order[user.firstName]=asc&exists[dateEnded]=false&unit="+this.$store.state.currentGroup.id+"&user.fullName="+e).then(e=>{this.filteredMentions=e.data["hydra:member"].map(e=>e.user)}).catch(e=>{console.log(e)}).finally(()=>{this.isLoadingMentions=!1}))},initNamespaceTopics(e){this.filteredNamespaceTopics[e.id]=e.topics,this.filterNamespaceEditing=e,this.$parent.$emit("update-can-cancel",["outside"])},activateEscapeCanCancel(){this.$parent.$emit("update-can-cancel",["escape","outside"])},keepNamespaceTagFocused(e){this.$refs["namespaceTopic_"+e.id][0].$refs.autocomplete.isActive=!0},getFilteredNamespaceTopics(e){let t=this.filterNamespaceEditing;this.filteredNamespaceTopics[t.id]=t.topics.filter(t=>t.name.toString().toLowerCase().indexOf(e.toLowerCase())>=0)}
1,categoryPayload(){if(this.item.namespace){this.item.topics=[];for(let[e,t]of Object.entries(this.categoryTopicsSelected))for(let i of t)this.item.topics.push(i.name)}},toggleComments(){this.item&&(this.item.isReadOnly=!this.item.isReadOnly)},onTitleChanged(e){this.$store.state.newDiscussion.title=e},onInlineMentionsChanged(e){const t=this.itemMentions.map(e=>e.id),i=[...t];for(const s of e)i.includes(s)||i.push(s);this.inlineMentions=i},async saveDiscussion(e){this.categoryPayload(),this.$refs.baseModal.setLoading(!0),await this.$refs.baseModal.uploadMedia("postimage"),await this.$refs.baseModal.uploadMedia("postvideo"),await this.$refs.baseModal.uploadMedia("postfile");let t=this.itemLoaded?this.$http.plain.patch:this.$http.plain.post,i=this.itemLoaded?"/discussions/"+this.itemLoaded.id:"/discussions";this.item.title=e.title,this.item.content=e.content,this.item.uploadedMedia=e.uploadedMedia,this.item.removedMedia=this.$refs.baseModal.$refs.mediaUpload.removedMedia,this.item.openGraphEmbed=e.openGraphEmbed,this.item.namespace=this.itemCategory,this.item.mentions=[...this.inlineMentions],this.item.unit?.["@id"]?this.item.unit="/api/v1/units/"+this.item.unit.id:this.$store.state.currentGroup&&"generalUnit"!==this.$store.state.currentGroup&&!this.item.unit&&(this.item.unit="/api/v1/units/"+this.$store.state.currentGroup.id),this.item.id&&delete this.item.unit,t(i,this.item).then(e=>{const t="pending"===e?.data?.mainPost?.moderationStatus;t?this.$buefy.snackbar.open({message:this.$t("postFlaggedMessage"),type:"is-warning",position:"is-top",actionText:this.$t("Close"),duration:8e3}):this.$buefy.snackbar.open({message:this.$t("saved")}),this.$refs.baseModal&&(this.$refs.baseModal.itemData.content=null),this.$store.state.newDiscussion={title:null,content:null},this.$store.state.isFormModalVisible=!1,this.$parent.$emit("newDiscussionPosted")}).catch(e=>{console.error(e);const t=e?.response?.data?.detail||e?.response?.data?.["hydra:description"]||this.$t("Internal Server Error");this.$buefy.snackbar.open({message:t,type:"is-danger",position:"is-top",actionText:this.$t("Close"),duration:6e3})}).finally(()=>{this.$refs.baseModal.setLoading(!1)})},initDiscussion(){if(this.itemLoaded){if(this.item={id:this.itemLoaded.id,title:this.decodeHtmlEntities(this.itemLoaded.title),isReadOnly:this.itemLoaded.isReadOnly,topics:this.itemLoaded.topics.map(e=>e.name),content:this.decodeHtmlEntities(this.itemLoaded.mainPost.content),unit:this.itemLoaded.unit?"/api/v1/units/"+this.itemLoaded.unit.id:null,medias:this.itemLoaded.mainPost.medias,namespace:this.itemLoaded.namespace?this.itemLoaded.namespace["@id"]:null,uploadedMedia:[],removedMedia:[]},this.itemMentions=this.itemLoaded.mainPost?this.itemLoaded.mainPost.mentions:[],this.inlineMentions=this.itemMentions.map(e=>e.id),this.item.namespace&&(this.itemCategory="object"===typeof this.item.namespace?this.item.namespace["@id"]:this.item.namespace),this.itemCategory&&this.itemCategoryObject&&this.itemCategoryObject.topicTypes)for(let e of this.itemCategoryObject.topicTypes)this.categoryTopicsSelected[e.id]=this.itemLoaded.topics.filter(t=>{if(e.topics.find(e=>e.id==t.id))return t.name})}else this.resetDiscussion()},resetDiscussion(){let e=null,t=this.$store.state.currentGroup;t&&!["support","generalUnit"].includes(t)&&(e=t["@id"]),this.item={title:this.$store.state.newDiscussion.title,topics:null,content:this.$store.state.newDiscussion.content,isReadOnly:!1,namespace:null,unit:e,photos:[],videos:[],files:[],medias:[],uploadedMedia:[],removedMedia:[],openGraphEmbed:null},!this.item.namespace&&this.filters&&this.filters.category&&(this.itemCategory=this.filters.category["@id"],this.item.namespace||(this.item.namespace=this.itemCategory))}}},L=i(66262);const w=(0,L.A)(C,[["render",f],["__scopeId","data-v-8194891c"]]);var _=w},97850:function(e,t,i){"use strict";i.d(t,{A:function(){return T}});var s=i(20641),a=i(90033),n=i(53751);const o={key:0,class:"mention-item mention-hint"},l={class:"mention-avatar-placeholder"},r={class:"mention-name has-text-grey"},d={key:1,class:"mention-item has-text-grey"},c={class:"mention-avatar-placeholder"},u={class:"mention-name"},m={key:2,class:"mention-item has-text-grey"},p={class:"mention-avatar-placeholder"},h={class:"mention-name"},g=["onClick","onTouchend"],f=["src"],b={key:1,class:"mention-avatar-placeholder"},y={class:"mention-name"},v={key:0,class:"mention-section-label has-text-grey"},k=["onClick","onTouchend"],C={class:"mention-name"};function L(e,t,i,L,w,_){const E=(0,s.g2)("font-awesome-icon"),$=(0,s.g2)("LogoThumbnail");return(0,s.uX)(),(0,s.Wv)(s.Im,{to:"body"},[i.show?((0,s.uX)(),(0,s.CE)("div",{key:0,class:"mention-dropdown",style:(0,a.Tr)(i.dropdownStyle)},[0===i.searchTerm.length?((0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("span",l,[(0,s.bF)(E,{icon:"fa-light fa-at"})]),(0,s.Lk)("span",r,(0,a.v_)(e.$t("type_to_mention")),1)])):i.isLoading?((0,s.uX)(),(0,s.CE)("div",d,[(0,s.Lk)("span",c,[(0,s.bF)(E,{icon:"fa-light fa-spinner-third",spin:""})]),(0,s.Lk)("span",u,(0,a.v_)(e.$t("Searching"))+"...",1)])):0===i.users.length&&0===i.contacts.length?((0,s.uX)(),(0,s.CE)("div",m,[(0,s.Lk)("span",p,[(0,s.bF)(E,{icon:"fa-light fa-user-slash"})]),(0,s.Lk)("span",h,(0,a.v_)(e.$t("no_users_found")),1)])):((0,s.uX)(),(0,s.CE)(s.FK,{key:3},[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.users,(o,l)=>((0,s.uX)(),(0,s.CE)("div",{key:"user-"+o.id,class:(0,a.C4)(["mention-item",{"is-selected":l===i.selectedIndex}]),onMousedown:t[0]||(t[0]=(0,n.D$)(t=>e.$emit("selecting"),["prevent"])),onTouchstart:t[1]||(t[1]=(0,n.D$)(t=>e.$emit("selecting"),["prevent"])),onClick:t=>e.$emit("pick-user",o),onTouchend:t=>e.$emit("pick-user",o)},[o.logo?((0,s.uX)(),(0,s.CE)("img",{key:0,src:_.userAvatarUrl(o),class:"mention-avatar"},null,8,f)):((0,s.uX)(),(0,s.CE)("span",b,[(0,s.bF)(E,{icon:"fa-light fa-user"})])),(0,s.Lk)("span",y,(0,a.v_)(o.firstName)+" "+(0,a.v_)(o.lastName),1)],42,g))),128)),i.contacts.length>0?((0,s.uX)(),(0,s.CE)("div",v,(0,a.v_)(e.$t("Contacts")),1)):(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.contacts,(o,l)=>
1((0,s.uX)(),(0,s.CE)("div",{key:"contact-"+o.id,class:(0,a.C4)(["mention-item",{"is-selected":i.users.length+l===i.selectedIndex}]),onMousedown:t[2]||(t[2]=(0,n.D$)(t=>e.$emit("selecting"),["prevent"])),onTouchstart:t[3]||(t[3]=(0,n.D$)(t=>e.$emit("selecting"),["prevent"])),onClick:t=>e.$emit("pick-contact",o),onTouchend:t=>e.$emit("pick-contact",o)},[(0,s.bF)($,{item:{...o,"@type":"contact"},"is-type":"roundXSmall"},null,8,["item"]),(0,s.Lk)("span",C,(0,a.v_)(o.name),1)],42,k))),128))],64))],4)):(0,s.Q3)("",!0)])}var w=i(31823),_=i(28782),E={name:"MentionDropdown",components:{LogoThumbnail:w.A},props:["show","users","contacts","searchTerm","isLoading","selectedIndex","dropdownStyle"],emits:["pick-user","pick-contact","selecting"],methods:{userAvatarUrl(e){return e&&e.logo?"demo_f"===e.logo?"https://randomuser.me/api/portraits/women/"+e.id%100+".jpg":"demo_m"===e.logo?"https://randomuser.me/api/portraits/men/"+e.id%100+".jpg":e.logo.contentUrl?_.ze+_.DJ+"user/"+e.logo.contentUrl:_.ze+_.DJ+"user/"+e.logo:null}}},$=i(66262);const F=(0,$.A)(E,[["render",L]]);var T=F},97891:function(e,t,i){"use strict";i.d(t,{A:function(){return Kn}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"o-mediumwidth"},l={key:0},r={class:"event-sidebar column is-4 is-hidden-mobile"},d={class:"event-cover-wrapper mb-5"},c={key:1,class:"mb-5"},u={class:"is-flex is-justify-content-space-between is-align-items-center"},m={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mb-1"},p={key:0},h={key:1,class:"has-text-weight-normal"},g={key:0,class:"field mb-4"},f={key:1,class:"event-attenders-stacked mb-1"},b=["onClick"],y=["onClick"],v={key:2,class:"is-size-7 mb-4"},k={key:2},C={key:2},L={key:5},w={key:2},_={key:5},E={key:3},$={class:"is-flex is-justify-content-space-between is-align-items-center mt-5"},F={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mb-1"},T={key:0,class:"field mb-4"},S={class:"event-attenders"},A={key:0,class:"is-hidden-tablet mb-4"},P={class:"is-flex is-align-items-center is-hidden-mobile"},I={class:"timezone-display-inline is-clickable"},M={class:"icon is-small"},x={class:"timezone-offset-inline"},N={class:"timezone-dropdown-content"},U={class:"timezone-list"},D={class:"timezone-list-header"},X={class:"timezone-option"},V={class:"has-text-grey"},R={class:"timezone-list-header mt-3"},O={class:"timezone-option"},Q={class:"has-text-grey"},B={key:2,class:"is-hidden-tablet mb-4 timezone-mobile-row"},G={class:"timezone-text-trigger is-size-7 is-clickable"},W={class:"icon is-small"},j={class:"timezone-dropdown-content"},z={class:"timezone-list"},q={class:"timezone-list-header"},J={class:"timezone-option"},H={class:"has-text-grey"},K={class:"timezone-list-header mt-3"},Y={class:"timezone-option"},Z={class:"has-text-grey"},ee=["href"],te={class:"icon is-small"},ie=["href"],se={class:"icon is-small"},ae={key:4,class:"tabs-pill mt-3 mb-2"},ne={class:"tabs"},oe={key:0,class:"ml-1 tag is-rounded is-small is-light"},le={key:0,class:"ml-1 tag is-rounded is-small is-light"},re={key:0,class:"is-hidden-tablet mb-5"},de={key:1,class:"is-hidden-tablet mb-5"},ce={class:"is-flex is-justify-content-space-between is-align-items-center"},ue={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mb-1"},me={key:0},pe={key:1,class:"has-text-weight-normal"},he={key:0,class:"field mb-4"},ge={key:1,class:"event-attenders-stacked mb-1"},fe=["onClick"],be=["onClick"],ye={key:2,class:"is-size-7 mb-4"},ve={key:2},ke={key:2},Ce={key:5},Le={key:2},we={key:5},_e={key:2,class:"notification is-warning is-light is-rounded mb-5"},Ee={class:"has-text-weight-semibold"},$e={class:"icon is-small mr-1"},Fe={key:3,class:"card p-4 mb-2"},Te={class:"has-text-weight-semibold mb-4"},Se={key:0,class:"has-text-centered py-4"},Ae={key:1,class:"rsvp-initial-buttons"},Pe={type:"button",class:"button is-rounded is-fullwidth",disabled:""},Ie={key:2,class:"has-text-centered py-4"},Me={class:"icon has-text-grey-light mb-2",style:{"font-size":"2rem"}},xe={class:"has-text-weight-semibold has-text-grey-dark"},Ne={class:"is-size-7 has-text-grey mt-1"},Ue={key:3,class:"rsvp-initial-buttons"},De={class:"buttons is-centered"},Xe=["disabled"],Ve={class:"icon"},Re=["disabled"],Oe={class:"icon"},Qe={key:4,class:"rsvp-status-dropdown"},Be={class:"rsvp-status-icon"},Ge={class:"rsvp-status-text"},We={class:"rsvp-chevron"},je={class:"icon-text"},ze={class:"icon has-text-success"},qe={class:"icon-text"},Je={class:"icon has-text-warning"},He={class:"icon-text"},Ke={class:"icon has-text-grey"},Ye=["title","aria-label"],Ze={class:"is-size-7 has-text-grey mb-2"},et={key:6},tt={class:"icon is-small"},it={key:4,class:"mb-5"},st={class:"tag is-rounded is-success"},at={class:"icon-text"},nt={class:"icon is-small"},ot={class:"has-text-weight-semibold mb-4"},lt={key:0,class:"has-text-centered py-4"},rt={key:1},dt={class:"is-size-7 has-text-grey mb-2"},ct={key:0,class:"notification is-success is-light is-rounded mb-4"},ut={class:"is-flex is-justify-content-space-between is-align-items-center"},mt={class:"has-text-weight-semibold"},pt={class:"is-size-7"},ht={class:"mr-1 is-small"},gt={key:2,class:"mt-5"},ft={class:"is-size-6 has-text-weight-semibold has-text-dark mb-3"},bt={key:0,class:"ticket-summary notification is-light is-rounded mb-4"},yt={class:"is-flex is-justify-content-space-between is-align-items-center"},vt={class:"has-text-weight-bold"},kt=["disabled"],Ct={class:"icon is-small"},Lt={key:0,class:"ticket-summary notification is-light is-rounded mb-4"},wt={class:"is-flex is-justify-content-space-between is-align-items-center"},_t={class:"has-text-weight-bold"},Et=["disabled"],$t={class:"icon is-small"},Ft={key:6,class:"is-flex is-align-items-center is-flex-wrap-wrap mb-5 mt-4",style:{gap:"0.5rem"}},Tt=["disabled"],St={class:"icon-text"},At={class:"icon"},Pt={key:1,class:"has-text-warning"},It={class:"icon-text"},Mt={class:"icon"},xt={key:2,class:"has-text-grey-light"},Nt={class:"icon-text"},Ut={class:"mr-1"},Dt={class:"mr-1"},Xt={key:8,class:"mt-5"},Vt={class:"is-flex is-justify-content-space-between is-align-items-center"},Rt={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mb-1"},Ot={class:"agenda-readonly-day-header"},Qt={class:"icon is-small mr-2"},Bt=["onClick"],Gt={class:"agenda-readonly-info"},Wt={class:"agenda-readonly-time"},jt={class:"agenda-readonly-time-start"},zt={class:"agenda-readonly-time-end"},qt={key:0,class:"agenda-readonly-time-badge"},Jt={class:"agenda-readonly-title"},Ht={key:0,class:"agenda-readonly-short-desc"},Kt={key:1,class:"agenda-readonly-preview"},Yt={key:0,class:"agenda-readonly-collapse is-expanded"},Zt={class:"agenda-readonly-desc"},ei={key:9,class:"mt-5"},ti={class:"is-flex is-justify-content-space-between is-align-items-center"},ii={class:"has-text-weight-semibold has-text-grey is-size-7 is-uppercase mb-1"},si={key:0,class:"speakers-day-header mb-3"},ai={class:"icon is-small mr-2 has-text-grey"},ni={class:"has-text-weight-semibold is-size-7"},oi={class:"speakers-list"},li={key:5},ri={key:0,class:"se-attend-row"},di=["onClick"],ci={class:"se-attendees-count"},ui={key:6},mi={key:0,class:"mt-5"},pi={class:"has-text-weight-semibold mb-1 has-text-grey is-size-7 is-uppercase"},hi={key:0,class:"is-size-7 has-text-grey mb-4"},gi={class:"icon-text"},fi={class:"icon is-small"},bi={key:1,class:"upload-progress-container mb-4"},yi={class:"upload-progress-header mb-3"},vi={class:"has-text-weight-semibold"},ki={class:"is-size-7 has-text-grey"},Ci={class:"progress-bar-container mb-2"},Li={class:"progress-bar"},wi={class:"progress-percentage ml-2"},_i={class:"upload-details is-size-7 has-text-grey"},Ei={key:0},$i={key:1},Fi={key:2,class:"upload-buttons"},Ti={class:"upload-btn"},Si={class:"icon-text"},Ai={class:"icon is-small"},Pi={key:0},Ii={class:"upload-btn"},Mi={class:"icon-text"},xi={class:"icon is-small"},Ni={key:0},Ui={class:"upload-btn"},Di={class:"icon-text"},Xi={class:"icon is-small"},Vi={key:0},Ri={key:3,class:"my-5"},Oi=["href"],Qi={class:"icon is-small"},Bi=["onClick"],Gi={class:"icon is-small"},Wi={key:1,class:"mt-5"},ji={class:"has-text-weight-semibold mb-1 has-text-grey is-size-7 is-uppercase"},zi={key:0},qi={class:"mb-3"},Ji={key:1},Hi={class:"mb-3"},Ki={key:2},Yi={class:"mb-3"},Zi={key:3},es={class:"p-5"},ts=["onClick"],is={class:"is-flex-grow-1"},ss={class:"has-text-weight-semibold"},as={key:0,class:"is-size-7 has-text-grey"},ns={key:0,class:"has-text-grey has-text-centered py-4"},os={class:"p-5"},ls={class:"se-speaker-focus-center"},rs={key:0,class:"se-speaker-focus-headline"},ds={key:1,class:"se-speaker-focus-bio"},cs={key:0,class:"se-speaker-sessions"},us={class:"se-speaker-section-title"},ms={key:0,class:"se-speaker-day-label"},ps={class:"se-speaker-day-items"},hs=["onClick"],gs={class:"se-speaker-session-time"},fs={class:"se-speaker-session-info"},bs={key:0,class:"se-speaker-session-location"},ys={key:1,class:"se-speaker-co-speakers"},vs={class:"se-speaker-section-title"},ks={class:"se-speaker-co-list"},Cs=["onClick"],Ls={class:"se-speaker-co-chip-info"},ws={key:0,class:"has-text-grey is-size-7"},_s={class:"modal-card"},Es={class:"modal-card-head"},$s={class:"modal-card-title"},Fs={class:"modal-card-body"},Ts={class:"rsvp-qr-modal-body"},Ss={class:"has-text-grey has-text-centered"};function As(e,t,i,As,Ps,Is){const Ms=(0,s.g2)("b-loading"),xs=(0,s.g2)("LogoUpload"),Ns=(0,s.g2)("EventHostedBy"),Us=(0,s.g2)("font-awesome-icon"),Ds=(0,s.g2)("UserSearchAutocomplete"),Xs=(0,s.g2)("LogoThumbnail"),Vs=(0,s.g2)("b-tooltip"),Rs=(0,s.g2)("router-link"),Os=(0,s.g2)("b-tag"),Qs=(0,s.g2)("b-input"),Bs=(0,s.g2)("b-dropdown-item"),Gs=(0,s.g2)("b-dropdown"),Ws=(0,s.g2)("EventCalendarDropdown"),js=(0,s.g2)("EventDateTimeBox"),zs=(0,s.g2)("EventLocationBox"),qs=(0,s.g2)("qrcode-vue"),Js=(0,s.g2)("EventMyTickets"),Hs=(0,s.g2)("EventRegistrationStatusBox"),Ks=(0,s.g2)("b-button"),Ys=(0,s.g2)("EventTicketSelector"),Zs=(0,s.g2)("EventDraftBanner"),ea=(0,s.g2)("EventMapPreview"),ta=(0,s.g2)("EventAboutSection"),ia=(0,s.g2)("SubEventAttendButton"),sa=((0,s.g2)("AgendaRow"),(0,s.g2)("EventSpeakerCard")),aa=(0,s.g2)("EventAgendaViewer"),na=(0,s.g2)("VoteList"),oa=(0,s.g2)("b-upload"),la=(0,s.g2)("b-field"),ra=(0,s.g2)("EventMediaGallery"),da=(0,s.g2)("EventCheckoutModal"),ca=(0,s.g2)("UserShowContent"),ua=(0,s.g2)("ContactShowContent"),ma=(0,s.g2)("ItemViewModal"),pa=(0,s.g2)("ShareEventPreviewModal"),ha=(0,s.g2)("QRScannerModal"),ga=(0,s.g2)("EventUserInvite"),fa=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.CE)("section",o,[(0,s.bF)(Ms,{modelValue:Ps.isLoading,"onUpdate:modelValue":t[0]||(t[0]=e=>Ps.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),Ps.item?((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("div",{class:(0,a.C4)({"mt-5 columns":!e.$isMobile(),"mt-2 px-3":e.$isMobile()})},[(0,s.Lk)("div",r,[(0,s.Lk)("div",d,[(0,s.bF)(xs,{item:Ps.item,"dynamic-image-file":Ps.dynamicLogoUpload,"empty-image":Is.eventPhotosUrls?Is.eventPhotosUrls[Is.eventPhotosUrls.length-1]:null},null,8,["item","dynamic-image-file","empty-image"])]),Ps.item.owner?((0,s.uX)(),(0,s.Wv)(Ns,{key:0,owner:Ps.item.owner,"created-at":Ps.item.createdAt,"show-created-date":!0,linkable:!1,clickable:!0,compact:!0,class:"mb-5",onOwnerClick:t[1]||(t[1]=e=>Is.openUserProfile(e.id,e.fullName))}
1,null,8,["owner","created-at"])):(0,s.Q3)("",!0),Is.canSeeAttenders?((0,s.uX)(),(0,s.CE)("div",c,[(0,s.Lk)("div",u,[(0,s.Lk)("p",m,[(0,s.eW)((0,a.v_)(Ps.attendersTotal)+" ",1),Ps.item.maxCapacity?((0,s.uX)(),(0,s.CE)("span",p,"/ "+(0,a.v_)(Ps.item.maxCapacity),1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(e.$t("Participants"))+" ",1),Ps.item.maxCapacity?((0,s.uX)(),(0,s.CE)("span",h," ("+(0,a.v_)(Is.seatsLeft)+" "+(0,a.v_)(e.$t("seats left"))+") ",1)):(0,s.Q3)("",!0)]),e.isGrantedOwner(Ps.item)&&"draft"!==Ps.item.status?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-size-7 is-clickable mb-1",onClick:t[2]||(t[2]=(...e)=>Is.toggleInviteInput&&Is.toggleInviteInput(...e))},(0,a.v_)(Ps.item.requiresRegistrationForm?e.$t("Invite"):e.$t("Add")),1)):(0,s.Q3)("",!0),e.isGrantedOwner(Ps.item)&&e.isNativeApp?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-size-7 is-clickable ml-2",onClick:t[3]||(t[3]=e=>Ps.showQRScanner=!0)},[(0,s.bF)(Us,{icon:"fa-light fa-qrcode",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Scan")),1)])):(0,s.Q3)("",!0)]),t[79]||(t[79]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),Ps.showInviteInput&&e.isGrantedOwner(Ps.item)&&"draft"!==Ps.item.status?((0,s.uX)(),(0,s.CE)("div",g,[(0,s.bF)(Ds,{ref:"attendeeSearch",item:Ps.item,label:Ps.item.requiresRegistrationForm?e.$t("Invite participant"):e.$t("Add attendee"),"include-minors":!0,loading:Ps.isAddingParticipant,"onUpdate:modelValue":t[4]||(t[4]=e=>Is.addParticipant(e))},null,8,["item","label","loading"]),(0,s.Lk)("a",{class:"is-size-7 is-clickable",onClick:t[5]||(t[5]=e=>Ps.showInviteModal=!0)},[(0,s.bF)(Us,{icon:"fa-light fa-envelope",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Invite by email")),1)])])):(0,s.Q3)("",!0),Ps.attenders.length?((0,s.uX)(),(0,s.CE)("div",f,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.displayedAttenders,(t,i)=>((0,s.uX)(),(0,s.Wv)(Vs,{key:"member_"+(t.user?.id||t.external?.id),label:t.external?t.external.name:t.user?.fullName,position:"is-top",type:"is-dark"},{default:(0,s.k6)(()=>[!t.external&&t.user?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"stacked-avatar is-clickable",style:(0,a.Tr)({zIndex:Is.displayedAttenders.length-i}),onClick:e=>Is.openUserProfile(t.user.id,t.user.fullName)},[(0,s.bF)(Xs,{item:t.user,"is-type":"roundSmall"},null,8,["item"])],12,b)):t.external?((0,s.uX)(),(0,s.CE)("span",{key:1,class:(0,a.C4)(["stacked-avatar",{"is-clickable":e.isGranted("EVENT_TENANT",Ps.item?.localCenter)}]),style:(0,a.Tr)({zIndex:Is.displayedAttenders.length-i}),onClick:e=>Is.openContactProfile(t.external.id,t.external.name)},[(0,s.bF)(Xs,{item:t.external,"is-type":"roundSmall"},null,8,["item"])],14,y)):(0,s.Q3)("",!0)]),_:2},1032,["label"]))),128))])):(0,s.Q3)("",!0),Ps.attenders.length?((0,s.uX)(),(0,s.CE)("p",v,[1===Ps.attenders.length?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[Is.firstAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-clickable",onClick:t[6]||(t[6]=e=>Is.openUserProfile(Ps.attenders[0].user.id,Ps.attenders[0].user.fullName))},(0,a.v_)(Is.firstAttenderName),1)):Is.firstAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-clickable",onClick:t[7]||(t[7]=e=>Is.openContactProfile(Ps.attenders[0].external.id,Ps.attenders[0].external.name))},(0,a.v_)(Is.firstAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",k,(0,a.v_)(Is.firstAttenderName),1))],64)):2===Ps.attenders.length?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[Is.firstAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-clickable",onClick:t[8]||(t[8]=e=>Is.openUserProfile(Ps.attenders[0].user.id,Ps.attenders[0].user.fullName))},(0,a.v_)(Is.firstAttenderName),1)):Is.firstAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-clickable",onClick:t[9]||(t[9]=e=>Is.openContactProfile(Ps.attenders[0].external.id,Ps.attenders[0].external.name))},(0,a.v_)(Is.firstAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",C,(0,a.v_)(Is.firstAttenderName),1)),(0,s.eW)(" "+(0,a.v_)(e.$t("and"))+" ",1),Is.secondAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"is-clickable",onClick:t[10]||(t[10]=e=>Is.openUserProfile(Ps.attenders[1].user.id,Ps.attenders[1].user.fullName))},(0,a.v_)(Is.secondAttenderName),1)):Is.secondAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:4,class:"is-cl
1ickable",onClick:t[11]||(t[11]=e=>Is.openContactProfile(Ps.attenders[1].external.id,Ps.attenders[1].external.name))},(0,a.v_)(Is.secondAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",L,(0,a.v_)(Is.secondAttenderName),1))],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[Is.firstAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-clickable",onClick:t[12]||(t[12]=e=>Is.openUserProfile(Ps.attenders[0].user.id,Ps.attenders[0].user.fullName))},(0,a.v_)(Is.firstAttenderName)+", ",1)):Is.firstAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-clickable",onClick:t[13]||(t[13]=e=>Is.openContactProfile(Ps.attenders[0].external.id,Ps.attenders[0].external.name))},(0,a.v_)(Is.firstAttenderName)+", ",1)):((0,s.uX)(),(0,s.CE)("span",w,(0,a.v_)(Is.firstAttenderName)+",",1)),Is.secondAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"is-clickable",onClick:t[14]||(t[14]=e=>Is.openUserProfile(Ps.attenders[1].user.id,Ps.attenders[1].user.fullName))},(0,a.v_)(Is.secondAttenderName),1)):Is.secondAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:4,class:"is-clickable",onClick:t[15]||(t[15]=e=>Is.openContactProfile(Ps.attenders[1].external.id,Ps.attenders[1].external.name))},(0,a.v_)(Is.secondAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",_,(0,a.v_)(Is.secondAttenderName),1)),(0,s.eW)(" "+(0,a.v_)(e.$t("and"))+" ",1),e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.Wv)(Rs,{key:6,to:{name:"EventAttend",params:{item:Ps.item.uuid}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Ps.attendersTotal-2)+" "+(0,a.v_)(e.$t("others")),1)]),_:1},8,["to"])):((0,s.uX)(),(0,s.Wv)(Rs,{key:7,to:Is.othersRoute},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Ps.attendersTotal-2)+" "+(0,a.v_)(e.$t("others")),1)]),_:1},8,["to"])),t[77]||(t[77]=(0,s.eW)(" . ",-1))],64))])):(0,s.Q3)("",!0),Ps.item.type&&e.tenant.settingFeatures.events.trainingEventType&&e.tenant.settingFeatures.events.trainingEventType==Ps.item.type.id?((0,s.uX)(),(0,s.CE)("div",E,[(0,s.Lk)("div",$,[(0,s.Lk)("p",F,(0,a.v_)(Ps.trainersTotal)+" "+(0,a.v_)(e.$t("trainers")),1),Ps.trainersTotal&&(Ps.item.owner?.id===e.user.id||e.isGranted("EVENT_TENANT",Ps.item.localCenter))||Ps.trainersTotal>=30?((0,s.uX)(),(0,s.Wv)(Rs,{key:0,to:{name:"EventTrainers",params:{item:Ps.item.uuid}},class:"is-size-7"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("See all")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),t[78]||(t[78]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),Ps.item.owner?.id===e.user.id||e.isGranted("EVENT_TENANT",Ps.item.localCenter)?((0,s.uX)(),(0,s.CE)("div",T,[(0,s.bF)(Ds,{label:e.$t("addTrainer"),"onUpdate:modelValue":t[16]||(t[16]=e=>Is.addTrainer(e))},null,8,["label"])])):(0,s.Q3)("",!0),(0,s.Lk)("div",S,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ps.trainers,e=>((0,s.uX)(),(0,s.Wv)(Rs,{key:e.trainer.id,to:{name:"UserShow",params:{item:e.trainer.id}},title:e.trainer.fullName},{default:(0,s.k6)(()=>[(0,s.bF)(Xs,{item:e.trainer,"is-type":"roundSmall"},null,8,["item"])]),_:2},1032,["to","title"]))),128))])])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),(0,s.Lk)("div",{class:(0,a.C4)({"column is-7":!e.$isMobile()})},[(0,s.Lk)("div",{class:(0,a.C4)({"pb-5":e.$isMobile()})},[Ps.item.logo||Is.eventPhotosUrls&&Is.eventPhotosUrls.length?((0,s.uX)(),(0,s.CE)("div",A,[(0,s.bF)(xs,{item:Ps.item,"dynamic-image-file":Ps.dynamicLogoUpload,"empty-image":Is.eventPhotosUrls?Is.eventPhotosUrls[Is.eventPhotosUrls.length-1]:null},null,8,["item","dynamic-image-file","empty-image"])])):(0,s.Q3)("",!0),Is.eventEnded(Ps.item)?((0,s.uX)(),(0,s.Wv)(Os,{key:1,class:"is-rounded is-warning mb-4"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("The event has passed")),1)]),_:1})):(0,s.Q3)("",!0),(0,s.Lk)("h1",{class:(0,a.C4)(["has-text-weight-bold lh-13 mb-4",{"is-size-2":!e.$isMobile(),"is-size-4":e.$isMobile()}])},(0,a.v_)(Ps.item.name),3),(0,s.bF)(js,{"date-time-begin":Ps.dateTimeBegin,"date-time-end":Ps.dateTimeEnd,timezone:Ps.selectedTimezone,"show-timezone-toggle":!1,"hide-timezone-abbr-on-mobile":!0,class:"mb-4"},(0,s.eX)({_:2},[Is.eventEnded(Ps.item)?void 0:{name:"actions",fn:(0,s.k6)(()=>[(0,s.Lk)("div",P,[(0,s.bF)(Gs,{ref:"timezoneDropdown",position:"is-bottom-left",class:"timezone-dropdown-inline mr-2",onActiveChange:Is.onTimezoneDropdownChange},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",I,[(0,s.Lk)("span",M,[(0,s.bF)(Us,{icon:"fa-light fa-globe"})]),(0,s.Lk)("span",x,[Is.isShowingEventLocalTime?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("LOCAL TIME")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(Is.formattedTimezoneOffset)+" "+(0,a.v_)(Is.formattedTimezoneCity),1)],64))])])]),default:(0,s.k6)(()=>[(0,s.Lk)("div",N,[(0,s.bF)(Qs,{ref:"timezoneSearchInput",modelValue:Ps.timezoneSearch,"onUpdate:modelValue":t[17]||(t[17]=e=>Ps.timezoneSearch=e),placeholder:e.$t("Search for a timezone"),icon:"magnifying-glass",class:"timezone-search-input"},null,8,["modelValue","placeholder"]),(0,s.Lk)("div",U,[(0,s.Lk)("p",D,(0,a.v_)(e.$t("Popular Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.filteredPopularTimezones,e=>((0,s.uX)(),(0,s.Wv)(Bs,{key:e.value,onClick:t=>Is.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",X,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",V,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128)),(0,s.Lk)("p",R,(0,a.v_)(e.$t("All Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.filteredAllTimezones,e=>((0,s.uX)(),(0,s.Wv)(Bs,{key:e.value,onClick:t=>Is.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",O,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",Q,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128))])])]),_:1},8,["onActiveChange"]),Ps.isAttending?((0,s.uX)(),(0,s.Wv)(Ws,{key:0,event:Ps.item,"date-time-begin":Ps.dateTimeBegin,"date-time-end":Ps.dateTimeEnd,timezone:Ps.selectedTimezone},null,8,["event","date-time-begin","date-time-end","timezone"])):(0,s.Q3)("",!0)])]),key:"0"}]),1032,["date-time-begin","date-time-end","timezone"]),Is.eventEnded(Ps.item)?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",B,[(0,s.bF)(Gs,{ref:"timezoneDropdownMobile",position:"is-bottom-left",class:"timezone-dropdown-mobile",onActiveChange:Is.onTimezoneDropdownChange},{trigger:(0,s.k6)(()=>[(0,s.Lk)("a",G,[(0,s.Lk)("span",W,[(0,s.bF)(Us,{icon:"fa-light fa-globe"})]),(0,s.Lk)("span",null,[Is.isShowingEventLocalTime?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$t("LOCAL TIME")),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(Is.formattedTimezoneOffset)+" "+(0,a.v_)(Is.formattedTimezoneCity),1)],64))])])]),default:(0,s.k6)(()=>[(0,s.Lk)("div",j,[(0,s.bF)(Qs,{modelValue:Ps.timezoneSearch,"onUpdate:modelValue":t[18]||(t[18]=e=>Ps.timezoneSearch=e),placeholder:e.$t("Search for a timezone"),icon:"magnifying-glass",class:"timezone-search-input"},null,8,["modelValue","placeholder"]),(0,s.Lk)("div",z,[(0,s.Lk)("p",q,(0,a.v_)(e.$t("Popular Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.filteredPopularTimezones,e=>((0,s.uX)(),(0,s.Wv)(Bs,{key:"mobile-"+e.value,onClick:t=>Is.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",J,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",H,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128)),(0,s.Lk)("p",K,(0,a.v_)(e.$t("All Time Zones")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.filteredAllTimezones,e=>((0,s.uX)(),(0,s.Wv)(Bs,{key:"mobile-"+e.value,onClick:t=>Is.selectTimezone(e.value)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Y,[(0,s.Lk)("span",null,(0,a.v_)(e.label),1),(0,s.Lk)("span",Z,(0,a.v_)(e.offset),1)])]),_:2},1032,["onClick"]))),128))])])]),_:1},8,["onActiveChange"]),Ps.isAttending?((0,s.uX)(),(0,s.Wv)(Ws,{key:0,event:Ps.item,"date-time-begin":Ps.dateTimeBegin,"date-time-end":Ps.dateTimeEnd,timezone:Ps.selectedTimezone},null,8,["event","date-time-begin","date-time-end","timezone"])):(0,s.Q3)("",!0)])),(0,s.bF)(zs,{location:Ps.item.location,"place-latitude":Ps.item.placeLatitude,"place-longitude":Ps.item.placeLongitude,type:"physical",class:"mb-5"},{actions:(0,s.k6)(({linkUrl:e})=>[e?((0,s.uX)(),(0,s.CE)("a",{key:0,href:e,target:"_blank",class:"button is-text is-small is-rounded event-arrow-link"},[(0,s.Lk)("span",te,[(0,s.bF)(Us,{icon:"fa-light fa-arrow-up-right"})])],8,ee)):(0,s.Q3)("",!0)]),_:1},8,["location","place-latitude","place-longitude"]),!Ps.item.hasEventTicketing||"attending"===Ps.isAttending?.statusRsvp||Ps.ticket?.id?((0,s.uX)(),(0,s.Wv)(zs,{key:3,"meet-url":Ps.item.meet,type:"online",class:"mb-5"},{actions:(0,s.k6)(({linkUrl:e})=>[e?((0,s.uX)(),(0,s.CE)("a",{key:0,href:e,target:"_blank",class:"button is-text is-small is-rounded event-arrow-link"},[(0,s.Lk)("span",se,[(0,s.bF)(Us,{icon:"fa-light fa-arrow-up-right"})])],8,ie)):(0,s.Q3)("",!0)]),_:1},8,["meet-url"])):(0,s.Q3)("",!0),Ps.subEvents.length>0||Is.showVotesTab?((0,s.uX)(),(0,s.CE)("div",ae,[(0,s.Lk)("div",ne,[(0,s.Lk)("ul",null,[(0,s.Lk)("li",{class:(0,a.C4)({"is-active":"details"===Ps.activeEventTab}),onClick:t[19]||(t[19]=e=>Ps.activeEventTab="details")},[(0,s.Lk)("a",null,(0,a.v_)(e.$t("Details")),1)],2),Ps.subEvents.length>0?((0,s.uX)(),(0,s.CE)("li",{key:0,class:(0,a.C4)({"is-active":"agenda"===Ps.activeEventTab}),onClick:t[20]||(t[20]=e=>Ps.activeEventTab="agenda")},[(0,s.Lk)("a",null,[(0,s.eW)((0,a.v_)(e.$t("Agenda"))+" ",1),Ps.subEvents.length?((0,s.uX)(),(0,s.CE)("span",oe,(0,a.v_)(Ps.subEvents.length),1)):(0,s.Q3)("",!0)])],2)):(0,s.Q3)("",!0),Is.showVotesTab?((0,s.uX)(),(0,s.CE)("li",{key:1,class:(0,a.C4)({"is-active":"votes"===Ps.activeEventTab}),onClick:t[21]||(t[21]=e=>Ps.activeEventTab="votes")},[(0,s.Lk)("a",null,[(0,s.eW)((0,a.v_)(e.$t("Votes"))+" ",1),Ps.eventVotesCount>0?((0,s.uX)(),(0,s.CE)("span",le,(0,a.v_)(Ps.eventVotesCount),1)):(0,s.Q3)("",!0)])],2)):(0,s.Q3)("",!0)])])])):(0,s.Q3)("",!0),(0,s.bo)((0,s.Lk)("div",null,[Ps.item.owner?((0,s.uX)(),(0,s.CE)("div",re,[(0,s.bF)(Ns,{owner:Ps.item.owner,"created-at":Ps.item.createdAt,"show-created-date":!0,linkable:!1,clickable:!0,compact:!0,onOwnerClick:t[22]||(t[22]=e=>Is.openUserProfile(e.id,e.fullName))}
1,null,8,["owner","created-at"])])):(0,s.Q3)("",!0),Is.canSeeAttenders?((0,s.uX)(),(0,s.CE)("div",de,[(0,s.Lk)("div",ce,[(0,s.Lk)("p",ue,[(0,s.eW)((0,a.v_)(Ps.attendersTotal)+" ",1),Ps.item.maxCapacity?((0,s.uX)(),(0,s.CE)("span",me,"/ "+(0,a.v_)(Ps.item.maxCapacity),1)):(0,s.Q3)("",!0),(0,s.eW)(" "+(0,a.v_)(e.$t("Participants"))+" ",1),Ps.item.maxCapacity?((0,s.uX)(),(0,s.CE)("span",pe," ("+(0,a.v_)(Is.seatsLeft)+" "+(0,a.v_)(e.$t("seats left"))+") ",1)):(0,s.Q3)("",!0)]),e.isGrantedOwner(Ps.item)&&"draft"!==Ps.item.status?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-size-7 is-clickable mb-1",onClick:t[23]||(t[23]=(...e)=>Is.toggleInviteInput&&Is.toggleInviteInput(...e))},(0,a.v_)(Ps.item.requiresRegistrationForm?e.$t("Invite"):e.$t("Add")),1)):(0,s.Q3)("",!0),e.isGrantedOwner(Ps.item)&&e.isNativeApp?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-size-7 is-clickable ml-2",onClick:t[24]||(t[24]=e=>Ps.showQRScanner=!0)},[(0,s.bF)(Us,{icon:"fa-light fa-qrcode",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Scan")),1)])):(0,s.Q3)("",!0)]),t[81]||(t[81]=(0,s.Lk)("hr",{class:"mt-0 mb-3"},null,-1)),Ps.showInviteInput&&e.isGrantedOwner(Ps.item)&&"draft"!==Ps.item.status?((0,s.uX)(),(0,s.CE)("div",he,[(0,s.bF)(Ds,{ref:"attendeeSearchMobile",item:Ps.item,label:Ps.item.requiresRegistrationForm?e.$t("Invite participant"):e.$t("Add attendee"),"include-minors":!0,loading:Ps.isAddingParticipant,"onUpdate:modelValue":t[25]||(t[25]=e=>Is.addParticipant(e))},null,8,["item","label","loading"]),(0,s.Lk)("a",{class:"is-size-7 is-clickable",onClick:t[26]||(t[26]=e=>Ps.showInviteModal=!0)},[(0,s.bF)(Us,{icon:"fa-light fa-envelope",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Invite by email")),1)])])):(0,s.Q3)("",!0),Ps.attenders.length?((0,s.uX)(),(0,s.CE)("div",ge,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.displayedAttenders,(t,i)=>((0,s.uX)(),(0,s.Wv)(Vs,{key:"member_mobile_"+(t.user?.id||t.external?.id),label:t.external?t.external.name:t.user?.fullName,position:"is-top",type:"is-dark"},{default:(0,s.k6)(()=>[!t.external&&t.user?((0,s.uX)(),(0,s.CE)("span",{key:0,class:"stacked-avatar is-clickable",style:(0,a.Tr)({zIndex:Is.displayedAttenders.length-i}),onClick:e=>Is.openUserProfile(t.user.id,t.user.fullName)},[(0,s.bF)(Xs,{item:t.user,"is-type":"roundSmall"},null,8,["item"])],12,fe)):t.external?((0,s.uX)(),(0,s.CE)("span",{key:1,class:(0,a.C4)(["stacked-avatar",{"is-clickable":e.isGranted("EVENT_TENANT",Ps.item?.localCenter)}]),style:(0,a.Tr)({zIndex:Is.displayedAttenders.length-i}),onClick:e=>Is.openContactProfile(t.external.id,t.external.name)},[(0,s.bF)(Xs,{item:t.external,"is-type":"roundSmall"},null,8,["item"])],14,be)):(0,s.Q3)("",!0)]),_:2},1032,["label"]))),128))])):(0,s.Q3)("",!0),Ps.attenders.length?((0,s.uX)(),(0,s.CE)("p",ye,[1===Ps.attenders.length?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[Is.firstAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-clickable",onClick:t[27]||
1(t[27]=e=>Is.openUserProfile(Ps.attenders[0].user.id,Ps.attenders[0].user.fullName))},(0,a.v_)(Is.firstAttenderName),1)):Is.firstAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-clickable",onClick:t[28]||(t[28]=e=>Is.openContactProfile(Ps.attenders[0].external.id,Ps.attenders[0].external.name))},(0,a.v_)(Is.firstAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",ve,(0,a.v_)(Is.firstAttenderName),1))],64)):2===Ps.attenders.length?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[Is.firstAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-clickable",onClick:t[29]||(t[29]=e=>Is.openUserProfile(Ps.attenders[0].user.id,Ps.attenders[0].user.fullName))},(0,a.v_)(Is.firstAttenderName),1)):Is.firstAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-clickable",onClick:t[30]||(t[30]=e=>Is.openContactProfile(Ps.attenders[0].external.id,Ps.attenders[0].external.name))},(0,a.v_)(Is.firstAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",ke,(0,a.v_)(Is.firstAttenderName),1)),(0,s.eW)(" "+(0,a.v_)(e.$t("and"))+" ",1),Is.secondAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"is-clickable",onClick:t[31]||(t[31]=e=>Is.openUserProfile(Ps.attenders[1].user.id,Ps.attenders[1].user.fullName))},(0,a.v_)(Is.secondAttenderName),1)):Is.secondAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:4,class:"is-clickable",onClick:t[32]||(t[32]=e=>Is.openContactProfile(Ps.attenders[1].external.id,Ps.attenders[1].external.name))},(0,a.v_)(Is.secondAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",Ce,(0,a.v_)(Is.secondAttenderName),1))],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[Is.firstAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:0,class:"is-clickable",onClick:t[33]||(t[33]=e=>Is.openUserProfile(Ps.attenders[0].user.id,Ps.attenders[0].user.fullName))},(0,a.v_)(Is.firstAttenderName)+", ",1)):Is.firstAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:1,class:"is-clickable",onClick:t[34]||(t[34]=e=>Is.openContactProfile(Ps.attenders[0].external.id,Ps.attenders[0].external.name))},(0,a.v_)(Is.firstAttenderName)+", ",1)):((0,s.uX)(),(0,s.CE)("span",Le,(0,a.v_)(Is.firstAttenderName)+",",1)),Is.secondAttenderIsUser?((0,s.uX)(),(0,s.CE)("a",{key:3,class:"is-clickable",onClick:t[35]||(t[35]=e=>Is.openUserProfile(Ps.attenders[1].user.id,Ps.attenders[1].user.fullName))},(0,a.v_)(Is.secondAttenderName),1)):Is.secondAttenderIsExternal&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.CE)("a",{key:4,class:"is-clickable",onClick:t[36]||(t[36]=e=>Is.openContactProfile(Ps.attenders[1].external.id,Ps.attenders[1].external.name))},(0,a.v_)(Is.secondAttenderName),1)):((0,s.uX)(),(0,s.CE)("span",we,(0,a.v_)(Is.secondAttenderName),1)),(0,s.eW)(" "+(0,a.v_)(e.$t("and"))+" ",1),e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.Wv)(Rs,{key:6,to:{name:"EventAttend",params:{item:Ps.item.uuid}}},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Ps.attendersTotal-2)+" "+(0,a.v_)(e.$t("others")),1)]),_:1},8,["to"])):((0,s.uX)(),(0,s.Wv)(Rs,{key:7,to:Is.othersRoute},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(Ps.attendersTotal-2)+" "+(0,a.v_)(e.$t("others")),1)]),_:1},8,["to"])),t[80]||(t[80]=(0,s.eW)(" . ",-1))],64))])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),!Ps.item.registrationManuallyClosed||Is.eventEnded(Ps.item)||Ps.isAttending?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",_e,[(0,s.Lk)("p",Ee,[(0,s.Lk)("span",$e,[(0,s.bF)(Us,{icon:"fa-light fa-lock"})]),(0,s.eW)(" "+(0,a.v_)(e.$t("Registrations are closed")),1)])])),Ps.item.hasEventTicketing||"published"!==Ps.item.status&&!Is.isDraftPreview||Is.eventEnded(Ps.item)||Ps.item.registrationManuallyClosed&&!Ps.isAttending?!Ps.item.hasEventTicketing&&"published"===Ps.item.status&&Ps.isAttending&&Ps.item.requiresRegistrationForm?((0,s.uX)(),(0,s.CE)("div",it,[(0,s.Lk)("span",st,[(0,s.Lk)("span",at,[(0,s.Lk)("span",nt,[(0,s.bF)(Us,{icon:"fa-light fa-circle-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Attending")),1)])])])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Fe,[(0,s.Lk)("h3",Te,(0,a.v_)(Ps.item.requiresRegistrationForm?e.$t("Registration"):e.$t("RSVP")),1),Ps.isCheckingAttendance?((0,s.uX)(),(0,s.CE)("div",Se,[(0,s.bF)(Ms,{"is-full-page":!1,active:!0})])):Is.isDraftPreview&&!Ps.item.requiresRegistrationForm?((0,s.uX)(),(0,s.CE)("div",Ae,[(0,s.Lk)("button",Pe,(0,a.v_)(e.$t("Registrations open when you publish")),1)])):Ps.item.requiresRegistrationForm||Ps.isAttending||!Is.isAtCapacity?Ps.item.requiresRegistrationForm||Ps.isAttending?!Ps.item.requiresRegistrationForm&&Ps.isAttending?((0,s.uX)(),(0,s.CE)("div",Qe,[(0,s.Lk)("div",{class:(0,a.C4)(["rsvp-status-row",{"has-inline-qr":Is.showInlineRsvpQr}])},[(0,s.bF)(Gs,{"aria-role":"list",position:"is-bottom-right",class:"rsvp-dropdown-inline",expanded:""},{trigger:(0,s.k6)(()=>[(0,s.Lk)("div",{class:(0,a.C4)(["rsvp-current-status is-clickable",[Is.rsvpStatusClass,{"is-loading":Ps.isLoading}]])},[(0,s.Lk)("span",Be,[(0,s.bF)(Us,{icon:Is.rsvpStatusIcon},null,8,["icon"])]),(0,s.Lk)("span",Ge,(0,a.v_)(Is.rsvpStatusText),1),(0,s.Lk)("span",We,[(0,s.bF)(Us,{icon:"fa-light fa-chevron-down"})])],2)]),default:(0,s.k6)(()=>[(0,s.bF)(Bs,{"aria-role":"listitem",class:(0,a.C4)({"is-active":Is.isRsvpGoing}),disabled:Is.isAtCapacity&&!Is.isRsvpGoing,onClick:t[39]||(t[39]=e=>Is.isAtCapacity&&!Is.isRsvpGoing?null:Is.updateAttend("attending"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",je,[(0,s.Lk)("span",ze,[(0,s.bF)(Us,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,[(0,s.eW)((0,a.v_)(e.$t("Going"))+" ",1),Is.isAtCapacity&&!Is.isRsvpGoing?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)("("+(0,a.v_)(e.$t("Full"))+")",1)],64)):(0,s.Q3)("",!0)])])]),_:1},8,["class","disabled"]),(0,s.bF)(Bs,{"aria-role":"listitem",class:(0,a.C4)({"is-active":Is.isRsvpMaybe}),onClick:t[40]||(t[40]=e=>Is.updateAttend("maybe"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",qe,[(0,s.Lk)("span",Je,[(0,s.bF)(Us,{icon:"fa-light fa-question"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Maybe")),1)])]),_:1},8,["class"]),(0,s.bF)(Bs,{"aria-role":"listitem",class:(0,a.C4)({"is-active":Is.isRsvpNotGoing}),onClick:t[41]||(t[41]=e=>Is.updateAttend("not_attending"))},{default:(0,s.k6)(()=>[(0,s.Lk)("span",He,[(0,s.Lk)("span",Ke,[(0,s.bF)(Us,{icon:"fa-light fa-xmark"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Not going")),1)])]),_:1},8,["class"])]),_:1}
1),Is.showInlineRsvpQr?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"rsvp-qr-inline",title:e.$t("Show this QR code at the entrance"),"aria-label":e.$t("Show this QR code at the entrance"),onClick:t[42]||(t[42]=e=>Ps.showQrModal=!0)},[(0,s.bF)(qs,{value:Is.ticketQrCodeUrl,size:40,level:"H","render-as":"svg"},null,8,["value"])],8,Ye)):(0,s.Q3)("",!0)],2)])):Ps.item.requiresRegistrationForm&&Ps.isAttending?((0,s.uX)(),(0,s.CE)(s.FK,{key:5},[Ps.myAttendances.length>1?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("p",Ze,(0,a.v_)(e.$t("You have {count} registrations",{count:Ps.myAttendances.length})),1),(0,s.bF)(Js,{attendances:Ps.myAttendances,"event-location":Ps.item.location},null,8,["attendances","event-location"])],64)):((0,s.uX)(),(0,s.Wv)(Hs,{key:1,ref:"registrationStatusBox","is-attending":Ps.isAttending,"ticket-qr-code-url":Is.ticketQrCodeUrl,"event-location":Ps.item.location,onAcceptInvitation:Is.handleAcceptInvitation,onDeclineInvitation:Is.handleDeclineInvitation},null,8,["is-attending","ticket-qr-code-url","event-location","onAcceptInvitation","onDeclineInvitation"]))],64)):Ps.item.requiresRegistrationForm&&!Ps.isAttending?((0,s.uX)(),(0,s.CE)("div",et,[(0,s.Lk)("button",{class:"button is-primary is-rounded is-fullwidth",onClick:t[43]||(t[43]=(...e)=>Is.openRegistrationModal&&Is.openRegistrationModal(...e))},[(0,s.Lk)("span",tt,[(0,s.bF)(Us,{icon:"fa-light fa-user-plus"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Register")),1)])])):(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",Ue,[(0,s.Lk)("div",De,[(0,s.Lk)("button",{class:(0,a.C4)(["button is-success is-rounded",{"is-loading":Ps.isLoading}]),disabled:Ps.isLoading,onClick:t[37]||(t[37]=e=>Is.updateAttend("attending"))},[(0,s.Lk)("span",Ve,[(0,s.bF)(Us,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Going")),1)],10,Xe),(0,s.Lk)("button",{class:(0,a.C4)(["button is-warning is-rounded",{"is-loading":Ps.isLoading}]),disabled:Ps.isLoading,onClick:t[38]||(t[38]=e=>Is.updateAttend("maybe"))},[(0,s.Lk)("span",Oe,[(0,s.bF)(Us,{icon:"fa-light fa-question"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Maybe")),1)],10,Re)])])):((0,s.uX)(),(0,s.CE)("div",Ie,[(0,s.Lk)("span",Me,[(0,s.bF)(Us,{icon:"fa-light fa-calendar-xmark"})]),(0,s.Lk)("p",xe,(0,a.v_)(e.$t("This event is full")),1),(0,s.Lk)("p",Ne,(0,a.v_)(e.$t("No seats available")),1)]))])),!Ps.item.hasEventTicketing||Is.eventEnded(Ps.item)||"draft"===Ps.item.status&&!Is.isDraftPreview||Ps.item.registrationManuallyClosed&&!Ps.isAttending||!(Ps.isAttending||Is.currentTickets.length>0||Is.upcomingTickets.length>0)?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)(s.FK,{key:5},[(0,s.Lk)("h3",ot,(0,a.v_)(Ps.isAttending?Ps.myAttendances.length>1?e.$t("Your tickets"):e.$t("Your ticket"):e.$t("Get tickets")),1),Ps.isCheckingAttendance?((0,s.uX)(),(0,s.CE)("div",lt,[(0,s.bF)(Ms,{"is-full-page":!1,active:!0})])):Ps.ticket||Ps.isAttending&&"attending"===Ps.isAttending.statusRsvp?((0,s.uX)(),(0,s.CE)("div",rt,[Ps.myAttendances.length>1?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("p",dt,(0,a.v_)(e.$t("You have {count} tickets for this event",{count:Ps.myAttendances.length})),1),(0,s.bF)(Js,{attendances:Ps.myAttendances,"event-location":Ps.item.location},null,8,["attendances","event-location"])],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[Ps.isAttending&&Ps.isAttending.productPrice?((0,s.uX)(),(0,s.CE)("div",ct,[(0,s.Lk)("div",ut,[(0,s.Lk)("div",null,[(0,s.Lk)("p",mt,(0,a.v_)(Ps.isAttending.productPrice?.name),1),(0,s.Lk)("p",pt,(0,a.v_)(e.$t("You have a ticket for this event")),1)]),(0,s.bF)(Ks,{class:"button is-success is-rounded is-small",loading:Ps.isDownloading,onClick:Is.downloadTicket},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ht,[(0,s.bF)(Us,{icon:"fa-light fa-download"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Download")),1)]),_:1},8,["loading","onClick"])])])):(0,s.Q3)("",!0),Ps.isAttending?((0,s.uX)(),(0,s.Wv)(Hs,{key:1,"is-attending":Ps.isAttending,"ticket-qr-code-url":Is.ticketQrCodeUrl,"event-location":Ps.item.location},null,8,["is-attending","ticket-qr-code-url","event-location"])):(0,s.Q3)("",!0)],64)),Is.currentTickets.length>0&&!Ps.ticketAvailability?.isFull&&!Ps.item.registrationManuallyClosed?((0,s.uX)(),(0,s.CE)("div",gt,[t[82]||(t[82]=(0,s.Lk)("hr",{class:"my-0 mb-4"},null,-1)),(0,s.Lk)("h4",ft,(0,a.v_)(e.$t("Buy more tickets")),1),(0,s.bF)(Ys,{modelValue:Ps.priceId,"onUpdate:modelValue":t[44]||(t[44]=e=>Ps.priceId=e),"current-tickets":Is.currentTickets,"upcoming-tickets":Is.upcomingTickets,"expired-tickets":Is.expiredTickets,"is-logged-in":!!e.user.id,availability:Ps.ticketAvailability,"multi-select":!Ps.item.settings?.singleTicketPurchase,selections:Ps.ticketSelections,"my-attendances":Ps.myAttend
1ances,class:"mb-4","onUpdate:selections":t[45]||(t[45]=e=>Ps.ticketSelections=e)},null,8,["modelValue","current-tickets","upcoming-tickets","expired-tickets","is-logged-in","availability","multi-select","selections","my-attendances"]),Is.totalTicketCount>0?((0,s.uX)(),(0,s.CE)("div",bt,[(0,s.Lk)("div",yt,[(0,s.Lk)("span",null,[(0,s.Lk)("strong",null,(0,a.v_)(Is.totalTicketCount),1),(0,s.eW)(" "+(0,a.v_)(1===Is.totalTicketCount?e.$t("ticket"):e.$t("tickets")),1)]),(0,s.Lk)("span",vt,[Is.totalTicketPrice>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$filters.money(Is.totalTicketPrice,Ps.ticketSelections[0]?.currency)),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(e.$t("Free")),1)],64))])])])):(0,s.Q3)("",!0),(0,s.Lk)("button",{class:"button is-primary is-rounded is-fullwidth",disabled:0===Is.totalTicketCount,onClick:t[46]||(t[46]=(...e)=>Is.proceedToCheckoutModal&&Is.proceedToCheckoutModal(...e))},[(0,s.Lk)("span",Ct,[(0,s.bF)(Us,{icon:"fa-light fa-ticket"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Continue")),1)],8,kt)])):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.bF)(Ys,{modelValue:Ps.priceId,"onUpdate:modelValue":t[47]||(t[47]=e=>Ps.priceId=e),"current-tickets":Is.currentTickets,"upcoming-tickets":Is.upcomingTickets,"expired-tickets":Is.expiredTickets,"is-logged-in":!!e.user.id,availability:Ps.ticketAvailability,"multi-select":!Ps.item.settings?.singleTicketPurchase,selections:Ps.ticketSelections,class:"mb-4","onUpdate:selections":t[48]||(t[48]=e=>Ps.ticketSelections=e)},null,8,["modelValue","current-tickets","upcoming-tickets","expired-tickets","is-logged-in","availability","multi-select","selections"]),Is.totalTicketCount>0?((0,s.uX)(),(0,s.CE)("div",Lt,[(0,s.Lk)("div",wt,[(0,s.Lk)("span",null,[(0,s.Lk)("strong",null,(0,a.v_)(Is.totalTicketCount),1),(0,s.eW)(" "+(0,a.v_)(1===Is.totalTicketCount?e.$t("ticket"):e.$t("tickets")),1)]),(0,s.Lk)("span",_t,[Is.totalTicketPrice>0?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.eW)((0,a.v_)(e.$filters.money(Is.totalTicketPrice,Ps.ticketSelections[0]?.currency)),1)],64)):((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[(0,s.eW)((0,a.v_)(e.$t("Free")),1)],64))])])])):(0,s.Q3)("",!0),Is.currentTickets.length>0?((0,s.uX)(),(0,s.CE)("button",{key:1,class:"button is-primary is-rounded is-fullwidth mb-3",disabled:0===Is.totalTicketCount,onClick:t[49]||(t[49]=(...e)=>Is.proceedToCheckoutModal&&Is.proceedToCheckoutModal(...e))},[(0,s.Lk)("span",$t,[(0,s.bF)(Us,{icon:"fa-light fa-ticket"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Continue")),1)],8,Et)):(0,s.Q3)("",!0)],64))],64)),(0,s.bF)(Zs,{event:Ps.item,"is-publishing":Ps.isLoading,onPublish:Is.publishEvent,onPreview:Is.openPublicPreview,onShare:t[50]||(t[50]=e=>Ps.showSharePreviewModal=!0)},null,8,["event","is-publishing","onPublish","onPreview"]),e.isGrantedOwner(Ps.item)&&"published"===Ps.item.status?((0,s.uX)(),(0,s.CE)("div",Ft,[e.tenant.settingFeatures.events.sendBulkInvites&&null===Ps.item.invitesSent?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-info is-rounded is-small",disabled:Ps.isLoading,onClick:t[51]||(t[51]=(...e)=>Is.confirmSendInvites&&Is.confirmSendInvites(...e))},[(0,s.Lk)("span",St,[(0,s.Lk)("span",At,[(0,s.bF)(Us,{icon:"fa-light fa-envelope"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Send Invites to All Members")),1)])],8,Tt)):e.tenant.settingFeatures.events.sendBulkInvites&&!1===Ps.item.invitesSent?((0,s.uX)(),(0,s.CE)("span",Pt,[(0,s.Lk)("span",It,[(0,s.Lk)("span",Mt,[(0,s.bF)(Us,{icon:"fa-light fa-spinner-third",spin:""})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Sending invites...")),1)])])):e.tenant.settingFeatures.events.sendBulkInvites&&Ps.item.invitesSent?((0,s.uX)(),(0,s.CE)("span",xt,[(0,s.Lk)("span",Nt,[(0,s.Lk)("span",Ut,[(0,s.bF)(Us,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Invites have been sent to all members")),1)])])):(0,s.Q3)("",!0),e.isNativeApp?((0,s.uX)(),(0,s.Wv)(Ks,{key:3,class:"is-rounded is-primary is-outlined is-small",onClick:t[52]||(t[52]=e=>Ps.showQRScanner=!0)},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Dt,[(0,s.bF)(Us,{icon:"fa-light fa-qrcode"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Scan QR Code")),1)]),_:1})):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),Ps.item.placeLatitude&&Ps.item.placeLongitude?((0,s.uX)(),(0,s.Wv)(ea,{key:7,"place-latitude":Ps.item.placeLatitude,"place-longitude":Ps.item.placeLongitude,"places-api-id":Ps.item.placesApiId,class:"mt-5"},null,8,["place-latitude","place-longitude","places-api-id"])):(0,s.Q3)("",!0),(0,s.bF)(ta,{description:Ps.item.description,sdg:Ps.item.sdg,"show-sdg":e.tenant.settingFeatures.events.hasSDG,class:"mt-5"},null,8,["description","sdg","show-sdg"]),!Ps.subEvents.length&&Ps.item.agendaItems&&Ps.item.agendaItems.length>0?((0,s.uX)(),(0,s.CE)("div",Xt,[(0,s.Lk)("div",Vt,[(0,s.Lk)("p",Rt,(0,a.v_)(e.$t("Agenda")),1),e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.Wv)(Rs,{key:0,to:{name:"EventAgenda",params:{item:Ps.item.uuid}},class:"is-size-7"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t("Manage")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),t[84]||(t[84]=(0,s.Lk)("hr",{class:"mt-0 mb-4"},null,-1)),(0,s.Q3)("",!0),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.agendaByDay,(i,o)=>((0,s.uX)(),(0,s.CE)("div",{key:o,class:"agenda-readonly-day-group"},[(0,s.Lk)("div",Ot,[(0,s.Lk)("span",Qt,[(0,s.bF)(Us,{icon:"fa-light fa-calendar-day"})]),(0,s.Lk)("span",null,(0,a.v_)(i.label),1)]),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(i.items,i=>((0,s.uX)(),(0,s.CE)("div",{key:i.id,class:"agenda-readonly-item"},[(0,s.Lk)("div",{class:"agenda-readonly-header",onClick:e=>Is.isAgendaExpandable(i)?Is.toggleAgendaExpand(i.id):null},[(0,s.Lk)("div",Gt,[(0,s.Lk)("div",Wt,[(0,s.Lk)("span",jt,(0,a.v_)(e.$filters.format(i.timeStart,"HH:mm")),1),t[83]||(t[83]=(0,s.Lk)("span",{class:"agenda-readonly-time-sep"},"â",-1)),(0,s.Lk)("span",zt,(0,a.v_)(e.$filters.format(i.timeEnd,"HH:mm")),1),Is.isAgendaMultiDay(i)?((0,s.uX)(),(0,s.CE)("span",qt,(0,a.v_)(e.$filters.format(i.timeEnd,"shortDate")),1)):(0,s.Q3)("",!0)]),(0,s.Lk)("p",Jt,(0,a.v_)(i.title),1),i.description&&!Is.isAgendaExpandable(i)?((0,s.uX)(),(0,s.CE)("p",Ht,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0),Is.isAgendaExpandable(i)&&!Ps.expandedAgendaItems[i.id]?((0,s.uX)(),(0,s.CE)("p",Kt,(0,a.v_)(i.description),1)):(0,s.Q3)("",!0)])],8,Bt),(0,s.bF)(n.eB,{name:"agenda-collapse"},{default:(0,s.k6)(()=>[Is.isAgendaExpandable(i)&&Ps.expandedAgendaItems[i.id]?((0,s.uX)(),(0,s.CE)("div",Yt,[(0,s.Lk)("p",Zt,(0,a.v_)(i.description),1)])):(0,s.Q3)("",!0)]),_:2},1024)]))),128))]))),128))])):(0,s.Q3)("",!0),Ps.item.settings&&Ps.item.settings.enableSpeakers&&Ps.speakers.length>0?((0,s.uX)(),(0,s.CE)("div",ei,[(0,s.Lk)("div",ti,[(0,s.Lk)("p",ii,(0,a.v_)(Ps.speakersTotal)+" "+(0,a.v_)(e.$t("Speakers")),1),Ps.speakersTotal>4||e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.Wv)(Rs,{key:0,to:{name:"EventSpeakers",params:{item:Ps.item.uuid}},class:"is-size-7"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.isGrantedOwner(Ps.item)?e.$t("Manage"):e.$t("See all")),1)]),_:1},8,["to"])):(0,s.Q3)("",!0)]),t[85]||(t[85]=(0,s.Lk)("hr",{class:"mt-0 mb-4"},null,-1)),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.speakersGroupedByDay,(e,t)=>((0,s.uX)(),(0,s.CE)("div",{key:t,class:"speakers-day-group mb-4"},[Object.keys(Is.speakersGroupedByDay).length>1?((0,s.uX)(),(0,s.CE)("div",si,[(0,s.Lk)("span",ai,[(0,s.bF)(Us,{icon:"fa-light fa-calendar-day"})]),(0,s.Lk)("span",ni,(0,a.v_)(e.label),1)])):(0,s.Q3)("",!0),(0,s.Lk)("div",oi,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.speakers.slice(0,4),e=>((0,s.uX)(),(0,s.Wv)(sa,{key:e.id,speaker:e,"is-editable":!1,"show-bio":!0,size:"medium",class:"mb-2 is-clickable",onClick:t=>Is.openSpeakerDetail(e)},null,8,["speaker","onClick"]))),128))])]))),128))])):(0,s.Q3)("",!0)],512),[[n.aG,"details"===Ps.activeEventTab||!Ps.subEvents.length&&!Is.showVotesTab]]),Ps.subEvents.length>0?(0,s.bo)(((0,s.uX)(),(0,s.CE)("div",li,[(0,s.bF)(aa,{event:Ps.item,items:Ps.subEvents,attendance:e.subEventAttendance,loading:e.subEventAttendLoading,permission:Ps.isAttending?"registered":"public","show-share":!1,timezone:Ps.selectedTimezone,onAttend:e.handleAttendSubEvent,onUnattend:Is.unattendSubEvent,onSpeakerClick:t[56]||
1(t[56]=e=>Is.openSubEventSpeakers(e.item,e.speaker))},{"item-actions":(0,s.k6)(({subEvent:t,isAttending:i,isLoading:o})=>[Ps.isAttending?((0,s.uX)(),(0,s.CE)("div",ri,[(0,s.bF)(ia,{"is-attending":i,"is-loading":o,onAttend:i=>e.handleAttendSubEvent(t),onUnattend:e=>Is.unattendSubEvent(t)},null,8,["is-attending","is-loading","onAttend","onUnattend"]),Ps.subEventAttendeeCounts[t.uuid]?((0,s.uX)(),(0,s.CE)("div",{key:0,class:(0,a.C4)(["se-attendees",{"is-clickable":e.isGrantedOwner(Ps.item)}]),onClick:(0,n.D$)(i=>e.isGrantedOwner(Ps.item)?Is.handleSubEventAttendeesClick(t):null,["stop"])},[(0,s.Lk)("span",ci,[(0,s.eW)((0,a.v_)(Ps.subEventAttendeeCounts[t.uuid])+" "+(0,a.v_)(e.$t("going"))+" ",1),e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.Wv)(Us,{key:0,icon:"fa-light fa-arrow-right",size:"xs",class:"ml-1"})):(0,s.Q3)("",!0)])],10,di)):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)]),_:1},8,["event","items","attendance","loading","permission","timezone","onAttend","onUnattend"])],512)),[[n.aG,"agenda"===Ps.activeEventTab]]):(0,s.Q3)("",!0),Is.showVotesTab?(0,s.bo)(((0,s.uX)(),(0,s.CE)("div",ui,[(0,s.bF)(na,{ref:"eventVoteList","event-uuid":i.eventUuid,"event-id":String(Ps.item.id),"hide-create":!0,"exclude-draft":!0,"hide-filters":!0},null,8,["event-uuid","event-id"])],512)),[[n.aG,"votes"===Ps.activeEventTab]]):(0,s.Q3)("",!0)],2),!(e.isGrantedOwner(Ps.item)||Ps.eventFiles.length||Is.eventPhotosUrls.length||Ps.eventVideos.length)||"details"!==Ps.activeEventTab&&(Ps.subEvents.length||Is.showVotesTab)?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",mi,[(0,s.Lk)("p",pi,(0,a.v_)(e.$t("Media")),1),t[86]||(t[86]=(0,s.Lk)("hr",{class:"mt-0 mb-4"},null,-1)),e.isGrantedOwner(Ps.item)||e.isGranted("EVENT_TENANT",Ps.item.localCenter)?((0,s.uX)(),(0,s.CE)("p",hi,[(0,s.Lk)("span",gi,[(0,s.Lk)("span",fi,[(0,s.bF)(Us,{icon:"fa-light fa-lock"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Media files are only visible to authenticated users")),1)])])):(0,s.Q3)("",!0),Ps.isUploading?((0,s.uX)(),(0,s.CE)("div",bi,[(0,s.Lk)("div",yi,[(0,s.Lk)("span",vi,(0,a.v_)(e.$t("Uploading files"))+"...",1),(0,s.Lk)("span",ki,(0,a.v_)(Ps.uploadProgress.current)+" / "+(0,a.v_)(Ps.uploadProgress.total)+" "+(0,a.v_)(e.$t("files")),1)]),(0,s.Lk)("div",Ci,[(0,s.Lk)("div",Li,[(0,s.Lk)("div",{class:"progress-bar-fill",style:(0,a.Tr)({width:Ps.uploadProgress.percentage+"%"})},null,4)]),(0,s.Lk)("span",wi,(0,a.v_)(Math.round(Ps.uploadProgress.percentage))+"%",1)]),(0,s.Lk)("div",_i,[Ps.uploadProgress.currentFileName?((0,s.uX)(),(0,s.CE)("div",Ei,(0,a.v_)(e.$t("Current file"))+": "+(0,a.v_)(Ps.uploadProgress.currentFileName),1)):(0,s.Q3)("",!0),Ps.uploadProgress.timeRemaining?((0,s.uX)(),(0,s.CE)("div",$i,(0,a.v_)(e.$t("Time remaining"))+": "+(0,a.v_)(Is.formatTimeRemaining(Ps.uploadProgress.timeRemaining)),1)):(0,s.Q3)("",!0)])])):(0,s.Q3)("",!0),e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.CE)("div",Fi,[(0,s.Lk)("div",Ti,[(0,s.bF)(la,null,{default:(0,s.k6)(()=>[(0,s.bF)(oa,{modelValue:Ps.eventPhotosUpload,"onUpdate:modelValue":[t[57]||(t[57]=e=>Ps.eventPhotosUpload=e),t[58]||(t[58]=e=>Is.upload("eventimage"))],multiple:"","drag-drop":"",accept:"image/*",disabled:Ps.isUploading,expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("p",Si,[(0,s.Lk)("span",Ai,[(0,s.bF)(Us,{icon:"fa-light fa-image"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("photos")),1),Is.eventPhotosUrls?.length?((0,s.uX)(),(0,s.CE)("span",Pi,"("+(0,a.v_)(Is.eventPhotosUrls.length)+")",1)):(0,s.Q3)("",!0)])]),_:1},8,["modelValue","disabled"])]),_:1})]),(0,s.Lk)("div",Ii,[(0,s.bF)(la,null,{default:(0,s.k6)(()=>[(0,s.bF)(oa,{modelValue:Ps.eventVideosUpload,"onUpdate:modelValue":[t[59]||(t[59]=e=>Ps.eventVideosUpload=e),t[60]||(t[60]=e=>Is.upload("eventvideo"))],multiple:"","drag-drop":"",accept:"video/*",disabled:Ps.isUploading,expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("p",Mi,[(0,s.Lk)("span",xi,[(0,s.bF)(Us,{icon:"fa-light fa-video"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Video")),1),Ps.eventVideos?.length?((0,s.uX)(),(0,s.CE)("span",Ni,"("+(0,a.v_)(Ps.eventVideos.length)+")",1)):(0,s.Q3)("",!0)])]),_:1},8,["modelValue","disabled"])]),_:1})]),(0,s.Lk)("div",Ui,[(0,s.bF)(la,null,{default:(0,s.k6)(()=>[(0,s.bF)(oa,{modelValue:Ps.eventFilesUpload,"onUpdate:modelValue":[t[61]||(t[61]=e=>Ps.eventFilesUpload=e),t[62]||(t[62]=e=>Is.upload("eventfile"))],multiple:"","drag-drop":"",disabled:Ps.isUploading,expanded:""},{default:(0,s.k6)(()=>[(0,s.Lk)("p",Di,[(0,s.Lk)("span",Xi,[(0,s.bF)(Us,{icon:"fa-light fa-folder"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("files")),1),Ps.eventFiles?.length?((0,s.uX)(),(0,s.CE)("span",Vi,"("+(0,a.v_)(Ps.eventFiles.length)+")",1)):(0,s.Q3)("",!0)])]),_:1},8,["modelValue","disabled"])]),_:1})])])):(0,s.Q3)("",!0),Ps.eventFiles.length?((0,s.uX)(),(0,s.CE)("section",Ri,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ps.eventFiles,(t,i)=>((0,s.uX)(),(0,s.CE)("div",{key:i,class:"is-flex is-justify-content-space-between py-3",style:{"border-bottom":"1px solid var(--border-color, #eee)"}},[(0,s.Lk)("a",{class:"icon-text",target:"_blank",href:Is.mediaSrc(t)},[(0,s.Lk)("span",Qi,[(0,s.bF)(Us,{icon:"fa-light fa-file"})]),(0,s.Lk)("span",null,(0,a.v_)(t.originalName),1)],8,Oi),e.isGrantedOwner(Ps.item)?((0,s.uX)(),(0,s.CE)("button",{key:0,class:"button is-small is-ghost is-rounded",onClick:e=>Is.deleteEventMedia(t,i,"files")},[(0,s.Lk)("span",Gi,[(0,s.bF)(Us,{icon:"fa-light fa-trash"})])],8,Bi)):(0,s.Q3)("",!0)]))),128))])):(0,s.Q3)("",!0),(0,s.bF)(ra,{photos:Ps.eventPhotos,videos:Ps.eventVideos,editable:e.isGrantedOwner(Ps.item)||e.isGranted("EVENT_TENANT",Ps.item.localCenter),class:"mt-5",onDeletePhoto:t[63]||(t[63]=(e,t)=>Is.deleteEventMedia(e,t,"photos")),onDeleteVideo:t[64]||(t[64]=(e,t)=>Is.deleteEventMedia(e,t,"videos"))},null,8,["photos","videos","editable"])])),e.tenant.settingFeatures.events.hasEventReport&&(e.isGranted("HR_LOCAL")||Ps.item.owner)&&Is.eventReportHasValues?((0,s.uX)(),(0,s.CE)("div",Wi,[(0,s.Lk)("p",ji,(0,a.v_)(e.$t("Event Report")),1),t[87]||(t[87]=(0,s.Lk)("hr",{class:"mt-0 mb-4"},null,-1)),Ps.item.goal?((0,s.uX)(),(0,s.CE)("div",zi,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("goals"))+":",1),(0,s.Lk)("p",qi,(0,a.v_)(Is.nl2br(Ps.item.goal)),1)])):(0,s.Q3)("",!0),Ps.item.activities?((0,s.uX)(),(0,s.CE)("div",Ji,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("activities"))+":",1),(0,s.Lk)("p",Hi,(0,a.v_)(Is.nl2br(Ps.item.activities)),1)])):(0,s.Q3)("",!0),Ps.item.advertising?((0,s.uX)(),(0,s.CE)("div",Ki,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("advertising"))+":",1),(0,s.Lk)("p",Yi,(0,a.v_)(Is.nl2br(Ps.item.advertising)),1
1)])):(0,s.Q3)("",!0),Ps.item.budget?((0,s.uX)(),(0,s.CE)("div",Zi,[(0,s.Lk)("strong",null,(0,a.v_)(e.$t("budget"))+":",1),(0,s.Lk)("p",null,(0,a.v_)(Is.nl2br(Ps.item.budget)),1)])):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0)],2)],2)])):(0,s.Q3)("",!0),Ps.item&&!Ps.item.hasEventTicketing&&Ps.item.requiresRegistrationForm?((0,s.uX)(),(0,s.Wv)(da,{key:1,active:Ps.showFreeEventCheckoutModal,event:Is.eventWithFormConfig,"current-tickets":[],"upcoming-tickets":[],"expired-tickets":[],availability:null,"is-logged-in":!!e.user.id,user:e.user,"initial-selections":[],"is-free-event":!0,"is-preview":Is.isDraftPreview,onClose:t[65]||(t[65]=e=>Ps.showFreeEventCheckoutModal=!1),onSuccess:Is.onFreeEventRegistrationSuccess},null,8,["active","event","is-logged-in","user","is-preview","onSuccess"])):(0,s.Q3)("",!0),(0,s.bF)(ma,{modelValue:Ps.showProfileModal,"onUpdate:modelValue":t[66]||(t[66]=e=>Ps.showProfileModal=e),title:Ps.selectedProfileName,"modal-width":900},{default:(0,s.k6)(()=>[Ps.selectedUserId?((0,s.uX)(),(0,s.Wv)(ca,{key:0,"user-id":Ps.selectedUserId,onLoaded:Is.onProfileLoaded},null,8,["user-id","onLoaded"])):Ps.selectedContactId&&e.isGranted("EVENT_TENANT",Ps.item?.localCenter)?((0,s.uX)(),(0,s.Wv)(ua,{key:1,"contact-id":Ps.selectedContactId},null,8,["contact-id"])):(0,s.Q3)("",!0)]),_:1},8,["modelValue","title"]),(0,s.bF)(ma,{modelValue:Ps.showSubEventAttendeesModal,"onUpdate:modelValue":t[67]||(t[67]=e=>Ps.showSubEventAttendeesModal=e),title:Ps.subEventAttendeesTitle,"modal-width":500,onClose:t[68]||(t[68]=e=>Ps.showSubEventAttendeesModal=!1)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",es,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Ps.subEventAttendeesList,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.id,class:"is-flex is-align-items-center gap-3 p-3 mb-2 se-attendee-card is-clickable",onClick:t=>e.user?Is.openUserProfile(e.user.id,e.user.fullName):null},[(0,s.bF)(Xs,{item:e.user||e.external||{},"is-type":"roundSmall"},null,8,["item"]),(0,s.Lk)("div",is,[(0,s.Lk)("div",ss,(0,a.v_)(e.user?e.user.fullName:e.external?.name),1),e.user?.professionHeadline?((0,s.uX)(),(0,s.CE)("div",as,(0,a.v_)(e.user.professionHeadline),1)):(0,s.Q3)("",!0)])],8,ts))),128)),Ps.subEventAttendeesList.length?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("p",ns,(0,a.v_)(e.$t("No attendees yet")),1))])]),_:1},8,["modelValue","title"]),Ps.focusedSpeaker?((0,s.uX)(),(0,s.Wv)(ma,{key:2,modelValue:Ps.showSubEventSpeakersModal,"onUpdate:modelValue":t[69]||(t[69]=e=>Ps.showSubEventSpeakersModal=e),title:Ps.focusedSpeaker.speakerName,"modal-width":600,"hide-header-back":"",onClose:t[70]||(t[70]=e=>{Ps.showSubEventSpeakersModal=!1,Ps.focusedSpeaker=null})},{default:(0,s.k6)(()=>[(0,s.Lk)("div",os,[(0,s.bF)(n.eB,{name:"se-view",mode:"out-in"},{default:(0,s.k6)(()=>[((0,s.uX)(),(0,s.CE)("div",{key:Ps.focusedSpeaker.id},[(0,s.Lk)("div",ls,[(0,s.bF)(Xs,{item:Is.getSpeakerModalItem(Ps.focusedSpeaker),"is-type":"roundLarge",class:"se-speaker-focus-avatar"},null,8,["item"]),Ps.focusedSpeaker.speakerHeadline?((0,s.uX)(),(0,s.CE)("p",rs,(0,a.v_)(Ps.focusedSpeaker.speakerHeadline),1)):(0,s.Q3)("",!0),Ps.focusedSpeaker.speakerBio?((0,s.uX)(),(0,s.CE)("p",ds,(0,a.v_)(Ps.focusedSpeaker.speakerBio),1)):(0,s.Q3)("",!0)]),Is.focusedSpeakerSessionsByDay.length?((0,s.uX)(),(0,s.CE)("div",cs,[(0,s.Lk)("h4",us,(0,a.v_)(e.$t("Sessions")),1),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.focusedSpeakerSessionsByDay,e=>((0,s.uX)(),(0,s.CE)("div",{key:e.dayKey,class:"se-speaker-day-group"},[Is.focusedSpeakerSessionsByDay.length>1||e.label?((0,s.uX)(),(0,s.CE)("div",ms,(0,a.v_)(e.label),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",ps,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(e.sessions,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.uuid,type:"button",class:"se-speaker-session-card",onClick:t=>Is.goToSpeakerSession(e)},[(0,s.Lk)("div",gs,(0,a.v_)(Is.formatSessionTime(e)),1),(0,s.Lk)("div",fs,[(0,s.Lk)("strong",null,(0,a.v_)(e.name),1),e.location?((0,s.uX)(),(0,s.CE)("span",bs,[(0,s.bF)(Us,{icon:"fa-light fa-location-dot",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.location),1)])):(0,s.Q3)("",!0)])],8,hs))),128))])]))),128))])):(0,s.Q3)("",!0),Is.focusedSpeakerCoSpeakers.length?((0,s.uX)(),(0,s.CE)("div",ys,[(0,s.Lk)("h4",vs,(0,a.v_)(e.$t("Other speakers")),1),(0,s.Lk)("div",ks,[((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(Is.focusedSpeakerCoSpeakers,e=>((0,s.uX)(),(0,s.CE)("button",{key:e.id,type:"button",class:"se-speaker-co-chip",onClick:t=>Ps.focusedSpeaker=e},[(0,s.bF)(Xs,{item:Is.getSpeakerModalItem(e),"is-type":"roundSmall","is-inline":""},null,8,["item"]),(0,s.Lk)("div",Ls,[(0,s.Lk)("strong",null,(0,a.v_)(e.speakerName),1),e.speakerHeadline?((0,s.uX)(),(0,s.CE)("span",ws,(0,a.v_)(e.speakerHeadline),1)):(0,s.Q3)("",!0)])],8,Cs))),128))])])):(0,s.Q3)("",!0)]))]),_:1})])]),_:1},8,["modelValue","title"])):(0,s.Q3)("",!0),Ps.item?((0,s.uX)(),(0,s.Wv)(da,{key:3,active:Ps.showCheckoutModal,event:Is.eventWithFormConfig,"current-tickets":Is.currentTickets,"upcoming-tickets":Is.upcomingTickets,"expired-tickets":Is.expiredTickets,availability:Ps.ticketAvailability,"is-logged-in":!!e.user.id,user:e.user,"initial-selections":Ps.checkoutSelections,"start-at-details":!0,"is-
1preview":Is.isDraftPreview,onClose:t[71]||(t[71]=e=>Ps.showCheckoutModal=!1),onSuccess:Is.onCheckoutSuccess},null,8,["active","event","current-tickets","upcoming-tickets","expired-tickets","availability","is-logged-in","user","initial-selections","is-preview","onSuccess"])):(0,s.Q3)("",!0),Ps.item&&Is.isDraftPreview&&Ps.item.isPublic?((0,s.uX)(),(0,s.Wv)(pa,{key:4,modelValue:Ps.showSharePreviewModal,"onUpdate:modelValue":t[72]||(t[72]=e=>Ps.showSharePreviewModal=e),"event-uuid":Ps.item.uuid,"event-name":Ps.item.name},null,8,["modelValue","event-uuid","event-name"])):(0,s.Q3)("",!0),Ps.showQRScanner?((0,s.uX)(),(0,s.Wv)(ha,{key:5,modelValue:Ps.showQRScanner,"onUpdate:modelValue":t[73]||(t[73]=e=>Ps.showQRScanner=e),onCheckedIn:Is.onQRCheckedIn},null,8,["modelValue","onCheckedIn"])):(0,s.Q3)("",!0),(0,s.bF)(fa,{modelValue:Ps.showInviteModal,"onUpdate:modelValue":t[75]||(t[75]=e=>Ps.showInviteModal=e),"has-modal-card":"","aria-label":e.$t("Invite participant")},{default:(0,s.k6)(()=>[(0,s.Lk)("div",_s,[(0,s.Lk)("header",Es,[(0,s.Lk)("p",$s,(0,a.v_)(e.$t("Invite participant")),1),(0,s.Lk)("button",{type:"button",class:"delete",onClick:t[74]||(t[74]=e=>Ps.showInviteModal=!1)})]),(0,s.Lk)("section",Fs,[Ps.item?((0,s.uX)(),(0,s.Wv)(ga,{key:0,"event-uuid":Ps.item.uuid,"event-id":Ps.item.id,onSubmitComplete:Is.onInviteComplete},null,8,["event-uuid","event-id","onSubmitComplete"])):(0,s.Q3)("",!0)])])]),_:1},8,["modelValue","aria-label"]),(0,s.bF)(fa,{modelValue:Ps.showQrModal,"onUpdate:modelValue":t[76]||(t[76]=e=>Ps.showQrModal=e),width:380,scroll:"keep","aria-label":e.$t("Show this QR code at the entrance")},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Ts,[Is.ticketQrCodeUrl?((0,s.uX)(),(0,s.Wv)(qs,{key:0,value:Is.ticketQrCodeUrl,size:320,level:"H","render-as":"svg"},null,8,["value"])):(0,s.Q3)("",!0),(0,s.Lk)("p",Ss,(0,a.v_)(e.$t("Show this QR code at the entrance")),1)])]),_:1},8,["modelValue","aria-label"])])}i(44114),i(18111),i(22489),i(20116),i(7588),i(61701),i(18237),i(13579),i(14603),i(47566),i(98721);var Ps=i(40834),Is=i(95256),Ms=i(31823),xs=i(2594),Ns=i(95439),Us=i(14977),Ds=i(28782),Xs=i(84743),Vs=i.n(Xs),Rs=i(95093),Os=i(61273),Qs=i(9897),Bs=i(81320),Gs=i(28994),Ws=i(25889),js=i(7151);const zs={class:"button is-text is-small is-rounded"},qs={class:"icon is-small"},Js={class:"icon-text"},Hs={class:"icon is-small"},Ks={class:"icon-text"},Ys={class:"icon is-small"},Zs={class:"icon-text"},ea={class:"icon is-small"},ta={class:"icon-text"},ia={class:"icon is-small"};function sa(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon"),d=(0,s.g2)("b-dropdown-item"),c=(0,s.g2)("b-dropdown");return(0,s.uX)(),(0,s.Wv)(c,{"aria-role":"list",position:"is-bottom-right",triggers:["hover","click"],class:"event-calendar-dropdown"},{trigger:(0,s.k6)(()=>[(0,s.Lk)("button",zs,[(0,s.Lk)("span",qs,[(0,s.bF)(r,{icon:"fa-light fa-calendar-plus"})])])]),default:(0,s.k6)(()=>[(0,s.bF)(d,{"aria-role":"listitem",onClick:l.addToGoogleCalendar},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Js,[(0,s.Lk)("span",Hs,[(0,s.bF)(r,{icon:"fa-brands fa-google"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Google")),1)])]),_:1},8,["onClick"]),(0,s.bF)(d,{"aria-role":"listitem",onClick:l.addToYahooCalendar},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Ks,[(0,s.Lk)("span",Ys,[(0,s.bF)(r,{icon:"fa-brands fa-yahoo"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Yahoo")),1)])]),_:1},8,["onClick"]),(0,s.bF)(d,{"aria-role":"listitem",onClick:l.addToOutlookCalendar},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Zs,[(0,s.Lk)("span",ea,[(0,s.bF)(r,{icon:"fa-light fa-calendar"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Outlook")),1)])]),_:1},8,["onClick"]),(0,s.bF)(d,{"aria-role":"listitem",onClick:l.generateICS},{default:(0,s.k6)(()=>[(0,s.Lk)("span",ta,[(0,s.Lk)("span",ia,[(0,s.bF)(r,{icon:"fa-light fa-download"})]),t[0]||(t[0]=(0,s.Lk)("span",null,".ics",-1))])]),_:1},8,["onClick"])]),_:1})}var aa={name:"EventCalendarDropdown",props:{event:{type:Object,required:!0},dateTimeBegin:{type:String,required:!0},dateTimeEnd:{type:String,default:null},timezone:{type:String,default:"UTC"}},methods:{addToGoogleCalendar(){const e=Vs()(this.dateTimeBegin).format("YYYYMMDDTHHmmss"),t=Vs()(this.dateTimeEnd||this.dateTimeBegin).format("YYYYMMDDTHHmmss"),i="https://calendar.google.com/calendar/render?action=TEMPLATE",s=`&text=${this.encodeValue(this.event.name)}`,a=`&dates=${e}/${t}`,n=`&ctz=${this.encodeValue(this.timezone)}`,o=this.event.description?`&details=${this.encodeValue(this.stripHtml(this.event.description))}`:"",l=this.event.location||this.event.meet||"",r=l?`&location=${this.encodeValue(l)}`:"",d=`${i}${s}${a}${n}${o}${r}`;window.open(d,"_blank")}
1,addToYahooCalendar(){const e=Vs().tz(this.dateTimeBegin,this.timezone).utc().format("YYYYMMDDTHHmmss[Z]"),t=Vs().tz(this.dateTimeEnd||this.dateTimeBegin,this.timezone).utc().format("YYYYMMDDTHHmmss[Z]"),i="https://calendar.yahoo.com/?v=60&view=d&type=20",s=`&TITLE=${this.encodeValue(this.event.name)}`,a=`&ST=${e}&ET=${t}`,n=this.event.description?`&DESC=${this.encodeValue(this.stripHtml(this.event.description))}`:"",o=this.event.location||this.event.meet||"",l=o?`&IN_LOC=${this.encodeValue(o)}`:"",r=`${i}${s}${a}${n}${l}`;window.open(r,"_blank")},addToOutlookCalendar(){const e=Vs().tz(this.dateTimeBegin,this.timezone).utc().format("YYYY-MM-DDTHH:mm:ss"),t=Vs().tz(this.dateTimeEnd||this.dateTimeBegin,this.timezone).utc().format("YYYY-MM-DDTHH:mm:ss"),i="https://outlook.live.com/calendar/0/deeplink/compose?path=/calendar/action/compose&rru=addevent",s=`&subject=${this.encodeValue(this.event.name)}`,a=`&startdt=${this.encodeValue(e)}`,n=`&enddt=${this.encodeValue(t)}`,o=this.event.description?`&body=${this.encodeValue(this.stripHtml(this.event.description))}`:"",l=this.event.location||this.event.meet||"",r=l?`&location=${this.encodeValue(l)}`:"",d=`${i}${s}${o}${a}${n}${r}`;window.open(d,"_blank")},generateICS(){const e=Vs().tz(this.dateTimeBegin,this.timezone).utc().toDate(),t=Vs().tz(this.dateTimeEnd||this.dateTimeBegin,this.timezone).utc().toDate(),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//Orgo Community//EN","BEGIN:VEVENT","UID:"+(this.event.id||this.event.uuid),"DTSTAMP:"+this.toICalFormat(new Date),"DTSTART:"+this.toICalFormat(e),"DTEND:"+this.toICalFormat(t),"SUMMARY:"+this.event.name,"DESCRIPTION:"+(this.event.description?this.stripHtml(this.event.description):""),"LOCATION:"+(this.event.location?this.event.location:"")];this.event.meet&&i.push("URL:"+this.event.meet),this.event.owner&&i.push('ORGANIZER;CN="'+this.event.owner.fullName+'":'),i.push("END:VEVENT","END:VCALENDAR");const s=i.join("\r\n"),a=new Blob([s],{type:"text/calendar;charset=utf-8"}),n=URL.createObjectURL(a),o=(this.event.name||"event").replace(/[^a-z0-9-_]+/gi,"_")+".ics",l=/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;if(l)window.location.href=n;else{const e=document.createElement("a");e.href=n,e.style.display="none",e.download=o,document.body.appendChild(e),e.click(),document.body.removeChild(e)}setTimeout(()=>URL.revokeObjectURL(n),6e4)},toICalFormat(e){const t=e.getUTCFullYear();let i=e.getUTCMonth()+1,s=e.getUTCDate(),a=e.getUTCHours(),n=e.getUTCMinutes(),o=e.getUTCSeconds();return i=i<10?"0"+i:i,s=s<10?"0"+s:s,a=a<10?"0"+a:a,n=n<10?"0"+n:n,o=o<10?"0"+o:o,`${t}${i}${s}T${a}${n}${o}Z`},encodeValue(e){return encodeURIComponent(e||"")},stripHtml(e){if(!e)return"";const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}}},na=i(66262);const oa=(0,na.A)(aa,[["render",sa]]);var la=oa,ra=i(22536),da=i(94692),ca=i(89490),ua=i(41863),ma=i(54148),pa=i(67503),ha=i(56810),ga=i(20499),fa=i(10997),ba=i(80762),ya=i(12258),va=i(3694),ka=i(74410),Ca=i(67944),La=i(96189),wa=i(90257);const _a={key:0,class:"draft-banner mb-5"},Ea={class:"draft-banner-content"},$a={class:"draft-banner-info"},Fa={class:"draft-icon"},Ta={class:"draft-text"},Sa={class:"draft-status"},Aa={class:"draft-description"},Pa={class:"draft-banner-actions"},Ia={class:"icon"},Ma={class:"icon"},xa=["disabled"],Na={class:"icon"};function Ua(e,t,i,n,o,l){const r=(0,s.g2)("font-awesome-icon");return l.isVisible?((0,s.uX)(),(0,s.CE)("div",_a,[(0,s.Lk)("div",Ea,[(0,s.Lk)("div",$a,[(0,s.Lk)("span",Fa,[(0,s.bF)(r,{icon:"fa-light fa-eye-slash"})]),(0,s.Lk)("div",Ta,[(0,s.Lk)("span",Sa,(0,a.v_)(e.$t("Draft")),1),(0,s.Lk)("span",Aa,(0,a.v_)(e.$t("Only organizers can see this event")),1)])]),(0,s.Lk)("div",Pa,[i.event.isPublic?((0,s.uX)(),(0,s.CE)("button",{key:0,type:"button",class:"button is-rounded is-small","data-test":"draft-preview-public-page",onClick:t[0]||(t[0]=t=>e.$emit("preview"))},[(0,s.Lk)("span",Ia,[(0,s.bF)(r,{icon:"fa-light fa-arrow-up-right-from-square"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Preview public page")),1)])):(0,s.Q3)("",!0),i.event.isPublic?((0,s.uX)(),(0,s.CE)("button",{key:1,type:"button",class:"button is-rounded is-small","data-test":"draft-share-preview",onClick:t[1]||(t[1]=t=>e.$emit("share"))},[(0,s.Lk)("span",Ma,[(0,s.bF)(r,{icon:"fa-light fa-link"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Share preview")),1)])):(0,s.Q3)("",!0),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-primary is-rounded is-small",{"is-loading":i.isPublishing}]),disabled:i.isPublishing,"data-test":"draft-publish",onClick:t[2]||(t[2]=t=>e.$emit("publish"))},[(0,s.Lk)("span",Na,[(0,s.bF)(r,{icon:"fa-light fa-rocket"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Publish Event")),1)],10,xa)])])])):(0,s.Q3)("",!0)}var Da={name:"EventDraftBanner",props:{event:{type:Object,required:!0},isPublishing:{type:Boolean,default:!1}},emits:["publish","preview","share"],computed:{isVisible(){return"draft"===this.event.status&&!0===this.event.canEditEvent}}};const Xa=(0,na.A)(Da,[["render",Ua],["__scopeId","data-v-86583c2e"]]);var Va=Xa;const Ra={class:"modal-card sep-card"},Oa=["aria-label"],Qa={class:"modal-card-body sep-body"},Ba={key:0,class:"sep-state"},Ga={key:1,class:"sep-state"},Wa={class:"has-text-danger"},ja={class:"sep-eyebrow"},za={class:"sep-title"},qa={class:"sep-qr-frame"},Ja={class:"field has-addons sep-link"},Ha={class:"control is-expanded"},Ka=["value","aria-label"],Ya={class:"control"},Za={class:"icon is-small"},en={class:"sep-help is-size-6-half"},tn=["disabled"],sn={class:"icon is-small"};function an(e,t,i,n,o,l){const r=(0,s.g2)("b-loading"),d=(0,s.g2)("font-awesome-icon"),c=(0,s.g2)("qrcode-vue"),u=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.Wv)(u,{"model-value":i.modelValue,"has-modal-card":"","trap-focus":"","aria-role":"dialog","aria-modal":"","onUpdate:modelValue":t[4]||(t[4]=t=>e.$emit("update:modelValue",t))},{default:(0,s.k6)(()=>[(0,s.Lk)("div",Ra,[(0,s.Lk)("button",{type:"button",class:"delete sep-close","aria-label":e.$t("Close"),onClick:t[0]||(t[0]=t=>e.$emit("update:modelValue",!1))},null,8,Oa),(0,s.Lk)("section",Qa,[o.isLoading?((0,s.uX)(),(0,s.CE)("div",Ba,[(0,s.bF)(r,{"model-value":!0,"is-full-page":!1})])):o.error?((0,s.uX)(),(0,s.CE)("div",Ga,[(0,s.Lk)("p",Wa,(0,a.v_)(e.$t("Could not generate the share link. Please try again.")),1)])):o.previewUrl?((0,s.uX)(),(0,s.CE)(s.FK,{key:2},[(0,s.Lk)("span",ja,[(0,s.bF)(d,{icon:"fa-light fa-eye-slash",class:"mr-2"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Share preview")),1)]),(0,s.Lk)("h2",za,(0,a.v_)(i.eventName||e.$t("Share preview")),1),(0,s.Lk)("div",qa,[(0,s.bF)(c,{value:o.previewUrl,size:600,level:"H","render-as":"svg"},null,8,["value"])]),(0,s.Lk)("div",Ja,[(0,s.Lk)("div",Ha,[(0,s.Lk)("input",{class:"input is-rounded",type:"text",readonly:"",value:o.previewUrl,"aria-label":e.$t("Share preview"),onFocus:t[1]||(t[1]=e=>e.target.select())},null,40,Ka)]),(0,s.Lk)("div",Ya,[(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-rounded",o.copied?"is-success":"is-primary"]),onClick:t[2]||(t[2]=(...e)=>l.copyLink&&l.copyLink(...e))},[(0,s.Lk)("span",Za,[(0,s.bF)(d,{icon:o.copied?"fa-light fa-check":"fa-light fa-copy"},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(o.copied?e.$t("Copied!"):e.$t("Copy")),1)],2)])]),(0,s.Lk)("p",en,(0,a.v_)(e.$t("Anyone with this link can see this draft until you publish it or reset the link.")),1),(0,s.Lk)("button",{type:"button",class:(0,a.C4)(["button is-rounded is-light sep-reset",{"is-loading":o.isResetting}]),disabled:o.isResetting,"data-test":"reset-preview-link",onClick:t[3]||(t[3]=(...e)=>l.confirmReset&&l.confirmReset(...e))},[(0,s.Lk)("span",sn,[(0,s.bF)(d,{icon:"fa-light fa-arrow-rotate-right"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Reset link")),1)],10,tn)],64)):(0,s.Q3)("",!0)])])]),_:1},8,["model-value"])}var nn={name:"ShareEventPreviewModal",components:{QrcodeVue:Ca.Ay},props:{modelValue:{type:Boolean,default:!1},eventUuid:{type:String,default:null},eventName:{type:String,default:""}},emits:["update:modelValue"],data(){return{previewUrl:null,isLoading:!1,isResetting:!1,error:!1,copied:!1}},watch:{modelValue(e){!e||this.previewUrl||this.isLoading||this.fetchPreviewUrl()}},methods:{fetchPreviewUrl(){this.eventUuid&&(this.isLoading=!0,this.error=!1,this.$http.plain.patch("/events/"+this.eventUuid+"/preview-token",{}).then(e=>{this.previewUrl=e.data.previewUrl}).catch(e=>{console.log(e),this.error=!0}).finally(()=>{this.isLoading=!1}))},confirmReset(){this.$buefy.dialog.confirm({title:this.$t("Reset link"),message:this.$t("The current link will stop working. Anyone you shared it with will need the new one."),confirmText:this.$t("Reset link"),
1cancelText:this.$t("Cancel"),type:"is-danger",onConfirm:()=>this.resetPreviewUrl()})},resetPreviewUrl(){this.isResetting=!0,this.$http.plain.patch("/events/"+this.eventUuid+"/preview-token/reset",{}).then(e=>{this.previewUrl=e.data.previewUrl,this.copied=!1}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("Something went wrong"),type:"is-danger"})}).finally(()=>{this.isResetting=!1})},copyLink(){(0,Is.lW)(this.previewUrl),this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)}}};const on=(0,na.A)(nn,[["render",an],["__scopeId","data-v-83720940"]]);var ln=on,rn=i(36049),dn=i(49282);const cn={class:"modal-card qr-scanner-modal"},un={class:"modal-card-head"},mn={class:"modal-card-title"},pn={class:"modal-card-body"},hn={key:0,class:"qr-camera-container"},gn={key:0,class:"has-text-danger has-text-centered mt-3"},fn={key:1},bn={key:0,class:"qr-result"},yn={key:0,class:"notification is-warning is-light has-text-centered"},vn={class:"has-text-weight-semibold is-size-5"},kn={class:"mt-1"},Cn={key:0,class:"mt-2"},Ln={key:1,class:"is-size-7 has-text-grey mt-2"},wn={key:2,class:"is-size-7 has-text-grey mt-2"},_n={key:1,class:"notification is-success is-light has-text-centered"},En={class:"has-text-weight-semibold is-size-5"},$n={class:"mt-1"},Fn={key:0,class:"mt-2"},Tn={key:1,class:"is-size-7 has-text-grey mt-2"},Sn={key:2,class:"is-size-7 has-text-grey mt-2"},An={key:2,class:"has-text-centered"},Pn={key:0,class:"qr-avatar mb-3"},In=["src","alt"],Mn={key:1,class:"qr-avatar-placeholder mb-3"},xn={class:"has-text-weight-semibold is-size-5"},Nn={key:2,class:"is-size-7 has-text-grey"},Un={class:"mt-2 mb-3"},Dn={key:3,class:"is-size-7 has-text-grey mb-3"},Xn={key:4,class:"notification is-warning is-light is-size-7 mb-3"},Vn={class:"mr-1"},Rn={key:1,class:"notification is-danger is-light has-text-centered"},On={class:"mr-1"},Qn={key:2,class:"has-text-centered py-5"};function Bn(e,t,i,n,o,l){const r=(0,s.g2)("QrcodeStream"),d=(0,s.g2)("font-awesome-icon"),c=(0,s.g2)("b-tag"),u=(0,s.g2)("b-button"),m=(0,s.g2)("b-loading"),p=(0,s.g2)("b-modal");return(0,s.uX)(),(0,s.Wv)(p,{"model-value":i.modelValue,"has-modal-card":"","trap-focus":"","can-cancel":!o.isProcessing,"onUpdate:modelValue":t[1]||(t[1]=t=>e.$emit("update:modelValue",t)),onClose:l.close},{default:(0,s.k6)(()=>[(0,s.Lk)("div",cn,[(0,s.Lk)("header",un,[(0,s.Lk)("p",mn,(0,a.v_)(e.$t("Scan QR Code")),1),(0,s.Lk)("button",{class:"delete","aria-label":"close",onClick:t[0]||(t[0]=(...e)=>l.close&&l.close(...e))})]),(0,s.Lk)("section",pn,[o.scanResult?(0,s.Q3)("",!0):((0,s.uX)(),(0,s.CE)("div",hn,[(0,s.bF)(r,{constraints:{facingMode:"environment"},onDetect:l.onDetect,onError:l.onError},null,8,["onDetect","onError"]),o.cameraError?((0,s.uX)(),(0,s.CE)("p",gn,(0,a.v_)(o.cameraError),1)):(0,s.Q3)("",!0)])),o.scanResult&&!o.isLoading?((0,s.uX)(),(0,s.CE)("div",fn,[o.member?((0,s.uX)(),(0,s.CE)("div",bn,[o.checkedIn&&o.wasAlreadyCheckedIn?((0,s.uX)(),(0,s.CE)("div",yn,[(0,s.bF)(d,{icon:"fa-light fa-triangle-exclamation",size:"2x",class:"mb-2"}),(0,s.Lk)("p",vn,(0,a.v_)(e.$t("Already checked in")),1),(0,s.Lk)("p",kn,(0,a.v_)(o.member.name),1),o.registrationType||o.ticket?((0,s.uX)(),(0,s.CE)("div",Cn,[o.registrationType?((0,s.uX)(),(0,s.Wv)(c,{key:0,"is-rounded":"",type:l.registrationTagType},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(o.registrationType)),1)]),_:1},8,["type"])):(0,s.Q3)("",!0),o.ticket?((0,s.uX)(),(0,s.Wv)(c,{key:1,"is-rounded":"",class:"ml-1"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(o.ticket.name),1)]),_:1})):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),o.isGuestPass?((0,s.uX)(),(0,s.CE)("p",Ln,(0,a.v_)(e.$t("Guest pass issued to"))+": "+(0,a.v_)(o.issuedTo),1)):(0,s.Q3)("",!0),o.eventName?((0,s.uX)(),(0,s.CE)("p",wn,(0,a.v_)(o.eventName),1)):(0,s.Q3)("",!0)])):o.checkedIn?((0,s.uX)(),(0,s.CE)("div",_n,[(0,s.bF)(d,{icon:"fa-light fa-circle-check",size:"2x",class:"mb-2"}),(0,s.Lk)("p",En,(0,a.v_)(e.$t("Checked in")),1),(0,s.Lk)("p",$n,(0,a.v_)(o.member.name),1),o.registrationType||o.ticket?((0,s.uX)(),(0,s.CE)("div",Fn,[o.registrationType?((0,s.uX)(),(0,s.Wv)(c,{key:0,"is-rounded":"",type:l.registrationTagType},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(o.registrationType)),1)]),_:1},8,["type"])):(0,s.Q3)("",!0),o.ticket?((0,s.uX)(),(0,s.Wv)(c,{key:1,"is-rounded":"",class:"ml-1"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(o.ticket.name),1)]),_:1})):(0,s.Q3)("",!0)])):(0,s.Q3)("",!0),o.isGuestPass?((0,s.uX)(),(0,s.CE)("p",Tn,(0,a.v_)(e.$t("Guest pass issued to"))+": "+(0,a.v_)(o.issuedTo),1)):(0,s.Q3)("",!0),o.eventName?((0,s.uX)(),(0,s.CE)("p",Sn,(0,a.v_)(o.eventName),1)):(0,s.Q3)("",!0)])):((0,s.uX)(),(0,s.CE)("div",An,[o.profilePicture?((0,s.uX)(),(0,s.CE)("div",Pn,[(0,s.Lk)("img",{src:o.profilePicture,alt:o.member.name,class:"qr-avatar-img"},null,8,In)])):((0,s.uX)(),(0,s.CE)("div",Mn,[(0,s.bF)(d,{icon:"fa-light fa-user",size:"2x"})])),(0,s.Lk)("p",xn,(0,a.v_)(o.member.name),1),o.member.email?((0,s.uX)(),(0,s.CE)("p",Nn,(0,a.v_)(o.member.email),1)):(0,s.Q3)("",!0),(0,s.Lk)("div",Un,[o.registrationType?((0,s.uX)(),(0,s.Wv)(c,{key:0,"is-rounded":"",type:l.registrationTagType},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(e.$t(o.registrationType)),1)]),_:1},8,["type"])):(0,s.Q3)("",!0),o.ticket?((0,s.uX)(),(0,s.Wv)(c,{key:1,"is-rounded":"",class:"ml-1"},{default:(0,s.k6)(()=>[(0,s.eW)((0,a.v_)(o.ticket.name),1)]),_:1})):(0,s.Q3)("",!0)]),o.isGuestPass?((0,s.uX)(),(0,s.CE)("div",Dn,(0,a.v_)(e.$t("Guest pass issued to"))+": "+(0,a.v_)(o.issuedTo),1)):(0,s.Q3)("",!0),o.paymentStatus&&"success"!==o.paymentStatus?((0,s.uX)(),(0,s.CE)("div",Xn,[(0,s.bF)(d,{icon:"fa-light fa-exclamation-triangle",class:"mr-1"}),(0,s.eW)(" "+(0,a.v_)(e.$t("Payment not completed"))+": "+(0,a.v_)(o.paymentStatus),1)])):(0,s.Q3)("",!0),(0,s.bF)(u,{type:"is-success",class:"is-rounded",size:"is-medium",expanded:"",loading:o.isProcessing,onClick:l.checkIn},{default:(0,s.k6)(()=>[(0,s.Lk)("span",Vn,[(0,s.bF)(d,{icon:"fa-light fa-check"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Check in")),1)]),_:1},8,["loading","onClick"])]))])):(0,s.Q3)("",!0),o.scanError?((0,s.uX)(),(0,s.CE)("div",Rn,[(0,s.bF)(d,{icon:"fa-light fa-circle-xmark",size:"2x",class:"mb-2"}),(0,s.Lk)("p",null,(0,a.v_)(o.scanError),1)])):(0,s.Q3)("",!0),(0,s.bF)(u,{class:"is-rounded mt-4",expanded:"",onClick:l.resetScan},{default:(0,s.k6)(()=>[(0,s.Lk)("span",On,[(0,s.bF)(d,{icon:"fa-light fa-qrcode"})]),(0,s.Lk)("span",null,(0,a.v_)(e.$t("Scan another")),1)]),_:1},8,["onClick"])])):(0,s.Q3)("",!0),o.isLoading?((0,s.uX)(),(0,s.CE)("div",Qn,[(0,s.bF)(m,{"is-full-page":!1,"model-value":!0})])):(0,s.Q3)("",!0)])])]),_:1},8,["model-value","can-cancel","onClose"])}var Gn=i(59995),Wn={name:"QRScannerModal",components:{QrcodeStream
1:Gn.tR},props:{modelValue:{type:Boolean,default:!1}},data(){return{isLoading:!1,isProcessing:!1,scanResult:null,scanError:null,cameraError:null,member:null,ticket:null,eventName:null,profilePicture:null,ticketNumber:null,checkedIn:!1,wasAlreadyCheckedIn:!1,registrationType:null,paymentStatus:null,isGuestPass:!1,issuedTo:null}},computed:{...(0,Ps.L8)(["tenant"]),registrationTagType(){const e={paid:"is-info",free:"is-success is-light",invited:"is-warning is-light",guest:"is-light",registered:"is-primary is-light"};return e[this.registrationType]||"is-light"}},methods:{onDetect(e){if(!e||!e.length||this.isLoading)return;const t=e[0].rawValue;if(!t)return;let i=t;const s=t.match(/check-ticket\/([^?/]+)/);s&&(i=s[1]),this.scanResult=i,this.lookupTicket(i)},onError(e){"NotAllowedError"===e.name?this.cameraError=this.$t("Camera access denied. Please allow camera access to scan QR codes."):"NotFoundError"===e.name?this.cameraError=this.$t("No camera found on this device."):this.cameraError=this.$t("Camera error")+": "+e.message},lookupTicket(e){this.isLoading=!0,this.scanError=null,this.$http.plain.post("/event-attend/check-qr",{qrCode:e}).then(e=>{this.member=e.data.member,this.ticket=e.data.ticket,this.eventName=e.data.event,this.ticketNumber=e.data.ticketNumber,this.checkedIn=e.data.checkedIn,this.wasAlreadyCheckedIn=e.data.checkedIn,this.registrationType=e.data.registrationType,this.paymentStatus=e.data.paymentStatus,this.isGuestPass=e.data.isGuestPass||!1,this.issuedTo=e.data.issuedTo||null,this.profilePicture=this.member?.profilePicture||null}).catch(e=>{console.error(e),this.scanError=e.response?.data?.["hydra:description"]||e.response?.data?.detail||this.$t("QR code is invalid or has expired")}).finally(()=>{this.isLoading=!1})},checkIn(){this.isProcessing=!0,this.$http.plain.patch("/event_attends/"+this.ticketNumber,{statusRsvp:"attended"}).then(()=>{this.checkedIn=!0,this.$emit("checked-in",this.ticketNumber)}).catch(e=>{console.error(e),this.$buefy.toast.open({message:e.response?.data?.["hydra:description"]||this.$t("Check-in failed"),type:"is-danger"})}).finally(()=>{this.isProcessing=!1})},resetScan(){this.scanResult=null,this.scanError=null,this.member=null,this.ticket=null,this.eventName=null,this.profilePicture=null,this.ticketNumber=null,this.checkedIn=!1,this.wasAlreadyCheckedIn=!1,this.registrationType=null,this.paymentStatus=null,this.isGuestPass=!1,this.issuedTo=null},close(){this.resetScan(),this.cameraError=null,this.$emit("update:modelValue",!1)}}};const jn=(0,na.A)(Wn,[["render",Bn],["__scopeId","data-v-36a502b4"]]);var zn=jn,qn=i(58065),Jn={name:"EventShowContent",props:{eventUuid:{type:String,required:!0}},emits:["refresh","deleted","loaded","attendersCountLoaded"],data(){return{expandedAgendaItems:{},subEvents:[],activeEventTab:"details",selectedAgendaDay:null,agendaSearch:"",selectedStage:null,showMyCalendarOnly:!1,subEventAttendees:{},subEventAttendeeCounts:{},showSubEventAttendeesModal:!1,subEventAttendeesList:[],subEventAttendeesTitle:"",focusedSpeaker:null,showSubEventSpeakersModal:!1,subEventSpeakersList:[],highlightedSession:null,attenders:[],ticket:null,attendersTotal:null,trainers:[],trainersTotal:null,speakers:[],speakersTotal:0,eventPhotosUpload:[],eventVideosUpload:[],eventFilesUpload:[],item:null,eventPhotos:[],eventVideos:[],eventFiles:[],isLoading:!1,isDownloading:!1,isUploading:!1,uploadProgress:{current:0,total:0,percentage:0,startTime:null,timeRemaining:null,currentFileName:"",estimatedTotalTime:null},isAttending:null,isAttendingSelect:null,isCheckingAttendance:!0,myAttendances:[],galleryIndex:null,dynamicLogoUpload:null,allMediaVisible:!1,showInviteInput:!1,isAddingParticipant:!1,productPrices:null,isFreeTicket:!0,ticketAvailability:null,selectedProductPrice:null,selectedTimezone:null,dateTimeBegin:null,dateTimeEnd:null,dateTimeBeginDB:null,dateTimeEndDB:null,timezoneSearch:"",popularTimezones:[{value:"America/Los_Angeles",label:"Pacific Time - Los Angeles"},{value:"America/Chicago",label:"Central Time - Chicago"},{value:"America/Toronto",label:"Eastern Time - Toronto"}
1,{value:"America/New_York",label:"Eastern Time - New York"},{value:"America/Sao_Paulo",label:"Brasilia Standard Time - São Paulo"},{value:"Europe/London",label:"United Kingdom Time - London"},{value:"Europe/Madrid",label:"Central European Time - Madrid"},{value:"Europe/Paris",label:"Central European Time - Paris"},{value:"Europe/Bucharest",label:"Eastern European Time - Bucharest"},{value:"Asia/Dubai",label:"Gulf Standard Time - Dubai"},{value:"Asia/Kolkata",label:"India Standard Time - Kolkata"},{value:"Asia/Singapore",label:"Singapore Standard Time - Singapore"},{value:"Asia/Tokyo",label:"Japan Standard Time - Tokyo"}],isLoadingShareLink:!1,staticMapImageUrl:null,googleMapsCoordinatesRedirect:null,showCheckoutModal:!1,showQRScanner:!1,showInviteModal:!1,showQrModal:!1,showFreeEventCheckoutModal:!1,showSharePreviewModal:!1,registrationFormConfigResolved:null,showProfileModal:!1,selectedUserId:null,selectedContactId:null,selectedProfileName:"",priceId:null,ticketSelections:[],checkoutSelections:[],eventVotesCount:0}},watch:{"$route.query.tab"(e){"votes"===e&&(this.activeEventTab="votes")},allEventDayKeys(e){null===this.selectedAgendaDay&&e.length&&(this.selectedAgendaDay=e[0])},selectedAgendaDay(e){if(!this.selectedStage||!e)return;const t=this.subEvents.some(t=>t.location===this.selectedStage&&t.dateTimeBegin&&t.dateTimeBegin.substring(0,10)===e);t||(this.selectedStage=null)},showMyCalendarOnly(){this.allEventDayKeys.length&&(this.selectedAgendaDay=this.allEventDayKeys[0])},eventUuid:{immediate:!0,handler(e){e&&this.retrieve()}}},methods:{now:Rs.now,nl2br:Is.HA,sameDay:Is.lp,momentInEventTz(e){const t=Vs().utc(e);return this.selectedTimezone?t.tz(this.selectedTimezone):t.local()},isAgendaMultiDay(e){return!(!e.timeStart||!e.timeEnd)&&e.timeStart.substring(0,10)!==e.timeEnd.substring(0,10)},isAgendaExpandable(e){if(!e.description)return!1;const t=e.description.replace(/<[^>]*>/g,"");return t.length>80},toggleAgendaExpand(e){this.expandedAgendaItems={...this.expandedAgendaItems,[e]:!this.expandedAgendaItems[e]}},getStageColor(e){return(0,ma.mh)(e,this.allStages,this.item?.settings?.stageColors)},handleSubEventAttendeesClick(e){this.isGrantedOwner(this.item)&&this.$router.push({name:"EventAttend",params:{item:this.item.uuid},query:{subEvent:e.id}})},openSubEventAttendees(e){this.subEventAttendeesTitle=e.name+" â "+this.$t("Attendees"),this.$http.plain.get("/event_attends",{params:{event:e.id,statusRsvp:"attending",itemsPerPage:100}}).then(e=>{this.subEventAttendeesList=e.data["hydra:member"]||[],this.showSubEventAttendeesModal=!0}).catch(e=>{console.error(e)})},getSpeakerModalItem(e){const t=e.speakerName||"",i=t.trim().split(/\s+/),s=e.user||e.contact;let a=e.id;if(s&&"object"===typeof s)a=s.id||e.id;else if(s&&"string"===typeof s){const e=s.match(/\/(\d+)$/);e&&(a=parseInt(e[1]))}return{id:a,logo:e.speakerLogo||null,name:t,firstName:i[0]||"",lastName:i.slice(1).join(" ")||"",fullName:t,"@type":e.user?"User":"Contact"}},openSubEventSpeakers(e,t=null){this.subEventSpeakersList=e.speakers||[],this.focusedSpeaker=t,this.showSubEventSpeakersModal=!0},formatSessionTime(e){if(!e.dateTimeBegin)return"";const t=new Date(e.dateTimeBegin);return t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},goToSpeakerSession(e){if(this.showSubEventSpeakersModal=!1,this.focusedSpeaker=null,this.activeEventTab="agenda",e.dateTimeBegin){const t=e.dateTimeBegin.substring(0,10);this.allEventDayKeys.includes(t)&&(this.selectedAgendaDay=t)}this.expandedAgendaItems={...this.expandedAgendaItems,[e.uuid]:!0},this.$nextTick(()=>{const t=document.querySelector('[data-session-uuid="'+e.uuid+'"]');t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),this.highlightedSession=e.uuid,setTimeout(()=>{this.highlightedSession=null},3e3))})},fetchSubEvents(){this.item?.uuid&&this.$http.plain.get("/sub-events-list/"+this.item.uuid).then(e=>{const t=e.data["hydra:member"]||[];this.subEvents=t.sort((e,t)=>{const i=(e.dateTimeBegin||"").localeCompare(t.dateTimeBegin||"");return 0!==i?i:(e.position||0)-(t.position||0)});const i={},s={};t.forEach(e=>{e.attendeeCount&&(s[e.uuid]=e.attendeeCount),e.isAttending&&(i[e.uuid]={id:e.attendId})}),this.subEventAttendance=i,this.subEventAttendeeCounts=s}).catch(e=>{console.error(e)})},showVotesTabAfterRegistration(){this.$http.plain.get("/vote_collections?event="+this.item.id+"&myVotes=1&itemsPerPage=50").then(e=>{const t=e.data["hydra:member"]||[],i=t.filter(e=>["upcoming","live","closed"].includes(e.status)).length;this.eventVotesCount=i,i>0&&(this.activeEventTab="votes")}).catch(e=>{console.error(e)})},fetchEventVotesCount(){this.$http.plain.get("/vote_collections?event="+this.item.id+"&myVotes=1&itemsPerPage=50").then(e=>{const t=e.data["hydra:member"]||[];this.eventVotesCount=t.filter(e=>["upcoming","live","closed"].includes(e.status)).length}
1).catch(e=>{console.error(e)})},attendSubEvent(e){this.user?.["@id"]&&(this.subEventAttendLoading={...this.subEventAttendLoading,[e.uuid]:!0},this.$http.plain.post("/event_attends",{event:e["@id"],user:this.user["@id"],statusRsvp:"attending",statusRegistration:"success"}).then(t=>{this.subEventAttendance={...this.subEventAttendance,[e.uuid]:t.data},this.refreshSubEventAttendees(e)}).catch(e=>{console.error(e)}).finally(()=>{this.subEventAttendLoading={...this.subEventAttendLoading,[e.uuid]:!1}}))},unattendSubEvent(e){const t=this.subEventAttendance[e.uuid];t&&(this.subEventAttendLoading={...this.subEventAttendLoading,[e.uuid]:!0},this.$http.plain.delete("/event_attends/"+t.id).then(()=>{const t={...this.subEventAttendance};delete t[e.uuid],this.subEventAttendance=t,this.refreshSubEventAttendees(e)}).catch(e=>{console.error(e)}).finally(()=>{this.subEventAttendLoading={...this.subEventAttendLoading,[e.uuid]:!1}}))},refreshSubEventAttendees(e){const t=this.subEventAttendeeCounts[e.uuid]||0,i=!!this.subEventAttendance[e.uuid];this.subEventAttendeeCounts={...this.subEventAttendeeCounts,[e.uuid]:i?t+1:Math.max(0,t-1)}},eventEnded:Is.zn,formatBytes:Is.z3,mediaSrc:Is.F9,videoUrl:Is.fV,copyToClipboard:Is.lW,copyToClipboardAsync:Is.bm,getEventTypeColor(e){return e&&e.color?(0,Is.eD)(e.color,"dark"===this.$store.state.theme):""},getEventTypeStyle(e){return e&&e.color?(0,Is.x3)(e.color,"dark"===this.$store.state.theme):{}},downloadTicket(){this.isAttending&&(this.isDownloading=!0,this.$http.plain.get("/event_ticket/"+this.isAttending.id,{responseType:"blob"}).then(e=>{var t=window.URL.createObjectURL(new Blob([e.data])),i=document.createElement("a");i.href=t,i.setAttribute("download",this.$t("Ticket")+"-"+this.item.name+"-"+this.isAttending.id+".pdf"),document.body.appendChild(i),i.click()}).catch(e=>console.error(e)).finally(()=>{this.file=null,this.isDownloading=!1}))},openGallery(){document.getElementsByClassName("navbar")[0].classList.add("is-hidden")},retrieve(){this.isLoading=!0,this.$http.plain.get("/events/"+this.eventUuid).then(e=>this.entityLoaded(e.data)).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},fetchTicketAvailability(){if(!this.item?.uuid)return;const e="draft"===this.item.status?"/draft-availability":"/availability";this.$http.plain.get("/events/"+this.item.uuid+e).then(e=>{this.ticketAvailability=e.data}).catch(e=>{console.log(e)})},publishEvent(){this.tenant.settingFeatures.events.sendBulkInvites?this.$buefy.dialog.confirm({title:this.$t("Publish Event"),message:this.$t("Would you like to invite all members of this group to the event?"),confirmText:this.$t("Send Invites"),cancelText:this.$t("Skip Invites"),type:"is-info",hasIcon:!1,canCancel:["escape","x","outside","button"],onConfirm:()=>{this.performPublish(!0)},onCancel:e=>{"button"===e&&this.performPublish(!1)}}):this.performPublish(!1)},confirmSendInvites(){this.$buefy.dialog.confirm({title:this.$t("Send Invites"),message:this.$t("Are you sure you want to send invites to all members of this group?"),confirmText:this.$t("Send Invites"),cancelText:this.$t("cancel"),type:"is-info",onConfirm:()=>{this.sendEventInvites()}})},performPublish(e){this.isLoading=!0,this.$http.plain.patch("/events_publish/"+this.eventUuid,{}).then(t=>(this.$buefy.toast.open({message:this.$t("updatedSuccessfully"),type:"is-success",duration:6e3}),e?this.sendEventInvites().then(()=>t):t)).then(e=>(this.$emit("refresh"),this.retrieve())).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},sendEventInvites(){return this.$http.plain.post(`/events/${this.eventUuid}/send-invites`,{propagated:!1}).then(e=>{this.item.invitesSent=e.data.invitesSent,this.$buefy.toast.open({message:this.$t("Invites are being sent to members"),type:"is-success",duration:5e3})}).catch(e=>{console.error(e),this.$buefy.toast.open({message:this.$t("Failed to send invites"),type:"is-danger",duration:5e3})})},entityLoaded(e){if(this.item=e,"draft"===this.item.status&&!0!==this.item.canEditEvent)return void this.$emit("deleted");this.$store.commit("setDynamicCurrentGroup",this.item),this.fetchSubEvents(),this.fetchEventVotesCount(),"votes"===this.$route.query.tab&&(this.activeEventTab="votes"),this.eventPhotos=[],this.eventVideos=[],this.eventFiles=[];let t=this.item.eventMedia.filter(e=>"eventimage"===e.media.type);for(let a of t)this.eventPhotos.push(a.media);let i=this.item.eventMedia.filter(e=>"eventvideo"===e.media.type);for(let a of i)this.eventVideos.push(a.media);let s=this.item.eventMedia.filter(e=>"eventfile"===e.media.type);for(let a of s)this.eventFiles.push(a.media);if(this.selectedTimezone=(0,Is.q3)(this.item,this.user),this.item.dateTimeBegin&&(this.item.dateTimeBegin=Vs()(this.item.dateTimeBegin).utc().format("YYYY-MM-DDTHH:mm")),this.item.dateTimeEnd&&(this.item.dateTimeEnd=Vs()(this.item.dateTimeEnd).utc().format("YYYY-MM-DDTHH:mm")),this.convertTimezones(),this.$http.plain.get("/event_attends?event="+this.item.id+"&user="+this.user.id).then(e=>{if(e.data["hydra:totalItems"]>
10){this.myAttendances=e.data["hydra:member"];const t=this.myAttendances.find(e=>"success"===e.statusRegistration);this.isAttending=t||this.myAttendances[0],this.isAttendingSelect=this.isAttending.statusRsvp}else this.myAttendances=[],this.isAttending=null,this.isAttendingSelect=null}).catch(e=>{console.error(e)}).finally(()=>{this.isCheckingAttendance=!1}),this.item.product){this.$http.plain.get("/product_payments?exists[isRefunded]=false&product.uuid="+this.item.product.uuid+"&user="+this.user.id).then(e=>{e.data["hydra:totalItems"]>0&&(this.ticket=e.data["hydra:member"][0])}).catch(e=>{console.error(e)});let e=0;this.item.product.productPrices?.length>0?this.item.product.productPrices.forEach(t=>{t.isRestricted&&"members"!==t.isRestricted||(t.price||e++,t.price>0||e>1?this.isFreeTicket=!1:this.selectedProductPrice=t)}):this.item.hasEventTicketing&&(this.isFreeTicket=!1)}(this.item.hasEventTicketing||this.item.maxCapacity)&&this.fetchTicketAvailability(),this.item.placesApiId&&this.getStaticMapImage(),this.getAttenders(!0),this.item.requiresRegistrationForm&&!this.item.registrationFormConfig&&this.fetchRegistrationFormConfig(),this.$emit("loaded",this.item)},getAttenders(e=!1){this.$http.plain.get("/event_attend_sidebar?event="+this.item.id).then(e=>{this.attenders=e.data["hydra:member"],this.$http.plain.get("/event_attends?event="+this.item.id+"&statusRsvp[]=attending&statusRsvp[]=attended&statusRegistration[]=success&statusRegistration[]=invited&statusRegistration[]=awaiting_invoice_payment&exists[canceledAt]=false&itemsPerPage=0").then(e=>{this.attendersTotal=e.data["hydra:totalItems"],this.$emit("attendersCountLoaded",this.attendersTotal)}).catch(()=>{this.attendersTotal=e.data["hydra:totalItems"],this.$emit("attendersCountLoaded",this.attendersTotal)}),this.attenders.forEach(e=>{!e.user&&e.external&&(e.user=e.external,e.user.fullName=e.external.name,e.user.validFeeDate=null)}),this.getTrainers(),this.getSpeakers()}).catch(e=>console.error(e))},getTrainers(){this.item.type&&this.tenant.settingFeatures.events.trainingEventType&&parseInt(this.tenant.settingFeatures.events.trainingEventType)===this.item.type.id&&this.$http.plain.get("/training_trainers?event="+this.item.id).then(e=>{this.trainers=e.data["hydra:member"],this.trainersTotal=e.data["hydra:totalItems"]})},getSpeakers(){this.item.settings&&this.item.settings.enableSpeakers&&this.$http.plain.get("/event_speakers?event="+this.item.id+"&order[id]=asc").then(e=>{this.speakers=e.data["hydra:member"],this.speakersTotal=e.data["hydra:totalItems"]}).catch(e=>{console.error(e)})},openSpeakerDetail(e){this.subEventSpeakersList=[],this.focusedSpeaker=e,this.showSubEventSpeakersModal=!0},deleteEventMedia(e,t,i){this.isLoading=!0;let s=this.item.eventMedia.find(t=>t.media.id===e.id);s&&this.$http.plain.delete("/event_media/"+s.id).then(()=>{"photos"===i&&(this.eventPhotos=this.eventPhotos.filter((e,i)=>i!==t)),"videos"===i?this.eventVideos=this.eventVideos.filter((e,i)=>i!==t):"files"===i&&(this.eventFiles=this.eventFiles.filter((e,i)=>i!==t))}).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1})},toggleInviteInput(){this.showInviteInput=!this.showInviteInput,this.showInviteInput&&this.$nextTick(()=>{const e=this.$refs.attendeeSearch||this.$refs.attendeeSearchMobile;e?.focus()})},onInviteComplete(){this.showInviteModal=!1,this.getAttenders(!0)},addParticipant(e){if(!e||!e.id)return this.$buefy.toast.open({message:this.$t("Invalid participant"),type:"is-danger",duration:6e3});this.isAddingParticipant=!0,this.$http.plain.post("/event_attends",{user:"/api/v1/users/"+e.id,event:this.item["@id"],status:2}).then(t=>{const i={...t.data,user:e};return this.attenders.push(i),this.attendersTotal++,this.$buefy.snackbar.open({message:this.$t("saved")})}).catch(e=>{console.error(e)}).finally(()=>{this.isAddingParticipant=!1})},updateAttend(e){const t=this.isAttending?{...this.isAttending}:null;if(this.isAttending)if("not_attending"===e){const e=this.isAttending.id;this.isAttending=null,this.isAttendingSelect=null,this.$http.plain.delete("/event_attends/"+e).then(()=>{this.getAttenders(!0)}).catch(e=>{console.log(e),this.isAttending=t,this.isAttendingSelect=t?.statusRsvp||null,this.$buefy.toast.o
1pen({message:this.$t("Error saving"),type:"is-danger"})})}else this.isAttending={...this.isAttending,statusRsvp:e},this.isAttendingSelect=e,this.$http.plain.patch("/event_attends/"+this.isAttending.id,{statusRsvp:e}).then(e=>{this.isAttending=e.data,this.isAttendingSelect=e.data.statusRsvp,this.getAttenders(!1)}).catch(e=>{console.log(e),this.isAttending=t,this.isAttendingSelect=t?.statusRsvp||null,this.$buefy.toast.open({message:this.$t("Error saving"),type:"is-danger"})});else e&&"not_attending"!==e&&(this.isAttending={statusRsvp:e,statusRegistration:"success"},this.isAttendingSelect=e,this.$http.plain.post("/event_attends",{event:this.item["@id"],user:this.user["@id"],statusRsvp:e,statusRegistration:"success"}).then(e=>{this.isAttending=e.data,this.isAttendingSelect=e.data.statusRsvp,this.getAttenders(!1),this.showVotesTabAfterRegistration()}).catch(e=>{console.log(e),this.isAttending=null,this.isAttendingSelect=null;const t="This event is full"===e.response?.data?.detail;this.$buefy.toast.open({message:t?this.$t("This event is full"):this.$t("Error saving"),type:"is-danger"}),t&&this.getAttenders(!1)}))},addTrainer(e){e&&(this.isLoading=!0,this.$http.plain.post("/training_trainers",{trainer:"/api/v1/users/"+e.id,event:this.item["@id"]}).then(e=>(this.trainers.push(e.data),this.trainersTotal++,this.$buefy.snackbar.open({message:this.$t("saved")}))).catch(e=>{console.error(e)}).finally(()=>{this.isLoading=!1}))},checkUploadSize(){let e=0;for(let t of this.eventPhotosUpload)e+=t.size;
1for(let t of this.eventVideosUpload)e+=t.size;for(let t of this.eventFilesUpload)e+=t.size;e>Ds.w3&&(this.$buefy.toast.open({duration:1e4,message:this.$t("selectedFiles")+": "+this.formatBytes(e)+". "+this.$t("errorMaxFileSize"),type:"is-danger"}),this.eventPhotosUpload=[],this.eventFilesUpload=[],this.eventVideosUpload=[])},async upload(e){this.checkUploadSize();let t=this.eventFilesUpload;if("eventimage"===e?t=this.eventPhotosUpload:"eventvideo"===e&&(t=this.eventVideosUpload),t.length){this.isUploading=!0,this.uploadProgress={current:0,total:t.length,percentage:0,startTime:Date.now(),timeRemaining:null,currentFileName:"",estimatedTotalTime:null};for await(let i of t)this.uploadProgress.currentFileName=i.name,await this.signS3AndUpload(i,e,this.item.id),this.updateProgress();this.isUploading=!1,this.resetProgress()}},async signS3AndUpload(e,t,i){const s=e.type,a=e.size,n=e.name;await this.$http.plain.get("/s3-upload?fileType="+s+"&fileName="+n+"&type="+t).then(n=>{let o=new FormData;for(const[e,t]of Object.entries(n.data.additionalData))o.append(e,t);return o.append("Content-type",s),o.append("acl","public-read"),o.append("file",e,n.data.newFileName),fetch(Ds.ze+"/",{method:"POST",body:o}).then(e=>{if(200===e.status||204===e.status)return this.$http.plain.post("/medias",{contentUrl:n.data.newFileName,mimeType:s,type:t,size:a,entityId:i}).then(e=>{"eventfile"===t&&this.eventFiles.push(e.data),"eventimage"===t&&this.eventPhotos.push(e.data),"eventvideo"===t&&this.eventVideos.push(e.data),this.item.eventMedia.push({id:e.data.entityId,media:e.data})})})}).catch(e=>console.error(e))},toICalFormat(e){let t=e.getFullYear(),i=e.getMonth()+1,s=e.getDate(),a=e.getHours(),n=e.getMinutes(),o=e.getSeconds();return i=i<10?"0"+i:i,s=s<10?"0"+s:s,a=a<10?"0"+a:a,n=n<10?"0"+n:n,o=o<10?"0"+o:o,`${t}${i}${s}T${a}${n}${o}Z`},generateICS(){var e="BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//Orgo Community//EN\nBEGIN:VEVENT\nUID:"+this.item.id+"\nDTSTAMP:"+this.toICalFormat(new Date)+"\nDTSTART:"+this.toICalFormat(Vs()(this.item.dateTimeBegin).tz(this.itemTimezone).utc().toDate())+"\nDTEND:"+this.toICalFormat(Vs()(this.item.dateTimeEnd).tz(this.itemTimezone).utc().toDate())+"\nSUMMARY:"+this.item.name+"\nDESCRIPTION:"+(this.item.description?this.item.description:"")+"\nLOCATION:"+(this.item.location?this.item.location:"")+"\n";this.item.meet&&(e+="URL:"+this.item.meet+"\n"),e+='ORGANIZER;CN="'+this.item.owner.fullName+'":\nEND:VEVENT\nEND:VCALENDAR';var t=new Blob([e],{type:"text/calendar"}),i=document.createElement("a");i.href=URL.createObjectURL(t),i.style.display="none",i.download=this.item.name+".ics",document.body.appendChild(i),i.click(),document.body.removeChild(i)},openRegistrationModal(){this.showFreeEventCheckoutModal=!0},openPublicPreview(){const e=this.$router.resolve((0,rn._p)(this.item.uuid,this.tenant,{preview:!0}));window.open(e.href,"_blank")},proceedToCheckoutModal(){0!==this.totalTicketCount&&(this.checkoutSelections=[...this.ticketSelections],this.showCheckoutModal=!0)},onCheckoutSuccess(e){this.showCheckoutModal=!1,this.ticketSelections=[],this.checkoutSelections=[],this.retrieve()},onQRCheckedIn(){this.getAttenders(!0)},handleAcceptInvitation(){console.log("ShowContent: handleAcceptInvitation called"),this.openRegistrationModal(),this.$nextTick(()=>{this.$refs.registrationStatusBox?.resetLoadingStates()})},handleDeclineInvitation(){console.log("ShowContent: handleDeclineInvitation called",this.isAttending),this.isAttending?.id&&this.$http.plain.delete("/event_attends/"+this.isAttending.id).then(()=>{this.$buefy.toast.open({message:this.$t("Invitation declined"),type:"is-info",duration:3e3}),this.isAttending=null,this.isAttendingSelect=null}).catch(e=>{console.log(e),this.$buefy.toast.open({message:this.$t("An error occurred"),type:"is-danger",duration:3e3})}).finally(()=>{this.$refs.registrationStatusBox?.resetLoadingStates()})},onFreeEventRegistrationSuccess(){this.showFreeEventCheckoutModal=!1,this.retrieve(),this.showVotesTabAfterRegistration()},fetchRegistrationFormConfig(){this.$http.plain.get("/events/"+this.item.uuid+"/registration-form").then(e=>{const t=e.data,i=t.formConfig||{fields:[]},s=t.availableStandardFields||{},a={};
1(t.customFields||[]).forEach(e=>{a[e.id]=e});const n=(i.fields||[]).map(e=>{const t={...e};return"standard"===e.type&&s[e.key]?(t.label=s[e.key].label,t.inputType=s[e.key].type,t.alwaysRequired=s[e.key].alwaysRequired||!1):"custom"===e.type&&e.customFieldId&&a[e.customFieldId]&&(t.customField=a[e.customFieldId]),t});this.registrationFormConfigResolved={fields:n}}).catch(e=>{console.error(e)})},convertTimezones(){this.item.dateTimeBegin&&(this.dateTimeBegin=Vs().utc(this.item.dateTimeBegin).tz(this.itemTimezone).format("YYYY-MM-DDTHH:mm")),this.item.dateTimeEnd&&(this.dateTimeEnd=Vs().utc(this.item.dateTimeEnd).tz(this.itemTimezone).format("YYYY-MM-DDTHH:mm"))},selectTimezone(e){this.selectedTimezone=e,this.timezoneSearch="",this.convertTimezones(),this.$refs.timezoneDropdown&&(this.$refs.timezoneDropdown.isActive=!1)},onTimezoneDropdownChange(e){e&&this.$nextTick(()=>{this.$refs.timezoneSearchInput&&this.$refs.timezoneSearchInput.focus()})},async shareLink(){this.isLoadingShareLink=!0;try{const e=await this.$http.plain.patch(`/event-go-publish/${this.eventUuid}`,{});if(!e.data.slugGo)return this.$buefy.toast.open({message:this.$t("Action failed. Please try again!"),type:"is-warning",duration:1500,actionText:null});const t="https://"+this.tenant.appHost+"/share/"+e.data.slugGo,i=await this.copyToClipboardAsync(t);i?this.$buefy.toast.open({message:this.$t("urlCopiedToClipboard"),type:"is-info",duration:1e3,actionText:null}):this.$buefy.toast.open({message:this.$t("Couldn't copy to clipboard"),type:"is-danger",duration:500,onClose:()=>{alert(t)}})}catch(e){console.error(e)}finally{this.isLoadingShareLink=!1}},getStaticMapImage(){this.googleMapsCoordinatesRedirect=`https://www.google.com/maps/place/${this.item.placeLatitude},${this.item.placeLongitude}`,this.staticMapImageUrl=Ds.ze+Ds.DJ+"places_api/"+this.item.placesApiId+".png"},addToGoogleCalendar(){let e=Vs().utc(this.dateTimeBegin).toISOString(),t=Vs().utc(this.dateTimeEnd).toISOString();const i="https://calendar.google.com/calendar/render?action=TEMPLATE",s=`&text=${this.encodeValue(this.item.name)}`,a=`&dates=${this.formatDate(e)}/${this.formatDate(t||e)}`,n="&ctz=UTC",o=this.item.description?`&details=${this.encodeValue(this.item.description)}`:"",l=this.item.location||this.item.meet||"",r=l?`&location=${this.encodeValue(l)}`:"",d=`${i}${s}${a}${n}${o}${r}`;window.open(d,"_blank")},addToYahooCalendar(){let e=Vs().utc(this.dateTimeBegin).toISOString(),t=Vs().utc(this.dateTimeEnd).toISOString();const i="https://calendar.yahoo.com/?v=60&view=d&type=20",s=`&TITLE=${this.encodeValue(this.item.name)}`,a=this.formatDate(e),n=this.formatDate(t||e),o=`&ST=${a}&ET=${n}`,l=this.item.description?`&DESC=${this.encodeValue(this.item.description)}`:"",r=this.item.location||this.item.meet||"",d=r?`&IN_LOC=${this.encodeValue(r)}`:"",c=`${i}${s}${o}${l}${d}`;window.open(c,"_blank")},addToOutlookCalendar(){let e=Vs().utc(this.dateTimeBegin).toDate(),t=Vs().utc(this.dateTimeEnd).toDate();const i="https://outlook.live.com/calendar/0/deeplink/compose?path=/calendar/action/compose&rru=addevent",s=`&subject=${this.encodeValue(this.item.name)}`,a=420,n=`&startdt=${this.encodeValue(this.formatDateForOutlook(e,a))}`,o=`&enddt=${this.encodeValue(this.formatDateForOutlook(e||t,a))}`,l=this.item.description?`&body=${this.encodeValue(this.item.description)}`:"",r=this.item.location||this.item.meet||"",d=r?`&location=${this.encodeValue(r)}`:"",c=`${i}${s}${l}${n}${o}${d}`;window.open(c,"_blank")},formatDate(e){return e?e.replace(/-|:|\.\d+/g,""):""},formatDateForOutlook(e,t){const i=e=>String(e).padStart(2,"0"),s=t>0?"-":"+",a=i(Math.floor(Math.abs(t)/60)),n=i(Math.abs(t)%60);return`${e.getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())}T${i(e.getHours())}:${i(e.getMinutes())}:${i(e.getSeconds())}${s}${a}:${n}`},encodeValue(e){return encodeURIComponent(e||"")},updateProgress(){if(this.uploadProgress.current++,this.uploadProgress.percentage=this.uploadProgress.current/this.uploadProgress.total*100,this.uploadProgress.current>0){const e=Date.now()-this.uploadProgress.startTime,t=e/this.uploadProgress.current,i=this.uploadProgress.total-this.uploadProgress.current;this.uploadProgress.timeRemaining=i*t}},resetProgress(){this.uploadProgress={current:0,total:0,percentage:0,startTime:null,timeRemaining:null,currentFileName:"",estimatedTotalTime:null},this.eventPhotosUpload=[],this.eventFilesUpload=[],this.eventVideosUpload=[]},formatTimeRemaining(e){if(!e||e<=0)return"";const t=Math.ceil(e/1e3);if(t<60)return`${t}s`;if(t<3600){const e=Math.floor(t/60),i=t%60;return i>0?`${e}m ${i}s`:`${e}m`}{const e=Math.floor(t/3600),i=Math.floor(t%3600/60);return i>0?`${e}h ${i}m`:`${e}h`}},formatCreatedDate(e){if(!e)return"";const t=new Date(e);return t.toLocaleDateString(this.$i18n.locale,{year:"numeric",month:"long",day:"numeric"})},openUserProfile(e,t){this.selectedUserId=e,this.selectedContactId=null,this.selectedProfileName=t||"",this.showProfileModal=!0},openContactProfile(e,t){this.isGranted("EVENT_TENANT",this.item?.localCenter)&&(this.selectedUserId=null,this.selectedContactId=e,this.selectedProfileName=t||"",this.showProfileModal=!0)},onProfileLoaded(e){e&&e.fullName&&(this.selectedProfileName=e.fullName)}},computed:{...(0,Ps.L8)(["isGranted","isGrantedOwner","user","tenant","hasHistory","isNativeApp"]),showVotesTab(){return this.item&&this.eventVotesCount>0},sortedAgendaItems(){return this.item?.agendaItems?[...this.item.agendaItems].sort((e,t)=>
1{const i=(e.timeStart||"").localeCompare(t.timeStart||"");return 0!==i?i:(e.position||0)-(t.position||0)}):[]},agendaByDay(){const e={};return this.sortedAgendaItems.forEach(t=>{if(!t.timeStart)return;const i=new Date(t.timeStart),s=i.toDateString();e[s]||(e[s]={label:this.$filters.format(t.timeStart,"weekdayLong"),items:[]}),e[s].items.push(t)}),e},subEventsByDay(){const e={};return this.subEvents.forEach(t=>{if(!t.dateTimeBegin)return;const i=this.momentInEventTz(t.dateTimeBegin),s=i.format("YYYY-MM-DD");e[s]||(e[s]={label:i.format(this.$filters.datePattern("weekdayLong")),shortLabel:i.format(this.$filters.datePattern("weekdayShort")),dayNumber:parseInt(i.format("D"),10),items:[]}),e[s].items.push(t)}),!this.selectedAgendaDay&&Object.keys(e).length&&(this.selectedAgendaDay=Object.keys(e)[0]),e},focusedSpeakerSessionsByDay(){if(!this.focusedSpeaker)return[];const e=this.focusedSpeaker.speakerName,t=this.subEvents.filter(t=>t.speakers&&t.speakers.some(t=>t.speakerName===e)),i={};return t.forEach(e=>{const t=e.dateTimeBegin?e.dateTimeBegin.substring(0,10):"unknown";i[t]||(i[t]=[]),i[t].push(e)}),Object.keys(i).sort().map(e=>({dayKey:e,label:"unknown"!==e?this.$filters.format(new Date(e+"T00:00:00"),"weekdayShort"):"",sessions:i[e]}))},focusedSpeakerCoSpeakers(){return this.focusedSpeaker&&this.subEventSpeakersList.length?this.subEventSpeakersList.filter(e=>e.id!==this.focusedSpeaker.id):[]},subEventDayKeys(){return Object.keys(this.subEventsByDay)},selectedDaySubEvents(){return this.selectedAgendaDay&&this.subEventsByDay[this.selectedAgendaDay]?this.subEventsByDay[this.selectedAgendaDay].items:[]},allEventDays(){if(!this.item?.dateTimeBegin)return{};const e=new Date(this.item.dateTimeBegin),t=this.item.dateTimeEnd?new Date(this.item.dateTimeEnd):e,i={},s=new Date(e);s.setHours(0,0,0,0);const a=new Date(t);a.setHours(23,59,59,999);while(s<=a){const e=s.getFullYear()+"-"+String(s.getMonth()+1).padStart(2,"0")+"-"+String(s.getDate()).padStart(2,"0");i[e]=this.$filters.format(s,"weekdayShort"),s.setDate(s.getDate()+1)}return i},allEventDayKeys(){return Object.keys(this.allEventDays)},agendaTabItems(){return this.agendaSearch&&this.agendaSearch.trim()?this.filteredSubEvents:this.selectedAgendaDay?this.filteredSubEvents.filter(e=>!!e.dateTimeBegin&&e.dateTimeBegin.substring(0,10)===this.selectedAgendaDay):this.filteredSubEvents},agendaTabGroupedItems(){const e=this.agendaTabItems;if(!this.agendaSearch||!this.agendaSearch.trim())return[{dayKey:null,dayLabel:null,items:e}];const t={};return e.forEach(e=>{const i=e.dateTimeBegin?e.dateTimeBegin.substring(0,10):"unknown";t[i]||(t[i]=[]),t[i].push(e)}),Object.keys(t).sort().map(e=>({dayKey:e,dayLabel:"unknown"===e?"":this.$filters.format(new Date(e+"T00:00:00"),"weekdayLong"),items:t[e]}))},filteredSubEvents(){let e=this.subEvents;if(this.showMyCalendarOnly&&(e=e.filter(e=>this.subEventAttendance[e.uuid])),this.selectedStage&&(e=e.filter(e=>e.location===this.selectedStage)),this.agendaSearch&&this.agendaSearch.trim()){const t=this.agendaSearch.trim().toLowerCase();e=e.filter(e=>e.name&&e.name.toLowerCase().includes(t)||e.speakers&&e.speakers.some(e=>e.speakerName&&e.speakerName.toLowerCase().includes(t)))}return e},allStages(){return(0,ma.j5)(this.subEvents)},availableStages(){if(this.agendaSearch&&this.agendaSearch.trim())return this.allStages;if(!this.selectedAgendaDay)return this.allStages;const e=this.subEvents.filter(e=>!!e.dateTimeBegin&&e.dateTimeBegin.substring(0,10)===this.selectedAgendaDay);return(0,ma.j5)(e)},filteredSubEventsByDay(){const e={};return this.filteredSubEvents.forEach(t=>{if(!t.dateTimeBegin)return;const i=this.momentInEventTz(t.dateTimeBegin),s=i.format("YYYY-MM-DD");e[s]||(e[s]={label:i.format(this.$filters.datePattern("weekdayLong")),shortLabel:i.format(this.$filters.datePattern("weekdayShort")),dayNumber:parseInt(i.format("D"),10),items:[]}),e[s].items.push(t)}),e},filteredSubEventDayKeys(){return Object.keys(this.filteredSubEventsByDay)},filteredSelectedDaySubEvents(){if(this.selectedAgendaDay&&this.filteredSubEventsByDay[this.selectedAgendaDay])return this.filteredSubEventsByDay[this.selectedAgendaDay].items;const e=this.filteredSubEventDayKeys[0];return e?this.filteredSubEventsByDay[e].items:[]},isEventDescriptionEmpty(){return!this.item.description||(this.item.description.length<=1||("<p></p>"===this.item.description||"<p> </p>"===this.item.description))},eventReportHasValues(){return this.item.activities||this.item.goal||this.item.advertising||this.item.budget},cover(){return null},itemTimezone(){return this.selectedTimezone?this.selectedTimezone:this.user.timezone},eventPhotosUrls(){let e=[];for(let t of this.eventPhotos)e.push((0,Is.F9)(t));return e},showTicketingSettings(){return this.item.hasEventTicketing&&(this.isGranted("FINANCIAL_TENANT")||this.isGranted("EVENT_TENANT"))},formattedTimezone(){if(!this.selectedTimezone)return"";const e=this.selectedTimezone.split("/");return e[e.length-1].replace(/_/g," ")},isShowingEventLocalTime(){return(0,Is.Gp)(this.item,this.user,this.selectedTimezone)},formattedTimezoneOffset(){if(!this.selectedTimezone)return"";const e=Vs().tz(this.selectedTimezone).format("Z");return`GMT${e}`},formattedTimezoneCity(){if(!this.selectedTimezone)return"";const e=this.selectedTimezone.split("/");return e[e.length-1].replace(/_/g," ")},filteredPopularTimezones(){const e=this.timezoneSearch.toLowerCase();return this.popularTimezones.map(e=>({...e,offset:`GMT${Vs().tz(e.value).format("Z")}`})).filter(t=>!e||t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e))},allTimezones(){return Vs().tz.names().map(e=>{const t=e.split("/"),i=t[t.length-1].replace(/_/g," "),s=t.length>1?t[0].replace(/_/g," "):"";return{value:e,label:`${s?s+" - ":""}${i}`,offset:`GMT${Vs().tz(e).format("Z")}`}})},filteredAllTimezones(){const e=this.timezoneSearch.toLowerCase();return e?this.allTimezones.filter(t=>t.label.toLowerCase().includes(e)||t.value.toLowerCase().includes(e)).slice(0,30):this.allTimezones.slice(0,20)},formattedMonthAbbr(){return this.dateTimeBegin?Vs()(this.dateTimeBegin).format("MMM").toUpperCase():""},formattedDay(){return this.dateTimeBegin?Vs()(this.dateTimeBegin).format("D"):""},formattedDateLine(){if(!this.dateTimeBegin)return"";const e=Vs()(this.dateTimeBegin),t=Vs()().year(),i=e.year();return i===t?e.format(this.$filters.datePattern("weekdayLong")):e.format(this.$filters.datePattern("weekdayLongYear"))},formattedTimeRange(){if(!this.dateTimeBegin)return"";const e=Vs()(this.dateTimeBegin).format("HH:mm");if(!this.dateTimeEnd||this.dateTimeEnd===this.dateTimeBegin)return e;const t=Vs()(this.dateTimeEnd).format("HH:mm");if(this.sameDay(this.dateTimeEnd,this.dateTimeBegin))return`${e} - ${t}`;const i=Vs()(this.dateTimeEnd);return`${e} - ${i.format(this.$filters.datePattern("shortDate"))} ${t}`},eventWithFormConfig(){return this.item?this.item.registrationFormConfig?this.item:this.registrationFormConfigResolved?{...this.item,registrationFormConfig:this.registrationFormConfigResolved}:this.item:null},selectedTicketInfo(){return this.priceId&&this.item?.product?.productPrices?this.item.product.productPrices.find(e=>e.id===this.priceId):this.selectedProductPrice||null}
1,sortedPrices(){if(!this.item?.product?.productPrices)return[];const e=this.user?.isFeeActive&&this.user?.feeTenantProductPrice?.id?this.user.feeTenantProductPrice.id:null;return[...this.item.product.productPrices].filter(e=>!e.isArchived).map(t=>e&&"members"===t.isRestricted&&Array.isArray(t.allowedFeeProductPrices)&&t.allowedFeeProductPrices.some(t=>(0,Is.D8)(t)===e)?{...t,_isPersonalMatch:!0}:t).sort((e,t)=>(e.price||0)-(t.price||0))},currentTickets(){return this.sortedPrices.filter(e=>this.isTicketCurrentlyValid(e))},upcomingTickets(){return this.sortedPrices.filter(e=>this.isTicketUpcoming(e)).sort((e,t)=>new Date(e.validFrom)-new Date(t.validFrom))},expiredTickets(){return this.sortedPrices.filter(e=>this.isTicketExpired(e)).sort((e,t)=>new Date(t.validTo)-new Date(e.validTo))},totalTicketCount(){return this.ticketSelections.reduce((e,t)=>e+t.quantity,0)},totalTicketPrice(){return this.ticketSelections.reduce((e,t)=>e+(t.price||0)*t.quantity,0)},nextUpcomingTicket(){return this.upcomingTickets[0]||null},displayedAttenders(){return this.attenders.slice(0,6)},isDraftPreview(){return"draft"===this.item?.status&&!0===this.item?.canEditEvent},canSeeAttenders(){return!!this.item&&(!!this.isGrantedOwner(this.item)||!(!this.item.hasPublicAttendeeList||!this.isAttending))},othersRoute(){const e=this.item?.hasNetworking?"EventAppNetworking":"EventAppParticipants";return{name:e,params:{item:this.item.uuid}}},firstAttenderName(){if(!this.attenders.length)return"";const e=this.attenders[0];return e.external?e.external.name:e.user?.fullName||""},firstAttenderLink(){if(!this.attenders.length)return null;const e=this.attenders[0];return e.external||!e.user?null:{name:"UserShow",params:{item:e.user.id}}},secondAttenderName(){if(this.attenders.length<2)return"";const e=this.attenders[1];return e.external?e.external.name:e.user?.fullName||""},secondAttenderLink(){if(this.attenders.length<2)return null;const e=this.attenders[1];return e.external||!e.user?null:{name:"UserShow",params:{item:e.user.id}}},firstAttenderIsUser(){if(!this.attenders.length)return!1;const e=this.attenders[0];return!e.external&&e.user},firstAttenderIsExternal(){if(!this.attenders.length)return!1;const e=this.attenders[0];return e.external},secondAttenderIsUser(){if(this.attenders.length<2)return!1;const e=this.attenders[1];return!e.external&&e.user},secondAttenderIsExternal(){if(this.attenders.length<2)return!1;const e=this.attenders[1];return e.external},ticketQrCodeUrl(){if(!this.isAttending?.hash||!this.tenant?.appHost)return null;let e=`https://${this.tenant.appHost}/event-attend/check-ticket/${this.isAttending.hash}`;return"app.orgo.space"===this.tenant.appHost&&(e+=`?workspace=${this.tenant.slug}`),e},rsvpStatusClass(){const e=this.isAttending?.statusRsvp;this.isAttending;return this.isAttending?"not_attending"===e?"is-not-going":"attending"===e||"attended"===e?"is-going":"maybe"===e?"is-maybe":this.isAttending.isInvited?"is-not-going":"is-maybe":"is-not-going"},rsvpStatusIcon(){const e=this.isAttending?.statusRsvp;this.isAttending;return this.isAttending?"not_attending"===e?"fa-light fa-xmark":"attending"===e||"attended"===e?"fa-light fa-circle-check":"maybe"===e?"fa-light fa-question":this.isAttending.isInvited?"fa-light fa-xmark":"fa-light fa-question":"fa-light fa-xmark"},rsvpStatusText(){const e=this.isAttending?.statusRsvp;this.isAttending;return this.isAttending?"not_attending"===e?this.$t("Not going"):"attending"===e?this.$t("Going"):"attended"===e?this.$t("Attended"):"maybe"===e?this.$t("Maybe"):this.isAttending.isInvited?this.$t("Not going"):this.$t("Maybe"):this.$t("Not going")},isRsvpGoing(){return!!this.isAttending&&(!!this.isAttending.statusRsvp&&("attending"===this.isAttending.statusRsvp||"attended"===this.isAttending.statusRsvp))},isRsvpMaybe(){return!!this.isAttending&&(this.isAttending.statusRsvp?"maybe"===this.isAttending.statusRsvp:!this.isAttending.isInvited)},isRsvpNotGoing(){return!this.isAttending||!!this.isAttending.statusRsvp&&"not_attending"===this.isAttending.statusRsvp},showInlineRsvpQr(){return this.isRsvpGoing&&!!this.ticketQrCodeUrl&&!!this.item?.location&&!this.item?.requiresRegistrationForm},isAtCapacity(){return!!this.item?.maxCapacity&&this.attendersTotal>=this.item.maxCapacity},seatsLeft(){return this.item?.maxCapacity?Math.max(0,this.item.maxCapacity-(this.attendersTotal||0)):null},speakersGroupedByDay(){return this.speakers&&this.speakers.length?{all:{label:this.$t("Speakers"),speakers:this.speakers}}:{}}},components:{AgendaRow:ra.A,AgendaToolbar:da.A,EventAgendaViewer:ca.A,SubEventAttendButton:ua.A,FontAwesomeIcon:Os.gc,LogoUpload:xs.A,LogoThumbnail:Ms.A,UserSearchAutocomplete:Ns.A,EventUserInvite:Us.A,EventDateTimeBox:Ws.A,EventLocationBox:js.A,EventCalendarDropdown:la,EventAboutSection:pa.A,EventHostedBy:ha.A,EventMediaGallery:ga.A,EventMapPreview:fa.A,ItemViewModal:ba.A,UserShowContent:(0,s.$V)(()=>Promise.resolve().then(i.bind(i,6720))),ContactShowContent:(0,s.$V)(()=>Promise.resolve().then(i.bind(i,52959))),EventTicketSelector:va.A,EventRegistrationStatusBox:ka.A,QrcodeVue:Ca.Ay,EventMyTickets:La.A,EventCheckoutModal:wa.A,EventDraftBanner:Va,ShareEventPreviewModal:ln,EventSpeakerCard:dn.A,QRScannerModal:zn,VoteList:qn["default"]},mixins:[Qs.A,ya.x,Gs.A,Bs.A]};const Hn=(0,na.A)(Jn,[["render",As],["__scopeId","data-v-5332455e"]]);var Kn=Hn},99357:function(e,t,i){"use strict";function s(e){return!0===e?.settingFeatures?.website?.isActive}i.d(t,{m:function(){return s}})},99440:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(90033);const n={class:"px-4 py-3"},o={class:"is-flex is-justify-content-space-between"},l={class:"has-text-weight-semibold ml-3"},r={class:"has-text-centered py-4 has-text-grey"};function d(e,t,i,d,c,u){const m=(0,s.g2)("b-input"),p=(0,s.g2)("b-dropdown-item"),h=(0,s.g2)("b-dropdown");return(0,s.uX)(),(0,s.Wv)(h,{modelValue:c.isActive,"onUpdate:modelValue":t[2]||(t[2]=e=>c.isActive=e),"mobile-modal":"",triggers:["click"],"aria-role":"list",class:"phone-prefix-dropdown",onActiveChange:u.onDropdownToggle},{trigger:(0,s.k6)(()=>[(0,s.bF)(m,{modelValue:u.triggerValue,"onUpdate:modelValue":t[0]||(t[0]=e=>u.triggerValue=e),placeholder:i.placeholder,readonly:"","icon-right":"chevron-down",required:i.isRequired,disabled:i.isDisabled,class:"phone-prefix-trigger"},null,8,["modelValue","placeholder","required","disabled"])]),default:(0,s.k6)(()=>[(0,s.bF)(p,{custom:"",paddingless:""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",n,[(0,s.bF)(m,{ref:"searchInput",modelValue:c.searchQuery,"onUpdate:modelValue":t[1]||(t[1]=e=>c.searchQuery=e),placeholder:e.$t("Search country or prefix"),icon:"search",size:"is-small"},null,8,["modelValue","placeholder"])])]),_:1}),((0,s.uX)(!0),(0,s.CE)(s.FK,null,(0,s.pI)(u.filteredCountries,e=>((0,s.uX)(),(0,s.Wv)(p,{key:e.c,value:e.c,"aria-role":"listitem",onClick:t=>u.selectCountry(e)},{default:(0,s.k6)(()=>[(0,s.Lk)("div",o,[(0,s.Lk)("span",null,(0,a.v_)(e.n),1),(0,s.Lk)("span",l,"+"+(0,a.v_)(e.p),1)])]),_:2},1032,["value","onClick"]))),128)),0===u.filteredCountries.length?((0,s.uX)(),(0,s.Wv)(p,{key:0,custom:""},{default:(0,s.k6)(()=>[(0,s.Lk)("div",r,(0,a.v_)(e.$t("No countries found")),1)]),_:1})):(0,s.Q3)("",!0)]),_:1},8,["modelValue","onActiveChange"])}i(18111),i(22489),i(20116);var c=i(95256),u={name:"PhoneCountryPrefixSelect",props:{modelValue:{type:String,default:null},placeholder:{type:String,default:""},isRequired:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],data(){return{isActive:!1,searchQuery:"",countries:c.Xr.filter(e=>null!==e.p)}},computed:{filteredCountries(){if(!this.searchQuery||0===this.searchQuery.length)return this.countries;const e=this.searchQuery.toLowerCase();return this.countries.filter(t=>{const i=t.n.toLowerCase(),s=t.p.toString();return i.includes(e)||s.includes(e)})},selectedCountry(){return this.countries.find(e=>e.c===this.modelValue)},triggerValue:{get(){return this.selectedCountry?`+${this.selectedCountry.p}`:""},set(){}}},created(){if(!this.modelValue){const e=navigator.language||navigator.userLanguage||"",t=e.split("-")[1]?.toUpperCase();if(t){const e=this.countries.find(e=>e.c===t);e&&this.$emit("update:modelValue",e.c)}}},methods:{selectCountry(e){e&&(this.$emit("update:modelValue",e.c),this.isActive=!1,this.searchQuery="")},onDropdownToggle(e){e?this.$nextTick(()=>{this.$refs.searchInput&&this.$refs.searchInput.focus()}):this.searchQuery=""}}},m=i(66262);const p=(0,m.A)(u,[["render",d],["__scopeId","data-v-43d8367c"]]);var h=p},99882:function(e,t,i){"use strict";i.d(t,{A:function(){return h}});var s=i(20641),a=i(90033),n=i(53751);const o={class:"mobile-filter-section"},l={class:"mobile-filter-section-title"},r={class:"icon is-small"},d={class:"mobile-filter-section-content"};function c(e,t,i,c,u,m){const p=(0,s.g2)("font-awesome-icon");return(0,s.uX)(),(0,s.CE)("div",o,[(0,s.Lk)("div",{class:"mobile-filter-section-header",onClick:t[0]||(t[0]=(...e)=>m.toggle&&m.toggle(...e))},[(0,s.Lk)("span",l,(0,a.v_)(i.title),1),(0,s.Lk)("span",r,[(0,s.bF)(p,{icon:u.isExpanded?"fa-light fa-chevron-up":"fa-light fa-chevron-down"},null,8,["icon"])])]),(0,s.bo)((0,s.Lk)("div",d,[(0,s.RG)(e.$slots,"default",{},void 0,!0)],512),[[n.aG,u.isExpanded]])])}var u={name:"MobileFilterSection",props:{title:{type:String,required:!0},expanded:{type:Boolean,default:!1}},data(){return{isExpanded:this.expanded}},watch:{expanded(e){this.isExpanded=e}}
1,methods:{toggle(){this.isExpanded=!this.isExpanded,this.$emit("toggle",this.isExpanded)}}},m=i(66262);const p=(0,m.A)(u,[["render",c],["__scopeId","data-v-147b0ccc"]]);var h=p},99914:function(e,t,i){"use strict";i.d(t,{A:function(){return m}});var s=i(20641),a=i(90033);const n={class:"personal-id-field-row"},o=["disabled","title"],l={class:"icon is-small"};function r(e,t,i,r,d,c){const u=(0,s.g2)("b-input"),m=(0,s.g2)("font-awesome-icon"),p=(0,s.g2)("b-field");return(0,s.uX)(),(0,s.Wv)(p,{label:i.label,message:i.hint,class:"personal-id-field"},{default:(0,s.k6)(()=>[(0,s.Lk)("div",n,[i.readonly?((0,s.uX)(),(0,s.CE)("span",{key:0,class:(0,a.C4)(["personal-id-field-masked",{"personal-id-field-plain":null!==d.revealed}]),"data-test":"personal-id-value"},(0,a.v_)(null!==d.revealed?d.revealed||"-":i.hasValue?c.maskedValue:"-"),3)):((0,s.uX)(),(0,s.Wv)(u,{key:1,modelValue:d.draft,"onUpdate:modelValue":[t[0]||(t[0]=e=>d.draft=e),c.onInput],class:"personal-id-field-input",placeholder:i.hasValue&&!d.draft?c.maskedValue:i.placeholder,disabled:i.disabled,autocomplete:"off","data-test":"personal-id-input"},null,8,["modelValue","placeholder","disabled","onUpdate:modelValue"])),i.canReveal&&i.hasValue?((0,s.uX)(),(0,s.CE)("button",{key:2,type:"button",class:(0,a.C4)(["button is-light is-rounded personal-id-field-reveal",{"is-loading":d.isRevealing}]),disabled:d.isRevealing||i.disabled,title:null===d.revealed?e.$t("Reveal"):e.$t("Hide"),onClick:t[1]||(t[1]=(...e)=>c.toggleReveal&&c.toggleReveal(...e))},[(0,s.Lk)("span",l,[(0,s.bF)(m,{icon:null===d.revealed?"fa-light fa-eye":"fa-light fa-eye-slash"},null,8,["icon"])]),(0,s.Lk)("span",null,(0,a.v_)(null===d.revealed?e.$t("Reveal"):e.$t("Hide")),1)],10,o)):(0,s.Q3)("",!0)])]),_:1},8,["label","message"])}var d={name:"PersonalIdField",props:{modelValue:{type:String,default:""},subjectType:{type:String,default:"user",validator:e=>["user","contact"].includes(e)},subjectId:{type:[Number,String],default:null},hasValue:{type:Boolean,default:!1},canReveal:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},label:{type:String,default:""},placeholder:{type:String,default:""},hint:{type:String,default:""}},emits:["update:modelValue"],data(){return{draft:this.modelValue||"",revealed:null,isRevealing:!1}},computed:{maskedValue(){return"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"},revealUrl(){return`/${"contact"===this.subjectType?"contacts":"users"}/${this.subjectId}/personal-id`}},methods:{onInput(e){const t="string"===typeof e?e.trim():"";this.$emit("update:modelValue",""===t?null:e)},toggleReveal(){if(null!==this.revealed)return this.draft===this.revealed&&(this.draft=""),void(this.revealed=null);this.subjectId&&(this.isRevealing=!0,this.$http.plain.get(this.revealUrl).then(e=>{this.revealed=e.data?.personalIdNumber??"",this.readonly||(this.draft=this.revealed)}).catch(e=>{console.error(e),this.$buefy.snackbar.open({message:this.$t("Could not reveal the personal identification number"),type:"is-danger",duration:5e3})}).finally(()=>{this.isRevealing=!1}))}}},c=i(66262);const u=(0,c.A)(d,[["render",r],["__scopeId","data-v-1ca30ac6"]]);var m=u}},t={};function i(s){var a=t[s];if(void 0!==a)return a.exports;var n=t[s]={id:s,loaded:!1,exports:{}};return e[s].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=e,function(){var e=[];i.O=function(t,s,a,n){if(!s){var o=1/0;for(c=0;c<e.length;c++){s=e[c][0],a=e[c][1],n=e[c][2];for(var l=!0,r=0;r<s.length;r++)(!1&n||o>=n)&&Object.keys(i.O).every(function(e){return i.O[e](s[r])})?s.splice(r--,1):(l=!1,n<o&&(o=n));if(l){e.splice(c--,1);var d=a();void 0!==d&&(t=d)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[s,a,n]}}(),function(){i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,{a:t}),t}}(),function(){var e,t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};i.t=function(s,a){if(1&a&&(s=this(s)),8&a)return s;if("object"===typeof s&&s){if(4&a&&s.__esModule)return s;if(16&a&&"function"===typeof s.then)return s}var n=Object.create(null);i.r(n);var o={};e=e||[null,t({}),t([]),t(t)];for(var l=2&a&&s;("object"==typeof l||"function"==typeof l)&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach(function(e){o[e]=function(){return s[e]}});return o["default"]=function(){return s},i.d(n,o),n}}(),function(){i.d=function(e,t){for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}}(),function(){i.f={},i.e=function(e){return Promise.all(Object.keys(i.f).reduce(function(t,s){return i.f[s](e,t),t},[]))}}(),function(){i.u=function(e){return e+"."+{19:"e98c5a0d704dfdc5",24:"43e4a08fd2e80e7b",25:"e86422b4fb6f9be9",34:"3565847d9837ec26",49:"f85f48336aa38587",109:"fb3ce0f7bbe64174",142:"5577fbaaa67e5f0f",188:"d4cc441d00c69989",205:"16b9c5d07d60c124",225:"3c3c5a11debc3f6d",273:"e2806340faf5cf0c",309:"93f241f577376dce",353:"d55a92b665ff425a",367:"f7e4b9d3af872f61",369:"34026496bca2bbcb",375:"bf7963368b9fdcf9",389:"4f8f5dd470448127",439:"7bdc8f2b74f89134",466:"5ff292c8adbf042f",476:"adb8874333e62553",492:"e1b35f5279f2b847",544:"92e4e638419fd610",603:"b3973ca644ab6c8a",630:"49ecb7964a6ead1b",632:"bc0f4a27c9f3fea8",667:"bcd1f90512c0a10c",687:"24162a753b98179e",691:"b0f778746be31026",763:"712c49170f3a2547",769:"1b7627275b103d30",836:"3cc74bcdeb58f449",839:"386ed5e39aa6f58f",852:"f7f3d4645a8f600f",865:"054535a21dd85a16",870:"d89185df7738dc94",898:"4573d6fb8ed1fcc4",899:"52862c8cf8ce4e8b",920:"ae63cd
1a76674bf33",936:"7d1d44f3f4624cb3",952:"f3f72756dbb95cca",954:"9a0a9b599ab76a74",973:"01e30f53c06069ee",980:"ad6cf1e4b97470ae",993:"cf210f70b275aa7a",1009:"e79d72aa3133ebc5",1040:"edf01c3d2d1f6026",1044:"31ad192b7f47e211",1085:"b3264b423cfc0fad",1091:"756490bea1438158",1102:"9dad92886c7f2f45",1119:"2f88261e5edf091c",1136:"ea292428ecedacfb",1137:"4b1fd0b6a410e1ad",1144:"5ca7a2281514db57",1151:"cb624954ad115324",1203:"ffa6b0e04c1a37bb",1205:"7ae9663dae54568a",1217:"1733d6661e199592",1223:"9daf249135aa973a",1288:"94992715bdcf33d0",1317:"f190d07fc820aa58",1348:"9267daec18edc259",1366:"0c5f26cfb8a94947",1372:"0cb6574437a0ab4d",1401:"d017192b60427e30",1405:"31c9e44aa85c64a2",1410:"e14c2128b160be3f",1484:"75cc02afda517ba6",1489:"1fe85129d5825e9d",1530:"d82c3e88590db25b",1539:"a7a82663886b6f15",1572:"1704af5bed4def29",1580:"6c12bdab3d4a9f2b",1596:"0bd1d8d48324d13f",1606:"1b73f84727b2e594",1613:"2a979b1872d97014",1635:"1c6d0b5cfaa77368",1673:"9f79b55634883876",1681:"073508403fa2d0f0",1704:"2f58de48adc62318",1731:"77934b48a7cba774",1736:"eab97b4b28fd8b57",1738:"ec83bc7e26161172",1892:"93796fabb26d2de1",1919:"f11122c59f6e2dd3",1926:"ed9b967d9c1fad0d",1993:"bfba09acbee003bc",2008:"aef653de1251d88a",2018:"e5b653357325ba14",2029:"f7991bd8258e9094",2058:"4dffca299bdf42e9",2077:"d74266f80affee2b",2106:"6f22e0be4e85b8b8",2130:"c280b4ffea5aef3c",2258:"e5efb0fa81c29f51",2280:"b68a30491742449b",2293:"b94558cb46a2c4c2",2320:"157bb357009ea7e7",2346:"83c926e3a7802137",2391:"86418590fd37c488",2443:"7d9b968436b7ffc8",2466:"f4191e9bcd9b5fff",2471:"60e5aa7d4ee6fe46",2526:"3979653a8c642f6c",2561:"7dcc5574c18a4880",2575:"39d7e3afbb36001f",2596:"7d2450ead827677f",2616:"fa43d5e81e869620",2624:"ed648166db6f5265",2635:"9523780af86b9e01",2636:"8854598de1dcb4ee",2638:"f824d6c47ec90fc5",2664:"4cc6dec0964df077",2681:"f778fa5572f1caa8",2687:"fe25854f493ba2f6",2702:"17b2f83d8781a9a1",2708:"fbcf42a993f7930f",2721:"cbbfdad08edff9a9",2734:"7225105fb824d719",2744:"4f5256c7bb852e10",2748:"a6d217c4632ae5c5",2758:"c66c924ee98e7ec8",2764:"ae2bb2d0441e1347",2776:"af5e61e5ae669f9b",2842:"cfad36a460197cc5",2876:"5b67748e40b5b78d",2889:"5433296a5fe7aa17",2992:"dd37d922805f4e79",3009:"15c37e62c704aba2",3091:"bb97987a941d6f89",3106:"56a34ca3c1e8bb72",3173:"057b3257779ea34c",3181:"762fbabfcaf2cde9",3218:"9661f6c58d50ac5f",3228:"058a623a0f091799",3241:"5a68477bbbd87ceb",3260:"4f1689822374c3dc",3363:"9f73caab18a2714e",3376:"5130a1fedaa70002",3395:"ef7755b3b13b63e1",3400:"b01ef333b202efd4",3409:"63f4a2c1a8dd1d1a",3423:"5e1f7edb3783e651",3470:"727ec29070ca6fc8",3492:"cc21f375a524a020",3519:"06f99c5d9f3f9b8d",3524:"618db42055e1fdce",3527:"a144479bd1431a8c",3534:"128ccbef2a5e420a",3538:"78113f0f4870dc33",3558:"403e1b01ed6c71fa",3566:"4af9eea29b46f20d",3595:"e48ba1f6e7736eab",3616:"8be5ed04671286c4",3676:"b7ba794596c72126",3689:"6c544500f52fcd66",3694:"3d79390c30f24b42",3699:"0b67a6998bb5fc77",3702:"f389393a617d60a9",3718:"5ec20f6d4eb293e2",3725:"9952ddf7ab8daf2f",3748:"d8db92b6975c2c9b",3753:"01076e0c2cab5fe4",3757:"62de2119832a0c1c",3770:"5d6cba5ad861dbc7",3781:"4d6ffd63303475c8",3818:"fc788eae7b25e8b4",3827:"90397b52a41a6969",3835:"f491a5e50dd342f5",3849:"9de8ea712dce0275",3850:"8755d1fca2797dfe",3885:"38d302b52d5f5c62",3896:"719f5324d2f0184c",3906:"366f62e5bdae17cb",3918:"0198d4a101370174",3950:"673ae72fe7f86c60",3998:"ecb8c9ad94bd8ed1",4041:"6f399422064b3f25",4044:"74ec2b02caf356cc",4064:"dfaddd877c3929fb",4079:"d66fdb62da044dc4",4114:"bb71814890c18110",4115:"133432a6f93ceeee",4133:"602f0d263e91b5de",4147:"45122082297dd9eb",4231:"84c221619cbb3ac7",4259:"8c519ee7d239916c",4281:"e0de9ae1bd78f9e9",4295:"79d6f8ebc3915930",4355:"a0bec979503ab5f4",4432:"73282ed418768b1f",4444:"2a02346fd2d8a6c0",4471:"87b3b2e65bacfb56",4475:"06553fbb3162765c",4503:"6733b9aae4cc5f9c",4510:"54ed42a4b86e4777",4519:"96cbc4edcdbbdb54",4536:"b40de3798ff95151",4543:"59c5b4a1fc8b5b36",4573:"2796bc0a05e88d25",4611:"629baa6570dcd0c5",4617:"9574d0ec424e1e49",4637:"1525ca417127caf0",4670:"cb2d1cc22c867cb4",4680:"a24b0e674f71cb0a",4681:"60378e0b4c3c0be8",4737:"d381fd7d1af4a097",4740:"b7f8398cdff3dcb2",4773:"c5be0ba8f96f9be5",4790:"3d143d2146ef64f8",4861:"560633b3b5a179d8",4879:"57b2335881efba58",4895:"945ae95b44011363",4903:"b9289f9cb9504b49",4928:"aa4328ea00d8308c",4950:"45c27cd2c984fc0f",4954:"415eae73706546dd",5092:"04c5f1eabdee881d",5122:"b6dc2e60
17af41d61",5190:"ac545837cf07edea",5199:"d42b6f531045e327",5207:"f0b5c66b3c24b807",5214:"7c6117e0bdb8c022",5222:"723e2575330bcb09",5235:"eea95a654b09ba5a",5241:"fc8f064518fdcd6e",5258:"fd04fc704c831c16",5300:"19ba22ad097c8c12",5325:"b589401901d557ec",5347:"d646fe7abc0585ae",5488:"2911f1c3b22faab0",5491:"dfa3e3c408198e96",5501:"85cad80e2ea05a3e",5556:"4398cb8d59634cf1",5584:"6b81f8cde985067e",5608:"48d0d97b3d74a82d",5626:"086e2bee4585ae10",5627:"f902d9c0c6316101",5676:"c5fb9bdb5294ff1b",5701:"0c68f29b24cf2b26",5763:"61d1ba07e8b91907",5775:"d331d62e4c2650d9",5796:"2559c951ae0317fb",5807:"4b182f13c90f74e9",5832:"2ed8e49b2be480e2",5834:"78bb89e548de1b94",5884:"9f70a6703a3843c7",5910:"ef64d1fa9c5d336a",5911:"152a8f01f6aa2966",5927:"4a3985fa610bf3fd",5949:"079ed5d50d350af8",5963:"b222630261188490",5972:"641cb456e2ec6013",6042:"e730cc88cf6d5dae",6062:"81ff5b4c467daaa7",6071:"235ac648b6c72ad8",6087:"763b178df4eee578",6090:"0d728a7cd9d3c4d1",6115:"6d3898e0d81b9995",6118:"b38a52d2f957dec1",6162:"a35cdf5676a8732e",6175:"b36d0098ffe31e78",6185:"2a7169338c68cdbc",6226:"f66243dcafee7501",6237:"a6e5c55f717348db",6297:"b855e269fff35deb",6320:"57f95053617dc777",6327:"4e536cdd838b0983",6331:"7a05ef68fcca1151",6424:"a1c7d7ffd38811dd",6464:"d5678633f7953fda",6478:"b7c7d164ffc54b44",6531:"fb879c7ed3f767c5",6541:"a4e49a935a4111bf",6550:"1802525c96e95723",6551:"7eed1edae603d7df",6573:"eb2e9abfc5ab4125",6612:"c2de59e1df7a37e6",6626:"730eefc27989a529",6675:"990a67918d3f78ac",6676:"9c2a93a13deca173",6760:"03f178804a79b7eb",6786:"f23091e755519157",6801:"16953586708907c1",6811:"8c3ce76144b47df8",6828:"a68ae8a5b2812688",6854:"032f9449d0a42394",6865:"c3955b821c4c2018",6872:"330badcd5ece8d72",6885:"86e9c3c6eec6c94a",6920:"045da80071ecc646",6924:"f44509d920368953",6944:"6bc74694ba788f81",6945:"928e702bf98366bd",7006:"5f06369a220e78f5",7011:"0f04b15fe1a15368",7043:"cc85b5b071d2dd9b",7098:"3e4d0abccce68cbe",7131:"5da4e916b675517a",7147:"ee4dc19c3ab981c6",7187:"872f2df39254f449",7210:"af3acdb203d38fee",7231:"275b9e0cf42f95c3",7233:"15699029c8a19df5",7251:"5c6916805ffafb4b",7252:"177b96fb728e359e",7303:"94b8349651132f83",7319:"0248839f6645cca3",7353:"6614e0d1fdef0893",7355:"f48ba7ca94f46af0",7421:"5df72ae96af1321b",7433:"ef285ec40437104f",7460:"bb91c7f9c55230ab",7504:"19aba36fb20d4909",7518:"f462b8d908fc97e6",7521:"be083bbdaca57da9",7546:"3dfee1c680dc7b27",7553:"d0051f2e07b73b71",7558:"147490657f11df90",7585:"9ff2f4ade1db3f0d",7602:"18d7f207ba51eb1e",7616:"69aaf96cbd85a429",7618:"64bc1c0833632589",7633:"bf9540ecfb5413bb",7659:"38808267d7a2d51c",7663:"95ec76f9dff93e2e",7703:"fa776f5e0385476a",7742:"3148ecfdffb5889b",7747:"7725b320d1ea9f5b",7825:"e75958d8b8f357aa",7868:"2a97cebd0e3ef896",7873:"dab3e24bd9f9611e",7878:"2b6db2756557886a",7919:"4905a971e9993876",7944:"efc61a05f931fa91",7983:"16e3c70d1caa7e4d",8027:"d043c3a7a26bd3b8",8055:"416b96582db25ed6",8057:"4b5ebe2a54e4c066",8084:"1882905ccf385dc3",8134:"bc10cc601b5cffc8",8144:"65a4ac858cf1ebc2",8148:"2a62def42e62e80b",8217:"aa5d3fb51e400f03",8227:"da6b5755af2cc650",8229:"98ec25f09aafc2b4",8302:"9f0a0960c34e63c9",8308:"f7c98953ee0a0c0c",8310:"e4d476d732fccd37",8312:"4d1c024348b34026",8316:"112080611ecded9c",8352:"a6ebb2f1e28adf1b",8375:"c6c767cf235133f8",8376:"3f975953d70ffee7",8474:"e7f37eca699a75a4",8562:"d95c8807d66ecc6d",8595:"fa9e729be0362f3c",8598:"1b697d7c2519a3d3",8633:"080209aced5ffd79",8662:"b77b769a9cc1df3e",8665:"a2e2c72310861f2f",8670:"8800ce8ded69e897",8729:"0db501d71b4a797f",8733:"8a3704c2c3e4321f",8789:"27a9c2bc5c8b79f2",8842:"da5906ccfbb3edf3",8852:"0f352f2f5a5e6df5",8854:"b9488e293d849bf4",8866:"9a25a6021eba5c56",8878:"36829068bcaab12f",8895:"44ce14d4de291bfa",8942:"eb8e50e18be70b3a",8947:"4dc94fabc037f71d",8956:"a050c55569117b9e",8958:"197de6325701ddab",8972:"cb9bdb0791ce08b9",8982:"935de29d12baac47",8991:"c60c438ef2fbfe1a",8999:"1c1eaf81d933fa27",9009:"188e2fae82e8fd0e",9015:"03f158fefe87217e",9059:"91f625eaa5c820f2",9070:"68bde3aefc2e3ef1",9085:"45b55f70e6887107",9091:"21a0458bcdd3010f",9105:"a313d26e5387cc8e",9106:"6a4d7fc16a1c49ab",9115:"381502c4485c300e",9143:"570d29d2a68aad06",9177:"41b5e5cefa6b3d63",9191:"ade5a05cd54bb513",9196:"7b207721ed9ecfb0",9211:"f728dc69998e9777",9225:"133257144daf3294",9226:"ce8cb4874a900583",9233:"3b4a4c57dbe6b362",9275:"6ca174922637b3e4",9313:"b088a99c3bab1c86",9315:"cba81cf25b2905a5",9324:"c24902d752a1c15d",9405:"0e7608fb235241c9",9433:"6a5fb137a186d423",9448:"ebeb153b1da4b934",9454:"ef969be9de314c79",9467:"50b94fdb5398b1cd",9504:"e6c5a86197b9f8f6",9511:"11df50428d92fe51",9518:"d34daca03f4b2cc1",9531:"387d16b34e5715b8",9546:"b286461f965d6eb4",9557:"095c1c5b981f59a3",9558:"34ab23
1c8f95c264d",9577:"c26cd0dd296949c4",9579:"6ea6baf7d7d811b5",9620:"c154cb2ca6ef09c2",9625:"bec6d8ade730f366",9636:"b2b0b09a52e8068f",9643:"37cd65e80a4c2bd8",9715:"b7714ed6a6581c0e",9723:"2c7bcc26713c1636",9811:"41902db6a4388291",9818:"7917cd5c964626fd",9825:"148aaf9a7a05af72",9826:"d5a5e0065f979af1",9832:"903d67ff8be51410",9844:"ebbc70ebbd1e92c2",9960:"5e23112236af3740",9967:"412058ae3c0646d1",9980:"2d0997b901983149"}[e]+".bundle.js"}}(),function(){i.miniCssF=function(e){return"css/"+e+"."+{19:"1138f16d",24:"1b9b218f",25:"52814121",142:"17f359e1",225:"61f7e15f",273:"ff7b5edb",309:"c2c6d54e",353:"c1c7a985",375:"1a58c0d4",439:"1f323108",466:"9e5e053d",476:"47ffcaa3",492:"f2686b44",630:"bf7102de",632:"f766cf08",667:"fdcf2bbb",687:"e03c9386",691:"fd43cbc9",763:"091400f8",836:"f483924f",839:"c8521dac",852:"753168ba",899:"0a6e302c",952:"eeb44c20",954:"a12a9159",973:"62ce2d35",993:"8cce4146",1009:"2281f146",1040:"4054d7e2",1102:"2ffe137f",1136:"a64ef0b8",1137:"604ae1e7",1144:"3587791c",1203:"9f26713c",1205:"ad5ae0e8",1217:"da0fb4c1",1223:"1ec61dee",1348:"8c3d371b",1372:"4556509d",1401:"edd49297",1484:"c7e2de63",1539:"33203c1d",1572:"e9d452e5",1580:"fd43cbc9",1613:"6b46e05d",1635:"8d6a5559",1704:"d22bb3fa",1731:"79db9a88",1736:"64ea82fa",1738:"6ed96d9a",1919:"cd543d52",1993:"29e06b4a",2018:"022200e2",2058:"7a7951e9",2077:"8b05a9e9",2106:"6c643922",2130:"47ddb677",2293:"40a0fe0e",2320:"120a4d76",2346:"93a13914",2391:"6407b662",2466:"60e5a35b",2471:"97d95b0e",2526:"58660d72",2561:"2298fab4",2575:"e9dc30ee",2596:"b3fe7c2e",2616:"84ead3a6",2624:"1d4f1aec",2635:"75fd498e",2638:"f20b9553",2664:"ddc2e797",2681:"47ddb677",2687:"94f2afb8",2721:"d0cfc945",2734:"ba6ba47e",2744:"b19a4cac",2748:"39880840",2758:"913cd9ea",2776:"765cf301",2842:"7dc9e843",2889:"f8de2643",2992:"80b52608",3009:"95f24910",3091:"af93a8fa",3106:"62b1550d",3228:"f655259d",3241:"7687fd76",3260:"02fbc108",3395:"d38196dd",3409:"60b5ad7d",3423:"4db7db66",3492:"46bbbe03",3519:"2625cfea",3524:"d44f3767",3527:"acf8cd09",3538:"9e36d344",3558:"433aa90a",3595:"3c826bed",3694:"a822dcf3",3699:"6f396573",3702:"b978af06",3718:"7ec25b83",3725:"c0baeb1e",3748:"d6b976a3",3757:"9757b387",3770:"7582dd3c",3781:"7f87e87b",3818:"a13257ab",3827:"18fdb00d",3850:"51422579",3885:"d7a62302",3896:"dfedcd03",3906:"4cdd501c",3918:"98db4d8c",4041:"952f1e46",4064:"6437f895",4079:"1a003912",4115:"961a9336",4133:"9f4058e3",4147:"823083a5",4231:"a64fa5a4",4259:"9741838f",4281:"34040e56",4295:"12e5ea61",4432:"c414631c",4471:"1ac328c3",4475:"58f6b0e5",4510:"8f349fa1",4519:"14dcfc34",4543:"7d4072c5",4573:"16ccf02d",4611:"f29d0989",4617:"11afb958",4637:"7fb73cbf",4670:"acac2252",4680:"847c8b5d",4681:"b6a6c5c0",4737:"7babb79b",4740:"58201b15",4773:"51327511",4790:"0b367e3e",4879:"e48081b8",4903:"c27d26ca",4928:"26a24042",4950:"5939705c",4954:"ae8f2baf",5190:"a5833d98",5199:"fdae2f12",5207:"b0e3c301",5214:"97123506",5235:"47ddb677",5300:"e038d956",5325:"1060181e",5488:"00ec6b73",5501:"869f0d82",5626:"5a39fa9d",5627:"e7352691",5763:"bee8b3f1",5796:"17af6057",5807:"5393d94a",5832:"5859cda1",5884:"c6af1957",5910:"9757b387",5911:"a0bfedde",5927:"0189eb6a",5949:"a0a50291",5963:"4eb8cca0",5972:"7babb79b",6042:"723b99ed",6062:"b26951ae",6071:"7e1e6330",6162:"573a3b28",6175:"0ed9105c",6185:"9757b387",6226:"a33c7e67",6237:"2d733870",6297:"d0752433",6320:"fa30416c",6327:"e9a13b69",6331:"f2c3506b",6424:"c89dfbd2",6464:"095eb3ab",6531:"22c9d3ff",6541:"fd43cbc9",6550:"c18b9fb1",6551:"be5e60e2",6612:"cb5ed275",6626:"787cfca9",6675:"8c87467f",6760:"b9ddd869",6786:"fd43cbc9",6811:"39278ebe",6854:"aa76fc6d",6865:"7dc9e843",6872:"57e72677",6944:"aca7de19",6945:"13876801",7043:"07241b8f",7131:"72346a31",7147:"e2cf1038",7187:"a5bc00ab",7210:"3148546c",7233:"d7c98247",7251:"7978d14c",7252:"aaae4d47",7319:"d857c8df",7353:"34be41e3",7433:"e3dd24a7",7460:"bde4c385",7504:"2f12d140",7546:"f88dda6e",7558:"5054b506",7585:"43cae171",7602:"acac2252",7616:"b5ad436b",7618:"2e0fe606",7633:"03ca7aea",7703:"dffb7245",7747:"6046f9ff",7873:"2cbf3b3b",7919:"0d937ea1",7944:"87f2bb47",7983:"47ddb677",8134:"9aa1a2c0",8144:"c0376a74",8217:"fd4d354d",8227:"2ecee03a",8229:"aabc9de8",8308:"aa89f89e",8310:"f2f2c8ad",8312:"35332030",8316:"0091d3db",8352:"61cf2009",8375:"4f7b721f",8376:"d6d51ba3",8562:"b1dc
1706a",8595:"97e01beb",8662:"5c2155a6",8665:"db5891f6",8670:"54b65931",8733:"33da4f80",8789:"9f27689c",8842:"d18a0b49",8854:"f1bb9ce8",8866:"9f8b9ea2",8895:"54e212f7",8942:"864cabc2",8947:"9f02af8b",8956:"508d52dd",8958:"7dc9e843",8972:"82e8e61d",8982:"bbc70814",8991:"71cd79e8",8999:"5a1ea852",9009:"3b5441a7",9015:"6fa4e844",9059:"d7dc5e33",9070:"64f601b0",9085:"bfa23735",9091:"bcff2eb7",9105:"cc888c63",9143:"29b9a345",9191:"8f51b649",9196:"8fa813f4",9211:"388b1cdb",9226:"ea527480",9233:"18671689",9275:"87696665",9313:"364d7782",9315:"c2a3b7e3",9324:"152d4cc1",9405:"0f3ed82a",9433:"9c120f5e",9448:"78b8a134",9454:"2c0295e5",9467:"009916ab",9511:"57265e53",9518:"f980223c",9531:"72624fc5",9557:"f27a2b03",9620:"f22eca88",9625:"1d275c5a",9636:"86ba7310",9643:"5a1c0aff",9811:"d388b5c0",9818:"9e7c1dc3",9825:"63940fc5",9826:"f45b0ac5",9960:"d0013719",9980:"e2a06905"}[e]+".css"}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="client:";i.l=function(s,a,n,o){if(e[s])e[s].push(a);else{var l,r;if(void 0!==n)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var u=d[c];if(u.getAttribute("src")==s||u.getAttribute("data-webpack")==t+n){l=u;break}}l||(r=!0,l=document.createElement("script"),l.charset="utf-8",i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",t+n),l.src=s),e[s]=[a];var m=function(t,i){l.onerror=l.onload=null,clearTimeout(p);var a=e[s];if(delete e[s],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach(function(e){return e(i)}),t)return t(i)},p=setTimeout(m.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=m.bind(null,l.onerror),l.onload=m.bind(null,l.onload),r&&document.head.appendChild(l)}}}(),function(){i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){i.p="/"}(),function(){if("undefined"!==typeof document){var e=function(e,t,s,a,n){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",i.nc&&(o.nonce=i.nc);var l=function(i){if(o.onerror=o.onload=null,"load"===i.type)a();else{var s=i&&i.type,l=i&&i.target&&i.target.href||t,r=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+l+")");r.name="ChunkLoadError",r.code="CSS_CHUNK_LOAD_FAILED",r.type=s,r.request=l,o.parentNode&&o.parentNode.removeChild(o),n(r)}};return o.onerror=o.onload=l,o.href=t,s?s.parentNode.insertBefore(o,s.nextSibling):document.head.appendChild(o),o},t=function(e,t){for(var i=document.getElementsByTagName("link"),s=0;s<i.length;s++){var a=i[s],n=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(n===e||n===t))return a}var o=document.getElementsByTagName("style");for(s=0;s<o.length;s++){a=o[s],n=a.getAttribute("data-href");if(n===e||n===t)return a}},s=function(s){return new Promise(function(a,n){var o=i.miniCssF(s),l=i.p+o;if(t(o,l))return a();e(s,l,null,a,n)})},a={8792:0};i.f.miniCss=function(e,t){var i={19:1,24:1,25:1,142:1,225:1,273:1,309:1,353:1,375:1,439:1,466:1,476:1,492:1,630:1,632:1,667:1,687:1,691:1,763:1,836:1,839:1,852:1,899:1,952:1,954:1,973:1,993:1,1009:1,1040:1,1102:1,1136:1,1137:1,1144:1,1203:1,1205:1,1217:1,1223:1,1348:1,1372:1,1401:1,1484:1,1539:1,1572:1,1580:1,1613:1,1635:1,1704:1,1731:1,1736:1,1738:1,1919:1,1993:1,2018:1,2058:1,2077:1,2106:1,2130:1,2293:1,2320:1,2346:1,2391:1,2466:1,2471:1,2526:1,2561:1,2575:1,2596:1,2616:1,2624:1,2635:1,2638:1,2664:1,2681:1,2687:1,2721:1,2734:1,2744:1,2748:1,2758:1,2776:1,2842:1,2889:1,2992:1,3009:1,3091:1,3106:1,3228:1,3241:1,3260:1,3395:1,3409:1,3423:1,3492:1,3519:1,3524:1,3527:1,3538:1,3558:1,3595:1,3694:1,3699:1,3702:1,3718:1,3725:1,3748:1,3757:1,3770:1,3781:1,3818:1,3827:1,3850:1,3885:1,3896:1,3906:1,3918:1,4041:1,4064:1,4079:1,4115:1,4133:1,4147:1,4231:1,4259:1,4281:1,4295:1,4432:1,4471:1,4475:1,4510:1,4519:1,4543:1,4573:1,4611:1,4617:1,4637:1,4670:1,4680:1,4681:1,4737:1,4740:1,4773:1,4790:1,4879:1,4903:1,4928:1,4950:1,4954:1,5190:1,5199:1,5207:1,5214:1,5235:1,5300:1,5325:1,5488:1,5501:1,5626:1,5627:1,5763:1,5796:1,5807:1,5832:1,5884:1,5910:1,5911:1,5927:1,5949:1,5963:1,5972:1,6042:1,6062:1,6071:1,6162:1,6175:1,6185:1,6226:1,6237:1,6297:1,6320:1,6327:1,6331:1,6424:1,6464:1,6531:1,6541:1,6550:1,6551:1,6612:1,6626:1,6675:1,6760:1,6786:1,6811:1,6854:1,6865:1,6872:1,6944:1,6945:1,7043:1,7131:1,7147:1,7187:1,7210:1,7233:1,7251:1,7252:1,7319:1,7353:1,7433:1,7460:1,7504:1,7546:1,7558:1,7585:1,7602:1,7616:1,7618:1,7633:1,7703:1,7747:1,7873:1,7919:1,7944:1,7983:1,8134:1,8144:1,8217:1,8227:1,8229:1,8308:1,8310:1,8312:1,8316:1,8352:1,8375:1,8376:1,8562:1,8595:1,8662:1,8665:1,8670:1,8733:1,8789:1,8842:1,8854:1,8866:1,8895:1,8942:1,8947:1,8956:1,8958:1,8972:1,8982:1,8991:1,8999:1,9009:1,9015:1,9059:1,9070:1,9085:1,9091:1,9105:1,9143:1,9191:1,9196:1,9211:1,9226:1,9233:1,9275:1,9313:1,9315:1,9324:1,9405:1,9433:1,9448:1,9454:1,9467:1,9511:1,9518:1,9531:1,9557:1,9620:1,9625:1,9636:1,9643:1,9811:1,9818:1,9825:1,9826:1,9960:1,9980:1};a[e]?t.push(a[e]):0!==a[e]&&i[e]&&t.push(a[e]=s(e).then(function(){a[e]=0},function(t){throw delete a[e],t}))}}}(),function(){var e={8792:0,2475:0};i.f.j=function(t,s){var a=i.o(e,t)?e[t]:void 0;if(0!==a)if(a)s.push(a[2]);else if(2475!=t){var n=new Promise(function(i,s){a=e[t]=[i,s]});s.push(a[2]=n);var o=i.p+i.u(t),l=new Error,r=function(s){if(i.o(e,t)&&(a=e[t],0!==a&&(e[t]=void 0),a)){var n=s&&("load"===s.type?"missing":s.type),o=s&&s.target&&s.target.src;l.message="Loading chunk "+t+" failed.\n("+n+": "+o+")",l.name="ChunkLoadError",l.type=n,l.request=o,a[1](l)}};i.l(o,r,"chunk-"+t,t)}else e[t]=0},i.O.j=function(t){return 0===e[t]};var t=function(t,s){var a,n,o=s[0],l=s[1],r=s[2],d=0;if(o.some(function(t){return 0!==e[t]})){for(a in l)i.o(l,a)&&(i.m[a]=l[a]);if(r)var c=r(i)}for(t&&t(s);d<o.length;d++)n=o[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},s=self["webpackChunkclient"]=self["webpackChunkclient"]||[];
1s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))}();var s=i.O(void 0,[8547,2475,8685,3842],function(){return i(39128)});s=i.O(s)})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.