@26lights/orcha 0.41.50 → 0.41.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/orcha.cjs.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * vue-color-kit v1.0.6
3
3
  * (c) 2023
4
4
  * @license MIT
5
- */function Qe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Ev(a):/rgb/.test(a)?t=Go(a):typeof a=="string"?t=Go(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:i}=t,{h:l,s:r,v:c}=Bv(t);return{r:o,g:n,b:s,a:i===void 0?1:i,h:l,s:r,v:c}}function mo(a){const t=document.createElement("canvas"),o=t.getContext("2d"),n=a*2;return t.width=n,t.height=n,o.fillStyle="#ffffff",o.fillRect(0,0,n,n),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function Ya(a,t,o,n,s,i){const l=a==="l",r=t.createLinearGradient(0,0,l?o:0,l?0:n);r.addColorStop(.01,s),r.addColorStop(.99,i),t.fillStyle=r,t.fillRect(0,0,o,n)}function $v({r:a,g:t,b:o},n){const s=l=>("0"+Number(l).toString(16)).slice(-2),i=`#${s(a)}${s(t)}${s(o)}`;return n?i.toUpperCase():i}function Ev(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Go(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Bv({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const n=Math.max(a,t,o),s=Math.min(a,t,o),i=n-s;let l=0;n===s?l=0:n===a?t>=o?l=60*(t-o)/i:l=60*(t-o)/i+360:n===t?l=60*(o-a)/i+120:n===o&&(l=60*(a-t)/i+240),l=Math.floor(l);let r=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:l,s:r,v:c}}var vo=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),Ya("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Ya("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),n=a.target.getContext("2d"),s=l=>{let r=l.clientX-o,c=l.clientY-t;r<0&&(r=0),c<0&&(c=0),r>this.size&&(r=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:r-5+"px",top:c-5+"px"};const u=n.getImageData(Math.min(r,this.size-1),Math.min(c,this.size-1),1,1),[d,m,p]=u.data;this.$emit("selectSaturation",{r:d,g:m,b:p})};s(a);const i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",i)}}});const Vv={ref:"canvasSaturation"};function Nv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectSaturation&&a.selectSaturation(...l),["prevent","stop"]))},[e.createVNode("canvas",Vv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}vo.render=Nv;vo.__file="src/color/Saturation.vue";var fo=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,n=a.getContext("2d");a.width=t,a.height=o;const s=n.createLinearGradient(0,0,0,o);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),n.fillStyle=s,n.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),n=i=>{let l=i.clientY-t;l<0&&(l=0),l>this.height&&(l=this.height),this.slideHueStyle={top:l-2+"px"};const r=o.getImageData(0,Math.min(l,this.height-1),1,1),[c,u,d]=r.data;this.$emit("selectHue",{r:c,g:u,b:d})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Sv={ref:"canvasHue"};function Mv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectHue&&a.selectHue(...l),["prevent","stop"]))},[e.createVNode("canvas",Sv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}fo.render=Mv;fo.__file="src/color/Hue.vue";var ho=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,n=this.alphaSize,s=mo(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),Ya("p",i,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height);let l=parseFloat((i/this.height).toFixed(2));this.$emit("selectAlpha",l)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const Av={ref:"canvasAlpha"};function Tv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectAlpha&&a.selectAlpha(...l),["prevent","stop"]))},[e.createVNode("canvas",Av,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}ho.render=Tv;ho.__file="src/color/Alpha.vue";var Co=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,n=this.alphaSize,s=mo(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),i.fillStyle=this.color,i.fillRect(0,0,t,o)}}});function Ov(a,t,o,n,s,i){return e.openBlock(),e.createBlock("canvas")}Co.render=Ov;Co.__file="src/color/Preview.vue";var go=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:n,left:s,width:i,height:l}=this.suckerCanvas.getBoundingClientRect(),r=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(r,i-1),Math.min(c,l-1),1,1);let[m,p,f,b]=d.data;b=parseFloat((b/255).toFixed(2));const y=this.suckerPreview.style;Object.assign(y,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${m}, ${p}, ${f}, ${b})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?y.display="":y.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:n}=t,{top:s,left:i,width:l,height:r}=a.getBoundingClientRect(),c=o-i,u=n-s,m=a.getContext("2d").getImageData(Math.min(c,l-1),Math.min(u,r-1),1,1);let[p,f,b,y]=m.data;y=parseFloat((y/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b,a:y})}))}}});const Iv=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Lv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Dv=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Pv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...l)=>a.openSucker&&a.openSucker(...l))},[Iv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Lv,[Dv])):e.createCommentVNode("v-if",!0)])}go.render=Pv;go.__file="src/color/Sucker.vue";var _o=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(i){t("inputColor",i)}}),handleFocus:i=>{t("inputFocus",i)},handleBlur:i=>{t("inputBlur",i)}}}});const Hv={class:"color-type"},Rv={class:"name"};function jv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",Hv,[e.createVNode("span",Rv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>a.modelColor=l),class:"value",onFocus:t[2]||(t[2]=(...l)=>a.handleFocus&&a.handleFocus(...l)),onBlur:t[3]||(t[3]=(...l)=>a.handleBlur&&a.handleBlur(...l))},null,544),[[e.vModelText,a.modelColor]])])}_o.render=jv;_o.__file="src/color/Box.vue";var yo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),n=e.ref([]),s=e.ref();a.colorsHistoryKey&&localStorage&&(n.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),s.value=mo(4).toDataURL(),e.onUnmounted(()=>{i(o.value)});function i(r){if(!r)return;const c=n.value||[],u=c.indexOf(r);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(r),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function l(r){t("selectColor",r)}return{setColorsHistory:i,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:l}}});const Fv={class:"colors"},Uv={key:0,class:"colors history"};function zv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Fv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:r=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Uv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:r=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}yo.render=zv;yo.__file="src/color/Colors.vue";var nt=e.defineComponent({components:{Saturation:vo,Hue:fo,Alpha:ho,Preview:Co,Sucker:go,Box:_o,Colors:yo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return $v(this.rgba,!0)}},created(){Object.assign(this,Qe(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:n,h:s,s:i,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:l}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:n,h:s,s:i,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Zv={class:"color-set"};function xv(a,t,o,n,s,i){const l=e.resolveComponent("Saturation"),r=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),m=e.resolveComponent("Box"),p=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Zv,[e.createVNode(l,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(r,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(u,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(m,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}nt.render=xv;nt.__file="src/color/ColorPicker.vue";nt.install=a=>{a.component(nt.name,nt)};const Wv={class:"ao-maping-card-project-phase__header"},qv={class:"ao-card-project-item__title-line"},Yv={key:0,class:"ao-card-project-item-phase__estimation"},Kv={class:"ao-maping-card-project-phase__footer"},Gv={key:0,class:"ao-maping-card-project-phase__footer-row ao-maping-card-project-phase__footer-row--progress"},Xv={class:"ao-maping-card-project-phase__subitem"},Qv={class:"ao-maping-card-project-phase__subitem"},Jv={key:0,class:"ao-maping-card-project-phase__secondary"},ef={class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--readonly"},tf=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,n=v=>{t("update:title",v)},s=e.computed(()=>{var v;return(v=o.milestones)==null?void 0:v.reduce((h,g)=>{var N;return h+((N=g.activities)==null?void 0:N.reduce((B,V)=>B+(V.estimation||0),0))},0)}),i=e.computed(()=>{var v;return(v=o.milestones)==null?void 0:v.length}),l=e.computed(()=>{var v;return(v=o.milestones)==null?void 0:v.filter(h=>h.status===Ot.done).length}),r=e.computed(()=>(l.value||0)/(i.value||1)),c=e.computed({get:()=>o.deadline??"",set:v=>t("update:deadline",v!=null&&v.length?v:null)}),u=e.ref(!1),d=e.ref(o.color?o.color:"#f9f9f9"),m=e.ref(null),p=e.ref(o.color??"#f9f9f9");e.watch(()=>o.color,v=>{v&&v!==p.value&&(p.value=v)});const f=v=>{p.value=v},b=v=>{const h=v.target;h.closest("button")||h.closest("input")||h.closest(".ao-title")||y()},y=async()=>{console.log("Open color picker"),u.value=!0,d.value=p.value,await e.nextTick(),setTimeout(()=>{window.addEventListener("click",C)},0)},C=v=>{const h=v.target;u.value&&m.value&&!m.value.contains(h)&&(console.log("Close color picker"),u.value=!1,window.removeEventListener("click",C),console.log("COLORS:"),console.log(d.value),console.log(p.value),d.value!==p.value&&(console.log("emit update color"),t("updatePhase",{id:o.id,color:p.value})))};return(v,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Va,{class:"ao-maping-card-project-phase","is-clickable":v.isEditable,onClick:b,style:e.normalizeStyle({backgroundColor:p.value})},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",qv,[e.createVNode(ne,{id:v.id,class:"ao-maping-card-project-phase__title",title:v.name||"",level:4,"is-editable":v.isEditable,"onUpdate:title":n},null,8,["id","title","is-editable"]),s.value?(e.openBlock(),e.createElementBlock("span",Yv," ("+e.toDisplayString(s.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Kv,[i.value?(e.openBlock(),e.createElementBlock("div",Gv,[e.createElementVNode("div",Xv,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",Qv,e.toDisplayString(l.value)+" / "+e.toDisplayString(i.value),1)]),e.createVNode(Na,{percentages:r.value,class:"ao-maping-card-project-phase__progress"},null,8,["percentages"]),v.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Jv,[e.renderSlot(v.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-maping-card-project-phase__footer-row",c.value?"":"ao-maping-card-project-phase__no_deadline"])},[v.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=g=>c.value=g),class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",ef,e.toDisplayString(e.unref(_a)(v.deadline)),1)],2)])]),_:2},[v.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Wv,[e.createVNode(K,{class:"ao-maping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.active?v.$t("archive"):v.$t("unarchive"),onClick:h[0]||(h[0]=e.withModifiers(()=>v.active?v.$emit("archivePhase",{id:v.id}):v.$emit("unarchivePhase",{id:v.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","style"]),u.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:m},[e.createVNode(e.unref(nt),{onClick:h[2]||(h[2]=e.withModifiers(()=>{},["stop"])),class:"color-picker",theme:"light",color:v.color,"onUpdate:color":f},null,8,["color"])],512)):e.createCommentVNode("",!0)],64))}});const af={key:0,class:"ao-project-phase__drag ao-card__drag"},of={key:1,class:"ao-project-phase__col-phase"},nf={key:2,class:"ao-mapping-project-phase__col-phase"},sf={key:3,class:"ao-project-phase__col-milestones"},lf={class:"ao-project-phase__milestones"},rf={class:"ao-project-phase__milestones-list-footer"},cf=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.phase.milestones,(v,h)=>{Me(v,h)});const s=v=>{t("updatePhase",{id:o.phase.id,name:v})},i=v=>{t("updatePhase",{id:o.phase.id,deadline:v})},l=v=>{t("updatePhase",v)},r=e.computed(()=>o.phase.milestones.map(v=>X0(v,o.closedStatus))),c=v=>{const{name:h,rank:g}=ot(r.value??[],"milestone",n);t("addMilestone",{name:h,rank:g,phaseId:v})},u=v=>{t("updateMilestone",v)},d=v=>{t("archiveMilestone",v)},m=v=>{t("unarchiveMilestone",v)},p=v=>{t("archivePhase",v)},f=v=>{t("unarchivePhase",v)},b=v=>{"added"in v?t("updateMilestone",{id:v.added.element.id,phaseId:o.phase.id,rank:pt(r.value,v.added.newIndex)}):"removed"in v||"moved"in v&&t("updateMilestone",{id:v.moved.element.id,rank:pt(r.value,v.moved.newIndex)})},y=Rt.useRoute(),C=e.computed(()=>y.path.includes("/mapping"));return(v,h)=>{var g;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ao-project-phase",{"ao-project-phase--selected":v.phase.id===((g=v.$route.params)==null?void 0:g.phaseId)}])},[v.isEditable?(e.openBlock(),e.createElementBlock("div",af,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",nf,[e.createVNode(tf,{id:v.phase.id,milestones:r.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,"onUpdate:deadline":i,"onUpdate:title":s,onArchivePhase:p,onUnarchivePhase:f,onUpdatePhase:l},null,8,["id","milestones","name","deadline","active","is-editable"])])):(e.openBlock(),e.createElementBlock("div",of,[e.createVNode(iv,{id:v.phase.id,milestones:r.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,"onUpdate:deadline":i,"onUpdate:title":s,onArchivePhase:p,onUnarchivePhase:f},null,8,["id","milestones","name","deadline","active","is-editable"])])),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",sf,[e.createElementVNode("div",lf,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-phase__milestones-list",list:r.value,disabled:v.readonly||!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:b}),{item:e.withCtx(({element:N})=>{var B;return[e.createVNode(wv,{id:N.id,name:N.name,color:N.color,activities:N.activities,deadline:N.deadline,active:N.active,"is-editable":!v.readonly&&v.isEditable,"is-draggable":!v.readonly&&v.isEditable,"closed-status":v.closedStatus,"is-selected":N.id===((B=v.$route.params)==null?void 0:B.milestoneId),assignee:N.assignee,important:N.important,readonly:v.readonly,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:V=>!v.readonly&&v.$router.push({name:e.unref(oe).milestone,params:{phaseId:v.phase.id,milestoneId:N.id}}),onUpdateMilestone:u,onArchiveMilestone:d,onUnarchiveMilestone:m},null,8,["id","name","color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",rf,[v.isEditable?(e.openBlock(),e.createBlock(We,{key:0,label:v.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:h[0]||(h[0]=()=>c(v.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])])]))],2)}}});const df={class:"ao-project__phases"},uf={key:0,class:"ao-project-phase__phases-list-footer"},pf=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),mf={class:"ao-project-phase__col-phase"},vf=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),bo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(p,f)=>{Me(p,f)});const n=p=>{t("addMilestone",p)},s=p=>{t("updateMilestone",p)},i=p=>{t("archiveMilestone",p)},l=p=>{t("unarchiveMilestone",p)},r=p=>{t("archivePhase",p)},c=p=>{t("unarchivePhase",p)},u=p=>{if(p.moved){const f=zt(p,o.phases??[]);t("updatePhase",{id:p.moved.element.id,rank:f})}},d=p=>{t("updatePhase",p)},m=p=>{t("addPhase",p)};return(p,f)=>(e.openBlock(),e.createElementBlock("div",df,[e.createVNode(e.unref(xe),{class:"ao-project-phase__phases-list","model-value":p.phases,"item-key":"id",handle:".ao-card__drag",onChange:u},{item:e.withCtx(({element:b})=>[e.createVNode(cf,{phase:b,"is-editable":!p.readonly&&p.isEditable,"closed-status":p.closedStatus,users:p.users,readonly:p.readonly,onAddMilestone:n,onUpdateMilestone:s,onArchiveMilestone:i,onUnarchiveMilestone:l,onUpdatePhase:d,onArchivePhase:r,onUnarchivePhase:c},null,8,["phase","is-editable","closed-status","users","readonly"])]),_:1},8,["model-value"]),p.isEditable?(e.openBlock(),e.createElementBlock("div",uf,[pf,e.createElementVNode("div",mf,[e.createVNode(We,{label:p.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:m},null,8,["label"])]),vf])):e.createCommentVNode("",!0)]))}});const ff=["onSubmit"],hf={class:"ao-add-template-modal__form-body"},Cf={class:"field__row"},gf={class:"ao-add-template-modal__form-footer"},Rn=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.templates.map(r=>({value:r.id,label:r.name}))),s=e.ref(null),i=r=>{s.value=r},l=()=>{s.value&&t("apply",s.value,o.projectId)};return(r,c)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:r.$t("project.template.apply.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-add-template-modal__form",onSubmit:e.withModifiers(l,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(r.$t("project.template.apply.notice")),1),e.createElementVNode("div",hf,[e.createElementVNode("div",Cf,[e.createVNode(ie,{value:s.value,options:n.value,detached:!0,onChange:i},null,8,["value","options"])])]),e.createElementVNode("footer",gf,[e.createVNode(K,{label:r.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:l},null,8,["label"])])],40,ff)]),_:1}))}});const _f=["onSubmit"],yf={class:"ao-save-template-modal__form-body"},bf={class:"field__row"},kf={class:"ao-field ao-field--inline"},wf={class:"ao-field__label"},$f={class:"ao-save-template-modal__phases"},Ef={class:"ao-field__label"},Bf={class:"ao-save-template-modal__phases-list"},Vf=["value"],Nf={class:"ao-save-template-modal__form-footer"},jn=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,n=e.ref(""),s=e.ref([]);e.onMounted(()=>{s.value=o.phases.map(l=>l.id)});const i=()=>{n.value&&t("save",n.value,s.value)};return(l,r)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$t("project.template.save.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-save-template-modal__form",onSubmit:e.withModifiers(i,["prevent"])},[e.createElementVNode("div",yf,[e.createElementVNode("div",bf,[e.createElementVNode("label",kf,[e.createElementVNode("span",wf,e.toDisplayString(l.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=c=>n.value=c),type:"text"},null,512),[[e.vModelText,n.value]])])]),e.createElementVNode("div",$f,[e.createElementVNode("div",Ef,e.toDisplayString(l.$t("project.template.phases.label")),1),e.createElementVNode("div",Bf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,c=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:c.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:c.id,"onUpdate:modelValue":r[1]||(r[1]=u=>s.value=u)},null,8,Vf),[[e.vModelCheckbox,s.value]]),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]))),128))])])]),e.createElementVNode("footer",Nf,[e.createVNode(K,{label:l.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:i},null,8,["label"])])],40,_f)]),_:1}))}});const Sf=e.defineComponent({props:{modelValue:{type:[String,Number],required:!0},tabs:{type:Array,required:!0}},emits:["update:modelValue"],methods:{selectTab(a){this.$emit("update:modelValue",a)}}});const Mf={class:"tabbar-wrapper"},Af=["onClick"];function Tf(a,t,o,n,s,i){return e.openBlock(),e.createElementBlock("div",Mf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,l=>(e.openBlock(),e.createElementBlock("button",{key:l.value,class:e.normalizeClass(["tab-button",{"tab-button--active":l.value===a.modelValue}]),type:"button",onClick:r=>a.selectTab(l.value)},e.toDisplayString(l.label),11,Af))),128))])}const ko=I(Sf,[["render",Tf],["__scopeId","data-v-ff4e3297"]]),Of={class:"ao-project"},If={class:"ao-project__body"},Lf=e.defineComponent({__name:"AoProjectOverviewProject",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addActivity","update:activity","archiveActivity","copyPhaseToTemplate","unarchiveActivity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=e.computed(()=>o.phases.flatMap($=>$.milestones)),i=()=>{const{name:$,rank:k}=ot(o.phases,"phase",n);t("addPhase",{name:$,rank:k,projectId:o.project.id})},l=$=>{t("updatePhase",$)},r=$=>{t("archivePhase",$)},c=$=>{t("unarchivePhase",$)},u=$=>{t("copyPhaseToTemplate",$)},d=$=>{t("addMilestone",$)},m=$=>{t("updateMilestone",$)},p=$=>{t("archiveMilestone",$)},f=$=>{t("unarchiveMilestone",$)},b=$=>{t("addActivity",$)},y=$=>{t("update:activity",$)},C=$=>{t("archiveActivity",$)},v=$=>{t("unarchiveActivity",$)},h=$=>{t("addSubtask",$)},g=$=>{t("updateSubtask",$)},N=$=>{t("deleteSubtask",$)},B=e.computed(()=>s.value.flatMap($=>$.activities)),V=$=>{t("addFiles",$)},L=$=>{t("removeFile",$)},P=$=>{t("addComment",$)},R=$=>{t("updateComment",$)},F=$=>{t("removeComment",$)},z=e.ref(!1),T=e.ref(!1),j=($,k)=>{t("applyTemplate",{templateId:$,projectId:k}),z.value=!1},Y=($,k)=>{var M;const O=(M=o.templates)==null?void 0:M.at(-1),_=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:$,rank:_.format(),phaseIds:k}),T.value=!1},Z=Rt.useRouter(),U=e.ref("overview"),E=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(U,$=>{$==="feed"?(Z.push({name:oe.feed}),console.log("Navigating to feed...")):$==="overview"?(Z.push({name:oe.project}),console.log("Navigating to feed...")):$==="mapping"&&(Z.push({name:oe.mapping}),console.log("Navigating to feed..."))}),($,k)=>{const O=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",Of,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:E,modelValue:U.value,"onUpdate:modelValue":k[0]||(k[0]=_=>U.value=_)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":$.showsArchived,onClick:k[1]||(k[1]=_=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:k[2]||(k[2]=_=>T.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:k[3]||(k[3]=_=>z.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",If,[e.createVNode(bo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,onAddMilestone:d,onUpdateMilestone:m,onArchiveMilestone:p,onUnarchiveMilestone:f,onAddPhase:i,onUpdatePhase:l,onArchivePhase:r,onUnarchivePhase:c,onCopyPhaseToTemplate:u},null,8,["phases","closed-status","is-editable","users"])])]),e.createVNode(O,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,onClose:k[4]||(k[4]=_=>$.$router.push({name:e.unref(oe).project})),onUpdateMilestone:m,onAddActivity:b,onUpdateActivity:y,onArchiveActivity:C,onUnarchiveActivity:v},null,8,["phases","project-id","project-name","users","is-editable","closed-status"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(O,{name:"modal",activities:B.value,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,"activity-types":$.activityTypes,phases:$.phases,project:$.project,users:$.users,"user-id":$.userId,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,"onUpdate:activity":y,onAddSubtask:h,onUpdateSubtask:g,onDeleteSubtask:N,onAddFiles:V,onRemoveFile:L,onAddComment:P,onUpdateComment:R,onRemoveComment:F},{default:e.withCtx(({Component:_})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_),null,{default:e.withCtx(M=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.value?(e.openBlock(),e.createBlock(jn,{key:0,phases:$.phases,onClose:k[5]||(k[5]=_=>T.value=!1),onSave:Y},null,8,["phases"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(Rn,{key:1,"project-id":$.project.id,templates:$.templates,onClose:k[6]||(k[6]=_=>z.value=!1),onApply:j},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}});const Df={class:"ao-card-feed__header"},Pf={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},Hf={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},Rf={class:"ao-card-feed__body"},jf={key:0,class:"ao-card-feed__breadcrumbs"},Ff={class:e.normalizeClass(["ao-card-feed__title-group"])},Uf={class:"ao-card-feed__title-line"},zf={key:0,class:"ao-card-feed__slug"},Zf={key:1,class:"ao-card-feed__deadline"},xf={class:"ao-card-feed__footer"},Wf={class:"ao-card-feed__footer-row"},qf={class:"ao-assignees"},Yf={key:0,class:"ao-assignee"},Kf={key:0,class:"ao-card-feed__subitems"},Gf={key:0,class:"ao-card-feed__subitem"},Xf={class:"ao-card-feed__subitem"},Qf={key:1,class:"ao-card-feed__subitem"},Jf={class:"ao-card-feed__subitem"},eh={class:"ao-card-feed__footer-row"},th={key:0,class:"ao-card-feed__progress-wrapper"},ah={class:"ao-card-feed__subitem"},oh={class:"ao-card-feed__subitem"},wo=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},projectColor:{},phaseName:{},milestoneName:{},milestoneColor:{},deadline:{},important:{type:Boolean},assignee:{},slug:{},comments:{},attachments:{},tasks:{},isEditable:{type:Boolean},isPrivate:{type:Boolean},isClosed:{type:Boolean},tagType:{}},emits:["removeAssignee","updateActivity"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),s=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),i=f=>{t("updateActivity",{id:o.id,name:f})},l=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),r=e.computed(()=>o.assignee?[o.assignee]:[]),c=e.computed(()=>_a(o.deadline)),u=f=>{t("removeAssignee",f)},d=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.length}),m=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.filter(b=>b.isDone).length}),p=e.computed(()=>(m.value||0)/(d.value||1));return(f,b)=>(e.openBlock(),e.createBlock(Va,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":f.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",Df,[n.value?(e.openBlock(),e.createBlock(Tt,{key:0,label:n.value,class:"ao-card-feed__project",variant:"solid",color:f.projectColor?void 0:"primary","raw-color":s.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),f.isPrivate||f.important||f.isClosed?(e.openBlock(),e.createElementBlock("div",Pf,[f.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),f.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),f.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Hf,[e.renderSlot(f.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Rf,[l.value?(e.openBlock(),e.createElementBlock("span",jf,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ff,[e.createElementVNode("div",Uf,[f.slug?(e.openBlock(),e.createElementBlock("span",zf,e.toDisplayString(f.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:f.id,title:f.name,level:5,"is-editable":f.isEditable,"onUpdate:title":i,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),f.deadline?(e.openBlock(),e.createElementBlock("span",Zf,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",xf,[e.createElementVNode("div",Wf,[e.createElementVNode("ul",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y.id},[y?(e.openBlock(),e.createElementBlock("li",Yf,[e.createVNode(ke,{"user-name":e.unref(yn)(y),"avatar-url":y.avatarUrl,"is-closable":!0,onClose:()=>u(y.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),f.comments||f.attachments?(e.openBlock(),e.createElementBlock("ul",Kf,[f.comments?(e.openBlock(),e.createElementBlock("li",Gf,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",Xf,e.toDisplayString(f.comments),1)])):e.createCommentVNode("",!0),f.attachments?(e.openBlock(),e.createElementBlock("li",Qf,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",Jf,e.toDisplayString(f.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",eh,[f.tasks&&f.tasks.length?(e.openBlock(),e.createElementBlock("div",th,[e.createElementVNode("div",ah,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",oh,e.toDisplayString(m.value)+" / "+e.toDisplayString(d.value),1)]),e.createVNode(Na,{percentages:p.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}});const nh={props:{color:{type:String,required:!0}},components:{ColorPicker:nt},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:n,a:s}=a.rgba,i=`rgba(${t}, ${o}, ${n}, ${s})`;this.$emit("update:color",i)}}},sh={class:"color-picker-wrapper"};function lh(a,t,o,n,s,i){const l=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",sh,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...r)=>i.togglePicker&&i.togglePicker(...r))},null,4),s.showPicker?(e.openBlock(),e.createBlock(l,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:i.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const ih=I(nh,[["render",lh]]),rh={class:"ao-project-milestone"},ch={class:"ao-project-milestone__header"},dh={class:"ao-project-milestone__header_line"},uh={class:"ao-project-milestone__header_line"},ph={class:"ao-project-milestone__title"},mh={key:0,class:"ao-fieldset ao-milestone__fieldset"},vh={class:"ao-field__row ao-milestone__field-row"},fh={class:"ao-field ao-field--inline"},hh={class:"ao-field__row ao-milestone__field-row"},Ch={class:"ao-field ao-milestone__field-multiselect"},gh={class:"ao-project-milestone__body"},_h={key:0,class:"ao-project-milestone__footer"},Xo=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.find(g=>g.id===o.phaseId)}),i=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.flatMap(g=>g.milestones)}),l=e.computed(()=>{var h;return(h=i.value)==null?void 0:h.find(g=>g.id===o.milestoneId)}),r=e.computed(()=>{var h;return(h=l.value)==null?void 0:h.activities});e.watch(r,(h,g)=>{Me(h,g)});const c=h=>{t("close",h)},u=()=>{const{name:h,rank:g}=ot(r.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:h,rank:g,projectId:o.projectId})},d=h=>{t("updateActivity",h)},m=h=>{r.value&&"moved"in h&&t("updateActivity",{id:h.moved.element.id,rank:pt(r.value,h.moved.newIndex)})},p=e.computed({get:()=>{var h;return(h=l.value)==null?void 0:h.color},set:h=>{l.value&&t("updateMilestone",{id:l.value.id,color:h})}}),f=e.computed({get:()=>{var h;return((h=l==null?void 0:l.value)==null?void 0:h.deadline)??""},set:h=>{l.value&&t("updateMilestone",{id:l.value.id,deadline:h!=null&&h.length?h:null})}}),b=h=>o.closedStatus?Qa(h,o.closedStatus):!1,y=e.computed(()=>{var h;return((h=o.users)==null?void 0:h.map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id,avatar:g.avatarUrl})))||[]}),C=e.computed({get(){var h,g;return(g=(h=l.value)==null?void 0:h.assignee)!=null&&g.id?[l.value.assignee.id]:[]},set(h){t("updateMilestone",{id:o.milestoneId,assigneeId:h[0]??null})}}),v=e.computed({get(){var h;return((h=l.value)==null?void 0:h.important)??!1},set(h){t("updateMilestone",{id:o.milestoneId,important:h})}});return(h,g)=>{var N;return e.openBlock(),e.createElementBlock("div",rh,[e.createElementVNode("header",ch,[e.createElementVNode("div",dh,[e.createVNode(K,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",uh,[e.createElementVNode("div",ph,[e.createVNode(ne,{title:((N=l.value)==null?void 0:N.name)||h.milestoneId,level:5},null,8,["title"]),e.createVNode(qa,{modelValue:v.value,"onUpdate:modelValue":g[0]||(g[0]=B=>v.value=B),modelModifiers:{lazy:!0},disabled:!h.isEditable,class:"ao-milestone__important",color:"danger",label:h.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),l.value?(e.openBlock(),e.createElementBlock("div",mh,[e.createElementVNode("div",vh,[e.createElementVNode("label",fh,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[1]||(g[1]=B=>f.value=B),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",hh,[e.createElementVNode("label",Ch,[e.createVNode(ie,{modelValue:C.value,"onUpdate:modelValue":g[2]||(g[2]=B=>C.value=B),options:y.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:h.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!h.isEditable,caret:h.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(ke,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:L=>V(B,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(ih,{color:p.value,"onUpdate:color":g[3]||(g[3]=B=>p.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",gh,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:r.value,disabled:!h.isEditable,"item-key":"id",group:"kanban"},h.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var V,L,P,R,F;return[e.createVNode(wo,{id:B.id,name:B.name||B.id,"phase-name":(V=s.value)==null?void 0:V.name,"milestone-name":(L=l.value)==null?void 0:L.name,"milestone-color":(P=l.value)==null?void 0:P.color,deadline:B.deadline,important:B.important,users:h.users,assignee:B.assignee,slug:B.slug,comments:(R=B.comments)==null?void 0:R.length,attachments:(F=B.attachments)==null?void 0:F.length,tasks:B.tasks,"is-editable":h.isEditable,"is-private":B.private,"is-closed":b(B),onClick:z=>h.$router.push({name:e.unref(oe).activity,params:{milestoneId:h.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[h.isEditable?{name:"secondary",fn:e.withCtx(()=>[h.isEditable&&B.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:h.$t("archive"),onClick:e.withModifiers(()=>h.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),h.isEditable&&!B.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:h.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>h.$emit("unarchiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),h.isEditable?(e.openBlock(),e.createElementBlock("div",_h,[e.createVNode(We,{"icon-name":"Add",label:h.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const yh=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,n=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.find(v=>v.id===o.phaseId)}),s=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(v=>v.milestones)}),i=e.computed(()=>{var C;return(C=s.value)==null?void 0:C.find(v=>v.id===o.milestoneId)}),l=e.computed(()=>{var C;return(C=o.activities)==null?void 0:C.find(v=>v.id===o.activityId)}),r=C=>{t("update:activity",C)},c=C=>{t("addSubtask",C)},u=C=>{t("updateSubtask",C)},d=C=>{t("deleteSubtask",C)},m=C=>{t("addFiles",C)},p=C=>{t("removeFile",C)},f=C=>{t("addComment",C)},b=C=>{t("updateComment",C)},y=C=>{t("removeComment",C)};return(C,v)=>{var h,g;return l.value?(e.openBlock(),e.createBlock(po,{key:0,activity:l.value,"activity-types":C.activityTypes,"milestone-id":C.milestoneId,"template-activities":C.activities,"is-template":!1,users:C.users,"user-id":C.userId,"is-task-checkable":C.isTaskCheckable,statuses:C.statuses,breadcrumbs:`${(h=n.value)==null?void 0:h.name} / ${(g=i.value)==null?void 0:g.name}`,"is-editable":C.isEditable,"attachment-enabled":C.attachmentEnabled,projects:[C.project],onClose:C.$router.back,"onUpdate:activity":r,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:b,onRemoveComment:y},{default:e.withCtx(N=>[e.renderSlot(C.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),bh={class:"ao-col-header"},kh=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",bh,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Tt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function wh(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function ma(a){return typeof a=="function"?a():e.unref(a)}const $h=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Eh=a=>a!=null,At=()=>{};function Bh(a,t){function o(...n){return new Promise((s,i)=>{Promise.resolve(a(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return o}function Vh(a,t={}){let o,n,s=At;const i=r=>{clearTimeout(r),s(),s=At};return r=>{const c=ma(a),u=ma(t.maxWait);return o&&i(o),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(r())):new Promise((d,m)=>{s=t.rejectOnCancel?m:d,u&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,d(r())},u)),o=setTimeout(()=>{n&&i(n),n=null,d(r())},c)})}}function Nh(a,t=200,o={}){return Bh(Vh(t,o),a)}function Ua(a){var t;const o=ma(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Sh=$h?window:void 0;function Mh(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function Ah(a){const t=Mh();return e.computed(()=>(t.value,!!a()))}function Th(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:i=.1,window:l=Sh,immediate:r=!0}=o,c=Ah(()=>l&&"IntersectionObserver"in l),u=e.computed(()=>{const b=ma(a);return(Array.isArray(b)?b:[b]).map(Ua).filter(Eh)});let d=At;const m=e.ref(r),p=c.value?e.watch(()=>[u.value,Ua(n),m.value],([b,y])=>{if(d(),!m.value||!b.length)return;const C=new IntersectionObserver(t,{root:Ua(y),rootMargin:s,threshold:i});b.forEach(v=>v&&C.observe(v)),d=()=>{C.disconnect(),d=At}},{immediate:r,flush:"post"}):At,f=()=>{d(),p(),m.value=!1};return wh(f),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:f}}const Oh={class:e.normalizeClass(["ao-list-kanban"])},Ih={class:"ao-list-kanban__header"},Lh={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},Dh={key:1,class:"ao-list-kanban__end"},Ph={key:0,class:"ao-list-kanban__no-more"},Hh={key:1,class:"ao-list-kanban__divider"},Rh={key:1,class:"ao-list-kanban__footer"},jh=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,n=e.ref(!1),s=e.ref(null);Th(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const i=d=>{var m;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((m=d.assignee)==null?void 0:m.id):!1},l=d=>{t("selectActivity",d)},r=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:pt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:pt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",Oh,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var p;return[e.createElementVNode("div",Ih,[d.title?(e.openBlock(),e.createBlock(kh,{key:0,title:d.title,level:3,items:(p=d.list)==null?void 0:p.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(xe),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:m[0]||(m[0]=p=>u.value=!0),onEnd:m[1]||(m[1]=p=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:p})=>{var f,b,y,C,v,h,g,N,B;return[e.createVNode(wo,{class:e.normalizeClass(i(p)?"ao-list-draggable":""),id:p.id,name:p.name,"project-name":(f=p.project)==null?void 0:f.name,"project-color":(b=p.project)==null?void 0:b.color,"phase-name":(C=(y=p.milestone)==null?void 0:y.phase)==null?void 0:C.name,"milestone-name":(v=p.milestone)==null?void 0:v.name,"milestone-color":(h=p.milestone)==null?void 0:h.color,deadline:p.deadline,rules:((g=p.rules)==null?void 0:g.length)||0,tasks:p.tasks,description:p.description,important:p.important,type:p.type,comments:(N=p.comments)==null?void 0:N.length,attachments:(B=p.attachments)==null?void 0:B.length,users:d.users,assignee:p.assignee,slug:p.slug,"is-editable":i(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[V=>i(p)&&r(V),()=>i(p)&&r],onClick:()=>l(p.id),onRemoveAssignee:()=>i(p)&&r({id:p.id,assigneeId:null})},{secondary:e.withCtx(()=>[i(p)&&p.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),i(p)&&!p.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",Lh,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:s,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",Dh,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",Ph,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",Hh)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",Rh,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:m[2]||(m[2]=p=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const Fh={class:"ao-field ao-search-field"},Uh=["value","placeholder","onKeypress"],zh=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,n=async l=>{const c=l.target.value;t("update:modelValue",c,l)},s=Nh(n,o.delay),i=l=>{t("clear",l)};return(l,r)=>(e.openBlock(),e.createElementBlock("div",Fh,[e.createElementVNode("input",{value:l.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:l.placeholder,onInput:r[0]||(r[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,Uh),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${l.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(K,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${l.modelValue?"ao-search-field__action--visible":""}`),onClick:i},null,8,["class"])]))}});const Zh={class:"ao-feed"},xh={class:"ao-feed__filters"},Wh={class:"ao-feed__body"},Fn=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},showsOnlyNonAssigned:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","update:showsOnlyNonAssigned","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","toast"],setup(a,{emit:t}){const o=a,{t:n}=Ye();function s(k,O){t("toast",k,O)}const i=e.toRef(o,"activities"),l=async(k,O)=>{await t("selectActivity",k,O)},r=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([k,O,_,M],[q,x])=>{r.value=Object.fromEntries(k.map(D=>[D.id,O.filter(S=>{var H;return((H=S.status)==null?void 0:H.id)===D.id})])),_&&!c.value?(l(_,null),c.value=!0):M&&!c.value&&(l(null,M),c.value=!0),u.value&&Me(O,x)},{immediate:!0});const m=e.computed(()=>{var k;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((k=o.selectedActivity.milestone.phase)==null?void 0:k.name)??""} / ${o.selectedActivity.milestone.name??""}`}),p=k=>{var x,D;const O=(x=o.activities)==null?void 0:x.at(-1),_=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle(),M=((D=o.activities)==null?void 0:D.length)??0,q={name:n("activity.defaultName",{idx:M+1}),rank:_.format(),statusId:k.id};o.filters.assigneeId.length>0&&(q.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(q.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(q.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",q)},f=(k,O)=>{u.value=!1,t("update:filters",{...o.filters,[k]:O})},b=e.computed(()=>o.project?[o.project]:o.projects??[]),y=e.computed(()=>b.value.map(k=>({value:k.id,label:k.name}))),C=e.computed(()=>{var k;return(k=o.activityTypes)==null?void 0:k.map(O=>({value:O.id,label:O.name}))}),v=e.computed(()=>o.users.map(k=>({value:k.id,label:`${k.firstName} ${k.lastName}`,avatar:k.avatarUrl}))),h=k=>{o.selectedActivity&&t("update:activity",k)},g=k=>{t("update:activity",k)},N=k=>{t("archiveActivity",k)},B=k=>{t("unarchiveActivity",k)},V=k=>{u.value=!1,t("update:searchText",k)},L=k=>{u.value=!1,t("clear:searchText",k)},P=k=>{o.selectedActivity&&t("addSubtask",k)},R=k=>{o.selectedActivity&&t("updateSubtask",k)},F=k=>{o.selectedActivity&&t("deleteSubtask",k)},z=k=>{t("addFiles",k)},T=k=>{t("removeFile",k)},j=k=>{o.selectedActivity&&t("addComment",{...k,activityId:o.selectedActivity.id})},Y=k=>{const{id:O}=o.selectedActivity||{};O&&t("updateComment",k)},Z=k=>{const{id:O}=o.selectedActivity||{};O&&t("removeComment",k)},U=Rt.useRouter(),E=e.ref("feed"),$=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(E,k=>{k==="feed"?(U.push({name:oe.feed}),console.log("Navigating to feed...")):k==="overview"?(U.push({name:oe.project}),console.log("Navigating to feed...")):k==="mapping"&&(U.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(k,O)=>{var _;return e.openBlock(),e.createElementBlock("div",Zh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createElementVNode("div",xh,[e.createVNode(ko,{tabs:$,modelValue:E.value,"onUpdate:modelValue":O[0]||(O[0]=M=>E.value=M)},null,8,["modelValue"]),e.createVNode(zh,{"model-value":k.searchText,placeholder:k.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":V,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:0,"model-value":k.filters[e.unref(Je).project],mode:"tags",options:y.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:k.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":O[1]||(O[1]=M=>f(e.unref(Je).project,M))},null,8,["model-value","options","placeholder"])),C.value?(e.openBlock(),e.createBlock(ie,{key:1,"model-value":k.filters[e.unref(Je).type],mode:"tags",options:C.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:k.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":O[2]||(O[2]=M=>f(e.unref(Je).type,M))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),v.value.length?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":k.filters[e.unref(Je).assignee],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:k.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":O[3]||(O[3]=M=>f(e.unref(Je).assignee,M))},{tag:e.withCtx(({option:M,handleTagRemove:q})=>[e.createVNode(ke,{"user-name":M.label,"avatar-url":M.avatar,"is-closable":!0,onClose:x=>q(M,x)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(K,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":k.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":k.showsOnlyNonAssigned,onClick:O[4]||(O[4]=M=>k.$emit("update:showsOnlyNonAssigned",!k.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__only-important",size:"sm","icon-name":k.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":k.showsOnlyImportant,onClick:O[5]||(O[5]=M=>k.$emit("update:showsOnlyImportant",!k.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":k.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":k.showsArchivedActivities,onClick:O[6]||(O[6]=M=>k.$emit("update:showsArchivedActivities",!k.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",Wh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.statuses,M=>(e.openBlock(),e.createBlock(jh,{key:M.id,status:M,list:r.value[M.id],title:M.name,"footer-label":k.$t("feed.activity.add"),users:k.users,"user-id":k.userId,"is-editable":k.isEditable,tagType:d.value,onAdd:()=>p(M),onSelectActivity:l,onArchiveActivity:N,onUnarchiveActivity:B,onUpdateActivity:g},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[k.selectedActivity?(e.openBlock(),e.createBlock(po,{key:0,activity:k.selectedActivity,"activity-types":k.activityTypes,"milestone-id":(_=k.selectedActivity.milestone)==null?void 0:_.id,"template-activities":i.value,users:k.users,"user-id":k.userId,"is-task-checkable":k.isTaskCheckable,statuses:k.statuses,breadcrumbs:m.value,"is-editable":k.isEditable,"attachment-enabled":k.attachmentEnabled,projects:b.value,onClose:O[7]||(O[7]=()=>l(null,null)),"onUpdate:activity":h,onAddSubtask:P,onUpdateSubtask:R,onDeleteSubtask:F,onAddFiles:z,onRemoveFile:T,onAddComment:j,onUpdateComment:Y,onRemoveComment:Z,onToast:s},{default:e.withCtx(M=>[e.renderSlot(k.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}});const qh={class:"ao-project-mapping"},Yh={class:"ao-project-mapping-mapping__body"},Kh={class:"ao-project-mapping-mapping__phases"},Gh={key:0,class:"ao-project-mapping-mapping__image-wrapper"},Xh=["src","alt"],Qh=e.defineComponent({__name:"AoMapping",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","copyPhaseToTemplate","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=()=>{const{name:C,rank:v}=ot(o.phases,"phase",n);t("addPhase",{name:C,rank:v,projectId:o.project.id})},i=C=>{t("updatePhase",C)},l=C=>{t("archivePhase",C)},r=C=>{t("unarchivePhase",C)},c=C=>{t("copyPhaseToTemplate",C)},u=e.ref(!1),d=e.ref(!1),m=(C,v)=>{t("applyTemplate",{templateId:C,projectId:v}),u.value=!1},p=(C,v)=>{var N;const h=(N=o.templates)==null?void 0:N.at(-1),g=h?se.LexoRank.parse(h.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:C,rank:g.format(),phaseIds:v}),d.value=!1},f=Rt.useRouter(),b=e.ref("mapping"),y=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(b,C=>{C==="feed"?(f.push({name:oe.feed}),console.log("Navigating to feed...")):C==="overview"?(f.push({name:oe.project}),console.log("Navigating to feed...")):C==="mapping"&&(f.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(C,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},C.$attrs),[e.createElementVNode("div",qh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:y,modelValue:b.value,"onUpdate:modelValue":v[0]||(v[0]=h=>b.value=h)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":C.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:C.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":C.showsArchived,onClick:v[1]||(v[1]=h=>C.$emit("update:showsArchived",!C.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[C.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:C.$t("project.template.save.label"),onClick:v[2]||(v[2]=h=>d.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),C.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:C.$t("project.template.apply.label"),onClick:v[3]||(v[3]=h=>u.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Yh,[e.createElementVNode("div",Kh,[e.createVNode(bo,{phases:C.phases,"closed-status":C.closedStatus,"is-editable":C.isEditable===!0,users:C.users,onAddPhase:s,onUpdatePhase:i,onArchivePhase:l,onUnarchivePhase:r,onCopyPhaseToTemplate:c},null,8,["phases","closed-status","is-editable","users"])]),C.project.architectureImage?(e.openBlock(),e.createElementBlock("div",Gh,[e.createElementVNode("img",{class:"architecture-image",src:C.project.architectureImage.url,alt:e.unref(n)("architectureImage.alt")},null,8,Xh)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createBlock(jn,{key:0,phases:C.phases,onClose:v[4]||(v[4]=h=>d.value=!1),onSave:p},null,8,["phases"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(Rn,{key:1,"project-id":C.project.id,templates:C.templates,onClose:v[5]||(v[5]=h=>u.value=!1),onApply:m},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}});const tt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},Jh=(a,t={})=>[{path:a,name:tt.TEMPLATES,redirect:{name:tt.TEMPLATES_LIST},...t,children:[{path:"",name:tt.TEMPLATES_LIST,component:Un},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:tt.TEMPLATE_DETAILS,component:Hn,props:!0}]}],oe={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},e9=(a,t={})=>[{path:a,...t,redirect:{name:oe.project},children:[{path:"",name:oe.project,component:Lf,props:!0,children:[{path:":phaseId/:milestoneId",name:oe.milestone,component:Xo,props:!0},{path:":phaseId/:milestoneId/:activityId",name:oe.activity,props:{default:!0,modal:!0},components:{default:Xo,modal:yh}}]},{path:"feed",name:oe.feed,component:Fn,props:!0},{path:"mapping",name:oe.mapping,component:Qh,props:!0}]}],t9={class:"ao-templates"},Un=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.templates,(c,u)=>{Me(c,u)});const s=()=>{var p,f;const c=(p=o.templates)==null?void 0:p.at(-1),u=c?se.LexoRank.parse(c.rank).genNext():se.LexoRank.middle(),d=((f=o.templates)==null?void 0:f.length)??0,m={name:n("template.defaultName.template",{idx:d+1}),rank:u.format()};t("addTemplate",m)},i=(c,u)=>{t("updateItem",{itemType:ee.TEMPLATES,id:c,templateId:c,data:{name:u}})},l=(c,u)=>{t("removeItem",{itemType:ee.TEMPLATES,templateId:c,data:{id:c,...u?{name:u}:{}}})},r=c=>{if(c.moved){const u=zt(c,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:c.moved.element.id,templateId:c.moved.element.id,data:{rank:u}})}};return(c,u)=>(e.openBlock(),e.createElementBlock("div",t9,[e.createVNode(Zt,null,{secondary:e.withCtx(()=>[e.createVNode(K,{label:c.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":c.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:r},{item:e.withCtx(({element:d})=>{var m;return[e.createVNode(b3,{id:d.id,title:d.name,phases:d.phases,milestones:(m=d.phases)!=null&&m.length?e.unref(q0)(d.phases):0,activities:d.phases?e.unref(Y0)(d.phases):0,"updated-at":d.updatedAt,"updated-by":d.updatedBy,onUpdateTitle:p=>i(d.id,p),onClick:p=>c.$router.push({name:e.unref(tt).TEMPLATE_DETAILS,params:{templateId:d.id}}),onDeleteItem:u[0]||(u[0]=(p,f)=>l(p,f))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const a9={class:"ao-field__label"},zn=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",a9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),o9=["type","value","disabled","readonly"],n9=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.modelModifiers.lazy?"change":"input"),s=i=>{o.modelModifiers.number&&(i=Number(i)),t("update:modelValue",i)};return(i,l)=>(e.openBlock(),e.createBlock(zn,{label:i.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:i.type,value:i.modelValue,disabled:i.isDisabled,readonly:i.isReadonly},{[e.toHandlerKey(n.value)]:l[0]||(l[0]=r=>s(r.target.value))}),null,16,o9)]),_:1},8,["label"]))}}),s9={class:"ao-field"},l9={class:"ao-field__label"},i9=["checked","disabled"],r9=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",s9,[e.createElementVNode("span",l9,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=n=>{var s;return t.$emit("update:modelValue",((s=n.target)==null?void 0:s.checked)??!1)})},null,40,i9)]))}});exports.AoAvatar=ke;exports.AoCardFeed=wo;exports.AoCheckboxField=r9;exports.AoFeed=Fn;exports.AoField=zn;exports.AoInputField=n9;exports.AoMultiselect=ie;exports.AoProjectPhases=bo;exports.AoTemplateDetails=Hn;exports.AoTemplates=is;exports.AoTemplatesList=Un;exports.TemplateItemTypeEnum=nn;exports.activityFeedStatus=r2;exports.durationTypes=i2;exports.feedFilterTypes=Je;exports.getProjectOverviewRoutes=e9;exports.getTemplateRoutes=Jh;exports.listUpdateTypes=c2;exports.milestoneStatus=Ot;exports.projectOverviewRoutes=oe;exports.ruleComparators=tn;exports.ruleDurationUnits=on;exports.ruleTriggerTypes=an;exports.templateItemType=ee;exports.templateRouteNames=tt;
5
+ */function Qe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Ev(a):/rgb/.test(a)?t=Go(a):typeof a=="string"?t=Go(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:i}=t,{h:l,s:r,v:c}=Bv(t);return{r:o,g:n,b:s,a:i===void 0?1:i,h:l,s:r,v:c}}function mo(a){const t=document.createElement("canvas"),o=t.getContext("2d"),n=a*2;return t.width=n,t.height=n,o.fillStyle="#ffffff",o.fillRect(0,0,n,n),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function Ya(a,t,o,n,s,i){const l=a==="l",r=t.createLinearGradient(0,0,l?o:0,l?0:n);r.addColorStop(.01,s),r.addColorStop(.99,i),t.fillStyle=r,t.fillRect(0,0,o,n)}function $v({r:a,g:t,b:o},n){const s=l=>("0"+Number(l).toString(16)).slice(-2),i=`#${s(a)}${s(t)}${s(o)}`;return n?i.toUpperCase():i}function Ev(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Go(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Bv({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const n=Math.max(a,t,o),s=Math.min(a,t,o),i=n-s;let l=0;n===s?l=0:n===a?t>=o?l=60*(t-o)/i:l=60*(t-o)/i+360:n===t?l=60*(o-a)/i+120:n===o&&(l=60*(a-t)/i+240),l=Math.floor(l);let r=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:l,s:r,v:c}}var vo=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),Ya("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Ya("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),n=a.target.getContext("2d"),s=l=>{let r=l.clientX-o,c=l.clientY-t;r<0&&(r=0),c<0&&(c=0),r>this.size&&(r=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:r-5+"px",top:c-5+"px"};const u=n.getImageData(Math.min(r,this.size-1),Math.min(c,this.size-1),1,1),[d,m,p]=u.data;this.$emit("selectSaturation",{r:d,g:m,b:p})};s(a);const i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",i)}}});const Vv={ref:"canvasSaturation"};function Nv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectSaturation&&a.selectSaturation(...l),["prevent","stop"]))},[e.createVNode("canvas",Vv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}vo.render=Nv;vo.__file="src/color/Saturation.vue";var fo=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,n=a.getContext("2d");a.width=t,a.height=o;const s=n.createLinearGradient(0,0,0,o);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),n.fillStyle=s,n.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),n=i=>{let l=i.clientY-t;l<0&&(l=0),l>this.height&&(l=this.height),this.slideHueStyle={top:l-2+"px"};const r=o.getImageData(0,Math.min(l,this.height-1),1,1),[c,u,d]=r.data;this.$emit("selectHue",{r:c,g:u,b:d})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Sv={ref:"canvasHue"};function Mv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectHue&&a.selectHue(...l),["prevent","stop"]))},[e.createVNode("canvas",Sv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}fo.render=Mv;fo.__file="src/color/Hue.vue";var ho=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,n=this.alphaSize,s=mo(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),Ya("p",i,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height);let l=parseFloat((i/this.height).toFixed(2));this.$emit("selectAlpha",l)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const Av={ref:"canvasAlpha"};function Tv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectAlpha&&a.selectAlpha(...l),["prevent","stop"]))},[e.createVNode("canvas",Av,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}ho.render=Tv;ho.__file="src/color/Alpha.vue";var Co=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,n=this.alphaSize,s=mo(n),i=a.getContext("2d");a.width=t,a.height=o,i.fillStyle=i.createPattern(s,"repeat"),i.fillRect(0,0,t,o),i.fillStyle=this.color,i.fillRect(0,0,t,o)}}});function Ov(a,t,o,n,s,i){return e.openBlock(),e.createBlock("canvas")}Co.render=Ov;Co.__file="src/color/Preview.vue";var go=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:n,left:s,width:i,height:l}=this.suckerCanvas.getBoundingClientRect(),r=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(r,i-1),Math.min(c,l-1),1,1);let[m,p,f,b]=d.data;b=parseFloat((b/255).toFixed(2));const y=this.suckerPreview.style;Object.assign(y,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${m}, ${p}, ${f}, ${b})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?y.display="":y.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:n}=t,{top:s,left:i,width:l,height:r}=a.getBoundingClientRect(),c=o-i,u=n-s,m=a.getContext("2d").getImageData(Math.min(c,l-1),Math.min(u,r-1),1,1);let[p,f,b,y]=m.data;y=parseFloat((y/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b,a:y})}))}}});const Iv=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Lv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Dv=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Pv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...l)=>a.openSucker&&a.openSucker(...l))},[Iv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Lv,[Dv])):e.createCommentVNode("v-if",!0)])}go.render=Pv;go.__file="src/color/Sucker.vue";var _o=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(i){t("inputColor",i)}}),handleFocus:i=>{t("inputFocus",i)},handleBlur:i=>{t("inputBlur",i)}}}});const Hv={class:"color-type"},Rv={class:"name"};function jv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",Hv,[e.createVNode("span",Rv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>a.modelColor=l),class:"value",onFocus:t[2]||(t[2]=(...l)=>a.handleFocus&&a.handleFocus(...l)),onBlur:t[3]||(t[3]=(...l)=>a.handleBlur&&a.handleBlur(...l))},null,544),[[e.vModelText,a.modelColor]])])}_o.render=jv;_o.__file="src/color/Box.vue";var yo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),n=e.ref([]),s=e.ref();a.colorsHistoryKey&&localStorage&&(n.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),s.value=mo(4).toDataURL(),e.onUnmounted(()=>{i(o.value)});function i(r){if(!r)return;const c=n.value||[],u=c.indexOf(r);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(r),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function l(r){t("selectColor",r)}return{setColorsHistory:i,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:l}}});const Fv={class:"colors"},Uv={key:0,class:"colors history"};function zv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Fv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:r=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Uv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:r=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}yo.render=zv;yo.__file="src/color/Colors.vue";var nt=e.defineComponent({components:{Saturation:vo,Hue:fo,Alpha:ho,Preview:Co,Sucker:go,Box:_o,Colors:yo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return $v(this.rgba,!0)}},created(){Object.assign(this,Qe(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:n,h:s,s:i,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:l}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:n,h:s,s:i,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:n,a:s,h:i,s:l,v:r}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:l,v:r}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Zv={class:"color-set"};function xv(a,t,o,n,s,i){const l=e.resolveComponent("Saturation"),r=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),m=e.resolveComponent("Box"),p=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Zv,[e.createVNode(l,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(r,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(u,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(m,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}nt.render=xv;nt.__file="src/color/ColorPicker.vue";nt.install=a=>{a.component(nt.name,nt)};const Wv={class:"ao-maping-card-project-phase__header"},qv={class:"ao-card-project-item__title-line"},Yv={key:0,class:"ao-card-project-item-phase__estimation"},Kv={class:"ao-maping-card-project-phase__footer"},Gv={key:0,class:"ao-maping-card-project-phase__footer-row ao-maping-card-project-phase__footer-row--progress"},Xv={class:"ao-maping-card-project-phase__subitem"},Qv={class:"ao-maping-card-project-phase__subitem"},Jv={key:0,class:"ao-maping-card-project-phase__secondary"},ef={class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--readonly"},tf=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,n=v=>{t("update:title",v)},s=e.computed(()=>{var v;return(v=o.milestones)==null?void 0:v.reduce((h,g)=>{var N;return h+((N=g.activities)==null?void 0:N.reduce((B,V)=>B+(V.estimation||0),0))},0)}),i=e.computed(()=>{var v;return(v=o.milestones)==null?void 0:v.length}),l=e.computed(()=>{var v;return(v=o.milestones)==null?void 0:v.filter(h=>h.status===Ot.done).length}),r=e.computed(()=>(l.value||0)/(i.value||1)),c=e.computed({get:()=>o.deadline??"",set:v=>t("update:deadline",v!=null&&v.length?v:null)}),u=e.ref(!1),d=e.ref(o.color?o.color:"#f9f9f9"),m=e.ref(null),p=e.ref(o.color??"#f9f9f9");e.watch(()=>o.color,v=>{v&&v!==p.value&&(p.value=v)});const f=v=>{p.value=v},b=v=>{const h=v.target;h.closest("button")||h.closest("input")||h.closest(".ao-title")||y()},y=async()=>{console.log("Open color picker"),u.value=!0,d.value=p.value,await e.nextTick(),setTimeout(()=>{window.addEventListener("click",C)},0)},C=v=>{const h=v.target;u.value&&m.value&&!m.value.contains(h)&&(console.log("Close color picker"),u.value=!1,window.removeEventListener("click",C),console.log("COLORS:"),console.log(d.value),console.log(p.value),d.value!==p.value&&(console.log("emit update color"),t("updatePhase",{id:o.id,color:p.value})))};return(v,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Va,{class:"ao-maping-card-project-phase","is-clickable":v.isEditable,onClick:b,style:e.normalizeStyle({backgroundColor:p.value})},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",qv,[e.createVNode(ne,{id:v.id,class:"ao-maping-card-project-phase__title",title:v.name||"",level:4,"is-editable":v.isEditable,"onUpdate:title":n},null,8,["id","title","is-editable"]),s.value?(e.openBlock(),e.createElementBlock("span",Yv," ("+e.toDisplayString(s.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Kv,[i.value?(e.openBlock(),e.createElementBlock("div",Gv,[e.createElementVNode("div",Xv,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",Qv,e.toDisplayString(l.value)+" / "+e.toDisplayString(i.value),1)]),e.createVNode(Na,{percentages:r.value,class:"ao-maping-card-project-phase__progress"},null,8,["percentages"]),v.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Jv,[e.renderSlot(v.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-maping-card-project-phase__footer-row",c.value?"":"ao-maping-card-project-phase__no_deadline"])},[v.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=g=>c.value=g),class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",ef,e.toDisplayString(e.unref(_a)(v.deadline)),1)],2)])]),_:2},[v.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Wv,[e.createVNode(K,{class:"ao-maping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.active?v.$t("archive"):v.$t("unarchive"),onClick:h[0]||(h[0]=e.withModifiers(()=>v.active?v.$emit("archivePhase",{id:v.id}):v.$emit("unarchivePhase",{id:v.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","style"]),u.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:m},[e.createVNode(e.unref(nt),{onClick:h[2]||(h[2]=e.withModifiers(()=>{},["stop"])),class:"color-picker",theme:"light",color:p.value,"onUpdate:color":f},null,8,["color"])],512)):e.createCommentVNode("",!0)],64))}});const af={key:0,class:"ao-project-phase__drag ao-card__drag"},of={key:1,class:"ao-project-phase__col-phase"},nf={key:2,class:"ao-mapping-project-phase__col-phase"},sf={key:3,class:"ao-project-phase__col-milestones"},lf={class:"ao-project-phase__milestones"},rf={class:"ao-project-phase__milestones-list-footer"},cf=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.phase.milestones,(v,h)=>{Me(v,h)});const s=v=>{t("updatePhase",{id:o.phase.id,name:v})},i=v=>{t("updatePhase",{id:o.phase.id,deadline:v})},l=v=>{t("updatePhase",v)},r=e.computed(()=>o.phase.milestones.map(v=>X0(v,o.closedStatus))),c=v=>{const{name:h,rank:g}=ot(r.value??[],"milestone",n);t("addMilestone",{name:h,rank:g,phaseId:v})},u=v=>{t("updateMilestone",v)},d=v=>{t("archiveMilestone",v)},m=v=>{t("unarchiveMilestone",v)},p=v=>{t("archivePhase",v)},f=v=>{t("unarchivePhase",v)},b=v=>{"added"in v?t("updateMilestone",{id:v.added.element.id,phaseId:o.phase.id,rank:pt(r.value,v.added.newIndex)}):"removed"in v||"moved"in v&&t("updateMilestone",{id:v.moved.element.id,rank:pt(r.value,v.moved.newIndex)})},y=Rt.useRoute(),C=e.computed(()=>y.path.includes("/mapping"));return(v,h)=>{var g;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ao-project-phase",{"ao-project-phase--selected":v.phase.id===((g=v.$route.params)==null?void 0:g.phaseId)}])},[v.isEditable?(e.openBlock(),e.createElementBlock("div",af,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",nf,[e.createVNode(tf,{id:v.phase.id,milestones:r.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,"onUpdate:deadline":i,"onUpdate:title":s,onArchivePhase:p,onUnarchivePhase:f,onUpdatePhase:l},null,8,["id","milestones","name","deadline","active","is-editable"])])):(e.openBlock(),e.createElementBlock("div",of,[e.createVNode(iv,{id:v.phase.id,milestones:r.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,"onUpdate:deadline":i,"onUpdate:title":s,onArchivePhase:p,onUnarchivePhase:f},null,8,["id","milestones","name","deadline","active","is-editable"])])),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",sf,[e.createElementVNode("div",lf,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-phase__milestones-list",list:r.value,disabled:v.readonly||!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:b}),{item:e.withCtx(({element:N})=>{var B;return[e.createVNode(wv,{id:N.id,name:N.name,color:N.color,activities:N.activities,deadline:N.deadline,active:N.active,"is-editable":!v.readonly&&v.isEditable,"is-draggable":!v.readonly&&v.isEditable,"closed-status":v.closedStatus,"is-selected":N.id===((B=v.$route.params)==null?void 0:B.milestoneId),assignee:N.assignee,important:N.important,readonly:v.readonly,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:V=>!v.readonly&&v.$router.push({name:e.unref(oe).milestone,params:{phaseId:v.phase.id,milestoneId:N.id}}),onUpdateMilestone:u,onArchiveMilestone:d,onUnarchiveMilestone:m},null,8,["id","name","color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",rf,[v.isEditable?(e.openBlock(),e.createBlock(We,{key:0,label:v.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:h[0]||(h[0]=()=>c(v.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])])]))],2)}}});const df={class:"ao-project__phases"},uf={key:0,class:"ao-project-phase__phases-list-footer"},pf=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),mf={class:"ao-project-phase__col-phase"},vf=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),bo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(p,f)=>{Me(p,f)});const n=p=>{t("addMilestone",p)},s=p=>{t("updateMilestone",p)},i=p=>{t("archiveMilestone",p)},l=p=>{t("unarchiveMilestone",p)},r=p=>{t("archivePhase",p)},c=p=>{t("unarchivePhase",p)},u=p=>{if(p.moved){const f=zt(p,o.phases??[]);t("updatePhase",{id:p.moved.element.id,rank:f})}},d=p=>{t("updatePhase",p)},m=p=>{t("addPhase",p)};return(p,f)=>(e.openBlock(),e.createElementBlock("div",df,[e.createVNode(e.unref(xe),{class:"ao-project-phase__phases-list","model-value":p.phases,"item-key":"id",handle:".ao-card__drag",onChange:u},{item:e.withCtx(({element:b})=>[e.createVNode(cf,{phase:b,"is-editable":!p.readonly&&p.isEditable,"closed-status":p.closedStatus,users:p.users,readonly:p.readonly,onAddMilestone:n,onUpdateMilestone:s,onArchiveMilestone:i,onUnarchiveMilestone:l,onUpdatePhase:d,onArchivePhase:r,onUnarchivePhase:c},null,8,["phase","is-editable","closed-status","users","readonly"])]),_:1},8,["model-value"]),p.isEditable?(e.openBlock(),e.createElementBlock("div",uf,[pf,e.createElementVNode("div",mf,[e.createVNode(We,{label:p.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:m},null,8,["label"])]),vf])):e.createCommentVNode("",!0)]))}});const ff=["onSubmit"],hf={class:"ao-add-template-modal__form-body"},Cf={class:"field__row"},gf={class:"ao-add-template-modal__form-footer"},Rn=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.templates.map(r=>({value:r.id,label:r.name}))),s=e.ref(null),i=r=>{s.value=r},l=()=>{s.value&&t("apply",s.value,o.projectId)};return(r,c)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:r.$t("project.template.apply.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-add-template-modal__form",onSubmit:e.withModifiers(l,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(r.$t("project.template.apply.notice")),1),e.createElementVNode("div",hf,[e.createElementVNode("div",Cf,[e.createVNode(ie,{value:s.value,options:n.value,detached:!0,onChange:i},null,8,["value","options"])])]),e.createElementVNode("footer",gf,[e.createVNode(K,{label:r.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:l},null,8,["label"])])],40,ff)]),_:1}))}});const _f=["onSubmit"],yf={class:"ao-save-template-modal__form-body"},bf={class:"field__row"},kf={class:"ao-field ao-field--inline"},wf={class:"ao-field__label"},$f={class:"ao-save-template-modal__phases"},Ef={class:"ao-field__label"},Bf={class:"ao-save-template-modal__phases-list"},Vf=["value"],Nf={class:"ao-save-template-modal__form-footer"},jn=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,n=e.ref(""),s=e.ref([]);e.onMounted(()=>{s.value=o.phases.map(l=>l.id)});const i=()=>{n.value&&t("save",n.value,s.value)};return(l,r)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$t("project.template.save.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-save-template-modal__form",onSubmit:e.withModifiers(i,["prevent"])},[e.createElementVNode("div",yf,[e.createElementVNode("div",bf,[e.createElementVNode("label",kf,[e.createElementVNode("span",wf,e.toDisplayString(l.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=c=>n.value=c),type:"text"},null,512),[[e.vModelText,n.value]])])]),e.createElementVNode("div",$f,[e.createElementVNode("div",Ef,e.toDisplayString(l.$t("project.template.phases.label")),1),e.createElementVNode("div",Bf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,c=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:c.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:c.id,"onUpdate:modelValue":r[1]||(r[1]=u=>s.value=u)},null,8,Vf),[[e.vModelCheckbox,s.value]]),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]))),128))])])]),e.createElementVNode("footer",Nf,[e.createVNode(K,{label:l.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:i},null,8,["label"])])],40,_f)]),_:1}))}});const Sf=e.defineComponent({props:{modelValue:{type:[String,Number],required:!0},tabs:{type:Array,required:!0}},emits:["update:modelValue"],methods:{selectTab(a){this.$emit("update:modelValue",a)}}});const Mf={class:"tabbar-wrapper"},Af=["onClick"];function Tf(a,t,o,n,s,i){return e.openBlock(),e.createElementBlock("div",Mf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,l=>(e.openBlock(),e.createElementBlock("button",{key:l.value,class:e.normalizeClass(["tab-button",{"tab-button--active":l.value===a.modelValue}]),type:"button",onClick:r=>a.selectTab(l.value)},e.toDisplayString(l.label),11,Af))),128))])}const ko=I(Sf,[["render",Tf],["__scopeId","data-v-ff4e3297"]]),Of={class:"ao-project"},If={class:"ao-project__body"},Lf=e.defineComponent({__name:"AoProjectOverviewProject",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addActivity","update:activity","archiveActivity","copyPhaseToTemplate","unarchiveActivity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=e.computed(()=>o.phases.flatMap($=>$.milestones)),i=()=>{const{name:$,rank:k}=ot(o.phases,"phase",n);t("addPhase",{name:$,rank:k,projectId:o.project.id})},l=$=>{t("updatePhase",$)},r=$=>{t("archivePhase",$)},c=$=>{t("unarchivePhase",$)},u=$=>{t("copyPhaseToTemplate",$)},d=$=>{t("addMilestone",$)},m=$=>{t("updateMilestone",$)},p=$=>{t("archiveMilestone",$)},f=$=>{t("unarchiveMilestone",$)},b=$=>{t("addActivity",$)},y=$=>{t("update:activity",$)},C=$=>{t("archiveActivity",$)},v=$=>{t("unarchiveActivity",$)},h=$=>{t("addSubtask",$)},g=$=>{t("updateSubtask",$)},N=$=>{t("deleteSubtask",$)},B=e.computed(()=>s.value.flatMap($=>$.activities)),V=$=>{t("addFiles",$)},L=$=>{t("removeFile",$)},P=$=>{t("addComment",$)},R=$=>{t("updateComment",$)},F=$=>{t("removeComment",$)},z=e.ref(!1),T=e.ref(!1),j=($,k)=>{t("applyTemplate",{templateId:$,projectId:k}),z.value=!1},Y=($,k)=>{var M;const O=(M=o.templates)==null?void 0:M.at(-1),_=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:$,rank:_.format(),phaseIds:k}),T.value=!1},Z=Rt.useRouter(),U=e.ref("overview"),E=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(U,$=>{$==="feed"?(Z.push({name:oe.feed}),console.log("Navigating to feed...")):$==="overview"?(Z.push({name:oe.project}),console.log("Navigating to feed...")):$==="mapping"&&(Z.push({name:oe.mapping}),console.log("Navigating to feed..."))}),($,k)=>{const O=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",Of,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:E,modelValue:U.value,"onUpdate:modelValue":k[0]||(k[0]=_=>U.value=_)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":$.showsArchived,onClick:k[1]||(k[1]=_=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:k[2]||(k[2]=_=>T.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:k[3]||(k[3]=_=>z.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",If,[e.createVNode(bo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,onAddMilestone:d,onUpdateMilestone:m,onArchiveMilestone:p,onUnarchiveMilestone:f,onAddPhase:i,onUpdatePhase:l,onArchivePhase:r,onUnarchivePhase:c,onCopyPhaseToTemplate:u},null,8,["phases","closed-status","is-editable","users"])])]),e.createVNode(O,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,onClose:k[4]||(k[4]=_=>$.$router.push({name:e.unref(oe).project})),onUpdateMilestone:m,onAddActivity:b,onUpdateActivity:y,onArchiveActivity:C,onUnarchiveActivity:v},null,8,["phases","project-id","project-name","users","is-editable","closed-status"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(O,{name:"modal",activities:B.value,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,"activity-types":$.activityTypes,phases:$.phases,project:$.project,users:$.users,"user-id":$.userId,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,"onUpdate:activity":y,onAddSubtask:h,onUpdateSubtask:g,onDeleteSubtask:N,onAddFiles:V,onRemoveFile:L,onAddComment:P,onUpdateComment:R,onRemoveComment:F},{default:e.withCtx(({Component:_})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_),null,{default:e.withCtx(M=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.value?(e.openBlock(),e.createBlock(jn,{key:0,phases:$.phases,onClose:k[5]||(k[5]=_=>T.value=!1),onSave:Y},null,8,["phases"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(Rn,{key:1,"project-id":$.project.id,templates:$.templates,onClose:k[6]||(k[6]=_=>z.value=!1),onApply:j},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}});const Df={class:"ao-card-feed__header"},Pf={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},Hf={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},Rf={class:"ao-card-feed__body"},jf={key:0,class:"ao-card-feed__breadcrumbs"},Ff={class:e.normalizeClass(["ao-card-feed__title-group"])},Uf={class:"ao-card-feed__title-line"},zf={key:0,class:"ao-card-feed__slug"},Zf={key:1,class:"ao-card-feed__deadline"},xf={class:"ao-card-feed__footer"},Wf={class:"ao-card-feed__footer-row"},qf={class:"ao-assignees"},Yf={key:0,class:"ao-assignee"},Kf={key:0,class:"ao-card-feed__subitems"},Gf={key:0,class:"ao-card-feed__subitem"},Xf={class:"ao-card-feed__subitem"},Qf={key:1,class:"ao-card-feed__subitem"},Jf={class:"ao-card-feed__subitem"},eh={class:"ao-card-feed__footer-row"},th={key:0,class:"ao-card-feed__progress-wrapper"},ah={class:"ao-card-feed__subitem"},oh={class:"ao-card-feed__subitem"},wo=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},projectColor:{},phaseName:{},milestoneName:{},milestoneColor:{},deadline:{},important:{type:Boolean},assignee:{},slug:{},comments:{},attachments:{},tasks:{},isEditable:{type:Boolean},isPrivate:{type:Boolean},isClosed:{type:Boolean},tagType:{}},emits:["removeAssignee","updateActivity"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),s=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),i=f=>{t("updateActivity",{id:o.id,name:f})},l=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),r=e.computed(()=>o.assignee?[o.assignee]:[]),c=e.computed(()=>_a(o.deadline)),u=f=>{t("removeAssignee",f)},d=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.length}),m=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.filter(b=>b.isDone).length}),p=e.computed(()=>(m.value||0)/(d.value||1));return(f,b)=>(e.openBlock(),e.createBlock(Va,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":f.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",Df,[n.value?(e.openBlock(),e.createBlock(Tt,{key:0,label:n.value,class:"ao-card-feed__project",variant:"solid",color:f.projectColor?void 0:"primary","raw-color":s.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),f.isPrivate||f.important||f.isClosed?(e.openBlock(),e.createElementBlock("div",Pf,[f.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),f.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),f.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Hf,[e.renderSlot(f.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",Rf,[l.value?(e.openBlock(),e.createElementBlock("span",jf,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ff,[e.createElementVNode("div",Uf,[f.slug?(e.openBlock(),e.createElementBlock("span",zf,e.toDisplayString(f.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:f.id,title:f.name,level:5,"is-editable":f.isEditable,"onUpdate:title":i,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),f.deadline?(e.openBlock(),e.createElementBlock("span",Zf,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",xf,[e.createElementVNode("div",Wf,[e.createElementVNode("ul",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,y=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:y.id},[y?(e.openBlock(),e.createElementBlock("li",Yf,[e.createVNode(ke,{"user-name":e.unref(yn)(y),"avatar-url":y.avatarUrl,"is-closable":!0,onClose:()=>u(y.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),f.comments||f.attachments?(e.openBlock(),e.createElementBlock("ul",Kf,[f.comments?(e.openBlock(),e.createElementBlock("li",Gf,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",Xf,e.toDisplayString(f.comments),1)])):e.createCommentVNode("",!0),f.attachments?(e.openBlock(),e.createElementBlock("li",Qf,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",Jf,e.toDisplayString(f.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",eh,[f.tasks&&f.tasks.length?(e.openBlock(),e.createElementBlock("div",th,[e.createElementVNode("div",ah,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",oh,e.toDisplayString(m.value)+" / "+e.toDisplayString(d.value),1)]),e.createVNode(Na,{percentages:p.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}});const nh={props:{color:{type:String,required:!0}},components:{ColorPicker:nt},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:n,a:s}=a.rgba,i=`rgba(${t}, ${o}, ${n}, ${s})`;this.$emit("update:color",i)}}},sh={class:"color-picker-wrapper"};function lh(a,t,o,n,s,i){const l=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",sh,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...r)=>i.togglePicker&&i.togglePicker(...r))},null,4),s.showPicker?(e.openBlock(),e.createBlock(l,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:i.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const ih=I(nh,[["render",lh]]),rh={class:"ao-project-milestone"},ch={class:"ao-project-milestone__header"},dh={class:"ao-project-milestone__header_line"},uh={class:"ao-project-milestone__header_line"},ph={class:"ao-project-milestone__title"},mh={key:0,class:"ao-fieldset ao-milestone__fieldset"},vh={class:"ao-field__row ao-milestone__field-row"},fh={class:"ao-field ao-field--inline"},hh={class:"ao-field__row ao-milestone__field-row"},Ch={class:"ao-field ao-milestone__field-multiselect"},gh={class:"ao-project-milestone__body"},_h={key:0,class:"ao-project-milestone__footer"},Xo=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.find(g=>g.id===o.phaseId)}),i=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.flatMap(g=>g.milestones)}),l=e.computed(()=>{var h;return(h=i.value)==null?void 0:h.find(g=>g.id===o.milestoneId)}),r=e.computed(()=>{var h;return(h=l.value)==null?void 0:h.activities});e.watch(r,(h,g)=>{Me(h,g)});const c=h=>{t("close",h)},u=()=>{const{name:h,rank:g}=ot(r.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:h,rank:g,projectId:o.projectId})},d=h=>{t("updateActivity",h)},m=h=>{r.value&&"moved"in h&&t("updateActivity",{id:h.moved.element.id,rank:pt(r.value,h.moved.newIndex)})},p=e.computed({get:()=>{var h;return(h=l.value)==null?void 0:h.color},set:h=>{l.value&&t("updateMilestone",{id:l.value.id,color:h})}}),f=e.computed({get:()=>{var h;return((h=l==null?void 0:l.value)==null?void 0:h.deadline)??""},set:h=>{l.value&&t("updateMilestone",{id:l.value.id,deadline:h!=null&&h.length?h:null})}}),b=h=>o.closedStatus?Qa(h,o.closedStatus):!1,y=e.computed(()=>{var h;return((h=o.users)==null?void 0:h.map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id,avatar:g.avatarUrl})))||[]}),C=e.computed({get(){var h,g;return(g=(h=l.value)==null?void 0:h.assignee)!=null&&g.id?[l.value.assignee.id]:[]},set(h){t("updateMilestone",{id:o.milestoneId,assigneeId:h[0]??null})}}),v=e.computed({get(){var h;return((h=l.value)==null?void 0:h.important)??!1},set(h){t("updateMilestone",{id:o.milestoneId,important:h})}});return(h,g)=>{var N;return e.openBlock(),e.createElementBlock("div",rh,[e.createElementVNode("header",ch,[e.createElementVNode("div",dh,[e.createVNode(K,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",uh,[e.createElementVNode("div",ph,[e.createVNode(ne,{title:((N=l.value)==null?void 0:N.name)||h.milestoneId,level:5},null,8,["title"]),e.createVNode(qa,{modelValue:v.value,"onUpdate:modelValue":g[0]||(g[0]=B=>v.value=B),modelModifiers:{lazy:!0},disabled:!h.isEditable,class:"ao-milestone__important",color:"danger",label:h.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),l.value?(e.openBlock(),e.createElementBlock("div",mh,[e.createElementVNode("div",vh,[e.createElementVNode("label",fh,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[1]||(g[1]=B=>f.value=B),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",hh,[e.createElementVNode("label",Ch,[e.createVNode(ie,{modelValue:C.value,"onUpdate:modelValue":g[2]||(g[2]=B=>C.value=B),options:y.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:h.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!h.isEditable,caret:h.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(ke,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:L=>V(B,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(ih,{color:p.value,"onUpdate:color":g[3]||(g[3]=B=>p.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",gh,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:r.value,disabled:!h.isEditable,"item-key":"id",group:"kanban"},h.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var V,L,P,R,F;return[e.createVNode(wo,{id:B.id,name:B.name||B.id,"phase-name":(V=s.value)==null?void 0:V.name,"milestone-name":(L=l.value)==null?void 0:L.name,"milestone-color":(P=l.value)==null?void 0:P.color,deadline:B.deadline,important:B.important,users:h.users,assignee:B.assignee,slug:B.slug,comments:(R=B.comments)==null?void 0:R.length,attachments:(F=B.attachments)==null?void 0:F.length,tasks:B.tasks,"is-editable":h.isEditable,"is-private":B.private,"is-closed":b(B),onClick:z=>h.$router.push({name:e.unref(oe).activity,params:{milestoneId:h.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[h.isEditable?{name:"secondary",fn:e.withCtx(()=>[h.isEditable&&B.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:h.$t("archive"),onClick:e.withModifiers(()=>h.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),h.isEditable&&!B.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:h.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>h.$emit("unarchiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),h.isEditable?(e.openBlock(),e.createElementBlock("div",_h,[e.createVNode(We,{"icon-name":"Add",label:h.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const yh=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,n=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.find(v=>v.id===o.phaseId)}),s=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(v=>v.milestones)}),i=e.computed(()=>{var C;return(C=s.value)==null?void 0:C.find(v=>v.id===o.milestoneId)}),l=e.computed(()=>{var C;return(C=o.activities)==null?void 0:C.find(v=>v.id===o.activityId)}),r=C=>{t("update:activity",C)},c=C=>{t("addSubtask",C)},u=C=>{t("updateSubtask",C)},d=C=>{t("deleteSubtask",C)},m=C=>{t("addFiles",C)},p=C=>{t("removeFile",C)},f=C=>{t("addComment",C)},b=C=>{t("updateComment",C)},y=C=>{t("removeComment",C)};return(C,v)=>{var h,g;return l.value?(e.openBlock(),e.createBlock(po,{key:0,activity:l.value,"activity-types":C.activityTypes,"milestone-id":C.milestoneId,"template-activities":C.activities,"is-template":!1,users:C.users,"user-id":C.userId,"is-task-checkable":C.isTaskCheckable,statuses:C.statuses,breadcrumbs:`${(h=n.value)==null?void 0:h.name} / ${(g=i.value)==null?void 0:g.name}`,"is-editable":C.isEditable,"attachment-enabled":C.attachmentEnabled,projects:[C.project],onClose:C.$router.back,"onUpdate:activity":r,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:b,onRemoveComment:y},{default:e.withCtx(N=>[e.renderSlot(C.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),bh={class:"ao-col-header"},kh=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",bh,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Tt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function wh(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function ma(a){return typeof a=="function"?a():e.unref(a)}const $h=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Eh=a=>a!=null,At=()=>{};function Bh(a,t){function o(...n){return new Promise((s,i)=>{Promise.resolve(a(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(i)})}return o}function Vh(a,t={}){let o,n,s=At;const i=r=>{clearTimeout(r),s(),s=At};return r=>{const c=ma(a),u=ma(t.maxWait);return o&&i(o),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(r())):new Promise((d,m)=>{s=t.rejectOnCancel?m:d,u&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,d(r())},u)),o=setTimeout(()=>{n&&i(n),n=null,d(r())},c)})}}function Nh(a,t=200,o={}){return Bh(Vh(t,o),a)}function Ua(a){var t;const o=ma(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Sh=$h?window:void 0;function Mh(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function Ah(a){const t=Mh();return e.computed(()=>(t.value,!!a()))}function Th(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:i=.1,window:l=Sh,immediate:r=!0}=o,c=Ah(()=>l&&"IntersectionObserver"in l),u=e.computed(()=>{const b=ma(a);return(Array.isArray(b)?b:[b]).map(Ua).filter(Eh)});let d=At;const m=e.ref(r),p=c.value?e.watch(()=>[u.value,Ua(n),m.value],([b,y])=>{if(d(),!m.value||!b.length)return;const C=new IntersectionObserver(t,{root:Ua(y),rootMargin:s,threshold:i});b.forEach(v=>v&&C.observe(v)),d=()=>{C.disconnect(),d=At}},{immediate:r,flush:"post"}):At,f=()=>{d(),p(),m.value=!1};return wh(f),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:f}}const Oh={class:e.normalizeClass(["ao-list-kanban"])},Ih={class:"ao-list-kanban__header"},Lh={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},Dh={key:1,class:"ao-list-kanban__end"},Ph={key:0,class:"ao-list-kanban__no-more"},Hh={key:1,class:"ao-list-kanban__divider"},Rh={key:1,class:"ao-list-kanban__footer"},jh=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,n=e.ref(!1),s=e.ref(null);Th(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const i=d=>{var m;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((m=d.assignee)==null?void 0:m.id):!1},l=d=>{t("selectActivity",d)},r=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:pt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:pt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",Oh,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var p;return[e.createElementVNode("div",Ih,[d.title?(e.openBlock(),e.createBlock(kh,{key:0,title:d.title,level:3,items:(p=d.list)==null?void 0:p.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(xe),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:m[0]||(m[0]=p=>u.value=!0),onEnd:m[1]||(m[1]=p=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:p})=>{var f,b,y,C,v,h,g,N,B;return[e.createVNode(wo,{class:e.normalizeClass(i(p)?"ao-list-draggable":""),id:p.id,name:p.name,"project-name":(f=p.project)==null?void 0:f.name,"project-color":(b=p.project)==null?void 0:b.color,"phase-name":(C=(y=p.milestone)==null?void 0:y.phase)==null?void 0:C.name,"milestone-name":(v=p.milestone)==null?void 0:v.name,"milestone-color":(h=p.milestone)==null?void 0:h.color,deadline:p.deadline,rules:((g=p.rules)==null?void 0:g.length)||0,tasks:p.tasks,description:p.description,important:p.important,type:p.type,comments:(N=p.comments)==null?void 0:N.length,attachments:(B=p.attachments)==null?void 0:B.length,users:d.users,assignee:p.assignee,slug:p.slug,"is-editable":i(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[V=>i(p)&&r(V),()=>i(p)&&r],onClick:()=>l(p.id),onRemoveAssignee:()=>i(p)&&r({id:p.id,assigneeId:null})},{secondary:e.withCtx(()=>[i(p)&&p.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),i(p)&&!p.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:p.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",Lh,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:s,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",Dh,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",Ph,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",Hh)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",Rh,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:m[2]||(m[2]=p=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const Fh={class:"ao-field ao-search-field"},Uh=["value","placeholder","onKeypress"],zh=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,n=async l=>{const c=l.target.value;t("update:modelValue",c,l)},s=Nh(n,o.delay),i=l=>{t("clear",l)};return(l,r)=>(e.openBlock(),e.createElementBlock("div",Fh,[e.createElementVNode("input",{value:l.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:l.placeholder,onInput:r[0]||(r[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,Uh),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${l.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(K,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${l.modelValue?"ao-search-field__action--visible":""}`),onClick:i},null,8,["class"])]))}});const Zh={class:"ao-feed"},xh={class:"ao-feed__filters"},Wh={class:"ao-feed__body"},Fn=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},showsOnlyNonAssigned:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","update:showsOnlyNonAssigned","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","toast"],setup(a,{emit:t}){const o=a,{t:n}=Ye();function s(k,O){t("toast",k,O)}const i=e.toRef(o,"activities"),l=async(k,O)=>{await t("selectActivity",k,O)},r=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([k,O,_,M],[q,x])=>{r.value=Object.fromEntries(k.map(D=>[D.id,O.filter(S=>{var H;return((H=S.status)==null?void 0:H.id)===D.id})])),_&&!c.value?(l(_,null),c.value=!0):M&&!c.value&&(l(null,M),c.value=!0),u.value&&Me(O,x)},{immediate:!0});const m=e.computed(()=>{var k;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((k=o.selectedActivity.milestone.phase)==null?void 0:k.name)??""} / ${o.selectedActivity.milestone.name??""}`}),p=k=>{var x,D;const O=(x=o.activities)==null?void 0:x.at(-1),_=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle(),M=((D=o.activities)==null?void 0:D.length)??0,q={name:n("activity.defaultName",{idx:M+1}),rank:_.format(),statusId:k.id};o.filters.assigneeId.length>0&&(q.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(q.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(q.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",q)},f=(k,O)=>{u.value=!1,t("update:filters",{...o.filters,[k]:O})},b=e.computed(()=>o.project?[o.project]:o.projects??[]),y=e.computed(()=>b.value.map(k=>({value:k.id,label:k.name}))),C=e.computed(()=>{var k;return(k=o.activityTypes)==null?void 0:k.map(O=>({value:O.id,label:O.name}))}),v=e.computed(()=>o.users.map(k=>({value:k.id,label:`${k.firstName} ${k.lastName}`,avatar:k.avatarUrl}))),h=k=>{o.selectedActivity&&t("update:activity",k)},g=k=>{t("update:activity",k)},N=k=>{t("archiveActivity",k)},B=k=>{t("unarchiveActivity",k)},V=k=>{u.value=!1,t("update:searchText",k)},L=k=>{u.value=!1,t("clear:searchText",k)},P=k=>{o.selectedActivity&&t("addSubtask",k)},R=k=>{o.selectedActivity&&t("updateSubtask",k)},F=k=>{o.selectedActivity&&t("deleteSubtask",k)},z=k=>{t("addFiles",k)},T=k=>{t("removeFile",k)},j=k=>{o.selectedActivity&&t("addComment",{...k,activityId:o.selectedActivity.id})},Y=k=>{const{id:O}=o.selectedActivity||{};O&&t("updateComment",k)},Z=k=>{const{id:O}=o.selectedActivity||{};O&&t("removeComment",k)},U=Rt.useRouter(),E=e.ref("feed"),$=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(E,k=>{k==="feed"?(U.push({name:oe.feed}),console.log("Navigating to feed...")):k==="overview"?(U.push({name:oe.project}),console.log("Navigating to feed...")):k==="mapping"&&(U.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(k,O)=>{var _;return e.openBlock(),e.createElementBlock("div",Zh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createElementVNode("div",xh,[e.createVNode(ko,{tabs:$,modelValue:E.value,"onUpdate:modelValue":O[0]||(O[0]=M=>E.value=M)},null,8,["modelValue"]),e.createVNode(zh,{"model-value":k.searchText,placeholder:k.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":V,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:0,"model-value":k.filters[e.unref(Je).project],mode:"tags",options:y.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:k.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":O[1]||(O[1]=M=>f(e.unref(Je).project,M))},null,8,["model-value","options","placeholder"])),C.value?(e.openBlock(),e.createBlock(ie,{key:1,"model-value":k.filters[e.unref(Je).type],mode:"tags",options:C.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:k.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":O[2]||(O[2]=M=>f(e.unref(Je).type,M))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),v.value.length?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":k.filters[e.unref(Je).assignee],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:k.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":O[3]||(O[3]=M=>f(e.unref(Je).assignee,M))},{tag:e.withCtx(({option:M,handleTagRemove:q})=>[e.createVNode(ke,{"user-name":M.label,"avatar-url":M.avatar,"is-closable":!0,onClose:x=>q(M,x)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(K,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":k.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":k.showsOnlyNonAssigned,onClick:O[4]||(O[4]=M=>k.$emit("update:showsOnlyNonAssigned",!k.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__only-important",size:"sm","icon-name":k.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":k.showsOnlyImportant,onClick:O[5]||(O[5]=M=>k.$emit("update:showsOnlyImportant",!k.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":k.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":k.showsArchivedActivities,onClick:O[6]||(O[6]=M=>k.$emit("update:showsArchivedActivities",!k.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",Wh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.statuses,M=>(e.openBlock(),e.createBlock(jh,{key:M.id,status:M,list:r.value[M.id],title:M.name,"footer-label":k.$t("feed.activity.add"),users:k.users,"user-id":k.userId,"is-editable":k.isEditable,tagType:d.value,onAdd:()=>p(M),onSelectActivity:l,onArchiveActivity:N,onUnarchiveActivity:B,onUpdateActivity:g},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[k.selectedActivity?(e.openBlock(),e.createBlock(po,{key:0,activity:k.selectedActivity,"activity-types":k.activityTypes,"milestone-id":(_=k.selectedActivity.milestone)==null?void 0:_.id,"template-activities":i.value,users:k.users,"user-id":k.userId,"is-task-checkable":k.isTaskCheckable,statuses:k.statuses,breadcrumbs:m.value,"is-editable":k.isEditable,"attachment-enabled":k.attachmentEnabled,projects:b.value,onClose:O[7]||(O[7]=()=>l(null,null)),"onUpdate:activity":h,onAddSubtask:P,onUpdateSubtask:R,onDeleteSubtask:F,onAddFiles:z,onRemoveFile:T,onAddComment:j,onUpdateComment:Y,onRemoveComment:Z,onToast:s},{default:e.withCtx(M=>[e.renderSlot(k.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}});const qh={class:"ao-project-mapping"},Yh={class:"ao-project-mapping-mapping__body"},Kh={class:"ao-project-mapping-mapping__phases"},Gh={key:0,class:"ao-project-mapping-mapping__image-wrapper"},Xh=["src","alt"],Qh=e.defineComponent({__name:"AoMapping",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","copyPhaseToTemplate","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=()=>{const{name:C,rank:v}=ot(o.phases,"phase",n);t("addPhase",{name:C,rank:v,projectId:o.project.id})},i=C=>{t("updatePhase",C)},l=C=>{t("archivePhase",C)},r=C=>{t("unarchivePhase",C)},c=C=>{t("copyPhaseToTemplate",C)},u=e.ref(!1),d=e.ref(!1),m=(C,v)=>{t("applyTemplate",{templateId:C,projectId:v}),u.value=!1},p=(C,v)=>{var N;const h=(N=o.templates)==null?void 0:N.at(-1),g=h?se.LexoRank.parse(h.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:C,rank:g.format(),phaseIds:v}),d.value=!1},f=Rt.useRouter(),b=e.ref("mapping"),y=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(b,C=>{C==="feed"?(f.push({name:oe.feed}),console.log("Navigating to feed...")):C==="overview"?(f.push({name:oe.project}),console.log("Navigating to feed...")):C==="mapping"&&(f.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(C,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},C.$attrs),[e.createElementVNode("div",qh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:y,modelValue:b.value,"onUpdate:modelValue":v[0]||(v[0]=h=>b.value=h)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":C.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:C.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":C.showsArchived,onClick:v[1]||(v[1]=h=>C.$emit("update:showsArchived",!C.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[C.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:C.$t("project.template.save.label"),onClick:v[2]||(v[2]=h=>d.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),C.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:C.$t("project.template.apply.label"),onClick:v[3]||(v[3]=h=>u.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Yh,[e.createElementVNode("div",Kh,[e.createVNode(bo,{phases:C.phases,"closed-status":C.closedStatus,"is-editable":C.isEditable===!0,users:C.users,onAddPhase:s,onUpdatePhase:i,onArchivePhase:l,onUnarchivePhase:r,onCopyPhaseToTemplate:c},null,8,["phases","closed-status","is-editable","users"])]),C.project.architectureImage?(e.openBlock(),e.createElementBlock("div",Gh,[e.createElementVNode("img",{class:"architecture-image",src:C.project.architectureImage.url,alt:e.unref(n)("architectureImage.alt")},null,8,Xh)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createBlock(jn,{key:0,phases:C.phases,onClose:v[4]||(v[4]=h=>d.value=!1),onSave:p},null,8,["phases"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(Rn,{key:1,"project-id":C.project.id,templates:C.templates,onClose:v[5]||(v[5]=h=>u.value=!1),onApply:m},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}});const tt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},Jh=(a,t={})=>[{path:a,name:tt.TEMPLATES,redirect:{name:tt.TEMPLATES_LIST},...t,children:[{path:"",name:tt.TEMPLATES_LIST,component:Un},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:tt.TEMPLATE_DETAILS,component:Hn,props:!0}]}],oe={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},e9=(a,t={})=>[{path:a,...t,redirect:{name:oe.project},children:[{path:"",name:oe.project,component:Lf,props:!0,children:[{path:":phaseId/:milestoneId",name:oe.milestone,component:Xo,props:!0},{path:":phaseId/:milestoneId/:activityId",name:oe.activity,props:{default:!0,modal:!0},components:{default:Xo,modal:yh}}]},{path:"feed",name:oe.feed,component:Fn,props:!0},{path:"mapping",name:oe.mapping,component:Qh,props:!0}]}],t9={class:"ao-templates"},Un=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.templates,(c,u)=>{Me(c,u)});const s=()=>{var p,f;const c=(p=o.templates)==null?void 0:p.at(-1),u=c?se.LexoRank.parse(c.rank).genNext():se.LexoRank.middle(),d=((f=o.templates)==null?void 0:f.length)??0,m={name:n("template.defaultName.template",{idx:d+1}),rank:u.format()};t("addTemplate",m)},i=(c,u)=>{t("updateItem",{itemType:ee.TEMPLATES,id:c,templateId:c,data:{name:u}})},l=(c,u)=>{t("removeItem",{itemType:ee.TEMPLATES,templateId:c,data:{id:c,...u?{name:u}:{}}})},r=c=>{if(c.moved){const u=zt(c,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:c.moved.element.id,templateId:c.moved.element.id,data:{rank:u}})}};return(c,u)=>(e.openBlock(),e.createElementBlock("div",t9,[e.createVNode(Zt,null,{secondary:e.withCtx(()=>[e.createVNode(K,{label:c.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":c.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:r},{item:e.withCtx(({element:d})=>{var m;return[e.createVNode(b3,{id:d.id,title:d.name,phases:d.phases,milestones:(m=d.phases)!=null&&m.length?e.unref(q0)(d.phases):0,activities:d.phases?e.unref(Y0)(d.phases):0,"updated-at":d.updatedAt,"updated-by":d.updatedBy,onUpdateTitle:p=>i(d.id,p),onClick:p=>c.$router.push({name:e.unref(tt).TEMPLATE_DETAILS,params:{templateId:d.id}}),onDeleteItem:u[0]||(u[0]=(p,f)=>l(p,f))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const a9={class:"ao-field__label"},zn=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",a9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),o9=["type","value","disabled","readonly"],n9=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.modelModifiers.lazy?"change":"input"),s=i=>{o.modelModifiers.number&&(i=Number(i)),t("update:modelValue",i)};return(i,l)=>(e.openBlock(),e.createBlock(zn,{label:i.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:i.type,value:i.modelValue,disabled:i.isDisabled,readonly:i.isReadonly},{[e.toHandlerKey(n.value)]:l[0]||(l[0]=r=>s(r.target.value))}),null,16,o9)]),_:1},8,["label"]))}}),s9={class:"ao-field"},l9={class:"ao-field__label"},i9=["checked","disabled"],r9=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",s9,[e.createElementVNode("span",l9,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=n=>{var s;return t.$emit("update:modelValue",((s=n.target)==null?void 0:s.checked)??!1)})},null,40,i9)]))}});exports.AoAvatar=ke;exports.AoCardFeed=wo;exports.AoCheckboxField=r9;exports.AoFeed=Fn;exports.AoField=zn;exports.AoInputField=n9;exports.AoMultiselect=ie;exports.AoProjectPhases=bo;exports.AoTemplateDetails=Hn;exports.AoTemplates=is;exports.AoTemplatesList=Un;exports.TemplateItemTypeEnum=nn;exports.activityFeedStatus=r2;exports.durationTypes=i2;exports.feedFilterTypes=Je;exports.getProjectOverviewRoutes=e9;exports.getTemplateRoutes=Jh;exports.listUpdateTypes=c2;exports.milestoneStatus=Ot;exports.projectOverviewRoutes=oe;exports.ruleComparators=tn;exports.ruleDurationUnits=on;exports.ruleTriggerTypes=an;exports.templateItemType=ee;exports.templateRouteNames=tt;
package/dist/orcha.es.js CHANGED
@@ -10766,7 +10766,7 @@ const Hh = { class: "ao-maping-card-project-phase__header" }, Vh = { class: "ao-
10766
10766
  }, ["stop"])),
10767
10767
  class: "color-picker",
10768
10768
  theme: "light",
10769
- color: h.color,
10769
+ color: p.value,
10770
10770
  "onUpdate:color": m
10771
10771
  }, null, 8, ["color"])
10772
10772
  ], 512)) : O("", !0)
