@26lights/orcha 0.37.33 → 0.37.34

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 Xe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=rv(a):/rgb/.test(a)?t=Wo(a):typeof a=="string"?t=Wo(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:i}=t,{h:r,s:l,v:c}=iv(t);return{r:o,g:n,b:s,a:i===void 0?1:i,h:r,s:l,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 Ua(a,t,o,n,s,i){const r=a==="l",l=t.createLinearGradient(0,0,r?o:0,r?0:n);l.addColorStop(.01,s),l.addColorStop(.99,i),t.fillStyle=l,t.fillRect(0,0,o,n)}function sv({r:a,g:t,b:o},n){const s=r=>("0"+Number(r).toString(16)).slice(-2),i=`#${s(a)}${s(t)}${s(o)}`;return n?i.toUpperCase():i}function rv(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 Wo(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 iv({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 r=0;n===s?r=0:n===a?t>=o?r=60*(t-o)/i:r=60*(t-o)/i+360:n===t?r=60*(o-a)/i+120:n===o&&(r=60*(a-t)/i+240),r=Math.floor(r);let l=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:r,s:l,v:c}}var po=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),Ua("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Ua("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=r=>{let l=r.clientX-o,c=r.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 u=n.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,p,m]=u.data;this.$emit("selectSaturation",{r:d,g:p,b:m})};s(a);const i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",i)}}});const lv={ref:"canvasSaturation"};function cv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectSaturation&&a.selectSaturation(...r),["prevent","stop"]))},[e.createVNode("canvas",lv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}po.render=cv;po.__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 r=i.clientY-t;r<0&&(r=0),r>this.height&&(r=this.height),this.slideHueStyle={top:r-2+"px"};const l=o.getImageData(0,Math.min(r,this.height-1),1,1),[c,u,d]=l.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 dv={ref:"canvasHue"};function uv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectHue&&a.selectHue(...r),["prevent","stop"]))},[e.createVNode("canvas",dv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}fo.render=uv;fo.__file="src/color/Hue.vue";var vo=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),Ua("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 r=parseFloat((i/this.height).toFixed(2));this.$emit("selectAlpha",r)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const mv={ref:"canvasAlpha"};function pv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectAlpha&&a.selectAlpha(...r),["prevent","stop"]))},[e.createVNode("canvas",mv,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}vo.render=pv;vo.__file="src/color/Alpha.vue";var ho=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 fv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("canvas")}ho.render=fv;ho.__file="src/color/Preview.vue";var Co=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:r}=this.suckerCanvas.getBoundingClientRect(),l=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,i-1),Math.min(c,r-1),1,1);let[p,m,f,y]=d.data;y=parseFloat((y/255).toFixed(2));const _=this.suckerPreview.style;Object.assign(_,{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(${p}, ${m}, ${f}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?_.display="":_.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:r,height:l}=a.getBoundingClientRect(),c=o-i,u=n-s,p=a.getContext("2d").getImageData(Math.min(c,r-1),Math.min(u,l-1),1,1);let[m,f,y,_]=p.data;_=parseFloat((_/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b:y,a:_})}))}}});const vv=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),hv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Cv=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 gv(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]=(...r)=>a.openSucker&&a.openSucker(...r))},[vv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",hv,[Cv])):e.createCommentVNode("v-if",!0)])}Co.render=gv;Co.__file="src/color/Sucker.vue";var go=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 _v={class:"color-type"},yv={class:"name"};function bv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",_v,[e.createVNode("span",yv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=r=>a.modelColor=r),class:"value",onFocus:t[2]||(t[2]=(...r)=>a.handleFocus&&a.handleFocus(...r)),onBlur:t[3]||(t[3]=(...r)=>a.handleBlur&&a.handleBlur(...r))},null,544),[[e.vModelText,a.modelColor]])])}go.render=bv;go.__file="src/color/Box.vue";var _o=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(l){if(!l)return;const c=n.value||[],u=c.indexOf(l);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(l),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function r(l){t("selectColor",l)}return{setColorsHistory:i,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:r}}});const wv={class:"colors"},kv={key:0,class:"colors history"};function Ev(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",wv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",kv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}_o.render=Ev;_o.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:po,Hue:fo,Alpha:vo,Preview:ho,Sucker:Co,Box:go,Colors:_o},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 sv(this.rgba,!0)}},created(){Object.assign(this,Xe(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:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),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:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),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:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,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:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,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:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,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:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const $v={class:"color-set"};function Bv(a,t,o,n,s,i){const r=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),p=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",$v,[e.createVNode(r,{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(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(p,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{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)}ut.render=Bv;ut.__file="src/color/ColorPicker.vue";ut.install=a=>{a.component(ut.name,ut)};const Vv={props:{color:{type:String,required:!0}},components:{ColorPicker:ut},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)}}},Sv={class:"color-picker-wrapper"};function Nv(a,t,o,n,s,i){const r=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",Sv,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>i.togglePicker&&i.togglePicker(...l))},null,4),s.showPicker?(e.openBlock(),e.createBlock(r,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:i.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const Mv=I(Vv,[["render",Nv]]),Av={class:"ao-project-milestone"},Tv={class:"ao-project-milestone__header"},Ov={class:"ao-project-milestone__header_line"},Iv={class:"ao-project-milestone__header_line"},Lv={class:"ao-project-milestone__title"},Dv={key:0,class:"ao-fieldset ao-milestone__fieldset"},Pv={class:"ao-field__row ao-milestone__field-row"},Hv={class:"ao-field ao-field--inline"},Rv={class:"ao-field__row ao-milestone__field-row"},jv={class:"ao-field ao-milestone__field-multiselect"},Fv={class:"ao-project-milestone__body"},Uv={key:0,class:"ao-project-milestone__footer"},qo=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}=nt(),s=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.find(h=>h.id===o.phaseId)}),i=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(h=>h.milestones)}),r=e.computed(()=>{var C;return(C=i.value)==null?void 0:C.find(h=>h.id===o.milestoneId)}),l=e.computed(()=>{var C;return(C=r.value)==null?void 0:C.activities});e.watch(l,(C,h)=>{Me(C,h)});const c=C=>{t("close",C)},u=()=>{const{name:C,rank:h}=dt(l.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:C,rank:h,projectId:o.projectId})},d=C=>{t("updateActivity",C)},p=C=>{l.value&&"moved"in C&&t("updateActivity",{id:C.moved.element.id,rank:mt(l.value,C.moved.newIndex)})},m=e.computed({get:()=>{var C;return(C=r.value)==null?void 0:C.color},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,color:C})}}),f=e.computed({get:()=>{var C;return((C=r==null?void 0:r.value)==null?void 0:C.deadline)??""},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,deadline:C!=null&&C.length?C:null})}}),y=C=>o.closedStatus?qa(C,o.closedStatus):!1,_=e.computed(()=>{var C;return((C=o.users)==null?void 0:C.map(h=>({label:`${h.firstName} ${h.lastName}`,value:h.id,avatar:h.avatarUrl})))||[]}),g=e.computed({get(){var C,h;return(h=(C=r.value)==null?void 0:C.assignee)!=null&&h.id?[r.value.assignee.id]:[]},set(C){t("updateMilestone",{id:o.milestoneId,assigneeId:C[0]??null})}}),w=e.computed({get(){var C;return((C=r.value)==null?void 0:C.important)??!1},set(C){t("updateMilestone",{id:o.milestoneId,important:C})}});return(C,h)=>{var N;return e.openBlock(),e.createElementBlock("div",Av,[e.createElementVNode("header",Tv,[e.createElementVNode("div",Ov,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Iv,[e.createElementVNode("div",Lv,[e.createVNode(oe,{title:((N=r.value)==null?void 0:N.name)||C.milestoneId,level:5},null,8,["title"]),e.createVNode(Fa,{modelValue:w.value,"onUpdate:modelValue":h[0]||(h[0]=B=>w.value=B),modelModifiers:{lazy:!0},disabled:!C.isEditable,class:"ao-milestone__important",color:"danger",label:C.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),r.value?(e.openBlock(),e.createElementBlock("div",Dv,[e.createElementVNode("div",Pv,[e.createElementVNode("label",Hv,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[1]||(h[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",Rv,[e.createElementVNode("label",jv,[e.createVNode(se,{modelValue:g.value,"onUpdate:modelValue":h[2]||(h[2]=B=>g.value=B),options:_.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:C.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!C.isEditable,caret:C.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:S})=>[e.createVNode(we,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:L=>S(B,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Mv,{color:m.value,"onUpdate:color":h[3]||(h[3]=B=>m.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fv,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!C.isEditable,"item-key":"id",group:"kanban"},C.$attrs,{onChange:p}),{item:e.withCtx(({element:B})=>{var S,L,D,H,E;return[e.createVNode(uo,{id:B.id,name:B.name||B.id,"phase-name":(S=s.value)==null?void 0:S.name,"milestone-name":(L=r.value)==null?void 0:L.name,"milestone-color":(D=r.value)==null?void 0:D.color,deadline:B.deadline,important:B.important,users:C.users,assignee:B.assignee,slug:B.slug,comments:(H=B.comments)==null?void 0:H.length,attachments:(E=B.attachments)==null?void 0:E.length,tasks:B.tasks,"is-editable":C.isEditable,"is-private":B.private,"is-closed":y(B),onClick:R=>C.$router.push({name:e.unref(ge).activity,params:{milestoneId:C.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[C.isEditable?{name:"secondary",fn:e.withCtx(()=>[C.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("archive"),onClick:e.withModifiers(()=>C.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),C.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>C.$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"]),C.isEditable?(e.openBlock(),e.createElementBlock("div",Uv,[e.createVNode(We,{"icon-name":"Add",label:C.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const Zv=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 g;return(g=o.phases)==null?void 0:g.find(w=>w.id===o.phaseId)}),s=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(w=>w.milestones)}),i=e.computed(()=>{var g;return(g=s.value)==null?void 0:g.find(w=>w.id===o.milestoneId)}),r=e.computed(()=>{var g;return(g=o.activities)==null?void 0:g.find(w=>w.id===o.activityId)}),l=g=>{t("update:activity",g)},c=g=>{t("addSubtask",g)},u=g=>{t("updateSubtask",g)},d=g=>{t("deleteSubtask",g)},p=g=>{t("addFiles",g)},m=g=>{t("removeFile",g)},f=g=>{t("addComment",g)},y=g=>{t("updateComment",g)},_=g=>{t("removeComment",g)};return(g,w)=>{var C,h;return r.value?(e.openBlock(),e.createBlock(io,{key:0,activity:r.value,"activity-types":g.activityTypes,"milestone-id":g.milestoneId,"template-activities":g.activities,"is-template":!1,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:`${(C=n.value)==null?void 0:C.name} / ${(h=i.value)==null?void 0:h.name}`,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:[g.project],onClose:g.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:y,onRemoveComment:_},{default:e.withCtx(N=>[e.renderSlot(g.$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)}}}),zv={class:"ao-col-header"},xv=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",zv,[e.createVNode(oe,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(ma,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function Wv(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function da(a){return typeof a=="function"?a():e.unref(a)}const qv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yv=a=>a!=null,At=()=>{};function Kv(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 Gv(a,t={}){let o,n,s=At;const i=l=>{clearTimeout(l),s(),s=At};return l=>{const c=da(a),u=da(t.maxWait);return o&&i(o),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,u&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,d(l())},u)),o=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function Xv(a,t=200,o={}){return Kv(Gv(t,o),a)}function Da(a){var t;const o=da(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Qv=qv?window:void 0;function Jv(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function e9(a){const t=Jv();return e.computed(()=>(t.value,!!a()))}function t9(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:i=.1,window:r=Qv,immediate:l=!0}=o,c=e9(()=>r&&"IntersectionObserver"in r),u=e.computed(()=>{const y=da(a);return(Array.isArray(y)?y:[y]).map(Da).filter(Yv)});let d=At;const p=e.ref(l),m=c.value?e.watch(()=>[u.value,Da(n),p.value],([y,_])=>{if(d(),!p.value||!y.length)return;const g=new IntersectionObserver(t,{root:Da(_),rootMargin:s,threshold:i});y.forEach(w=>w&&g.observe(w)),d=()=>{g.disconnect(),d=At}},{immediate:l,flush:"post"}):At,f=()=>{d(),m(),p.value=!1};return Wv(f),{isSupported:c,isActive:p,pause(){d(),p.value=!1},resume(){p.value=!0},stop:f}}const a9={class:e.normalizeClass(["ao-list-kanban"])},o9={class:"ao-list-kanban__header"},n9={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},s9={key:1,class:"ao-list-kanban__end"},r9={key:0,class:"ao-list-kanban__no-more"},i9={key:1,class:"ao-list-kanban__divider"},l9={key:1,class:"ao-list-kanban__footer"},c9=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);t9(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const i=d=>{var p;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((p=d.assignee)==null?void 0:p.id):!1},r=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:mt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:mt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,p)=>(e.openBlock(),e.createElementBlock("div",a9,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",o9,[d.title?(e.openBlock(),e.createBlock(xv,{key:0,title:d.title,level:3,items:(m=d.list)==null?void 0:m.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:p[0]||(p[0]=m=>u.value=!0),onEnd:p[1]||(p[1]=m=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var f,y,_,g,w,C,h,N,B;return[e.createVNode(uo,{class:e.normalizeClass(i(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(f=m.project)==null?void 0:f.name,"project-color":(y=m.project)==null?void 0:y.color,"phase-name":(g=(_=m.milestone)==null?void 0:_.phase)==null?void 0:g.name,"milestone-name":(w=m.milestone)==null?void 0:w.name,"milestone-color":(C=m.milestone)==null?void 0:C.color,deadline:m.deadline,rules:((h=m.rules)==null?void 0:h.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(N=m.comments)==null?void 0:N.length,attachments:(B=m.attachments)==null?void 0:B.length,users:d.users,assignee:m.assignee,slug:m.slug,"is-editable":i(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[S=>i(m)&&l(S),()=>i(m)&&l],onClick:()=>r(m.id),onRemoveAssignee:()=>i(m)&&l({id:m.id,assigneeId:null})},{secondary:e.withCtx(()=>[i(m)&&m.active?(e.openBlock(),e.createBlock(X,{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:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),i(m)&&!m.active?(e.openBlock(),e.createBlock(X,{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:m.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",n9,[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",s9,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",r9,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",i9)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",l9,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:p[2]||(p[2]=m=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const d9={class:"ao-field ao-search-field"},u9=["value","placeholder","onKeypress"],m9=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 r=>{const c=r.target.value;t("update:modelValue",c,r)},s=Xv(n,o.delay),i=r=>{t("clear",r)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",d9,[e.createElementVNode("input",{value:r.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:r.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,u9),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${r.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(X,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${r.modelValue?"ao-search-field__action--visible":""}`),onClick:i},null,8,["class"])]))}});const p9={class:"ao-feed"},f9={class:"ao-feed__filters"},v9={class:"ao-feed__body"},Pn=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{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","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:n}=nt(),s=e.toRef(o,"activities"),i=async $=>{await t("selectActivity",$)},r=e.ref({}),l=e.ref(!1),c=e.ref(!1),u=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.selectedActivity],async([$,O,k],[v,V])=>{r.value=Object.fromEntries($.map(U=>[U.id,O.filter(Z=>{var K;return((K=Z.status)==null?void 0:K.id)===U.id})])),k&&(await i(k.id),l.value=!0),c.value&&Me(O,V)},{immediate:!0});const d=e.computed(()=>{var $;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${(($=o.selectedActivity.milestone.phase)==null?void 0:$.name)??""} / ${o.selectedActivity.milestone.name??""}`}),p=$=>{var U,Z;const O=(U=o.activities)==null?void 0:U.at(-1),k=O?pe.LexoRank.parse(O.rank).genNext():pe.LexoRank.middle(),v=((Z=o.activities)==null?void 0:Z.length)??0,V={name:n("activity.defaultName",{idx:v+1}),rank:k.format(),statusId:$.id};o.filters.assigneeId.length>0&&(V.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(V.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(V.typeId=o.filters.typeId[0]),c.value=!0,t("addActivity",V)},m=($,O)=>{c.value=!1,t("update:filters",{...o.filters,[$]:O})},f=e.computed(()=>o.project?[o.project]:o.projects??[]),y=e.computed(()=>f.value.map($=>({value:$.id,label:$.name}))),_=e.computed(()=>{var $;return($=o.activityTypes)==null?void 0:$.map(O=>({value:O.id,label:O.name}))}),g=e.computed(()=>o.users.map($=>({value:$.id,label:`${$.firstName} ${$.lastName}`,avatar:$.avatarUrl}))),w=$=>{o.selectedActivity&&t("update:activity",$)},C=$=>{t("update:activity",$)},h=$=>{t("archiveActivity",$)},N=$=>{t("unarchiveActivity",$)},B=$=>{c.value=!1,t("update:searchText",$)},S=$=>{c.value=!1,t("clear:searchText",$)},L=$=>{o.selectedActivity&&t("addSubtask",$)},D=$=>{o.selectedActivity&&t("updateSubtask",$)},H=$=>{o.selectedActivity&&t("deleteSubtask",$)},E=$=>{t("addFiles",$)},R=$=>{t("removeFile",$)},T=$=>{o.selectedActivity&&t("addComment",{...$,activityId:o.selectedActivity.id})},P=$=>{const{id:O}=o.selectedActivity||{};O&&t("updateComment",$)},W=$=>{const{id:O}=o.selectedActivity||{};O&&t("removeComment",$)};return($,O)=>{var k;return e.openBlock(),e.createElementBlock("div",p9,[e.createVNode(Ca,null,{primary:e.withCtx(()=>[e.createElementVNode("div",f9,[o.project?(e.openBlock(),e.createBlock(Dn,{key:0,"is-left":!1,"right-label":$.$t("project.switch.feed"),"left-label":$.$t("project.switch.overview"),"onUpdate:isLeft":O[0]||(O[0]=v=>{v&&$.$router.push({name:e.unref(ge).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(m9,{"model-value":$.searchText,placeholder:$.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":B,onClear:S},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se,{key:1,"model-value":$.filters[e.unref(Qe).project],mode:"tags",options:y.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:$.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":O[1]||(O[1]=v=>m(e.unref(Qe).project,v))},null,8,["model-value","options","placeholder"])),_.value?(e.openBlock(),e.createBlock(se,{key:2,"model-value":$.filters[e.unref(Qe).type],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:$.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":O[2]||(O[2]=v=>m(e.unref(Qe).type,v))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),g.value.length?(e.openBlock(),e.createBlock(se,{key:3,"model-value":$.filters[e.unref(Qe).assignee],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:$.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":O[3]||(O[3]=v=>m(e.unref(Qe).assignee,v))},{tag:e.withCtx(({option:v,handleTagRemove:V})=>[e.createVNode(we,{"user-name":v.label,"avatar-url":v.avatar,"is-closable":!0,onClose:U=>V(v,U)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":$.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":$.showsOnlyImportant,onClick:O[4]||(O[4]=v=>$.$emit("update:showsOnlyImportant",!$.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":$.showsArchivedActivities,onClick:O[5]||(O[5]=v=>$.$emit("update:showsArchivedActivities",!$.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",v9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.statuses,v=>(e.openBlock(),e.createBlock(c9,{key:v.id,status:v,list:r.value[v.id],title:v.name,"footer-label":$.$t("feed.activity.add"),users:$.users,"user-id":$.userId,"is-editable":$.isEditable,tagType:u.value,onAdd:()=>p(v),onSelectActivity:i,onArchiveActivity:h,onUnarchiveActivity:N,onUpdateActivity:C},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.selectedActivity?(e.openBlock(),e.createBlock(io,{key:0,activity:$.selectedActivity,"activity-types":$.activityTypes,"milestone-id":(k=$.selectedActivity.milestone)==null?void 0:k.id,"template-activities":s.value,users:$.users,"user-id":$.userId,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,breadcrumbs:d.value,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,projects:f.value,onClose:O[6]||(O[6]=()=>i(null)),"onUpdate:activity":w,onAddSubtask:L,onUpdateSubtask:D,onDeleteSubtask:H,onAddFiles:E,onRemoveFile:R,onAddComment:T,onUpdateComment:P,onRemoveComment:W},{default:e.withCtx(v=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(v)))]),_: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 et={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},h9=(a,t={})=>[{path:a,name:et.TEMPLATES,redirect:{name:et.TEMPLATES_LIST},...t,children:[{path:"",name:et.TEMPLATES_LIST,component:Hn},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:et.TEMPLATE_DETAILS,component:In,props:!0}]}],ge={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},C9=(a,t={})=>[{path:a,...t,redirect:{name:ge.project},children:[{path:"",name:ge.project,component:Df,props:!0,children:[{path:":phaseId/:milestoneId",name:ge.milestone,component:qo,props:!0},{path:":phaseId/:milestoneId/:activityId",name:ge.activity,props:{default:!0,modal:!0},components:{default:qo,modal:Zv}}]},{path:"feed",name:ge.feed,component:Pn,props:!0}]}],g9={class:"ao-templates"},Hn=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:n}=nt();e.watch(()=>o.templates,(l,c)=>{Me(l,c)});const s=()=>{var p,m;const l=(p=o.templates)==null?void 0:p.at(-1),c=l?pe.LexoRank.parse(l.rank).genNext():pe.LexoRank.middle(),u=((m=o.templates)==null?void 0:m.length)??0,d={name:n("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},i=(l,c)=>{t("updateItem",{itemType:J.TEMPLATES,id:l,templateId:l,data:{name:c}})},r=l=>{if(l.moved){const c=jt(l,o.templates??[]);t("updateItem",{itemType:J.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",g9,[e.createVNode(Ca,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:r},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(h3,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(Z0)(u.phases):0,activities:u.phases?e.unref(z0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:p=>i(u.id,p),onClick:p=>l.$router.push({name:e.unref(et).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const _9={class:"ao-field__label"},Rn=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",_9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),y9=["type","value","disabled","readonly"],b9=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,r)=>(e.openBlock(),e.createBlock(Rn,{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)]:r[0]||(r[0]=l=>s(l.target.value))}),null,16,y9)]),_:1},8,["label"]))}}),w9={class:"ao-field"},k9={class:"ao-field__label"},E9=["checked","disabled"],$9=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",w9,[e.createElementVNode("span",k9,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,E9)]))}});exports.AoAvatar=we;exports.AoCardFeed=uo;exports.AoCheckboxField=$9;exports.AoFeed=Pn;exports.AoField=Rn;exports.AoInputField=b9;exports.AoMultiselect=se;exports.AoProjectPhases=Ln;exports.AoTemplateDetails=In;exports.AoTemplates=ns;exports.AoTemplatesList=Hn;exports.TemplateItemTypeEnum=en;exports.activityFeedStatus=n2;exports.durationTypes=o2;exports.feedFilterTypes=Qe;exports.getProjectOverviewRoutes=C9;exports.getTemplateRoutes=h9;exports.listUpdateTypes=s2;exports.milestoneStatus=aa;exports.projectOverviewRoutes=ge;exports.ruleComparators=Xo;exports.ruleDurationUnits=Jo;exports.ruleTriggerTypes=Qo;exports.templateItemType=J;exports.templateRouteNames=et;
5
+ */function Xe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=rv(a):/rgb/.test(a)?t=Wo(a):typeof a=="string"?t=Wo(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:i}=t,{h:r,s:l,v:c}=iv(t);return{r:o,g:n,b:s,a:i===void 0?1:i,h:r,s:l,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 Ua(a,t,o,n,s,i){const r=a==="l",l=t.createLinearGradient(0,0,r?o:0,r?0:n);l.addColorStop(.01,s),l.addColorStop(.99,i),t.fillStyle=l,t.fillRect(0,0,o,n)}function sv({r:a,g:t,b:o},n){const s=r=>("0"+Number(r).toString(16)).slice(-2),i=`#${s(a)}${s(t)}${s(o)}`;return n?i.toUpperCase():i}function rv(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 Wo(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 iv({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 r=0;n===s?r=0:n===a?t>=o?r=60*(t-o)/i:r=60*(t-o)/i+360:n===t?r=60*(o-a)/i+120:n===o&&(r=60*(a-t)/i+240),r=Math.floor(r);let l=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:r,s:l,v:c}}var po=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),Ua("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Ua("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=r=>{let l=r.clientX-o,c=r.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 u=n.getImageData(Math.min(l,this.size-1),Math.min(c,this.size-1),1,1),[d,p,m]=u.data;this.$emit("selectSaturation",{r:d,g:p,b:m})};s(a);const i=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",i)}}});const lv={ref:"canvasSaturation"};function cv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectSaturation&&a.selectSaturation(...r),["prevent","stop"]))},[e.createVNode("canvas",lv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}po.render=cv;po.__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 r=i.clientY-t;r<0&&(r=0),r>this.height&&(r=this.height),this.slideHueStyle={top:r-2+"px"};const l=o.getImageData(0,Math.min(r,this.height-1),1,1),[c,u,d]=l.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 dv={ref:"canvasHue"};function uv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectHue&&a.selectHue(...r),["prevent","stop"]))},[e.createVNode("canvas",dv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}fo.render=uv;fo.__file="src/color/Hue.vue";var vo=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),Ua("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 r=parseFloat((i/this.height).toFixed(2));this.$emit("selectAlpha",r)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const mv={ref:"canvasAlpha"};function pv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...r)=>a.selectAlpha&&a.selectAlpha(...r),["prevent","stop"]))},[e.createVNode("canvas",mv,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}vo.render=pv;vo.__file="src/color/Alpha.vue";var ho=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 fv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("canvas")}ho.render=fv;ho.__file="src/color/Preview.vue";var Co=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:r}=this.suckerCanvas.getBoundingClientRect(),l=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,i-1),Math.min(c,r-1),1,1);let[p,m,f,y]=d.data;y=parseFloat((y/255).toFixed(2));const _=this.suckerPreview.style;Object.assign(_,{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(${p}, ${m}, ${f}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?_.display="":_.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:r,height:l}=a.getBoundingClientRect(),c=o-i,u=n-s,p=a.getContext("2d").getImageData(Math.min(c,r-1),Math.min(u,l-1),1,1);let[m,f,y,_]=p.data;_=parseFloat((_/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b:y,a:_})}))}}});const vv=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),hv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Cv=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 gv(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]=(...r)=>a.openSucker&&a.openSucker(...r))},[vv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",hv,[Cv])):e.createCommentVNode("v-if",!0)])}Co.render=gv;Co.__file="src/color/Sucker.vue";var go=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 _v={class:"color-type"},yv={class:"name"};function bv(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",_v,[e.createVNode("span",yv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=r=>a.modelColor=r),class:"value",onFocus:t[2]||(t[2]=(...r)=>a.handleFocus&&a.handleFocus(...r)),onBlur:t[3]||(t[3]=(...r)=>a.handleBlur&&a.handleBlur(...r))},null,544),[[e.vModelText,a.modelColor]])])}go.render=bv;go.__file="src/color/Box.vue";var _o=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(l){if(!l)return;const c=n.value||[],u=c.indexOf(l);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(l),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function r(l){t("selectColor",l)}return{setColorsHistory:i,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:r}}});const wv={class:"colors"},kv={key:0,class:"colors history"};function Ev(a,t,o,n,s,i){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",wv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",kv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,r=>(e.openBlock(),e.createBlock("li",{key:r,class:"item",onClick:l=>a.selectColor(r)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:r},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}_o.render=Ev;_o.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:po,Hue:fo,Alpha:vo,Preview:ho,Sucker:Co,Box:go,Colors:_o},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 sv(this.rgba,!0)}},created(){Object.assign(this,Xe(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:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),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:r}=Xe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:i,v:r}),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:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,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:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,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:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,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:n,a:s,h:i,s:r,v:l}=Xe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:i,s:r,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const $v={class:"color-set"};function Bv(a,t,o,n,s,i){const r=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),p=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",$v,[e.createVNode(r,{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(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(p,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{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)}ut.render=Bv;ut.__file="src/color/ColorPicker.vue";ut.install=a=>{a.component(ut.name,ut)};const Vv={props:{color:{type:String,required:!0}},components:{ColorPicker:ut},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)}}},Sv={class:"color-picker-wrapper"};function Nv(a,t,o,n,s,i){const r=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",Sv,[e.createElementVNode("button",{style:e.normalizeStyle({backgroundColor:o.color}),class:"color-button",onClick:t[0]||(t[0]=(...l)=>i.togglePicker&&i.togglePicker(...l))},null,4),s.showPicker?(e.openBlock(),e.createBlock(r,{key:0,class:"color-picker",theme:"light",color:o.color,onChangeColor:i.changeColor},null,8,["color","onChangeColor"])):e.createCommentVNode("",!0)])}const Mv=I(Vv,[["render",Nv]]),Av={class:"ao-project-milestone"},Tv={class:"ao-project-milestone__header"},Ov={class:"ao-project-milestone__header_line"},Iv={class:"ao-project-milestone__header_line"},Lv={class:"ao-project-milestone__title"},Dv={key:0,class:"ao-fieldset ao-milestone__fieldset"},Pv={class:"ao-field__row ao-milestone__field-row"},Hv={class:"ao-field ao-field--inline"},Rv={class:"ao-field__row ao-milestone__field-row"},jv={class:"ao-field ao-milestone__field-multiselect"},Fv={class:"ao-project-milestone__body"},Uv={key:0,class:"ao-project-milestone__footer"},qo=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}=nt(),s=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.find(h=>h.id===o.phaseId)}),i=e.computed(()=>{var C;return(C=o.phases)==null?void 0:C.flatMap(h=>h.milestones)}),r=e.computed(()=>{var C;return(C=i.value)==null?void 0:C.find(h=>h.id===o.milestoneId)}),l=e.computed(()=>{var C;return(C=r.value)==null?void 0:C.activities});e.watch(l,(C,h)=>{Me(C,h)});const c=C=>{t("close",C)},u=()=>{const{name:C,rank:h}=dt(l.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:C,rank:h,projectId:o.projectId})},d=C=>{t("updateActivity",C)},p=C=>{l.value&&"moved"in C&&t("updateActivity",{id:C.moved.element.id,rank:mt(l.value,C.moved.newIndex)})},m=e.computed({get:()=>{var C;return(C=r.value)==null?void 0:C.color},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,color:C})}}),f=e.computed({get:()=>{var C;return((C=r==null?void 0:r.value)==null?void 0:C.deadline)??""},set:C=>{r.value&&t("updateMilestone",{id:r.value.id,deadline:C!=null&&C.length?C:null})}}),y=C=>o.closedStatus?qa(C,o.closedStatus):!1,_=e.computed(()=>{var C;return((C=o.users)==null?void 0:C.map(h=>({label:`${h.firstName} ${h.lastName}`,value:h.id,avatar:h.avatarUrl})))||[]}),g=e.computed({get(){var C,h;return(h=(C=r.value)==null?void 0:C.assignee)!=null&&h.id?[r.value.assignee.id]:[]},set(C){t("updateMilestone",{id:o.milestoneId,assigneeId:C[0]??null})}}),w=e.computed({get(){var C;return((C=r.value)==null?void 0:C.important)??!1},set(C){t("updateMilestone",{id:o.milestoneId,important:C})}});return(C,h)=>{var N;return e.openBlock(),e.createElementBlock("div",Av,[e.createElementVNode("header",Tv,[e.createElementVNode("div",Ov,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Iv,[e.createElementVNode("div",Lv,[e.createVNode(oe,{title:((N=r.value)==null?void 0:N.name)||C.milestoneId,level:5},null,8,["title"]),e.createVNode(Fa,{modelValue:w.value,"onUpdate:modelValue":h[0]||(h[0]=B=>w.value=B),modelModifiers:{lazy:!0},disabled:!C.isEditable,class:"ao-milestone__important",color:"danger",label:C.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),r.value?(e.openBlock(),e.createElementBlock("div",Dv,[e.createElementVNode("div",Pv,[e.createElementVNode("label",Hv,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":h[1]||(h[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",Rv,[e.createElementVNode("label",jv,[e.createVNode(se,{modelValue:g.value,"onUpdate:modelValue":h[2]||(h[2]=B=>g.value=B),options:_.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:C.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!C.isEditable,caret:C.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:S})=>[e.createVNode(we,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:L=>S(B,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Mv,{color:m.value,"onUpdate:color":h[3]||(h[3]=B=>m.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fv,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!C.isEditable,"item-key":"id",group:"kanban"},C.$attrs,{onChange:p}),{item:e.withCtx(({element:B})=>{var S,L,D,H,E;return[e.createVNode(uo,{id:B.id,name:B.name||B.id,"phase-name":(S=s.value)==null?void 0:S.name,"milestone-name":(L=r.value)==null?void 0:L.name,"milestone-color":(D=r.value)==null?void 0:D.color,deadline:B.deadline,important:B.important,users:C.users,assignee:B.assignee,slug:B.slug,comments:(H=B.comments)==null?void 0:H.length,attachments:(E=B.attachments)==null?void 0:E.length,tasks:B.tasks,"is-editable":C.isEditable,"is-private":B.private,"is-closed":y(B),onClick:R=>C.$router.push({name:e.unref(ge).activity,params:{milestoneId:C.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[C.isEditable?{name:"secondary",fn:e.withCtx(()=>[C.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("archive"),onClick:e.withModifiers(()=>C.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),C.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:C.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>C.$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"]),C.isEditable?(e.openBlock(),e.createElementBlock("div",Uv,[e.createVNode(We,{"icon-name":"Add",label:C.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const Zv=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 g;return(g=o.phases)==null?void 0:g.find(w=>w.id===o.phaseId)}),s=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(w=>w.milestones)}),i=e.computed(()=>{var g;return(g=s.value)==null?void 0:g.find(w=>w.id===o.milestoneId)}),r=e.computed(()=>{var g;return(g=o.activities)==null?void 0:g.find(w=>w.id===o.activityId)}),l=g=>{t("update:activity",g)},c=g=>{t("addSubtask",g)},u=g=>{t("updateSubtask",g)},d=g=>{t("deleteSubtask",g)},p=g=>{t("addFiles",g)},m=g=>{t("removeFile",g)},f=g=>{t("addComment",g)},y=g=>{t("updateComment",g)},_=g=>{t("removeComment",g)};return(g,w)=>{var C,h;return r.value?(e.openBlock(),e.createBlock(io,{key:0,activity:r.value,"activity-types":g.activityTypes,"milestone-id":g.milestoneId,"template-activities":g.activities,"is-template":!1,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:`${(C=n.value)==null?void 0:C.name} / ${(h=i.value)==null?void 0:h.name}`,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:[g.project],onClose:g.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:y,onRemoveComment:_},{default:e.withCtx(N=>[e.renderSlot(g.$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)}}}),zv={class:"ao-col-header"},xv=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",zv,[e.createVNode(oe,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(ma,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function Wv(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function da(a){return typeof a=="function"?a():e.unref(a)}const qv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yv=a=>a!=null,At=()=>{};function Kv(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 Gv(a,t={}){let o,n,s=At;const i=l=>{clearTimeout(l),s(),s=At};return l=>{const c=da(a),u=da(t.maxWait);return o&&i(o),c<=0||u!==void 0&&u<=0?(n&&(i(n),n=null),Promise.resolve(l())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,u&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,d(l())},u)),o=setTimeout(()=>{n&&i(n),n=null,d(l())},c)})}}function Xv(a,t=200,o={}){return Kv(Gv(t,o),a)}function Da(a){var t;const o=da(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Qv=qv?window:void 0;function Jv(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function e9(a){const t=Jv();return e.computed(()=>(t.value,!!a()))}function t9(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:i=.1,window:r=Qv,immediate:l=!0}=o,c=e9(()=>r&&"IntersectionObserver"in r),u=e.computed(()=>{const y=da(a);return(Array.isArray(y)?y:[y]).map(Da).filter(Yv)});let d=At;const p=e.ref(l),m=c.value?e.watch(()=>[u.value,Da(n),p.value],([y,_])=>{if(d(),!p.value||!y.length)return;const g=new IntersectionObserver(t,{root:Da(_),rootMargin:s,threshold:i});y.forEach(w=>w&&g.observe(w)),d=()=>{g.disconnect(),d=At}},{immediate:l,flush:"post"}):At,f=()=>{d(),m(),p.value=!1};return Wv(f),{isSupported:c,isActive:p,pause(){d(),p.value=!1},resume(){p.value=!0},stop:f}}const a9={class:e.normalizeClass(["ao-list-kanban"])},o9={class:"ao-list-kanban__header"},n9={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},s9={key:1,class:"ao-list-kanban__end"},r9={key:0,class:"ao-list-kanban__no-more"},i9={key:1,class:"ao-list-kanban__divider"},l9={key:1,class:"ao-list-kanban__footer"},c9=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);t9(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const i=d=>{var p;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((p=d.assignee)==null?void 0:p.id):!1},r=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:mt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:mt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,p)=>(e.openBlock(),e.createElementBlock("div",a9,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",o9,[d.title?(e.openBlock(),e.createBlock(xv,{key:0,title:d.title,level:3,items:(m=d.list)==null?void 0:m.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:p[0]||(p[0]=m=>u.value=!0),onEnd:p[1]||(p[1]=m=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var f,y,_,g,w,C,h,N,B;return[e.createVNode(uo,{class:e.normalizeClass(i(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(f=m.project)==null?void 0:f.name,"project-color":(y=m.project)==null?void 0:y.color,"phase-name":(g=(_=m.milestone)==null?void 0:_.phase)==null?void 0:g.name,"milestone-name":(w=m.milestone)==null?void 0:w.name,"milestone-color":(C=m.milestone)==null?void 0:C.color,deadline:m.deadline,rules:((h=m.rules)==null?void 0:h.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(N=m.comments)==null?void 0:N.length,attachments:(B=m.attachments)==null?void 0:B.length,users:d.users,assignee:m.assignee,slug:m.slug,"is-editable":i(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[S=>i(m)&&l(S),()=>i(m)&&l],onClick:()=>r(m.id),onRemoveAssignee:()=>i(m)&&l({id:m.id,assigneeId:null})},{secondary:e.withCtx(()=>[i(m)&&m.active?(e.openBlock(),e.createBlock(X,{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:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),i(m)&&!m.active?(e.openBlock(),e.createBlock(X,{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:m.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",n9,[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",s9,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",r9,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",i9)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",l9,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:p[2]||(p[2]=m=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const d9={class:"ao-field ao-search-field"},u9=["value","placeholder","onKeypress"],m9=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 r=>{const c=r.target.value;t("update:modelValue",c,r)},s=Xv(n,o.delay),i=r=>{t("clear",r)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",d9,[e.createElementVNode("input",{value:r.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:r.placeholder,onInput:l[0]||(l[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,u9),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${r.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(X,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${r.modelValue?"ao-search-field__action--visible":""}`),onClick:i},null,8,["class"])]))}});const p9={class:"ao-feed"},f9={class:"ao-feed__filters"},v9={class:"ao-feed__body"},Pn=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{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","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:n}=nt(),s=e.toRef(o,"activities"),i=async $=>{await t("selectActivity",$)},r=e.ref({}),l=e.ref(!1),c=e.ref(!1),u=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([$,O,k],[v,V])=>{r.value=Object.fromEntries($.map(U=>[U.id,O.filter(Z=>{var K;return((K=Z.status)==null?void 0:K.id)===U.id})])),k&&!l.value&&(i(k),l.value=!0),c.value&&Me(O,V)},{immediate:!0});const d=e.computed(()=>{var $;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${(($=o.selectedActivity.milestone.phase)==null?void 0:$.name)??""} / ${o.selectedActivity.milestone.name??""}`}),p=$=>{var U,Z;const O=(U=o.activities)==null?void 0:U.at(-1),k=O?pe.LexoRank.parse(O.rank).genNext():pe.LexoRank.middle(),v=((Z=o.activities)==null?void 0:Z.length)??0,V={name:n("activity.defaultName",{idx:v+1}),rank:k.format(),statusId:$.id};o.filters.assigneeId.length>0&&(V.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(V.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(V.typeId=o.filters.typeId[0]),c.value=!0,t("addActivity",V)},m=($,O)=>{c.value=!1,t("update:filters",{...o.filters,[$]:O})},f=e.computed(()=>o.project?[o.project]:o.projects??[]),y=e.computed(()=>f.value.map($=>({value:$.id,label:$.name}))),_=e.computed(()=>{var $;return($=o.activityTypes)==null?void 0:$.map(O=>({value:O.id,label:O.name}))}),g=e.computed(()=>o.users.map($=>({value:$.id,label:`${$.firstName} ${$.lastName}`,avatar:$.avatarUrl}))),w=$=>{o.selectedActivity&&t("update:activity",$)},C=$=>{t("update:activity",$)},h=$=>{t("archiveActivity",$)},N=$=>{t("unarchiveActivity",$)},B=$=>{c.value=!1,t("update:searchText",$)},S=$=>{c.value=!1,t("clear:searchText",$)},L=$=>{o.selectedActivity&&t("addSubtask",$)},D=$=>{o.selectedActivity&&t("updateSubtask",$)},H=$=>{o.selectedActivity&&t("deleteSubtask",$)},E=$=>{t("addFiles",$)},R=$=>{t("removeFile",$)},T=$=>{o.selectedActivity&&t("addComment",{...$,activityId:o.selectedActivity.id})},P=$=>{const{id:O}=o.selectedActivity||{};O&&t("updateComment",$)},W=$=>{const{id:O}=o.selectedActivity||{};O&&t("removeComment",$)};return($,O)=>{var k;return e.openBlock(),e.createElementBlock("div",p9,[e.createVNode(Ca,null,{primary:e.withCtx(()=>[e.createElementVNode("div",f9,[o.project?(e.openBlock(),e.createBlock(Dn,{key:0,"is-left":!1,"right-label":$.$t("project.switch.feed"),"left-label":$.$t("project.switch.overview"),"onUpdate:isLeft":O[0]||(O[0]=v=>{v&&$.$router.push({name:e.unref(ge).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(m9,{"model-value":$.searchText,placeholder:$.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":B,onClear:S},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se,{key:1,"model-value":$.filters[e.unref(Qe).project],mode:"tags",options:y.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:$.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":O[1]||(O[1]=v=>m(e.unref(Qe).project,v))},null,8,["model-value","options","placeholder"])),_.value?(e.openBlock(),e.createBlock(se,{key:2,"model-value":$.filters[e.unref(Qe).type],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:$.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":O[2]||(O[2]=v=>m(e.unref(Qe).type,v))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),g.value.length?(e.openBlock(),e.createBlock(se,{key:3,"model-value":$.filters[e.unref(Qe).assignee],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:$.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":O[3]||(O[3]=v=>m(e.unref(Qe).assignee,v))},{tag:e.withCtx(({option:v,handleTagRemove:V})=>[e.createVNode(we,{"user-name":v.label,"avatar-url":v.avatar,"is-closable":!0,onClose:U=>V(v,U)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":$.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":$.showsOnlyImportant,onClick:O[4]||(O[4]=v=>$.$emit("update:showsOnlyImportant",!$.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":$.showsArchivedActivities,onClick:O[5]||(O[5]=v=>$.$emit("update:showsArchivedActivities",!$.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",v9,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.statuses,v=>(e.openBlock(),e.createBlock(c9,{key:v.id,status:v,list:r.value[v.id],title:v.name,"footer-label":$.$t("feed.activity.add"),users:$.users,"user-id":$.userId,"is-editable":$.isEditable,tagType:u.value,onAdd:()=>p(v),onSelectActivity:i,onArchiveActivity:h,onUnarchiveActivity:N,onUpdateActivity:C},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[$.selectedActivity?(e.openBlock(),e.createBlock(io,{key:0,activity:$.selectedActivity,"activity-types":$.activityTypes,"milestone-id":(k=$.selectedActivity.milestone)==null?void 0:k.id,"template-activities":s.value,users:$.users,"user-id":$.userId,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,breadcrumbs:d.value,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,projects:f.value,onClose:O[6]||(O[6]=()=>i(null)),"onUpdate:activity":w,onAddSubtask:L,onUpdateSubtask:D,onDeleteSubtask:H,onAddFiles:E,onRemoveFile:R,onAddComment:T,onUpdateComment:P,onRemoveComment:W},{default:e.withCtx(v=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(v)))]),_: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 et={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},h9=(a,t={})=>[{path:a,name:et.TEMPLATES,redirect:{name:et.TEMPLATES_LIST},...t,children:[{path:"",name:et.TEMPLATES_LIST,component:Hn},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:et.TEMPLATE_DETAILS,component:In,props:!0}]}],ge={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},C9=(a,t={})=>[{path:a,...t,redirect:{name:ge.project},children:[{path:"",name:ge.project,component:Df,props:!0,children:[{path:":phaseId/:milestoneId",name:ge.milestone,component:qo,props:!0},{path:":phaseId/:milestoneId/:activityId",name:ge.activity,props:{default:!0,modal:!0},components:{default:qo,modal:Zv}}]},{path:"feed",name:ge.feed,component:Pn,props:!0}]}],g9={class:"ao-templates"},Hn=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:n}=nt();e.watch(()=>o.templates,(l,c)=>{Me(l,c)});const s=()=>{var p,m;const l=(p=o.templates)==null?void 0:p.at(-1),c=l?pe.LexoRank.parse(l.rank).genNext():pe.LexoRank.middle(),u=((m=o.templates)==null?void 0:m.length)??0,d={name:n("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},i=(l,c)=>{t("updateItem",{itemType:J.TEMPLATES,id:l,templateId:l,data:{name:c}})},r=l=>{if(l.moved){const c=jt(l,o.templates??[]);t("updateItem",{itemType:J.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",g9,[e.createVNode(Ca,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:r},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(h3,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(Z0)(u.phases):0,activities:u.phases?e.unref(z0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:p=>i(u.id,p),onClick:p=>l.$router.push({name:e.unref(et).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const _9={class:"ao-field__label"},Rn=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",_9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),y9=["type","value","disabled","readonly"],b9=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,r)=>(e.openBlock(),e.createBlock(Rn,{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)]:r[0]||(r[0]=l=>s(l.target.value))}),null,16,y9)]),_:1},8,["label"]))}}),w9={class:"ao-field"},k9={class:"ao-field__label"},E9=["checked","disabled"],$9=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",w9,[e.createElementVNode("span",k9,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,E9)]))}});exports.AoAvatar=we;exports.AoCardFeed=uo;exports.AoCheckboxField=$9;exports.AoFeed=Pn;exports.AoField=Rn;exports.AoInputField=b9;exports.AoMultiselect=se;exports.AoProjectPhases=Ln;exports.AoTemplateDetails=In;exports.AoTemplates=ns;exports.AoTemplatesList=Hn;exports.TemplateItemTypeEnum=en;exports.activityFeedStatus=n2;exports.durationTypes=o2;exports.feedFilterTypes=Qe;exports.getProjectOverviewRoutes=C9;exports.getTemplateRoutes=h9;exports.listUpdateTypes=s2;exports.milestoneStatus=aa;exports.projectOverviewRoutes=ge;exports.ruleComparators=Xo;exports.ruleDurationUnits=Jo;exports.ruleTriggerTypes=Qo;exports.templateItemType=J;exports.templateRouteNames=et;
package/dist/orcha.es.js CHANGED
@@ -11964,7 +11964,6 @@ const X4 = { class: "ao-feed" }, Q4 = { class: "ao-feed__filters" }, J4 = { clas
11964
11964
  users: {},
11965
11965
  userId: {},
11966
11966
  initialActivityId: {},
11967
- initialActivitySlug: {},
11968
11967
  searchText: { default: "" },
11969
11968
  showsArchivedActivities: { type: Boolean },
11970
11969
  showsOnlyImportant: { type: Boolean },
@@ -11979,8 +11978,7 @@ const X4 = { class: "ao-feed" }, Q4 = { class: "ao-feed__filters" }, J4 = { clas
11979
11978
  await e("selectActivity", E);
11980
11979
  }, i = ee({}), r = ee(!1), l = ee(!1), c = S(() => a.project ? "milestone" : "project");
11981
11980
  de(
11982
- // [() => props.statuses, () => props.activities, () => props.initialActivityId, () => props.initialActivitySlug],
11983
- [() => a.statuses, () => a.activities, () => a.selectedActivity],
11981
+ [() => a.statuses, () => a.activities, () => a.initialActivityId],
11984
11982
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
11985
11983
  async ([E, N, M], [m, L]) => {
11986
11984
  i.value = Object.fromEntries(
@@ -11991,7 +11989,7 @@ const X4 = { class: "ao-feed" }, Q4 = { class: "ao-feed__filters" }, J4 = { clas
11991
11989
  return ((le = ae.status) == null ? void 0 : le.id) === J.id;
11992
11990
  })
11993
11991
  ])
11994
- ), M && (await o(M.id), r.value = !0), l.value && Xe(N, L);
11992
+ ), M && !r.value && (o(M), r.value = !0), l.value && Xe(N, L);
11995
11993
  },
11996
11994
  { immediate: !0 }
11997
11995
  );
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 tt(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=$f(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}=Ef(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 kf({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 $f(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 Ef({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 u=r.getImageData(Math.min(l,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})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Bf={ref:"canvasSaturation"};function Vf(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",Bf,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}ro.render=Vf,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,u,d]=l.data;this.$emit("selectHue",{r:c,g:u,b:d})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const Sf={ref:"canvasHue"};function xf(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",Sf,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}no.render=xf,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 Nf={ref:"canvasAlpha"};function Mf(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",Nf,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}io.render=Mf,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 Af(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}so.render=Af,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,p,f,b]=d.data;b=parseFloat((b/255).toFixed(2));const C=this.suckerPreview.style;Object.assign(C,{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]?C.display="":C.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,u=r-n,m=a.getContext("2d").getImageData(Math.min(c,i-1),Math.min(u,l-1),1,1);let[p,f,b,C]=m.data;C=parseFloat((C/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b,a:C})}))}}});const Tf=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),Of={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Lf=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 If(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))},[Tf],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Of,[Lf])):e.createCommentVNode("v-if",!0)])}lo.render=If,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 Df={class:"color-type"},zf={class:"name"};function Pf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",Df,[e.createVNode("span",zf,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=Pf,co.__file="src/color/Box.vue";var uo=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||[],u=c.indexOf(l);u>=0&&c.splice(u,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 Hf={class:"colors"},jf={key:0,class:"colors history"};function Rf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Hf,[(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",jf,[(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)])}uo.render=Rf,uo.__file="src/color/Colors.vue";var _t=e.defineComponent({components:{Saturation:ro,Hue:no,Alpha:io,Preview:so,Sucker:lo,Box:co,Colors:uo},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 kf(this.rgba,!0)}},created(){Object.assign(this,tt(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}=tt(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}=tt(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}=tt(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}=tt(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}=tt(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}=tt(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 Ff={class:"color-set"};function Uf(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=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",Ff,[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(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)}_t.render=Uf,_t.__file="src/color/ColorPicker.vue",_t.install=a=>{a.component(_t.name,_t)};const l4="",c4="",Zf={props:{color:{type:String,required:!0}},components:{ColorPicker:_t},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)}}},Wf={class:"color-picker-wrapper"};function qf(a,t,o,r,n,s){const i=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",Wf,[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 Yf=O(Zf,[["render",qf]]),Kf={class:"ao-project-milestone"},Gf={class:"ao-project-milestone__header"},Xf={class:"ao-project-milestone__header_line"},Qf={class:"ao-project-milestone__header_line"},Jf={class:"ao-project-milestone__title"},e7={key:0,class:"ao-fieldset ao-milestone__fieldset"},t7={class:"ao-field__row ao-milestone__field-row"},a7={class:"ao-field ao-field--inline"},o7={class:"ao-field__row ao-milestone__field-row"},r7={class:"ao-field ao-milestone__field-multiselect"},n7={class:"ao-project-milestone__body"},i7={key:0,class:"ao-project-milestone__footer"},Nr=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}=et(),n=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.find(g=>g.id===o.phaseId)}),s=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(g=>g.milestones)}),i=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.find(g=>g.id===o.milestoneId)}),l=e.computed(()=>{var _;return(_=i.value)==null?void 0:_.activities});e.watch(l,(_,g)=>{Ae(_,g)});const c=_=>{t("close",_)},u=()=>{const{name:_,rank:g}=gt(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:_,rank:g,projectId:o.projectId})},d=_=>{t("updateActivity",_)},m=_=>{l.value&&"moved"in _&&t("updateActivity",{id:_.moved.element.id,rank:lt(l.value,_.moved.newIndex)})},p=e.computed({get:()=>{var _;return(_=i.value)==null?void 0:_.color},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,color:_})}}),f=e.computed({get:()=>{var _;return((_=i==null?void 0:i.value)==null?void 0:_.deadline)??""},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:_!=null&&_.length?_:null})}}),b=_=>o.closedStatus?Ta(_,o.closedStatus):!1,C=e.computed(()=>{var _;return((_=o.users)==null?void 0:_.map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id,avatar:g.avatarUrl})))||[]}),v=e.computed({get(){var _,g;return(g=(_=i.value)==null?void 0:_.assignee)!=null&&g.id?[i.value.assignee.id]:[]},set(_){t("updateMilestone",{id:o.milestoneId,assigneeId:_[0]??null})}}),w=e.computed({get(){var _;return((_=i.value)==null?void 0:_.important)??!1},set(_){t("updateMilestone",{id:o.milestoneId,important:_})}});return(_,g)=>{var x;return e.openBlock(),e.createElementBlock("div",Kf,[e.createElementVNode("header",Gf,[e.createElementVNode("div",Xf,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Qf,[e.createElementVNode("div",Jf,[e.createVNode(re,{title:((x=i.value)==null?void 0:x.name)||_.milestoneId,level:5},null,8,["title"]),e.createVNode(Xa,{modelValue:w.value,"onUpdate:modelValue":g[0]||(g[0]=B=>w.value=B),modelModifiers:{lazy:!0},disabled:!_.isEditable,class:"ao-milestone__important",color:"danger",label:_.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),i.value?(e.openBlock(),e.createElementBlock("div",e7,[e.createElementVNode("div",t7,[e.createElementVNode("label",a7,[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",o7,[e.createElementVNode("label",r7,[e.createVNode(ie,{modelValue:v.value,"onUpdate:modelValue":g[2]||(g[2]=B=>v.value=B),options:C.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:_.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!_.isEditable,caret:_.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:S})=>[e.createVNode(ye,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:L=>S(B,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Yf,{color:p.value,"onUpdate:color":g[3]||(g[3]=B=>p.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",n7,[e.createVNode(e.unref(Ie),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!_.isEditable,"item-key":"id",group:"kanban"},_.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var S,L,I,z,$;return[e.createVNode(to,{id:B.id,name:B.name||B.id,"phase-name":(S=n.value)==null?void 0:S.name,"milestone-name":(L=i.value)==null?void 0:L.name,"milestone-color":(I=i.value)==null?void 0:I.color,deadline:B.deadline,important:B.important,users:_.users,assignee:B.assignee,slug:B.slug,comments:(z=B.comments)==null?void 0:z.length,attachments:($=B.attachments)==null?void 0:$.length,tasks:B.tasks,"is-editable":_.isEditable,"is-private":B.private,"is-closed":b(B),onClick:P=>_.$router.push({name:e.unref(Ce).activity,params:{milestoneId:_.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[_.isEditable?{name:"secondary",fn:e.withCtx(()=>[_.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("archive"),onClick:e.withModifiers(()=>_.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),_.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>_.$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"]),_.isEditable?(e.openBlock(),e.createElementBlock("div",i7,[e.createVNode(ze,{"icon-name":"Add",label:_.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),d4="",s7=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 v;return(v=o.phases)==null?void 0:v.find(w=>w.id===o.phaseId)}),n=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(w=>w.milestones)}),s=e.computed(()=>{var v;return(v=n.value)==null?void 0:v.find(w=>w.id===o.milestoneId)}),i=e.computed(()=>{var v;return(v=o.activities)==null?void 0:v.find(w=>w.id===o.activityId)}),l=v=>{t("update:activity",v)},c=v=>{t("addSubtask",v)},u=v=>{t("updateSubtask",v)},d=v=>{t("deleteSubtask",v)},m=v=>{t("addFiles",v)},p=v=>{t("removeFile",v)},f=v=>{t("addComment",v)},b=v=>{t("updateComment",v)},C=v=>{t("removeComment",v)};return(v,w)=>{var _,g;return i.value?(e.openBlock(),e.createBlock(Qa,{key:0,activity:i.value,"activity-types":v.activityTypes,"milestone-id":v.milestoneId,"template-activities":v.activities,"is-template":!1,users:v.users,"user-id":v.userId,"is-task-checkable":v.isTaskCheckable,statuses:v.statuses,breadcrumbs:`${(_=r.value)==null?void 0:_.name} / ${(g=s.value)==null?void 0:g.name}`,"is-editable":v.isEditable,"attachment-enabled":v.attachmentEnabled,projects:[v.project],onClose:v.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:b,onRemoveComment:C},{default:e.withCtx(x=>[e.renderSlot(v.$slots,"default",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","onClose"])):e.createCommentVNode("",!0)}}}),l7={class:"ao-col-header"},c7=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",l7,[e.createVNode(re,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Zt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),u4="";function d7(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function va(a){return typeof a=="function"?a():e.unref(a)}const u7=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const p7=a=>a!=null,zt=()=>{};function m7(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 f7(a,t={}){let o,r,n=zt;const s=l=>{clearTimeout(l),n(),n=zt};return l=>{const c=va(a),u=va(t.maxWait);return o&&s(o),c<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((d,m)=>{n=t.rejectOnCancel?m:d,u&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,d(l())},u)),o=setTimeout(()=>{r&&s(r),r=null,d(l())},c)})}}function h7(a,t=200,o={}){return m7(f7(t,o),a)}function po(a){var t;const o=va(a);return(t=o==null?void 0:o.$el)!=null?t:o}const g7=u7?window:void 0;function _7(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function v7(a){const t=_7();return e.computed(()=>(t.value,!!a()))}function C7(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=g7,immediate:l=!0}=o,c=v7(()=>i&&"IntersectionObserver"in i),u=e.computed(()=>{const b=va(a);return(Array.isArray(b)?b:[b]).map(po).filter(p7)});let d=zt;const m=e.ref(l),p=c.value?e.watch(()=>[u.value,po(r),m.value],([b,C])=>{if(d(),!m.value||!b.length)return;const v=new IntersectionObserver(t,{root:po(C),rootMargin:n,threshold:s});b.forEach(w=>w&&v.observe(w)),d=()=>{v.disconnect(),d=zt}},{immediate:l,flush:"post"}):zt,f=()=>{d(),p(),m.value=!1};return d7(f),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:f}}const b7={class:e.normalizeClass(["ao-list-kanban"])},y7={class:"ao-list-kanban__header"},w7={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},k7={key:1,class:"ao-list-kanban__end"},$7={key:0,class:"ao-list-kanban__no-more"},E7={key:1,class:"ao-list-kanban__divider"},B7={key:1,class:"ao-list-kanban__footer"},V7=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);C7(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:lt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:lt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",b7,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var p;return[e.createElementVNode("div",y7,[d.title?(e.openBlock(),e.createBlock(c7,{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(Ie),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,C,v,w,_,g,x,B;return[e.createVNode(to,{class:e.normalizeClass(s(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":(v=(C=p.milestone)==null?void 0:C.phase)==null?void 0:v.name,"milestone-name":(w=p.milestone)==null?void 0:w.name,"milestone-color":(_=p.milestone)==null?void 0:_.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:(x=p.comments)==null?void 0:x.length,attachments:(B=p.attachments)==null?void 0:B.length,users:d.users,assignee:p.assignee,slug:p.slug,"is-editable":s(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[S=>s(p)&&l(S),()=>s(p)&&l],onClick:()=>i(p.id),onRemoveAssignee:()=>s(p)&&l({id:p.id,assigneeId:null})},{secondary:e.withCtx(()=>[s(p)&&p.active?(e.openBlock(),e.createBlock(X,{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),s(p)&&!p.active?(e.openBlock(),e.createBlock(X,{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",w7,[e.createVNode(J,{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",k7,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",$7,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",E7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",B7,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(ze,{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)]))}}),p4="",S7={class:"ao-field ao-search-field"},x7=["value","placeholder","onKeypress"],N7=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=h7(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",S7,[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,x7),e.createVNode(J,{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(X,{"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"])]))}}),m4="",M7={class:"ao-feed"},A7={class:"ao-feed__filters"},T7={class:"ao-feed__body"},Mr=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{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","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:r}=et(),n=e.toRef(o,"activities"),s=async E=>{await t("selectActivity",E)},i=e.ref({}),l=e.ref(!1),c=e.ref(!1),u=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.selectedActivity],async([E,T,k],[h,V])=>{i.value=Object.fromEntries(E.map(R=>[R.id,T.filter(F=>{var G;return((G=F.status)==null?void 0:G.id)===R.id})])),k&&(await s(k.id),l.value=!0),c.value&&Ae(T,V)},{immediate:!0});const d=e.computed(()=>{var E;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((E=o.selectedActivity.milestone.phase)==null?void 0:E.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=E=>{var R,F;const T=(R=o.activities)==null?void 0:R.at(-1),k=T?ue.LexoRank.parse(T.rank).genNext():ue.LexoRank.middle(),h=((F=o.activities)==null?void 0:F.length)??0,V={name:r("activity.defaultName",{idx:h+1}),rank:k.format(),statusId:E.id};o.filters.assigneeId.length>0&&(V.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(V.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(V.typeId=o.filters.typeId[0]),c.value=!0,t("addActivity",V)},p=(E,T)=>{c.value=!1,t("update:filters",{...o.filters,[E]:T})},f=e.computed(()=>o.project?[o.project]:o.projects??[]),b=e.computed(()=>f.value.map(E=>({value:E.id,label:E.name}))),C=e.computed(()=>{var E;return(E=o.activityTypes)==null?void 0:E.map(T=>({value:T.id,label:T.name}))}),v=e.computed(()=>o.users.map(E=>({value:E.id,label:`${E.firstName} ${E.lastName}`,avatar:E.avatarUrl}))),w=E=>{o.selectedActivity&&t("update:activity",E)},_=E=>{t("update:activity",E)},g=E=>{t("archiveActivity",E)},x=E=>{t("unarchiveActivity",E)},B=E=>{c.value=!1,t("update:searchText",E)},S=E=>{c.value=!1,t("clear:searchText",E)},L=E=>{o.selectedActivity&&t("addSubtask",E)},I=E=>{o.selectedActivity&&t("updateSubtask",E)},z=E=>{o.selectedActivity&&t("deleteSubtask",E)},$=E=>{t("addFiles",E)},P=E=>{t("removeFile",E)},A=E=>{o.selectedActivity&&t("addComment",{...E,activityId:o.selectedActivity.id})},D=E=>{const{id:T}=o.selectedActivity||{};T&&t("updateComment",E)},W=E=>{const{id:T}=o.selectedActivity||{};T&&t("removeComment",E)};return(E,T)=>{var k;return e.openBlock(),e.createElementBlock("div",M7,[e.createVNode(oa,null,{primary:e.withCtx(()=>[e.createElementVNode("div",A7,[o.project?(e.openBlock(),e.createBlock(Sr,{key:0,"is-left":!1,"right-label":E.$t("project.switch.feed"),"left-label":E.$t("project.switch.overview"),"onUpdate:isLeft":T[0]||(T[0]=h=>{h&&E.$router.push({name:e.unref(Ce).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(N7,{"model-value":E.searchText,placeholder:E.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":B,onClear:S},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:1,"model-value":E.filters[e.unref(Ke).project],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:E.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":T[1]||(T[1]=h=>p(e.unref(Ke).project,h))},null,8,["model-value","options","placeholder"])),C.value?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":E.filters[e.unref(Ke).type],mode:"tags",options:C.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:E.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":T[2]||(T[2]=h=>p(e.unref(Ke).type,h))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),v.value.length?(e.openBlock(),e.createBlock(ie,{key:3,"model-value":E.filters[e.unref(Ke).assignee],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:E.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":T[3]||(T[3]=h=>p(e.unref(Ke).assignee,h))},{tag:e.withCtx(({option:h,handleTagRemove:V})=>[e.createVNode(ye,{"user-name":h.label,"avatar-url":h.avatar,"is-closable":!0,onClose:R=>V(h,R)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":E.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":E.showsOnlyImportant,onClick:T[4]||(T[4]=h=>E.$emit("update:showsOnlyImportant",!E.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":E.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":E.showsArchivedActivities,onClick:T[5]||(T[5]=h=>E.$emit("update:showsArchivedActivities",!E.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",T7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.statuses,h=>(e.openBlock(),e.createBlock(V7,{key:h.id,status:h,list:i.value[h.id],title:h.name,"footer-label":E.$t("feed.activity.add"),users:E.users,"user-id":E.userId,"is-editable":E.isEditable,tagType:u.value,onAdd:()=>m(h),onSelectActivity:s,onArchiveActivity:g,onUnarchiveActivity:x,onUpdateActivity:_},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[E.selectedActivity?(e.openBlock(),e.createBlock(Qa,{key:0,activity:E.selectedActivity,"activity-types":E.activityTypes,"milestone-id":(k=E.selectedActivity.milestone)==null?void 0:k.id,"template-activities":n.value,users:E.users,"user-id":E.userId,"is-task-checkable":E.isTaskCheckable,statuses:E.statuses,breadcrumbs:d.value,"is-editable":E.isEditable,"attachment-enabled":E.attachmentEnabled,projects:f.value,onClose:T[6]||(T[6]=()=>s(null)),"onUpdate:activity":w,onAddSubtask:L,onUpdateSubtask:I,onDeleteSubtask:z,onAddFiles:$,onRemoveFile:P,onAddComment:A,onUpdateComment:D,onRemoveComment:W},{default:e.withCtx(h=>[e.renderSlot(E.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(h)))]),_: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)]))])}}}),f4="",at={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},O7=(a,t={})=>[{path:a,name:at.TEMPLATES,redirect:{name:at.TEMPLATES_LIST},...t,children:[{path:"",name:at.TEMPLATES_LIST,component:Ar},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:at.TEMPLATE_DETAILS,component:Br,props:!0}]}],Ce={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},L7=(a,t={})=>[{path:a,...t,redirect:{name:Ce.project},children:[{path:"",name:Ce.project,component:J5,props:!0,children:[{path:":phaseId/:milestoneId",name:Ce.milestone,component:Nr,props:!0},{path:":phaseId/:milestoneId/:activityId",name:Ce.activity,props:{default:!0,modal:!0},components:{default:Nr,modal:s7}}]},{path:"feed",name:Ce.feed,component:Mr,props:!0}]}],I7={class:"ao-templates"},Ar=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:r}=et();e.watch(()=>o.templates,(l,c)=>{Ae(l,c)});const n=()=>{var m,p;const l=(m=o.templates)==null?void 0:m.at(-1),c=l?ue.LexoRank.parse(l.rank).genNext():ue.LexoRank.middle(),u=((p=o.templates)==null?void 0:p.length)??0,d={name:r("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},s=(l,c)=>{t("updateItem",{itemType:ee.TEMPLATES,id:l,templateId:l,data:{name:c}})},i=l=>{if(l.moved){const c=Mt(l,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",I7,[e.createVNode(oa,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(Ie),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:i},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(O0,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(s0)(u.phases):0,activities:u.phases?e.unref(l0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:m=>s(u.id,m),onClick:m=>l.$router.push({name:e.unref(at).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),h4="",D7={class:"ao-field__label"},Tr=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",D7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),z7=["type","value","disabled","readonly"],P7=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(Tr,{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,z7)]),_:1},8,["label"]))}}),H7={class:"ao-field"},j7={class:"ao-field__label"},R7=["checked","disabled"],F7=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",H7,[e.createElementVNode("span",j7,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,R7)]))}});K.AoAvatar=ye,K.AoCardFeed=to,K.AoCheckboxField=F7,K.AoFeed=Mr,K.AoField=Tr,K.AoInputField=P7,K.AoMultiselect=ie,K.AoProjectPhases=Vr,K.AoTemplateDetails=Br,K.AoTemplates=jr,K.AoTemplatesList=Ar,K.TemplateItemTypeEnum=So,K.activityFeedStatus=kd,K.durationTypes=wd,K.feedFilterTypes=Ke,K.getProjectOverviewRoutes=L7,K.getTemplateRoutes=O7,K.listUpdateTypes=$d,K.milestoneStatus=Wt,K.projectOverviewRoutes=Ce,K.ruleComparators=Eo,K.ruleDurationUnits=Vo,K.ruleTriggerTypes=Bo,K.templateItemType=ee,K.templateRouteNames=at,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
6
+ */function tt(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=$f(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}=Ef(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 kf({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 $f(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 Ef({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 u=r.getImageData(Math.min(l,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})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Bf={ref:"canvasSaturation"};function Vf(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",Bf,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}ro.render=Vf,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,u,d]=l.data;this.$emit("selectHue",{r:c,g:u,b:d})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const Sf={ref:"canvasHue"};function xf(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",Sf,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}no.render=xf,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 Nf={ref:"canvasAlpha"};function Mf(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",Nf,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}io.render=Mf,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 Af(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}so.render=Af,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,p,f,b]=d.data;b=parseFloat((b/255).toFixed(2));const C=this.suckerPreview.style;Object.assign(C,{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]?C.display="":C.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,u=r-n,m=a.getContext("2d").getImageData(Math.min(c,i-1),Math.min(u,l-1),1,1);let[p,f,b,C]=m.data;C=parseFloat((C/255).toFixed(2)),this.$emit("selectSucker",{r:p,g:f,b,a:C})}))}}});const Tf=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),Of={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Lf=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 If(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))},[Tf],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Of,[Lf])):e.createCommentVNode("v-if",!0)])}lo.render=If,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 Df={class:"color-type"},zf={class:"name"};function Pf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",Df,[e.createVNode("span",zf,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=Pf,co.__file="src/color/Box.vue";var uo=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||[],u=c.indexOf(l);u>=0&&c.splice(u,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 Hf={class:"colors"},jf={key:0,class:"colors history"};function Rf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Hf,[(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",jf,[(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)])}uo.render=Rf,uo.__file="src/color/Colors.vue";var _t=e.defineComponent({components:{Saturation:ro,Hue:no,Alpha:io,Preview:so,Sucker:lo,Box:co,Colors:uo},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 kf(this.rgba,!0)}},created(){Object.assign(this,tt(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}=tt(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}=tt(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}=tt(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}=tt(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}=tt(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}=tt(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 Ff={class:"color-set"};function Uf(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=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",Ff,[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(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)}_t.render=Uf,_t.__file="src/color/ColorPicker.vue",_t.install=a=>{a.component(_t.name,_t)};const l4="",c4="",Zf={props:{color:{type:String,required:!0}},components:{ColorPicker:_t},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)}}},Wf={class:"color-picker-wrapper"};function qf(a,t,o,r,n,s){const i=e.resolveComponent("ColorPicker");return e.openBlock(),e.createElementBlock("div",Wf,[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 Yf=O(Zf,[["render",qf]]),Kf={class:"ao-project-milestone"},Gf={class:"ao-project-milestone__header"},Xf={class:"ao-project-milestone__header_line"},Qf={class:"ao-project-milestone__header_line"},Jf={class:"ao-project-milestone__title"},e7={key:0,class:"ao-fieldset ao-milestone__fieldset"},t7={class:"ao-field__row ao-milestone__field-row"},a7={class:"ao-field ao-field--inline"},o7={class:"ao-field__row ao-milestone__field-row"},r7={class:"ao-field ao-milestone__field-multiselect"},n7={class:"ao-project-milestone__body"},i7={key:0,class:"ao-project-milestone__footer"},Nr=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}=et(),n=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.find(g=>g.id===o.phaseId)}),s=e.computed(()=>{var _;return(_=o.phases)==null?void 0:_.flatMap(g=>g.milestones)}),i=e.computed(()=>{var _;return(_=s.value)==null?void 0:_.find(g=>g.id===o.milestoneId)}),l=e.computed(()=>{var _;return(_=i.value)==null?void 0:_.activities});e.watch(l,(_,g)=>{Ae(_,g)});const c=_=>{t("close",_)},u=()=>{const{name:_,rank:g}=gt(l.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:_,rank:g,projectId:o.projectId})},d=_=>{t("updateActivity",_)},m=_=>{l.value&&"moved"in _&&t("updateActivity",{id:_.moved.element.id,rank:lt(l.value,_.moved.newIndex)})},p=e.computed({get:()=>{var _;return(_=i.value)==null?void 0:_.color},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,color:_})}}),f=e.computed({get:()=>{var _;return((_=i==null?void 0:i.value)==null?void 0:_.deadline)??""},set:_=>{i.value&&t("updateMilestone",{id:i.value.id,deadline:_!=null&&_.length?_:null})}}),b=_=>o.closedStatus?Ta(_,o.closedStatus):!1,C=e.computed(()=>{var _;return((_=o.users)==null?void 0:_.map(g=>({label:`${g.firstName} ${g.lastName}`,value:g.id,avatar:g.avatarUrl})))||[]}),v=e.computed({get(){var _,g;return(g=(_=i.value)==null?void 0:_.assignee)!=null&&g.id?[i.value.assignee.id]:[]},set(_){t("updateMilestone",{id:o.milestoneId,assigneeId:_[0]??null})}}),w=e.computed({get(){var _;return((_=i.value)==null?void 0:_.important)??!1},set(_){t("updateMilestone",{id:o.milestoneId,important:_})}});return(_,g)=>{var x;return e.openBlock(),e.createElementBlock("div",Kf,[e.createElementVNode("header",Gf,[e.createElementVNode("div",Xf,[e.createVNode(X,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",Qf,[e.createElementVNode("div",Jf,[e.createVNode(re,{title:((x=i.value)==null?void 0:x.name)||_.milestoneId,level:5},null,8,["title"]),e.createVNode(Xa,{modelValue:w.value,"onUpdate:modelValue":g[0]||(g[0]=B=>w.value=B),modelModifiers:{lazy:!0},disabled:!_.isEditable,class:"ao-milestone__important",color:"danger",label:_.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),i.value?(e.openBlock(),e.createElementBlock("div",e7,[e.createElementVNode("div",t7,[e.createElementVNode("label",a7,[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",o7,[e.createElementVNode("label",r7,[e.createVNode(ie,{modelValue:v.value,"onUpdate:modelValue":g[2]||(g[2]=B=>v.value=B),options:C.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:_.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!_.isEditable,caret:_.isEditable},{tag:e.withCtx(({option:B,handleTagRemove:S})=>[e.createVNode(ye,{"user-name":B.label,"avatar-url":B.avatar,"is-closable":!0,onClose:L=>S(B,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Yf,{color:p.value,"onUpdate:color":g[3]||(g[3]=B=>p.value=B)},null,8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",n7,[e.createVNode(e.unref(Ie),e.mergeProps({class:"ao-project-milestone__activities",list:l.value,disabled:!_.isEditable,"item-key":"id",group:"kanban"},_.$attrs,{onChange:m}),{item:e.withCtx(({element:B})=>{var S,L,I,z,$;return[e.createVNode(to,{id:B.id,name:B.name||B.id,"phase-name":(S=n.value)==null?void 0:S.name,"milestone-name":(L=i.value)==null?void 0:L.name,"milestone-color":(I=i.value)==null?void 0:I.color,deadline:B.deadline,important:B.important,users:_.users,assignee:B.assignee,slug:B.slug,comments:(z=B.comments)==null?void 0:z.length,attachments:($=B.attachments)==null?void 0:$.length,tasks:B.tasks,"is-editable":_.isEditable,"is-private":B.private,"is-closed":b(B),onClick:P=>_.$router.push({name:e.unref(Ce).activity,params:{milestoneId:_.milestoneId,activityId:B.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:B.id,assigneeId:null})},e.createSlots({_:2},[_.isEditable?{name:"secondary",fn:e.withCtx(()=>[_.isEditable&&B.active?(e.openBlock(),e.createBlock(X,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("archive"),onClick:e.withModifiers(()=>_.$emit("archiveActivity",{id:B.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),_.isEditable&&!B.active?(e.openBlock(),e.createBlock(X,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:_.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>_.$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"]),_.isEditable?(e.openBlock(),e.createElementBlock("div",i7,[e.createVNode(ze,{"icon-name":"Add",label:_.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),d4="",s7=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 v;return(v=o.phases)==null?void 0:v.find(w=>w.id===o.phaseId)}),n=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(w=>w.milestones)}),s=e.computed(()=>{var v;return(v=n.value)==null?void 0:v.find(w=>w.id===o.milestoneId)}),i=e.computed(()=>{var v;return(v=o.activities)==null?void 0:v.find(w=>w.id===o.activityId)}),l=v=>{t("update:activity",v)},c=v=>{t("addSubtask",v)},u=v=>{t("updateSubtask",v)},d=v=>{t("deleteSubtask",v)},m=v=>{t("addFiles",v)},p=v=>{t("removeFile",v)},f=v=>{t("addComment",v)},b=v=>{t("updateComment",v)},C=v=>{t("removeComment",v)};return(v,w)=>{var _,g;return i.value?(e.openBlock(),e.createBlock(Qa,{key:0,activity:i.value,"activity-types":v.activityTypes,"milestone-id":v.milestoneId,"template-activities":v.activities,"is-template":!1,users:v.users,"user-id":v.userId,"is-task-checkable":v.isTaskCheckable,statuses:v.statuses,breadcrumbs:`${(_=r.value)==null?void 0:_.name} / ${(g=s.value)==null?void 0:g.name}`,"is-editable":v.isEditable,"attachment-enabled":v.attachmentEnabled,projects:[v.project],onClose:v.$router.back,"onUpdate:activity":l,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:m,onRemoveFile:p,onAddComment:f,onUpdateComment:b,onRemoveComment:C},{default:e.withCtx(x=>[e.renderSlot(v.$slots,"default",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","onClose"])):e.createCommentVNode("",!0)}}}),l7={class:"ao-col-header"},c7=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",l7,[e.createVNode(re,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Zt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),u4="";function d7(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function va(a){return typeof a=="function"?a():e.unref(a)}const u7=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const p7=a=>a!=null,zt=()=>{};function m7(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 f7(a,t={}){let o,r,n=zt;const s=l=>{clearTimeout(l),n(),n=zt};return l=>{const c=va(a),u=va(t.maxWait);return o&&s(o),c<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((d,m)=>{n=t.rejectOnCancel?m:d,u&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,d(l())},u)),o=setTimeout(()=>{r&&s(r),r=null,d(l())},c)})}}function h7(a,t=200,o={}){return m7(f7(t,o),a)}function po(a){var t;const o=va(a);return(t=o==null?void 0:o.$el)!=null?t:o}const g7=u7?window:void 0;function _7(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function v7(a){const t=_7();return e.computed(()=>(t.value,!!a()))}function C7(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=g7,immediate:l=!0}=o,c=v7(()=>i&&"IntersectionObserver"in i),u=e.computed(()=>{const b=va(a);return(Array.isArray(b)?b:[b]).map(po).filter(p7)});let d=zt;const m=e.ref(l),p=c.value?e.watch(()=>[u.value,po(r),m.value],([b,C])=>{if(d(),!m.value||!b.length)return;const v=new IntersectionObserver(t,{root:po(C),rootMargin:n,threshold:s});b.forEach(w=>w&&v.observe(w)),d=()=>{v.disconnect(),d=zt}},{immediate:l,flush:"post"}):zt,f=()=>{d(),p(),m.value=!1};return d7(f),{isSupported:c,isActive:m,pause(){d(),m.value=!1},resume(){m.value=!0},stop:f}}const b7={class:e.normalizeClass(["ao-list-kanban"])},y7={class:"ao-list-kanban__header"},w7={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},k7={key:1,class:"ao-list-kanban__end"},$7={key:0,class:"ao-list-kanban__no-more"},E7={key:1,class:"ao-list-kanban__divider"},B7={key:1,class:"ao-list-kanban__footer"},V7=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);C7(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:lt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:lt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,m)=>(e.openBlock(),e.createElementBlock("div",b7,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var p;return[e.createElementVNode("div",y7,[d.title?(e.openBlock(),e.createBlock(c7,{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(Ie),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,C,v,w,_,g,x,B;return[e.createVNode(to,{class:e.normalizeClass(s(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":(v=(C=p.milestone)==null?void 0:C.phase)==null?void 0:v.name,"milestone-name":(w=p.milestone)==null?void 0:w.name,"milestone-color":(_=p.milestone)==null?void 0:_.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:(x=p.comments)==null?void 0:x.length,attachments:(B=p.attachments)==null?void 0:B.length,users:d.users,assignee:p.assignee,slug:p.slug,"is-editable":s(p),"is-private":p.private,"tag-type":d.tagType,onUpdateActivity:[S=>s(p)&&l(S),()=>s(p)&&l],onClick:()=>i(p.id),onRemoveAssignee:()=>s(p)&&l({id:p.id,assigneeId:null})},{secondary:e.withCtx(()=>[s(p)&&p.active?(e.openBlock(),e.createBlock(X,{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),s(p)&&!p.active?(e.openBlock(),e.createBlock(X,{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",w7,[e.createVNode(J,{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",k7,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",$7,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",E7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",B7,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(ze,{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)]))}}),p4="",S7={class:"ao-field ao-search-field"},x7=["value","placeholder","onKeypress"],N7=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=h7(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",S7,[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,x7),e.createVNode(J,{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(X,{"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"])]))}}),m4="",M7={class:"ao-feed"},A7={class:"ao-feed__filters"},T7={class:"ao-feed__body"},Mr=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{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","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,{t:r}=et(),n=e.toRef(o,"activities"),s=async E=>{await t("selectActivity",E)},i=e.ref({}),l=e.ref(!1),c=e.ref(!1),u=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId],async([E,T,k],[h,V])=>{i.value=Object.fromEntries(E.map(R=>[R.id,T.filter(F=>{var G;return((G=F.status)==null?void 0:G.id)===R.id})])),k&&!l.value&&(s(k),l.value=!0),c.value&&Ae(T,V)},{immediate:!0});const d=e.computed(()=>{var E;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((E=o.selectedActivity.milestone.phase)==null?void 0:E.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=E=>{var R,F;const T=(R=o.activities)==null?void 0:R.at(-1),k=T?ue.LexoRank.parse(T.rank).genNext():ue.LexoRank.middle(),h=((F=o.activities)==null?void 0:F.length)??0,V={name:r("activity.defaultName",{idx:h+1}),rank:k.format(),statusId:E.id};o.filters.assigneeId.length>0&&(V.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(V.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(V.typeId=o.filters.typeId[0]),c.value=!0,t("addActivity",V)},p=(E,T)=>{c.value=!1,t("update:filters",{...o.filters,[E]:T})},f=e.computed(()=>o.project?[o.project]:o.projects??[]),b=e.computed(()=>f.value.map(E=>({value:E.id,label:E.name}))),C=e.computed(()=>{var E;return(E=o.activityTypes)==null?void 0:E.map(T=>({value:T.id,label:T.name}))}),v=e.computed(()=>o.users.map(E=>({value:E.id,label:`${E.firstName} ${E.lastName}`,avatar:E.avatarUrl}))),w=E=>{o.selectedActivity&&t("update:activity",E)},_=E=>{t("update:activity",E)},g=E=>{t("archiveActivity",E)},x=E=>{t("unarchiveActivity",E)},B=E=>{c.value=!1,t("update:searchText",E)},S=E=>{c.value=!1,t("clear:searchText",E)},L=E=>{o.selectedActivity&&t("addSubtask",E)},I=E=>{o.selectedActivity&&t("updateSubtask",E)},z=E=>{o.selectedActivity&&t("deleteSubtask",E)},$=E=>{t("addFiles",E)},P=E=>{t("removeFile",E)},A=E=>{o.selectedActivity&&t("addComment",{...E,activityId:o.selectedActivity.id})},D=E=>{const{id:T}=o.selectedActivity||{};T&&t("updateComment",E)},W=E=>{const{id:T}=o.selectedActivity||{};T&&t("removeComment",E)};return(E,T)=>{var k;return e.openBlock(),e.createElementBlock("div",M7,[e.createVNode(oa,null,{primary:e.withCtx(()=>[e.createElementVNode("div",A7,[o.project?(e.openBlock(),e.createBlock(Sr,{key:0,"is-left":!1,"right-label":E.$t("project.switch.feed"),"left-label":E.$t("project.switch.overview"),"onUpdate:isLeft":T[0]||(T[0]=h=>{h&&E.$router.push({name:e.unref(Ce).project})})},null,8,["right-label","left-label"])):e.createCommentVNode("",!0),e.createVNode(N7,{"model-value":E.searchText,placeholder:E.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":B,onClear:S},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie,{key:1,"model-value":E.filters[e.unref(Ke).project],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:E.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":T[1]||(T[1]=h=>p(e.unref(Ke).project,h))},null,8,["model-value","options","placeholder"])),C.value?(e.openBlock(),e.createBlock(ie,{key:2,"model-value":E.filters[e.unref(Ke).type],mode:"tags",options:C.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:E.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":T[2]||(T[2]=h=>p(e.unref(Ke).type,h))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),v.value.length?(e.openBlock(),e.createBlock(ie,{key:3,"model-value":E.filters[e.unref(Ke).assignee],mode:"tags",options:v.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:E.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":T[3]||(T[3]=h=>p(e.unref(Ke).assignee,h))},{tag:e.withCtx(({option:h,handleTagRemove:V})=>[e.createVNode(ye,{"user-name":h.label,"avatar-url":h.avatar,"is-closable":!0,onClose:R=>V(h,R)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(X,{class:"ao-feed__only-important",size:"sm","icon-name":E.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":E.showsOnlyImportant,onClick:T[4]||(T[4]=h=>E.$emit("update:showsOnlyImportant",!E.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(X,{class:"ao-feed__show-archived",size:"sm","icon-name":E.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:E.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":E.showsArchivedActivities,onClick:T[5]||(T[5]=h=>E.$emit("update:showsArchivedActivities",!E.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",T7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.statuses,h=>(e.openBlock(),e.createBlock(V7,{key:h.id,status:h,list:i.value[h.id],title:h.name,"footer-label":E.$t("feed.activity.add"),users:E.users,"user-id":E.userId,"is-editable":E.isEditable,tagType:u.value,onAdd:()=>m(h),onSelectActivity:s,onArchiveActivity:g,onUnarchiveActivity:x,onUpdateActivity:_},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[E.selectedActivity?(e.openBlock(),e.createBlock(Qa,{key:0,activity:E.selectedActivity,"activity-types":E.activityTypes,"milestone-id":(k=E.selectedActivity.milestone)==null?void 0:k.id,"template-activities":n.value,users:E.users,"user-id":E.userId,"is-task-checkable":E.isTaskCheckable,statuses:E.statuses,breadcrumbs:d.value,"is-editable":E.isEditable,"attachment-enabled":E.attachmentEnabled,projects:f.value,onClose:T[6]||(T[6]=()=>s(null)),"onUpdate:activity":w,onAddSubtask:L,onUpdateSubtask:I,onDeleteSubtask:z,onAddFiles:$,onRemoveFile:P,onAddComment:A,onUpdateComment:D,onRemoveComment:W},{default:e.withCtx(h=>[e.renderSlot(E.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(h)))]),_: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)]))])}}}),f4="",at={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},O7=(a,t={})=>[{path:a,name:at.TEMPLATES,redirect:{name:at.TEMPLATES_LIST},...t,children:[{path:"",name:at.TEMPLATES_LIST,component:Ar},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:at.TEMPLATE_DETAILS,component:Br,props:!0}]}],Ce={project:"AoProject",feed:"AoProjectFeed",milestone:"AoMilestone",activity:"AoActivity"},L7=(a,t={})=>[{path:a,...t,redirect:{name:Ce.project},children:[{path:"",name:Ce.project,component:J5,props:!0,children:[{path:":phaseId/:milestoneId",name:Ce.milestone,component:Nr,props:!0},{path:":phaseId/:milestoneId/:activityId",name:Ce.activity,props:{default:!0,modal:!0},components:{default:Nr,modal:s7}}]},{path:"feed",name:Ce.feed,component:Mr,props:!0}]}],I7={class:"ao-templates"},Ar=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem"],setup(a,{emit:t}){const o=a,{t:r}=et();e.watch(()=>o.templates,(l,c)=>{Ae(l,c)});const n=()=>{var m,p;const l=(m=o.templates)==null?void 0:m.at(-1),c=l?ue.LexoRank.parse(l.rank).genNext():ue.LexoRank.middle(),u=((p=o.templates)==null?void 0:p.length)??0,d={name:r("template.defaultName.template",{idx:u+1}),rank:c.format()};t("addTemplate",d)},s=(l,c)=>{t("updateItem",{itemType:ee.TEMPLATES,id:l,templateId:l,data:{name:c}})},i=l=>{if(l.moved){const c=Mt(l,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:l.moved.element.id,templateId:l.moved.element.id,data:{rank:c}})}};return(l,c)=>(e.openBlock(),e.createElementBlock("div",I7,[e.createVNode(oa,null,{secondary:e.withCtx(()=>[e.createVNode(X,{label:l.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(Ie),{"model-value":l.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:i},{item:e.withCtx(({element:u})=>{var d;return[e.createVNode(O0,{id:u.id,title:u.name,phases:u.phases,milestones:(d=u.phases)!=null&&d.length?e.unref(s0)(u.phases):0,activities:u.phases?e.unref(l0)(u.phases):0,"updated-at":u.updatedAt,"updated-by":u.updatedBy,onUpdateTitle:m=>s(u.id,m),onClick:m=>l.$router.push({name:e.unref(at).TEMPLATE_DETAILS,params:{templateId:u.id}})},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),h4="",D7={class:"ao-field__label"},Tr=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",D7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),z7=["type","value","disabled","readonly"],P7=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(Tr,{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,z7)]),_:1},8,["label"]))}}),H7={class:"ao-field"},j7={class:"ao-field__label"},R7=["checked","disabled"],F7=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",H7,[e.createElementVNode("span",j7,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,R7)]))}});K.AoAvatar=ye,K.AoCardFeed=to,K.AoCheckboxField=F7,K.AoFeed=Mr,K.AoField=Tr,K.AoInputField=P7,K.AoMultiselect=ie,K.AoProjectPhases=Vr,K.AoTemplateDetails=Br,K.AoTemplates=jr,K.AoTemplatesList=Ar,K.TemplateItemTypeEnum=So,K.activityFeedStatus=kd,K.durationTypes=wd,K.feedFilterTypes=Ke,K.getProjectOverviewRoutes=L7,K.getTemplateRoutes=O7,K.listUpdateTypes=$d,K.milestoneStatus=Wt,K.projectOverviewRoutes=Ce,K.ruleComparators=Eo,K.ruleDurationUnits=Vo,K.ruleTriggerTypes=Bo,K.templateItemType=ee,K.templateRouteNames=at,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
@@ -56,9 +56,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
56
56
  initialActivityId: {
57
57
  type: import("vue").PropType<string>;
58
58
  };
59
- initialActivitySlug: {
60
- type: import("vue").PropType<string>;
61
- };
62
59
  searchText: {
63
60
  type: import("vue").PropType<string>;
64
61
  default: string;
@@ -146,9 +143,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
146
143
  initialActivityId: {
147
144
  type: import("vue").PropType<string>;
148
145
  };
149
- initialActivitySlug: {
150
- type: import("vue").PropType<string>;
151
- };
152
146
  searchText: {
153
147
  type: import("vue").PropType<string>;
154
148
  default: string;
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.37.33",
7
+ "version": "0.37.34",
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.37.33",
30
+ "@26lights/orcha": "^0.37.34",
31
31
  "@floating-ui/dom": "^1.5.3",
32
32
  "@vueform/multiselect": "^2.6.6",
33
33
  "@vueuse/core": "^10.8.0",