package/dist/orcha.umd.js CHANGED
@@ -3,4 +3,4 @@
3
3
  * vue-color-kit v1.0.6
4
4
  * (c) 2023
5
5
  * @license MIT
6
- */function ot(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Uf(a):/rgb/.test(a)?t=xr(a):typeof a=="string"?t=xr(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:r,b:n,a:s}=t,{h:i,s:l,v:c}=Zf(t);return{r:o,g:r,b:n,a:s===void 0?1:s,h:i,s:l,v:c}}function ao(a){const t=document.createElement("canvas"),o=t.getContext("2d"),r=a*2;return t.width=r,t.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function oo(a,t,o,r,n,s){const i=a==="l",l=t.createLinearGradient(0,0,i?o:0,i?0:r);l.addColorStop(.01,n),l.addColorStop(.99,s),t.fillStyle=l,t.fillRect(0,0,o,r)}function Ff({r:a,g:t,b:o},r){const n=i=>("0"+Number(i).toString(16)).slice(-2),s=`#${n(a)}${n(t)}${n(o)}`;return r?s.toUpperCase():s}function Uf(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function xr(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Zf({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const r=Math.max(a,t,o),n=Math.min(a,t,o),s=r-n;let i=0;r===n?i=0:r===a?t>=o?i=60*(t-o)/s:i=60*(t-o)/s+360:r===t?i=60*(o-a)/s+120:r===o&&(i=60*(a-t)/s+240),i=Math.floor(i);let l=parseFloat((r===0?0:1-n/r).toFixed(2)),c=parseFloat(r.toFixed(2));return{h:i,s:l,v:c}}var ro=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),oo("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),oo("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),r=a.target.getContext("2d"),n=i=>{let l=i.clientX-o,c=i.clientY-t;l<0&&(l=0),c<0&&(c=0),l>this.size&&(l=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:l-5+"px",top:c-5+"px"};const p=r.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,m,u]=p.data;this.$emit("selectSaturation",{r:d,g:m,b:u})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Wf={ref:"canvasSaturation"};function qf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectSaturation&&a.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Wf,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}ro.render=qf,ro.__file="src/color/Saturation.vue";var no=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,r=a.getContext("2d");a.width=t,a.height=o;const n=r.createLinearGradient(0,0,0,o);n.addColorStop(0,"#FF0000"),n.addColorStop(.17*1,"#FF00FF"),n.addColorStop(.17*2,"#0000FF"),n.addColorStop(.17*3,"#00FFFF"),n.addColorStop(.17*4,"#00FF00"),n.addColorStop(.17*5,"#FFFF00"),n.addColorStop(1,"#FF0000"),r.fillStyle=n,r.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),r=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const l=o.getImageData(0,Math.min(i,this.height-1),1,1),[c,p,d]=l.data;this.$emit("selectHue",{r:c,g:p,b:d})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const Yf={ref:"canvasHue"};function Kf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectHue&&a.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",Yf,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}no.render=Kf,no.__file="src/color/Hue.vue";var io=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),oo("p",s,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=n=>{let s=n.clientY-t;s<0&&(s=0),s>this.height&&(s=this.height);let i=parseFloat((s/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(a);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Gf={ref:"canvasAlpha"};function Xf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectAlpha&&a.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",Gf,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}io.render=Xf,io.__file="src/color/Alpha.vue";var so=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),s.fillStyle=this.color,s.fillRect(0,0,t,o)}}});function Qf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}so.render=Qf,so.__file="src/color/Preview.vue";var lo=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:r,left:n,width:s,height:i}=this.suckerCanvas.getBoundingClientRect(),l=t-n,c=o-r,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,s-1),Math.min(c,i-1),1,1);let[m,u,h,y]=d.data;y=parseFloat((y/255).toFixed(2));const b=this.suckerPreview.style;Object.assign(b,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${m}, ${u}, ${h}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?b.display="":b.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:r}=t,{top:n,left:s,width:i,height:l}=a.getBoundingClientRect(),c=o-s,p=r-n,m=a.getContext("2d").getImageData(Math.min(c,i-1),Math.min(p,l-1),1,1);let[u,h,y,b]=m.data;b=parseFloat((b/255).toFixed(2)),this.$emit("selectSucker",{r:u,g:h,b:y,a:b})}))}}});const Jf=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),eh={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},th=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function ah(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>a.openSucker&&a.openSucker(...i))},[Jf],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",eh,[th])):e.createCommentVNode("v-if",!0)])}lo.render=ah,lo.__file="src/color/Sucker.vue";var co=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(s){t("inputColor",s)}}),handleFocus:s=>{t("inputFocus",s)},handleBlur:s=>{t("inputBlur",s)}}}});const oh={class:"color-type"},rh={class:"name"};function nh(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",oh,[e.createVNode("span",rh,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>a.handleFocus&&a.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>a.handleBlur&&a.handleBlur(...i))},null,544),[[e.vModelText,a.modelColor]])])}co.render=nh,co.__file="src/color/Box.vue";var po=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),r=e.ref([]),n=e.ref();a.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),n.value=ao(4).toDataURL(),e.onUnmounted(()=>{s(o.value)});function s(l){if(!l)return;const c=r.value||[],p=c.indexOf(l);p>=0&&c.splice(p,1),c.length>=8&&(c.length=7),c.unshift(l),r.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function i(l){t("selectColor",l)}return{setColorsHistory:s,colorsHistory:r,color:o,imgAlphaBase64:n,selectColor:i}}});const ih={class:"colors"},sh={key:0,class:"colors history"};function lh(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",ih,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",sh,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}po.render=lh,po.__file="src/color/Colors.vue";var rt=e.defineComponent({components:{Saturation:ro,Hue:no,Alpha:io,Preview:so,Sucker:lo,Box:co,Colors:po},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return Ff(this.rgba,!0)}},created(){Object.assign(this,ot(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const ch={class:"color-set"};function dh(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),p=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),m=e.resolveComponent("Box"),u=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",ch,[e.createVNode(i,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(p,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(m,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(u,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}rt.render=dh,rt.__file="src/color/ColorPicker.vue",rt.install=a=>{a.component(rt.name,rt)};const P9="",ph={class:"ao-maping-card-project-phase__header"},uh={class:"ao-card-project-item__title-line"},mh={key:0,class:"ao-card-project-item-phase__estimation"},fh={class:"ao-maping-card-project-phase__footer"},hh={key:0,class:"ao-maping-card-project-phase__footer-row ao-maping-card-project-phase__footer-row--progress"},gh={class:"ao-maping-card-project-phase__subitem"},_h={class:"ao-maping-card-project-phase__subitem"},vh={key:0,class:"ao-maping-card-project-phase__secondary"},Ch={class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--readonly"},bh=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,r=f=>{t("update:title",f)},n=e.computed(()=>{var f;return(f=o.milestones)==null?void 0:f.reduce((g,v)=>{var N;return g+((N=v.activities)==null?void 0:N.reduce((B,V)=>B+(V.estimation||0),0))},0)}),s=e.computed(()=>{var f;return(f=o.milestones)==null?void 0:f.length}),i=e.computed(()=>{var f;return(f=o.milestones)==null?void 0:f.filter(g=>g.status===kt.done).length}),l=e.computed(()=>(i.value||0)/(s.value||1)),c=e.computed({get:()=>o.deadline??"",set:f=>t("update:deadline",f!=null&&f.length?f:null)}),p=e.ref(!1),d=e.ref(o.color?o.color:"#f9f9f9"),m=e.ref(null),u=e.ref(o.color??"#f9f9f9");e.watch(()=>o.color,f=>{f&&f!==u.value&&(u.value=f)});const h=f=>{u.value=f},y=f=>{const g=f.target;g.closest("button")||g.closest("input")||g.closest(".ao-title")||b()},b=async()=>{console.log("Open color picker"),p.value=!0,d.value=u.value,await e.nextTick(),setTimeout(()=>{window.addEventListener("click",_)},0)},_=f=>{const g=f.target;p.value&&m.value&&!m.value.contains(g)&&(console.log("Close color picker"),p.value=!1,window.removeEventListener("click",_),console.log("COLORS:"),console.log(d.value),console.log(u.value),d.value!==u.value&&(console.log("emit update color"),t("updatePhase",{id:o.id,color:u.value})))};return(f,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(ba,{class:"ao-maping-card-project-phase","is-clickable":f.isEditable,onClick:y,style:e.normalizeStyle({backgroundColor:u.value})},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",uh,[e.createVNode(ne,{id:f.id,class:"ao-maping-card-project-phase__title",title:f.name||"",level:4,"is-editable":f.isEditable,"onUpdate:title":r},null,8,["id","title","is-editable"]),n.value?(e.openBlock(),e.createElementBlock("span",mh," ("+e.toDisplayString(n.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",fh,[s.value?(e.openBlock(),e.createElementBlock("div",hh,[e.createElementVNode("div",gh,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",_h,e.toDisplayString(i.value)+" / "+e.toDisplayString(s.value),1)]),e.createVNode(ya,{percentages:l.value,class:"ao-maping-card-project-phase__progress"},null,8,["percentages"]),f.$slots.secondary?(e.openBlock(),e.createElementBlock("div",vh,[e.renderSlot(f.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-maping-card-project-phase__footer-row",c.value?"":"ao-maping-card-project-phase__no_deadline"])},[f.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":g[1]||(g[1]=v=>c.value=v),class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",Ch,e.toDisplayString(e.unref(ra)(f.deadline)),1)],2)])]),_:2},[f.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ph,[e.createVNode(K,{class:"ao-maping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:f.active?f.$t("archive"):f.$t("unarchive"),onClick:g[0]||(g[0]=e.withModifiers(()=>f.active?f.$emit("archivePhase",{id:f.id}):f.$emit("unarchivePhase",{id:f.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","style"]),p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:m},[e.createVNode(e.unref(rt),{onClick:g[2]||(g[2]=e.withModifiers(()=>{},["stop"])),class:"color-picker",theme:"light",color:f.color,"onUpdate:color":h},null,8,["color"])],512)):e.createCommentVNode("",!0)],64))}}),z9="",yh={key:0,class:"ao-project-phase__drag ao-card__drag"},wh={key:1,class:"ao-project-phase__col-phase"},kh={key:2,class:"ao-mapping-project-phase__col-phase"},$h={key:3,class:"ao-project-phase__col-milestones"},Eh={class:"ao-project-phase__milestones"},Bh={class:"ao-project-phase__milestones-list-footer"},Vh=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.phase.milestones,(f,g)=>{Ae(f,g)});const n=f=>{t("updatePhase",{id:o.phase.id,name:f})},s=f=>{t("updatePhase",{id:o.phase.id,deadline:f})},i=f=>{t("updatePhase",f)},l=e.computed(()=>o.phase.milestones.map(f=>h2(f,o.closedStatus))),c=f=>{const{name:g,rank:v}=at(l.value??[],"milestone",r);t("addMilestone",{name:g,rank:v,phaseId:f})},p=f=>{t("updateMilestone",f)},d=f=>{t("archiveMilestone",f)},m=f=>{t("unarchiveMilestone",f)},u=f=>{t("archivePhase",f)},h=f=>{t("unarchivePhase",f)},y=f=>{"added"in f?t("updateMilestone",{id:f.added.element.id,phaseId:o.phase.id,rank:pt(l.value,f.added.newIndex)}):"removed"in f||"moved"in f&&t("updateMilestone",{id:f.moved.element.id,rank:pt(l.value,f.moved.newIndex)})},b=Le.useRoute(),_=e.computed(()=>b.path.includes("/mapping"));return(f,g)=>{var v;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ao-project-phase",{"ao-project-phase--selected":f.phase.id===((v=f.$route.params)==null?void 0:v.phaseId)}])},[f.isEditable?(e.openBlock(),e.createElementBlock("div",yh,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",kh,[e.createVNode(bh,{id:f.phase.id,milestones:l.value,name:f.phase.name,deadline:f.phase.deadline,active:f.phase.active,"is-editable":f.isEditable,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:u,onUnarchivePhase:h,onUpdatePhase:i},null,8,["id","milestones","name","deadline","active","is-editable"])])):(e.openBlock(),e.createElementBlock("div",wh,[e.createVNode(Bf,{id:f.phase.id,milestones:l.value,name:f.phase.name,deadline:f.phase.deadline,active:f.phase.active,"is-editable":f.isEditable,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:u,onUnarchivePhase:h},null,8,["id","milestones","name","deadline","active","is-editable"])])),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",$h,[e.createElementVNode("div",Eh,[e.createVNode(e.unref(je),e.mergeProps({class:"ao-project-phase__milestones-list",list:l.value,disabled:f.readonly||!f.isEditable,"item-key":"id",group:"kanban"},f.$attrs,{onChange:y}),{item:e.withCtx(({element:N})=>{var B;return[e.createVNode(Rf,{id:N.id,name:N.name,color:N.color,activities:N.activities,deadline:N.deadline,active:N.active,"is-editable":!f.readonly&&f.isEditable,"is-draggable":!f.readonly&&f.isEditable,"closed-status":f.closedStatus,"is-selected":N.id===((B=f.$route.params)==null?void 0:B.milestoneId),assignee:N.assignee,important:N.important,readonly:f.readonly,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:V=>!f.readonly&&f.$router.push({name:e.unref(re).milestone,params:{phaseId:f.phase.id,milestoneId:N.id}}),onUpdateMilestone:p,onArchiveMilestone:d,onUnarchiveMilestone:m},null,8,["id","name","color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",Bh,[f.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,label:f.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:g[0]||(g[0]=()=>c(f.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])])]))],2)}}}),H9="",Nh={class:"ao-project__phases"},Sh={key:0,class:"ao-project-phase__phases-list-footer"},xh=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),Mh={class:"ao-project-phase__col-phase"},Ah=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),uo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(u,h)=>{Ae(u,h)});const r=u=>{t("addMilestone",u)},n=u=>{t("updateMilestone",u)},s=u=>{t("archiveMilestone",u)},i=u=>{t("unarchiveMilestone",u)},l=u=>{t("archivePhase",u)},c=u=>{t("unarchivePhase",u)},p=u=>{if(u.moved){const h=Ot(u,o.phases??[]);t("updatePhase",{id:u.moved.element.id,rank:h})}},d=u=>{t("updatePhase",u)},m=u=>{t("addPhase",u)};return(u,h)=>(e.openBlock(),e.createElementBlock("div",Nh,[e.createVNode(e.unref(je),{class:"ao-project-phase__phases-list","model-value":u.phases,"item-key":"id",handle:".ao-card__drag",onChange:p},{item:e.withCtx(({element:y})=>[e.createVNode(Vh,{phase:y,"is-editable":!u.readonly&&u.isEditable,"closed-status":u.closedStatus,users:u.users,readonly:u.readonly,onAddMilestone:r,onUpdateMilestone:n,onArchiveMilestone:s,onUnarchiveMilestone:i,onUpdatePhase:d,onArchivePhase:l,onUnarchivePhase:c},null,8,["phase","is-editable","closed-status","users","readonly"])]),_:1},8,["model-value"]),u.isEditable?(e.openBlock(),e.createElementBlock("div",Sh,[xh,e.createElementVNode("div",Mh,[e.createVNode(Pe,{label:u.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:m},null,8,["label"])]),Ah])):e.createCommentVNode("",!0)]))}}),R9="",Th=["onSubmit"],Oh={class:"ao-add-template-modal__form-body"},Ih={class:"field__row"},Lh={class:"ao-add-template-modal__form-footer"},Mr=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.templates.map(l=>({value:l.id,label:l.name}))),n=e.ref(null),s=l=>{n.value=l},i=()=>{n.value&&t("apply",n.value,o.projectId)};return(l,c)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$t("project.template.apply.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-add-template-modal__form",onSubmit:e.withModifiers(i,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(l.$t("project.template.apply.notice")),1),e.createElementVNode("div",Oh,[e.createElementVNode("div",Ih,[e.createVNode(le,{value:n.value,options:r.value,detached:!0,onChange:s},null,8,["value","options"])])]),e.createElementVNode("footer",Lh,[e.createVNode(K,{label:l.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:i},null,8,["label"])])],40,Th)]),_:1}))}}),F9="",jh=["onSubmit"],Dh={class:"ao-save-template-modal__form-body"},Ph={class:"field__row"},zh={class:"ao-field ao-field--inline"},Hh={class:"ao-field__label"},Rh={class:"ao-save-template-modal__phases"},Fh={class:"ao-field__label"},Uh={class:"ao-save-template-modal__phases-list"},Zh=["value"],Wh={class:"ao-save-template-modal__form-footer"},Ar=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,r=e.ref(""),n=e.ref([]);e.onMounted(()=>{n.value=o.phases.map(i=>i.id)});const s=()=>{r.value&&t("save",r.value,n.value)};return(i,l)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:i.$t("project.template.save.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-save-template-modal__form",onSubmit:e.withModifiers(s,["prevent"])},[e.createElementVNode("div",Dh,[e.createElementVNode("div",Ph,[e.createElementVNode("label",zh,[e.createElementVNode("span",Hh,e.toDisplayString(i.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),type:"text"},null,512),[[e.vModelText,r.value]])])]),e.createElementVNode("div",Rh,[e.createElementVNode("div",Fh,e.toDisplayString(i.$t("project.template.phases.label")),1),e.createElementVNode("div",Uh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,c=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:c.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:c.id,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},null,8,Zh),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]))),128))])])]),e.createElementVNode("footer",Wh,[e.createVNode(K,{label:i.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:s},null,8,["label"])])],40,jh)]),_:1}))}}),U9="",qh=e.defineComponent({props:{modelValue:{type:[String,Number],required:!0},tabs:{type:Array,required:!0}},emits:["update:modelValue"],methods:{selectTab(a){this.$emit("update:modelValue",a)}}}),Z9="",Yh={class:"tabbar-wrapper"},Kh=["onClick"];function Gh(a,t,o,r,n,s){return e.openBlock(),e.createElementBlock("div",Yh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,i=>(e.openBlock(),e.createElementBlock("button",{key:i.value,class:e.normalizeClass(["tab-button",{"tab-button--active":i.value===a.modelValue}]),type:"button",onClick:l=>a.selectTab(i.value)},e.toDisplayString(i.label),11,Kh))),128))])}const mo=O(qh,[["render",Gh],["__scopeId","data-v-ff4e3297"]]),Xh={class:"ao-project"},Qh={class:"ao-project__body"},Jh=e.defineComponent({__name:"AoProjectOverviewProject",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addActivity","update:activity","archiveActivity","copyPhaseToTemplate","unarchiveActivity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=e.computed(()=>o.phases.flatMap($=>$.milestones)),s=()=>{const{name:$,rank:w}=at(o.phases,"phase",r);t("addPhase",{name:$,rank:w,projectId:o.project.id})},i=$=>{t("updatePhase",$)},l=$=>{t("archivePhase",$)},c=$=>{t("unarchivePhase",$)},p=$=>{t("copyPhaseToTemplate",$)},d=$=>{t("addMilestone",$)},m=$=>{t("updateMilestone",$)},u=$=>{t("archiveMilestone",$)},h=$=>{t("unarchiveMilestone",$)},y=$=>{t("addActivity",$)},b=$=>{t("update:activity",$)},_=$=>{t("archiveActivity",$)},f=$=>{t("unarchiveActivity",$)},g=$=>{t("addSubtask",$)},v=$=>{t("updateSubtask",$)},N=$=>{t("deleteSubtask",$)},B=e.computed(()=>n.value.flatMap($=>$.activities)),V=$=>{t("addFiles",$)},I=$=>{t("removeFile",$)},j=$=>{t("addComment",$)},P=$=>{t("updateComment",$)},H=$=>{t("removeComment",$)},F=e.ref(!1),A=e.ref(!1),z=($,w)=>{t("applyTemplate",{templateId:$,projectId:w}),F.value=!1},Y=($,w)=>{var x;const T=(x=o.templates)==null?void 0:x.at(-1),C=T?ie.LexoRank.parse(T.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:$,rank:C.format(),phaseIds:w}),A.value=!1},U=Le.useRouter(),R=e.ref("overview"),E=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(R,$=>{$==="feed"?(U.push({name:re.feed}),console.log("Navigating to feed...")):$==="overview"?(U.push({name:re.project}),console.log("Navigating to feed...")):$==="mapping"&&(U.push({name:re.mapping}),console.log("Navigating to feed..."))}),($,w)=>{const T=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",Xh,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(mo,{tabs:E,modelValue:R.value,"onUpdate:modelValue":w[0]||(w[0]=C=>R.value=C)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":$.showsArchived,onClick:w[1]||(w[1]=C=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:w[2]||(w[2]=C=>A.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:w[3]||(w[3]=C=>F.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Qh,[e.createVNode(uo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,onAddMilestone:d,onUpdateMilestone:m,onArchiveMilestone:u,onUnarchiveMilestone:h,onAddPhase:s,onUpdatePhase:i,onArchivePhase:l,onUnarchivePhase:c,onCopyPhaseToTemplate:p},null,8,["phases","closed-status","is-editable","users"])])]),e.createVNode(T,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,onClose:w[4]||(w[4]=C=>$.$router.push({name:e.unref(re).project})),onUpdateMilestone:m,onAddActivity:y,onUpdateActivity:b,onArchiveActivity:_,onUnarchiveActivity:f},null,8,["phases","project-id","project-name","users","is-editable","closed-status"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(T,{name:"modal",activities:B.value,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,"activity-types":$.activityTypes,phases:$.phases,project:$.project,users:$.users,"user-id":$.userId,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,"onUpdate:activity":b,onAddSubtask:g,onUpdateSubtask:v,onDeleteSubtask:N,onAddFiles:V,onRemoveFile:I,onAddComment:j,onUpdateComment:P,onRemoveComment:H},{default:e.withCtx(({Component:C})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),null,{default:e.withCtx(x=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(x)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[A.value?(e.openBlock(),e.createBlock(Ar,{key:0,phases:$.phases,onClose:w[5]||(w[5]=C=>A.value=!1),onSave:Y},null,8,["phases"])):e.createCommentVNode("",!0),F.value?(e.openBlock(),e.createBlock(Mr,{key:1,"project-id":$.project.id,templates:$.templates,onClose:w[6]||(w[6]=C=>F.value=!1),onApply:z},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}}),W9="",e5={class:"ao-card-feed__header"},t5={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},a5={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},o5={class:"ao-card-feed__body"},r5={key:0,class:"ao-card-feed__breadcrumbs"},n5={class:e.normalizeClass(["ao-card-feed__title-group"])},i5={class:"ao-card-feed__title-line"},s5={key:0,class:"ao-card-feed__slug"},l5={key:1,class:"ao-card-feed__deadline"},c5={class:"ao-card-feed__footer"},d5={class:"ao-card-feed__footer-row"},p5={class:"ao-assignees"},u5={key:0,class:"ao-assignee"},m5={key:0,class:"ao-card-feed__subitems"},f5={key:0,class:"ao-card-feed__subitem"},h5={class:"ao-card-feed__subitem"},g5={key:1,class:"ao-card-feed__subitem"},_5={class:"ao-card-feed__subitem"},v5={class:"ao-card-feed__footer-row"},C5={key:0,class:"ao-card-feed__progress-wrapper"},b5={class:"ao-card-feed__subitem"},y5={class:"ao-card-feed__subitem"},fo=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},projectColor:{},phaseName:{},milestoneName:{},milestoneColor:{},deadline:{},important:{type:Boolean},assignee:{},slug:{},comments:{},attachments:{},tasks:{},isEditable:{type:Boolean},isPrivate:{type:Boolean},isClosed:{type:Boolean},tagType:{}},emits:["removeAssignee","updateActivity"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),n=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),s=h=>{t("updateActivity",{id:o.id,name:h})},i=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),l=e.computed(()=>o.assignee?[o.assignee]:[]),c=e.computed(()=>ra(o.deadline)),p=h=>{t("removeAssignee",h)},d=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.length}),m=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.filter(y=>y.isDone).length}),u=e.computed(()=>(m.value||0)/(d.value||1));return(h,y)=>(e.openBlock(),e.createBlock(ba,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":h.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",e5,[r.value?(e.openBlock(),e.createBlock(wt,{key:0,label:r.value,class:"ao-card-feed__project",variant:"solid",color:h.projectColor?void 0:"primary","raw-color":n.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),h.isPrivate||h.important||h.isClosed?(e.openBlock(),e.createElementBlock("div",t5,[h.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),h.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),h.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.$slots.secondary?(e.openBlock(),e.createElementBlock("div",a5,[e.renderSlot(h.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",o5,[i.value?(e.openBlock(),e.createElementBlock("span",r5,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",n5,[e.createElementVNode("div",i5,[h.slug?(e.openBlock(),e.createElementBlock("span",s5,e.toDisplayString(h.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:h.id,title:h.name,level:5,"is-editable":h.isEditable,"onUpdate:title":s,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),h.deadline?(e.openBlock(),e.createElementBlock("span",l5,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",c5,[e.createElementVNode("div",d5,[e.createElementVNode("ul",p5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,b=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b.id},[b?(e.openBlock(),e.createElementBlock("li",u5,[e.createVNode(ye,{"user-name":e.unref(Jo)(b),"avatar-url":b.avatarUrl,"is-closable":!0,onClose:()=>p(b.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),h.comments||h.attachments?(e.openBlock(),e.createElementBlock("ul",m5,[h.comments?(e.openBlock(),e.createElementBlock("li",f5,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",h5,e.toDisplayString(h.comments),1)])):e.createCommentVNode("",!0),h.attachments?(e.openBlock(),e.createElementBlock("li",g5,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",_5,e.toDisplayString(h.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v5,[h.tasks&&h.tasks.length?(e.openBlock(),e.createElementBlock("div",C5,[e.createElementVNode("div",b5,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",y5,e.toDisplayString(m.value)+" / "+e.toDisplayString(d.value),1)]),e.createVNode(ya,{percentages:u.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}}),q9="",Y9="",w5={props:{color:{type:String,required:!0}},components:{ColorPicker:rt},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:r,a:n}=a.rgba,s=`rgba(${t}, ${o}, ${r}, ${n})`;this.$emit("update:color",s)}}},k5={class:"color-picker-wrapper"};function $5(a,t,o,r,n,s){const i=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",k5,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>s.togglePicker&&s.togglePicker(...l))},null,4),n.showPicker?(e.openBlock(),e.createBlock(i,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:s.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const E5=O(w5,[["render",$5]]),B5={class:"ao-project-milestone"},V5={class:"ao-project-milestone__header"},N5={class:"ao-project-milestone__header_line"},S5={class:"ao-project-milestone__header_line"},x5={class:"ao-project-milestone__title"},M5={key:0,class:"ao-fieldset ao-milestone__fieldset"},A5={class:"ao-field__row ao-milestone__field-row"},T5={class:"ao-field ao-field--inline"},O5={class:"ao-field__row ao-milestone__field-row"},I5={class:"ao-field ao-milestone__field-multiselect"},L5={class:"ao-project-milestone__body"},j5={key:0,class:"ao-project-milestone__footer"},Tr=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.find(v=>v.id===o.phaseId)}),s=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(v=>v.milestones)}),i=e.computed(()=>{var g;return(g=s.value)==null?void 0:g.find(v=>v.id===o.milestoneId)}),l=e.computed(()=>{var g;return(g=i.value)==null?void 0:g.activities});e.watch(l,(g,v)=>{Ae(g,v)});const c=g=>{t("close",g)},p=()=>{const{name:g,rank:v}=at(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:g,rank:v,projectId:o.projectId})},d=g=>{t("updateActivity",g)},m=g=>{l.value&&"moved"in g&&t("updateActivity",{id:g.moved.element.id,rank:pt(l.value,g.moved.newIndex)})},u=e.computed({get:()=>{var g;return(g=i.value)==null?void 0:g.color},set:g=>{i.value&&t("updateMilestone",{id:i.value.id,color:g})}}),h=e.computed({get:()=>{var g;return((g=i==null?void 0:i.value)==null?void 0:g.deadline)??""},set:g=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:g!=null&&g.length?g:null})}}),y=g=>o.closedStatus?La(g,o.closedStatus):!1,b=e.computed(()=>{var g;return((g=o.users)==null?void 0:g.map(v=>({label:`${v.firstName} ${v.lastName}`,value:v.id,avatar:v.avatarUrl})))||[]}),_=e.computed({get(){var g,v;return(v=(g=i.value)==null?void 0:g.assignee)!=null&&v.id?[i.value.assignee.id]:[]},set(g){t("updateMilestone",{id:o.milestoneId,assigneeId:g[0]??null})}}),f=e.computed({get(){var g;return((g=i.value)==null?void 0:g.important)??!1},set(g){t("updateMilestone",{id:o.milestoneId,important:g})}});return(g,v)=>{var N;return e.openBlock(),e.createElementBlock("div",B5,[e.createElementVNode("header",V5,[e.createElementVNode("div",N5,[e.createVNode(K,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",S5,[e.createElementVNode("div",x5,[e.createVNode(ne,{title:((N=i.value)==null?void 0:N.name)||g.milestoneId,level:5},null,8,["title"]),e.createVNode(eo,{modelValue:f.value,"onUpdate:modelValue":v[0]||(v[0]=B=>f.value=B),modelModifiers:{lazy:!0},disabled:!g.isEditable,class:"ao-milestone__important",color:"danger",label:g.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),i.value?(e.openBlock(),e.createElementBlock("div",M5,[e.createElementVNode("div",A5,[e.createElementVNode("label",T5,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":v[1]||(v[1]=B=>h.value=B),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,h.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",O5,[e.createElementVNode("label",I5,[e.createVNode(le,{modelValue:_.value,"onUpdate:modelValue":v[2]||(v[2]=B=>_.value=B),options:b.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:g.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!g.isEditable,caret:g.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(ye,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:I=>V(B,I)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(E5,{color:u.value,"onUpdate:color":v[3]||(v[3]=B=>u.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",L5,[e.createVNode(e.unref(je),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!g.isEditable,"item-key":"id",group:"kanban"},g.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var V,I,j,P,H;return[e.createVNode(fo,{id:B.id,name:B.name||B.id,"phase-name":(V=n.value)==null?void 0:V.name,"milestone-name":(I=i.value)==null?void 0:I.name,"milestone-color":(j=i.value)==null?void 0:j.color,deadline:B.deadline,important:B.important,users:g.users,assignee:B.assignee,slug:B.slug,comments:(P=B.comments)==null?void 0:P.length,attachments:(H=B.attachments)==null?void 0:H.length,tasks:B.tasks,"is-editable":g.isEditable,"is-private":B.private,"is-closed":y(B),onClick:F=>g.$router.push({name:e.unref(re).activity,params:{milestoneId:g.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[g.isEditable?{name:"secondary",fn:e.withCtx(()=>[g.isEditable&&B.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("archive"),onClick:e.withModifiers(()=>g.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),g.isEditable&&!B.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>g.$emit("unarchiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),g.isEditable?(e.openBlock(),e.createElementBlock("div",j5,[e.createVNode(Pe,{"icon-name":"Add",label:g.$t("project.activity.add"),onClick:p},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),K9="",D5=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.find(f=>f.id===o.phaseId)}),n=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(f=>f.milestones)}),s=e.computed(()=>{var _;return(_=n.value)==null?void 0:_.find(f=>f.id===o.milestoneId)}),i=e.computed(()=>{var _;return(_=o.activities)==null?void 0:_.find(f=>f.id===o.activityId)}),l=_=>{t("update:activity",_)},c=_=>{t("addSubtask",_)},p=_=>{t("updateSubtask",_)},d=_=>{t("deleteSubtask",_)},m=_=>{t("addFiles",_)},u=_=>{t("removeFile",_)},h=_=>{t("addComment",_)},y=_=>{t("updateComment",_)},b=_=>{t("removeComment",_)};return(_,f)=>{var g,v;return i.value?(e.openBlock(),e.createBlock(to,{key:0,activity:i.value,"activity-types":_.activityTypes,"milestone-id":_.milestoneId,"template-activities":_.activities,"is-template":!1,users:_.users,"user-id":_.userId,"is-task-checkable":_.isTaskCheckable,statuses:_.statuses,breadcrumbs:`${(g=r.value)==null?void 0:g.name} / ${(v=s.value)==null?void 0:v.name}`,"is-editable":_.isEditable,"attachment-enabled":_.attachmentEnabled,projects:[_.project],onClose:_.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:p,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:u,onAddComment:h,onUpdateComment:y,onRemoveComment:b},{default:e.withCtx(N=>[e.renderSlot(_.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),P5={class:"ao-col-header"},z5=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",P5,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(wt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),G9="";function H5(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function wa(a){return typeof a=="function"?a():e.unref(a)}const R5=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const F5=a=>a!=null,Rt=()=>{};function U5(a,t){function o(...r){return new Promise((n,s)=>{Promise.resolve(a(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(n).catch(s)})}return o}function Z5(a,t={}){let o,r,n=Rt;const s=l=>{clearTimeout(l),n(),n=Rt};return l=>{const c=wa(a),p=wa(t.maxWait);return o&&s(o),c<=0||p!==void 0&&p<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((d,m)=>{n=t.rejectOnCancel?m:d,p&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,d(l())},p)),o=setTimeout(()=>{r&&s(r),r=null,d(l())},c)})}}function W5(a,t=200,o={}){return U5(Z5(t,o),a)}function ho(a){var t;const o=wa(a);return(t=o==null?void 0:o.$el)!=null?t:o}const q5=R5?window:void 0;function Y5(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function K5(a){const t=Y5();return e.computed(()=>(t.value,!!a()))}function G5(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=q5,immediate:l=!0}=o,c=K5(()=>i&&"IntersectionObserver"in i),p=e.computed(()=>{const y=wa(a);return(Array.isArray(y)?y:[y]).map(ho).filter(F5)});let d=Rt;const m=e.ref(l),u=c.value?e.watch(()=>[p.value,ho(r),m.value],([y,b])=>{if(d(),!m.value||!y.length)return;const _=new IntersectionObserver(t,{root:ho(b),rootMargin:n,threshold:s});y.forEach(f=>f&&_.observe(f)),d=()=>{_.disconnect(),d=Rt}},{immediate:l,flush:"post"}):Rt,h=()=>{d(),u(),m.value=!1};return H5(h),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:h}}const X5={class:e.normalizeClass(["ao-list-kanban"])},Q5={class:"ao-list-kanban__header"},J5={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},e7={key:1,class:"ao-list-kanban__end"},t7={key:0,class:"ao-list-kanban__no-more"},a7={key:1,class:"ao-list-kanban__divider"},o7={key:1,class:"ao-list-kanban__footer"},r7=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null);G5(n,([{isIntersecting:d}])=>{r.value=d}),e.watch(r,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const s=d=>{var m;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((m=d.assignee)==null?void 0:m.id):!1},i=d=>{t("selectActivity",d)},l=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:pt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:pt(o.list,d.moved.newIndex)})},p=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",X5,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var u;return[e.createElementVNode("div",Q5,[d.title?(e.openBlock(),e.createBlock(z5,{key:0,title:d.title,level:3,items:(u=d.list)==null?void 0:u.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(je),e.mergeProps({class:["ao-list-kanban__list",p.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:m[0]||(m[0]=u=>p.value=!0),onEnd:m[1]||(m[1]=u=>p.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:u})=>{var h,y,b,_,f,g,v,N,B;return[e.createVNode(fo,{class:e.normalizeClass(s(u)?"ao-list-draggable":""),id:u.id,name:u.name,"project-name":(h=u.project)==null?void 0:h.name,"project-color":(y=u.project)==null?void 0:y.color,"phase-name":(_=(b=u.milestone)==null?void 0:b.phase)==null?void 0:_.name,"milestone-name":(f=u.milestone)==null?void 0:f.name,"milestone-color":(g=u.milestone)==null?void 0:g.color,deadline:u.deadline,rules:((v=u.rules)==null?void 0:v.length)||0,tasks:u.tasks,description:u.description,important:u.important,type:u.type,comments:(N=u.comments)==null?void 0:N.length,attachments:(B=u.attachments)==null?void 0:B.length,users:d.users,assignee:u.assignee,slug:u.slug,"is-editable":s(u),"is-private":u.private,"tag-type":d.tagType,onUpdateActivity:[V=>s(u)&&l(V),()=>s(u)&&l],onClick:()=>i(u.id),onRemoveAssignee:()=>s(u)&&l({id:u.id,assigneeId:null})},{secondary:e.withCtx(()=>[s(u)&&u.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:u.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),s(u)&&!u.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:u.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",J5,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:n,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",e7,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",t7,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",a7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",o7,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:m[2]||(m[2]=u=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),X9="",n7={class:"ao-field ao-search-field"},i7=["value","placeholder","onKeypress"],s7=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,r=async i=>{const c=i.target.value;t("update:modelValue",c,i)},n=W5(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",n7,[e.createElementVNode("input",{value:i.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:i.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(n)&&e.unref(n)(...c)),onKeypress:e.withKeys(r,["enter"])},null,40,i7),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${i.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(K,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${i.modelValue?"ao-search-field__action--visible":""}`),onClick:s},null,8,["class"])]))}}),Q9="",l7={class:"ao-feed"},c7={class:"ao-feed__filters"},d7={class:"ao-feed__body"},Or=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},showsOnlyNonAssigned:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","update:showsOnlyNonAssigned","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","toast"],setup(a,{emit:t}){const o=a,{t:r}=We();function n(w,T){t("toast",w,T)}const s=e.toRef(o,"activities"),i=async(w,T)=>{await t("selectActivity",w,T)},l=e.ref({}),c=e.ref(!1),p=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([w,T,C,x],[q,Z])=>{l.value=Object.fromEntries(w.map(L=>[L.id,T.filter(S=>{var D;return((D=S.status)==null?void 0:D.id)===L.id})])),C&&!c.value?(i(C,null),c.value=!0):x&&!c.value&&(i(null,x),c.value=!0),p.value&&Ae(T,Z)},{immediate:!0});const m=e.computed(()=>{var w;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((w=o.selectedActivity.milestone.phase)==null?void 0:w.name)??""} / ${o.selectedActivity.milestone.name??""}`}),u=w=>{var Z,L;const T=(Z=o.activities)==null?void 0:Z.at(-1),C=T?ie.LexoRank.parse(T.rank).genNext():ie.LexoRank.middle(),x=((L=o.activities)==null?void 0:L.length)??0,q={name:r("activity.defaultName",{idx:x+1}),rank:C.format(),statusId:w.id};o.filters.assigneeId.length>0&&(q.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(q.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(q.typeId=o.filters.typeId[0]),p.value=!0,t("addActivity",q)},h=(w,T)=>{p.value=!1,t("update:filters",{...o.filters,[w]:T})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),b=e.computed(()=>y.value.map(w=>({value:w.id,label:w.name}))),_=e.computed(()=>{var w;return(w=o.activityTypes)==null?void 0:w.map(T=>({value:T.id,label:T.name}))}),f=e.computed(()=>o.users.map(w=>({value:w.id,label:`${w.firstName} ${w.lastName}`,avatar:w.avatarUrl}))),g=w=>{o.selectedActivity&&t("update:activity",w)},v=w=>{t("update:activity",w)},N=w=>{t("archiveActivity",w)},B=w=>{t("unarchiveActivity",w)},V=w=>{p.value=!1,t("update:searchText",w)},I=w=>{p.value=!1,t("clear:searchText",w)},j=w=>{o.selectedActivity&&t("addSubtask",w)},P=w=>{o.selectedActivity&&t("updateSubtask",w)},H=w=>{o.selectedActivity&&t("deleteSubtask",w)},F=w=>{t("addFiles",w)},A=w=>{t("removeFile",w)},z=w=>{o.selectedActivity&&t("addComment",{...w,activityId:o.selectedActivity.id})},Y=w=>{const{id:T}=o.selectedActivity||{};T&&t("updateComment",w)},U=w=>{const{id:T}=o.selectedActivity||{};T&&t("removeComment",w)},R=Le.useRouter(),E=e.ref("feed"),$=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(E,w=>{w==="feed"?(R.push({name:re.feed}),console.log("Navigating to feed...")):w==="overview"?(R.push({name:re.project}),console.log("Navigating to feed...")):w==="mapping"&&(R.push({name:re.mapping}),console.log("Navigating to feed..."))}),(w,T)=>{var C;return e.openBlock(),e.createElementBlock("div",l7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createElementVNode("div",c7,[e.createVNode(mo,{tabs:$,modelValue:E.value,"onUpdate:modelValue":T[0]||(T[0]=x=>E.value=x)},null,8,["modelValue"]),e.createVNode(s7,{"model-value":w.searchText,placeholder:w.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":V,onClear:I},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(le,{key:0,"model-value":w.filters[e.unref(Xe).project],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:w.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":T[1]||(T[1]=x=>h(e.unref(Xe).project,x))},null,8,["model-value","options","placeholder"])),_.value?(e.openBlock(),e.createBlock(le,{key:1,"model-value":w.filters[e.unref(Xe).type],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:w.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":T[2]||(T[2]=x=>h(e.unref(Xe).type,x))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),f.value.length?(e.openBlock(),e.createBlock(le,{key:2,"model-value":w.filters[e.unref(Xe).assignee],mode:"tags",options:f.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:w.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":T[3]||(T[3]=x=>h(e.unref(Xe).assignee,x))},{tag:e.withCtx(({option:x,handleTagRemove:q})=>[e.createVNode(ye,{"user-name":x.label,"avatar-url":x.avatar,"is-closable":!0,onClose:Z=>q(x,Z)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(K,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":w.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:w.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":w.showsOnlyNonAssigned,onClick:T[4]||(T[4]=x=>w.$emit("update:showsOnlyNonAssigned",!w.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__only-important",size:"sm","icon-name":w.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:w.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":w.showsOnlyImportant,onClick:T[5]||(T[5]=x=>w.$emit("update:showsOnlyImportant",!w.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":w.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:w.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":w.showsArchivedActivities,onClick:T[6]||(T[6]=x=>w.$emit("update:showsArchivedActivities",!w.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",d7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.statuses,x=>(e.openBlock(),e.createBlock(r7,{key:x.id,status:x,list:l.value[x.id],title:x.name,"footer-label":w.$t("feed.activity.add"),users:w.users,"user-id":w.userId,"is-editable":w.isEditable,tagType:d.value,onAdd:()=>u(x),onSelectActivity:i,onArchiveActivity:N,onUnarchiveActivity:B,onUpdateActivity:v},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[w.selectedActivity?(e.openBlock(),e.createBlock(to,{key:0,activity:w.selectedActivity,"activity-types":w.activityTypes,"milestone-id":(C=w.selectedActivity.milestone)==null?void 0:C.id,"template-activities":s.value,users:w.users,"user-id":w.userId,"is-task-checkable":w.isTaskCheckable,statuses:w.statuses,breadcrumbs:m.value,"is-editable":w.isEditable,"attachment-enabled":w.attachmentEnabled,projects:y.value,onClose:T[7]||(T[7]=()=>i(null,null)),"onUpdate:activity":g,onAddSubtask:j,onUpdateSubtask:P,onDeleteSubtask:H,onAddFiles:F,onRemoveFile:A,onAddComment:z,onUpdateComment:Y,onRemoveComment:U,onToast:n},{default:e.withCtx(x=>[e.renderSlot(w.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(x)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}}),J9="",p7={class:"ao-project-mapping"},u7={class:"ao-project-mapping-mapping__body"},m7={class:"ao-project-mapping-mapping__phases"},f7={key:0,class:"ao-project-mapping-mapping__image-wrapper"},h7=["src","alt"],g7=e.defineComponent({__name:"AoMapping",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","copyPhaseToTemplate","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=()=>{const{name:_,rank:f}=at(o.phases,"phase",r);t("addPhase",{name:_,rank:f,projectId:o.project.id})},s=_=>{t("updatePhase",_)},i=_=>{t("archivePhase",_)},l=_=>{t("unarchivePhase",_)},c=_=>{t("copyPhaseToTemplate",_)},p=e.ref(!1),d=e.ref(!1),m=(_,f)=>{t("applyTemplate",{templateId:_,projectId:f}),p.value=!1},u=(_,f)=>{var N;const g=(N=o.templates)==null?void 0:N.at(-1),v=g?ie.LexoRank.parse(g.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:_,rank:v.format(),phaseIds:f}),d.value=!1},h=Le.useRouter(),y=e.ref("mapping"),b=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(y,_=>{_==="feed"?(h.push({name:re.feed}),console.log("Navigating to feed...")):_==="overview"?(h.push({name:re.project}),console.log("Navigating to feed...")):_==="mapping"&&(h.push({name:re.mapping}),console.log("Navigating to feed..."))}),(_,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},_.$attrs),[e.createElementVNode("div",p7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(mo,{tabs:b,modelValue:y.value,"onUpdate:modelValue":f[0]||(f[0]=g=>y.value=g)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":_.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:_.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":_.showsArchived,onClick:f[1]||(f[1]=g=>_.$emit("update:showsArchived",!_.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[_.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:_.$t("project.template.save.label"),onClick:f[2]||(f[2]=g=>d.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),_.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:_.$t("project.template.apply.label"),onClick:f[3]||(f[3]=g=>p.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",u7,[e.createElementVNode("div",m7,[e.createVNode(uo,{phases:_.phases,"closed-status":_.closedStatus,"is-editable":_.isEditable===!0,users:_.users,onAddPhase:n,onUpdatePhase:s,onArchivePhase:i,onUnarchivePhase:l,onCopyPhaseToTemplate:c},null,8,["phases","closed-status","is-editable","users"])]),_.project.architectureImage?(e.openBlock(),e.createElementBlock("div",f7,[e.createElementVNode("img",{class:"architecture-image",src:_.project.architectureImage.url,alt:e.unref(r)("architectureImage.alt")},null,8,h7)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createBlock(Ar,{key:0,phases:_.phases,onClose:f[4]||(f[4]=g=>d.value=!1),onSave:u},null,8,["phases"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(Mr,{key:1,"project-id":_.project.id,templates:_.templates,onClose:f[5]||(f[5]=g=>p.value=!1),onApply:m},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}}),e4="",nt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},_7=(a,t={})=>[{path:a,name:nt.TEMPLATES,redirect:{name:nt.TEMPLATES_LIST},...t,children:[{path:"",name:nt.TEMPLATES_LIST,component:Ir},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:nt.TEMPLATE_DETAILS,component:Sr,props:!0}]}],re={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},v7=(a,t={})=>[{path:a,...t,redirect:{name:re.project},children:[{path:"",name:re.project,component:Jh,props:!0,children:[{path:":phaseId/:milestoneId",name:re.milestone,component:Tr,props:!0},{path:":phaseId/:milestoneId/:activityId",name:re.activity,props:{default:!0,modal:!0},components:{default:Tr,modal:D5}}]},{path:"feed",name:re.feed,component:Or,props:!0},{path:"mapping",name:re.mapping,component:g7,props:!0}]}],C7={class:"ao-templates"},Ir=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.templates,(c,p)=>{Ae(c,p)});const n=()=>{var u,h;const c=(u=o.templates)==null?void 0:u.at(-1),p=c?ie.LexoRank.parse(c.rank).genNext():ie.LexoRank.middle(),d=((h=o.templates)==null?void 0:h.length)??0,m={name:r("template.defaultName.template",{idx:d+1}),rank:p.format()};t("addTemplate",m)},s=(c,p)=>{t("updateItem",{itemType:ee.TEMPLATES,id:c,templateId:c,data:{name:p}})},i=(c,p)=>{t("removeItem",{itemType:ee.TEMPLATES,templateId:c,data:{id:c,...p?{name:p}:{}}})},l=c=>{if(c.moved){const p=Ot(c,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:c.moved.element.id,templateId:c.moved.element.id,data:{rank:p}})}};return(c,p)=>(e.openBlock(),e.createElementBlock("div",C7,[e.createVNode(It,null,{secondary:e.withCtx(()=>[e.createVNode(K,{label:c.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(je),{"model-value":c.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:l},{item:e.withCtx(({element:d})=>{var m;return[e.createVNode(P2,{id:d.id,title:d.name,phases:d.phases,milestones:(m=d.phases)!=null&&m.length?e.unref(p2)(d.phases):0,activities:d.phases?e.unref(u2)(d.phases):0,"updated-at":d.updatedAt,"updated-by":d.updatedBy,onUpdateTitle:u=>s(d.id,u),onClick:u=>c.$router.push({name:e.unref(nt).TEMPLATE_DETAILS,params:{templateId:d.id}}),onDeleteItem:p[0]||(p[0]=(u,h)=>i(u,h))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),t4="",b7={class:"ao-field__label"},Lr=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",b7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),y7=["type","value","disabled","readonly"],w7=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.modelModifiers.lazy?"change":"input"),n=s=>{o.modelModifiers.number&&(s=Number(s)),t("update:modelValue",s)};return(s,i)=>(e.openBlock(),e.createBlock(Lr,{label:s.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:s.type,value:s.modelValue,disabled:s.isDisabled,readonly:s.isReadonly},{[e.toHandlerKey(r.value)]:i[0]||(i[0]=l=>n(l.target.value))}),null,16,y7)]),_:1},8,["label"]))}}),k7={class:"ao-field"},$7={class:"ao-field__label"},E7=["checked","disabled"],B7=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",k7,[e.createElementVNode("span",$7,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=r=>{var n;return t.$emit("update:modelValue",((n=r.target)==null?void 0:n.checked)??!1)})},null,40,E7)]))}});X.AoAvatar=ye,X.AoCardFeed=fo,X.AoCheckboxField=B7,X.AoFeed=Or,X.AoField=Lr,X.AoInputField=w7,X.AoMultiselect=le,X.AoProjectPhases=uo,X.AoTemplateDetails=Sr,X.AoTemplates=Ur,X.AoTemplatesList=Ir,X.TemplateItemTypeEnum=Mo,X.activityFeedStatus=Vd,X.durationTypes=Bd,X.feedFilterTypes=Xe,X.getProjectOverviewRoutes=v7,X.getTemplateRoutes=_7,X.listUpdateTypes=Nd,X.milestoneStatus=kt,X.projectOverviewRoutes=re,X.ruleComparators=No,X.ruleDurationUnits=xo,X.ruleTriggerTypes=So,X.templateItemType=ee,X.templateRouteNames=nt,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
6
+ */function ot(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Uf(a):/rgb/.test(a)?t=xr(a):typeof a=="string"?t=xr(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:r,b:n,a:s}=t,{h:i,s:l,v:c}=Zf(t);return{r:o,g:r,b:n,a:s===void 0?1:s,h:i,s:l,v:c}}function ao(a){const t=document.createElement("canvas"),o=t.getContext("2d"),r=a*2;return t.width=r,t.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function oo(a,t,o,r,n,s){const i=a==="l",l=t.createLinearGradient(0,0,i?o:0,i?0:r);l.addColorStop(.01,n),l.addColorStop(.99,s),t.fillStyle=l,t.fillRect(0,0,o,r)}function Ff({r:a,g:t,b:o},r){const n=i=>("0"+Number(i).toString(16)).slice(-2),s=`#${n(a)}${n(t)}${n(o)}`;return r?s.toUpperCase():s}function Uf(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function xr(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Zf({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const r=Math.max(a,t,o),n=Math.min(a,t,o),s=r-n;let i=0;r===n?i=0:r===a?t>=o?i=60*(t-o)/s:i=60*(t-o)/s+360:r===t?i=60*(o-a)/s+120:r===o&&(i=60*(a-t)/s+240),i=Math.floor(i);let l=parseFloat((r===0?0:1-n/r).toFixed(2)),c=parseFloat(r.toFixed(2));return{h:i,s:l,v:c}}var ro=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),oo("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),oo("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),r=a.target.getContext("2d"),n=i=>{let l=i.clientX-o,c=i.clientY-t;l<0&&(l=0),c<0&&(c=0),l>this.size&&(l=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:l-5+"px",top:c-5+"px"};const p=r.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,m,u]=p.data;this.$emit("selectSaturation",{r:d,g:m,b:u})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Wf={ref:"canvasSaturation"};function qf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectSaturation&&a.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Wf,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}ro.render=qf,ro.__file="src/color/Saturation.vue";var no=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,r=a.getContext("2d");a.width=t,a.height=o;const n=r.createLinearGradient(0,0,0,o);n.addColorStop(0,"#FF0000"),n.addColorStop(.17*1,"#FF00FF"),n.addColorStop(.17*2,"#0000FF"),n.addColorStop(.17*3,"#00FFFF"),n.addColorStop(.17*4,"#00FF00"),n.addColorStop(.17*5,"#FFFF00"),n.addColorStop(1,"#FF0000"),r.fillStyle=n,r.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),r=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const l=o.getImageData(0,Math.min(i,this.height-1),1,1),[c,p,d]=l.data;this.$emit("selectHue",{r:c,g:p,b:d})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const Yf={ref:"canvasHue"};function Kf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectHue&&a.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",Yf,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}no.render=Kf,no.__file="src/color/Hue.vue";var io=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),oo("p",s,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=n=>{let s=n.clientY-t;s<0&&(s=0),s>this.height&&(s=this.height);let i=parseFloat((s/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(a);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Gf={ref:"canvasAlpha"};function Xf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectAlpha&&a.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",Gf,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}io.render=Xf,io.__file="src/color/Alpha.vue";var so=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,r=this.alphaSize,n=ao(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),s.fillStyle=this.color,s.fillRect(0,0,t,o)}}});function Qf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}so.render=Qf,so.__file="src/color/Preview.vue";var lo=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:r,left:n,width:s,height:i}=this.suckerCanvas.getBoundingClientRect(),l=t-n,c=o-r,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,s-1),Math.min(c,i-1),1,1);let[m,u,h,y]=d.data;y=parseFloat((y/255).toFixed(2));const b=this.suckerPreview.style;Object.assign(b,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${m}, ${u}, ${h}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?b.display="":b.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:r}=t,{top:n,left:s,width:i,height:l}=a.getBoundingClientRect(),c=o-s,p=r-n,m=a.getContext("2d").getImageData(Math.min(c,i-1),Math.min(p,l-1),1,1);let[u,h,y,b]=m.data;b=parseFloat((b/255).toFixed(2)),this.$emit("selectSucker",{r:u,g:h,b:y,a:b})}))}}});const Jf=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),eh={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},th=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function ah(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>a.openSucker&&a.openSucker(...i))},[Jf],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",eh,[th])):e.createCommentVNode("v-if",!0)])}lo.render=ah,lo.__file="src/color/Sucker.vue";var co=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(s){t("inputColor",s)}}),handleFocus:s=>{t("inputFocus",s)},handleBlur:s=>{t("inputBlur",s)}}}});const oh={class:"color-type"},rh={class:"name"};function nh(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",oh,[e.createVNode("span",rh,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>a.handleFocus&&a.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>a.handleBlur&&a.handleBlur(...i))},null,544),[[e.vModelText,a.modelColor]])])}co.render=nh,co.__file="src/color/Box.vue";var po=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),r=e.ref([]),n=e.ref();a.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),n.value=ao(4).toDataURL(),e.onUnmounted(()=>{s(o.value)});function s(l){if(!l)return;const c=r.value||[],p=c.indexOf(l);p>=0&&c.splice(p,1),c.length>=8&&(c.length=7),c.unshift(l),r.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function i(l){t("selectColor",l)}return{setColorsHistory:s,colorsHistory:r,color:o,imgAlphaBase64:n,selectColor:i}}});const ih={class:"colors"},sh={key:0,class:"colors history"};function lh(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",ih,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",sh,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}po.render=lh,po.__file="src/color/Colors.vue";var rt=e.defineComponent({components:{Saturation:ro,Hue:no,Alpha:io,Preview:so,Sucker:lo,Box:co,Colors:po},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return Ff(this.rgba,!0)}},created(){Object.assign(this,ot(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const ch={class:"color-set"};function dh(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),p=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),m=e.resolveComponent("Box"),u=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",ch,[e.createVNode(i,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(p,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(d,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(m,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(u,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}rt.render=dh,rt.__file="src/color/ColorPicker.vue",rt.install=a=>{a.component(rt.name,rt)};const P9="",ph={class:"ao-maping-card-project-phase__header"},uh={class:"ao-card-project-item__title-line"},mh={key:0,class:"ao-card-project-item-phase__estimation"},fh={class:"ao-maping-card-project-phase__footer"},hh={key:0,class:"ao-maping-card-project-phase__footer-row ao-maping-card-project-phase__footer-row--progress"},gh={class:"ao-maping-card-project-phase__subitem"},_h={class:"ao-maping-card-project-phase__subitem"},vh={key:0,class:"ao-maping-card-project-phase__secondary"},Ch={class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--readonly"},bh=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,r=f=>{t("update:title",f)},n=e.computed(()=>{var f;return(f=o.milestones)==null?void 0:f.reduce((g,v)=>{var N;return g+((N=v.activities)==null?void 0:N.reduce((B,V)=>B+(V.estimation||0),0))},0)}),s=e.computed(()=>{var f;return(f=o.milestones)==null?void 0:f.length}),i=e.computed(()=>{var f;return(f=o.milestones)==null?void 0:f.filter(g=>g.status===kt.done).length}),l=e.computed(()=>(i.value||0)/(s.value||1)),c=e.computed({get:()=>o.deadline??"",set:f=>t("update:deadline",f!=null&&f.length?f:null)}),p=e.ref(!1),d=e.ref(o.color?o.color:"#f9f9f9"),m=e.ref(null),u=e.ref(o.color??"#f9f9f9");e.watch(()=>o.color,f=>{f&&f!==u.value&&(u.value=f)});const h=f=>{u.value=f},y=f=>{const g=f.target;g.closest("button")||g.closest("input")||g.closest(".ao-title")||b()},b=async()=>{console.log("Open color picker"),p.value=!0,d.value=u.value,await e.nextTick(),setTimeout(()=>{window.addEventListener("click",_)},0)},_=f=>{const g=f.target;p.value&&m.value&&!m.value.contains(g)&&(console.log("Close color picker"),p.value=!1,window.removeEventListener("click",_),console.log("COLORS:"),console.log(d.value),console.log(u.value),d.value!==u.value&&(console.log("emit update color"),t("updatePhase",{id:o.id,color:u.value})))};return(f,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(ba,{class:"ao-maping-card-project-phase","is-clickable":f.isEditable,onClick:y,style:e.normalizeStyle({backgroundColor:u.value})},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",uh,[e.createVNode(ne,{id:f.id,class:"ao-maping-card-project-phase__title",title:f.name||"",level:4,"is-editable":f.isEditable,"onUpdate:title":r},null,8,["id","title","is-editable"]),n.value?(e.openBlock(),e.createElementBlock("span",mh," ("+e.toDisplayString(n.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",fh,[s.value?(e.openBlock(),e.createElementBlock("div",hh,[e.createElementVNode("div",gh,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",_h,e.toDisplayString(i.value)+" / "+e.toDisplayString(s.value),1)]),e.createVNode(ya,{percentages:l.value,class:"ao-maping-card-project-phase__progress"},null,8,["percentages"]),f.$slots.secondary?(e.openBlock(),e.createElementBlock("div",vh,[e.renderSlot(f.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-maping-card-project-phase__footer-row",c.value?"":"ao-maping-card-project-phase__no_deadline"])},[f.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":g[1]||(g[1]=v=>c.value=v),class:"ao-maping-card-project-phase__deadline ao-maping-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",Ch,e.toDisplayString(e.unref(ra)(f.deadline)),1)],2)])]),_:2},[f.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ph,[e.createVNode(K,{class:"ao-maping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:f.active?f.$t("archive"):f.$t("unarchive"),onClick:g[0]||(g[0]=e.withModifiers(()=>f.active?f.$emit("archivePhase",{id:f.id}):f.$emit("unarchivePhase",{id:f.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","style"]),p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:m},[e.createVNode(e.unref(rt),{onClick:g[2]||(g[2]=e.withModifiers(()=>{},["stop"])),class:"color-picker",theme:"light",color:u.value,"onUpdate:color":h},null,8,["color"])],512)):e.createCommentVNode("",!0)],64))}}),z9="",yh={key:0,class:"ao-project-phase__drag ao-card__drag"},wh={key:1,class:"ao-project-phase__col-phase"},kh={key:2,class:"ao-mapping-project-phase__col-phase"},$h={key:3,class:"ao-project-phase__col-milestones"},Eh={class:"ao-project-phase__milestones"},Bh={class:"ao-project-phase__milestones-list-footer"},Vh=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.phase.milestones,(f,g)=>{Ae(f,g)});const n=f=>{t("updatePhase",{id:o.phase.id,name:f})},s=f=>{t("updatePhase",{id:o.phase.id,deadline:f})},i=f=>{t("updatePhase",f)},l=e.computed(()=>o.phase.milestones.map(f=>h2(f,o.closedStatus))),c=f=>{const{name:g,rank:v}=at(l.value??[],"milestone",r);t("addMilestone",{name:g,rank:v,phaseId:f})},p=f=>{t("updateMilestone",f)},d=f=>{t("archiveMilestone",f)},m=f=>{t("unarchiveMilestone",f)},u=f=>{t("archivePhase",f)},h=f=>{t("unarchivePhase",f)},y=f=>{"added"in f?t("updateMilestone",{id:f.added.element.id,phaseId:o.phase.id,rank:pt(l.value,f.added.newIndex)}):"removed"in f||"moved"in f&&t("updateMilestone",{id:f.moved.element.id,rank:pt(l.value,f.moved.newIndex)})},b=Le.useRoute(),_=e.computed(()=>b.path.includes("/mapping"));return(f,g)=>{var v;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["ao-project-phase",{"ao-project-phase--selected":f.phase.id===((v=f.$route.params)==null?void 0:v.phaseId)}])},[f.isEditable?(e.openBlock(),e.createElementBlock("div",yh,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",kh,[e.createVNode(bh,{id:f.phase.id,milestones:l.value,name:f.phase.name,deadline:f.phase.deadline,active:f.phase.active,"is-editable":f.isEditable,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:u,onUnarchivePhase:h,onUpdatePhase:i},null,8,["id","milestones","name","deadline","active","is-editable"])])):(e.openBlock(),e.createElementBlock("div",wh,[e.createVNode(Bf,{id:f.phase.id,milestones:l.value,name:f.phase.name,deadline:f.phase.deadline,active:f.phase.active,"is-editable":f.isEditable,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:u,onUnarchivePhase:h},null,8,["id","milestones","name","deadline","active","is-editable"])])),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",$h,[e.createElementVNode("div",Eh,[e.createVNode(e.unref(je),e.mergeProps({class:"ao-project-phase__milestones-list",list:l.value,disabled:f.readonly||!f.isEditable,"item-key":"id",group:"kanban"},f.$attrs,{onChange:y}),{item:e.withCtx(({element:N})=>{var B;return[e.createVNode(Rf,{id:N.id,name:N.name,color:N.color,activities:N.activities,deadline:N.deadline,active:N.active,"is-editable":!f.readonly&&f.isEditable,"is-draggable":!f.readonly&&f.isEditable,"closed-status":f.closedStatus,"is-selected":N.id===((B=f.$route.params)==null?void 0:B.milestoneId),assignee:N.assignee,important:N.important,readonly:f.readonly,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:V=>!f.readonly&&f.$router.push({name:e.unref(re).milestone,params:{phaseId:f.phase.id,milestoneId:N.id}}),onUpdateMilestone:p,onArchiveMilestone:d,onUnarchiveMilestone:m},null,8,["id","name","color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",Bh,[f.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,label:f.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:g[0]||(g[0]=()=>c(f.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])])]))],2)}}}),H9="",Nh={class:"ao-project__phases"},Sh={key:0,class:"ao-project-phase__phases-list-footer"},xh=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),Mh={class:"ao-project-phase__col-phase"},Ah=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),uo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(u,h)=>{Ae(u,h)});const r=u=>{t("addMilestone",u)},n=u=>{t("updateMilestone",u)},s=u=>{t("archiveMilestone",u)},i=u=>{t("unarchiveMilestone",u)},l=u=>{t("archivePhase",u)},c=u=>{t("unarchivePhase",u)},p=u=>{if(u.moved){const h=Ot(u,o.phases??[]);t("updatePhase",{id:u.moved.element.id,rank:h})}},d=u=>{t("updatePhase",u)},m=u=>{t("addPhase",u)};return(u,h)=>(e.openBlock(),e.createElementBlock("div",Nh,[e.createVNode(e.unref(je),{class:"ao-project-phase__phases-list","model-value":u.phases,"item-key":"id",handle:".ao-card__drag",onChange:p},{item:e.withCtx(({element:y})=>[e.createVNode(Vh,{phase:y,"is-editable":!u.readonly&&u.isEditable,"closed-status":u.closedStatus,users:u.users,readonly:u.readonly,onAddMilestone:r,onUpdateMilestone:n,onArchiveMilestone:s,onUnarchiveMilestone:i,onUpdatePhase:d,onArchivePhase:l,onUnarchivePhase:c},null,8,["phase","is-editable","closed-status","users","readonly"])]),_:1},8,["model-value"]),u.isEditable?(e.openBlock(),e.createElementBlock("div",Sh,[xh,e.createElementVNode("div",Mh,[e.createVNode(Pe,{label:u.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:m},null,8,["label"])]),Ah])):e.createCommentVNode("",!0)]))}}),R9="",Th=["onSubmit"],Oh={class:"ao-add-template-modal__form-body"},Ih={class:"field__row"},Lh={class:"ao-add-template-modal__form-footer"},Mr=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.templates.map(l=>({value:l.id,label:l.name}))),n=e.ref(null),s=l=>{n.value=l},i=()=>{n.value&&t("apply",n.value,o.projectId)};return(l,c)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$t("project.template.apply.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-add-template-modal__form",onSubmit:e.withModifiers(i,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(l.$t("project.template.apply.notice")),1),e.createElementVNode("div",Oh,[e.createElementVNode("div",Ih,[e.createVNode(le,{value:n.value,options:r.value,detached:!0,onChange:s},null,8,["value","options"])])]),e.createElementVNode("footer",Lh,[e.createVNode(K,{label:l.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:i},null,8,["label"])])],40,Th)]),_:1}))}}),F9="",jh=["onSubmit"],Dh={class:"ao-save-template-modal__form-body"},Ph={class:"field__row"},zh={class:"ao-field ao-field--inline"},Hh={class:"ao-field__label"},Rh={class:"ao-save-template-modal__phases"},Fh={class:"ao-field__label"},Uh={class:"ao-save-template-modal__phases-list"},Zh=["value"],Wh={class:"ao-save-template-modal__form-footer"},Ar=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,r=e.ref(""),n=e.ref([]);e.onMounted(()=>{n.value=o.phases.map(i=>i.id)});const s=()=>{r.value&&t("save",r.value,n.value)};return(i,l)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:i.$t("project.template.save.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-save-template-modal__form",onSubmit:e.withModifiers(s,["prevent"])},[e.createElementVNode("div",Dh,[e.createElementVNode("div",Ph,[e.createElementVNode("label",zh,[e.createElementVNode("span",Hh,e.toDisplayString(i.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>r.value=c),type:"text"},null,512),[[e.vModelText,r.value]])])]),e.createElementVNode("div",Rh,[e.createElementVNode("div",Fh,e.toDisplayString(i.$t("project.template.phases.label")),1),e.createElementVNode("div",Uh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,c=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:c.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:c.id,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},null,8,Zh),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]))),128))])])]),e.createElementVNode("footer",Wh,[e.createVNode(K,{label:i.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:s},null,8,["label"])])],40,jh)]),_:1}))}}),U9="",qh=e.defineComponent({props:{modelValue:{type:[String,Number],required:!0},tabs:{type:Array,required:!0}},emits:["update:modelValue"],methods:{selectTab(a){this.$emit("update:modelValue",a)}}}),Z9="",Yh={class:"tabbar-wrapper"},Kh=["onClick"];function Gh(a,t,o,r,n,s){return e.openBlock(),e.createElementBlock("div",Yh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,i=>(e.openBlock(),e.createElementBlock("button",{key:i.value,class:e.normalizeClass(["tab-button",{"tab-button--active":i.value===a.modelValue}]),type:"button",onClick:l=>a.selectTab(i.value)},e.toDisplayString(i.label),11,Kh))),128))])}const mo=O(qh,[["render",Gh],["__scopeId","data-v-ff4e3297"]]),Xh={class:"ao-project"},Qh={class:"ao-project__body"},Jh=e.defineComponent({__name:"AoProjectOverviewProject",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addActivity","update:activity","archiveActivity","copyPhaseToTemplate","unarchiveActivity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=e.computed(()=>o.phases.flatMap($=>$.milestones)),s=()=>{const{name:$,rank:w}=at(o.phases,"phase",r);t("addPhase",{name:$,rank:w,projectId:o.project.id})},i=$=>{t("updatePhase",$)},l=$=>{t("archivePhase",$)},c=$=>{t("unarchivePhase",$)},p=$=>{t("copyPhaseToTemplate",$)},d=$=>{t("addMilestone",$)},m=$=>{t("updateMilestone",$)},u=$=>{t("archiveMilestone",$)},h=$=>{t("unarchiveMilestone",$)},y=$=>{t("addActivity",$)},b=$=>{t("update:activity",$)},_=$=>{t("archiveActivity",$)},f=$=>{t("unarchiveActivity",$)},g=$=>{t("addSubtask",$)},v=$=>{t("updateSubtask",$)},N=$=>{t("deleteSubtask",$)},B=e.computed(()=>n.value.flatMap($=>$.activities)),V=$=>{t("addFiles",$)},I=$=>{t("removeFile",$)},j=$=>{t("addComment",$)},P=$=>{t("updateComment",$)},H=$=>{t("removeComment",$)},F=e.ref(!1),A=e.ref(!1),z=($,w)=>{t("applyTemplate",{templateId:$,projectId:w}),F.value=!1},Y=($,w)=>{var x;const T=(x=o.templates)==null?void 0:x.at(-1),C=T?ie.LexoRank.parse(T.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:$,rank:C.format(),phaseIds:w}),A.value=!1},U=Le.useRouter(),R=e.ref("overview"),E=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(R,$=>{$==="feed"?(U.push({name:re.feed}),console.log("Navigating to feed...")):$==="overview"?(U.push({name:re.project}),console.log("Navigating to feed...")):$==="mapping"&&(U.push({name:re.mapping}),console.log("Navigating to feed..."))}),($,w)=>{const T=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",Xh,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(mo,{tabs:E,modelValue:R.value,"onUpdate:modelValue":w[0]||(w[0]=C=>R.value=C)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":$.showsArchived,onClick:w[1]||(w[1]=C=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:w[2]||(w[2]=C=>A.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:w[3]||(w[3]=C=>F.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Qh,[e.createVNode(uo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,onAddMilestone:d,onUpdateMilestone:m,onArchiveMilestone:u,onUnarchiveMilestone:h,onAddPhase:s,onUpdatePhase:i,onArchivePhase:l,onUnarchivePhase:c,onCopyPhaseToTemplate:p},null,8,["phases","closed-status","is-editable","users"])])]),e.createVNode(T,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,onClose:w[4]||(w[4]=C=>$.$router.push({name:e.unref(re).project})),onUpdateMilestone:m,onAddActivity:y,onUpdateActivity:b,onArchiveActivity:_,onUnarchiveActivity:f},null,8,["phases","project-id","project-name","users","is-editable","closed-status"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(T,{name:"modal",activities:B.value,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,"activity-types":$.activityTypes,phases:$.phases,project:$.project,users:$.users,"user-id":$.userId,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,"onUpdate:activity":b,onAddSubtask:g,onUpdateSubtask:v,onDeleteSubtask:N,onAddFiles:V,onRemoveFile:I,onAddComment:j,onUpdateComment:P,onRemoveComment:H},{default:e.withCtx(({Component:C})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C),null,{default:e.withCtx(x=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(x)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[A.value?(e.openBlock(),e.createBlock(Ar,{key:0,phases:$.phases,onClose:w[5]||(w[5]=C=>A.value=!1),onSave:Y},null,8,["phases"])):e.createCommentVNode("",!0),F.value?(e.openBlock(),e.createBlock(Mr,{key:1,"project-id":$.project.id,templates:$.templates,onClose:w[6]||(w[6]=C=>F.value=!1),onApply:z},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}}),W9="",e5={class:"ao-card-feed__header"},t5={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},a5={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},o5={class:"ao-card-feed__body"},r5={key:0,class:"ao-card-feed__breadcrumbs"},n5={class:e.normalizeClass(["ao-card-feed__title-group"])},i5={class:"ao-card-feed__title-line"},s5={key:0,class:"ao-card-feed__slug"},l5={key:1,class:"ao-card-feed__deadline"},c5={class:"ao-card-feed__footer"},d5={class:"ao-card-feed__footer-row"},p5={class:"ao-assignees"},u5={key:0,class:"ao-assignee"},m5={key:0,class:"ao-card-feed__subitems"},f5={key:0,class:"ao-card-feed__subitem"},h5={class:"ao-card-feed__subitem"},g5={key:1,class:"ao-card-feed__subitem"},_5={class:"ao-card-feed__subitem"},v5={class:"ao-card-feed__footer-row"},C5={key:0,class:"ao-card-feed__progress-wrapper"},b5={class:"ao-card-feed__subitem"},y5={class:"ao-card-feed__subitem"},fo=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},projectColor:{},phaseName:{},milestoneName:{},milestoneColor:{},deadline:{},important:{type:Boolean},assignee:{},slug:{},comments:{},attachments:{},tasks:{},isEditable:{type:Boolean},isPrivate:{type:Boolean},isClosed:{type:Boolean},tagType:{}},emits:["removeAssignee","updateActivity"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),n=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),s=h=>{t("updateActivity",{id:o.id,name:h})},i=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),l=e.computed(()=>o.assignee?[o.assignee]:[]),c=e.computed(()=>ra(o.deadline)),p=h=>{t("removeAssignee",h)},d=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.length}),m=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.filter(y=>y.isDone).length}),u=e.computed(()=>(m.value||0)/(d.value||1));return(h,y)=>(e.openBlock(),e.createBlock(ba,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":h.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",e5,[r.value?(e.openBlock(),e.createBlock(wt,{key:0,label:r.value,class:"ao-card-feed__project",variant:"solid",color:h.projectColor?void 0:"primary","raw-color":n.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),h.isPrivate||h.important||h.isClosed?(e.openBlock(),e.createElementBlock("div",t5,[h.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),h.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),h.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.$slots.secondary?(e.openBlock(),e.createElementBlock("div",a5,[e.renderSlot(h.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",o5,[i.value?(e.openBlock(),e.createElementBlock("span",r5,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",n5,[e.createElementVNode("div",i5,[h.slug?(e.openBlock(),e.createElementBlock("span",s5,e.toDisplayString(h.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:h.id,title:h.name,level:5,"is-editable":h.isEditable,"onUpdate:title":s,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),h.deadline?(e.openBlock(),e.createElementBlock("span",l5,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",c5,[e.createElementVNode("div",d5,[e.createElementVNode("ul",p5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,b=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:b.id},[b?(e.openBlock(),e.createElementBlock("li",u5,[e.createVNode(ye,{"user-name":e.unref(Jo)(b),"avatar-url":b.avatarUrl,"is-closable":!0,onClose:()=>p(b.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),h.comments||h.attachments?(e.openBlock(),e.createElementBlock("ul",m5,[h.comments?(e.openBlock(),e.createElementBlock("li",f5,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",h5,e.toDisplayString(h.comments),1)])):e.createCommentVNode("",!0),h.attachments?(e.openBlock(),e.createElementBlock("li",g5,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",_5,e.toDisplayString(h.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",v5,[h.tasks&&h.tasks.length?(e.openBlock(),e.createElementBlock("div",C5,[e.createElementVNode("div",b5,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",y5,e.toDisplayString(m.value)+" / "+e.toDisplayString(d.value),1)]),e.createVNode(ya,{percentages:u.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}}),q9="",Y9="",w5={props:{color:{type:String,required:!0}},components:{ColorPicker:rt},data(){return{showPicker:!1}},methods:{togglePicker(){this.showPicker=!this.showPicker},changeColor(a){const{r:t,g:o,b:r,a:n}=a.rgba,s=`rgba(${t}, ${o}, ${r}, ${n})`;this.$emit("update:color",s)}}},k5={class:"color-picker-wrapper"};function $5(a,t,o,r,n,s){const i=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",k5,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>s.togglePicker&&s.togglePicker(...l))},null,4),n.showPicker?(e.openBlock(),e.createBlock(i,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:s.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const E5=O(w5,[["render",$5]]),B5={class:"ao-project-milestone"},V5={class:"ao-project-milestone__header"},N5={class:"ao-project-milestone__header_line"},S5={class:"ao-project-milestone__header_line"},x5={class:"ao-project-milestone__title"},M5={key:0,class:"ao-fieldset ao-milestone__fieldset"},A5={class:"ao-field__row ao-milestone__field-row"},T5={class:"ao-field ao-field--inline"},O5={class:"ao-field__row ao-milestone__field-row"},I5={class:"ao-field ao-milestone__field-multiselect"},L5={class:"ao-project-milestone__body"},j5={key:0,class:"ao-project-milestone__footer"},Tr=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.find(v=>v.id===o.phaseId)}),s=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(v=>v.milestones)}),i=e.computed(()=>{var g;return(g=s.value)==null?void 0:g.find(v=>v.id===o.milestoneId)}),l=e.computed(()=>{var g;return(g=i.value)==null?void 0:g.activities});e.watch(l,(g,v)=>{Ae(g,v)});const c=g=>{t("close",g)},p=()=>{const{name:g,rank:v}=at(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:g,rank:v,projectId:o.projectId})},d=g=>{t("updateActivity",g)},m=g=>{l.value&&"moved"in g&&t("updateActivity",{id:g.moved.element.id,rank:pt(l.value,g.moved.newIndex)})},u=e.computed({get:()=>{var g;return(g=i.value)==null?void 0:g.color},set:g=>{i.value&&t("updateMilestone",{id:i.value.id,color:g})}}),h=e.computed({get:()=>{var g;return((g=i==null?void 0:i.value)==null?void 0:g.deadline)??""},set:g=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:g!=null&&g.length?g:null})}}),y=g=>o.closedStatus?La(g,o.closedStatus):!1,b=e.computed(()=>{var g;return((g=o.users)==null?void 0:g.map(v=>({label:`${v.firstName} ${v.lastName}`,value:v.id,avatar:v.avatarUrl})))||[]}),_=e.computed({get(){var g,v;return(v=(g=i.value)==null?void 0:g.assignee)!=null&&v.id?[i.value.assignee.id]:[]},set(g){t("updateMilestone",{id:o.milestoneId,assigneeId:g[0]??null})}}),f=e.computed({get(){var g;return((g=i.value)==null?void 0:g.important)??!1},set(g){t("updateMilestone",{id:o.milestoneId,important:g})}});return(g,v)=>{var N;return e.openBlock(),e.createElementBlock("div",B5,[e.createElementVNode("header",V5,[e.createElementVNode("div",N5,[e.createVNode(K,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",S5,[e.createElementVNode("div",x5,[e.createVNode(ne,{title:((N=i.value)==null?void 0:N.name)||g.milestoneId,level:5},null,8,["title"]),e.createVNode(eo,{modelValue:f.value,"onUpdate:modelValue":v[0]||(v[0]=B=>f.value=B),modelModifiers:{lazy:!0},disabled:!g.isEditable,class:"ao-milestone__important",color:"danger",label:g.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),i.value?(e.openBlock(),e.createElementBlock("div",M5,[e.createElementVNode("div",A5,[e.createElementVNode("label",T5,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":v[1]||(v[1]=B=>h.value=B),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,h.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",O5,[e.createElementVNode("label",I5,[e.createVNode(le,{modelValue:_.value,"onUpdate:modelValue":v[2]||(v[2]=B=>_.value=B),options:b.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:g.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!g.isEditable,caret:g.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:V})=>[e.createVNode(ye,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:I=>V(B,I)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(E5,{color:u.value,"onUpdate:color":v[3]||(v[3]=B=>u.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",L5,[e.createVNode(e.unref(je),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!g.isEditable,"item-key":"id",group:"kanban"},g.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var V,I,j,P,H;return[e.createVNode(fo,{id:B.id,name:B.name||B.id,"phase-name":(V=n.value)==null?void 0:V.name,"milestone-name":(I=i.value)==null?void 0:I.name,"milestone-color":(j=i.value)==null?void 0:j.color,deadline:B.deadline,important:B.important,users:g.users,assignee:B.assignee,slug:B.slug,comments:(P=B.comments)==null?void 0:P.length,attachments:(H=B.attachments)==null?void 0:H.length,tasks:B.tasks,"is-editable":g.isEditable,"is-private":B.private,"is-closed":y(B),onClick:F=>g.$router.push({name:e.unref(re).activity,params:{milestoneId:g.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[g.isEditable?{name:"secondary",fn:e.withCtx(()=>[g.isEditable&&B.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("archive"),onClick:e.withModifiers(()=>g.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),g.isEditable&&!B.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:g.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>g.$emit("unarchiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),g.isEditable?(e.openBlock(),e.createElementBlock("div",j5,[e.createVNode(Pe,{"icon-name":"Add",label:g.$t("project.activity.add"),onClick:p},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),K9="",D5=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.find(f=>f.id===o.phaseId)}),n=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(f=>f.milestones)}),s=e.computed(()=>{var _;return(_=n.value)==null?void 0:_.find(f=>f.id===o.milestoneId)}),i=e.computed(()=>{var _;return(_=o.activities)==null?void 0:_.find(f=>f.id===o.activityId)}),l=_=>{t("update:activity",_)},c=_=>{t("addSubtask",_)},p=_=>{t("updateSubtask",_)},d=_=>{t("deleteSubtask",_)},m=_=>{t("addFiles",_)},u=_=>{t("removeFile",_)},h=_=>{t("addComment",_)},y=_=>{t("updateComment",_)},b=_=>{t("removeComment",_)};return(_,f)=>{var g,v;return i.value?(e.openBlock(),e.createBlock(to,{key:0,activity:i.value,"activity-types":_.activityTypes,"milestone-id":_.milestoneId,"template-activities":_.activities,"is-template":!1,users:_.users,"user-id":_.userId,"is-task-checkable":_.isTaskCheckable,statuses:_.statuses,breadcrumbs:`${(g=r.value)==null?void 0:g.name} / ${(v=s.value)==null?void 0:v.name}`,"is-editable":_.isEditable,"attachment-enabled":_.attachmentEnabled,projects:[_.project],onClose:_.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:p,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:u,onAddComment:h,onUpdateComment:y,onRemoveComment:b},{default:e.withCtx(N=>[e.renderSlot(_.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),P5={class:"ao-col-header"},z5=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",P5,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(wt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),G9="";function H5(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function wa(a){return typeof a=="function"?a():e.unref(a)}const R5=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const F5=a=>a!=null,Rt=()=>{};function U5(a,t){function o(...r){return new Promise((n,s)=>{Promise.resolve(a(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(n).catch(s)})}return o}function Z5(a,t={}){let o,r,n=Rt;const s=l=>{clearTimeout(l),n(),n=Rt};return l=>{const c=wa(a),p=wa(t.maxWait);return o&&s(o),c<=0||p!==void 0&&p<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((d,m)=>{n=t.rejectOnCancel?m:d,p&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,d(l())},p)),o=setTimeout(()=>{r&&s(r),r=null,d(l())},c)})}}function W5(a,t=200,o={}){return U5(Z5(t,o),a)}function ho(a){var t;const o=wa(a);return(t=o==null?void 0:o.$el)!=null?t:o}const q5=R5?window:void 0;function Y5(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function K5(a){const t=Y5();return e.computed(()=>(t.value,!!a()))}function G5(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=q5,immediate:l=!0}=o,c=K5(()=>i&&"IntersectionObserver"in i),p=e.computed(()=>{const y=wa(a);return(Array.isArray(y)?y:[y]).map(ho).filter(F5)});let d=Rt;const m=e.ref(l),u=c.value?e.watch(()=>[p.value,ho(r),m.value],([y,b])=>{if(d(),!m.value||!y.length)return;const _=new IntersectionObserver(t,{root:ho(b),rootMargin:n,threshold:s});y.forEach(f=>f&&_.observe(f)),d=()=>{_.disconnect(),d=Rt}},{immediate:l,flush:"post"}):Rt,h=()=>{d(),u(),m.value=!1};return H5(h),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:h}}const X5={class:e.normalizeClass(["ao-list-kanban"])},Q5={class:"ao-list-kanban__header"},J5={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},e7={key:1,class:"ao-list-kanban__end"},t7={key:0,class:"ao-list-kanban__no-more"},a7={key:1,class:"ao-list-kanban__divider"},o7={key:1,class:"ao-list-kanban__footer"},r7=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null);G5(n,([{isIntersecting:d}])=>{r.value=d}),e.watch(r,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const s=d=>{var m;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((m=d.assignee)==null?void 0:m.id):!1},i=d=>{t("selectActivity",d)},l=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:pt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:pt(o.list,d.moved.newIndex)})},p=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",X5,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var u;return[e.createElementVNode("div",Q5,[d.title?(e.openBlock(),e.createBlock(z5,{key:0,title:d.title,level:3,items:(u=d.list)==null?void 0:u.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(je),e.mergeProps({class:["ao-list-kanban__list",p.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:m[0]||(m[0]=u=>p.value=!0),onEnd:m[1]||(m[1]=u=>p.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:u})=>{var h,y,b,_,f,g,v,N,B;return[e.createVNode(fo,{class:e.normalizeClass(s(u)?"ao-list-draggable":""),id:u.id,name:u.name,"project-name":(h=u.project)==null?void 0:h.name,"project-color":(y=u.project)==null?void 0:y.color,"phase-name":(_=(b=u.milestone)==null?void 0:b.phase)==null?void 0:_.name,"milestone-name":(f=u.milestone)==null?void 0:f.name,"milestone-color":(g=u.milestone)==null?void 0:g.color,deadline:u.deadline,rules:((v=u.rules)==null?void 0:v.length)||0,tasks:u.tasks,description:u.description,important:u.important,type:u.type,comments:(N=u.comments)==null?void 0:N.length,attachments:(B=u.attachments)==null?void 0:B.length,users:d.users,assignee:u.assignee,slug:u.slug,"is-editable":s(u),"is-private":u.private,"tag-type":d.tagType,onUpdateActivity:[V=>s(u)&&l(V),()=>s(u)&&l],onClick:()=>i(u.id),onRemoveAssignee:()=>s(u)&&l({id:u.id,assigneeId:null})},{secondary:e.withCtx(()=>[s(u)&&u.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:u.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),s(u)&&!u.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:u.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",J5,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:n,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",e7,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",t7,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",a7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",o7,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:m[2]||(m[2]=u=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),X9="",n7={class:"ao-field ao-search-field"},i7=["value","placeholder","onKeypress"],s7=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,r=async i=>{const c=i.target.value;t("update:modelValue",c,i)},n=W5(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",n7,[e.createElementVNode("input",{value:i.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:i.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(n)&&e.unref(n)(...c)),onKeypress:e.withKeys(r,["enter"])},null,40,i7),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${i.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(K,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${i.modelValue?"ao-search-field__action--visible":""}`),onClick:s},null,8,["class"])]))}}),Q9="",l7={class:"ao-feed"},c7={class:"ao-feed__filters"},d7={class:"ao-feed__body"},Or=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},showsOnlyNonAssigned:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","update:showsOnlyNonAssigned","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","toast"],setup(a,{emit:t}){const o=a,{t:r}=We();function n(w,T){t("toast",w,T)}const s=e.toRef(o,"activities"),i=async(w,T)=>{await t("selectActivity",w,T)},l=e.ref({}),c=e.ref(!1),p=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([w,T,C,x],[q,Z])=>{l.value=Object.fromEntries(w.map(L=>[L.id,T.filter(S=>{var D;return((D=S.status)==null?void 0:D.id)===L.id})])),C&&!c.value?(i(C,null),c.value=!0):x&&!c.value&&(i(null,x),c.value=!0),p.value&&Ae(T,Z)},{immediate:!0});const m=e.computed(()=>{var w;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((w=o.selectedActivity.milestone.phase)==null?void 0:w.name)??""} / ${o.selectedActivity.milestone.name??""}`}),u=w=>{var Z,L;const T=(Z=o.activities)==null?void 0:Z.at(-1),C=T?ie.LexoRank.parse(T.rank).genNext():ie.LexoRank.middle(),x=((L=o.activities)==null?void 0:L.length)??0,q={name:r("activity.defaultName",{idx:x+1}),rank:C.format(),statusId:w.id};o.filters.assigneeId.length>0&&(q.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(q.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(q.typeId=o.filters.typeId[0]),p.value=!0,t("addActivity",q)},h=(w,T)=>{p.value=!1,t("update:filters",{...o.filters,[w]:T})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),b=e.computed(()=>y.value.map(w=>({value:w.id,label:w.name}))),_=e.computed(()=>{var w;return(w=o.activityTypes)==null?void 0:w.map(T=>({value:T.id,label:T.name}))}),f=e.computed(()=>o.users.map(w=>({value:w.id,label:`${w.firstName} ${w.lastName}`,avatar:w.avatarUrl}))),g=w=>{o.selectedActivity&&t("update:activity",w)},v=w=>{t("update:activity",w)},N=w=>{t("archiveActivity",w)},B=w=>{t("unarchiveActivity",w)},V=w=>{p.value=!1,t("update:searchText",w)},I=w=>{p.value=!1,t("clear:searchText",w)},j=w=>{o.selectedActivity&&t("addSubtask",w)},P=w=>{o.selectedActivity&&t("updateSubtask",w)},H=w=>{o.selectedActivity&&t("deleteSubtask",w)},F=w=>{t("addFiles",w)},A=w=>{t("removeFile",w)},z=w=>{o.selectedActivity&&t("addComment",{...w,activityId:o.selectedActivity.id})},Y=w=>{const{id:T}=o.selectedActivity||{};T&&t("updateComment",w)},U=w=>{const{id:T}=o.selectedActivity||{};T&&t("removeComment",w)},R=Le.useRouter(),E=e.ref("feed"),$=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(E,w=>{w==="feed"?(R.push({name:re.feed}),console.log("Navigating to feed...")):w==="overview"?(R.push({name:re.project}),console.log("Navigating to feed...")):w==="mapping"&&(R.push({name:re.mapping}),console.log("Navigating to feed..."))}),(w,T)=>{var C;return e.openBlock(),e.createElementBlock("div",l7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createElementVNode("div",c7,[e.createVNode(mo,{tabs:$,modelValue:E.value,"onUpdate:modelValue":T[0]||(T[0]=x=>E.value=x)},null,8,["modelValue"]),e.createVNode(s7,{"model-value":w.searchText,placeholder:w.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":V,onClear:I},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(le,{key:0,"model-value":w.filters[e.unref(Xe).project],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:w.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":T[1]||(T[1]=x=>h(e.unref(Xe).project,x))},null,8,["model-value","options","placeholder"])),_.value?(e.openBlock(),e.createBlock(le,{key:1,"model-value":w.filters[e.unref(Xe).type],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:w.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":T[2]||(T[2]=x=>h(e.unref(Xe).type,x))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),f.value.length?(e.openBlock(),e.createBlock(le,{key:2,"model-value":w.filters[e.unref(Xe).assignee],mode:"tags",options:f.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:w.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":T[3]||(T[3]=x=>h(e.unref(Xe).assignee,x))},{tag:e.withCtx(({option:x,handleTagRemove:q})=>[e.createVNode(ye,{"user-name":x.label,"avatar-url":x.avatar,"is-closable":!0,onClose:Z=>q(x,Z)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(K,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":w.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:w.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":w.showsOnlyNonAssigned,onClick:T[4]||(T[4]=x=>w.$emit("update:showsOnlyNonAssigned",!w.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__only-important",size:"sm","icon-name":w.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:w.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":w.showsOnlyImportant,onClick:T[5]||(T[5]=x=>w.$emit("update:showsOnlyImportant",!w.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":w.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:w.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":w.showsArchivedActivities,onClick:T[6]||(T[6]=x=>w.$emit("update:showsArchivedActivities",!w.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",d7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.statuses,x=>(e.openBlock(),e.createBlock(r7,{key:x.id,status:x,list:l.value[x.id],title:x.name,"footer-label":w.$t("feed.activity.add"),users:w.users,"user-id":w.userId,"is-editable":w.isEditable,tagType:d.value,onAdd:()=>u(x),onSelectActivity:i,onArchiveActivity:N,onUnarchiveActivity:B,onUpdateActivity:v},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[w.selectedActivity?(e.openBlock(),e.createBlock(to,{key:0,activity:w.selectedActivity,"activity-types":w.activityTypes,"milestone-id":(C=w.selectedActivity.milestone)==null?void 0:C.id,"template-activities":s.value,users:w.users,"user-id":w.userId,"is-task-checkable":w.isTaskCheckable,statuses:w.statuses,breadcrumbs:m.value,"is-editable":w.isEditable,"attachment-enabled":w.attachmentEnabled,projects:y.value,onClose:T[7]||(T[7]=()=>i(null,null)),"onUpdate:activity":g,onAddSubtask:j,onUpdateSubtask:P,onDeleteSubtask:H,onAddFiles:F,onRemoveFile:A,onAddComment:z,onUpdateComment:Y,onRemoveComment:U,onToast:n},{default:e.withCtx(x=>[e.renderSlot(w.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(x)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}}),J9="",p7={class:"ao-project-mapping"},u7={class:"ao-project-mapping-mapping__body"},m7={class:"ao-project-mapping-mapping__phases"},f7={key:0,class:"ao-project-mapping-mapping__image-wrapper"},h7=["src","alt"],g7=e.defineComponent({__name:"AoMapping",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","copyPhaseToTemplate","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=()=>{const{name:_,rank:f}=at(o.phases,"phase",r);t("addPhase",{name:_,rank:f,projectId:o.project.id})},s=_=>{t("updatePhase",_)},i=_=>{t("archivePhase",_)},l=_=>{t("unarchivePhase",_)},c=_=>{t("copyPhaseToTemplate",_)},p=e.ref(!1),d=e.ref(!1),m=(_,f)=>{t("applyTemplate",{templateId:_,projectId:f}),p.value=!1},u=(_,f)=>{var N;const g=(N=o.templates)==null?void 0:N.at(-1),v=g?ie.LexoRank.parse(g.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:_,rank:v.format(),phaseIds:f}),d.value=!1},h=Le.useRouter(),y=e.ref("mapping"),b=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(y,_=>{_==="feed"?(h.push({name:re.feed}),console.log("Navigating to feed...")):_==="overview"?(h.push({name:re.project}),console.log("Navigating to feed...")):_==="mapping"&&(h.push({name:re.mapping}),console.log("Navigating to feed..."))}),(_,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},_.$attrs),[e.createElementVNode("div",p7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(mo,{tabs:b,modelValue:y.value,"onUpdate:modelValue":f[0]||(f[0]=g=>y.value=g)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":_.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:_.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":_.showsArchived,onClick:f[1]||(f[1]=g=>_.$emit("update:showsArchived",!_.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[_.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:_.$t("project.template.save.label"),onClick:f[2]||(f[2]=g=>d.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),_.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:_.$t("project.template.apply.label"),onClick:f[3]||(f[3]=g=>p.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",u7,[e.createElementVNode("div",m7,[e.createVNode(uo,{phases:_.phases,"closed-status":_.closedStatus,"is-editable":_.isEditable===!0,users:_.users,onAddPhase:n,onUpdatePhase:s,onArchivePhase:i,onUnarchivePhase:l,onCopyPhaseToTemplate:c},null,8,["phases","closed-status","is-editable","users"])]),_.project.architectureImage?(e.openBlock(),e.createElementBlock("div",f7,[e.createElementVNode("img",{class:"architecture-image",src:_.project.architectureImage.url,alt:e.unref(r)("architectureImage.alt")},null,8,h7)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createBlock(Ar,{key:0,phases:_.phases,onClose:f[4]||(f[4]=g=>d.value=!1),onSave:u},null,8,["phases"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(Mr,{key:1,"project-id":_.project.id,templates:_.templates,onClose:f[5]||(f[5]=g=>p.value=!1),onApply:m},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}}),e4="",nt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},_7=(a,t={})=>[{path:a,name:nt.TEMPLATES,redirect:{name:nt.TEMPLATES_LIST},...t,children:[{path:"",name:nt.TEMPLATES_LIST,component:Ir},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:nt.TEMPLATE_DETAILS,component:Sr,props:!0}]}],re={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},v7=(a,t={})=>[{path:a,...t,redirect:{name:re.project},children:[{path:"",name:re.project,component:Jh,props:!0,children:[{path:":phaseId/:milestoneId",name:re.milestone,component:Tr,props:!0},{path:":phaseId/:milestoneId/:activityId",name:re.activity,props:{default:!0,modal:!0},components:{default:Tr,modal:D5}}]},{path:"feed",name:re.feed,component:Or,props:!0},{path:"mapping",name:re.mapping,component:g7,props:!0}]}],C7={class:"ao-templates"},Ir=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.templates,(c,p)=>{Ae(c,p)});const n=()=>{var u,h;const c=(u=o.templates)==null?void 0:u.at(-1),p=c?ie.LexoRank.parse(c.rank).genNext():ie.LexoRank.middle(),d=((h=o.templates)==null?void 0:h.length)??0,m={name:r("template.defaultName.template",{idx:d+1}),rank:p.format()};t("addTemplate",m)},s=(c,p)=>{t("updateItem",{itemType:ee.TEMPLATES,id:c,templateId:c,data:{name:p}})},i=(c,p)=>{t("removeItem",{itemType:ee.TEMPLATES,templateId:c,data:{id:c,...p?{name:p}:{}}})},l=c=>{if(c.moved){const p=Ot(c,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:c.moved.element.id,templateId:c.moved.element.id,data:{rank:p}})}};return(c,p)=>(e.openBlock(),e.createElementBlock("div",C7,[e.createVNode(It,null,{secondary:e.withCtx(()=>[e.createVNode(K,{label:c.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(je),{"model-value":c.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:l},{item:e.withCtx(({element:d})=>{var m;return[e.createVNode(P2,{id:d.id,title:d.name,phases:d.phases,milestones:(m=d.phases)!=null&&m.length?e.unref(p2)(d.phases):0,activities:d.phases?e.unref(u2)(d.phases):0,"updated-at":d.updatedAt,"updated-by":d.updatedBy,onUpdateTitle:u=>s(d.id,u),onClick:u=>c.$router.push({name:e.unref(nt).TEMPLATE_DETAILS,params:{templateId:d.id}}),onDeleteItem:p[0]||(p[0]=(u,h)=>i(u,h))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),t4="",b7={class:"ao-field__label"},Lr=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",b7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),y7=["type","value","disabled","readonly"],w7=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.modelModifiers.lazy?"change":"input"),n=s=>{o.modelModifiers.number&&(s=Number(s)),t("update:modelValue",s)};return(s,i)=>(e.openBlock(),e.createBlock(Lr,{label:s.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:s.type,value:s.modelValue,disabled:s.isDisabled,readonly:s.isReadonly},{[e.toHandlerKey(r.value)]:i[0]||(i[0]=l=>n(l.target.value))}),null,16,y7)]),_:1},8,["label"]))}}),k7={class:"ao-field"},$7={class:"ao-field__label"},E7=["checked","disabled"],B7=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",k7,[e.createElementVNode("span",$7,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=r=>{var n;return t.$emit("update:modelValue",((n=r.target)==null?void 0:n.checked)??!1)})},null,40,E7)]))}});X.AoAvatar=ye,X.AoCardFeed=fo,X.AoCheckboxField=B7,X.AoFeed=Or,X.AoField=Lr,X.AoInputField=w7,X.AoMultiselect=le,X.AoProjectPhases=uo,X.AoTemplateDetails=Sr,X.AoTemplates=Ur,X.AoTemplatesList=Ir,X.TemplateItemTypeEnum=Mo,X.activityFeedStatus=Vd,X.durationTypes=Bd,X.feedFilterTypes=Xe,X.getProjectOverviewRoutes=v7,X.getTemplateRoutes=_7,X.listUpdateTypes=Nd,X.milestoneStatus=kt,X.projectOverviewRoutes=re,X.ruleComparators=No,X.ruleDurationUnits=xo,X.ruleTriggerTypes=So,X.templateItemType=ee,X.templateRouteNames=nt,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "license": "CC-BY-NC-ND-4.0",
6
6
  "author": "26lights <dev@26lights.com> (https://www.26lights.com)",
7
- "version": "0.41.50",
7
+ "version": "0.41.51",
8
8
  "workspaces": [
9
9
  "packages/*"
10
10
  ],
@@ -27,7 +27,7 @@
27
27
  "vuedraggable": "~4.1.0"
28
28
  },
29
29
  "dependencies": {
30
- "@26lights/orcha": "^0.41.50",
30
+ "@26lights/orcha": "^0.41.51",
31
31
  "@floating-ui/dom": "^1.5.3",
32
32
  "@vueform/multiselect": "^2.6.6",
33
33
  "@vueuse/core": "^10.8.0",