cosmosc2-tool-calendar 5.0.4 → 5.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +0,0 @@
1
- (self["webpackChunk_cosmosc2_tool_calendar"]=self["webpackChunk_cosmosc2_tool_calendar"]||[]).push([[574],{4574:function(n,e,t){"use strict";t.r(e),t.d(e,{default:function(){return Wt}});var l=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("top-bar",{attrs:{title:n.title}}),t("v-container",{attrs:{dense:""}},[t("v-row",[t("v-col",{staticClass:"pa-1"},[t("calendar-toolbar",{attrs:{timelines:n.timelines,events:n.calendarEvents},on:{action:n.actionHandler},model:{value:n.calendarConfiguration,callback:function(e){n.calendarConfiguration=e},expression:"calendarConfiguration"}})],1)],1),t("v-row",[t("v-col",{staticStyle:{"max-width":"300px"}},[t("mini-calendar",{model:{value:n.calendarConfiguration,callback:function(e){n.calendarConfiguration=e},expression:"calendarConfiguration"}}),t("v-divider",{staticClass:"my-1"}),t("calendar-selector",{attrs:{timelines:n.timelines},model:{value:n.selectedCalendars,callback:function(e){n.selectedCalendars=e},expression:"selectedCalendars"}})],1),t("v-col",{staticClass:"pa-1"},[t("event-calendar",{ref:"eventCalendar",attrs:{events:n.calendarEvents},model:{value:n.calendarConfiguration,callback:function(e){n.calendarConfiguration=e},expression:"calendarConfiguration"}})],1)],1)],1)],1)},i=[],o=t(8373),a=t(6711),s=(t(8188),t(1939),t(8178),t(5342),t(4769),t(9529),t(1235),t(9228),t(9949),t(2501),t(9805),t(8995),t(1720)),c=t(9490),r=t(9644),u=t.n(r),m=t(4091),d=new m["default"],A=u().create({baseURL:location.origin,timeout:1e4,params:{}});A.interceptors.response.use((function(n){return n}),(function(n){if(401===n.response.status)delete localStorage.cosmosToken,CosmosAuth.login(location.href);else{var e,t,l,i,o,a,s,c,r,u,m="HTTP ".concat(n.response.status," - ");if(null!==(e=n.response)&&void 0!==e&&e.statusText&&(m+="".concat(n.response.statusText," ")),null!==(t=n.response)&&void 0!==t&&null!==(l=t.config)&&void 0!==l&&l.data&&(m+="".concat(n.response.config.data," ")),null!==(i=n.response)&&void 0!==i&&null!==(o=i.data)&&void 0!==o&&o.message)m+="".concat(n.response.data.message);else if(null!==(a=n.response)&&void 0!==a&&null!==(s=a.data)&&void 0!==s&&s.exception)m+="".concat(n.response.data.exception);else if(null!==(c=n.response)&&void 0!==c&&null!==(r=c.data)&&void 0!==r&&null!==(u=r.error)&&void 0!==u&&u.message)n.response.data.error.class&&(m+="".concat(n.response.data.error.class," ")),m+="".concat(n.response.data.error.message);else{var A;m+="".concat(null===(A=n.response)||void 0===A?void 0:A.data)}d.$notify.serious({title:"Network error",body:m})}throw n}));var v=A,p=function(){var n=(0,c.Z)((0,s.Z)().mark((function n(e,t){var l,i,o,a,c,r,u,m,d,A=arguments;return(0,s.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(l=A.length>2&&void 0!==A[2]?A[2]:{},i=l.data,o=l.params,a=void 0===o?{}:o,c=l.headers,r=l.noAuth,u=void 0!==r&&r,m=l.noScope,d=void 0!==m&&m,u){n.next=11;break}return n.prev=2,n.next=5,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 5:n.next=10;break;case 7:n.prev=7,n.t0=n["catch"](2),CosmosAuth.login();case 10:c["Authorization"]=localStorage.cosmosToken;case 11:return d||a["scope"]||(a["scope"]=localStorage.scope),n.abrupt("return",v({method:e,url:t,data:i,params:a,headers:c}));case 13:case"end":return n.stop()}}),n,null,[[2,7]])})));return function(e,t){return n.apply(this,arguments)}}(),h={Accept:"application/json"},C=(0,o.Z)((0,o.Z)({},h),{},{"Content-Type":"application/json"}),f={get:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,l=e.headers,i=void 0===l?h:l,o=e.noScope,a=e.noAuth;return p("get",n,{params:t,headers:i,noScope:o,noAuth:a})},put:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,l=e.params,i=e.headers,o=void 0===i?C:i,a=e.noScope,s=e.noAuth;return p("put",n,{data:t,params:l,headers:o,noScope:a,noAuth:s})},post:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.data,l=e.params,i=e.headers,o=void 0===i?C:i,a=e.noScope,s=e.noAuth;return p("post",n,{data:t,params:l,headers:o,noScope:a,noAuth:s})},delete:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.params,l=e.headers,i=void 0===l?h:l,o=e.noScope,a=e.noAuth;return p("delete",n,{params:t,headers:i,noScope:o,noAuth:a})}},y=t(6330),b=t(2209),g=t(3492);g.ConnectionMonitor.staleThreshold=60;var _=function(){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/cosmos-api/cable";(0,y.Z)(this,n),this._cable=g.createConsumer(e)}return(0,b.Z)(n,[{key:"disconnect",value:function(){this._cable.disconnect()}},{key:"createSubscription",value:function(n,e){var t=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return CosmosAuth.updateToken(CosmosAuth.defaultMinValidity).then((function(){return t._cable.subscriptions.create((0,o.Z)({channel:n,scope:e,token:localStorage.cosmosToken},i),l)}))}}]),n}(),w=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("mounting-portal",{attrs:{"mount-to":"#cosmos-menu",append:""}},[t("div",{staticClass:"v-toolbar__content"},[n._l(n.menus,(function(e,l){return t("v-menu",{key:l,attrs:{"offset-y":""},scopedSlots:n._u([{key:"activator",fn:function(l){var i=l.on,o=l.attrs;return[t("v-btn",n._g(n._b({staticClass:"mx-1",attrs:{outlined:"","data-test":n.formatDT(n.title+" "+e.label)}},"v-btn",o,!1),i),[t("span",{domProps:{textContent:n._s(e.label)}}),t("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)]}}],null,!0)},[t("v-list",[t("v-radio-group",{staticClass:"ma-0 pa-0",attrs:{value:e.radioGroup,"hide-details":"",dense:""}},[n._l(e.items,(function(l,i){return[l.divider?t("v-divider",{key:i}):t("v-list-item",{key:i,attrs:{disabled:l.disabled,"data-test":n.formatDT(n.title+" "+e.label+" "+l.label)},on:{click:l.command}},[l.radio?t("v-list-item-action",[t("v-radio",{attrs:{color:"secondary",label:l.label,value:l.label}})],1):n._e(),l.checkbox?t("v-list-item-action",[t("v-checkbox",{attrs:{color:"secondary",label:l.label,value:l.label},model:{value:n.checked,callback:function(e){n.checked=e},expression:"checked"}})],1):n._e(),l.icon?t("v-list-item-icon",[t("v-icon",{attrs:{disabled:l.disabled},domProps:{textContent:n._s(l.icon)}})],1):n._e(),l.radio||l.checkbox?n._e():t("v-list-item-title",{style:"cursor: pointer;"+(l.disabled?"opacity: 0.2":""),domProps:{textContent:n._s(l.label)}})],1)]}))],2)],1)],1)})),t("v-spacer"),t("v-toolbar-title",{domProps:{textContent:n._s(n.title)}}),t("v-spacer")],2)])},x=[],T=(t(7950),t(5940),t(1639),{props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(n){return n.replaceAll(" ","-").toLowerCase()}}}),k=T,E=(t(7162),t(3287)),D=(0,E.Z)(k,w,x,!1,null,"e3bb7458",null),S=D.exports,M=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-sheet",{staticClass:"mt-1",attrs:{height:"800"}},[t("v-calendar",{ref:"mainCalendar",attrs:{color:"primary",events:n.events,"event-color":n.getEventColor,type:n.type},on:{"click:event":n.showEvent,"click:more":n.viewDay,"click:date":n.viewDay},scopedSlots:n._u([{key:"day-body",fn:function(e){var l=e.date,i=e.week;return[t("div",{staticClass:"v-current-time",class:{first:l===i[0].date},style:{top:n.nowY}})]}}]),model:{value:n.focus,callback:function(e){n.focus=e},expression:"focus"}}),t("v-menu",{attrs:{"close-on-content-click":!1,activator:n.selectedElement},model:{value:n.selectedOpen,callback:function(e){n.selectedOpen=e},expression:"selectedOpen"}},[t("event-dialog",{attrs:{event:n.selectedEvent,utc:n.utc},on:{close:n.close},model:{value:n.selectedOpen,callback:function(e){n.selectedOpen=e},expression:"selectedOpen"}})],1)],1)],1)},F=[],N=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card",{attrs:{width:"400"}},["activity"===n.type?t("div",[t("activity-event-form",{attrs:{"activity-event":n.event,utc:n.utc},on:{close:n.close}})],1):n._e(),"note"===n.type?t("div",[t("note-event-form",{attrs:{"note-event":n.event,utc:n.utc},on:{close:n.close}})],1):n._e(),"metadata"===n.type?t("div",[t("metadata-event-form",{attrs:{"metadata-event":n.event,utc:n.utc},on:{close:n.close}})],1):n._e()])],1)},I=[],O=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card-title",[t("span",{domProps:{textContent:n._s(n.activityEvent.name)}}),t("v-spacer"),t("v-icon",[n._v(" "+n._s(n.activityBadgeIcon)+" ")])],1),t("v-card-subtitle",[t("span",[n._v(" "+n._s(n._f("dateTime")(n.activityEvent.start,n.utc))+" ")]),t("br"),t("span",[n._v(" "+n._s(n._f("dateTime")(n.activityEvent.end,n.utc))+" ")])]),t("div",{staticClass:"ma-2"},[t("v-card-text",[t("v-row",[t("v-col",{staticClass:"pa-0"},[t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left",attrs:{width:"100"}},[n._v("Fulfilled")]),t("td",{domProps:{textContent:n._s(n.activityFulfillment)}})]),t("tr",[t("th",{staticClass:"text-left",domProps:{textContent:n._s(n.activityKind)}}),t("td",{domProps:{textContent:n._s(n.activityData[n.activityKind])}})]),n.showEnv?t("tr",[t("th",{staticClass:"text-left"},[n._v("ENV")]),t("td",{domProps:{textContent:n._s(n.activityEnvironment)}})]):n._e()])])],1)],1),t("v-row",[t("v-col",[t("activity-event-timeline",{attrs:{"activity-events":n.activityEvents,utc:n.utc}})],1)],1),t("v-row",{staticClass:"pt-1"},[t("v-col",{staticClass:"text-right pa-0"},[t("span",{staticClass:"text-caption"},[n._v(" Last update: "+n._s(n._f("dateTime")(n.updated_at,n.utc))+" ")])])],1)],1),t("v-card-actions",[n.activityEvent.fulfillment?n._e():t("div",[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"update-activity"},on:{click:n.updateDialog}},[t("v-icon",[n._v(" mdi-pencil ")])],1)],1)]}}],null,!1,3672295435)},[t("span",[n._v(" Update ")])])],1),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"delete-activity"},on:{click:n.deleteDialog}},[t("v-icon",[n._v(" mdi-delete ")])],1)],1)]}}])},[t("span",[n._v(" Delete ")])])],1)],1),t("activity-update-dialog",{attrs:{activity:n.activityEvent.activity},on:{close:n.close},model:{value:n.showUpdateDialog,callback:function(e){n.showUpdateDialog=e},expression:"showUpdateDialog"}})],1)},R=[];t(8319);function $(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timeFilters.js",e="24417ba1900466472943e1835e886b0d8932ef86",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timeFilters.js",statementMap:{0:{start:{line:23,column:6},end:{line:27,column:7}},1:{start:{line:24,column:8},end:{line:24,column:46}},2:{start:{line:26,column:8},end:{line:26,column:49}},3:{start:{line:30,column:6},end:{line:34,column:7}},4:{start:{line:31,column:8},end:{line:31,column:32}},5:{start:{line:33,column:8},end:{line:33,column:35}},6:{start:{line:39,column:6},end:{line:43,column:7}},7:{start:{line:40,column:8},end:{line:40,column:33}},8:{start:{line:42,column:8},end:{line:42,column:36}},9:{start:{line:47,column:19},end:{line:47,column:37}},10:{start:{line:48,column:18},end:{line:48,column:43}},11:{start:{line:49,column:18},end:{line:49,column:38}},12:{start:{line:51,column:19},end:{line:51,column:44}},13:{start:{line:52,column:8},end:{line:52,column:44}},14:{start:{line:54,column:19},end:{line:54,column:37}},15:{start:{line:55,column:20},end:{line:55,column:44}},16:{start:{line:56,column:18},end:{line:56,column:37}},17:{start:{line:57,column:19},end:{line:57,column:39}},18:{start:{line:58,column:21},end:{line:58,column:43}},19:{start:{line:59,column:21},end:{line:59,column:43}},20:{start:{line:60,column:18},end:{line:60,column:45}},21:{start:{line:62,column:8},end:{line:64,column:47}},22:{start:{line:65,column:6},end:{line:65,column:90}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:22,column:10},end:{line:22,column:11}},loc:{start:{line:22,column:30},end:{line:28,column:5}},line:22},1:{name:"(anonymous_1)",decl:{start:{line:29,column:14},end:{line:29,column:15}},loc:{start:{line:29,column:34},end:{line:35,column:5}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:38,column:4},end:{line:38,column:5}},loc:{start:{line:38,column:32},end:{line:44,column:5}},line:38},3:{name:"(anonymous_3)",decl:{start:{line:45,column:4},end:{line:45,column:5}},loc:{start:{line:45,column:26},end:{line:66,column:5}},line:45},4:{name:"pad",decl:{start:{line:50,column:15},end:{line:50,column:18}},loc:{start:{line:50,column:24},end:{line:53,column:7}},line:50}},branchMap:{0:{loc:{start:{line:23,column:6},end:{line:27,column:7}},type:"if",locations:[{start:{line:23,column:6},end:{line:27,column:7}},{start:{line:25,column:13},end:{line:27,column:7}}],line:23},1:{loc:{start:{line:30,column:6},end:{line:34,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:34,column:7}},{start:{line:32,column:13},end:{line:34,column:7}}],line:30},2:{loc:{start:{line:39,column:6},end:{line:43,column:7}},type:"if",locations:[{start:{line:39,column:6},end:{line:43,column:7}},{start:{line:41,column:13},end:{line:43,column:7}}],line:39},3:{loc:{start:{line:49,column:18},end:{line:49,column:38}},type:"cond-expr",locations:[{start:{line:49,column:29},end:{line:49,column:32}},{start:{line:49,column:35},end:{line:49,column:38}}],line:49},4:{loc:{start:{line:52,column:16},end:{line:52,column:36}},type:"cond-expr",locations:[{start:{line:52,column:28},end:{line:52,column:31}},{start:{line:52,column:34},end:{line:52,column:36}}],line:52},5:{loc:{start:{line:62,column:8},end:{line:64,column:47}},type:"cond-expr",locations:[{start:{line:63,column:12},end:{line:63,column:19}},{start:{line:64,column:12},end:{line:64,column:47}}],line:62}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0},f:{0:0,1:0,2:0,3:0,4:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"24417ba1900466472943e1835e886b0d8932ef86"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return $=function(){return a},a}$();var U={filters:{time:function(n,e){return $().f[0]++,$().s[0]++,e?($().b[0][0]++,$().s[1]++,n.toUTCString().split(" ")[4]):($().b[0][1]++,$().s[2]++,n.toLocaleString().split(" ")[1])},dateTime:function(n,e){return $().f[1]++,$().s[3]++,e?($().b[1][0]++,$().s[4]++,n.toISOString()):($().b[1][1]++,$().s[5]++,n.toLocaleString())}},methods:{generateDateTime:function(n,e){return $().f[2]++,$().s[6]++,e?($().b[2][0]++,$().s[7]++,n.toISOString()):($().b[2][1]++,$().s[8]++,n.toLocaleString())},toIsoString:function(n){$().f[3]++;var e=($().s[9]++,new Date(n)),t=($().s[10]++,-e.getTimezoneOffset()),l=($().s[11]++,t>=0?($().b[3][0]++,"+"):($().b[3][1]++,"-"));function i(n){$().f[4]++;var e=($().s[12]++,Math.floor(Math.abs(n)));return $().s[13]++,(e<10?($().b[4][0]++,"0"):($().b[4][1]++,""))+e}var o=($().s[14]++,e.getFullYear()),a=($().s[15]++,i(e.getMonth()+1)),s=($().s[16]++,i(e.getDate())),c=($().s[17]++,i(e.getHours())),r=($().s[18]++,i(e.getMinutes())),u=($().s[19]++,i(e.getSeconds())),m=($().s[20]++,i(e.getMilliseconds())),d=($().s[21]++,"utc"===this.utcOrLocal?($().b[5][0]++,"00:00"):($().b[5][1]++,"".concat(i(t/60),":").concat(i(t%60))));return $().s[22]++,"".concat(o,"-").concat(a,"-").concat(s,"T").concat(c,":").concat(r,":").concat(u,".").concat(m).concat(l).concat(d)}}},L=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-timeline",{attrs:{"align-top":"",dense:""}},n._l(n.events,(function(e){return t("div",{key:e.event+e.time},[t("v-timeline-item",{attrs:{small:"",color:n.genColor(e),icon:n.genIcon(e)}},[t("v-row",{staticClass:"pt-1"},[t("v-col",[t("strong",{domProps:{textContent:n._s(e.event)}}),t("i",[n._v(" "+n._s(n._f("dateTime")(e.time,n.utc))+" ")]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.message,expression:"event.message"}],staticClass:"text-caption"},[n._v(" "+n._s(e.message)+" ")])])],1)],1)],1)})),0)},P=[];t(3450);function q(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventTimeline.vue",e="d8ec5b418b4f4375913e113ba7dadbb194d9c196",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventTimeline.vue",statementMap:{0:{start:{line:56,column:4},end:{line:58,column:5}},1:{start:{line:62,column:6},end:{line:64,column:8}},2:{start:{line:63,column:8},end:{line:63,column:64}},3:{start:{line:67,column:6},end:{line:88,column:7}},4:{start:{line:93,column:6},end:{line:93,column:43}},5:{start:{line:96,column:6},end:{line:96,column:78}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:55,column:2},end:{line:55,column:3}},loc:{start:{line:55,column:9},end:{line:59,column:3}},line:55},1:{name:"(anonymous_1)",decl:{start:{line:61,column:12},end:{line:61,column:13}},loc:{start:{line:61,column:24},end:{line:65,column:5}},line:61},2:{name:"(anonymous_2)",decl:{start:{line:62,column:37},end:{line:62,column:38}},loc:{start:{line:62,column:44},end:{line:64,column:7}},line:62},3:{name:"(anonymous_3)",decl:{start:{line:66,column:12},end:{line:66,column:13}},loc:{start:{line:66,column:24},end:{line:89,column:5}},line:66},4:{name:"(anonymous_4)",decl:{start:{line:92,column:4},end:{line:92,column:5}},loc:{start:{line:92,column:20},end:{line:94,column:5}},line:92},5:{name:"(anonymous_5)",decl:{start:{line:95,column:4},end:{line:95,column:5}},loc:{start:{line:95,column:19},end:{line:97,column:5}},line:95}},branchMap:{0:{loc:{start:{line:96,column:13},end:{line:96,column:78}},type:"cond-expr",locations:[{start:{line:96,column:28},end:{line:96,column:46}},{start:{line:96,column:49},end:{line:96,column:78}}],line:96}},s:{0:0,1:0,2:0,3:0,4:0,5:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["ActivityEventTimeline.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityEventTimeline.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-timeline align-top dense>\n <div v-for=\"event in events\" :key=\"event.event + event.time\">\n <v-timeline-item small :color=\"genColor(event)\" :icon=\"genIcon(event)\">\n <v-row class=\"pt-1\">\n <v-col>\n <strong v-text=\"event.event\" />\n <i>\n {{ event.time | dateTime(utc) }}\n </i>\n <div v-show=\"event.message\" class=\"text-caption\">\n {{ event.message }}\n </div>\n </v-col>\n </v-row>\n </v-timeline-item>\n </div>\n </v-timeline>\n</template>\n\n<script>\nimport TimeFilters from '@/tools/Calendar/Filters/timeFilters.js'\n\nexport default {\n mixins: [TimeFilters],\n props: {\n activityEvents: {\n type: Array,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n events: function () {\n return this.activityEvents.map((e) => {\n return { event: e.event, time: new Date(e.time * 1000) }\n })\n },\n states: function () {\n return {\n completed: {\n icon: 'mdi-check-circle',\n color: 'success',\n },\n failed: {\n icon: 'mdi-alert',\n color: 'error',\n },\n updated: {\n icon: 'mdi-alert-circle',\n color: 'purple',\n },\n queued: {\n icon: 'mdi-alert-circle',\n color: 'warning',\n },\n created: {\n icon: 'mdi-check-circle',\n color: 'success',\n },\n }\n },\n },\n methods: {\n genColor(event) {\n return this.states[event.event].color\n },\n genIcon(event) {\n return event.commit ? 'mdi-content-save' : this.states[event.event].icon\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"d8ec5b418b4f4375913e113ba7dadbb194d9c196"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return q=function(){return a},a}q();var H={mixins:[U],props:{activityEvents:{type:Array,required:!0},utc:{type:Boolean,required:!0}},data:function(){return q().f[0]++,q().s[0]++,{showUpdateDialog:!1}},computed:{events:function(){return q().f[1]++,q().s[1]++,this.activityEvents.map((function(n){return q().f[2]++,q().s[2]++,{event:n.event,time:new Date(1e3*n.time)}}))},states:function(){return q().f[3]++,q().s[3]++,{completed:{icon:"mdi-check-circle",color:"success"},failed:{icon:"mdi-alert",color:"error"},updated:{icon:"mdi-alert-circle",color:"purple"},queued:{icon:"mdi-alert-circle",color:"warning"},created:{icon:"mdi-check-circle",color:"success"}}}},methods:{genColor:function(n){return q().f[4]++,q().s[4]++,this.states[n.event].color},genIcon:function(n){return q().f[5]++,q().s[5]++,n.commit?(q().b[0][0]++,"mdi-content-save"):(q().b[0][1]++,this.states[n.event].icon)}}},Z=H,j=(0,E.Z)(Z,L,P,!1,null,null,null),G=j.exports,B=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.updateActivity.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v(" Update activity: "+n._s(n.activity.name)+"/"+n._s(n.activity.start)+" ")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"close-activity-icon"},on:{click:n.cancelActivity}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"activity-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"activity-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"activity-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"activity-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",[t("v-spacer"),t("v-btn",{attrs:{"data-test":"update-activity-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Activity type Input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-select",{attrs:{items:n.types,label:"Activity Type"},model:{value:n.kind,callback:function(e){n.kind=e},expression:"kind"}}),"COMMAND"===n.kind?t("div",[t("v-text-field",{attrs:{type:"text",label:"Command Input",placeholder:"INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0",prefix:"cmd('",suffix:"')",hint:"Timeline run commands with cmd_no_hazardous_check","data-test":"activity-cmd"},model:{value:n.activityData,callback:function(e){n.activityData=e},expression:"activityData"}})],1):"SCRIPT"===n.kind?t("div",[t("script-chooser",{staticClass:"my-1",on:{file:n.fileHandler},model:{value:n.activityData,callback:function(e){n.activityData=e},expression:"activityData"}}),t("environment-chooser",{staticClass:"my-2",on:{selected:n.selectedHandler},model:{value:n.activityEnvironment,callback:function(e){n.activityEnvironment=e},expression:"activityEnvironment"}})],1):t("div",[t("span",{staticClass:"ma-2"},[n._v(" No required input ")])]),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"update-activity-cancel-btn"},on:{click:n.cancelActivity}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"update-activity-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.updateActivity.apply(null,arguments)}}},[n._v(" Update ")])],1)],1)])],1)],1)],1)])],1)},Y=[],V=t(5881),W=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{attrs:{"no-gutters":""}},[t("span",[n._v(" Select from Cosmos environment variables ")])]),t("v-row",{staticClass:"ma-0"},[t("v-select",{attrs:{"persistent-hint":"","return-object":"",label:"Select Environment Options",hint:"Inject Environment Variables",items:n.environmentItems},on:{change:n.addEnvironmentItem},scopedSlots:n._u([{key:"selection",fn:function(){return[t("div",[t("span",[n._v(" Select Environment Options ")])])]},proxy:!0},{key:"item",fn:function(e){var l=e.item;return[t("div",[t("span",{domProps:{textContent:n._s(l.key+"="+l.value)}})])]}}]),model:{value:n.deadSelect,callback:function(e){n.deadSelect=e},expression:"deadSelect"}})],1),t("div",{staticClass:"mt-2"}),t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left"},[n._v("Key")]),t("th",{staticClass:"text-left"},[n._v("Value")]),t("th",{staticClass:"text-right"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"new-metadata-icon"},on:{click:n.newEnvironment}},[n._v(" mdi-plus ")])],1)]}}])},[t("span",[n._v(" Add Environment ")])])],1)]),n._l(n.selected,(function(e,l){return[t("tr",{key:"tr-"+l},[t("td",[t("v-text-field",{attrs:{dense:"",type:"text",readonly:e.readonly,"data-test":"key-"+l},model:{value:e.key,callback:function(t){n.$set(e,"key",t)},expression:"env.key"}})],1),t("td",[t("v-text-field",{attrs:{dense:"",type:"text",readonly:e.readonly,"data-test":"value-"+l},model:{value:e.value,callback:function(t){n.$set(e,"value",t)},expression:"env.value"}})],1),t("td",[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,o=e.attrs;return[t("div",n._g(n._b({},"div",o,!1),i),[t("v-icon",{attrs:{"data-test":"remove-env-icon-"+l},on:{click:function(e){return n.rm(l)}}},[n._v(" mdi-delete ")])],1)]}}],null,!0)},[t("span",[n._v(" Delete Environment ")])])],1)])]}))],2)])],1)},K=[],J={props:{value:{type:Array,required:!0}},data:function(){return{deadSelect:null,environmentOptions:[]}},mounted:function(){this.getEnvironment()},computed:{selected:{get:function(){return this.value},set:function(n){this.$emit("input",n)}},environmentItems:function(){var n=this;return this.environmentOptions.filter((function(e){return!n.selected.find((function(n){return n.key===e.key}))}))}},methods:{getEnvironment:function(){var n=this;f.get("/cosmos-api/environment").then((function(e){n.environmentOptions=e.data}))},addEnvironmentItem:function(n){this.selected.push({key:n.key,value:n.value,readonly:!0});var e=this.environmentOptions.findIndex((function(e){return e.key===n.key&&e.value===n.value}));this.environmentOptions.splice(e,e>=0?1:0),this.deadSelect=null},newEnvironment:function(){this.selected.push({key:"",value:"",readonly:!1})},rm:function(n){var e=this.selected.splice(n,1)[0];e&&e.readonly&&this.environmentOptions.push(e)}}},z=J,Q=(0,E.Z)(z,W,K,!1,null,null,null),X=Q.exports,nn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{attrs:{"no-gutters":""}},[t("span",[n._v(" Select Cosmos script ")])]),t("v-row",{staticClass:"my-2"},[t("v-autocomplete",{staticClass:"mx-4",attrs:{"cache-items":"",flat:"","hide-no-data":"","hide-details":"","solo-inverted":"",label:"Select a script",loading:n.loading,items:n.items,"search-input":n.search},on:{"update:searchInput":function(e){n.search=e},"update:search-input":function(e){n.search=e}},model:{value:n.selected,callback:function(e){n.selected=e},expression:"selected"}})],1)],1)},en=[],tn=(t(4083),{props:{value:String},data:function(){return{loading:!1,search:"",selected:this.value,scripts:[],items:[]}},created:function(){var n=this;this.loading=!0,f.get("/script-api/scripts").then((function(e){n.scripts=e.data,n.items=e.data})).catch((function(e){n.$emit("error",{type:"error",text:"Failed to connect to Cosmos. ".concat(e),error:e})})),this.selected=this.value?this.value:null,this.loading=!1},watch:{selected:function(n,e){n!==e&&this.$emit("file",n)},search:function(n){n&&n!==this.selected&&this.querySelections(n)}},methods:{querySelections:function(n){var e=this;this.loading=!0,setTimeout((function(){e.items=e.scripts.filter((function(e){return(e||"").toLowerCase().indexOf((n||"").toLowerCase())>-1})),e.loading=!1}),500)}}}),ln=tn,on=(0,E.Z)(ln,nn,en,!1,null,null,null),an=on.exports;function sn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityUpdateDialog.vue",e="6903b2509226021776678f3560d62d2bf4656b9d",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityUpdateDialog.vue",statementMap:{0:{start:{line:207,column:4},end:{line:221,column:5}},1:{start:{line:219,column:29},end:{line:219,column:50}},2:{start:{line:225,column:6},end:{line:225,column:25}},3:{start:{line:230,column:18},end:{line:230,column:28}},4:{start:{line:231,column:20},end:{line:231,column:69}},5:{start:{line:232,column:19},end:{line:232,column:66}},6:{start:{line:233,column:6},end:{line:235,column:7}},7:{start:{line:234,column:8},end:{line:234,column:93}},8:{start:{line:236,column:6},end:{line:238,column:7}},9:{start:{line:237,column:8},end:{line:237,column:68}},10:{start:{line:239,column:6},end:{line:241,column:7}},11:{start:{line:240,column:8},end:{line:240,column:64}},12:{start:{line:242,column:6},end:{line:242,column:17}},13:{start:{line:245,column:6},end:{line:247,column:7}},14:{start:{line:246,column:8},end:{line:246,column:48}},15:{start:{line:248,column:6},end:{line:248,column:17}},16:{start:{line:252,column:8},end:{line:252,column:25}},17:{start:{line:255,column:8},end:{line:255,column:34}},18:{start:{line:261,column:6},end:{line:263,column:7}},19:{start:{line:262,column:8},end:{line:262,column:14}},20:{start:{line:264,column:6},end:{line:264,column:27}},21:{start:{line:265,column:6},end:{line:265,column:28}},22:{start:{line:268,column:20},end:{line:268,column:56}},23:{start:{line:269,column:20},end:{line:269,column:55}},24:{start:{line:270,column:6},end:{line:270,column:50}},25:{start:{line:271,column:6},end:{line:271,column:48}},26:{start:{line:272,column:6},end:{line:272,column:49}},27:{start:{line:273,column:6},end:{line:273,column:47}},28:{start:{line:274,column:6},end:{line:274,column:50}},29:{start:{line:275,column:6},end:{line:275,column:64}},30:{start:{line:276,column:6},end:{line:276,column:63}},31:{start:{line:279,column:6},end:{line:279,column:46}},32:{start:{line:282,column:6},end:{line:282,column:53}},33:{start:{line:285,column:6},end:{line:285,column:28}},34:{start:{line:289,column:20},end:{line:291,column:7}},35:{start:{line:292,column:19},end:{line:294,column:7}},36:{start:{line:295,column:19},end:{line:295,column:42}},37:{start:{line:296,column:17},end:{line:296,column:58}},38:{start:{line:297,column:6},end:{line:297,column:36}},39:{start:{line:298,column:20},end:{line:298,column:38}},40:{start:{line:299,column:21},end:{line:299,column:40}},41:{start:{line:300,column:6},end:{line:310,column:8}},42:{start:{line:303,column:29},end:{line:305,column:9}},43:{start:{line:306,column:8},end:{line:309,column:10}},44:{start:{line:311,column:6},end:{line:311,column:25}},45:{start:{line:312,column:6},end:{line:312,column:28}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:206,column:2},end:{line:206,column:3}},loc:{start:{line:206,column:9},end:{line:222,column:3}},line:206},1:{name:"(anonymous_1)",decl:{start:{line:219,column:18},end:{line:219,column:19}},loc:{start:{line:219,column:29},end:{line:219,column:50}},line:219},2:{name:"(anonymous_2)",decl:{start:{line:224,column:10},end:{line:224,column:11}},loc:{start:{line:224,column:22},end:{line:226,column:5}},line:224},3:{name:"(anonymous_3)",decl:{start:{line:229,column:15},end:{line:229,column:16}},loc:{start:{line:229,column:27},end:{line:243,column:5}},line:229},4:{name:"(anonymous_4)",decl:{start:{line:244,column:15},end:{line:244,column:16}},loc:{start:{line:244,column:27},end:{line:249,column:5}},line:244},5:{name:"(anonymous_5)",decl:{start:{line:251,column:6},end:{line:251,column:7}},loc:{start:{line:251,column:12},end:{line:253,column:7}},line:251},6:{name:"(anonymous_6)",decl:{start:{line:254,column:6},end:{line:254,column:7}},loc:{start:{line:254,column:17},end:{line:256,column:7}},line:254},7:{name:"(anonymous_7)",decl:{start:{line:260,column:16},end:{line:260,column:17}},loc:{start:{line:260,column:37},end:{line:266,column:5}},line:260},8:{name:"(anonymous_8)",decl:{start:{line:267,column:18},end:{line:267,column:19}},loc:{start:{line:267,column:30},end:{line:277,column:5}},line:267},9:{name:"(anonymous_9)",decl:{start:{line:278,column:17},end:{line:278,column:18}},loc:{start:{line:278,column:34},end:{line:280,column:5}},line:278},10:{name:"(anonymous_10)",decl:{start:{line:281,column:21},end:{line:281,column:22}},loc:{start:{line:281,column:38},end:{line:283,column:5}},line:281},11:{name:"(anonymous_11)",decl:{start:{line:284,column:20},end:{line:284,column:21}},loc:{start:{line:284,column:32},end:{line:286,column:5}},line:284},12:{name:"(anonymous_12)",decl:{start:{line:287,column:20},end:{line:287,column:21}},loc:{start:{line:287,column:32},end:{line:313,column:5}},line:287},13:{name:"(anonymous_13)",decl:{start:{line:302,column:14},end:{line:302,column:15}},loc:{start:{line:302,column:28},end:{line:310,column:7}},line:302}},branchMap:{0:{loc:{start:{line:219,column:29},end:{line:219,column:50}},type:"binary-expr",locations:[{start:{line:219,column:29},end:{line:219,column:36}},{start:{line:219,column:40},end:{line:219,column:50}}],line:219},1:{loc:{start:{line:233,column:6},end:{line:235,column:7}},type:"if",locations:[{start:{line:233,column:6},end:{line:235,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:233},2:{loc:{start:{line:236,column:6},end:{line:238,column:7}},type:"if",locations:[{start:{line:236,column:6},end:{line:238,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:236},3:{loc:{start:{line:239,column:6},end:{line:241,column:7}},type:"if",locations:[{start:{line:239,column:6},end:{line:241,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:239},4:{loc:{start:{line:245,column:6},end:{line:247,column:7}},type:"if",locations:[{start:{line:245,column:6},end:{line:247,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:245},5:{loc:{start:{line:245,column:10},end:{line:245,column:55}},type:"binary-expr",locations:[{start:{line:245,column:10},end:{line:245,column:33}},{start:{line:245,column:37},end:{line:245,column:55}}],line:245},6:{loc:{start:{line:261,column:6},end:{line:263,column:7}},type:"if",locations:[{start:{line:261,column:6},end:{line:263,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:261},7:{loc:{start:{line:279,column:26},end:{line:279,column:46}},type:"cond-expr",locations:[{start:{line:279,column:34},end:{line:279,column:39}},{start:{line:279,column:42},end:{line:279,column:46}}],line:279},8:{loc:{start:{line:282,column:33},end:{line:282,column:53}},type:"cond-expr",locations:[{start:{line:282,column:41},end:{line:282,column:46}},{start:{line:282,column:49},end:{line:282,column:53}}],line:282}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0]},inputSourceMap:{version:3,sources:["ActivityUpdateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityUpdateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-dialog v-model="show" width="600">\n <v-card>\n <form v-on:submit.prevent="updateActivity">\n <v-system-bar>\n <v-spacer />\n <span>\n Update activity: {{ activity.name }}/{{ activity.start }}\n </span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-activity-icon" @click="cancelActivity">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-3">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row>\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="update-activity-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n\n <v-stepper-step editable step="2">\n Activity type Input\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-3">\n <v-select v-model="kind" :items="types" label="Activity Type" />\n <div v-if="kind === \'COMMAND\'">\n <v-text-field\n v-model="activityData"\n type="text"\n label="Command Input"\n placeholder="INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0"\n prefix="cmd(\'"\n suffix="\')"\n hint="Timeline run commands with cmd_no_hazardous_check"\n data-test="activity-cmd"\n />\n </div>\n <div v-else-if="kind === \'SCRIPT\'">\n <script-chooser\n class="my-1"\n v-model="activityData"\n @file="fileHandler"\n />\n <environment-chooser\n class="my-2"\n v-model="activityEnvironment"\n @selected="selectedHandler"\n />\n </div>\n <div v-else>\n <span class="ma-2"> No required input </span>\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row>\n <v-spacer />\n <v-btn\n @click="cancelActivity"\n outlined\n class="mx-2"\n data-test="update-activity-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="updateActivity"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="update-activity-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Update\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport EnvironmentChooser from \'@cosmosc2/tool-common/src/components/EnvironmentChooser\'\nimport ScriptChooser from \'@cosmosc2/tool-common/src/components/ScriptChooser\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\n\nexport default {\n components: {\n EnvironmentChooser,\n ScriptChooser,\n },\n props: {\n activity: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n kind: \'\',\n types: [\'COMMAND\', \'SCRIPT\', \'RESERVE\'],\n activityData: \'\',\n activityEnvironment: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n watch: {\n show: function () {\n this.updateValues()\n },\n },\n computed: {\n timeError: function () {\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Activity must have different start and stop times.\'\n }\n if (now > start) {\n return \'Invalid start time. Activity must be in the future.\'\n }\n if (start > stop) {\n return \'Invalid start time. Activity start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (this.kind !== \'RESERVE\' && !this.activityData) {\n return \'No data is selected or inputted\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n changeKind: function (inputKind) {\n if (inputKind === this.kind) {\n return\n }\n this.kind = inputKind\n this.activityData = \'\'\n },\n updateValues: function () {\n const sDate = new Date(this.activity.start * 1000)\n const eDate = new Date(this.activity.stop * 1000)\n this.startDate = format(sDate, \'yyyy-MM-dd\')\n this.startTime = format(sDate, \'HH:mm:ss\')\n this.stopDate = format(eDate, \'yyyy-MM-dd\')\n this.stopTime = format(eDate, \'HH:mm:ss\')\n this.kind = this.activity.kind.toUpperCase()\n this.activityData = this.activity.data[this.activity.kind]\n this.activityEnvironment = this.activity.data.environment\n },\n fileHandler: function (event) {\n this.activityData = event ? event : null\n },\n selectedHandler: function (event) {\n this.activityEnvironment = event ? event : null\n },\n cancelActivity: function () {\n this.show = !this.show\n },\n updateActivity: function () {\n // Call the api to update the activity\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const kind = this.kind.toLowerCase()\n let data = { environment: this.activityEnvironment }\n data[kind] = this.activityData\n const tName = this.activity.name\n const aStart = this.activity.start\n Api.put(`/cosmos-api/timeline/${tName}/activity/${aStart}`, {\n data: { start, stop, kind, data },\n }).then((response) => {\n const activityTime = this.generateDateTime(\n new Date(response.data.start * 1000)\n )\n this.$notify.normal({\n title: \'Updated Activity\',\n body: `${activityTime} (${response.data.start}) on timeline: ${response.data.name}`,\n })\n })\n this.$emit(\'close\')\n this.show = !this.show\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6903b2509226021776678f3560d62d2bf4656b9d"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return sn=function(){return a},a}sn();var cn={components:{EnvironmentChooser:X,ScriptChooser:an},props:{activity:{type:Object,required:!0},value:Boolean},mixins:[U],data:function(){return sn().f[0]++,sn().s[0]++,{dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",kind:"",types:["COMMAND","SCRIPT","RESERVE"],activityData:"",activityEnvironment:[],rules:{required:function(n){return sn().f[1]++,sn().s[1]++,sn().b[0][0]++,!!n||(sn().b[0][1]++,"Required")}}}},watch:{show:function(){sn().f[2]++,sn().s[2]++,this.updateValues()}},computed:{timeError:function(){sn().f[3]++;var n=(sn().s[3]++,new Date),e=(sn().s[4]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),t=(sn().s[5]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return sn().s[6]++,e===t?(sn().b[1][0]++,sn().s[7]++,"Invalid start, stop time. Activity must have different start and stop times."):(sn().b[1][1]++,sn().s[8]++,n>e?(sn().b[2][0]++,sn().s[9]++,"Invalid start time. Activity must be in the future."):(sn().b[2][1]++,sn().s[10]++,e>t?(sn().b[3][0]++,sn().s[11]++,"Invalid start time. Activity start before stop."):(sn().b[3][1]++,sn().s[12]++,null)))},typeError:function(){return sn().f[4]++,sn().s[13]++,sn().b[5][0]++,"RESERVE"===this.kind||(sn().b[5][1]++,this.activityData)?(sn().b[4][1]++,sn().s[15]++,null):(sn().b[4][0]++,sn().s[14]++,"No data is selected or inputted")},show:{get:function(){return sn().f[5]++,sn().s[16]++,this.value},set:function(n){sn().f[6]++,sn().s[17]++,this.$emit("input",n)}}},methods:{changeKind:function(n){if(sn().f[7]++,sn().s[18]++,n===this.kind)return sn().b[6][0]++,void sn().s[19]++;sn().b[6][1]++,sn().s[20]++,this.kind=n,sn().s[21]++,this.activityData=""},updateValues:function(){sn().f[8]++;var n=(sn().s[22]++,new Date(1e3*this.activity.start)),e=(sn().s[23]++,new Date(1e3*this.activity.stop));sn().s[24]++,this.startDate=(0,V.Z)(n,"yyyy-MM-dd"),sn().s[25]++,this.startTime=(0,V.Z)(n,"HH:mm:ss"),sn().s[26]++,this.stopDate=(0,V.Z)(e,"yyyy-MM-dd"),sn().s[27]++,this.stopTime=(0,V.Z)(e,"HH:mm:ss"),sn().s[28]++,this.kind=this.activity.kind.toUpperCase(),sn().s[29]++,this.activityData=this.activity.data[this.activity.kind],sn().s[30]++,this.activityEnvironment=this.activity.data.environment},fileHandler:function(n){sn().f[9]++,sn().s[31]++,this.activityData=n?(sn().b[7][0]++,n):(sn().b[7][1]++,null)},selectedHandler:function(n){sn().f[10]++,sn().s[32]++,this.activityEnvironment=n?(sn().b[8][0]++,n):(sn().b[8][1]++,null)},cancelActivity:function(){sn().f[11]++,sn().s[33]++,this.show=!this.show},updateActivity:function(){var n=this;sn().f[12]++;var e=(sn().s[34]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(sn().s[35]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),l=(sn().s[36]++,this.kind.toLowerCase()),i=(sn().s[37]++,{environment:this.activityEnvironment});sn().s[38]++,i[l]=this.activityData;var o=(sn().s[39]++,this.activity.name),a=(sn().s[40]++,this.activity.start);sn().s[41]++,f.put("/cosmos-api/timeline/".concat(o,"/activity/").concat(a),{data:{start:e,stop:t,kind:l,data:i}}).then((function(e){sn().f[13]++;var t=(sn().s[42]++,n.generateDateTime(new Date(1e3*e.data.start)));sn().s[43]++,n.$notify.normal({title:"Updated Activity",body:"".concat(t," (").concat(e.data.start,") on timeline: ").concat(e.data.name)})})),sn().s[44]++,this.$emit("close"),sn().s[45]++,this.show=!this.show}}},rn=cn,un=(t(2084),(0,E.Z)(rn,B,Y,!1,null,"6c8065d7",null)),mn=un.exports;function dn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventForm.vue",e="bc1daacf3f4fb326f50dffbd7f6da6ef93a6dd61",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ActivityEventForm.vue",statementMap:{0:{start:{line:134,column:4},end:{line:136,column:5}},1:{start:{line:140,column:6},end:{line:140,column:76}},2:{start:{line:143,column:6},end:{line:145,column:28}},3:{start:{line:148,column:6},end:{line:148,column:52}},4:{start:{line:151,column:6},end:{line:151,column:45}},5:{start:{line:154,column:6},end:{line:154,column:45}},6:{start:{line:157,column:6},end:{line:157,column:57}},7:{start:{line:160,column:6},end:{line:160,column:47}},8:{start:{line:163,column:6},end:{line:166,column:7}},9:{start:{line:169,column:16},end:{line:169,column:74}},10:{start:{line:170,column:6},end:{line:170,column:24}},11:{start:{line:175,column:6},end:{line:175,column:25}},12:{start:{line:178,column:6},end:{line:178,column:52}},13:{start:{line:181,column:27},end:{line:181,column:74}},14:{start:{line:182,column:28},end:{line:182,column:61}},15:{start:{line:183,column:27},end:{line:183,column:59}},16:{start:{line:184,column:6},end:{line:211,column:10}},17:{start:{line:193,column:10},end:{line:195,column:11}},18:{start:{line:198,column:10},end:{line:201,column:12}},19:{start:{line:202,column:10},end:{line:202,column:29}},20:{start:{line:205,column:10},end:{line:210,column:11}},21:{start:{line:206,column:12},end:{line:209,column:14}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:133,column:2},end:{line:133,column:3}},loc:{start:{line:133,column:9},end:{line:137,column:3}},line:133},1:{name:"(anonymous_1)",decl:{start:{line:139,column:24},end:{line:139,column:25}},loc:{start:{line:139,column:36},end:{line:141,column:5}},line:139},2:{name:"(anonymous_2)",decl:{start:{line:142,column:23},end:{line:142,column:24}},loc:{start:{line:142,column:35},end:{line:146,column:5}},line:142},3:{name:"(anonymous_3)",decl:{start:{line:147,column:25},end:{line:147,column:26}},loc:{start:{line:147,column:37},end:{line:149,column:5}},line:147},4:{name:"(anonymous_4)",decl:{start:{line:150,column:18},end:{line:150,column:19}},loc:{start:{line:150,column:30},end:{line:152,column:5}},line:150},5:{name:"(anonymous_5)",decl:{start:{line:153,column:18},end:{line:153,column:19}},loc:{start:{line:153,column:30},end:{line:155,column:5}},line:153},6:{name:"(anonymous_6)",decl:{start:{line:156,column:25},end:{line:156,column:26}},loc:{start:{line:156,column:37},end:{line:158,column:5}},line:156},7:{name:"(anonymous_7)",decl:{start:{line:159,column:20},end:{line:159,column:21}},loc:{start:{line:159,column:32},end:{line:161,column:5}},line:159},8:{name:"(anonymous_8)",decl:{start:{line:162,column:13},end:{line:162,column:14}},loc:{start:{line:162,column:25},end:{line:167,column:5}},line:162},9:{name:"(anonymous_9)",decl:{start:{line:168,column:16},end:{line:168,column:17}},loc:{start:{line:168,column:28},end:{line:171,column:5}},line:168},10:{name:"(anonymous_10)",decl:{start:{line:174,column:11},end:{line:174,column:12}},loc:{start:{line:174,column:23},end:{line:176,column:5}},line:174},11:{name:"(anonymous_11)",decl:{start:{line:177,column:18},end:{line:177,column:19}},loc:{start:{line:177,column:30},end:{line:179,column:5}},line:177},12:{name:"(anonymous_12)",decl:{start:{line:180,column:18},end:{line:180,column:19}},loc:{start:{line:180,column:30},end:{line:212,column:5}},line:180},13:{name:"(anonymous_13)",decl:{start:{line:192,column:14},end:{line:192,column:15}},loc:{start:{line:192,column:26},end:{line:196,column:9}},line:192},14:{name:"(anonymous_14)",decl:{start:{line:197,column:14},end:{line:197,column:15}},loc:{start:{line:197,column:28},end:{line:203,column:9}},line:197},15:{name:"(anonymous_15)",decl:{start:{line:204,column:15},end:{line:204,column:16}},loc:{start:{line:204,column:26},end:{line:211,column:9}},line:204}},branchMap:{0:{loc:{start:{line:140,column:13},end:{line:140,column:76}},type:"cond-expr",locations:[{start:{line:140,column:55},end:{line:140,column:64}},{start:{line:140,column:67},end:{line:140,column:76}}],line:140},1:{loc:{start:{line:143,column:13},end:{line:145,column:28}},type:"cond-expr",locations:[{start:{line:144,column:10},end:{line:144,column:28}},{start:{line:145,column:10},end:{line:145,column:28}}],line:143},2:{loc:{start:{line:164,column:8},end:{line:165,column:63}},type:"binary-expr",locations:[{start:{line:164,column:8},end:{line:164,column:52}},{start:{line:165,column:8},end:{line:165,column:63}}],line:164},3:{loc:{start:{line:205,column:10},end:{line:210,column:11}},type:"if",locations:[{start:{line:205,column:10},end:{line:210,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:205}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0]},inputSourceMap:{version:3,sources:["ActivityEventForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+GA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityEventForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card-title>\n <span v-text="activityEvent.name" />\n <v-spacer />\n <v-icon>\n {{ activityBadgeIcon }}\n </v-icon>\n </v-card-title>\n <v-card-subtitle>\n <span>\n {{ activityEvent.start | dateTime(utc) }}\n </span>\n <br />\n <span>\n {{ activityEvent.end | dateTime(utc) }}\n </span>\n </v-card-subtitle>\n <div class="ma-2">\n <v-card-text>\n <v-row>\n <v-col class="pa-0">\n <v-simple-table dense>\n <tbody>\n <tr>\n <th class="text-left" width="100">Fulfilled</th>\n <td v-text="activityFulfillment" />\n </tr>\n <tr>\n <th class="text-left" v-text="activityKind" />\n <td v-text="activityData[activityKind]" />\n </tr>\n <tr v-if="showEnv">\n <th class="text-left">ENV</th>\n <td v-text="activityEnvironment" />\n </tr>\n </tbody>\n </v-simple-table>\n </v-col>\n </v-row>\n <v-row>\n <v-col>\n <activity-event-timeline\n :activity-events="activityEvents"\n :utc="utc"\n />\n </v-col>\n </v-row>\n <v-row class="pt-1">\n <v-col class="text-right pa-0">\n <span class="text-caption">\n Last update: {{ updated_at | dateTime(utc) }}\n </span>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions>\n <div v-if="!activityEvent.fulfillment">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="update-activity" @click="updateDialog">\n <v-icon> mdi-pencil </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Update </span>\n </v-tooltip>\n </div>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="delete-activity" @click="deleteDialog">\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Delete </span>\n </v-tooltip>\n </v-card-actions>\n </div>\n \x3c!--- Menus ---\x3e\n <activity-update-dialog\n v-model="showUpdateDialog"\n :activity="activityEvent.activity"\n @close="close"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ActivityEventTimeline from \'@/tools/Calendar/Forms/ActivityEventTimeline\'\nimport ActivityUpdateDialog from \'@/tools/Calendar/Dialogs/ActivityUpdateDialog\'\n\nexport default {\n components: {\n ActivityEventTimeline,\n ActivityUpdateDialog,\n },\n mixins: [TimeFilters],\n props: {\n activityEvent: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n activityBadgeColor: function () {\n return this.activityEvent.activity.fulfillment ? \'#4caf50\' : \'#ff5252\'\n },\n activityBadgeIcon: function () {\n return this.activityEvent.activity.fulfillment\n ? \'mdi-check-circle\'\n : \'mdi-close-circle\'\n },\n activityFulfillment: function () {\n return this.activityEvent.activity.fulfillment\n },\n activityData: function () {\n return this.activityEvent.activity.data\n },\n activityKind: function () {\n return this.activityEvent.activity.kind\n },\n activityEnvironment: function () {\n return this.activityEvent.activity.data.environment\n },\n activityEvents: function () {\n return this.activityEvent.activity.events\n },\n showEnv: function () {\n return (\n this.activityEvent.activity.data.environment &&\n this.activityEvent.activity.data.environment.length > 0\n )\n },\n updated_at: function () {\n const v = parseInt(this.activityEvent.activity.updated_at / 1000000)\n return new Date(v)\n },\n },\n methods: {\n close: function () {\n this.$emit(\'close\')\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n deleteDialog: function () {\n const activityTime = this.generateDateTime(this.activityEvent.start)\n const activityStart = this.activityEvent.activity.start\n const timelineName = this.activityEvent.activity.name\n this.$dialog\n .confirm(\n `Are you sure you want to remove activity: ${activityTime} (${activityStart}) from timeline: ${timelineName}`,\n {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n }\n )\n .then((dialog) => {\n return Api.delete(\n `/cosmos-api/timeline/${timelineName}/activity/${activityStart}`\n )\n })\n .then((response) => {\n this.$notify.normal({\n title: \'Deleted Activity from Timeline\',\n body: `Deleted activity: ${activityTime} (${activityStart}) from timeline: ${timelineName}`,\n })\n this.$emit(\'close\')\n })\n .catch((error) => {\n if (error) {\n this.$notify.error({\n title: \'Failed to Deleted Activity from Timeline\',\n body: `Failed to delete activity ${activityStart} from timeline: ${timelineName}. Error: ${error}`,\n })\n }\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bc1daacf3f4fb326f50dffbd7f6da6ef93a6dd61"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return dn=function(){return a},a}dn();var An={components:{ActivityEventTimeline:G,ActivityUpdateDialog:mn},mixins:[U],props:{activityEvent:{type:Object,required:!0},utc:{type:Boolean,required:!0}},data:function(){return dn().f[0]++,dn().s[0]++,{showUpdateDialog:!1}},computed:{activityBadgeColor:function(){return dn().f[1]++,dn().s[1]++,this.activityEvent.activity.fulfillment?(dn().b[0][0]++,"#4caf50"):(dn().b[0][1]++,"#ff5252")},activityBadgeIcon:function(){return dn().f[2]++,dn().s[2]++,this.activityEvent.activity.fulfillment?(dn().b[1][0]++,"mdi-check-circle"):(dn().b[1][1]++,"mdi-close-circle")},activityFulfillment:function(){return dn().f[3]++,dn().s[3]++,this.activityEvent.activity.fulfillment},activityData:function(){return dn().f[4]++,dn().s[4]++,this.activityEvent.activity.data},activityKind:function(){return dn().f[5]++,dn().s[5]++,this.activityEvent.activity.kind},activityEnvironment:function(){return dn().f[6]++,dn().s[6]++,this.activityEvent.activity.data.environment},activityEvents:function(){return dn().f[7]++,dn().s[7]++,this.activityEvent.activity.events},showEnv:function(){return dn().f[8]++,dn().s[8]++,dn().b[2][0]++,this.activityEvent.activity.data.environment&&(dn().b[2][1]++,this.activityEvent.activity.data.environment.length>0)},updated_at:function(){dn().f[9]++;var n=(dn().s[9]++,parseInt(this.activityEvent.activity.updated_at/1e6));return dn().s[10]++,new Date(n)}},methods:{close:function(){dn().f[10]++,dn().s[11]++,this.$emit("close")},updateDialog:function(){dn().f[11]++,dn().s[12]++,this.showUpdateDialog=!this.showUpdateDialog},deleteDialog:function(){var n=this;dn().f[12]++;var e=(dn().s[13]++,this.generateDateTime(this.activityEvent.start)),t=(dn().s[14]++,this.activityEvent.activity.start),l=(dn().s[15]++,this.activityEvent.activity.name);dn().s[16]++,this.$dialog.confirm("Are you sure you want to remove activity: ".concat(e," (").concat(t,") from timeline: ").concat(l),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return dn().f[13]++,dn().s[17]++,f["delete"]("/cosmos-api/timeline/".concat(l,"/activity/").concat(t))})).then((function(i){dn().f[14]++,dn().s[18]++,n.$notify.normal({title:"Deleted Activity from Timeline",body:"Deleted activity: ".concat(e," (").concat(t,") from timeline: ").concat(l)}),dn().s[19]++,n.$emit("close")})).catch((function(e){dn().f[15]++,dn().s[20]++,e?(dn().b[3][0]++,dn().s[21]++,n.$notify.error({title:"Failed to Deleted Activity from Timeline",body:"Failed to delete activity ".concat(t," from timeline: ").concat(l,". Error: ").concat(e)})):dn().b[3][1]++}))}}},vn=An,pn=(t(3424),(0,E.Z)(vn,O,R,!1,null,"e57e7e4c",null)),hn=pn.exports,Cn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card-title",{domProps:{textContent:n._s(n.title)}}),t("v-card-subtitle",[t("span",[n._v(" "+n._s(n._f("dateTime")(n.metadataEvent.start,n.utc))+" ")])]),t("div",{staticClass:"ma-2"},[t("v-card-text",[t("v-row",[t("v-col",{staticClass:"pa-0"},[t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left"},[n._v("Key")]),t("th",{staticClass:"text-left"},[n._v("Value")])]),n._l(n.metadataValues,(function(e,l){return[t("tr",{key:"tr-"+l},[t("td",{staticClass:"text-left"},[t("span",{domProps:{textContent:n._s(e.key)}})]),t("td",{staticClass:"text-left"},[t("span",{domProps:{textContent:n._s(e.value)}})])])]}))],2)])],1)],1),t("v-row",{staticClass:"pt-1"},[t("v-col",{staticClass:"text-right pa-0"},[t("span",{staticClass:"text-caption"},[n._v(" Last update: "+n._s(n._f("dateTime")(n.updated_at,n.utc))+" ")])])],1)],1),t("v-card-actions",{staticClass:"pa-1"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"update-metadata"},on:{click:n.updateDialog}},[t("v-icon",[n._v("mdi-pencil")])],1)],1)]}}])},[t("span",[n._v(" Update ")])]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"delete-metadata"},on:{click:n.deleteDialog}},[t("v-icon",[n._v(" mdi-delete ")])],1)],1)]}}])},[t("span",[n._v(" Delete ")])])],1)],1),t("metadata-update-dialog",{attrs:{"metadata-obj":n.metadataEvent.metadata},on:{close:n.close},model:{value:n.showUpdateDialog,callback:function(e){n.showUpdateDialog=e},expression:"showUpdateDialog"}})],1)},fn=[],yn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.updateMetadata.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Update Metadata")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"close-metadata-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.targets,label:"Target"},model:{value:n.target,callback:function(e){n.target=e},expression:"target"}}),t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}}),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-metadata-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Metadata input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",{staticStyle:{"min-height":"200px"}},[t("metadata-input-form",{model:{value:n.metadata,callback:function(e){n.metadata=e},expression:"metadata"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"update-metadata-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"update-metadata-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.updateMetadata.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},bn=[],gn=(t(3108),t(570)),_n=t(7475),wn=t(3696),xn=(t(1372),t(1245),function(){function n(){(0,y.Z)(this,n),(0,wn.Z)(this,"id",1)}return(0,b.Z)(n,[{key:"exec",value:function(){var n=(0,c.Z)((0,s.Z)().mark((function n(e,t){var l,i,o,a=arguments;return(0,s.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return l=a.length>2&&void 0!==a[2]?a[2]:{},n.prev=1,n.next=4,CosmosAuth.updateToken(CosmosAuth.defaultMinValidity);case 4:n.next=9;break;case 6:n.prev=6,n.t0=n["catch"](1),CosmosAuth.login();case 9:return this.id=this.id+1,n.prev=10,l["scope"]=localStorage.scope,n.next=14,v.post("/cosmos-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:l},{headers:{Authorization:localStorage.cosmosToken,"Content-Type":"application/json-rpc"}});case 14:return i=n.sent,n.abrupt("return",i.data.result);case 18:throw n.prev=18,n.t1=n["catch"](10),o=new Error,n.t1.response?(o.name=n.t1.response.data.error.data.class,o.message=n.t1.response.data.error.data.message):n.t1.request?(o.name="Request error",o.message="Request error, no response received"):o.name="Unknown error",o;case 23:case"end":return n.stop()}}),n,this,[[1,6],[10,18]])})));function e(e,t){return n.apply(this,arguments)}return e}()},{key:"decode_cosmos_type",value:function(n){if(null!==n&&"object"===(0,_n.Z)(n)&&"Float"==n.json_class&&n.raw){if("NaN"==n.raw)return NaN;if("Infinity"==n.raw)return 1/0;if("-Infinity"==n.raw)return-1/0}return null}},{key:"encode_cosmos_type",value:function(n){return Number.isNaN(n)?{json_class:"Float",raw:"NaN"}:n==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:n==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}},{key:"get_all_interface_info",value:function(){return this.exec("get_all_interface_info",[])}},{key:"connect_interface",value:function(n){return this.exec("connect_interface",[n])}},{key:"disconnect_interface",value:function(n){return this.exec("disconnect_interface",[n])}},{key:"get_all_router_info",value:function(){return this.exec("get_all_router_info",[])}},{key:"connect_router",value:function(n){return this.exec("connect_router",[n])}},{key:"disconnect_router",value:function(n){return this.exec("disconnect_router",[n])}},{key:"get_all_target_info",value:function(){return this.exec("get_all_target_info",[])}},{key:"get_all_cmd_info",value:function(){return this.exec("get_all_cmd_info",[])}},{key:"get_all_tlm_info",value:function(){return this.exec("get_all_tlm_info",[])}},{key:"get_item",value:function(n,e,t){return this.exec("get_item",[n,e,t])}},{key:"get_parameter",value:function(n,e,t){return this.exec("get_parameter",[n,e,t])}},{key:"get_all_packet_logger_info",value:function(){return this.exec("get_all_packet_logger_info",[])}},{key:"start_logging",value:function(){return this.exec("start_logging",[])}},{key:"stop_logging",value:function(){return this.exec("stop_logging",[])}},{key:"start_cmd_log",value:function(n){return this.exec("start_cmd_log",[n])}},{key:"start_tlm_log",value:function(n){return this.exec("start_tlm_log",[n])}},{key:"stop_cmd_log",value:function(n){return this.exec("stop_cmd_log",[n])}},{key:"stop_tlm_log",value:function(n){return this.exec("stop_tlm_log",[n])}},{key:"get_server_status",value:function(){return this.exec("get_server_status",[])}},{key:"get_limits_sets",value:function(){return this.exec("get_limits_sets",[])}},{key:"get_limits_set",value:function(){return this.exec("get_limits_set",[])}},{key:"set_limits_set",value:function(n){return this.exec("set_limits_set",[n])}},{key:"get_background_tasks",value:function(){return this.exec("get_background_tasks",[])}},{key:"start_background_task",value:function(n){return this.exec("start_background_task",[n])}},{key:"stop_background_task",value:function(n){return this.exec("stop_background_task",[n])}},{key:"get_oldest_logfile",value:function(){return this.exec("get_oldest_logfile",[])}},{key:"get_target",value:function(n){return this.exec("get_target",[n])}},{key:"get_target_list",value:function(){return this.exec("get_target_list",[])}},{key:"get_telemetry",value:function(n,e){return this.exec("get_telemetry",[n,e])}},{key:"get_all_telemetry",value:function(n){return this.exec("get_all_telemetry",[n])}},{key:"get_all_telemetry_list",value:function(n){return this.exec("get_all_telemetry_list",[n])}},{key:"get_tlm_packet",value:function(){var n=(0,c.Z)((0,s.Z)().mark((function n(e,t,l){var i,o,a,c;return(0,s.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.exec("get_tlm_packet",[e,t],{type:l});case 2:if(i=n.sent,null!=i)for(o=i.length,a=null,c=0;c<o;c++)a=this.decode_cosmos_type(i[c][1]),null!==a&&(i[c][1]=a);return n.abrupt("return",i);case 5:case"end":return n.stop()}}),n,this)})));function e(e,t,l){return n.apply(this,arguments)}return e}()},{key:"get_packet_derived_items",value:function(n,e){return this.exec("get_packet_derived_items",[n,e])}},{key:"get_tlm_buffer",value:function(n,e){return this.exec("get_tlm_buffer",[n,e])}},{key:"get_tlm_values",value:function(){var n=(0,c.Z)((0,s.Z)().mark((function n(e){var t,l,i,o;return(0,s.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.exec("get_tlm_values",[e]);case 2:for(t=n.sent,l=t[0].length,i=null,o=0;o<l;o++)i=this.decode_cosmos_type(t[0][o]),null!==i&&(t[0][o]=i);return n.abrupt("return",t);case 7:case"end":return n.stop()}}),n,this)})));function e(e){return n.apply(this,arguments)}return e}()},{key:"get_limits",value:function(n,e,t){return this.exec("get_limits",[n,e,t])}},{key:"tlm",value:function(){var n=(0,c.Z)((0,s.Z)().mark((function n(e,t,l){var i,o;return(0,s.Z)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,this.exec("tlm",[e,t,l]);case 2:return i=n.sent,o=this.decode_cosmos_type(i),null!==o&&(0,gn.Z)("data"),n.abrupt("return",i);case 6:case"end":return n.stop()}}),n,this)})));function e(e,t,l){return n.apply(this,arguments)}return e}()},{key:"get_all_commands",value:function(n){return this.exec("get_all_commands",[n])}},{key:"get_all_commands_list",value:function(n){return this.exec("get_all_commands_list",[n])}},{key:"get_command",value:function(n,e){return this.exec("get_command",[n,e])}},{key:"get_cmd_value",value:function(n,e,t){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"CONVERTED";return this.exec("get_cmd_value",[n,e,t,l])}},{key:"get_cmd_buffer",value:function(n,e){return this.exec("get_cmd_buffer",[n,e])}},{key:"_cmd",value:function(n,e,t,l){var i=null;for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(i=this.encode_cosmos_type(l[o]),null!==i&&(l[o]=i));return this.exec(n,[e,t,l])}},{key:"get_cmd_hazardous",value:function(n,e,t){return void 0===e?this.exec("get_cmd_hazardous",n):this._cmd("get_cmd_hazardous",n,e,t)}},{key:"cmd",value:function(n,e,t){return void 0===e?this.exec("cmd",n):this._cmd("cmd",n,e,t)}},{key:"cmd_no_range_check",value:function(n,e,t){return void 0===e?this.exec("cmd_no_range_check",n):this._cmd("cmd_no_range_check",n,e,t)}},{key:"cmd_raw",value:function(n,e,t){return void 0===e?this.exec("cmd_raw",n):this._cmd("cmd_raw",n,e,t)}},{key:"cmd_raw_no_range_check",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_range_check",n):this._cmd("cmd_raw_no_range_check",n,e,t)}},{key:"cmd_no_hazardous_check",value:function(n,e,t){return void 0===e?this.exec("cmd_no_hazardous_check",n):this._cmd("cmd_no_hazardous_check",n,e,t)}},{key:"cmd_no_checks",value:function(n,e,t){return void 0===e?this.exec("cmd_no_checks",n):this._cmd("cmd_no_checks",n,e,t)}},{key:"cmd_raw_no_hazardous_check",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_hazardous_check",n):this._cmd("cmd_raw_no_hazardous_check",n,e,t)}},{key:"cmd_raw_no_checks",value:function(n,e,t){return void 0===e?this.exec("cmd_raw_no_checks",n):this._cmd("cmd_raw_no_checks",n,e,t)}},{key:"get_interface_names",value:function(){return this.exec("get_interface_names",[])}},{key:"send_raw",value:function(n,e){return this.exec("send_raw",[n,e])}},{key:"list_configs",value:function(n){return this.exec("list_configs",[n])}},{key:"load_config",value:function(n,e){return this.exec("load_config",[n,e])}},{key:"save_config",value:function(n,e,t){return this.exec("save_config",[n,e,t])}},{key:"delete_config",value:function(n,e){return this.exec("delete_config",[n,e])}},{key:"get_out_of_limits",value:function(){return this.exec("get_out_of_limits",[])}},{key:"get_overall_limits_state",value:function(n){return this.exec("get_overall_limits_state",[n])}},{key:"list_settings",value:function(){return this.exec("list_settings",[])}},{key:"get_all_settings",value:function(){return this.exec("get_all_settings",[])}},{key:"get_setting",value:function(n){return this.exec("get_setting",[n])}},{key:"get_settings",value:function(n){return this.exec("get_settings",n)}},{key:"save_setting",value:function(n,e){return this.exec("save_setting",[n,e])}}]),n}()),Tn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-select",{attrs:{items:n.swatches,label:"Color"},scopedSlots:n._u([{key:"selection",fn:function(e){var l=e.item;return[t("div",[t("v-badge",{attrs:{inline:"",color:l}},[t("span",{domProps:{textContent:n._s(l)}})])],1)]}},{key:"item",fn:function(e){var l=e.item;return[t("div",[t("v-badge",{attrs:{inline:"",color:l}},[t("span",{domProps:{textContent:n._s(l)}})])],1)]}}]),model:{value:n.color,callback:function(e){n.color=e},expression:"color"}})],1)},kn=[];function En(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ColorSelectForm.vue",e="995b0e83bb39dfd948cb9f56dd7d9f3a8100edf3",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/ColorSelectForm.vue",statementMap:{0:{start:{line:51,column:4},end:{line:51,column:13}},1:{start:{line:56,column:8},end:{line:56,column:25}},2:{start:{line:59,column:8},end:{line:59,column:34}},3:{start:{line:63,column:6},end:{line:76,column:7}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:9},end:{line:52,column:3}},line:50},1:{name:"(anonymous_1)",decl:{start:{line:55,column:6},end:{line:55,column:7}},loc:{start:{line:55,column:12},end:{line:57,column:7}},line:55},2:{name:"(anonymous_2)",decl:{start:{line:58,column:6},end:{line:58,column:7}},loc:{start:{line:58,column:17},end:{line:60,column:7}},line:58},3:{name:"(anonymous_3)",decl:{start:{line:62,column:14},end:{line:62,column:15}},loc:{start:{line:62,column:26},end:{line:77,column:5}},line:62}},branchMap:{},s:{0:0,1:0,2:0,3:0},f:{0:0,1:0,2:0,3:0},b:{},inputSourceMap:{version:3,sources:["ColorSelectForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ColorSelectForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-select v-model=\"color\" :items=\"swatches\" label=\"Color\">\n <template v-slot:selection=\"{ item }\">\n <div>\n <v-badge inline :color=\"item\">\n <span v-text=\"item\" />\n </v-badge>\n </div>\n </template>\n <template v-slot:item=\"{ item }\">\n <div>\n <v-badge inline :color=\"item\">\n <span v-text=\"item\" />\n </v-badge>\n </div>\n </template>\n </v-select>\n </div>\n</template>\n\n<script>\nexport default {\n components: {},\n props: {\n value: {\n type: String,\n required: true,\n },\n },\n data() {\n return {}\n },\n computed: {\n color: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n swatches: function () {\n return [\n '#005a8f',\n '#003784',\n '#8F3400',\n '#df1368',\n '#ff5252',\n '#df323b',\n '#9f0010',\n '#2d9437',\n '#004700',\n '#db7200',\n '#802700',\n '#0f2941',\n ]\n },\n },\n methods: {},\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"995b0e83bb39dfd948cb9f56dd7d9f3a8100edf3"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return En=function(){return a},a}En();var Dn={components:{},props:{value:{type:String,required:!0}},data:function(){return En().f[0]++,En().s[0]++,{}},computed:{color:{get:function(){return En().f[1]++,En().s[1]++,this.value},set:function(n){En().f[2]++,En().s[2]++,this.$emit("input",n)}},swatches:function(){return En().f[3]++,En().s[3]++,["#005a8f","#003784","#8F3400","#df1368","#ff5252","#df323b","#9f0010","#2d9437","#004700","#db7200","#802700","#0f2941"]}},methods:{}},Sn=Dn,Mn=(0,E.Z)(Sn,Tn,kn,!1,null,null,null),Fn=Mn.exports,Nn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-simple-table",{attrs:{dense:""}},[t("tbody",[t("tr",[t("th",{staticClass:"text-left"},[n._v("Key")]),t("th",{staticClass:"text-left"},[n._v("Value")]),t("th",{staticClass:"text-right"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"new-metadata-icon"},on:{click:n.newMetadata}},[n._v(" mdi-plus ")])],1)]}}])},[t("span",[n._v(" New Metadata ")])])],1)]),n._l(n.metadata,(function(e,l){return[t("tr",{key:"tr-"+l},[t("td",[t("v-text-field",{attrs:{type:"text",dense:"","data-test":"key-"+l},model:{value:e.key,callback:function(t){n.$set(e,"key",t)},expression:"meta.key"}})],1),t("td",[t("v-text-field",{attrs:{type:"text",dense:"","data-test":"value-"+l},model:{value:e.value,callback:function(t){n.$set(e,"value",t)},expression:"meta.value"}})],1),t("td",[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var i=e.on,o=e.attrs;return[t("div",n._g(n._b({},"div",o,!1),i),[t("v-icon",{attrs:{"data-test":"delete-metadata-icon-"+l},on:{click:function(e){return n.rm(l)}}},[n._v(" mdi-delete ")])],1)]}}],null,!0)},[t("span",[n._v(" Delete Metadata ")])])],1)])]}))],2)])],1)},In=[];function On(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataInputForm.vue",e="6ddd216607570368cb9c05b6e9aef180321355c2",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataInputForm.vue",statementMap:{0:{start:{line:90,column:4},end:{line:90,column:13}},1:{start:{line:95,column:8},end:{line:95,column:25}},2:{start:{line:98,column:8},end:{line:98,column:34}},3:{start:{line:104,column:6},end:{line:107,column:8}},4:{start:{line:110,column:6},end:{line:110,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:89,column:2},end:{line:89,column:3}},loc:{start:{line:89,column:9},end:{line:91,column:3}},line:89},1:{name:"(anonymous_1)",decl:{start:{line:94,column:6},end:{line:94,column:7}},loc:{start:{line:94,column:12},end:{line:96,column:7}},line:94},2:{name:"(anonymous_2)",decl:{start:{line:97,column:6},end:{line:97,column:7}},loc:{start:{line:97,column:17},end:{line:99,column:7}},line:97},3:{name:"(anonymous_3)",decl:{start:{line:103,column:17},end:{line:103,column:18}},loc:{start:{line:103,column:29},end:{line:108,column:5}},line:103},4:{name:"(anonymous_4)",decl:{start:{line:109,column:8},end:{line:109,column:9}},loc:{start:{line:109,column:25},end:{line:111,column:5}},line:109}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0,3:0,4:0},b:{},inputSourceMap:{version:3,sources:["MetadataInputForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataInputForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-simple-table dense>\n <tbody>\n <tr>\n <th class="text-left">Key</th>\n <th class="text-left">Value</th>\n <th class="text-right">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="new-metadata-icon" @click="newMetadata">\n mdi-plus\n </v-icon>\n </div>\n </template>\n <span> New Metadata </span>\n </v-tooltip>\n </th>\n </tr>\n <template v-for="(meta, i) in metadata">\n <tr :key="`tr-${i}`">\n <td>\n <v-text-field\n v-model="meta.key"\n type="text"\n dense\n :data-test="`key-${i}`"\n />\n </td>\n <td>\n <v-text-field\n v-model="meta.value"\n type="text"\n dense\n :data-test="`value-${i}`"\n />\n </td>\n <td>\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon\n :data-test="`delete-metadata-icon-${i}`"\n @click="rm(i)"\n >\n mdi-delete\n </v-icon>\n </div>\n </template>\n <span> Delete Metadata </span>\n </v-tooltip>\n </td>\n </tr>\n </template>\n </tbody>\n </v-simple-table>\n </div>\n</template>\n\n<script>\nexport default {\n components: {},\n props: {\n value: {\n type: Array,\n required: true,\n },\n },\n data() {\n return {}\n },\n computed: {\n metadata: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n newMetadata: function () {\n this.metadata.push({\n key: \'\',\n value: \'\',\n })\n },\n rm: function (index) {\n this.metadata.splice(index, 1)\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"6ddd216607570368cb9c05b6e9aef180321355c2"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return On=function(){return a},a}On();var Rn={components:{},props:{value:{type:Array,required:!0}},data:function(){return On().f[0]++,On().s[0]++,{}},computed:{metadata:{get:function(){return On().f[1]++,On().s[1]++,this.value},set:function(n){On().f[2]++,On().s[2]++,this.$emit("input",n)}}},methods:{newMetadata:function(){On().f[3]++,On().s[3]++,this.metadata.push({key:"",value:""})},rm:function(n){On().f[4]++,On().s[4]++,this.metadata.splice(n,1)}}},$n=Rn,Un=(0,E.Z)($n,Nn,In,!1,null,null,null),Ln=Un.exports;function Pn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataUpdateDialog.vue",e="08a2f1da4969b98a083581700d4960ae4f9a2c91",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataUpdateDialog.vue",statementMap:{0:{start:{line:164,column:4},end:{line:177,column:5}},1:{start:{line:175,column:29},end:{line:175,column:50}},2:{start:{line:181,column:6},end:{line:183,column:7}},3:{start:{line:182,column:8},end:{line:182,column:27}},4:{start:{line:187,column:4},end:{line:187,column:24}},5:{start:{line:191,column:6},end:{line:193,column:7}},6:{start:{line:192,column:8},end:{line:192,column:59}},7:{start:{line:194,column:18},end:{line:194,column:28}},8:{start:{line:195,column:20},end:{line:195,column:69}},9:{start:{line:196,column:6},end:{line:198,column:7}},10:{start:{line:197,column:8},end:{line:197,column:61}},11:{start:{line:199,column:6},end:{line:199,column:17}},12:{start:{line:202,column:6},end:{line:204,column:7}},13:{start:{line:203,column:8},end:{line:203,column:60}},14:{start:{line:205,column:28},end:{line:207,column:7}},15:{start:{line:206,column:18},end:{line:206,column:54}},16:{start:{line:208,column:6},end:{line:210,column:7}},17:{start:{line:209,column:8},end:{line:209,column:67}},18:{start:{line:211,column:6},end:{line:211,column:17}},19:{start:{line:215,column:8},end:{line:215,column:25}},20:{start:{line:218,column:8},end:{line:218,column:34}},21:{start:{line:224,column:20},end:{line:224,column:52}},22:{start:{line:225,column:6},end:{line:225,column:50}},23:{start:{line:226,column:6},end:{line:226,column:48}},24:{start:{line:227,column:6},end:{line:229,column:8}},25:{start:{line:228,column:8},end:{line:228,column:62}},26:{start:{line:230,column:6},end:{line:230,column:41}},27:{start:{line:231,column:6},end:{line:231,column:43}},28:{start:{line:234,column:6},end:{line:237,column:8}},29:{start:{line:235,column:8},end:{line:235,column:27}},30:{start:{line:236,column:8},end:{line:236,column:48}},31:{start:{line:240,column:20},end:{line:240,column:30}},32:{start:{line:241,column:23},end:{line:244,column:12}},33:{start:{line:242,column:8},end:{line:242,column:43}},34:{start:{line:243,column:8},end:{line:243,column:21}},35:{start:{line:245,column:20},end:{line:247,column:7}},36:{start:{line:248,column:21},end:{line:248,column:32}},37:{start:{line:249,column:6},end:{line:256,column:8}},38:{start:{line:252,column:8},end:{line:255,column:10}},39:{start:{line:257,column:6},end:{line:257,column:25}},40:{start:{line:258,column:6},end:{line:258,column:28}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:163,column:2},end:{line:163,column:3}},loc:{start:{line:163,column:9},end:{line:178,column:3}},line:163},1:{name:"(anonymous_1)",decl:{start:{line:175,column:18},end:{line:175,column:19}},loc:{start:{line:175,column:29},end:{line:175,column:50}},line:175},2:{name:"(anonymous_2)",decl:{start:{line:180,column:10},end:{line:180,column:11}},loc:{start:{line:180,column:22},end:{line:184,column:5}},line:180},3:{name:"(anonymous_3)",decl:{start:{line:186,column:11},end:{line:186,column:12}},loc:{start:{line:186,column:23},end:{line:188,column:3}},line:186},4:{name:"(anonymous_4)",decl:{start:{line:190,column:15},end:{line:190,column:16}},loc:{start:{line:190,column:27},end:{line:200,column:5}},line:190},5:{name:"(anonymous_5)",decl:{start:{line:201,column:15},end:{line:201,column:16}},loc:{start:{line:201,column:27},end:{line:212,column:5}},line:201},6:{name:"(anonymous_6)",decl:{start:{line:206,column:8},end:{line:206,column:9}},loc:{start:{line:206,column:18},end:{line:206,column:54}},line:206},7:{name:"(anonymous_7)",decl:{start:{line:214,column:6},end:{line:214,column:7}},loc:{start:{line:214,column:12},end:{line:216,column:7}},line:214},8:{name:"(anonymous_8)",decl:{start:{line:217,column:6},end:{line:217,column:7}},loc:{start:{line:217,column:17},end:{line:219,column:7}},line:217},9:{name:"(anonymous_9)",decl:{start:{line:223,column:18},end:{line:223,column:19}},loc:{start:{line:223,column:30},end:{line:232,column:5}},line:223},10:{name:"(anonymous_10)",decl:{start:{line:227,column:65},end:{line:227,column:66}},loc:{start:{line:227,column:72},end:{line:229,column:7}},line:227},11:{name:"(anonymous_11)",decl:{start:{line:233,column:19},end:{line:233,column:20}},loc:{start:{line:233,column:31},end:{line:238,column:5}},line:233},12:{name:"(anonymous_12)",decl:{start:{line:234,column:45},end:{line:234,column:46}},loc:{start:{line:234,column:55},end:{line:237,column:7}},line:234},13:{name:"(anonymous_13)",decl:{start:{line:239,column:20},end:{line:239,column:21}},loc:{start:{line:239,column:32},end:{line:259,column:5}},line:239},14:{name:"(anonymous_14)",decl:{start:{line:241,column:44},end:{line:241,column:45}},loc:{start:{line:241,column:65},end:{line:244,column:7}},line:241},15:{name:"(anonymous_15)",decl:{start:{line:251,column:14},end:{line:251,column:15}},loc:{start:{line:251,column:28},end:{line:256,column:7}},line:251}},branchMap:{0:{loc:{start:{line:175,column:29},end:{line:175,column:50}},type:"binary-expr",locations:[{start:{line:175,column:29},end:{line:175,column:36}},{start:{line:175,column:40},end:{line:175,column:50}}],line:175},1:{loc:{start:{line:181,column:6},end:{line:183,column:7}},type:"if",locations:[{start:{line:181,column:6},end:{line:183,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:181},2:{loc:{start:{line:191,column:6},end:{line:193,column:7}},type:"if",locations:[{start:{line:191,column:6},end:{line:193,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:191},3:{loc:{start:{line:196,column:6},end:{line:198,column:7}},type:"if",locations:[{start:{line:196,column:6},end:{line:198,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:196},4:{loc:{start:{line:202,column:6},end:{line:204,column:7}},type:"if",locations:[{start:{line:202,column:6},end:{line:204,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:202},5:{loc:{start:{line:206,column:18},end:{line:206,column:54}},type:"binary-expr",locations:[{start:{line:206,column:18},end:{line:206,column:33}},{start:{line:206,column:37},end:{line:206,column:54}}],line:206},6:{loc:{start:{line:208,column:6},end:{line:210,column:7}},type:"if",locations:[{start:{line:208,column:6},end:{line:210,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:208}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0]},inputSourceMap:{version:3,sources:["MetadataUpdateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6IA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataUpdateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="updateMetadata">\n <v-system-bar>\n <v-spacer />\n <span>Update Metadata</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-metadata-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-select v-model="target" :items="targets" label="Target" />\n <color-select-form v-model="color" />\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="start-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-metadata-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2"> Metadata input </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div style="min-height: 200px">\n <metadata-input-form v-model="metadata" />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="update-metadata-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="updateMetadata"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="update-metadata-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport { CosmosApi } from \'@cosmosc2/tool-common/src/services/cosmos-api\'\n\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\nimport MetadataInputForm from \'@/tools/Calendar/Forms/MetadataInputForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n MetadataInputForm,\n },\n props: {\n metadataObj: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n scope: localStorage.scope,\n dialogStep: 1,\n target: \'\',\n targets: [],\n startDate: \'\',\n startTime: \'\',\n utcOrLocal: \'loc\',\n color: \'\',\n metadata: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n watch: {\n show: function () {\n if (this.show) {\n this.updateValues()\n }\n },\n },\n mounted: function () {\n this.updateTargets()\n },\n computed: {\n timeError: function () {\n if (!this.target) {\n return \'Metadata must be associated with a target.\'\n }\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n if (now < start) {\n return \'Invalid start time. Can not be in the future\'\n }\n return null\n },\n typeError: function () {\n if (this.metadata.length < 1) {\n return \'Please enter a value in the metadata table.\'\n }\n const emptyKeyValue = this.metadata.find(\n (meta) => meta.key === \'\' || meta.value === \'\'\n )\n if (emptyKeyValue) {\n return \'Missing or empty key, value in the metadata table.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n const sDate = new Date(this.metadataObj.start)\n this.startDate = format(sDate, \'yyyy-MM-dd\')\n this.startTime = format(sDate, \'HH:mm:ss\')\n this.metadata = Object.keys(this.metadataObj.metadata).map((k) => {\n return { key: k, value: this.metadataObj.metadata[k] }\n })\n this.color = this.metadataObj.color\n this.target = this.metadataObj.target\n },\n updateTargets: function () {\n new CosmosApi().get_target_list().then((data) => {\n this.targets = data\n this.targets.unshift(localStorage.scope)\n })\n },\n updateMetadata: function () {\n const color = this.color\n const metadata = this.metadata.reduce((result, element) => {\n result[element.key] = element.value\n return result\n }, {})\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const target = this.target\n Api.put(`/cosmos-api/metadata/${this.metadataObj.start}`, {\n data: { start, color, target, metadata },\n }).then((response) => {\n this.$notify.normal({\n title: \'Updated Metadata\',\n body: `Metadata updated: (${response.data.start})`,\n })\n })\n this.$emit(\'close\')\n this.show = !this.show\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"08a2f1da4969b98a083581700d4960ae4f9a2c91"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Pn=function(){return a},a}Pn();var qn={components:{ColorSelectForm:Fn,MetadataInputForm:Ln},props:{metadataObj:{type:Object,required:!0},value:Boolean},mixins:[U],data:function(){return Pn().f[0]++,Pn().s[0]++,{scope:localStorage.scope,dialogStep:1,target:"",targets:[],startDate:"",startTime:"",utcOrLocal:"loc",color:"",metadata:[],rules:{required:function(n){return Pn().f[1]++,Pn().s[1]++,Pn().b[0][0]++,!!n||(Pn().b[0][1]++,"Required")}}}},watch:{show:function(){Pn().f[2]++,Pn().s[2]++,this.show?(Pn().b[1][0]++,Pn().s[3]++,this.updateValues()):Pn().b[1][1]++}},mounted:function(){Pn().f[3]++,Pn().s[4]++,this.updateTargets()},computed:{timeError:function(){if(Pn().f[4]++,Pn().s[5]++,!this.target)return Pn().b[2][0]++,Pn().s[6]++,"Metadata must be associated with a target.";Pn().b[2][1]++;var n=(Pn().s[7]++,new Date),e=(Pn().s[8]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime)));return Pn().s[9]++,n<e?(Pn().b[3][0]++,Pn().s[10]++,"Invalid start time. Can not be in the future"):(Pn().b[3][1]++,Pn().s[11]++,null)},typeError:function(){if(Pn().f[5]++,Pn().s[12]++,this.metadata.length<1)return Pn().b[4][0]++,Pn().s[13]++,"Please enter a value in the metadata table.";Pn().b[4][1]++;var n=(Pn().s[14]++,this.metadata.find((function(n){return Pn().f[6]++,Pn().s[15]++,Pn().b[5][0]++,""===n.key||(Pn().b[5][1]++,""===n.value)})));return Pn().s[16]++,n?(Pn().b[6][0]++,Pn().s[17]++,"Missing or empty key, value in the metadata table."):(Pn().b[6][1]++,Pn().s[18]++,null)},show:{get:function(){return Pn().f[7]++,Pn().s[19]++,this.value},set:function(n){Pn().f[8]++,Pn().s[20]++,this.$emit("input",n)}}},methods:{updateValues:function(){var n=this;Pn().f[9]++;var e=(Pn().s[21]++,new Date(this.metadataObj.start));Pn().s[22]++,this.startDate=(0,V.Z)(e,"yyyy-MM-dd"),Pn().s[23]++,this.startTime=(0,V.Z)(e,"HH:mm:ss"),Pn().s[24]++,this.metadata=Object.keys(this.metadataObj.metadata).map((function(e){return Pn().f[10]++,Pn().s[25]++,{key:e,value:n.metadataObj.metadata[e]}})),Pn().s[26]++,this.color=this.metadataObj.color,Pn().s[27]++,this.target=this.metadataObj.target},updateTargets:function(){var n=this;Pn().f[11]++,Pn().s[28]++,(new xn).get_target_list().then((function(e){Pn().f[12]++,Pn().s[29]++,n.targets=e,Pn().s[30]++,n.targets.unshift(localStorage.scope)}))},updateMetadata:function(){var n=this;Pn().f[13]++;var e=(Pn().s[31]++,this.color),t=(Pn().s[32]++,this.metadata.reduce((function(n,e){return Pn().f[14]++,Pn().s[33]++,n[e.key]=e.value,Pn().s[34]++,n}),{})),l=(Pn().s[35]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),i=(Pn().s[36]++,this.target);Pn().s[37]++,f.put("/cosmos-api/metadata/".concat(this.metadataObj.start),{data:{start:l,color:e,target:i,metadata:t}}).then((function(e){Pn().f[15]++,Pn().s[38]++,n.$notify.normal({title:"Updated Metadata",body:"Metadata updated: (".concat(e.data.start,")")})})),Pn().s[39]++,this.$emit("close"),Pn().s[40]++,this.show=!this.show}}},Hn=qn,Zn=(t(1377),(0,E.Z)(Hn,yn,bn,!1,null,"b9464e3c",null)),jn=Zn.exports;function Gn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataEventForm.vue",e="c3533ec04316b2689b9b10662b346e9e9cafc01b",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/MetadataEventForm.vue",statementMap:{0:{start:{line:114,column:4},end:{line:116,column:5}},1:{start:{line:120,column:23},end:{line:120,column:59}},2:{start:{line:121,column:6},end:{line:123,column:8}},3:{start:{line:122,column:8},end:{line:122,column:45}},4:{start:{line:126,column:16},end:{line:126,column:74}},5:{start:{line:127,column:6},end:{line:127,column:24}},6:{start:{line:130,column:6},end:{line:130,column:50}},7:{start:{line:135,column:6},end:{line:135,column:25}},8:{start:{line:138,column:6},end:{line:138,column:52}},9:{start:{line:141,column:28},end:{line:141,column:61}},10:{start:{line:142,column:25},end:{line:145,column:7}},11:{start:{line:146,column:6},end:{line:171,column:10}},12:{start:{line:155,column:10},end:{line:155,column:68}},13:{start:{line:158,column:10},end:{line:161,column:12}},14:{start:{line:162,column:10},end:{line:162,column:29}},15:{start:{line:165,column:10},end:{line:170,column:11}},16:{start:{line:166,column:12},end:{line:169,column:14}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:113,column:2},end:{line:113,column:3}},loc:{start:{line:113,column:9},end:{line:117,column:3}},line:113},1:{name:"(anonymous_1)",decl:{start:{line:119,column:20},end:{line:119,column:21}},loc:{start:{line:119,column:32},end:{line:124,column:5}},line:119},2:{name:"(anonymous_2)",decl:{start:{line:121,column:39},end:{line:121,column:40}},loc:{start:{line:121,column:46},end:{line:123,column:7}},line:121},3:{name:"(anonymous_3)",decl:{start:{line:125,column:16},end:{line:125,column:17}},loc:{start:{line:125,column:28},end:{line:128,column:5}},line:125},4:{name:"(anonymous_4)",decl:{start:{line:129,column:11},end:{line:129,column:12}},loc:{start:{line:129,column:23},end:{line:131,column:5}},line:129},5:{name:"(anonymous_5)",decl:{start:{line:134,column:11},end:{line:134,column:12}},loc:{start:{line:134,column:23},end:{line:136,column:5}},line:134},6:{name:"(anonymous_6)",decl:{start:{line:137,column:18},end:{line:137,column:19}},loc:{start:{line:137,column:30},end:{line:139,column:5}},line:137},7:{name:"(anonymous_7)",decl:{start:{line:140,column:18},end:{line:140,column:19}},loc:{start:{line:140,column:30},end:{line:172,column:5}},line:140},8:{name:"(anonymous_8)",decl:{start:{line:154,column:14},end:{line:154,column:15}},loc:{start:{line:154,column:26},end:{line:156,column:9}},line:154},9:{name:"(anonymous_9)",decl:{start:{line:157,column:14},end:{line:157,column:15}},loc:{start:{line:157,column:28},end:{line:163,column:9}},line:157},10:{name:"(anonymous_10)",decl:{start:{line:164,column:15},end:{line:164,column:16}},loc:{start:{line:164,column:26},end:{line:171,column:9}},line:164}},branchMap:{0:{loc:{start:{line:165,column:10},end:{line:170,column:11}},type:"if",locations:[{start:{line:165,column:10},end:{line:170,column:11}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:165}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["MetadataEventForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataEventForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card-title v-text="title" />\n <v-card-subtitle>\n <span>\n {{ metadataEvent.start | dateTime(utc) }}\n </span>\n </v-card-subtitle>\n <div class="ma-2">\n <v-card-text>\n <v-row>\n <v-col class="pa-0">\n <v-simple-table dense>\n <tbody>\n <tr>\n <th class="text-left">Key</th>\n <th class="text-left">Value</th>\n </tr>\n <template v-for="(value, i) in metadataValues">\n <tr :key="`tr-${i}`">\n <td class="text-left">\n <span v-text="value.key" />\n </td>\n <td class="text-left">\n <span v-text="value.value" />\n </td>\n </tr>\n </template>\n </tbody>\n </v-simple-table>\n </v-col>\n </v-row>\n <v-row class="pt-1">\n <v-col class="text-right pa-0">\n <span class="text-caption">\n Last update: {{ updated_at | dateTime(utc) }}\n </span>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions class="pa-1">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="update-metadata" @click="updateDialog">\n <v-icon>mdi-pencil</v-icon>\n </v-btn>\n </div>\n </template>\n <span> Update </span>\n </v-tooltip>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="delete-metadata" @click="deleteDialog">\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Delete </span>\n </v-tooltip>\n </v-card-actions>\n </div>\n \x3c!--- Menus ---\x3e\n <metadata-update-dialog\n v-model="showUpdateDialog"\n :metadata-obj="metadataEvent.metadata"\n @close="close"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport MetadataUpdateDialog from \'@/tools/Calendar/Dialogs/MetadataUpdateDialog\'\n\nexport default {\n components: {\n MetadataUpdateDialog,\n },\n mixins: [TimeFilters],\n props: {\n metadataEvent: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n metadataValues: function () {\n const metadata = this.metadataEvent.metadata.metadata\n return Object.keys(metadata).map((k) => {\n return { key: k, value: metadata[k] }\n })\n },\n updated_at: function () {\n const v = parseInt(this.metadataEvent.metadata.updated_at / 1000000)\n return new Date(v)\n },\n title: function () {\n return `${this.metadataEvent.metadata.type}`\n },\n },\n methods: {\n close: function () {\n this.$emit(\'close\')\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n deleteDialog: function () {\n const metadataStart = this.metadataEvent.metadata.start\n const eventStart = this.generateDateTime(\n this.metadataEvent.start,\n this.utc\n )\n this.$dialog\n .confirm(\n `Are you sure you want to remove metadata: ${eventStart} (${metadataStart})`,\n {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n }\n )\n .then((dialog) => {\n return Api.delete(`/cosmos-api/metadata/${metadataStart}`)\n })\n .then((response) => {\n this.$notify.normal({\n title: \'Deleted Metadata\',\n body: `Deleted metadata: ${eventStart} (${metadataStart})`,\n })\n this.$emit(\'close\')\n })\n .catch((error) => {\n if (error) {\n this.$notify.error({\n title: \'Failed to Delete Metadata\',\n body: `Failed to delete metadata ${metadataStart}. Error: ${error}`,\n })\n }\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"c3533ec04316b2689b9b10662b346e9e9cafc01b"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Gn=function(){return a},a}Gn();var Bn={components:{MetadataUpdateDialog:jn},mixins:[U],props:{metadataEvent:{type:Object,required:!0},utc:{type:Boolean,required:!0}},data:function(){return Gn().f[0]++,Gn().s[0]++,{showUpdateDialog:!1}},computed:{metadataValues:function(){Gn().f[1]++;var n=(Gn().s[1]++,this.metadataEvent.metadata.metadata);return Gn().s[2]++,Object.keys(n).map((function(e){return Gn().f[2]++,Gn().s[3]++,{key:e,value:n[e]}}))},updated_at:function(){Gn().f[3]++;var n=(Gn().s[4]++,parseInt(this.metadataEvent.metadata.updated_at/1e6));return Gn().s[5]++,new Date(n)},title:function(){return Gn().f[4]++,Gn().s[6]++,"".concat(this.metadataEvent.metadata.type)}},methods:{close:function(){Gn().f[5]++,Gn().s[7]++,this.$emit("close")},updateDialog:function(){Gn().f[6]++,Gn().s[8]++,this.showUpdateDialog=!this.showUpdateDialog},deleteDialog:function(){var n=this;Gn().f[7]++;var e=(Gn().s[9]++,this.metadataEvent.metadata.start),t=(Gn().s[10]++,this.generateDateTime(this.metadataEvent.start,this.utc));Gn().s[11]++,this.$dialog.confirm("Are you sure you want to remove metadata: ".concat(t," (").concat(e,")"),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return Gn().f[8]++,Gn().s[12]++,f["delete"]("/cosmos-api/metadata/".concat(e))})).then((function(l){Gn().f[9]++,Gn().s[13]++,n.$notify.normal({title:"Deleted Metadata",body:"Deleted metadata: ".concat(t," (").concat(e,")")}),Gn().s[14]++,n.$emit("close")})).catch((function(t){Gn().f[10]++,Gn().s[15]++,t?(Gn().b[0][0]++,Gn().s[16]++,n.$notify.error({title:"Failed to Delete Metadata",body:"Failed to delete metadata ".concat(e,". Error: ").concat(t)})):Gn().b[0][1]++}))}}},Yn=Bn,Vn=(t(1830),(0,E.Z)(Yn,Cn,fn,!1,null,"49e08040",null)),Wn=Vn.exports,Kn=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-card-title",{domProps:{textContent:n._s(n.noteEvent.name)}}),t("v-card-subtitle",[t("span",[n._v(" "+n._s(n._f("dateTime")(n.noteEvent.start,n.utc))+" ")]),t("br"),t("span",[n._v(" "+n._s(n._f("dateTime")(n.noteEvent.end,n.utc))+" ")])]),t("div",{staticClass:"ma-2"},[t("v-card-text",[t("v-row",[t("v-textarea",{attrs:{readonly:"",rows:"6",value:n.description}})],1),t("v-row",{staticClass:"pt-1"},[t("v-col",{staticClass:"text-right pa-0"},[t("span",{staticClass:"text-caption"},[n._v(" Last update: "+n._s(n._f("dateTime")(n.updated_at,n.utc))+" ")])])],1)],1),t("v-card-actions",{staticClass:"pa-1"},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"update-note"},on:{click:n.updateDialog}},[t("v-icon",[n._v("mdi-pencil")])],1)],1)]}}])},[t("span",[n._v(" Update ")])]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"delete-note"},on:{click:n.deleteDialog}},[t("v-icon",[n._v(" mdi-delete ")])],1)],1)]}}])},[t("span",[n._v(" Delete ")])])],1)],1),t("note-update-dialog",{attrs:{note:n.noteEvent.note},on:{close:n.close},model:{value:n.showUpdateDialog,callback:function(e){n.showUpdateDialog=e},expression:"showUpdateDialog"}})],1)},Jn=[],zn=(t(4115),t(634),function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.updateNote.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Update Note")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"close-note-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"note-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"note-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"note-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"note-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"update-note-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Input Description ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",[t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}})],1),t("div",[t("v-text-field",{attrs:{type:"text",label:"Note Description","data-test":"update-note-description"},model:{value:n.description,callback:function(e){n.description=e},expression:"description"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"update-note-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"update-note-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.updateNote.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)}),Qn=[];function Xn(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NoteUpdateDialog.vue",e="b649e3a516aa5b704093ac649d2b8762ca1eeed2",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NoteUpdateDialog.vue",statementMap:{0:{start:{line:187,column:4},end:{line:199,column:5}},1:{start:{line:197,column:29},end:{line:197,column:50}},2:{start:{line:203,column:6},end:{line:203,column:25}},3:{start:{line:208,column:18},end:{line:208,column:28}},4:{start:{line:209,column:20},end:{line:209,column:69}},5:{start:{line:210,column:19},end:{line:210,column:66}},6:{start:{line:211,column:6},end:{line:213,column:7}},7:{start:{line:212,column:8},end:{line:212,column:90}},8:{start:{line:214,column:6},end:{line:216,column:7}},9:{start:{line:215,column:8},end:{line:215,column:60}},10:{start:{line:217,column:6},end:{line:217,column:17}},11:{start:{line:220,column:6},end:{line:222,column:7}},12:{start:{line:221,column:8},end:{line:221,column:60}},13:{start:{line:223,column:6},end:{line:223,column:17}},14:{start:{line:227,column:8},end:{line:227,column:25}},15:{start:{line:230,column:8},end:{line:230,column:34}},16:{start:{line:236,column:6},end:{line:236,column:25}},17:{start:{line:237,column:20},end:{line:237,column:52}},18:{start:{line:238,column:20},end:{line:238,column:51}},19:{start:{line:239,column:6},end:{line:239,column:50}},20:{start:{line:240,column:6},end:{line:240,column:48}},21:{start:{line:241,column:6},end:{line:241,column:49}},22:{start:{line:242,column:6},end:{line:242,column:47}},23:{start:{line:243,column:6},end:{line:243,column:34}},24:{start:{line:244,column:6},end:{line:244,column:46}},25:{start:{line:247,column:20},end:{line:249,column:7}},26:{start:{line:250,column:19},end:{line:252,column:7}},27:{start:{line:253,column:20},end:{line:253,column:30}},28:{start:{line:254,column:26},end:{line:254,column:42}},29:{start:{line:255,column:6},end:{line:266,column:8}},30:{start:{line:259,column:10},end:{line:261,column:39}},31:{start:{line:262,column:8},end:{line:265,column:10}},32:{start:{line:267,column:6},end:{line:267,column:25}},33:{start:{line:268,column:6},end:{line:268,column:28}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:186,column:2},end:{line:186,column:3}},loc:{start:{line:186,column:9},end:{line:200,column:3}},line:186},1:{name:"(anonymous_1)",decl:{start:{line:197,column:18},end:{line:197,column:19}},loc:{start:{line:197,column:29},end:{line:197,column:50}},line:197},2:{name:"(anonymous_2)",decl:{start:{line:202,column:10},end:{line:202,column:11}},loc:{start:{line:202,column:22},end:{line:204,column:5}},line:202},3:{name:"(anonymous_3)",decl:{start:{line:207,column:15},end:{line:207,column:16}},loc:{start:{line:207,column:27},end:{line:218,column:5}},line:207},4:{name:"(anonymous_4)",decl:{start:{line:219,column:15},end:{line:219,column:16}},loc:{start:{line:219,column:27},end:{line:224,column:5}},line:219},5:{name:"(anonymous_5)",decl:{start:{line:226,column:6},end:{line:226,column:7}},loc:{start:{line:226,column:12},end:{line:228,column:7}},line:226},6:{name:"(anonymous_6)",decl:{start:{line:229,column:6},end:{line:229,column:7}},loc:{start:{line:229,column:17},end:{line:231,column:7}},line:229},7:{name:"(anonymous_7)",decl:{start:{line:235,column:18},end:{line:235,column:19}},loc:{start:{line:235,column:30},end:{line:245,column:5}},line:235},8:{name:"(anonymous_8)",decl:{start:{line:246,column:16},end:{line:246,column:17}},loc:{start:{line:246,column:28},end:{line:269,column:5}},line:246},9:{name:"(anonymous_9)",decl:{start:{line:257,column:14},end:{line:257,column:15}},loc:{start:{line:257,column:28},end:{line:266,column:7}},line:257}},branchMap:{0:{loc:{start:{line:197,column:29},end:{line:197,column:50}},type:"binary-expr",locations:[{start:{line:197,column:29},end:{line:197,column:36}},{start:{line:197,column:40},end:{line:197,column:50}}],line:197},1:{loc:{start:{line:211,column:6},end:{line:213,column:7}},type:"if",locations:[{start:{line:211,column:6},end:{line:213,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:211},2:{loc:{start:{line:214,column:6},end:{line:216,column:7}},type:"if",locations:[{start:{line:214,column:6},end:{line:216,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:214},3:{loc:{start:{line:220,column:6},end:{line:222,column:7}},type:"if",locations:[{start:{line:220,column:6},end:{line:222,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:220},4:{loc:{start:{line:259,column:10},end:{line:261,column:39}},type:"cond-expr",locations:[{start:{line:260,column:14},end:{line:260,column:64}},{start:{line:261,column:14},end:{line:261,column:39}}],line:259}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0]},inputSourceMap:{version:3,sources:["NoteUpdateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"NoteUpdateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="updateNote">\n <v-system-bar>\n <v-spacer />\n <span>Update Note</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-note-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="update-note-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">\n Input Description\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div>\n <color-select-form v-model="color" />\n </div>\n <div>\n <v-text-field\n v-model="description"\n type="text"\n label="Note Description"\n data-test="update-note-description"\n />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="update-note-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="updateNote"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="update-note-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n },\n props: {\n note: {\n type: Object,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n description: \'\',\n color: \'\',\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n watch: {\n show: function () {\n this.updateValues()\n },\n },\n computed: {\n timeError: function () {\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Notes must have different start and stop times.\'\n }\n if (start > stop) {\n return \'Invalid start time. Note start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (!this.description) {\n return \'A description is required for a valid note.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n this.dialogStep = 1\n const sDate = new Date(this.note.start * 1000)\n const eDate = new Date(this.note.stop * 1000)\n this.startDate = format(sDate, \'yyyy-MM-dd\')\n this.startTime = format(sDate, \'HH:mm:ss\')\n this.stopDate = format(eDate, \'yyyy-MM-dd\')\n this.stopTime = format(eDate, \'HH:mm:ss\')\n this.color = this.note.color\n this.description = this.note.description\n },\n updateNote: function () {\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const color = this.color\n const description = this.description\n Api.put(`/cosmos-api/notes/${this.note.start}`, {\n data: { start, stop, color, description },\n }).then((response) => {\n const desc =\n response.data.description.length > 16\n ? `${response.data.description.substring(0, 16)}...`\n : response.data.description\n this.$notify.normal({\n title: \'Updated Note\',\n body: `Note updated: (${response.data.start}): "${desc}"`,\n })\n })\n this.$emit(\'close\')\n this.show = !this.show\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"b649e3a516aa5b704093ac649d2b8762ca1eeed2"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Xn=function(){return a},a}Xn();var ne={components:{ColorSelectForm:Fn},props:{note:{type:Object,required:!0},value:Boolean},mixins:[U],data:function(){return Xn().f[0]++,Xn().s[0]++,{dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",description:"",color:"",rules:{required:function(n){return Xn().f[1]++,Xn().s[1]++,Xn().b[0][0]++,!!n||(Xn().b[0][1]++,"Required")}}}},watch:{show:function(){Xn().f[2]++,Xn().s[2]++,this.updateValues()}},computed:{timeError:function(){Xn().f[3]++;Xn().s[3]++,new Date;var n=(Xn().s[4]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),e=(Xn().s[5]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return Xn().s[6]++,n===e?(Xn().b[1][0]++,Xn().s[7]++,"Invalid start, stop time. Notes must have different start and stop times."):(Xn().b[1][1]++,Xn().s[8]++,n>e?(Xn().b[2][0]++,Xn().s[9]++,"Invalid start time. Note start before stop."):(Xn().b[2][1]++,Xn().s[10]++,null))},typeError:function(){return Xn().f[4]++,Xn().s[11]++,this.description?(Xn().b[3][1]++,Xn().s[13]++,null):(Xn().b[3][0]++,Xn().s[12]++,"A description is required for a valid note.")},show:{get:function(){return Xn().f[5]++,Xn().s[14]++,this.value},set:function(n){Xn().f[6]++,Xn().s[15]++,this.$emit("input",n)}}},methods:{updateValues:function(){Xn().f[7]++,Xn().s[16]++,this.dialogStep=1;var n=(Xn().s[17]++,new Date(1e3*this.note.start)),e=(Xn().s[18]++,new Date(1e3*this.note.stop));Xn().s[19]++,this.startDate=(0,V.Z)(n,"yyyy-MM-dd"),Xn().s[20]++,this.startTime=(0,V.Z)(n,"HH:mm:ss"),Xn().s[21]++,this.stopDate=(0,V.Z)(e,"yyyy-MM-dd"),Xn().s[22]++,this.stopTime=(0,V.Z)(e,"HH:mm:ss"),Xn().s[23]++,this.color=this.note.color,Xn().s[24]++,this.description=this.note.description},updateNote:function(){var n=this;Xn().f[8]++;var e=(Xn().s[25]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(Xn().s[26]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),l=(Xn().s[27]++,this.color),i=(Xn().s[28]++,this.description);Xn().s[29]++,f.put("/cosmos-api/notes/".concat(this.note.start),{data:{start:e,stop:t,color:l,description:i}}).then((function(e){Xn().f[9]++;var t=(Xn().s[30]++,e.data.description.length>16?(Xn().b[4][0]++,"".concat(e.data.description.substring(0,16),"...")):(Xn().b[4][1]++,e.data.description));Xn().s[31]++,n.$notify.normal({title:"Updated Note",body:"Note updated: (".concat(e.data.start,'): "').concat(t,'"')})})),Xn().s[32]++,this.$emit("close"),Xn().s[33]++,this.show=!this.show}}},ee=ne,te=(t(849),(0,E.Z)(ee,zn,Qn,!1,null,"246a5924",null)),le=te.exports;function ie(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/NoteEventForm.vue",e="372dd3d22d8c51e0458adcdbc6aa58e71d9556e8",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Forms/NoteEventForm.vue",statementMap:{0:{start:{line:99,column:4},end:{line:101,column:5}},1:{start:{line:105,column:16},end:{line:105,column:66}},2:{start:{line:106,column:6},end:{line:106,column:24}},3:{start:{line:109,column:6},end:{line:109,column:44}},4:{start:{line:114,column:6},end:{line:114,column:25}},5:{start:{line:117,column:6},end:{line:117,column:52}},6:{start:{line:120,column:24},end:{line:120,column:49}},7:{start:{line:121,column:25},end:{line:121,column:78}},8:{start:{line:122,column:6},end:{line:139,column:10}},9:{start:{line:131,column:10},end:{line:131,column:61}},10:{start:{line:134,column:10},end:{line:137,column:12}},11:{start:{line:138,column:10},end:{line:138,column:29}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:98,column:2},end:{line:98,column:3}},loc:{start:{line:98,column:9},end:{line:102,column:3}},line:98},1:{name:"(anonymous_1)",decl:{start:{line:104,column:16},end:{line:104,column:17}},loc:{start:{line:104,column:28},end:{line:107,column:5}},line:104},2:{name:"(anonymous_2)",decl:{start:{line:108,column:17},end:{line:108,column:18}},loc:{start:{line:108,column:29},end:{line:110,column:5}},line:108},3:{name:"(anonymous_3)",decl:{start:{line:113,column:11},end:{line:113,column:12}},loc:{start:{line:113,column:23},end:{line:115,column:5}},line:113},4:{name:"(anonymous_4)",decl:{start:{line:116,column:18},end:{line:116,column:19}},loc:{start:{line:116,column:30},end:{line:118,column:5}},line:116},5:{name:"(anonymous_5)",decl:{start:{line:119,column:18},end:{line:119,column:19}},loc:{start:{line:119,column:30},end:{line:140,column:5}},line:119},6:{name:"(anonymous_6)",decl:{start:{line:130,column:14},end:{line:130,column:15}},loc:{start:{line:130,column:26},end:{line:132,column:9}},line:130},7:{name:"(anonymous_7)",decl:{start:{line:133,column:14},end:{line:133,column:15}},loc:{start:{line:133,column:28},end:{line:139,column:9}},line:133}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{},inputSourceMap:{version:3,sources:["NoteEventForm.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"NoteEventForm.vue",sourceRoot:"src/tools/Calendar/Forms",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card-title v-text="noteEvent.name" />\n <v-card-subtitle>\n <span>\n {{ noteEvent.start | dateTime(utc) }}\n </span>\n <br />\n <span>\n {{ noteEvent.end | dateTime(utc) }}\n </span>\n </v-card-subtitle>\n <div class="ma-2">\n <v-card-text>\n <v-row>\n <v-textarea readonly rows="6" :value="description" />\n </v-row>\n <v-row class="pt-1">\n <v-col class="text-right pa-0">\n <span class="text-caption">\n Last update: {{ updated_at | dateTime(utc) }}\n </span>\n </v-col>\n </v-row>\n </v-card-text>\n <v-card-actions class="pa-1">\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="update-note" @click="updateDialog">\n <v-icon>mdi-pencil</v-icon>\n </v-btn>\n </div>\n </template>\n <span> Update </span>\n </v-tooltip>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-btn icon data-test="delete-note" @click="deleteDialog">\n <v-icon> mdi-delete </v-icon>\n </v-btn>\n </div>\n </template>\n <span> Delete </span>\n </v-tooltip>\n </v-card-actions>\n </div>\n \x3c!--- Menus ---\x3e\n <note-update-dialog\n v-model="showUpdateDialog"\n :note="noteEvent.note"\n @close="close"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport NoteUpdateDialog from \'@/tools/Calendar/Dialogs/NoteUpdateDialog\'\n\nexport default {\n components: {\n NoteUpdateDialog,\n },\n mixins: [TimeFilters],\n props: {\n noteEvent: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n showUpdateDialog: false,\n }\n },\n computed: {\n updated_at: function () {\n const v = parseInt(this.noteEvent.note.updated_at / 1000000)\n return new Date(v)\n },\n description: function () {\n return this.noteEvent.note.description\n },\n },\n methods: {\n close: function () {\n this.$emit(\'close\')\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n deleteDialog: function () {\n const noteStart = this.noteEvent.note.start\n const eventStart = this.generateDateTime(this.noteEvent.start, this.utc)\n this.$dialog\n .confirm(\n `Are you sure you want to remove note: ${eventStart} (${noteStart})`,\n {\n okText: \'Delete\',\n cancelText: \'Cancel\',\n }\n )\n .then((dialog) => {\n return Api.delete(`/cosmos-api/notes/${noteStart}`)\n })\n .then((response) => {\n this.$notify.normal({\n title: \'Deleted Note\',\n body: `Deleted note: ${eventStart} (${noteStart})`,\n })\n this.$emit(\'close\')\n })\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"372dd3d22d8c51e0458adcdbc6aa58e71d9556e8"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return ie=function(){return a},a}ie();var oe={components:{NoteUpdateDialog:le},mixins:[U],props:{noteEvent:{type:Object,required:!0},utc:{type:Boolean,required:!0}},data:function(){return ie().f[0]++,ie().s[0]++,{showUpdateDialog:!1}},computed:{updated_at:function(){ie().f[1]++;var n=(ie().s[1]++,parseInt(this.noteEvent.note.updated_at/1e6));return ie().s[2]++,new Date(n)},description:function(){return ie().f[2]++,ie().s[3]++,this.noteEvent.note.description}},methods:{close:function(){ie().f[3]++,ie().s[4]++,this.$emit("close")},updateDialog:function(){ie().f[4]++,ie().s[5]++,this.showUpdateDialog=!this.showUpdateDialog},deleteDialog:function(){var n=this;ie().f[5]++;var e=(ie().s[6]++,this.noteEvent.note.start),t=(ie().s[7]++,this.generateDateTime(this.noteEvent.start,this.utc));ie().s[8]++,this.$dialog.confirm("Are you sure you want to remove note: ".concat(t," (").concat(e,")"),{okText:"Delete",cancelText:"Cancel"}).then((function(n){return ie().f[6]++,ie().s[9]++,f["delete"]("/cosmos-api/notes/".concat(e))})).then((function(l){ie().f[7]++,ie().s[10]++,n.$notify.normal({title:"Deleted Note",body:"Deleted note: ".concat(t," (").concat(e,")")}),ie().s[11]++,n.$emit("close")}))}}},ae=oe,se=(t(5433),(0,E.Z)(ae,Kn,Jn,!1,null,"751ff4c1",null)),ce=se.exports;function re(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventDialog.vue",e="f2ddf4c04674d63c036b4153fffc898eb889cf59",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventDialog.vue",statementMap:{0:{start:{line:71,column:6},end:{line:71,column:46}},1:{start:{line:75,column:8},end:{line:75,column:25}},2:{start:{line:78,column:8},end:{line:78,column:34}},3:{start:{line:84,column:6},end:{line:84,column:28}},4:{start:{line:85,column:6},end:{line:85,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:70,column:10},end:{line:70,column:11}},loc:{start:{line:70,column:22},end:{line:72,column:5}},line:70},1:{name:"(anonymous_1)",decl:{start:{line:74,column:6},end:{line:74,column:7}},loc:{start:{line:74,column:12},end:{line:76,column:7}},line:74},2:{name:"(anonymous_2)",decl:{start:{line:77,column:6},end:{line:77,column:7}},loc:{start:{line:77,column:17},end:{line:79,column:7}},line:77},3:{name:"(anonymous_3)",decl:{start:{line:83,column:11},end:{line:83,column:12}},loc:{start:{line:83,column:28},end:{line:86,column:5}},line:83}},branchMap:{0:{loc:{start:{line:71,column:13},end:{line:71,column:46}},type:"cond-expr",locations:[{start:{line:71,column:26},end:{line:71,column:41}},{start:{line:71,column:44},end:{line:71,column:46}}],line:71}},s:{0:0,1:0,2:0,3:0,4:0},f:{0:0,1:0,2:0,3:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["EventDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"EventDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-card width="400">\n <div v-if="type === \'activity\'">\n <activity-event-form\n :activity-event="event"\n :utc="utc"\n @close="close"\n />\n </div>\n <div v-if="type === \'note\'">\n <note-event-form :note-event="event" :utc="utc" @close="close" />\n </div>\n <div v-if="type === \'metadata\'">\n <metadata-event-form\n :metadata-event="event"\n :utc="utc"\n @close="close"\n />\n </div>\n </v-card>\n </div>\n</template>\n\n<script>\nimport ActivityEventForm from \'@/tools/Calendar/Forms/ActivityEventForm\'\nimport MetadataEventForm from \'@/tools/Calendar/Forms/MetadataEventForm\'\nimport NoteEventForm from \'@/tools/Calendar/Forms/NoteEventForm\'\n\nexport default {\n components: {\n ActivityEventForm,\n MetadataEventForm,\n NoteEventForm,\n },\n props: {\n event: {\n type: Object,\n required: true,\n },\n utc: {\n type: Boolean,\n required: true,\n },\n value: {\n type: Boolean,\n required: true,\n },\n },\n computed: {\n type: function () {\n return this.event ? this.event.type : \'\'\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n close: function (event) {\n this.show = !this.show\n this.$emit(\'close\')\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"f2ddf4c04674d63c036b4153fffc898eb889cf59"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return re=function(){return a},a}re();var ue={components:{ActivityEventForm:hn,MetadataEventForm:Wn,NoteEventForm:ce},props:{event:{type:Object,required:!0},utc:{type:Boolean,required:!0},value:{type:Boolean,required:!0}},computed:{type:function(){return re().f[0]++,re().s[0]++,this.event?(re().b[0][0]++,this.event.type):(re().b[0][1]++,"")},show:{get:function(){return re().f[1]++,re().s[1]++,this.value},set:function(n){re().f[2]++,re().s[2]++,this.$emit("input",n)}}},methods:{close:function(n){re().f[3]++,re().s[3]++,this.show=!this.show,re().s[4]++,this.$emit("close")}}},me=ue,de=(0,E.Z)(me,N,I,!1,null,null,null),Ae=de.exports;t(4870),t(3985);function ve(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timelineFilters.js",e="735513b612ae5923f0d4b382886b28a365a567f4",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/timelineFilters.js",statementMap:{0:{start:{line:19,column:21},end:{line:26,column:1}},1:{start:{line:20,column:2},end:{line:25,column:3}},2:{start:{line:28,column:21},end:{line:38,column:1}},3:{start:{line:29,column:2},end:{line:37,column:3}},4:{start:{line:40,column:26},end:{line:49,column:1}},5:{start:{line:41,column:2},end:{line:48,column:6}},6:{start:{line:42,column:26},end:{line:42,column:54}},7:{start:{line:44,column:23},end:{line:44,column:61}},8:{start:{line:45,column:6},end:{line:47,column:8}},9:{start:{line:46,column:8},end:{line:46,column:47}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:19,column:21},end:{line:19,column:22}},loc:{start:{line:19,column:53},end:{line:26,column:1}},line:19},1:{name:"(anonymous_1)",decl:{start:{line:28,column:21},end:{line:28,column:22}},loc:{start:{line:28,column:51},end:{line:38,column:1}},line:28},2:{name:"(anonymous_2)",decl:{start:{line:40,column:26},end:{line:40,column:27}},loc:{start:{line:40,column:67},end:{line:49,column:1}},line:40},3:{name:"(anonymous_3)",decl:{start:{line:42,column:12},end:{line:42,column:13}},loc:{start:{line:42,column:26},end:{line:42,column:54}},line:42},4:{name:"(anonymous_4)",decl:{start:{line:43,column:13},end:{line:43,column:14}},loc:{start:{line:43,column:31},end:{line:48,column:5}},line:43},5:{name:"(anonymous_5)",decl:{start:{line:45,column:37},end:{line:45,column:38}},loc:{start:{line:45,column:51},end:{line:47,column:7}},line:45}},branchMap:{0:{loc:{start:{line:24,column:16},end:{line:24,column:47}},type:"binary-expr",locations:[{start:{line:24,column:16},end:{line:24,column:41}},{start:{line:24,column:45},end:{line:24,column:47}}],line:24}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"735513b612ae5923f0d4b382886b28a365a567f4"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return ve=function(){return a},a}ve(),ve().s[0]++;var pe=function(n,e){return ve().f[0]++,ve().s[1]++,{name:n.name,color:n.color,messages:n.messages,activities:(ve().b[0][0]++,e[n.name]||(ve().b[0][1]++,[]))}};ve().s[2]++;var he=function(n,e){return ve().f[1]++,ve().s[3]++,{name:"".concat(e.name," ").concat(e.kind),start:new Date(1e3*e.start),end:new Date(1e3*e.stop),color:n.color,type:"activity",timed:!0,activity:e}};ve().s[4]++;var Ce=function(n,e){return ve().f[2]++,ve().s[5]++,n.filter((function(n){return ve().f[3]++,ve().s[6]++,"timeline"===n.type})).flatMap((function(n){ve().f[4]++;var t=(ve().s[7]++,pe(n,e));return ve().s[8]++,t.activities.map((function(n){return ve().f[5]++,ve().s[9]++,he(t,n)}))}))};function fe(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/chronicleFilters.js",e="302ec284608b39bdbb0ecf2fdb83a511ab412462",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Filters/chronicleFilters.js",statementMap:{0:{start:{line:20,column:21},end:{line:27,column:1}},1:{start:{line:21,column:2},end:{line:26,column:3}},2:{start:{line:29,column:22},end:{line:43,column:1}},3:{start:{line:31,column:4},end:{line:33,column:25}},4:{start:{line:34,column:2},end:{line:42,column:3}},5:{start:{line:45,column:26},end:{line:55,column:1}},6:{start:{line:46,column:2},end:{line:54,column:3}},7:{start:{line:57,column:27},end:{line:70,column:1}},8:{start:{line:58,column:2},end:{line:69,column:6}},9:{start:{line:59,column:26},end:{line:59,column:55}},10:{start:{line:61,column:23},end:{line:61,column:61}},11:{start:{line:62,column:6},end:{line:68,column:8}},12:{start:{line:63,column:8},end:{line:67,column:9}},13:{start:{line:64,column:10},end:{line:64,column:51}},14:{start:{line:66,column:10},end:{line:66,column:47}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:20,column:21},end:{line:20,column:22}},loc:{start:{line:20,column:53},end:{line:27,column:1}},line:20},1:{name:"(anonymous_1)",decl:{start:{line:29,column:22},end:{line:29,column:23}},loc:{start:{line:29,column:50},end:{line:43,column:1}},line:29},2:{name:"(anonymous_2)",decl:{start:{line:45,column:26},end:{line:45,column:27}},loc:{start:{line:45,column:54},end:{line:55,column:1}},line:45},3:{name:"(anonymous_3)",decl:{start:{line:57,column:27},end:{line:57,column:28}},loc:{start:{line:57,column:68},end:{line:70,column:1}},line:57},4:{name:"(anonymous_4)",decl:{start:{line:59,column:12},end:{line:59,column:13}},loc:{start:{line:59,column:26},end:{line:59,column:55}},line:59},5:{name:"(anonymous_5)",decl:{start:{line:60,column:13},end:{line:60,column:14}},loc:{start:{line:60,column:31},end:{line:69,column:5}},line:60},6:{name:"(anonymous_6)",decl:{start:{line:62,column:37},end:{line:62,column:38}},loc:{start:{line:62,column:48},end:{line:68,column:7}},line:62}},branchMap:{0:{loc:{start:{line:25,column:16},end:{line:25,column:47}},type:"binary-expr",locations:[{start:{line:25,column:16},end:{line:25,column:41}},{start:{line:25,column:45},end:{line:25,column:47}}],line:25},1:{loc:{start:{line:31,column:4},end:{line:33,column:25}},type:"cond-expr",locations:[{start:{line:32,column:8},end:{line:32,column:50}},{start:{line:33,column:8},end:{line:33,column:25}}],line:31},2:{loc:{start:{line:63,column:8},end:{line:67,column:9}},type:"if",locations:[{start:{line:63,column:8},end:{line:67,column:9}},{start:{line:65,column:15},end:{line:67,column:9}}],line:63}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0},b:{0:[0,0],1:[0,0],2:[0,0]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"302ec284608b39bdbb0ecf2fdb83a511ab412462"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return fe=function(){return a},a}fe(),fe().s[0]++;var ye=function(n,e){return fe().f[0]++,fe().s[1]++,{name:n.name,type:n.type,messages:n.messages,chronicles:(fe().b[0][0]++,e[n.name]||(fe().b[0][1]++,[]))}};fe().s[2]++;var be=function(n,e){fe().f[1]++;var t=(fe().s[3]++,e.description.length>16?(fe().b[1][0]++,"".concat(e.description.substring(0,16),"...")):(fe().b[1][1]++,e.description));return fe().s[4]++,{name:t,start:new Date(1e3*e.start),end:new Date(1e3*e.stop),color:e.color,type:e.type,timed:!0,note:e}};fe().s[5]++;var ge=function(n,e){return fe().f[2]++,fe().s[6]++,{name:"Metadata",start:new Date(1e3*e.start),end:new Date(1e3*e.start),color:e.color,type:e.type,timed:!0,metadata:e}};fe().s[7]++;var _e=function(n,e){return fe().f[3]++,fe().s[8]++,n.filter((function(n){return fe().f[4]++,fe().s[9]++,"chronicle"===n.type})).flatMap((function(n){fe().f[5]++;var t=(fe().s[10]++,ye(n,e));return fe().s[11]++,t.chronicles.map((function(n){return fe().f[6]++,fe().s[12]++,"metadata"===t.name?(fe().b[2][0]++,fe().s[13]++,ge(t,n)):(fe().b[2][1]++,fe().s[14]++,be(t,n))}))}))};function we(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/EventCalendar.vue",e="49f9aeaad0edf9a3c89949aa1f23c373cfad5e58",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/EventCalendar.vue",statementMap:{0:{start:{line:91,column:4},end:{line:98,column:5}},1:{start:{line:102,column:6},end:{line:104,column:7}},2:{start:{line:103,column:8},end:{line:103,column:45}},3:{start:{line:109,column:6},end:{line:109,column:36}},4:{start:{line:112,column:6},end:{line:112,column:79}},5:{start:{line:116,column:8},end:{line:116,column:29}},6:{start:{line:119,column:8},end:{line:119,column:58}},7:{start:{line:124,column:8},end:{line:124,column:31}},8:{start:{line:127,column:8},end:{line:127,column:60}},9:{start:{line:132,column:8},end:{line:132,column:30}},10:{start:{line:135,column:8},end:{line:135,column:59}},11:{start:{line:140,column:8},end:{line:140,column:25}},12:{start:{line:143,column:8},end:{line:143,column:34}},13:{start:{line:148,column:4},end:{line:148,column:21}},14:{start:{line:149,column:4},end:{line:149,column:23}},15:{start:{line:150,column:4},end:{line:150,column:21}},16:{start:{line:151,column:4},end:{line:151,column:26}},17:{start:{line:155,column:6},end:{line:155,column:21}},18:{start:{line:158,column:6},end:{line:158,column:21}},19:{start:{line:161,column:6},end:{line:161,column:31}},20:{start:{line:162,column:6},end:{line:162,column:31}},21:{start:{line:165,column:6},end:{line:165,column:30}},22:{start:{line:165,column:21},end:{line:165,column:30}},23:{start:{line:166,column:19},end:{line:166,column:50}},24:{start:{line:167,column:6},end:{line:171,column:7}},25:{start:{line:168,column:8},end:{line:168,column:33}},26:{start:{line:170,column:8},end:{line:170,column:36}},27:{start:{line:174,column:6},end:{line:174,column:24}},28:{start:{line:177,column:6},end:{line:179,column:11}},29:{start:{line:182,column:19},end:{line:182,column:40}},30:{start:{line:183,column:20},end:{line:183,column:56}},31:{start:{line:184,column:6},end:{line:184,column:34}},32:{start:{line:187,column:6},end:{line:187,column:58}},33:{start:{line:187,column:24},end:{line:187,column:46}},34:{start:{line:190,column:19},end:{line:196,column:7}},35:{start:{line:191,column:8},end:{line:191,column:34}},36:{start:{line:192,column:8},end:{line:192,column:49}},37:{start:{line:193,column:8},end:{line:195,column:9}},38:{start:{line:194,column:10},end:{line:194,column:65}},39:{start:{line:194,column:39},end:{line:194,column:63}},40:{start:{line:197,column:6},end:{line:202,column:7}},41:{start:{line:198,column:8},end:{line:198,column:33}},42:{start:{line:199,column:8},end:{line:199,column:72}},43:{start:{line:199,column:36},end:{line:199,column:71}},44:{start:{line:199,column:64},end:{line:199,column:70}},45:{start:{line:201,column:8},end:{line:201,column:14}},46:{start:{line:203,column:6},end:{line:203,column:35}},47:{start:{line:206,column:6},end:{line:206,column:50}},48:{start:{line:209,column:6},end:{line:209,column:52}},49:{start:{line:212,column:6},end:{line:216,column:7}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:90,column:2},end:{line:90,column:3}},loc:{start:{line:90,column:9},end:{line:99,column:3}},line:90},1:{name:"(anonymous_1)",decl:{start:{line:101,column:12},end:{line:101,column:13}},loc:{start:{line:101,column:24},end:{line:105,column:5}},line:101},2:{name:"(anonymous_2)",decl:{start:{line:108,column:9},end:{line:108,column:10}},loc:{start:{line:108,column:21},end:{line:110,column:5}},line:108},3:{name:"(anonymous_3)",decl:{start:{line:111,column:10},end:{line:111,column:11}},loc:{start:{line:111,column:22},end:{line:113,column:5}},line:111},4:{name:"(anonymous_4)",decl:{start:{line:115,column:6},end:{line:115,column:7}},loc:{start:{line:115,column:12},end:{line:117,column:7}},line:115},5:{name:"(anonymous_5)",decl:{start:{line:118,column:6},end:{line:118,column:7}},loc:{start:{line:118,column:17},end:{line:120,column:7}},line:118},6:{name:"(anonymous_6)",decl:{start:{line:123,column:6},end:{line:123,column:7}},loc:{start:{line:123,column:12},end:{line:125,column:7}},line:123},7:{name:"(anonymous_7)",decl:{start:{line:126,column:6},end:{line:126,column:7}},loc:{start:{line:126,column:17},end:{line:128,column:7}},line:126},8:{name:"(anonymous_8)",decl:{start:{line:131,column:6},end:{line:131,column:7}},loc:{start:{line:131,column:12},end:{line:133,column:7}},line:131},9:{name:"(anonymous_9)",decl:{start:{line:134,column:6},end:{line:134,column:7}},loc:{start:{line:134,column:17},end:{line:136,column:7}},line:134},10:{name:"(anonymous_10)",decl:{start:{line:139,column:6},end:{line:139,column:7}},loc:{start:{line:139,column:12},end:{line:141,column:7}},line:139},11:{name:"(anonymous_11)",decl:{start:{line:142,column:6},end:{line:142,column:7}},loc:{start:{line:142,column:17},end:{line:144,column:7}},line:142},12:{name:"(anonymous_12)",decl:{start:{line:147,column:2},end:{line:147,column:3}},loc:{start:{line:147,column:12},end:{line:152,column:3}},line:147},13:{name:"(anonymous_13)",decl:{start:{line:154,column:10},end:{line:154,column:11}},loc:{start:{line:154,column:22},end:{line:156,column:5}},line:154},14:{name:"(anonymous_14)",decl:{start:{line:157,column:10},end:{line:157,column:11}},loc:{start:{line:157,column:22},end:{line:159,column:5}},line:157},15:{name:"(anonymous_15)",decl:{start:{line:160,column:11},end:{line:160,column:12}},loc:{start:{line:160,column:23},end:{line:163,column:5}},line:160},16:{name:"(anonymous_16)",decl:{start:{line:164,column:22},end:{line:164,column:23}},loc:{start:{line:164,column:42},end:{line:172,column:5}},line:164},17:{name:"(anonymous_17)",decl:{start:{line:173,column:19},end:{line:173,column:20}},loc:{start:{line:173,column:36},end:{line:175,column:5}},line:173},18:{name:"(anonymous_18)",decl:{start:{line:176,column:20},end:{line:176,column:21}},loc:{start:{line:176,column:32},end:{line:180,column:5}},line:176},19:{name:"(anonymous_19)",decl:{start:{line:181,column:18},end:{line:181,column:19}},loc:{start:{line:181,column:30},end:{line:185,column:5}},line:181},20:{name:"(anonymous_20)",decl:{start:{line:186,column:16},end:{line:186,column:17}},loc:{start:{line:186,column:28},end:{line:188,column:5}},line:186},21:{name:"(anonymous_21)",decl:{start:{line:187,column:18},end:{line:187,column:19}},loc:{start:{line:187,column:24},end:{line:187,column:46}},line:187},22:{name:"(anonymous_22)",decl:{start:{line:189,column:15},end:{line:189,column:16}},loc:{start:{line:189,column:49},end:{line:204,column:5}},line:189},23:{name:"(anonymous_23)",decl:{start:{line:190,column:19},end:{line:190,column:20}},loc:{start:{line:190,column:25},end:{line:196,column:7}},line:190},24:{name:"(anonymous_24)",decl:{start:{line:193,column:30},end:{line:193,column:31}},loc:{start:{line:194,column:10},end:{line:194,column:65}},line:194},25:{name:"(anonymous_25)",decl:{start:{line:194,column:32},end:{line:194,column:33}},loc:{start:{line:194,column:39},end:{line:194,column:63}},line:194},26:{name:"(anonymous_26)",decl:{start:{line:199,column:30},end:{line:199,column:31}},loc:{start:{line:199,column:36},end:{line:199,column:71}},line:199},27:{name:"(anonymous_27)",decl:{start:{line:199,column:58},end:{line:199,column:59}},loc:{start:{line:199,column:64},end:{line:199,column:70}},line:199},28:{name:"(anonymous_28)",decl:{start:{line:205,column:17},end:{line:205,column:18}},loc:{start:{line:205,column:29},end:{line:207,column:5}},line:205},29:{name:"(anonymous_29)",decl:{start:{line:208,column:18},end:{line:208,column:19}},loc:{start:{line:208,column:30},end:{line:210,column:5}},line:208},30:{name:"(anonymous_30)",decl:{start:{line:211,column:13},end:{line:211,column:14}},loc:{start:{line:211,column:33},end:{line:217,column:5}},line:211}},branchMap:{0:{loc:{start:{line:102,column:6},end:{line:104,column:7}},type:"if",locations:[{start:{line:102,column:6},end:{line:104,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:102},1:{loc:{start:{line:112,column:13},end:{line:112,column:79}},type:"cond-expr",locations:[{start:{line:112,column:26},end:{line:112,column:69}},{start:{line:112,column:72},end:{line:112,column:79}}],line:112},2:{loc:{start:{line:165,column:6},end:{line:165,column:30}},type:"if",locations:[{start:{line:165,column:6},end:{line:165,column:30}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:165},3:{loc:{start:{line:167,column:6},end:{line:171,column:7}},type:"if",locations:[{start:{line:167,column:6},end:{line:171,column:7}},{start:{line:169,column:13},end:{line:171,column:7}}],line:167},4:{loc:{start:{line:177,column:13},end:{line:179,column:11}},type:"cond-expr",locations:[{start:{line:178,column:10},end:{line:178,column:66}},{start:{line:179,column:10},end:{line:179,column:11}}],line:177},5:{loc:{start:{line:197,column:6},end:{line:202,column:7}},type:"if",locations:[{start:{line:197,column:6},end:{line:202,column:7}},{start:{line:200,column:13},end:{line:202,column:7}}],line:197}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,sources:["EventCalendar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"EventCalendar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-sheet height="800" class="mt-1">\n <v-calendar\n v-model="focus"\n ref="mainCalendar"\n color="primary"\n :events="events"\n :event-color="getEventColor"\n :type="type"\n @click:event="showEvent"\n @click:more="viewDay"\n @click:date="viewDay"\n >\n \x3c!---\n <template v-slot:event="{ event }">\n <div class="mr-1">\n <span class="font-weight-bold" v-text="event.name" />\n <br />\n <span>{{ event.start | time(calendarConfiguration.utc) }}</span>\n </div>\n </template>\n ---\x3e\n <template v-slot:day-body="{ date, week }">\n <div\n class="v-current-time"\n :class="{ first: date === week[0].date }"\n :style="{ top: nowY }"\n />\n </template>\n </v-calendar>\n <v-menu\n v-model="selectedOpen"\n :close-on-content-click="false"\n :activator="selectedElement"\n >\n <event-dialog\n v-model="selectedOpen"\n :event="selectedEvent"\n :utc="utc"\n @close="close"\n />\n </v-menu>\n </v-sheet>\n \x3c!-- MENUS --\x3e\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport EventDialog from \'@/tools/Calendar/Dialogs/EventDialog\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport { getTimelineEvents } from \'@/tools/Calendar/Filters/timelineFilters.js\'\nimport { getChronicleEvents } from \'@/tools/Calendar/Filters/chronicleFilters.js\'\n\nexport default {\n components: {\n EventDialog,\n },\n mixins: [TimeFilters],\n props: {\n events: {\n type: Array,\n required: true,\n },\n value: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n selectedEvent: null,\n selectedElement: null,\n selectedOpen: false,\n showCreateDialog: false,\n showEventDialog: false,\n showUpdateDialog: false,\n }\n },\n watch: {\n events: function () {\n if (this.ready) {\n this.$refs.mainCalendar.checkChange()\n }\n },\n },\n computed: {\n cal: function () {\n return this.$refs.mainCalendar\n },\n nowY: function () {\n return this.ready ? this.cal.timeToY(this.cal.times.now) + \'px\' : \'-10px\'\n },\n utc: {\n get() {\n return this.value.utc\n },\n set(value) {\n this.$emit(\'input\', { ...this.value, utc: value }) // input is the default event when using v-model\n },\n },\n focus: {\n get() {\n return this.value.focus\n },\n set(value) {\n this.$emit(\'input\', { ...this.value, focus: value }) // input is the default event when using v-model\n },\n },\n type: {\n get() {\n return this.value.type\n },\n set(value) {\n this.$emit(\'input\', { ...this.value, type: value }) // input is the default event when using v-model\n },\n },\n calendarConfiguration: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n mounted() {\n this.ready = true\n this.scrollToTime()\n this.updateTime()\n this.cal.checkChange()\n },\n methods: {\n prev: function () {\n this.cal.prev()\n },\n next: function () {\n this.cal.next()\n },\n close: function () {\n this.selectedOpen = false\n this.selectedEvent = null\n },\n generateDateTime: function (activity) {\n if (!activity) return \'\'\n const date = new Date(activity.start * 1000)\n if (this.displayTimeInUtc) {\n return date.toUTCString()\n } else {\n return date.toLocaleString() // TODO: support other locales besides en-US\n }\n },\n getEventColor: function (event) {\n return event.color\n },\n getCurrentTime: function () {\n return this.ready\n ? this.cal.times.now.hour * 60 + this.cal.times.now.minute\n : 0\n },\n scrollToTime: function () {\n const time = this.getCurrentTime()\n const first = Math.max(0, time - (time % 30) - 30)\n this.cal.scrollToTime(first)\n },\n updateTime: function () {\n setInterval(() => this.cal.updateTimes(), 60 * 1000)\n },\n showEvent: function ({ nativeEvent, event }) {\n const open = () => {\n this.selectedEvent = event\n this.selectedElement = nativeEvent.target\n requestAnimationFrame(() =>\n requestAnimationFrame(() => (this.selectedOpen = true))\n )\n }\n if (this.selectedOpen) {\n this.selectedOpen = false\n requestAnimationFrame(() => requestAnimationFrame(() => open()))\n } else {\n open()\n }\n nativeEvent.stopPropagation()\n },\n eventDialog: function () {\n this.showEventDialog = !this.showEventDialog\n },\n updateDialog: function () {\n this.showUpdateDialog = !this.showUpdateDialog\n },\n viewDay: function ({ date }) {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n type: \'day\',\n focus: date,\n }\n },\n },\n}\n<\/script>\n\n<style scoped lang="scss">\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n.v-current-time {\n height: 2px;\n background-color: #ea4335;\n position: absolute;\n left: -1px;\n right: 0;\n pointer-events: none;\n\n &.first::before {\n content: \'\';\n position: absolute;\n background-color: #ea4335;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n margin-top: -5px;\n margin-left: -6.5px;\n }\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"49f9aeaad0edf9a3c89949aa1f23c373cfad5e58"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return we=function(){return a},a}we();var xe={components:{EventDialog:Ae},mixins:[U],props:{events:{type:Array,required:!0},value:{type:Object,required:!0}},data:function(){return we().f[0]++,we().s[0]++,{selectedEvent:null,selectedElement:null,selectedOpen:!1,showCreateDialog:!1,showEventDialog:!1,showUpdateDialog:!1}},watch:{events:function(){we().f[1]++,we().s[1]++,this.ready?(we().b[0][0]++,we().s[2]++,this.$refs.mainCalendar.checkChange()):we().b[0][1]++}},computed:{cal:function(){return we().f[2]++,we().s[3]++,this.$refs.mainCalendar},nowY:function(){return we().f[3]++,we().s[4]++,this.ready?(we().b[1][0]++,this.cal.timeToY(this.cal.times.now)+"px"):(we().b[1][1]++,"-10px")},utc:{get:function(){return we().f[4]++,we().s[5]++,this.value.utc},set:function(n){we().f[5]++,we().s[6]++,this.$emit("input",(0,o.Z)((0,o.Z)({},this.value),{},{utc:n}))}},focus:{get:function(){return we().f[6]++,we().s[7]++,this.value.focus},set:function(n){we().f[7]++,we().s[8]++,this.$emit("input",(0,o.Z)((0,o.Z)({},this.value),{},{focus:n}))}},type:{get:function(){return we().f[8]++,we().s[9]++,this.value.type},set:function(n){we().f[9]++,we().s[10]++,this.$emit("input",(0,o.Z)((0,o.Z)({},this.value),{},{type:n}))}},calendarConfiguration:{get:function(){return we().f[10]++,we().s[11]++,this.value},set:function(n){we().f[11]++,we().s[12]++,this.$emit("input",n)}}},mounted:function(){we().f[12]++,we().s[13]++,this.ready=!0,we().s[14]++,this.scrollToTime(),we().s[15]++,this.updateTime(),we().s[16]++,this.cal.checkChange()},methods:{prev:function(){we().f[13]++,we().s[17]++,this.cal.prev()},next:function(){we().f[14]++,we().s[18]++,this.cal.next()},close:function(){we().f[15]++,we().s[19]++,this.selectedOpen=!1,we().s[20]++,this.selectedEvent=null},generateDateTime:function(n){if(we().f[16]++,we().s[21]++,!n)return we().b[2][0]++,we().s[22]++,"";we().b[2][1]++;var e=(we().s[23]++,new Date(1e3*n.start));return we().s[24]++,this.displayTimeInUtc?(we().b[3][0]++,we().s[25]++,e.toUTCString()):(we().b[3][1]++,we().s[26]++,e.toLocaleString())},getEventColor:function(n){return we().f[17]++,we().s[27]++,n.color},getCurrentTime:function(){return we().f[18]++,we().s[28]++,this.ready?(we().b[4][0]++,60*this.cal.times.now.hour+this.cal.times.now.minute):(we().b[4][1]++,0)},scrollToTime:function(){we().f[19]++;var n=(we().s[29]++,this.getCurrentTime()),e=(we().s[30]++,Math.max(0,n-n%30-30));we().s[31]++,this.cal.scrollToTime(e)},updateTime:function(){var n=this;we().f[20]++,we().s[32]++,setInterval((function(){return we().f[21]++,we().s[33]++,n.cal.updateTimes()}),6e4)},showEvent:function(n){var e=this,t=n.nativeEvent,l=n.event;we().f[22]++,we().s[34]++;var i=function(){we().f[23]++,we().s[35]++,e.selectedEvent=l,we().s[36]++,e.selectedElement=t.target,we().s[37]++,requestAnimationFrame((function(){return we().f[24]++,we().s[38]++,requestAnimationFrame((function(){return we().f[25]++,we().s[39]++,e.selectedOpen=!0}))}))};we().s[40]++,this.selectedOpen?(we().b[5][0]++,we().s[41]++,this.selectedOpen=!1,we().s[42]++,requestAnimationFrame((function(){return we().f[26]++,we().s[43]++,requestAnimationFrame((function(){return we().f[27]++,we().s[44]++,i()}))}))):(we().b[5][1]++,we().s[45]++,i()),we().s[46]++,t.stopPropagation()},eventDialog:function(){we().f[28]++,we().s[47]++,this.showEventDialog=!this.showEventDialog},updateDialog:function(){we().f[29]++,we().s[48]++,this.showUpdateDialog=!this.showUpdateDialog},viewDay:function(n){var e=n.date;we().f[30]++,we().s[49]++,this.calendarConfiguration=(0,o.Z)((0,o.Z)({},this.calendarConfiguration),{},{type:"day",focus:e})}}},Te=xe,ke=(t(4067),(0,E.Z)(Te,M,F,!1,null,"8cfd7c66",null)),Ee=ke.exports,De=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-toolbar",{staticClass:"my-1"},[t("v-menu",{attrs:{bottom:"",right:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{"data-test":"create-event",outlined:""}},[t("v-icon",{attrs:{left:""}},[n._v("mdi-plus-box")]),t("span",[n._v("Create")]),t("v-icon",{attrs:{right:""}},[n._v("mdi-menu-down")])],1)],1)]}}])},[t("v-list",[t("v-list-item",{attrs:{"data-test":"note"},on:{click:function(e){n.showNoteCreateDialog=!0}}},[t("v-icon",{attrs:{left:""}},[n._v("mdi-calendar-clock")]),t("v-list-item-title",[n._v("Note")])],1),t("v-list-item",{attrs:{"data-test":"metadata"},on:{click:function(e){n.showMetadataCreateDialog=!0}}},[t("v-icon",{attrs:{left:""}},[n._v("mdi-calendar-check")]),t("v-list-item-title",[n._v("Metadata")])],1),t("v-list-item",{attrs:{"data-test":"activity"},on:{click:function(e){n.showActivityCreateDialog=!0}}},[t("v-icon",{attrs:{left:""}},[n._v("mdi-calendar-question")]),t("v-list-item-title",[n._v("Timeline Activity")])],1)],1)],1),t("v-btn",{staticClass:"mx-3",attrs:{outlined:"","data-test":"today"},on:{click:n.setToday}},[n._v(" Today ")]),t("v-btn",{attrs:{fab:"",text:"",small:"","data-test":"prev"},on:{click:n.prev}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-left ")])],1),t("v-btn",{attrs:{fab:"",text:"",small:"","data-test":"next"},on:{click:n.next}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-right ")])],1),t("v-spacer"),t("v-toolbar-title",{domProps:{textContent:n._s(n.title)}}),t("v-spacer"),t("v-menu",{attrs:{bottom:"",right:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{staticClass:"mx-2",attrs:{icon:"","data-test":"settings"}},[t("v-icon",[n._v(" mdi-cog ")])],1)],1)]}}])},[t("v-list",[t("v-list-item",{attrs:{"data-test":"refresh"},on:{click:n.refresh}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-refresh ")]),t("v-list-item-title",[n._v(" Refresh Display ")])],1),t("v-list-item",{attrs:{"data-test":"show-table"},on:{click:n.showTable}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-timetable ")]),t("v-list-item-title",[n._v(" Show Table Display ")])],1),t("v-list-item",{attrs:{"data-test":"display-utc-time"},on:{click:n.updateTime}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-clock ")]),t("v-list-item-title",[n._v(" Toggle UTC Display ")])],1),t("v-list-item",{attrs:{"data-test":"download-event-list"},on:{click:n.downloadEvents}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-download ")]),t("v-list-item-title",[n._v(" Download Event List ")])],1)],1)],1),t("v-menu",{attrs:{bottom:"",right:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{outlined:"","data-test":"change-type",width:"125"}},[t("span",[n._v(n._s(n.typeToLabel[n.type]))]),t("v-icon",{attrs:{right:""}},[n._v(" mdi-menu-down ")])],1)],1)]}}])},[t("v-list",[t("v-list-item",{attrs:{"data-test":"type-day"},on:{click:function(e){return n.updateType("day")}}},[t("v-list-item-title",[n._v(" Day ")])],1),t("v-list-item",{attrs:{"data-test":"type-four-day"},on:{click:function(e){return n.updateType("4day")}}},[t("v-list-item-title",[n._v("4 Days")])],1),t("v-list-item",{attrs:{"data-test":"type-week"},on:{click:function(e){return n.updateType("week")}}},[t("v-list-item-title",[n._v(" Week ")])],1)],1)],1)],1),n.showEventTableDialog?t("event-list-dialog",{attrs:{events:n.events,utc:n.utc},model:{value:n.showEventTableDialog,callback:function(e){n.showEventTableDialog=e},expression:"showEventTableDialog"}}):n._e(),n.showMetadataCreateDialog?t("metadata-create-dialog",{model:{value:n.showMetadataCreateDialog,callback:function(e){n.showMetadataCreateDialog=e},expression:"showMetadataCreateDialog"}}):n._e(),n.showNoteCreateDialog?t("note-create-dialog",{model:{value:n.showNoteCreateDialog,callback:function(e){n.showNoteCreateDialog=e},expression:"showNoteCreateDialog"}}):n._e(),n.showActivityCreateDialog?t("activity-create-dialog",{attrs:{timelines:n.timelines},model:{value:n.showActivityCreateDialog,callback:function(e){n.showActivityCreateDialog=e},expression:"showActivityCreateDialog"}}):n._e()],1)},Se=[],Me=(t(6710),t(8673),t(6886),t(4121),t(523),function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Events")]),t("v-spacer")],1),t("v-data-table",{staticClass:"mt-1",attrs:{"item-key":"eventId",headers:n.eventHeaders,items:n.listData},scopedSlots:n._u([{key:"no-data",fn:function(){return[t("span",[n._v(" No events ")])]},proxy:!0}]),model:{value:n.selected,callback:function(e){n.selected=e},expression:"selected"}})],1)],1)}),Fe=[];function Ne(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventListDialog.vue",e="1111c91456f3c78ea1694384ed61c7486217d209",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/EventListDialog.vue",statementMap:{0:{start:{line:65,column:4},end:{line:73,column:5}},1:{start:{line:77,column:6},end:{line:77,column:33}},2:{start:{line:77,column:24},end:{line:77,column:33}},3:{start:{line:78,column:20},end:{line:78,column:21}},4:{start:{line:79,column:6},end:{line:95,column:8}},5:{start:{line:80,column:8},end:{line:80,column:20}},6:{start:{line:82,column:8},end:{line:88,column:9}},7:{start:{line:83,column:10},end:{line:83,column:46}},8:{start:{line:84,column:10},end:{line:84,column:43}},9:{start:{line:86,column:10},end:{line:86,column:49}},10:{start:{line:87,column:10},end:{line:87,column:46}},11:{start:{line:89,column:8},end:{line:94,column:9}},12:{start:{line:99,column:8},end:{line:99,column:25}},13:{start:{line:102,column:8},end:{line:102,column:34}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:64,column:2},end:{line:64,column:3}},loc:{start:{line:64,column:9},end:{line:74,column:3}},line:64},1:{name:"(anonymous_1)",decl:{start:{line:76,column:14},end:{line:76,column:15}},loc:{start:{line:76,column:26},end:{line:96,column:5}},line:76},2:{name:"(anonymous_2)",decl:{start:{line:79,column:29},end:{line:79,column:30}},loc:{start:{line:79,column:40},end:{line:95,column:7}},line:79},3:{name:"(anonymous_3)",decl:{start:{line:98,column:6},end:{line:98,column:7}},loc:{start:{line:98,column:12},end:{line:100,column:7}},line:98},4:{name:"(anonymous_4)",decl:{start:{line:101,column:6},end:{line:101,column:7}},loc:{start:{line:101,column:17},end:{line:103,column:7}},line:101},5:{name:"(anonymous_5)",decl:{start:{line:106,column:11},end:{line:106,column:12}},loc:{start:{line:106,column:23},end:{line:108,column:3}},line:106}},branchMap:{0:{loc:{start:{line:77,column:6},end:{line:77,column:33}},type:"if",locations:[{start:{line:77,column:6},end:{line:77,column:33}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:77},1:{loc:{start:{line:82,column:8},end:{line:88,column:9}},type:"if",locations:[{start:{line:82,column:8},end:{line:88,column:9}},{start:{line:85,column:15},end:{line:88,column:9}}],line:82}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0,5:0},b:{0:[0,0],1:[0,0]},inputSourceMap:{version:3,sources:["EventListDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"EventListDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-dialog v-model=\"show\" width=\"600\">\n <v-card>\n <v-system-bar>\n <v-spacer />\n <span>Events</span>\n <v-spacer />\n </v-system-bar>\n <v-data-table\n v-model=\"selected\"\n item-key=\"eventId\"\n class=\"mt-1\"\n :headers=\"eventHeaders\"\n :items=\"listData\"\n >\n <template v-slot:no-data>\n <span> No events </span>\n </template>\n </v-data-table>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from 'date-fns'\nimport TimeFilters from '@/tools/Calendar/Filters/timeFilters.js'\n\nexport default {\n components: {},\n mixins: [TimeFilters],\n props: {\n events: {\n type: Array,\n required: true,\n },\n utc: {\n type: Boolean,\n default: true,\n },\n value: {\n type: Boolean,\n required: true,\n },\n },\n data() {\n return {\n selected: [],\n eventHeaders: [\n { text: 'Name', value: 'name' },\n { text: 'Start', value: 'startStr' },\n { text: 'Stop', value: 'stopStr' },\n { text: 'Type', value: 'type' },\n ],\n }\n },\n computed: {\n listData: function () {\n if (!this.events) return []\n let eventId = 0\n return this.events.map((event) => {\n eventId += 1\n let startStr, stopStr\n if (this.utc) {\n startStr = event.start.toUTCString()\n stopStr = event.end.toUTCString()\n } else {\n startStr = event.start.toLocaleString()\n stopStr = event.end.toLocaleString()\n }\n return {\n ...event,\n startStr,\n stopStr,\n eventId,\n }\n })\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n },\n mounted: function () {\n // console.log(this.events)\n },\n methods: {},\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"1111c91456f3c78ea1694384ed61c7486217d209"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Ne=function(){return a},a}Ne();var Ie={components:{},mixins:[U],props:{events:{type:Array,required:!0},utc:{type:Boolean,default:!0},value:{type:Boolean,required:!0}},data:function(){return Ne().f[0]++,Ne().s[0]++,{selected:[],eventHeaders:[{text:"Name",value:"name"},{text:"Start",value:"startStr"},{text:"Stop",value:"stopStr"},{text:"Type",value:"type"}]}},computed:{listData:function(){var n=this;if(Ne().f[1]++,Ne().s[1]++,!this.events)return Ne().b[0][0]++,Ne().s[2]++,[];Ne().b[0][1]++;var e=(Ne().s[3]++,0);return Ne().s[4]++,this.events.map((function(t){var l,i;return Ne().f[2]++,Ne().s[5]++,e+=1,Ne().s[6]++,n.utc?(Ne().b[1][0]++,Ne().s[7]++,l=t.start.toUTCString(),Ne().s[8]++,i=t.end.toUTCString()):(Ne().b[1][1]++,Ne().s[9]++,l=t.start.toLocaleString(),Ne().s[10]++,i=t.end.toLocaleString()),Ne().s[11]++,(0,o.Z)((0,o.Z)({},t),{},{startStr:l,stopStr:i,eventId:e})}))},show:{get:function(){return Ne().f[3]++,Ne().s[12]++,this.value},set:function(n){Ne().f[4]++,Ne().s[13]++,this.$emit("input",n)}}},mounted:function(){Ne().f[5]++},methods:{}},Oe=Ie,Re=(0,E.Z)(Oe,Me,Fe,!1,null,null,null),$e=Re.exports,Ue=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.createActivity.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Activity")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"close-activity-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.timelineNames,label:"Timeline","data-test":"activity-select-timeline"},scopedSlots:n._u([{key:"item",fn:function(e){var l=e.item,i=e.attrs,o=e.on;return[t("v-list-item",n._g(n._b({attrs:{"data-test":"activity-select-timeline-"+l}},"v-list-item",i,!1),o),[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s(l)}})],1)],1)]}}]),model:{value:n.timeline,callback:function(e){n.timeline=e},expression:"timeline"}}),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"activity-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"activity-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"activity-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"activity-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-activity-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Activity type input ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-select",{attrs:{items:n.types,label:"Activity Type","data-test":"activity-select-type"},scopedSlots:n._u([{key:"item",fn:function(e){var l=e.item,i=e.attrs,o=e.on;return[t("v-list-item",n._g(n._b({attrs:{"data-test":"activity-select-type-"+l}},"v-list-item",i,!1),o),[t("v-list-item-content",[t("v-list-item-title",{domProps:{textContent:n._s(l)}})],1)],1)]}}]),model:{value:n.kind,callback:function(e){n.kind=e},expression:"kind"}}),"COMMAND"===n.kind?t("div",[t("v-text-field",{attrs:{type:"text",label:"Command Input",placeholder:"INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0",prefix:"cmd('",suffix:"')",hint:"Timeline runs commands with cmd_no_hazardous_check","data-test":"activity-cmd"},model:{value:n.activityData,callback:function(e){n.activityData=e},expression:"activityData"}})],1):"SCRIPT"===n.kind?t("div",[t("script-chooser",{on:{file:n.fileHandler}}),t("environment-chooser",{on:{selected:n.selectedHandler}})],1):t("div",[t("span",{staticClass:"ma-2"},[n._v(" No required input ")])]),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-activity-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"create-activity-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.createActivity.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},Le=[];function Pe(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityCreateDialog.vue",e="8a37b5e3439a89c85d0f8370f8f5d49cc024105c",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/ActivityCreateDialog.vue",statementMap:{0:{start:{line:233,column:4},end:{line:248,column:5}},1:{start:{line:246,column:29},end:{line:246,column:50}},2:{start:{line:251,column:4},end:{line:251,column:23}},3:{start:{line:255,column:6},end:{line:257,column:7}},4:{start:{line:256,column:8},end:{line:256,column:56}},5:{start:{line:258,column:18},end:{line:258,column:28}},6:{start:{line:259,column:20},end:{line:259,column:69}},7:{start:{line:260,column:19},end:{line:260,column:66}},8:{start:{line:261,column:6},end:{line:263,column:7}},9:{start:{line:262,column:8},end:{line:262,column:93}},10:{start:{line:264,column:6},end:{line:266,column:7}},11:{start:{line:265,column:8},end:{line:265,column:68}},12:{start:{line:267,column:6},end:{line:269,column:7}},13:{start:{line:268,column:8},end:{line:268,column:64}},14:{start:{line:270,column:6},end:{line:270,column:17}},15:{start:{line:273,column:6},end:{line:275,column:7}},16:{start:{line:274,column:8},end:{line:274,column:48}},17:{start:{line:276,column:6},end:{line:276,column:17}},18:{start:{line:279,column:6},end:{line:281,column:8}},19:{start:{line:280,column:8},end:{line:280,column:28}},20:{start:{line:285,column:8},end:{line:285,column:25}},21:{start:{line:288,column:8},end:{line:288,column:34}},22:{start:{line:294,column:6},end:{line:296,column:7}},23:{start:{line:295,column:8},end:{line:295,column:14}},24:{start:{line:297,column:6},end:{line:297,column:27}},25:{start:{line:298,column:6},end:{line:298,column:28}},26:{start:{line:301,column:6},end:{line:301,column:46}},27:{start:{line:304,column:6},end:{line:304,column:53}},28:{start:{line:307,column:6},end:{line:307,column:25}},29:{start:{line:308,column:6},end:{line:308,column:55}},30:{start:{line:309,column:6},end:{line:309,column:53}},31:{start:{line:310,column:6},end:{line:310,column:54}},32:{start:{line:311,column:6},end:{line:311,column:52}},33:{start:{line:312,column:6},end:{line:312,column:29}},34:{start:{line:313,column:6},end:{line:313,column:20}},35:{start:{line:314,column:6},end:{line:314,column:28}},36:{start:{line:315,column:6},end:{line:315,column:35}},37:{start:{line:319,column:20},end:{line:321,column:7}},38:{start:{line:322,column:19},end:{line:324,column:7}},39:{start:{line:325,column:19},end:{line:325,column:42}},40:{start:{line:326,column:17},end:{line:326,column:58}},41:{start:{line:327,column:6},end:{line:327,column:36}},42:{start:{line:328,column:6},end:{line:338,column:8}},43:{start:{line:331,column:29},end:{line:333,column:9}},44:{start:{line:334,column:8},end:{line:337,column:10}},45:{start:{line:339,column:6},end:{line:339,column:28}},46:{start:{line:340,column:6},end:{line:340,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:232,column:2},end:{line:232,column:3}},loc:{start:{line:232,column:9},end:{line:249,column:3}},line:232},1:{name:"(anonymous_1)",decl:{start:{line:246,column:18},end:{line:246,column:19}},loc:{start:{line:246,column:29},end:{line:246,column:50}},line:246},2:{name:"(anonymous_2)",decl:{start:{line:250,column:11},end:{line:250,column:12}},loc:{start:{line:250,column:23},end:{line:252,column:3}},line:250},3:{name:"(anonymous_3)",decl:{start:{line:254,column:15},end:{line:254,column:16}},loc:{start:{line:254,column:27},end:{line:271,column:5}},line:254},4:{name:"(anonymous_4)",decl:{start:{line:272,column:15},end:{line:272,column:16}},loc:{start:{line:272,column:27},end:{line:277,column:5}},line:272},5:{name:"(anonymous_5)",decl:{start:{line:278,column:19},end:{line:278,column:20}},loc:{start:{line:278,column:31},end:{line:282,column:5}},line:278},6:{name:"(anonymous_6)",decl:{start:{line:279,column:32},end:{line:279,column:33}},loc:{start:{line:279,column:46},end:{line:281,column:7}},line:279},7:{name:"(anonymous_7)",decl:{start:{line:284,column:6},end:{line:284,column:7}},loc:{start:{line:284,column:12},end:{line:286,column:7}},line:284},8:{name:"(anonymous_8)",decl:{start:{line:287,column:6},end:{line:287,column:7}},loc:{start:{line:287,column:17},end:{line:289,column:7}},line:287},9:{name:"(anonymous_9)",decl:{start:{line:293,column:16},end:{line:293,column:17}},loc:{start:{line:293,column:37},end:{line:299,column:5}},line:293},10:{name:"(anonymous_10)",decl:{start:{line:300,column:17},end:{line:300,column:18}},loc:{start:{line:300,column:34},end:{line:302,column:5}},line:300},11:{name:"(anonymous_11)",decl:{start:{line:303,column:21},end:{line:303,column:22}},loc:{start:{line:303,column:38},end:{line:305,column:5}},line:303},12:{name:"(anonymous_12)",decl:{start:{line:306,column:18},end:{line:306,column:19}},loc:{start:{line:306,column:30},end:{line:316,column:5}},line:306},13:{name:"(anonymous_13)",decl:{start:{line:317,column:20},end:{line:317,column:21}},loc:{start:{line:317,column:32},end:{line:341,column:5}},line:317},14:{name:"(anonymous_14)",decl:{start:{line:330,column:14},end:{line:330,column:15}},loc:{start:{line:330,column:28},end:{line:338,column:7}},line:330}},branchMap:{0:{loc:{start:{line:246,column:29},end:{line:246,column:50}},type:"binary-expr",locations:[{start:{line:246,column:29},end:{line:246,column:36}},{start:{line:246,column:40},end:{line:246,column:50}}],line:246},1:{loc:{start:{line:255,column:6},end:{line:257,column:7}},type:"if",locations:[{start:{line:255,column:6},end:{line:257,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:255},2:{loc:{start:{line:261,column:6},end:{line:263,column:7}},type:"if",locations:[{start:{line:261,column:6},end:{line:263,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:261},3:{loc:{start:{line:264,column:6},end:{line:266,column:7}},type:"if",locations:[{start:{line:264,column:6},end:{line:266,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:264},4:{loc:{start:{line:267,column:6},end:{line:269,column:7}},type:"if",locations:[{start:{line:267,column:6},end:{line:269,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:267},5:{loc:{start:{line:273,column:6},end:{line:275,column:7}},type:"if",locations:[{start:{line:273,column:6},end:{line:275,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:273},6:{loc:{start:{line:273,column:10},end:{line:273,column:55}},type:"binary-expr",locations:[{start:{line:273,column:10},end:{line:273,column:33}},{start:{line:273,column:37},end:{line:273,column:55}}],line:273},7:{loc:{start:{line:294,column:6},end:{line:296,column:7}},type:"if",locations:[{start:{line:294,column:6},end:{line:296,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:294},8:{loc:{start:{line:301,column:26},end:{line:301,column:46}},type:"cond-expr",locations:[{start:{line:301,column:34},end:{line:301,column:39}},{start:{line:301,column:42},end:{line:301,column:46}}],line:301},9:{loc:{start:{line:304,column:33},end:{line:304,column:53}},type:"cond-expr",locations:[{start:{line:304,column:41},end:{line:304,column:46}},{start:{line:304,column:49},end:{line:304,column:53}}],line:304}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0]},inputSourceMap:{version:3,sources:["ActivityCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoNA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"ActivityCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="createActivity">\n <v-system-bar>\n <v-spacer />\n <span>Create Activity</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-activity-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-select\n v-model="timeline"\n :items="timelineNames"\n label="Timeline"\n data-test="activity-select-timeline"\n >\n <template v-slot:item="{ item, attrs, on }">\n <v-list-item\n v-on="on"\n v-bind="attrs"\n :data-test="`activity-select-timeline-${item}`"\n >\n <v-list-item-content>\n <v-list-item-title v-text="item" />\n </v-list-item-content>\n </v-list-item>\n </template>\n </v-select>\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="activity-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-activity-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">\n Activity type input\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <v-select\n v-model="kind"\n :items="types"\n label="Activity Type"\n data-test="activity-select-type"\n >\n <template v-slot:item="{ item, attrs, on }">\n <v-list-item\n v-on="on"\n v-bind="attrs"\n :data-test="`activity-select-type-${item}`"\n >\n <v-list-item-content>\n <v-list-item-title v-text="item" />\n </v-list-item-content>\n </v-list-item>\n </template>\n </v-select>\n <div v-if="kind === \'COMMAND\'">\n <v-text-field\n v-model="activityData"\n type="text"\n label="Command Input"\n placeholder="INST COLLECT with TYPE 0, DURATION 1, OPCODE 171, TEMP 0"\n prefix="cmd(\'"\n suffix="\')"\n hint="Timeline runs commands with cmd_no_hazardous_check"\n data-test="activity-cmd"\n />\n </div>\n <div v-else-if="kind === \'SCRIPT\'">\n <script-chooser @file="fileHandler" />\n <environment-chooser @selected="selectedHandler" />\n </div>\n <div v-else>\n <span class="ma-2"> No required input </span>\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="create-activity-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="createActivity"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="create-activity-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport EnvironmentChooser from \'@cosmosc2/tool-common/src/components/EnvironmentChooser\'\nimport ScriptChooser from \'@cosmosc2/tool-common/src/components/ScriptChooser\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\n\nexport default {\n components: {\n EnvironmentChooser,\n ScriptChooser,\n },\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n timeline: null,\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n kind: \'\',\n types: [\'COMMAND\', \'SCRIPT\', \'RESERVE\'],\n activityData: \'\',\n activityEnvironment: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n mounted: function () {\n this.updateValues()\n },\n computed: {\n timeError: function () {\n if (!this.timeline) {\n return \'Activity must have a timeline selected.\'\n }\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Activity must have different start and stop times.\'\n }\n if (now > start) {\n return \'Invalid start time. Activity must be in the future.\'\n }\n if (start > stop) {\n return \'Invalid start time. Activity start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (this.kind !== \'RESERVE\' && !this.activityData) {\n return \'No data is selected or inputted\'\n }\n return null\n },\n timelineNames: function () {\n return this.timelines.map((timeline) => {\n return timeline.name\n })\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n changeKind: function (inputKind) {\n if (inputKind === this.kind) {\n return\n }\n this.kind = inputKind\n this.activityData = \'\'\n },\n fileHandler: function (event) {\n this.activityData = event ? event : null\n },\n selectedHandler: function (event) {\n this.activityEnvironment = event ? event : null\n },\n updateValues: function () {\n this.dialogStep = 1\n this.startDate = format(new Date(), \'yyyy-MM-dd\')\n this.startTime = format(new Date(), \'HH:mm:ss\')\n this.stopDate = format(new Date(), \'yyyy-MM-dd\')\n this.stopTime = format(new Date(), \'HH:mm:ss\')\n this.utcOrLocal = \'loc\'\n this.kind = \'\'\n this.activityData = \'\'\n this.activityEnvironment = []\n },\n createActivity: function () {\n // Call the api to create a new activity to add to the activities array\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const kind = this.kind.toLowerCase()\n let data = { environment: this.activityEnvironment }\n data[kind] = this.activityData\n Api.post(`/cosmos-api/timeline/${this.timeline}/activities`, {\n data: { start, stop, kind, data },\n }).then((response) => {\n const activityTime = this.generateDateTime(\n new Date(response.data.start * 1000)\n )\n this.$notify.normal({\n title: \'Created Activity\',\n body: `${activityTime} (${response.data.start}) on timeline: ${response.data.name}`,\n })\n })\n this.show = !this.show\n this.updateValues()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"8a37b5e3439a89c85d0f8370f8f5d49cc024105c"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Pe=function(){return a},a}Pe();var qe={components:{EnvironmentChooser:X,ScriptChooser:an},props:{timelines:{type:Array,required:!0},value:Boolean},mixins:[U],data:function(){return Pe().f[0]++,Pe().s[0]++,{timeline:null,dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",kind:"",types:["COMMAND","SCRIPT","RESERVE"],activityData:"",activityEnvironment:[],rules:{required:function(n){return Pe().f[1]++,Pe().s[1]++,Pe().b[0][0]++,!!n||(Pe().b[0][1]++,"Required")}}}},mounted:function(){Pe().f[2]++,Pe().s[2]++,this.updateValues()},computed:{timeError:function(){if(Pe().f[3]++,Pe().s[3]++,!this.timeline)return Pe().b[1][0]++,Pe().s[4]++,"Activity must have a timeline selected.";Pe().b[1][1]++;var n=(Pe().s[5]++,new Date),e=(Pe().s[6]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),t=(Pe().s[7]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return Pe().s[8]++,e===t?(Pe().b[2][0]++,Pe().s[9]++,"Invalid start, stop time. Activity must have different start and stop times."):(Pe().b[2][1]++,Pe().s[10]++,n>e?(Pe().b[3][0]++,Pe().s[11]++,"Invalid start time. Activity must be in the future."):(Pe().b[3][1]++,Pe().s[12]++,e>t?(Pe().b[4][0]++,Pe().s[13]++,"Invalid start time. Activity start before stop."):(Pe().b[4][1]++,Pe().s[14]++,null)))},typeError:function(){return Pe().f[4]++,Pe().s[15]++,Pe().b[6][0]++,"RESERVE"===this.kind||(Pe().b[6][1]++,this.activityData)?(Pe().b[5][1]++,Pe().s[17]++,null):(Pe().b[5][0]++,Pe().s[16]++,"No data is selected or inputted")},timelineNames:function(){return Pe().f[5]++,Pe().s[18]++,this.timelines.map((function(n){return Pe().f[6]++,Pe().s[19]++,n.name}))},show:{get:function(){return Pe().f[7]++,Pe().s[20]++,this.value},set:function(n){Pe().f[8]++,Pe().s[21]++,this.$emit("input",n)}}},methods:{changeKind:function(n){if(Pe().f[9]++,Pe().s[22]++,n===this.kind)return Pe().b[7][0]++,void Pe().s[23]++;Pe().b[7][1]++,Pe().s[24]++,this.kind=n,Pe().s[25]++,this.activityData=""},fileHandler:function(n){Pe().f[10]++,Pe().s[26]++,this.activityData=n?(Pe().b[8][0]++,n):(Pe().b[8][1]++,null)},selectedHandler:function(n){Pe().f[11]++,Pe().s[27]++,this.activityEnvironment=n?(Pe().b[9][0]++,n):(Pe().b[9][1]++,null)},updateValues:function(){Pe().f[12]++,Pe().s[28]++,this.dialogStep=1,Pe().s[29]++,this.startDate=(0,V.Z)(new Date,"yyyy-MM-dd"),Pe().s[30]++,this.startTime=(0,V.Z)(new Date,"HH:mm:ss"),Pe().s[31]++,this.stopDate=(0,V.Z)(new Date,"yyyy-MM-dd"),Pe().s[32]++,this.stopTime=(0,V.Z)(new Date,"HH:mm:ss"),Pe().s[33]++,this.utcOrLocal="loc",Pe().s[34]++,this.kind="",Pe().s[35]++,this.activityData="",Pe().s[36]++,this.activityEnvironment=[]},createActivity:function(){var n=this;Pe().f[13]++;var e=(Pe().s[37]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(Pe().s[38]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),l=(Pe().s[39]++,this.kind.toLowerCase()),i=(Pe().s[40]++,{environment:this.activityEnvironment});Pe().s[41]++,i[l]=this.activityData,Pe().s[42]++,f.post("/cosmos-api/timeline/".concat(this.timeline,"/activities"),{data:{start:e,stop:t,kind:l,data:i}}).then((function(e){Pe().f[14]++;var t=(Pe().s[43]++,n.generateDateTime(new Date(1e3*e.data.start)));Pe().s[44]++,n.$notify.normal({title:"Created Activity",body:"".concat(t," (").concat(e.data.start,") on timeline: ").concat(e.data.name)})})),Pe().s[45]++,this.show=!this.show,Pe().s[46]++,this.updateValues()}}},He=qe,Ze=(t(7896),(0,E.Z)(He,Ue,Le,!1,null,"82c43f5e",null)),je=Ze.exports,Ge=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.createMetadata.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Metadata")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"close-metadata-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v("Close")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}}),t("v-row",{attrs:{dense:""}},[t("v-checkbox",{attrs:{label:"Input Metadata Time"},model:{value:n.userProvidedTime,callback:function(e){n.userProvidedTime=e},expression:"userProvidedTime"}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:n.userProvidedTime,expression:"userProvidedTime"}]},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"metadata-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"metadata-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-metadata-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v("Metadata Input")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",{staticStyle:{"min-height":"200px"}},[t("metadata-input-form",{model:{value:n.metadata,callback:function(e){n.metadata=e},expression:"metadata"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-metadata-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"create-metadata-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.createMetadata.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},Be=[];function Ye(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataCreateDialog.vue",e="a7897651a33b42555e5b4c213ef6265a3e0ab5bb",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/MetadataCreateDialog.vue",statementMap:{0:{start:{line:175,column:4},end:{line:187,column:5}},1:{start:{line:185,column:29},end:{line:185,column:50}},2:{start:{line:190,column:4},end:{line:190,column:23}},3:{start:{line:194,column:6},end:{line:196,column:7}},4:{start:{line:195,column:8},end:{line:195,column:37}},5:{start:{line:197,column:6},end:{line:199,column:7}},6:{start:{line:198,column:8},end:{line:198,column:19}},7:{start:{line:200,column:18},end:{line:200,column:28}},8:{start:{line:201,column:20},end:{line:201,column:69}},9:{start:{line:202,column:6},end:{line:204,column:7}},10:{start:{line:203,column:8},end:{line:203,column:61}},11:{start:{line:205,column:6},end:{line:205,column:17}},12:{start:{line:208,column:6},end:{line:210,column:7}},13:{start:{line:209,column:8},end:{line:209,column:60}},14:{start:{line:211,column:28},end:{line:213,column:7}},15:{start:{line:212,column:18},end:{line:212,column:54}},16:{start:{line:214,column:6},end:{line:216,column:7}},17:{start:{line:215,column:8},end:{line:215,column:67}},18:{start:{line:217,column:6},end:{line:217,column:17}},19:{start:{line:221,column:8},end:{line:221,column:25}},20:{start:{line:224,column:8},end:{line:224,column:34}},21:{start:{line:230,column:6},end:{line:230,column:25}},22:{start:{line:231,column:6},end:{line:231,column:55}},23:{start:{line:232,column:6},end:{line:232,column:53}},24:{start:{line:233,column:6},end:{line:233,column:24}},25:{start:{line:234,column:6},end:{line:234,column:28}},26:{start:{line:237,column:20},end:{line:237,column:30}},27:{start:{line:238,column:23},end:{line:241,column:12}},28:{start:{line:239,column:8},end:{line:239,column:43}},29:{start:{line:240,column:8},end:{line:240,column:21}},30:{start:{line:242,column:19},end:{line:242,column:38}},31:{start:{line:243,column:6},end:{line:247,column:7}},32:{start:{line:244,column:8},end:{line:246,column:9}},33:{start:{line:248,column:6},end:{line:255,column:8}},34:{start:{line:251,column:8},end:{line:254,column:10}},35:{start:{line:256,column:6},end:{line:256,column:28}},36:{start:{line:257,column:6},end:{line:257,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:174,column:2},end:{line:174,column:3}},loc:{start:{line:174,column:9},end:{line:188,column:3}},line:174},1:{name:"(anonymous_1)",decl:{start:{line:185,column:18},end:{line:185,column:19}},loc:{start:{line:185,column:29},end:{line:185,column:50}},line:185},2:{name:"(anonymous_2)",decl:{start:{line:189,column:11},end:{line:189,column:12}},loc:{start:{line:189,column:23},end:{line:191,column:3}},line:189},3:{name:"(anonymous_3)",decl:{start:{line:193,column:15},end:{line:193,column:16}},loc:{start:{line:193,column:27},end:{line:206,column:5}},line:193},4:{name:"(anonymous_4)",decl:{start:{line:207,column:15},end:{line:207,column:16}},loc:{start:{line:207,column:27},end:{line:218,column:5}},line:207},5:{name:"(anonymous_5)",decl:{start:{line:212,column:8},end:{line:212,column:9}},loc:{start:{line:212,column:18},end:{line:212,column:54}},line:212},6:{name:"(anonymous_6)",decl:{start:{line:220,column:6},end:{line:220,column:7}},loc:{start:{line:220,column:12},end:{line:222,column:7}},line:220},7:{name:"(anonymous_7)",decl:{start:{line:223,column:6},end:{line:223,column:7}},loc:{start:{line:223,column:17},end:{line:225,column:7}},line:223},8:{name:"(anonymous_8)",decl:{start:{line:229,column:18},end:{line:229,column:19}},loc:{start:{line:229,column:30},end:{line:235,column:5}},line:229},9:{name:"(anonymous_9)",decl:{start:{line:236,column:20},end:{line:236,column:21}},loc:{start:{line:236,column:32},end:{line:258,column:5}},line:236},10:{name:"(anonymous_10)",decl:{start:{line:238,column:44},end:{line:238,column:45}},loc:{start:{line:238,column:65},end:{line:241,column:7}},line:238},11:{name:"(anonymous_11)",decl:{start:{line:250,column:14},end:{line:250,column:15}},loc:{start:{line:250,column:28},end:{line:255,column:7}},line:250}},branchMap:{0:{loc:{start:{line:185,column:29},end:{line:185,column:50}},type:"binary-expr",locations:[{start:{line:185,column:29},end:{line:185,column:36}},{start:{line:185,column:40},end:{line:185,column:50}}],line:185},1:{loc:{start:{line:194,column:6},end:{line:196,column:7}},type:"if",locations:[{start:{line:194,column:6},end:{line:196,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:194},2:{loc:{start:{line:197,column:6},end:{line:199,column:7}},type:"if",locations:[{start:{line:197,column:6},end:{line:199,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:197},3:{loc:{start:{line:202,column:6},end:{line:204,column:7}},type:"if",locations:[{start:{line:202,column:6},end:{line:204,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:202},4:{loc:{start:{line:208,column:6},end:{line:210,column:7}},type:"if",locations:[{start:{line:208,column:6},end:{line:210,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:208},5:{loc:{start:{line:212,column:18},end:{line:212,column:54}},type:"binary-expr",locations:[{start:{line:212,column:18},end:{line:212,column:33}},{start:{line:212,column:37},end:{line:212,column:54}}],line:212},6:{loc:{start:{line:214,column:6},end:{line:216,column:7}},type:"if",locations:[{start:{line:214,column:6},end:{line:216,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:214},7:{loc:{start:{line:243,column:6},end:{line:247,column:7}},type:"if",locations:[{start:{line:243,column:6},end:{line:247,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:243}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0],6:[0,0],7:[0,0]},inputSourceMap:{version:3,sources:["MetadataCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4JA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MetadataCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="createMetadata">\n <v-system-bar>\n <v-spacer />\n <span>Create Metadata</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-metadata-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span>Close</span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <color-select-form v-model="color" />\n <v-row dense>\n <v-checkbox\n v-model="userProvidedTime"\n label="Input Metadata Time"\n />\n </v-row>\n <div v-show="userProvidedTime">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="metadata-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="metadata-start-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio\n label="LST"\n value="loc"\n data-test="lst-radio"\n />\n <v-radio\n label="UTC"\n value="utc"\n data-test="utc-radio"\n />\n </v-radio-group>\n </v-row>\n </div>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-metadata-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">Metadata Input</v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div style="min-height: 200px">\n <metadata-input-form v-model="metadata" />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="create-metadata-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="createMetadata"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="create-metadata-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport { CosmosApi } from \'@cosmosc2/tool-common/src/services/cosmos-api\'\n\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\nimport MetadataInputForm from \'@/tools/Calendar/Forms/MetadataInputForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n MetadataInputForm,\n },\n props: {\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n scope: localStorage.scope,\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n utcOrLocal: \'loc\',\n userProvidedTime: false,\n color: \'#003784\',\n metadata: [],\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n mounted: function () {\n this.updateValues()\n },\n computed: {\n timeError: function () {\n if (!this.color) {\n return \'A color is required.\'\n }\n if (!this.userProvidedTime) {\n return null\n }\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n if (now < start) {\n return \'Invalid start time. Can not be in the future\'\n }\n return null\n },\n typeError: function () {\n if (this.metadata.length < 1) {\n return \'Please enter a value in the metadata table.\'\n }\n const emptyKeyValue = this.metadata.find(\n (meta) => meta.key === \'\' || meta.value === \'\'\n )\n if (emptyKeyValue) {\n return \'Missing or empty key, value in the metadata table.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n this.dialogStep = 1\n this.startDate = format(new Date(), \'yyyy-MM-dd\')\n this.startTime = format(new Date(), \'HH:mm:ss\')\n this.metadata = []\n this.color = \'#003784\'\n },\n createMetadata: function () {\n const color = this.color\n const metadata = this.metadata.reduce((result, element) => {\n result[element.key] = element.value\n return result\n }, {})\n const data = { color, metadata }\n if (this.userProvidedTime) {\n data.start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n }\n Api.post(\'/cosmos-api/metadata\', {\n data,\n }).then((response) => {\n this.$notify.normal({\n title: \'Created new Metadata\',\n body: `Metadata: (${response.data.start})`,\n })\n })\n this.show = !this.show\n this.updateValues()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"a7897651a33b42555e5b4c213ef6265a3e0ab5bb"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Ye=function(){return a},a}Ye();var Ve={components:{ColorSelectForm:Fn,MetadataInputForm:Ln},props:{value:Boolean},mixins:[U],data:function(){return Ye().f[0]++,Ye().s[0]++,{scope:localStorage.scope,dialogStep:1,startDate:"",startTime:"",utcOrLocal:"loc",userProvidedTime:!1,color:"#003784",metadata:[],rules:{required:function(n){return Ye().f[1]++,Ye().s[1]++,Ye().b[0][0]++,!!n||(Ye().b[0][1]++,"Required")}}}},mounted:function(){Ye().f[2]++,Ye().s[2]++,this.updateValues()},computed:{timeError:function(){if(Ye().f[3]++,Ye().s[3]++,!this.color)return Ye().b[1][0]++,Ye().s[4]++,"A color is required.";if(Ye().b[1][1]++,Ye().s[5]++,!this.userProvidedTime)return Ye().b[2][0]++,Ye().s[6]++,null;Ye().b[2][1]++;var n=(Ye().s[7]++,new Date),e=(Ye().s[8]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime)));return Ye().s[9]++,n<e?(Ye().b[3][0]++,Ye().s[10]++,"Invalid start time. Can not be in the future"):(Ye().b[3][1]++,Ye().s[11]++,null)},typeError:function(){if(Ye().f[4]++,Ye().s[12]++,this.metadata.length<1)return Ye().b[4][0]++,Ye().s[13]++,"Please enter a value in the metadata table.";Ye().b[4][1]++;var n=(Ye().s[14]++,this.metadata.find((function(n){return Ye().f[5]++,Ye().s[15]++,Ye().b[5][0]++,""===n.key||(Ye().b[5][1]++,""===n.value)})));return Ye().s[16]++,n?(Ye().b[6][0]++,Ye().s[17]++,"Missing or empty key, value in the metadata table."):(Ye().b[6][1]++,Ye().s[18]++,null)},show:{get:function(){return Ye().f[6]++,Ye().s[19]++,this.value},set:function(n){Ye().f[7]++,Ye().s[20]++,this.$emit("input",n)}}},methods:{updateValues:function(){Ye().f[8]++,Ye().s[21]++,this.dialogStep=1,Ye().s[22]++,this.startDate=(0,V.Z)(new Date,"yyyy-MM-dd"),Ye().s[23]++,this.startTime=(0,V.Z)(new Date,"HH:mm:ss"),Ye().s[24]++,this.metadata=[],Ye().s[25]++,this.color="#003784"},createMetadata:function(){var n=this;Ye().f[9]++;var e=(Ye().s[26]++,this.color),t=(Ye().s[27]++,this.metadata.reduce((function(n,e){return Ye().f[10]++,Ye().s[28]++,n[e.key]=e.value,Ye().s[29]++,n}),{})),l=(Ye().s[30]++,{color:e,metadata:t});Ye().s[31]++,this.userProvidedTime?(Ye().b[7][0]++,Ye().s[32]++,l.start=this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))):Ye().b[7][1]++,Ye().s[33]++,f.post("/cosmos-api/metadata",{data:l}).then((function(e){Ye().f[11]++,Ye().s[34]++,n.$notify.normal({title:"Created new Metadata",body:"Metadata: (".concat(e.data.start,")")})})),Ye().s[35]++,this.show=!this.show,Ye().s[36]++,this.updateValues()}}},We=Ve,Ke=(t(3619),(0,E.Z)(We,Ge,Be,!1,null,"1c3fc848",null)),Je=Ke.exports,ze=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.createNote.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Note")]),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-icon",{attrs:{"data-test":"close-note-icon"},on:{click:function(e){n.show=!n.show}}},[n._v(" mdi-close-box ")])],1)]}}])},[t("span",[n._v(" Close ")])])],1),t("v-stepper",{attrs:{vertical:"","non-linear":""},model:{value:n.dialogStep,callback:function(e){n.dialogStep=e},expression:"dialogStep"}},[t("v-stepper-step",{attrs:{editable:"",step:"1"}},[n._v(" Input start time, stop time ")]),t("v-stepper-content",{attrs:{step:"1"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"Start Date",rules:[n.rules.required],"data-test":"note-start-date"},model:{value:n.startDate,callback:function(e){n.startDate=e},expression:"startDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"Start Time",rules:[n.rules.required],"data-test":"note-start-time"},model:{value:n.startTime,callback:function(e){n.startTime=e},expression:"startTime"}})],1),t("v-row",{attrs:{dense:""}},[t("v-text-field",{staticClass:"mx-1",attrs:{type:"date",label:"End Date",rules:[n.rules.required],"data-test":"note-stop-date"},model:{value:n.stopDate,callback:function(e){n.stopDate=e},expression:"stopDate"}}),t("v-text-field",{staticClass:"mx-1",attrs:{type:"time",step:"1",label:"End Time",rules:[n.rules.required],"data-test":"note-stop-time"},model:{value:n.stopTime,callback:function(e){n.stopTime=e},expression:"stopTime"}})],1),t("v-row",{staticClass:"mx-2 mb-2"},[t("v-radio-group",{staticClass:"mt-0",attrs:{row:"","hide-details":""},model:{value:n.utcOrLocal,callback:function(e){n.utcOrLocal=e},expression:"utcOrLocal"}},[t("v-radio",{attrs:{label:"LST",value:"loc","data-test":"lst-radio"}}),t("v-radio",{attrs:{label:"UTC",value:"utc","data-test":"utc-radio"}})],1)],1),t("v-row",[t("span",{directives:[{name:"show",rawName:"v-show",value:n.timeError,expression:"timeError"}],staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.timeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{attrs:{"data-test":"create-note-step-two-btn",color:"success",disabled:!!n.timeError},on:{click:function(e){n.dialogStep=2}}},[n._v(" Continue ")])],1)],1)])],1),t("v-stepper-step",{attrs:{editable:"",step:"2"}},[n._v(" Input Description ")]),t("v-stepper-content",{attrs:{step:"2"}},[t("v-card-text",[t("div",{staticClass:"pa-2"},[t("div",[t("color-select-form",{model:{value:n.color,callback:function(e){n.color=e},expression:"color"}})],1),t("div",[t("v-text-field",{attrs:{type:"text",label:"Note Description","data-test":"create-note-description"},model:{value:n.description,callback:function(e){n.description=e},expression:"description"}})],1),t("v-row",{directives:[{name:"show",rawName:"v-show",value:n.typeError,expression:"typeError"}]},[t("span",{staticClass:"ma-2 red--text",domProps:{textContent:n._s(n.typeError)}})]),t("v-row",{staticClass:"mt-2"},[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-note-cancel-btn"},on:{click:function(e){n.show=!n.show}}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{color:"primary",type:"submit","data-test":"create-note-submit-btn",disabled:!!n.timeError||!!n.typeError},on:{click:function(e){return e.preventDefault(),n.createNote.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)],1)],1)])],1)],1)},Qe=[];function Xe(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NoteCreateDialog.vue",e="18f2350f72d360d340bf8d3c86f3050e7f3b8a35",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/NoteCreateDialog.vue",statementMap:{0:{start:{line:183,column:4},end:{line:195,column:5}},1:{start:{line:193,column:29},end:{line:193,column:50}},2:{start:{line:198,column:4},end:{line:198,column:23}},3:{start:{line:202,column:18},end:{line:202,column:28}},4:{start:{line:203,column:20},end:{line:203,column:69}},5:{start:{line:204,column:19},end:{line:204,column:66}},6:{start:{line:205,column:6},end:{line:207,column:7}},7:{start:{line:206,column:8},end:{line:206,column:90}},8:{start:{line:208,column:6},end:{line:210,column:7}},9:{start:{line:209,column:8},end:{line:209,column:61}},10:{start:{line:211,column:6},end:{line:211,column:17}},11:{start:{line:214,column:6},end:{line:216,column:7}},12:{start:{line:215,column:8},end:{line:215,column:37}},13:{start:{line:217,column:6},end:{line:219,column:7}},14:{start:{line:218,column:8},end:{line:218,column:60}},15:{start:{line:220,column:6},end:{line:220,column:17}},16:{start:{line:224,column:8},end:{line:224,column:25}},17:{start:{line:227,column:8},end:{line:227,column:34}},18:{start:{line:233,column:6},end:{line:233,column:25}},19:{start:{line:234,column:6},end:{line:234,column:55}},20:{start:{line:235,column:6},end:{line:235,column:53}},21:{start:{line:236,column:6},end:{line:236,column:54}},22:{start:{line:237,column:6},end:{line:237,column:52}},23:{start:{line:238,column:6},end:{line:238,column:29}},24:{start:{line:239,column:6},end:{line:239,column:28}},25:{start:{line:240,column:6},end:{line:240,column:27}},26:{start:{line:243,column:20},end:{line:245,column:7}},27:{start:{line:246,column:19},end:{line:248,column:7}},28:{start:{line:249,column:20},end:{line:249,column:30}},29:{start:{line:250,column:26},end:{line:250,column:42}},30:{start:{line:251,column:6},end:{line:262,column:8}},31:{start:{line:255,column:10},end:{line:257,column:39}},32:{start:{line:258,column:8},end:{line:261,column:10}},33:{start:{line:263,column:6},end:{line:263,column:28}},34:{start:{line:264,column:6},end:{line:264,column:25}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:182,column:2},end:{line:182,column:3}},loc:{start:{line:182,column:9},end:{line:196,column:3}},line:182},1:{name:"(anonymous_1)",decl:{start:{line:193,column:18},end:{line:193,column:19}},loc:{start:{line:193,column:29},end:{line:193,column:50}},line:193},2:{name:"(anonymous_2)",decl:{start:{line:197,column:11},end:{line:197,column:12}},loc:{start:{line:197,column:23},end:{line:199,column:3}},line:197},3:{name:"(anonymous_3)",decl:{start:{line:201,column:15},end:{line:201,column:16}},loc:{start:{line:201,column:27},end:{line:212,column:5}},line:201},4:{name:"(anonymous_4)",decl:{start:{line:213,column:15},end:{line:213,column:16}},loc:{start:{line:213,column:27},end:{line:221,column:5}},line:213},5:{name:"(anonymous_5)",decl:{start:{line:223,column:6},end:{line:223,column:7}},loc:{start:{line:223,column:12},end:{line:225,column:7}},line:223},6:{name:"(anonymous_6)",decl:{start:{line:226,column:6},end:{line:226,column:7}},loc:{start:{line:226,column:17},end:{line:228,column:7}},line:226},7:{name:"(anonymous_7)",decl:{start:{line:232,column:18},end:{line:232,column:19}},loc:{start:{line:232,column:30},end:{line:241,column:5}},line:232},8:{name:"(anonymous_8)",decl:{start:{line:242,column:16},end:{line:242,column:17}},loc:{start:{line:242,column:28},end:{line:265,column:5}},line:242},9:{name:"(anonymous_9)",decl:{start:{line:253,column:14},end:{line:253,column:15}},loc:{start:{line:253,column:28},end:{line:262,column:7}},line:253}},branchMap:{0:{loc:{start:{line:193,column:29},end:{line:193,column:50}},type:"binary-expr",locations:[{start:{line:193,column:29},end:{line:193,column:36}},{start:{line:193,column:40},end:{line:193,column:50}}],line:193},1:{loc:{start:{line:205,column:6},end:{line:207,column:7}},type:"if",locations:[{start:{line:205,column:6},end:{line:207,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:205},2:{loc:{start:{line:208,column:6},end:{line:210,column:7}},type:"if",locations:[{start:{line:208,column:6},end:{line:210,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:208},3:{loc:{start:{line:214,column:6},end:{line:216,column:7}},type:"if",locations:[{start:{line:214,column:6},end:{line:216,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:214},4:{loc:{start:{line:217,column:6},end:{line:219,column:7}},type:"if",locations:[{start:{line:217,column:6},end:{line:219,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:217},5:{loc:{start:{line:255,column:10},end:{line:257,column:39}},type:"cond-expr",locations:[{start:{line:256,column:14},end:{line:256,column:64}},{start:{line:257,column:14},end:{line:257,column:39}}],line:255}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0,0],4:[0,0],5:[0,0]},inputSourceMap:{version:3,sources:["NoteCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"NoteCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addstopums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form @submit.prevent="createNote">\n <v-system-bar>\n <v-spacer />\n <span>Create Note</span>\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-on="on" v-bind="attrs">\n <v-icon data-test="close-note-icon" @click="show = !show">\n mdi-close-box\n </v-icon>\n </div>\n </template>\n <span> Close </span>\n </v-tooltip>\n </v-system-bar>\n <v-stepper v-model="dialogStep" vertical non-linear>\n <v-stepper-step editable step="1">\n Input start time, stop time\n </v-stepper-step>\n <v-stepper-content step="1">\n <v-card-text>\n <div class="pa-2">\n <v-row dense>\n <v-text-field\n v-model="startDate"\n type="date"\n label="Start Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-start-date"\n />\n <v-text-field\n v-model="startTime"\n type="time"\n step="1"\n label="Start Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-start-time"\n />\n </v-row>\n <v-row dense>\n <v-text-field\n v-model="stopDate"\n type="date"\n label="End Date"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-stop-date"\n />\n <v-text-field\n v-model="stopTime"\n type="time"\n step="1"\n label="End Time"\n class="mx-1"\n :rules="[rules.required]"\n data-test="note-stop-time"\n />\n </v-row>\n <v-row class="mx-2 mb-2">\n <v-radio-group\n v-model="utcOrLocal"\n row\n hide-details\n class="mt-0"\n >\n <v-radio label="LST" value="loc" data-test="lst-radio" />\n <v-radio label="UTC" value="utc" data-test="utc-radio" />\n </v-radio-group>\n </v-row>\n <v-row>\n <span\n class="ma-2 red--text"\n v-show="timeError"\n v-text="timeError"\n />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="dialogStep = 2"\n data-test="create-note-step-two-btn"\n color="success"\n :disabled="!!timeError"\n >\n Continue\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n <v-stepper-step editable step="2">\n Input Description\n </v-stepper-step>\n <v-stepper-content step="2">\n <v-card-text>\n <div class="pa-2">\n <div>\n <color-select-form v-model="color" />\n </div>\n <div>\n <v-text-field\n v-model="description"\n type="text"\n label="Note Description"\n data-test="create-note-description"\n />\n </div>\n <v-row v-show="typeError">\n <span class="ma-2 red--text" v-text="typeError" />\n </v-row>\n <v-row class="mt-2">\n <v-spacer />\n <v-btn\n @click="show = !show"\n outlined\n class="mx-2"\n data-test="create-note-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="createNote"\n class="mx-2"\n color="primary"\n type="submit"\n data-test="create-note-submit-btn"\n :disabled="!!timeError || !!typeError"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </v-stepper-content>\n </v-stepper>\n </form>\n </v-card>\n </v-dialog>\n </div>\n</template>\n\n<script>\nimport { isValid, parse, format, getTime } from \'date-fns\'\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport TimeFilters from \'@/tools/Calendar/Filters/timeFilters.js\'\nimport ColorSelectForm from \'@/tools/Calendar/Forms/ColorSelectForm\'\n\nexport default {\n components: {\n ColorSelectForm,\n },\n props: {\n value: Boolean, // value is the default prop when using v-model\n },\n mixins: [TimeFilters],\n data() {\n return {\n dialogStep: 1,\n startDate: \'\',\n startTime: \'\',\n stopDate: \'\',\n stopTime: \'\',\n utcOrLocal: \'loc\',\n description: \'\',\n color: \'#8F3400\',\n rules: {\n required: (value) => !!value || \'Required\',\n },\n }\n },\n mounted: function () {\n this.updateValues()\n },\n computed: {\n timeError: function () {\n const now = new Date()\n const start = Date.parse(`${this.startDate}T${this.startTime}`)\n const stop = Date.parse(`${this.stopDate}T${this.stopTime}`)\n if (start === stop) {\n return \'Invalid start, stop time. Notes must have different start and stop times.\'\n }\n if (start > stop) {\n return \'Invalid start time. Notes start before stop.\'\n }\n return null\n },\n typeError: function () {\n if (!this.color) {\n return \'A color is required.\'\n }\n if (!this.description) {\n return \'A description is required for a valid note.\'\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n updateValues: function () {\n this.dialogStep = 1\n this.startDate = format(new Date(), \'yyyy-MM-dd\')\n this.startTime = format(new Date(), \'HH:mm:ss\')\n this.stopDate = format(new Date(), \'yyyy-MM-dd\')\n this.stopTime = format(new Date(), \'HH:mm:ss\')\n this.utcOrLocal = \'loc\'\n this.color = \'#8F3400\'\n this.description = \'\'\n },\n createNote: function () {\n const start = this.toIsoString(\n Date.parse(`${this.startDate}T${this.startTime}`)\n )\n const stop = this.toIsoString(\n Date.parse(`${this.stopDate}T${this.stopTime}`)\n )\n const color = this.color\n const description = this.description\n Api.post(\'/cosmos-api/notes\', {\n data: { start, stop, color, description },\n }).then((response) => {\n const desc =\n response.data.description.length > 16\n ? `${response.data.description.substring(0, 16)}...`\n : response.data.description\n this.$notify.normal({\n title: \'Created new Note\',\n body: `Note: (${response.data.start}) created: "${desc}"`,\n })\n })\n this.show = !this.show\n this.updateValues()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.v-stepper--vertical .v-stepper__content {\n width: auto;\n margin: 0px 0px 0px 36px;\n padding: 0px;\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"18f2350f72d360d340bf8d3c86f3050e7f3b8a35"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Xe=function(){return a},a}Xe();var nt={components:{ColorSelectForm:Fn},props:{value:Boolean},mixins:[U],data:function(){return Xe().f[0]++,Xe().s[0]++,{dialogStep:1,startDate:"",startTime:"",stopDate:"",stopTime:"",utcOrLocal:"loc",description:"",color:"#8F3400",rules:{required:function(n){return Xe().f[1]++,Xe().s[1]++,Xe().b[0][0]++,!!n||(Xe().b[0][1]++,"Required")}}}},mounted:function(){Xe().f[2]++,Xe().s[2]++,this.updateValues()},computed:{timeError:function(){Xe().f[3]++;Xe().s[3]++,new Date;var n=(Xe().s[4]++,Date.parse("".concat(this.startDate,"T").concat(this.startTime))),e=(Xe().s[5]++,Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)));return Xe().s[6]++,n===e?(Xe().b[1][0]++,Xe().s[7]++,"Invalid start, stop time. Notes must have different start and stop times."):(Xe().b[1][1]++,Xe().s[8]++,n>e?(Xe().b[2][0]++,Xe().s[9]++,"Invalid start time. Notes start before stop."):(Xe().b[2][1]++,Xe().s[10]++,null))},typeError:function(){return Xe().f[4]++,Xe().s[11]++,this.color?(Xe().b[3][1]++,Xe().s[13]++,this.description?(Xe().b[4][1]++,Xe().s[15]++,null):(Xe().b[4][0]++,Xe().s[14]++,"A description is required for a valid note.")):(Xe().b[3][0]++,Xe().s[12]++,"A color is required.")},show:{get:function(){return Xe().f[5]++,Xe().s[16]++,this.value},set:function(n){Xe().f[6]++,Xe().s[17]++,this.$emit("input",n)}}},methods:{updateValues:function(){Xe().f[7]++,Xe().s[18]++,this.dialogStep=1,Xe().s[19]++,this.startDate=(0,V.Z)(new Date,"yyyy-MM-dd"),Xe().s[20]++,this.startTime=(0,V.Z)(new Date,"HH:mm:ss"),Xe().s[21]++,this.stopDate=(0,V.Z)(new Date,"yyyy-MM-dd"),Xe().s[22]++,this.stopTime=(0,V.Z)(new Date,"HH:mm:ss"),Xe().s[23]++,this.utcOrLocal="loc",Xe().s[24]++,this.color="#8F3400",Xe().s[25]++,this.description=""},createNote:function(){var n=this;Xe().f[8]++;var e=(Xe().s[26]++,this.toIsoString(Date.parse("".concat(this.startDate,"T").concat(this.startTime)))),t=(Xe().s[27]++,this.toIsoString(Date.parse("".concat(this.stopDate,"T").concat(this.stopTime)))),l=(Xe().s[28]++,this.color),i=(Xe().s[29]++,this.description);Xe().s[30]++,f.post("/cosmos-api/notes",{data:{start:e,stop:t,color:l,description:i}}).then((function(e){Xe().f[9]++;var t=(Xe().s[31]++,e.data.description.length>16?(Xe().b[5][0]++,"".concat(e.data.description.substring(0,16),"...")):(Xe().b[5][1]++,e.data.description));Xe().s[32]++,n.$notify.normal({title:"Created new Note",body:"Note: (".concat(e.data.start,') created: "').concat(t,'"')})})),Xe().s[33]++,this.show=!this.show,Xe().s[34]++,this.updateValues()}}},et=nt,tt=(t(9423),(0,E.Z)(et,ze,Qe,!1,null,"49b4c1c5",null)),lt=tt.exports;function it(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarToolbar.vue",e="349420d0503f963cc298ca5f68a0c165350c97fe",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarToolbar.vue",statementMap:{0:{start:{line:171,column:4},end:{line:181,column:5}},1:{start:{line:185,column:6},end:{line:198,column:7}},2:{start:{line:201,column:16},end:{line:201,column:74}},3:{start:{line:202,column:20},end:{line:202,column:52}},4:{start:{line:203,column:19},end:{line:203,column:37}},5:{start:{line:204,column:6},end:{line:204,column:31}},6:{start:{line:207,column:6},end:{line:207,column:27}},7:{start:{line:210,column:6},end:{line:210,column:29}},8:{start:{line:213,column:6},end:{line:213,column:28}},9:{start:{line:217,column:8},end:{line:217,column:25}},10:{start:{line:220,column:8},end:{line:220,column:34}},11:{start:{line:226,column:21},end:{line:226,column:57}},12:{start:{line:227,column:19},end:{line:229,column:8}},13:{start:{line:231,column:19},end:{line:231,column:46}},14:{start:{line:232,column:6},end:{line:232,column:43}},15:{start:{line:233,column:6},end:{line:236,column:7}},16:{start:{line:237,column:6},end:{line:237,column:18}},17:{start:{line:240,column:6},end:{line:240,column:60}},18:{start:{line:243,column:6},end:{line:243,column:70}},19:{start:{line:246,column:6},end:{line:249,column:7}},20:{start:{line:250,column:6},end:{line:250,column:22}},21:{start:{line:253,column:6},end:{line:256,column:7}},22:{start:{line:259,column:6},end:{line:259,column:46}},23:{start:{line:262,column:6},end:{line:262,column:46}},24:{start:{line:265,column:6},end:{line:265,column:49}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:170,column:2},end:{line:170,column:3}},loc:{start:{line:170,column:9},end:{line:182,column:3}},line:170},1:{name:"(anonymous_1)",decl:{start:{line:184,column:16},end:{line:184,column:17}},loc:{start:{line:184,column:28},end:{line:199,column:5}},line:184},2:{name:"(anonymous_2)",decl:{start:{line:200,column:11},end:{line:200,column:12}},loc:{start:{line:200,column:23},end:{line:205,column:5}},line:200},3:{name:"(anonymous_3)",decl:{start:{line:206,column:9},end:{line:206,column:10}},loc:{start:{line:206,column:21},end:{line:208,column:5}},line:206},4:{name:"(anonymous_4)",decl:{start:{line:209,column:11},end:{line:209,column:12}},loc:{start:{line:209,column:23},end:{line:211,column:5}},line:209},5:{name:"(anonymous_5)",decl:{start:{line:212,column:10},end:{line:212,column:11}},loc:{start:{line:212,column:22},end:{line:214,column:5}},line:212},6:{name:"(anonymous_6)",decl:{start:{line:216,column:6},end:{line:216,column:7}},loc:{start:{line:216,column:12},end:{line:218,column:7}},line:216},7:{name:"(anonymous_7)",decl:{start:{line:219,column:6},end:{line:219,column:7}},loc:{start:{line:219,column:17},end:{line:221,column:7}},line:219},8:{name:"(anonymous_8)",decl:{start:{line:225,column:20},end:{line:225,column:21}},loc:{start:{line:225,column:36},end:{line:238,column:5}},line:225},9:{name:"(anonymous_9)",decl:{start:{line:239,column:15},end:{line:239,column:16}},loc:{start:{line:239,column:27},end:{line:241,column:5}},line:239},10:{name:"(anonymous_10)",decl:{start:{line:242,column:16},end:{line:242,column:17}},loc:{start:{line:242,column:32},end:{line:244,column:5}},line:242},11:{name:"(anonymous_11)",decl:{start:{line:245,column:16},end:{line:245,column:17}},loc:{start:{line:245,column:32},end:{line:251,column:5}},line:245},12:{name:"(anonymous_12)",decl:{start:{line:252,column:14},end:{line:252,column:15}},loc:{start:{line:252,column:26},end:{line:257,column:5}},line:252},13:{name:"(anonymous_13)",decl:{start:{line:258,column:4},end:{line:258,column:5}},loc:{start:{line:258,column:11},end:{line:260,column:5}},line:258},14:{name:"(anonymous_14)",decl:{start:{line:261,column:4},end:{line:261,column:5}},loc:{start:{line:261,column:11},end:{line:263,column:5}},line:261},15:{name:"(anonymous_15)",decl:{start:{line:264,column:4},end:{line:264,column:5}},loc:{start:{line:264,column:14},end:{line:266,column:5}},line:264}},branchMap:{0:{loc:{start:{line:201,column:16},end:{line:201,column:74}},type:"cond-expr",locations:[{start:{line:201,column:35},end:{line:201,column:61}},{start:{line:201,column:64},end:{line:201,column:74}}],line:201}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["CalendarToolbar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4IA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"CalendarToolbar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-toolbar class="my-1">\n <v-menu bottom right>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn data-test="create-event" outlined>\n <v-icon left>mdi-plus-box</v-icon>\n <span>Create</span>\n <v-icon right>mdi-menu-down</v-icon>\n </v-btn>\n </div>\n </template>\n <v-list>\n <v-list-item data-test="note" @click="showNoteCreateDialog = true">\n <v-icon left>mdi-calendar-clock</v-icon>\n <v-list-item-title>Note</v-list-item-title>\n </v-list-item>\n <v-list-item\n data-test="metadata"\n @click="showMetadataCreateDialog = true"\n >\n <v-icon left>mdi-calendar-check</v-icon>\n <v-list-item-title>Metadata</v-list-item-title>\n </v-list-item>\n <v-list-item\n data-test="activity"\n @click="showActivityCreateDialog = true"\n >\n <v-icon left>mdi-calendar-question</v-icon>\n <v-list-item-title>Timeline Activity</v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n <v-btn outlined class="mx-3" data-test="today" @click="setToday">\n Today\n </v-btn>\n <v-btn fab text small data-test="prev" @click="prev">\n <v-icon small> mdi-chevron-left </v-icon>\n </v-btn>\n <v-btn fab text small data-test="next" @click="next">\n <v-icon small> mdi-chevron-right </v-icon>\n </v-btn>\n \x3c!--- SPACER ---\x3e\n <v-spacer />\n <v-toolbar-title v-text="title" />\n <v-spacer />\n \x3c!--- SPACER ---\x3e\n <v-menu bottom right>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn icon data-test="settings" class="mx-2">\n <v-icon> mdi-cog </v-icon>\n </v-btn>\n </div>\n </template>\n <v-list>\n <v-list-item data-test="refresh" @click="refresh">\n <v-icon left> mdi-refresh </v-icon>\n <v-list-item-title> Refresh Display </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="show-table" @click="showTable">\n <v-icon left> mdi-timetable </v-icon>\n <v-list-item-title> Show Table Display </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="display-utc-time" @click="updateTime">\n <v-icon left> mdi-clock </v-icon>\n <v-list-item-title> Toggle UTC Display </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="download-event-list" @click="downloadEvents">\n <v-icon left> mdi-download </v-icon>\n <v-list-item-title> Download Event List </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n <v-menu bottom right>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn outlined data-test="change-type" width="125">\n <span>{{ typeToLabel[type] }}</span>\n <v-icon right> mdi-menu-down </v-icon>\n </v-btn>\n </div>\n </template>\n <v-list>\n <v-list-item data-test="type-day" @click="updateType(\'day\')">\n <v-list-item-title> Day </v-list-item-title>\n </v-list-item>\n <v-list-item data-test="type-four-day" @click="updateType(\'4day\')">\n <v-list-item-title>4 Days</v-list-item-title>\n </v-list-item>\n <v-list-item data-test="type-week" @click="updateType(\'week\')">\n <v-list-item-title> Week </v-list-item-title>\n </v-list-item>\n </v-list>\n </v-menu>\n </v-toolbar>\n \x3c!--- menus ---\x3e\n <event-list-dialog\n v-if="showEventTableDialog"\n v-model="showEventTableDialog"\n :events="events"\n :utc="utc"\n />\n <metadata-create-dialog\n v-if="showMetadataCreateDialog"\n v-model="showMetadataCreateDialog"\n />\n <note-create-dialog\n v-if="showNoteCreateDialog"\n v-model="showNoteCreateDialog"\n />\n <activity-create-dialog\n v-if="showActivityCreateDialog"\n v-model="showActivityCreateDialog"\n :timelines="timelines"\n />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport { format } from \'date-fns\'\n\nimport EventListDialog from \'@/tools/Calendar/Dialogs/EventListDialog\'\nimport ActivityCreateDialog from \'@/tools/Calendar/Dialogs/ActivityCreateDialog\'\nimport MetadataCreateDialog from \'@/tools/Calendar/Dialogs/MetadataCreateDialog\'\nimport NoteCreateDialog from \'@/tools/Calendar/Dialogs/NoteCreateDialog\'\n\nexport default {\n components: {\n EventListDialog,\n ActivityCreateDialog,\n MetadataCreateDialog,\n NoteCreateDialog,\n },\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n events: {\n type: Array,\n required: true,\n },\n value: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n typeToLabel: {\n week: \'Week\',\n \'4day\': \'4 Days\',\n day: \'Day\',\n },\n showEventTableDialog: false,\n showActivityCreateDialog: false,\n showMetadataCreateDialog: false,\n showNoteCreateDialog: false,\n }\n },\n computed: {\n monthNames: function () {\n return [\n \'January\',\n \'February\',\n \'March\',\n \'April\',\n \'May\',\n \'June\',\n \'July\',\n \'August\',\n \'September\',\n \'October\',\n \'November\',\n \'December\',\n ]\n },\n title: function () {\n const d = this.value.focus ? new Date(this.value.focus) : new Date()\n const month = this.monthNames[d.getUTCMonth()]\n const year = d.getUTCFullYear()\n return `${month} ${year}`\n },\n utc: function () {\n return this.value.utc\n },\n focus: function () {\n return this.value.focus\n },\n type: function () {\n return this.value.type\n },\n calendarConfiguration: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n downloadEvents: function (type) {\n const output = JSON.stringify(this.events, null, 2)\n const blob = new Blob([output], {\n type: \'application/json\',\n })\n // Make a link and then \'click\' on it to start the download\n const link = document.createElement(\'a\')\n link.href = URL.createObjectURL(blob)\n link.setAttribute(\n \'download\',\n format(Date.now(), \'yyyy_MM_dd_HH_mm_ss\') + \'_calendar_events.json\'\n )\n link.click()\n },\n showTable: function () {\n this.showEventTableDialog = !this.showEventTableDialog\n },\n updateTime: function (type) {\n this.calendarConfiguration.utc = !this.calendarConfiguration.utc\n },\n updateType: function (type) {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n type: type,\n }\n this.type = type\n },\n setToday: function () {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n focus: \'\',\n }\n },\n prev() {\n this.$emit(\'action\', { method: \'prev\' })\n },\n next() {\n this.$emit(\'action\', { method: \'next\' })\n },\n refresh() {\n this.$emit(\'action\', { method: \'refresh\' })\n },\n },\n}\n<\/script>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"349420d0503f963cc298ca5f68a0c165350c97fe"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return it=function(){return a},a}it();var ot={components:{EventListDialog:$e,ActivityCreateDialog:je,MetadataCreateDialog:Je,NoteCreateDialog:lt},props:{timelines:{type:Array,required:!0},events:{type:Array,required:!0},value:{type:Object,required:!0}},data:function(){return it().f[0]++,it().s[0]++,{typeToLabel:{week:"Week","4day":"4 Days",day:"Day"},showEventTableDialog:!1,showActivityCreateDialog:!1,showMetadataCreateDialog:!1,showNoteCreateDialog:!1}},computed:{monthNames:function(){return it().f[1]++,it().s[1]++,["January","February","March","April","May","June","July","August","September","October","November","December"]},title:function(){it().f[2]++;var n=(it().s[2]++,this.value.focus?(it().b[0][0]++,new Date(this.value.focus)):(it().b[0][1]++,new Date)),e=(it().s[3]++,this.monthNames[n.getUTCMonth()]),t=(it().s[4]++,n.getUTCFullYear());return it().s[5]++,"".concat(e," ").concat(t)},utc:function(){return it().f[3]++,it().s[6]++,this.value.utc},focus:function(){return it().f[4]++,it().s[7]++,this.value.focus},type:function(){return it().f[5]++,it().s[8]++,this.value.type},calendarConfiguration:{get:function(){return it().f[6]++,it().s[9]++,this.value},set:function(n){it().f[7]++,it().s[10]++,this.$emit("input",n)}}},methods:{downloadEvents:function(n){it().f[8]++;var e=(it().s[11]++,JSON.stringify(this.events,null,2)),t=(it().s[12]++,new Blob([e],{type:"application/json"})),l=(it().s[13]++,document.createElement("a"));it().s[14]++,l.href=URL.createObjectURL(t),it().s[15]++,l.setAttribute("download",(0,V.Z)(Date.now(),"yyyy_MM_dd_HH_mm_ss")+"_calendar_events.json"),it().s[16]++,l.click()},showTable:function(){it().f[9]++,it().s[17]++,this.showEventTableDialog=!this.showEventTableDialog},updateTime:function(n){it().f[10]++,it().s[18]++,this.calendarConfiguration.utc=!this.calendarConfiguration.utc},updateType:function(n){it().f[11]++,it().s[19]++,this.calendarConfiguration=(0,o.Z)((0,o.Z)({},this.calendarConfiguration),{},{type:n}),it().s[20]++,this.type=n},setToday:function(){it().f[12]++,it().s[21]++,this.calendarConfiguration=(0,o.Z)((0,o.Z)({},this.calendarConfiguration),{},{focus:""})},prev:function(){it().f[13]++,it().s[22]++,this.$emit("action",{method:"prev"})},next:function(){it().f[14]++,it().s[23]++,this.$emit("action",{method:"next"})},refresh:function(){it().f[15]++,it().s[24]++,this.$emit("action",{method:"refresh"})}}},at=ot,st=(0,E.Z)(at,De,Se,!1,null,null,null),ct=st.exports,rt=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-toolbar",{attrs:{dense:""}},[t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"create-timeline"},on:{click:function(e){n.showCreateDialog=!0}}},[t("v-icon",[n._v("mdi-calendar-plus")])],1)],1)]}}])},[t("span",[n._v("Create Timeline")])]),t("v-spacer"),t("v-spacer"),t("v-tooltip",{attrs:{top:""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":"view-environment-dialog"},on:{click:function(e){n.showEnvironmentDialog=!0}}},[t("v-icon",[n._v("mdi-library")])],1)],1)]}}])},[t("span",[n._v("Environment Dialog")])])],1),t("v-list",{attrs:{flat:""}},[t("v-subheader",{staticStyle:{height:"25px"}},[n._v("Calendar Events")]),t("v-list-item-group",{attrs:{multiple:""},on:{change:n.select},model:{value:n.selectedChronicles,callback:function(e){n.selectedChronicles=e},expression:"selectedChronicles"}},[t("v-list-item",{attrs:{"data-test":"select-metadata"},scopedSlots:n._u([{key:"default",fn:function(e){var l=e.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":l,color:"white accent-4"}})],1),t("v-list-item-content",[t("v-list-item-title",[n._v("Metadata")])],1)]}}])}),t("v-list-item",{attrs:{"data-test":"select-note"},scopedSlots:n._u([{key:"default",fn:function(e){var l=e.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":l,color:"white accent-4"}})],1),t("v-list-item-content",[t("v-list-item-title",[n._v("Notes")])],1)]}}])})],1),t("v-subheader",{staticStyle:{height:"25px"}},[n._v("Timelines")]),t("v-list-item-group",{attrs:{multiple:""},on:{change:n.select},model:{value:n.selectedTimelines,callback:function(e){n.selectedTimelines=e},expression:"selectedTimelines"}},[n._l(n.timelines,(function(e){return[t("v-list-item",{key:"timeline-"+e.name,attrs:{value:e,"data-test":"select-timeline-"+e.name},scopedSlots:n._u([{key:"default",fn:function(l){var i=l.active;return[t("v-list-item-action",[t("v-checkbox",{attrs:{"input-value":i,color:"white accent-4"}})],1),t("v-list-item-content",[t("v-badge",{attrs:{dot:"",bordered:"",inline:"",tile:"",color:e.color,value:e.messages}},[t("v-list-item-title",{domProps:{textContent:n._s(e.name)}})],1)],1),t("v-list-item-action",[t("selector-options",{attrs:{timeline:e}})],1)]}}],null,!0)})]}))],2)],1),t("environment-dialog",{model:{value:n.showEnvironmentDialog,callback:function(e){n.showEnvironmentDialog=e},expression:"showEnvironmentDialog"}}),t("timeline-create-dialog",{attrs:{timelines:n.timelines},model:{value:n.showCreateDialog,callback:function(e){n.showCreateDialog=e},expression:"showCreateDialog"}})],1)},ut=[],mt=t(5225),dt=(t(3430),function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.addEnvironment.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Environment Variables")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",{staticClass:"mb-2",attrs:{dense:""}},[t("v-text-field",{attrs:{label:"search",type:"text","data-test":"search","prepend-icon":"mdi-magnify","clear-icon":"mdi-close-circle-outline",clearable:"",autofocus:"","single-line":"","hide-details":""},model:{value:n.search,callback:function(e){n.search=e},expression:"search"}})],1),t("v-data-table",{attrs:{"item-key":"name","hide-default-header":"","data-test":"env-table",search:n.search,headers:n.headers,items:n.environment,"items-per-page":5,"footer-props":{"items-per-page-options":[5]}},scopedSlots:n._u([{key:"item.actions",fn:function(e){var l=e.item;return[t("v-btn",{staticClass:"mt-1",attrs:{icon:"","data-test":"item-delete"},on:{click:function(e){return n.deleteEnvironment(l)}}},[t("v-icon",[n._v("mdi-delete")])],1)]}}])}),t("v-row",{attrs:{dense:""}},[t("v-col",[t("v-text-field",{attrs:{label:"Key","data-test":"env-key"},model:{value:n.key,callback:function(e){n.key=e},expression:"key"}})],1),t("v-col",[t("v-text-field",{attrs:{label:"Value","data-test":"env-value"},model:{value:n.keyValue,callback:function(e){n.keyValue=e},expression:"keyValue"}})],1)],1),t("v-row",{attrs:{dense:""}},[t("v-btn",{attrs:{block:"",type:"submit",color:"primary","data-test":"add-env",disabled:!n.key||!n.keyValue},on:{click:function(e){return e.preventDefault(),n.addEnvironment.apply(null,arguments)}}},[n._v(" Add ")])],1)],1)])],1)])],1)}),At=[],vt={props:{value:Boolean},data:function(){return{alert:"",alertType:"success",showAlert:!1,search:"",key:"",keyValue:"",environment:[],headers:[{text:"Key",value:"key"},{text:"Value",value:"value"},{text:"Actions",value:"actions",align:"end",sortable:!1}]}},computed:{show:{get:function(){return this.value},set:function(n){this.$emit("input",n)}}},mounted:function(){this.update()},methods:{alertHandler:function(n){this.alert=n.text,this.alertType=n.type,this.showAlert=!0},update:function(){var n=this;f.get("/cosmos-api/environment").then((function(e){n.environment=e.data})).catch((function(n){}))},addEnvironment:function(){var n=this;f.post("/cosmos-api/environment",{data:{key:this.key.toUpperCase(),value:this.keyValue}}).then((function(e){"New environment variable: ".concat(e.data.name);n.update()})).catch((function(e){var t={text:"Failed to add environment variable: ".concat(e),type:"error"};n.alertHandler(t)})),this.key="",this.keyValue=""},deleteEnvironment:function(n){var e=this;this.$dialog.confirm("Are you sure you want to delete: ".concat(n.key,"=").concat(n.value),{okText:"Delete",cancelText:"Cancel"}).then((function(e){return f["delete"]("/cosmos-api/environment/".concat(n.name))})).then((function(t){var l={text:"Removed environment variable: ".concat(n.name),type:"success"};e.alertHandler(l),e.update()})).catch((function(n){var t={text:"Failed to delete environment: ".concat(n),type:"error"};e.alertHandler(t)}))}}},pt=vt,ht=(0,E.Z)(pt,dt,At,!1,null,null,null),Ct=ht.exports,ft=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-menu",{attrs:{"offset-y":""},scopedSlots:n._u([{key:"activator",fn:function(e){var l=e.on,i=e.attrs;return[t("div",n._g(n._b({},"div",i,!1),l),[t("v-btn",{attrs:{icon:"","data-test":n.name+"-options"}},[t("v-icon",[n._v("mdi-dots-vertical")])],1)],1)]}}])},[t("v-card",[t("div",{staticStyle:{"background-color":"var(--v-primary-darken2)"}},n._l(n.swatches,(function(e,l){return t("v-row",{key:"colors-"+l,staticClass:"p-2",attrs:{dense:""}},n._l(e,(function(e,l){return t("v-col",{key:"color-"+l,attrs:{dense:"",align:"center",justify:"center"}},[t("v-btn",{attrs:{icon:"","data-test":n.name+"-color-"+e},on:{click:function(t){return n.updateColor(e)}}},[t("v-badge",{attrs:{inline:"",color:e}})],1)],1)})),1)})),1),t("v-btn",{attrs:{tile:"","data-test":n.name+"-delete"},on:{click:n.deleteTimeline}},[t("v-icon",{attrs:{left:""}},[n._v(" mdi-delete ")]),t("span",[n._v(" Delete Timeline ")])],1)],1)],1)],1)},yt=[];function bt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/SelectorOptions.vue",e="09b69c57b263394a8abf53e92cce6bb0dd779408",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/SelectorOptions.vue",statementMap:{0:{start:{line:72,column:4},end:{line:72,column:13}},1:{start:{line:76,column:6},end:{line:76,column:52}},2:{start:{line:79,column:6},end:{line:83,column:7}},3:{start:{line:88,column:6},end:{line:102,column:29}},4:{start:{line:94,column:10},end:{line:94,column:64}},5:{start:{line:97,column:10},end:{line:100,column:12}},6:{start:{line:105,column:6},end:{line:112,column:8}},7:{start:{line:108,column:8},end:{line:111,column:10}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:71,column:2},end:{line:71,column:3}},loc:{start:{line:71,column:9},end:{line:73,column:3}},line:71},1:{name:"(anonymous_1)",decl:{start:{line:75,column:10},end:{line:75,column:11}},loc:{start:{line:75,column:22},end:{line:77,column:5}},line:75},2:{name:"(anonymous_2)",decl:{start:{line:78,column:14},end:{line:78,column:15}},loc:{start:{line:78,column:26},end:{line:84,column:5}},line:78},3:{name:"(anonymous_3)",decl:{start:{line:87,column:20},end:{line:87,column:21}},loc:{start:{line:87,column:32},end:{line:103,column:5}},line:87},4:{name:"(anonymous_4)",decl:{start:{line:93,column:14},end:{line:93,column:15}},loc:{start:{line:93,column:26},end:{line:95,column:9}},line:93},5:{name:"(anonymous_5)",decl:{start:{line:96,column:14},end:{line:96,column:15}},loc:{start:{line:96,column:28},end:{line:101,column:9}},line:96},6:{name:"(anonymous_6)",decl:{start:{line:102,column:15},end:{line:102,column:16}},loc:{start:{line:102,column:26},end:{line:102,column:28}},line:102},7:{name:"(anonymous_7)",decl:{start:{line:104,column:17},end:{line:104,column:18}},loc:{start:{line:104,column:34},end:{line:113,column:5}},line:104},8:{name:"(anonymous_8)",decl:{start:{line:107,column:14},end:{line:107,column:15}},loc:{start:{line:107,column:28},end:{line:112,column:7}},line:107}},branchMap:{0:{loc:{start:{line:76,column:13},end:{line:76,column:52}},type:"cond-expr",locations:[{start:{line:76,column:29},end:{line:76,column:47}},{start:{line:76,column:50},end:{line:76,column:52}}],line:76}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0]},inputSourceMap:{version:3,sources:["SelectorOptions.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"SelectorOptions.vue",sourceRoot:"src/tools/Calendar",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-menu offset-y>\n <template v-slot:activator=\"{ on, attrs }\">\n <div v-bind=\"attrs\" v-on=\"on\">\n <v-btn icon :data-test=\"`${name}-options`\">\n <v-icon>mdi-dots-vertical</v-icon>\n </v-btn>\n </div>\n </template>\n <v-card>\n <div style=\"background-color: var(--v-primary-darken2)\">\n <v-row\n dense\n v-for=\"(colors, ii) in swatches\"\n :key=\"`colors-${ii}`\"\n class=\"p-2\"\n >\n <v-col\n dense\n v-for=\"(color, jj) in colors\"\n :key=\"`color-${jj}`\"\n align=\"center\"\n justify=\"center\"\n >\n <v-btn\n icon\n :data-test=\"`${name}-color-${color}`\"\n @click=\"updateColor(color)\"\n >\n <v-badge inline :color=\"color\" />\n </v-btn>\n </v-col>\n </v-row>\n </div>\n <v-btn tile :data-test=\"`${name}-delete`\" @click=\"deleteTimeline\">\n <v-icon left> mdi-delete </v-icon>\n <span> Delete Timeline </span>\n </v-btn>\n </v-card>\n </v-menu>\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\n\nexport default {\n props: {\n timeline: Object,\n },\n data() {\n return {}\n },\n computed: {\n name: function () {\n return this.timeline ? this.timeline.name : ''\n },\n swatches: function () {\n return [\n ['#005a8f', '#003784', '#ff4081', '#df1368'],\n ['#ff5252', '#df323b', '#9f0010', '#2d9437'],\n ['#004700', '#db7200', '#802700', '#0f2941'],\n ]\n },\n },\n methods: {\n deleteTimeline: function () {\n this.$dialog\n .confirm(`Are you sure you want to remove: ${this.name}`, {\n okText: 'Delete',\n cancelText: 'Cancel',\n })\n .then((dialog) => {\n return Api.delete(`/cosmos-api/timeline/${this.name}`)\n })\n .then((response) => {\n this.$notify.normal({\n title: 'Deleted Timeline',\n body: `${this.name} has been deleted.`,\n })\n })\n .catch((error) => {})\n },\n updateColor: function (color) {\n Api.post(`/cosmos-api/timeline/${this.name}/color`, {\n data: { color },\n }).then((response) => {\n this.$notify.normal({\n title: `Color updated on Timeline`,\n body: `Timeline: ${this.name} color update to ${color}`,\n })\n })\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"09b69c57b263394a8abf53e92cce6bb0dd779408"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return bt=function(){return a},a}bt();var gt={props:{timeline:Object},data:function(){return bt().f[0]++,bt().s[0]++,{}},computed:{name:function(){return bt().f[1]++,bt().s[1]++,this.timeline?(bt().b[0][0]++,this.timeline.name):(bt().b[0][1]++,"")},swatches:function(){return bt().f[2]++,bt().s[2]++,[["#005a8f","#003784","#ff4081","#df1368"],["#ff5252","#df323b","#9f0010","#2d9437"],["#004700","#db7200","#802700","#0f2941"]]}},methods:{deleteTimeline:function(){var n=this;bt().f[3]++,bt().s[3]++,this.$dialog.confirm("Are you sure you want to remove: ".concat(this.name),{okText:"Delete",cancelText:"Cancel"}).then((function(e){return bt().f[4]++,bt().s[4]++,f["delete"]("/cosmos-api/timeline/".concat(n.name))})).then((function(e){bt().f[5]++,bt().s[5]++,n.$notify.normal({title:"Deleted Timeline",body:"".concat(n.name," has been deleted.")})})).catch((function(n){bt().f[6]++}))},updateColor:function(n){var e=this;bt().f[7]++,bt().s[6]++,f.post("/cosmos-api/timeline/".concat(this.name,"/color"),{data:{color:n}}).then((function(t){bt().f[8]++,bt().s[7]++,e.$notify.normal({title:"Color updated on Timeline",body:"Timeline: ".concat(e.name," color update to ").concat(n)})}))}}},_t=gt,wt=(0,E.Z)(_t,ft,yt,!1,null,null,null),xt=wt.exports,Tt=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-dialog",{attrs:{persistent:"",width:"600"},model:{value:n.show,callback:function(e){n.show=e},expression:"show"}},[t("v-card",[t("form",{on:{submit:function(e){return e.preventDefault(),n.submit.apply(null,arguments)}}},[t("v-system-bar",[t("v-spacer"),t("span",[n._v("Create Timeline")]),t("v-spacer")],1),t("v-card-text",[t("div",{staticClass:"pa-3"},[t("v-row",[n._v(" Add a timeline to schedule activities on. ")]),t("v-row",[t("v-text-field",{attrs:{autofocus:"",type:"text",label:"Timeline Name","data-test":"input-timeline-name",rules:[n.rules.required]},model:{value:n.timelineName,callback:function(e){n.timelineName=e},expression:"timelineName"}})],1),t("v-row",{staticClass:"my-3"},[t("span",{directives:[{name:"show",rawName:"v-show",value:n.error,expression:"error"}],staticClass:"red--text",domProps:{textContent:n._s(n.error)}})]),t("v-row",[t("v-spacer"),t("v-btn",{staticClass:"mx-2",attrs:{outlined:"","data-test":"create-timeline-cancel-btn"},on:{click:n.clear}},[n._v(" Cancel ")]),t("v-btn",{staticClass:"mx-2",attrs:{type:"submit",color:"primary","data-test":"create-timeline-submit-btn",disabled:!!n.error},on:{click:function(e){return e.preventDefault(),n.submit.apply(null,arguments)}}},[n._v(" Ok ")])],1)],1)])],1)])],1)},kt=[];function Et(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/TimelineCreateDialog.vue",e="7612ae17ddf261ad31a8dafc96271c4b9ec06d36",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Dialogs/TimelineCreateDialog.vue",statementMap:{0:{start:{line:85,column:4},end:{line:90,column:5}},1:{start:{line:87,column:29},end:{line:87,column:50}},2:{start:{line:94,column:6},end:{line:96,column:7}},3:{start:{line:95,column:8},end:{line:95,column:48}},4:{start:{line:97,column:18},end:{line:99,column:7}},5:{start:{line:98,column:22},end:{line:98,column:56}},6:{start:{line:100,column:6},end:{line:102,column:7}},7:{start:{line:101,column:8},end:{line:101,column:93}},8:{start:{line:103,column:6},end:{line:103,column:17}},9:{start:{line:107,column:8},end:{line:107,column:25}},10:{start:{line:110,column:8},end:{line:110,column:34}},11:{start:{line:116,column:6},end:{line:116,column:28}},12:{start:{line:117,column:6},end:{line:117,column:28}},13:{start:{line:120,column:6},end:{line:129,column:8}},14:{start:{line:125,column:8},end:{line:128,column:10}},15:{start:{line:130,column:6},end:{line:130,column:18}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:84,column:2},end:{line:84,column:3}},loc:{start:{line:84,column:9},end:{line:91,column:3}},line:84},1:{name:"(anonymous_1)",decl:{start:{line:87,column:18},end:{line:87,column:19}},loc:{start:{line:87,column:29},end:{line:87,column:50}},line:87},2:{name:"(anonymous_2)",decl:{start:{line:93,column:11},end:{line:93,column:12}},loc:{start:{line:93,column:23},end:{line:104,column:5}},line:93},3:{name:"(anonymous_3)",decl:{start:{line:98,column:8},end:{line:98,column:9}},loc:{start:{line:98,column:22},end:{line:98,column:56}},line:98},4:{name:"(anonymous_4)",decl:{start:{line:106,column:6},end:{line:106,column:7}},loc:{start:{line:106,column:12},end:{line:108,column:7}},line:106},5:{name:"(anonymous_5)",decl:{start:{line:109,column:6},end:{line:109,column:7}},loc:{start:{line:109,column:17},end:{line:111,column:7}},line:109},6:{name:"(anonymous_6)",decl:{start:{line:115,column:11},end:{line:115,column:12}},loc:{start:{line:115,column:23},end:{line:118,column:5}},line:115},7:{name:"(anonymous_7)",decl:{start:{line:119,column:12},end:{line:119,column:13}},loc:{start:{line:119,column:24},end:{line:131,column:5}},line:119},8:{name:"(anonymous_8)",decl:{start:{line:124,column:14},end:{line:124,column:15}},loc:{start:{line:124,column:28},end:{line:129,column:7}},line:124}},branchMap:{0:{loc:{start:{line:87,column:29},end:{line:87,column:50}},type:"binary-expr",locations:[{start:{line:87,column:29},end:{line:87,column:36}},{start:{line:87,column:40},end:{line:87,column:50}}],line:87},1:{loc:{start:{line:94,column:6},end:{line:96,column:7}},type:"if",locations:[{start:{line:94,column:6},end:{line:96,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:94},2:{loc:{start:{line:100,column:6},end:{line:102,column:7}},type:"if",locations:[{start:{line:100,column:6},end:{line:102,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:100}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,sources:["TimelineCreateDialog.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"TimelineCreateDialog.vue",sourceRoot:"src/tools/Calendar/Dialogs",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <v-dialog persistent v-model="show" width="600">\n <v-card>\n <form v-on:submit.prevent="submit">\n <v-system-bar>\n <v-spacer />\n <span>Create Timeline</span>\n <v-spacer />\n </v-system-bar>\n <v-card-text>\n <div class="pa-3">\n <v-row> Add a timeline to schedule activities on. </v-row>\n <v-row>\n <v-text-field\n v-model="timelineName"\n autofocus\n type="text"\n label="Timeline Name"\n data-test="input-timeline-name"\n :rules="[rules.required]"\n />\n </v-row>\n <v-row class="my-3">\n <span class="red--text" v-show="error" v-text="error" />\n </v-row>\n <v-row>\n <v-spacer />\n <v-btn\n @click="clear"\n outlined\n class="mx-2"\n data-test="create-timeline-cancel-btn"\n >\n Cancel\n </v-btn>\n <v-btn\n @click.prevent="submit"\n class="mx-2"\n type="submit"\n color="primary"\n data-test="create-timeline-submit-btn"\n :disabled="!!error"\n >\n Ok\n </v-btn>\n </v-row>\n </div>\n </v-card-text>\n </form>\n </v-card>\n </v-dialog>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\n\nexport default {\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n value: Boolean, // value is the default prop when using v-model\n },\n data() {\n return {\n rules: {\n required: (value) => !!value || \'Required\',\n },\n timelineName: \'\',\n }\n },\n computed: {\n error: function () {\n if (this.timelineName === \'\') {\n return \'Timeline name can not be blank.\'\n }\n const dup = this.timelines.find(\n (timeline) => timeline.name == this.timelineName\n )\n if (dup) {\n return `Timeline must have a unique name. Duplicate timeline name found, ${dup.name}`\n }\n return null\n },\n show: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n clear: function () {\n this.show = !this.show\n this.timelineName = \'\'\n },\n submit: function () {\n Api.post(\'/cosmos-api/timeline\', {\n data: {\n name: this.timelineName,\n },\n }).then((response) => {\n this.$notify.normal({\n title: \'Created new Timeline\',\n body: `Ready to schedule activities on: ${response.data.name}`,\n })\n })\n this.clear()\n },\n },\n}\n<\/script>\n\n<style scoped>\n.theme--dark .v-card__title,\n.theme--dark .v-card__subtitle {\n background-color: var(--v-secondary-darken3);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"7612ae17ddf261ad31a8dafc96271c4b9ec06d36"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Et=function(){return a},a}Et();var Dt={props:{timelines:{type:Array,required:!0},value:Boolean},data:function(){return Et().f[0]++,Et().s[0]++,{rules:{required:function(n){return Et().f[1]++,Et().s[1]++,Et().b[0][0]++,!!n||(Et().b[0][1]++,"Required")}},timelineName:""}},computed:{error:function(){var n=this;if(Et().f[2]++,Et().s[2]++,""===this.timelineName)return Et().b[1][0]++,Et().s[3]++,"Timeline name can not be blank.";Et().b[1][1]++;var e=(Et().s[4]++,this.timelines.find((function(e){return Et().f[3]++,Et().s[5]++,e.name==n.timelineName})));return Et().s[6]++,e?(Et().b[2][0]++,Et().s[7]++,"Timeline must have a unique name. Duplicate timeline name found, ".concat(e.name)):(Et().b[2][1]++,Et().s[8]++,null)},show:{get:function(){return Et().f[4]++,Et().s[9]++,this.value},set:function(n){Et().f[5]++,Et().s[10]++,this.$emit("input",n)}}},methods:{clear:function(){Et().f[6]++,Et().s[11]++,this.show=!this.show,Et().s[12]++,this.timelineName=""},submit:function(){var n=this;Et().f[7]++,Et().s[13]++,f.post("/cosmos-api/timeline",{data:{name:this.timelineName}}).then((function(e){Et().f[8]++,Et().s[14]++,n.$notify.normal({title:"Created new Timeline",body:"Ready to schedule activities on: ".concat(e.data.name)})})),Et().s[15]++,this.clear()}}},St=Dt,Mt=(t(4117),(0,E.Z)(St,Tt,kt,!1,null,"301c3b8d",null)),Ft=Mt.exports;function Nt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarSelector.vue",e="981e83bcfbc0b3c928a9d1a877168da25a79e0fc",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/CalendarSelector.vue",statementMap:{0:{start:{line:146,column:4},end:{line:151,column:5}},1:{start:{line:154,column:4},end:{line:154,column:17}},2:{start:{line:158,column:6},end:{line:158,column:75}},3:{start:{line:158,column:49},end:{line:158,column:73}},4:{start:{line:162,column:8},end:{line:162,column:25}},5:{start:{line:165,column:8},end:{line:165,column:34}},6:{start:{line:171,column:14},end:{line:174,column:8}},7:{start:{line:172,column:8},end:{line:172,column:29}},8:{start:{line:173,column:8},end:{line:173,column:30}},9:{start:{line:175,column:6},end:{line:177,column:7}},10:{start:{line:176,column:8},end:{line:176,column:68}},11:{start:{line:178,column:6},end:{line:180,column:7}},12:{start:{line:179,column:8},end:{line:179,column:64}},13:{start:{line:181,column:6},end:{line:181,column:32}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:145,column:2},end:{line:145,column:3}},loc:{start:{line:145,column:9},end:{line:152,column:3}},line:145},1:{name:"(anonymous_1)",decl:{start:{line:153,column:11},end:{line:153,column:12}},loc:{start:{line:153,column:23},end:{line:155,column:3}},line:153},2:{name:"(anonymous_2)",decl:{start:{line:157,column:21},end:{line:157,column:22}},loc:{start:{line:157,column:33},end:{line:159,column:5}},line:157},3:{name:"(anonymous_3)",decl:{start:{line:158,column:38},end:{line:158,column:39}},loc:{start:{line:158,column:49},end:{line:158,column:73}},line:158},4:{name:"(anonymous_4)",decl:{start:{line:161,column:6},end:{line:161,column:7}},loc:{start:{line:161,column:12},end:{line:163,column:7}},line:161},5:{name:"(anonymous_5)",decl:{start:{line:164,column:6},end:{line:164,column:7}},loc:{start:{line:164,column:17},end:{line:166,column:7}},line:164},6:{name:"(anonymous_6)",decl:{start:{line:170,column:12},end:{line:170,column:13}},loc:{start:{line:170,column:24},end:{line:182,column:5}},line:170},7:{name:"(anonymous_7)",decl:{start:{line:171,column:41},end:{line:171,column:42}},loc:{start:{line:171,column:55},end:{line:174,column:7}},line:171}},branchMap:{0:{loc:{start:{line:158,column:49},end:{line:158,column:73}},type:"cond-expr",locations:[{start:{line:158,column:67},end:{line:158,column:68}},{start:{line:158,column:71},end:{line:158,column:73}}],line:158},1:{loc:{start:{line:175,column:6},end:{line:177,column:7}},type:"if",locations:[{start:{line:175,column:6},end:{line:177,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:175},2:{loc:{start:{line:178,column:6},end:{line:180,column:7}},type:"if",locations:[{start:{line:178,column:6},end:{line:180,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:178}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0},b:{0:[0,0],1:[0,0],2:[0,0]},inputSourceMap:{version:3,sources:["CalendarSelector.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"CalendarSelector.vue",sourceRoot:"src/tools/Calendar",sourcesContent:['\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-toolbar dense>\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn\n icon\n data-test="create-timeline"\n @click="showCreateDialog = true"\n >\n <v-icon>mdi-calendar-plus</v-icon>\n </v-btn>\n </div>\n </template>\n <span>Create Timeline</span>\n </v-tooltip>\n <v-spacer />\n \x3c!--- <v-toolbar-title> Timelines </v-toolbar-title> ---\x3e\n <v-spacer />\n <v-tooltip top>\n <template v-slot:activator="{ on, attrs }">\n <div v-bind="attrs" v-on="on">\n <v-btn\n icon\n data-test="view-environment-dialog"\n @click="showEnvironmentDialog = true"\n >\n <v-icon>mdi-library</v-icon>\n </v-btn>\n </div>\n </template>\n <span>Environment Dialog</span>\n </v-tooltip>\n </v-toolbar>\n \x3c!--- SHOW TIMELINES ---\x3e\n <v-list flat>\n <v-subheader style="height: 25px">Calendar Events</v-subheader>\n <v-list-item-group multiple v-model="selectedChronicles" @change="select">\n <v-list-item data-test="select-metadata">\n <template v-slot:default="{ active }">\n <v-list-item-action>\n <v-checkbox :input-value="active" color="white accent-4" />\n </v-list-item-action>\n\n <v-list-item-content>\n <v-list-item-title>Metadata</v-list-item-title>\n </v-list-item-content>\n </template>\n </v-list-item>\n <v-list-item data-test="select-note">\n <template v-slot:default="{ active }">\n <v-list-item-action>\n <v-checkbox :input-value="active" color="white accent-4" />\n </v-list-item-action>\n\n <v-list-item-content>\n <v-list-item-title>Notes</v-list-item-title>\n </v-list-item-content>\n </template>\n </v-list-item>\n </v-list-item-group>\n \x3c!--- TIMELINES ---\x3e\n <v-subheader style="height: 25px">Timelines</v-subheader>\n <v-list-item-group multiple v-model="selectedTimelines" @change="select">\n <template v-for="timeline in timelines">\n <v-list-item\n :key="`timeline-${timeline.name}`"\n :value="timeline"\n :data-test="`select-timeline-${timeline.name}`"\n >\n <template v-slot:default="{ active }">\n <v-list-item-action>\n <v-checkbox :input-value="active" color="white accent-4" />\n </v-list-item-action>\n\n <v-list-item-content>\n <v-badge\n dot\n bordered\n inline\n tile\n :color="timeline.color"\n :value="timeline.messages"\n >\n <v-list-item-title v-text="timeline.name" />\n </v-badge>\n </v-list-item-content>\n\n <v-list-item-action>\n <selector-options :timeline="timeline" />\n </v-list-item-action>\n </template>\n </v-list-item>\n </template>\n </v-list-item-group>\n </v-list>\n \x3c!--- MENUS ---\x3e\n <environment-dialog v-model="showEnvironmentDialog" />\n <timeline-create-dialog v-model="showCreateDialog" :timelines="timelines" />\n </div>\n</template>\n\n<script>\nimport Api from \'@cosmosc2/tool-common/src/services/api\'\nimport EnvironmentDialog from \'@cosmosc2/tool-common/src/components/EnvironmentDialog\'\nimport SelectorOptions from \'@/tools/Calendar/SelectorOptions\'\nimport TimelineCreateDialog from \'@/tools/Calendar/Dialogs/TimelineCreateDialog\'\n\nexport default {\n components: {\n SelectorOptions,\n TimelineCreateDialog,\n EnvironmentDialog,\n },\n props: {\n timelines: {\n type: Array,\n required: true,\n },\n value: {\n type: Array,\n required: true,\n },\n },\n data() {\n return {\n selectedTimelines: [],\n selectedChronicles: [0, 1],\n showCreateDialog: false,\n showEnvironmentDialog: false,\n }\n },\n mounted: function () {\n this.select()\n },\n computed: {\n sortedTimelines: function () {\n return [...this.timelines].sort((a, b) => (a.name > b.name ? 1 : -1))\n },\n selectedCalendars: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit(\'input\', value) // input is the default event when using v-model\n },\n },\n },\n methods: {\n select: function () {\n let t = this.selectedTimelines.map((timeline) => {\n timeline.messages = 0\n return { ...timeline }\n })\n if (this.selectedChronicles.indexOf(0) > -1) {\n t.push({ type: \'chronicle\', name: \'metadata\', messages: 0 })\n }\n if (this.selectedChronicles.indexOf(1) > -1) {\n t.push({ type: \'chronicle\', name: \'note\', messages: 0 })\n }\n this.selectedCalendars = t\n },\n },\n}\n<\/script>\n\n<style scoped>\n.selected-title {\n background-color: var(--v-secondary-base);\n}\n.available-title {\n background-color: var(--v-primary-darken2);\n}\n</style>\n']},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"981e83bcfbc0b3c928a9d1a877168da25a79e0fc"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Nt=function(){return a},a}Nt();var It={components:{SelectorOptions:xt,TimelineCreateDialog:Ft,EnvironmentDialog:Ct},props:{timelines:{type:Array,required:!0},value:{type:Array,required:!0}},data:function(){return Nt().f[0]++,Nt().s[0]++,{selectedTimelines:[],selectedChronicles:[0,1],showCreateDialog:!1,showEnvironmentDialog:!1}},mounted:function(){Nt().f[1]++,Nt().s[1]++,this.select()},computed:{sortedTimelines:function(){return Nt().f[2]++,Nt().s[2]++,(0,mt.Z)(this.timelines).sort((function(n,e){return Nt().f[3]++,Nt().s[3]++,n.name>e.name?(Nt().b[0][0]++,1):(Nt().b[0][1]++,-1)}))},selectedCalendars:{get:function(){return Nt().f[4]++,Nt().s[4]++,this.value},set:function(n){Nt().f[5]++,Nt().s[5]++,this.$emit("input",n)}}},methods:{select:function(){Nt().f[6]++;var n=(Nt().s[6]++,this.selectedTimelines.map((function(n){return Nt().f[7]++,Nt().s[7]++,n.messages=0,Nt().s[8]++,(0,o.Z)({},n)})));Nt().s[9]++,this.selectedChronicles.indexOf(0)>-1?(Nt().b[1][0]++,Nt().s[10]++,n.push({type:"chronicle",name:"metadata",messages:0})):Nt().b[1][1]++,Nt().s[11]++,this.selectedChronicles.indexOf(1)>-1?(Nt().b[2][0]++,Nt().s[12]++,n.push({type:"chronicle",name:"note",messages:0})):Nt().b[2][1]++,Nt().s[13]++,this.selectedCalendars=n}}},Ot=It,Rt=(t(7196),(0,E.Z)(Ot,rt,ut,!1,null,"e2bbd5c0",null)),$t=Rt.exports,Ut=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("v-row",{staticClass:"px-2 pb-2",attrs:{dense:""}},[t("v-toolbar-title",{domProps:{textContent:n._s(n.title)}}),t("v-spacer"),t("v-btn",{attrs:{small:"",icon:"","data-test":"mini-prev"},on:{click:n.prev}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-left ")])],1),t("v-btn",{attrs:{small:"",icon:"","data-test":"mini-next"},on:{click:n.next}},[t("v-icon",{attrs:{small:""}},[n._v(" mdi-chevron-right ")])],1)],1),t("v-calendar",{ref:"sideCalendar",attrs:{"show-month-on-first":!1},on:{"click:date":n.viewDay},model:{value:n.focus,callback:function(e){n.focus=e},expression:"focus"}})],1)},Lt=[];function Pt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/MiniCalendar.vue",e="eb030252e66a2b0529c489aa7820e14d3408fcc0",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/MiniCalendar.vue",statementMap:{0:{start:{line:51,column:4},end:{line:54,column:5}},1:{start:{line:57,column:4},end:{line:57,column:41}},2:{start:{line:58,column:4},end:{line:58,column:46}},3:{start:{line:63,column:8},end:{line:63,column:25}},4:{start:{line:66,column:8},end:{line:66,column:34}},5:{start:{line:70,column:6},end:{line:83,column:7}},6:{start:{line:88,column:16},end:{line:88,column:36}},7:{start:{line:89,column:20},end:{line:89,column:52}},8:{start:{line:90,column:19},end:{line:90,column:37}},9:{start:{line:91,column:6},end:{line:91,column:37}},10:{start:{line:96,column:6},end:{line:99,column:7}},11:{start:{line:102,column:6},end:{line:102,column:36}},12:{start:{line:105,column:6},end:{line:105,column:36}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:50,column:2},end:{line:50,column:3}},loc:{start:{line:50,column:9},end:{line:55,column:3}},line:50},1:{name:"(anonymous_1)",decl:{start:{line:56,column:2},end:{line:56,column:3}},loc:{start:{line:56,column:12},end:{line:59,column:3}},line:56},2:{name:"(anonymous_2)",decl:{start:{line:62,column:6},end:{line:62,column:7}},loc:{start:{line:62,column:12},end:{line:64,column:7}},line:62},3:{name:"(anonymous_3)",decl:{start:{line:65,column:6},end:{line:65,column:7}},loc:{start:{line:65,column:17},end:{line:67,column:7}},line:65},4:{name:"(anonymous_4)",decl:{start:{line:69,column:16},end:{line:69,column:17}},loc:{start:{line:69,column:28},end:{line:84,column:5}},line:69},5:{name:"(anonymous_5)",decl:{start:{line:87,column:11},end:{line:87,column:12}},loc:{start:{line:87,column:23},end:{line:92,column:5}},line:87},6:{name:"(anonymous_6)",decl:{start:{line:95,column:13},end:{line:95,column:14}},loc:{start:{line:95,column:33},end:{line:100,column:5}},line:95},7:{name:"(anonymous_7)",decl:{start:{line:101,column:10},end:{line:101,column:11}},loc:{start:{line:101,column:22},end:{line:103,column:5}},line:101},8:{name:"(anonymous_8)",decl:{start:{line:104,column:10},end:{line:104,column:11}},loc:{start:{line:104,column:22},end:{line:106,column:5}},line:104}},branchMap:{},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0},b:{},inputSourceMap:{version:3,sources:["MiniCalendar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"MiniCalendar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <v-row dense class=\"px-2 pb-2\">\n <v-toolbar-title v-text=\"title\" />\n <v-spacer />\n <v-btn small icon data-test=\"mini-prev\" @click=\"prev\">\n <v-icon small> mdi-chevron-left </v-icon>\n </v-btn>\n <v-btn small icon data-test=\"mini-next\" @click=\"next\">\n <v-icon small> mdi-chevron-right </v-icon>\n </v-btn>\n </v-row>\n <v-calendar\n ref=\"sideCalendar\"\n v-model=\"focus\"\n :show-month-on-first=\"false\"\n @click:date=\"viewDay\"\n />\n </div>\n</template>\n\n<script>\nexport default {\n components: {},\n props: {\n value: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n focus: '',\n title: '',\n }\n },\n mounted() {\n this.$refs.sideCalendar.checkChange()\n this.title = this.$refs.sideCalendar.title\n },\n computed: {\n calendarConfiguration: {\n get() {\n return this.value\n },\n set(value) {\n this.$emit('input', value) // input is the default event when using v-model\n },\n },\n monthNames: function () {\n return [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ]\n },\n },\n watch: {\n focus: function () {\n const d = new Date(this.focus)\n const month = this.monthNames[d.getUTCMonth()]\n const year = d.getUTCFullYear()\n this.title = `${month} ${year}`\n },\n },\n methods: {\n viewDay: function ({ date }) {\n this.calendarConfiguration = {\n ...this.calendarConfiguration,\n focus: date,\n }\n },\n prev: function () {\n this.$refs.sideCalendar.prev()\n },\n next: function () {\n this.$refs.sideCalendar.next()\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"eb030252e66a2b0529c489aa7820e14d3408fcc0"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Pt=function(){return a},a}Pt();var qt={components:{},props:{value:{type:Object,required:!0}},data:function(){return Pt().f[0]++,Pt().s[0]++,{focus:"",title:""}},mounted:function(){Pt().f[1]++,Pt().s[1]++,this.$refs.sideCalendar.checkChange(),Pt().s[2]++,this.title=this.$refs.sideCalendar.title},computed:{calendarConfiguration:{get:function(){return Pt().f[2]++,Pt().s[3]++,this.value},set:function(n){Pt().f[3]++,Pt().s[4]++,this.$emit("input",n)}},monthNames:function(){return Pt().f[4]++,Pt().s[5]++,["January","February","March","April","May","June","July","August","September","October","November","December"]}},watch:{focus:function(){Pt().f[5]++;var n=(Pt().s[6]++,new Date(this.focus)),e=(Pt().s[7]++,this.monthNames[n.getUTCMonth()]),t=(Pt().s[8]++,n.getUTCFullYear());Pt().s[9]++,this.title="".concat(e," ").concat(t)}},methods:{viewDay:function(n){var e=n.date;Pt().f[6]++,Pt().s[10]++,this.calendarConfiguration=(0,o.Z)((0,o.Z)({},this.calendarConfiguration),{},{focus:e})},prev:function(){Pt().f[7]++,Pt().s[11]++,this.$refs.sideCalendar.prev()},next:function(){Pt().f[8]++,Pt().s[12]++,this.$refs.sideCalendar.next()}}},Ht=qt,Zt=(0,E.Z)(Ht,Ut,Lt,!1,null,null,null),jt=Zt.exports;function Gt(){var n="/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Calendar.vue",e="bb47e06f746a9693d22c40f199b168e8f4e75ad3",t=new Function("return this")(),l="__coverage__",i={path:"/cosmos/plugins/packages/cosmosc2-tool-calendar/src/tools/Calendar/Calendar.vue",statementMap:{0:{start:{line:78,column:4},end:{line:93,column:5}},1:{start:{line:97,column:6},end:{line:115,column:7}},2:{start:{line:122,column:8},end:{line:122,column:31}},3:{start:{line:128,column:8},end:{line:128,column:36}},4:{start:{line:134,column:8},end:{line:134,column:36}},5:{start:{line:139,column:4},end:{line:139,column:20}},6:{start:{line:140,column:4},end:{line:140,column:23}},7:{start:{line:141,column:4},end:{line:141,column:25}},8:{start:{line:142,column:4},end:{line:142,column:22}},9:{start:{line:145,column:4},end:{line:147,column:6}},10:{start:{line:146,column:6},end:{line:146,column:32}},11:{start:{line:148,column:4},end:{line:148,column:27}},12:{start:{line:153,column:6},end:{line:159,column:7}},13:{start:{line:154,column:8},end:{line:154,column:39}},14:{start:{line:155,column:13},end:{line:159,column:7}},15:{start:{line:156,column:8},end:{line:156,column:39}},16:{start:{line:157,column:13},end:{line:159,column:7}},17:{start:{line:158,column:8},end:{line:158,column:22}},18:{start:{line:162,column:29},end:{line:165,column:7}},19:{start:{line:166,column:30},end:{line:169,column:7}},20:{start:{line:170,column:6},end:{line:170,column:66}},21:{start:{line:173,column:6},end:{line:173,column:29}},22:{start:{line:174,column:6},end:{line:174,column:27}},23:{start:{line:175,column:6},end:{line:175,column:24}},24:{start:{line:178,column:6},end:{line:185,column:8}},25:{start:{line:179,column:33},end:{line:179,column:46}},26:{start:{line:180,column:8},end:{line:183,column:10}},27:{start:{line:181,column:10},end:{line:181,column:31}},28:{start:{line:182,column:10},end:{line:182,column:36}},29:{start:{line:184,column:8},end:{line:184,column:41}},30:{start:{line:192,column:29},end:{line:194,column:7}},31:{start:{line:193,column:22},end:{line:193,column:64}},32:{start:{line:195,column:6},end:{line:197,column:7}},33:{start:{line:196,column:8},end:{line:196,column:45}},34:{start:{line:198,column:6},end:{line:200,column:7}},35:{start:{line:199,column:8},end:{line:199,column:48}},36:{start:{line:202,column:6},end:{line:211,column:7}},37:{start:{line:203,column:30},end:{line:205,column:9}},38:{start:{line:204,column:24},end:{line:204,column:46}},39:{start:{line:206,column:8},end:{line:206,column:60}},40:{start:{line:208,column:8},end:{line:210,column:9}},41:{start:{line:209,column:24},end:{line:209,column:52}},42:{start:{line:212,column:6},end:{line:222,column:7}},43:{start:{line:213,column:8},end:{line:213,column:29}},44:{start:{line:214,column:8},end:{line:221,column:9}},45:{start:{line:215,column:10},end:{line:220,column:11}},46:{start:{line:217,column:14},end:{line:217,column:60}},47:{start:{line:218,column:14},end:{line:218,column:54}},48:{start:{line:229,column:6},end:{line:234,column:8}},49:{start:{line:230,column:8},end:{line:233,column:9}},50:{start:{line:241,column:6},end:{line:246,column:8}},51:{start:{line:242,column:8},end:{line:245,column:9}},52:{start:{line:249,column:6},end:{line:257,column:8}},53:{start:{line:250,column:8},end:{line:256,column:12}},54:{start:{line:252,column:32},end:{line:252,column:51}},55:{start:{line:255,column:12},end:{line:255,column:49}},56:{start:{line:260,column:21},end:{line:260,column:37}},57:{start:{line:261,column:6},end:{line:264,column:8}},58:{start:{line:262,column:8},end:{line:262,column:43}},59:{start:{line:263,column:8},end:{line:263,column:65}},60:{start:{line:267,column:6},end:{line:267,column:43}},61:{start:{line:270,column:6},end:{line:270,column:29}},62:{start:{line:271,column:6},end:{line:271,column:34}},63:{start:{line:272,column:6},end:{line:272,column:37}},64:{start:{line:273,column:6},end:{line:273,column:42}},65:{start:{line:276,column:28},end:{line:278,column:7}},66:{start:{line:277,column:22},end:{line:277,column:54}},67:{start:{line:279,column:6},end:{line:279,column:48}},68:{start:{line:280,column:6},end:{line:280,column:45}},69:{start:{line:281,column:6},end:{line:281,column:46}},70:{start:{line:284,column:28},end:{line:286,column:7}},71:{start:{line:285,column:22},end:{line:285,column:54}},72:{start:{line:287,column:6},end:{line:287,column:70}},73:{start:{line:288,column:27},end:{line:290,column:7}},74:{start:{line:289,column:22},end:{line:289,column:54}},75:{start:{line:291,column:6},end:{line:291,column:76}},76:{start:{line:294,column:6},end:{line:294,column:52}},77:{start:{line:295,column:6},end:{line:298,column:7}},78:{start:{line:296,column:8},end:{line:296,column:56}},79:{start:{line:297,column:8},end:{line:297,column:48}},80:{start:{line:301,column:6},end:{line:301,column:52}},81:{start:{line:302,column:6},end:{line:308,column:7}},82:{start:{line:303,column:30},end:{line:305,column:9}},83:{start:{line:304,column:24},end:{line:304,column:59}},84:{start:{line:306,column:8},end:{line:306,column:67}},85:{start:{line:307,column:8},end:{line:307,column:48}},86:{start:{line:311,column:6},end:{line:311,column:41}},87:{start:{line:312,column:6},end:{line:312,column:52}},88:{start:{line:313,column:6},end:{line:319,column:7}},89:{start:{line:314,column:30},end:{line:316,column:9}},90:{start:{line:315,column:24},end:{line:315,column:54}},91:{start:{line:317,column:8},end:{line:317,column:67}},92:{start:{line:318,column:8},end:{line:318,column:48}},93:{start:{line:322,column:6},end:{line:322,column:52}},94:{start:{line:323,column:6},end:{line:332,column:7}},95:{start:{line:324,column:30},end:{line:326,column:9}},96:{start:{line:325,column:24},end:{line:325,column:59}},97:{start:{line:327,column:8},end:{line:330,column:9}},98:{start:{line:331,column:8},end:{line:331,column:48}},99:{start:{line:335,column:6},end:{line:338,column:7}},100:{start:{line:336,column:8},end:{line:337,column:21}},101:{start:{line:336,column:42},end:{line:336,column:72}},102:{start:{line:341,column:28},end:{line:341,column:43}},103:{start:{line:342,column:6},end:{line:342,column:53}},104:{start:{line:343,column:6},end:{line:343,column:46}},105:{start:{line:346,column:6},end:{line:346,column:41}},106:{start:{line:347,column:28},end:{line:347,column:43}},107:{start:{line:348,column:29},end:{line:350,column:7}},108:{start:{line:349,column:27},end:{line:349,column:62}},109:{start:{line:351,column:6},end:{line:351,column:65}},110:{start:{line:352,column:6},end:{line:352,column:46}},111:{start:{line:355,column:28},end:{line:355,column:43}},112:{start:{line:356,column:29},end:{line:358,column:7}},113:{start:{line:357,column:27},end:{line:357,column:67}},114:{start:{line:359,column:6},end:{line:362,column:7}},115:{start:{line:363,column:6},end:{line:363,column:46}}},fnMap:{0:{name:"(anonymous_0)",decl:{start:{line:77,column:2},end:{line:77,column:3}},loc:{start:{line:77,column:9},end:{line:94,column:3}},line:77},1:{name:"(anonymous_1)",decl:{start:{line:96,column:27},end:{line:96,column:28}},loc:{start:{line:96,column:39},end:{line:116,column:5}},line:96},2:{name:"(anonymous_2)",decl:{start:{line:121,column:15},end:{line:121,column:16}},loc:{start:{line:121,column:27},end:{line:123,column:7}},line:121},3:{name:"(anonymous_3)",decl:{start:{line:127,column:15},end:{line:127,column:16}},loc:{start:{line:127,column:27},end:{line:129,column:7}},line:127},4:{name:"(anonymous_4)",decl:{start:{line:133,column:15},end:{line:133,column:16}},loc:{start:{line:133,column:27},end:{line:135,column:7}},line:133},5:{name:"(anonymous_5)",decl:{start:{line:138,column:11},end:{line:138,column:12}},loc:{start:{line:138,column:23},end:{line:143,column:3}},line:138},6:{name:"(anonymous_6)",decl:{start:{line:144,column:13},end:{line:144,column:14}},loc:{start:{line:144,column:25},end:{line:149,column:3}},line:144},7:{name:"(anonymous_7)",decl:{start:{line:145,column:31},end:{line:145,column:32}},loc:{start:{line:145,column:49},end:{line:147,column:5}},line:145},8:{name:"(anonymous_8)",decl:{start:{line:151,column:19},end:{line:151,column:20}},loc:{start:{line:151,column:36},end:{line:160,column:5}},line:151},9:{name:"(anonymous_9)",decl:{start:{line:161,column:27},end:{line:161,column:28}},loc:{start:{line:161,column:39},end:{line:171,column:5}},line:161},10:{name:"(anonymous_10)",decl:{start:{line:172,column:13},end:{line:172,column:14}},loc:{start:{line:172,column:25},end:{line:176,column:5}},line:172},11:{name:"(anonymous_11)",decl:{start:{line:177,column:18},end:{line:177,column:19}},loc:{start:{line:177,column:30},end:{line:186,column:5}},line:177},12:{name:"(anonymous_12)",decl:{start:{line:178,column:43},end:{line:178,column:44}},loc:{start:{line:178,column:57},end:{line:185,column:7}},line:178},13:{name:"(anonymous_13)",decl:{start:{line:180,column:33},end:{line:180,column:34}},loc:{start:{line:180,column:47},end:{line:183,column:9}},line:180},14:{name:"(anonymous_14)",decl:{start:{line:187,column:22},end:{line:187,column:23}},loc:{start:{line:187,column:45},end:{line:223,column:5}},line:187},15:{name:"(anonymous_15)",decl:{start:{line:193,column:8},end:{line:193,column:9}},loc:{start:{line:193,column:22},end:{line:193,column:64}},line:193},16:{name:"(anonymous_16)",decl:{start:{line:204,column:10},end:{line:204,column:11}},loc:{start:{line:204,column:24},end:{line:204,column:46}},line:204},17:{name:"(anonymous_17)",decl:{start:{line:209,column:10},end:{line:209,column:11}},loc:{start:{line:209,column:24},end:{line:209,column:52}},line:209},18:{name:"(anonymous_18)",decl:{start:{line:216,column:12},end:{line:216,column:13}},loc:{start:{line:216,column:26},end:{line:219,column:13}},line:216},19:{name:"(anonymous_19)",decl:{start:{line:224,column:20},end:{line:224,column:21}},loc:{start:{line:224,column:32},end:{line:235,column:5}},line:224},20:{name:"(anonymous_20)",decl:{start:{line:229,column:43},end:{line:229,column:44}},loc:{start:{line:229,column:57},end:{line:234,column:7}},line:229},21:{name:"(anonymous_21)",decl:{start:{line:236,column:17},end:{line:236,column:18}},loc:{start:{line:236,column:29},end:{line:247,column:5}},line:236},22:{name:"(anonymous_22)",decl:{start:{line:241,column:40},end:{line:241,column:41}},loc:{start:{line:241,column:54},end:{line:246,column:7}},line:241},23:{name:"(anonymous_23)",decl:{start:{line:248,column:15},end:{line:248,column:16}},loc:{start:{line:248,column:27},end:{line:258,column:5}},line:248},24:{name:"(anonymous_24)",decl:{start:{line:249,column:28},end:{line:249,column:29}},loc:{start:{line:249,column:41},end:{line:257,column:7}},line:249},25:{name:"(anonymous_25)",decl:{start:{line:252,column:22},end:{line:252,column:23}},loc:{start:{line:252,column:32},end:{line:252,column:51}},line:252},26:{name:"(anonymous_26)",decl:{start:{line:254,column:16},end:{line:254,column:17}},loc:{start:{line:254,column:34},end:{line:256,column:11}},line:254},27:{name:"(anonymous_27)",decl:{start:{line:259,column:14},end:{line:259,column:15}},loc:{start:{line:259,column:30},end:{line:265,column:5}},line:259},28:{name:"(anonymous_28)",decl:{start:{line:261,column:21},end:{line:261,column:22}},loc:{start:{line:261,column:32},end:{line:264,column:7}},line:261},29:{name:"(anonymous_29)",decl:{start:{line:266,column:30},end:{line:266,column:31}},loc:{start:{line:266,column:47},end:{line:268,column:5}},line:266},30:{name:"(anonymous_30)",decl:{start:{line:269,column:30},end:{line:269,column:31}},loc:{start:{line:269,column:47},end:{line:274,column:5}},line:269},31:{name:"(anonymous_31)",decl:{start:{line:275,column:30},end:{line:275,column:31}},loc:{start:{line:275,column:47},end:{line:282,column:5}},line:275},32:{name:"(anonymous_32)",decl:{start:{line:277,column:8},end:{line:277,column:9}},loc:{start:{line:277,column:22},end:{line:277,column:54}},line:277},33:{name:"(anonymous_33)",decl:{start:{line:283,column:30},end:{line:283,column:31}},loc:{start:{line:283,column:47},end:{line:292,column:5}},line:283},34:{name:"(anonymous_34)",decl:{start:{line:285,column:8},end:{line:285,column:9}},loc:{start:{line:285,column:22},end:{line:285,column:54}},line:285},35:{name:"(anonymous_35)",decl:{start:{line:289,column:8},end:{line:289,column:9}},loc:{start:{line:289,column:22},end:{line:289,column:54}},line:289},36:{name:"(anonymous_36)",decl:{start:{line:293,column:30},end:{line:293,column:31}},loc:{start:{line:293,column:47},end:{line:299,column:5}},line:293},37:{name:"(anonymous_37)",decl:{start:{line:300,column:28},end:{line:300,column:29}},loc:{start:{line:300,column:45},end:{line:309,column:5}},line:300},38:{name:"(anonymous_38)",decl:{start:{line:304,column:10},end:{line:304,column:11}},loc:{start:{line:304,column:24},end:{line:304,column:59}},line:304},39:{name:"(anonymous_39)",decl:{start:{line:310,column:30},end:{line:310,column:31}},loc:{start:{line:310,column:47},end:{line:320,column:5}},line:310},40:{name:"(anonymous_40)",decl:{start:{line:315,column:10},end:{line:315,column:11}},loc:{start:{line:315,column:24},end:{line:315,column:54}},line:315},41:{name:"(anonymous_41)",decl:{start:{line:321,column:30},end:{line:321,column:31}},loc:{start:{line:321,column:47},end:{line:333,column:5}},line:321},42:{name:"(anonymous_42)",decl:{start:{line:325,column:10},end:{line:325,column:11}},loc:{start:{line:325,column:24},end:{line:325,column:59}},line:325},43:{name:"(anonymous_43)",decl:{start:{line:334,column:31},end:{line:334,column:32}},loc:{start:{line:334,column:55},end:{line:339,column:5}},line:334},44:{name:"(anonymous_44)",decl:{start:{line:336,column:28},end:{line:336,column:29}},loc:{start:{line:336,column:42},end:{line:336,column:72}},line:336},45:{name:"(anonymous_45)",decl:{start:{line:340,column:31},end:{line:340,column:32}},loc:{start:{line:340,column:48},end:{line:344,column:5}},line:340},46:{name:"(anonymous_46)",decl:{start:{line:345,column:31},end:{line:345,column:32}},loc:{start:{line:345,column:48},end:{line:353,column:5}},line:345},47:{name:"(anonymous_47)",decl:{start:{line:349,column:8},end:{line:349,column:9}},loc:{start:{line:349,column:27},end:{line:349,column:62}},line:349},48:{name:"(anonymous_48)",decl:{start:{line:354,column:31},end:{line:354,column:32}},loc:{start:{line:354,column:48},end:{line:364,column:5}},line:354},49:{name:"(anonymous_49)",decl:{start:{line:357,column:8},end:{line:357,column:9}},loc:{start:{line:357,column:27},end:{line:357,column:67}},line:357}},branchMap:{0:{loc:{start:{line:153,column:6},end:{line:159,column:7}},type:"if",locations:[{start:{line:153,column:6},end:{line:159,column:7}},{start:{line:155,column:13},end:{line:159,column:7}}],line:153},1:{loc:{start:{line:155,column:13},end:{line:159,column:7}},type:"if",locations:[{start:{line:155,column:13},end:{line:159,column:7}},{start:{line:157,column:13},end:{line:159,column:7}}],line:155},2:{loc:{start:{line:157,column:13},end:{line:159,column:7}},type:"if",locations:[{start:{line:157,column:13},end:{line:159,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:157},3:{loc:{start:{line:187,column:32},end:{line:187,column:43}},type:"default-arg",locations:[{start:{line:187,column:39},end:{line:187,column:43}}],line:187},4:{loc:{start:{line:198,column:6},end:{line:200,column:7}},type:"if",locations:[{start:{line:198,column:6},end:{line:200,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:198},5:{loc:{start:{line:202,column:6},end:{line:211,column:7}},type:"if",locations:[{start:{line:202,column:6},end:{line:211,column:7}},{start:{line:207,column:13},end:{line:211,column:7}}],line:202},6:{loc:{start:{line:206,column:28},end:{line:206,column:60}},type:"binary-expr",locations:[{start:{line:206,column:28},end:{line:206,column:41}},{start:{line:206,column:45},end:{line:206,column:60}}],line:206},7:{loc:{start:{line:214,column:8},end:{line:221,column:9}},type:"if",locations:[{start:{line:214,column:8},end:{line:221,column:9}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:214},8:{loc:{start:{line:214,column:12},end:{line:214,column:51}},type:"binary-expr",locations:[{start:{line:214,column:12},end:{line:214,column:16}},{start:{line:214,column:20},end:{line:214,column:51}}],line:214},9:{loc:{start:{line:287,column:43},end:{line:287,column:69}},type:"cond-expr",locations:[{start:{line:287,column:64},end:{line:287,column:65}},{start:{line:287,column:68},end:{line:287,column:69}}],line:287},10:{loc:{start:{line:291,column:50},end:{line:291,column:75}},type:"cond-expr",locations:[{start:{line:291,column:70},end:{line:291,column:71}},{start:{line:291,column:74},end:{line:291,column:75}}],line:291},11:{loc:{start:{line:295,column:6},end:{line:298,column:7}},type:"if",locations:[{start:{line:295,column:6},end:{line:298,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:295},12:{loc:{start:{line:302,column:6},end:{line:308,column:7}},type:"if",locations:[{start:{line:302,column:6},end:{line:308,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:302},13:{loc:{start:{line:313,column:6},end:{line:319,column:7}},type:"if",locations:[{start:{line:313,column:6},end:{line:319,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:313},14:{loc:{start:{line:323,column:6},end:{line:332,column:7}},type:"if",locations:[{start:{line:323,column:6},end:{line:332,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:323},15:{loc:{start:{line:329,column:10},end:{line:329,column:36}},type:"cond-expr",locations:[{start:{line:329,column:31},end:{line:329,column:32}},{start:{line:329,column:35},end:{line:329,column:36}}],line:329},16:{loc:{start:{line:335,column:6},end:{line:338,column:7}},type:"if",locations:[{start:{line:335,column:6},end:{line:338,column:7}},{start:{line:void 0,column:void 0},end:{line:void 0,column:void 0}}],line:335},17:{loc:{start:{line:361,column:8},end:{line:361,column:35}},type:"cond-expr",locations:[{start:{line:361,column:30},end:{line:361,column:31}},{start:{line:361,column:34},end:{line:361,column:35}}],line:361}},s:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0,50:0,51:0,52:0,53:0,54:0,55:0,56:0,57:0,58:0,59:0,60:0,61:0,62:0,63:0,64:0,65:0,66:0,67:0,68:0,69:0,70:0,71:0,72:0,73:0,74:0,75:0,76:0,77:0,78:0,79:0,80:0,81:0,82:0,83:0,84:0,85:0,86:0,87:0,88:0,89:0,90:0,91:0,92:0,93:0,94:0,95:0,96:0,97:0,98:0,99:0,100:0,101:0,102:0,103:0,104:0,105:0,106:0,107:0,108:0,109:0,110:0,111:0,112:0,113:0,114:0,115:0},f:{0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29:0,30:0,31:0,32:0,33:0,34:0,35:0,36:0,37:0,38:0,39:0,40:0,41:0,42:0,43:0,44:0,45:0,46:0,47:0,48:0,49:0},b:{0:[0,0],1:[0,0],2:[0,0],3:[0],4:[0,0],5:[0,0],6:[0,0],7:[0,0],8:[0,0],9:[0,0],10:[0,0],11:[0,0],12:[0,0],13:[0,0],14:[0,0],15:[0,0],16:[0,0],17:[0,0]},inputSourceMap:{version:3,sources:["Calendar.vue"],names:[],mappings:";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA",file:"Calendar.vue",sourceRoot:"src/tools/Calendar",sourcesContent:["\x3c!--\n# Copyright 2022 Ball Aerospace & Technologies Corp.\n# All Rights Reserved.\n#\n# This program is free software; you can modify and/or redistribute it\n# under the terms of the GNU Affero General Public License\n# as published by the Free Software Foundation; version 3 with\n# attribution addendums as found in the LICENSE.txt\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU Affero General Public License for more details.\n#\n# This program may also be used under the terms of a commercial or\n# enterprise edition license of COSMOS if purchased from the\n# copyright holder\n--\x3e\n\n<template>\n <div>\n <top-bar :title=\"title\" />\n <v-container dense>\n <v-row>\n <v-col class=\"pa-1\">\n <calendar-toolbar\n v-model=\"calendarConfiguration\"\n :timelines=\"timelines\"\n :events=\"calendarEvents\"\n @action=\"actionHandler\"\n />\n </v-col>\n </v-row>\n <v-row>\n <v-col style=\"max-width: 300px\">\n <mini-calendar v-model=\"calendarConfiguration\" />\n <v-divider class=\"my-1\" />\n <calendar-selector\n v-model=\"selectedCalendars\"\n :timelines=\"timelines\"\n />\n </v-col>\n <v-col class=\"pa-1\">\n <event-calendar\n v-model=\"calendarConfiguration\"\n ref=\"eventCalendar\"\n :events=\"calendarEvents\"\n />\n </v-col>\n </v-row>\n </v-container>\n </div>\n</template>\n\n<script>\nimport Api from '@cosmosc2/tool-common/src/services/api'\nimport Cable from '@cosmosc2/tool-common/src/services/cable.js'\nimport TopBar from '@cosmosc2/tool-common/src/components/TopBar'\n\nimport EventCalendar from '@/tools/Calendar/EventCalendar'\nimport CalendarToolbar from '@/tools/Calendar/CalendarToolbar'\nimport CalendarSelector from '@/tools/Calendar/CalendarSelector'\nimport MiniCalendar from '@/tools/Calendar/MiniCalendar'\nimport TimelineMethods from '@/tools/Calendar/Filters/timeFilters.js'\nimport { getTimelineEvents } from '@/tools/Calendar/Filters/timelineFilters.js'\nimport { getChronicleEvents } from '@/tools/Calendar/Filters/chronicleFilters.js'\n\nexport default {\n components: {\n EventCalendar,\n CalendarToolbar,\n CalendarSelector,\n MiniCalendar,\n TopBar,\n },\n mixins: [TimelineMethods],\n data() {\n return {\n title: 'Calendar',\n timelines: [],\n selectedCalendars: [],\n activities: {},\n calendarEvents: [],\n chronicles: { metadata: [], note: [] },\n calendarConfiguration: {\n utc: false,\n focus: '',\n type: '4day',\n },\n channels: ['TimelineEventsChannel', 'CalendarEventsChannel'],\n cable: new Cable(),\n subscriptions: [],\n }\n },\n computed: {\n eventHandlerFunctions: function () {\n return {\n timeline: {\n created: this.createdTimelineFromEvent,\n refresh: this.refreshTimelineFromEvent,\n updated: this.updatedTimelineFromEvent,\n deleted: this.deletedTimelineFromEvent,\n },\n activity: {\n event: this.eventActivityFromEvent,\n created: this.createdActivityFromEvent,\n updated: this.updatedActivityFromEvent,\n deleted: this.deletedActivityFromEvent,\n },\n calendar: {\n created: this.createdChronicleFromEvent,\n updated: this.updatedChronicleFromEvent,\n deleted: this.deletedChronicleFromEvent,\n },\n }\n },\n },\n watch: {\n selectedCalendars: {\n immediate: true,\n handler: function () {\n this.updateActivities()\n },\n },\n chronicles: {\n immediate: true,\n handler: function () {\n this.rebuildCalendarEvents()\n },\n },\n activities: {\n immediate: true,\n handler: function () {\n this.rebuildCalendarEvents()\n },\n },\n },\n created: function () {\n this.subscribe()\n this.getTimelines()\n this.updateMetadata()\n this.updateNotes()\n },\n destroyed: function () {\n this.subscriptions.forEach((subscription) => {\n subscription.unsubscribe()\n })\n this.cable.disconnect()\n },\n methods: {\n actionHandler: function (event) {\n // console.log('actionHandler', event)\n if (event.method === 'next') {\n this.$refs.eventCalendar.next()\n } else if (event.method === 'prev') {\n this.$refs.eventCalendar.prev()\n } else if (event.method === 'refresh') {\n this.refresh()\n }\n },\n rebuildCalendarEvents: function () {\n const timelineEvents = getTimelineEvents(\n this.selectedCalendars,\n this.activities\n )\n const chronicleEvents = getChronicleEvents(\n this.selectedCalendars,\n this.chronicles\n )\n this.calendarEvents = timelineEvents.concat(chronicleEvents)\n },\n refresh: function () {\n this.updateActivities()\n this.updateMetadata()\n this.updateNotes()\n },\n getTimelines: function () {\n Api.get('/cosmos-api/timeline').then((response) => {\n const timelineResponse = response.data\n timelineResponse.forEach((timeline) => {\n timeline.messages = 0\n timeline.type = 'timeline'\n })\n this.timelines = timelineResponse\n })\n },\n updateActivities: function (name = null) {\n // this.activities = {\n // \"timelineName\": [activity1, activity2, etc],\n // \"anotherTimeline\": etc\n // }\n const noLongerNeeded = Object.keys(this.activities).filter(\n (timeline) => !this.selectedCalendars.includes(timeline)\n )\n for (const timeline of noLongerNeeded) {\n delete this.activities[timeline.name]\n }\n if (noLongerNeeded) {\n this.activities = { ...this.activities } // New object reference to force reactivity\n }\n let timelinesToUpdate\n if (name) {\n const inputTimeline = this.timelines.find(\n (timeline) => timeline.name === name\n )\n timelinesToUpdate = inputTimeline && [inputTimeline]\n } else {\n timelinesToUpdate = this.selectedCalendars.filter(\n (calendar) => calendar.type === 'timeline'\n )\n }\n for (const timeline of timelinesToUpdate) {\n timeline.messages = 0\n if (name || !this.activities[timeline.name]) {\n Api.get(`/cosmos-api/timeline/${timeline.name}/activities`).then(\n (response) => {\n this.activities[timeline.name] = response.data\n this.activities = { ...this.activities } // New object reference to force reactivity\n }\n )\n }\n }\n },\n updateMetadata: function () {\n // this.chronicles = {\n // \"metadata\": [event1, event2, etc],\n // \"note\": etc\n // }\n Api.get(`/cosmos-api/metadata`).then((response) => {\n this.chronicles = {\n ...this.chronicles,\n metadata: response.data,\n }\n })\n },\n updateNotes: function () {\n // this.chronicles = {\n // \"note\": [event1, event2, etc],\n // \"metadata\": etc\n // }\n Api.get(`/cosmos-api/notes`).then((response) => {\n this.chronicles = {\n ...this.chronicles,\n note: response.data,\n }\n })\n },\n subscribe: function () {\n this.channels.forEach((channel) => {\n this.cable\n .createSubscription(channel, localStorage.scope, {\n received: (data) => this.received(data),\n })\n .then((subscription) => {\n this.subscriptions.push(subscription)\n })\n })\n },\n received: function (data) {\n const parsed = JSON.parse(data)\n parsed.forEach((event) => {\n event.data = JSON.parse(event.data)\n this.eventHandlerFunctions[event.type][event.kind](event)\n })\n },\n refreshTimelineFromEvent: function (event) {\n this.updateActivities(event.timeline)\n },\n createdTimelineFromEvent: function (event) {\n event.data.messages = 0\n event.data.type = 'timeline'\n this.timelines.push(event.data)\n this.activities[event.timeline] = []\n },\n updatedTimelineFromEvent: function (event) {\n const timelineIndex = this.timelines.findIndex(\n (timeline) => timeline.name === event.timeline\n )\n this.timelines[timelineIndex] = event.data\n this.timelines = this.timelines.slice()\n this.activities = { ...this.activities }\n },\n deletedTimelineFromEvent: function (event) {\n const timelineIndex = this.timelines.findIndex(\n (timeline) => timeline.name === event.timeline\n )\n this.timelines.splice(timelineIndex, timelineIndex >= 0 ? 1 : 0)\n const checkedIndex = this.selectedCalendars.findIndex(\n (timeline) => timeline.name === event.timeline\n )\n this.selectedCalendars.splice(checkedIndex, checkedIndex >= 0 ? 1 : 0)\n },\n createdActivityFromEvent: function (event) {\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n this.activities[event.timeline].push(event.data)\n this.activities = { ...this.activities }\n }\n },\n eventActivityFromEvent: function (event) {\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n const activityIndex = this.activities[event.timeline].findIndex(\n (activity) => activity.start === event.data.start\n )\n this.activities[event.timeline][activityIndex] = event.data\n this.activities = { ...this.activities }\n }\n },\n updatedActivityFromEvent: function (event) {\n event.extra = parseInt(event.extra)\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n const activityIndex = this.activities[event.timeline].findIndex(\n (activity) => activity.start === event.extra\n )\n this.activities[event.timeline][activityIndex] = event.data\n this.activities = { ...this.activities }\n }\n },\n deletedActivityFromEvent: function (event) {\n this.incrementTimelineMessages(event.timeline)\n if (this.activities.hasOwnProperty(event.timeline)) {\n const activityIndex = this.activities[event.timeline].findIndex(\n (activity) => activity.start === event.data.start\n )\n this.activities[event.timeline].splice(\n activityIndex,\n activityIndex >= 0 ? 1 : 0\n )\n this.activities = { ...this.activities }\n }\n },\n incrementTimelineMessages: function (timelineName) {\n if (!this.selectedCalendars.includes(timelineName)) {\n this.timelines.find((timeline) => timeline.name === timelineName)\n .messages++\n }\n },\n createdChronicleFromEvent: function (event) {\n const chronicleType = event.data.type\n this.chronicles[chronicleType].push(event.data)\n this.chronicles = { ...this.chronicles }\n },\n updatedChronicleFromEvent: function (event) {\n event.extra = parseInt(event.extra)\n const chronicleType = event.data.type\n const chronicleIndex = this.chronicles[chronicleType].findIndex(\n (calendarEvent) => calendarEvent.start === event.extra\n )\n this.chronicles[chronicleType][chronicleIndex] = event.data\n this.chronicles = { ...this.chronicles }\n },\n deletedChronicleFromEvent: function (event) {\n const chronicleType = event.data.type\n const chronicleIndex = this.chronicles[chronicleType].findIndex(\n (calendarEvent) => calendarEvent.start === event.data.start\n )\n this.chronicles[chronicleType].splice(\n chronicleIndex,\n chronicleIndex >= 0 ? 1 : 0\n )\n this.chronicles = { ...this.chronicles }\n },\n },\n}\n<\/script>\n"]},_coverageSchema:"1a1c01bbd47fc00a2c39e90264f33305004495a9",hash:"bb47e06f746a9693d22c40f199b168e8f4e75ad3"},o=t[l]||(t[l]={});o[n]&&o[n].hash===e||(o[n]=i);var a=o[n];return Gt=function(){return a},a}Gt();var Bt={components:{EventCalendar:Ee,CalendarToolbar:ct,CalendarSelector:$t,MiniCalendar:jt,TopBar:S},mixins:[U],data:function(){return Gt().f[0]++,Gt().s[0]++,{title:"Calendar",timelines:[],selectedCalendars:[],activities:{},calendarEvents:[],chronicles:{metadata:[],note:[]},calendarConfiguration:{utc:!1,focus:"",type:"4day"},channels:["TimelineEventsChannel","CalendarEventsChannel"],cable:new _,subscriptions:[]}},computed:{eventHandlerFunctions:function(){return Gt().f[1]++,Gt().s[1]++,{timeline:{created:this.createdTimelineFromEvent,refresh:this.refreshTimelineFromEvent,updated:this.updatedTimelineFromEvent,deleted:this.deletedTimelineFromEvent},activity:{event:this.eventActivityFromEvent,created:this.createdActivityFromEvent,updated:this.updatedActivityFromEvent,deleted:this.deletedActivityFromEvent},calendar:{created:this.createdChronicleFromEvent,updated:this.updatedChronicleFromEvent,deleted:this.deletedChronicleFromEvent}}}},watch:{selectedCalendars:{immediate:!0,handler:function(){Gt().f[2]++,Gt().s[2]++,this.updateActivities()}},chronicles:{immediate:!0,handler:function(){Gt().f[3]++,Gt().s[3]++,this.rebuildCalendarEvents()}},activities:{immediate:!0,handler:function(){Gt().f[4]++,Gt().s[4]++,this.rebuildCalendarEvents()}}},created:function(){Gt().f[5]++,Gt().s[5]++,this.subscribe(),Gt().s[6]++,this.getTimelines(),Gt().s[7]++,this.updateMetadata(),Gt().s[8]++,this.updateNotes()},destroyed:function(){Gt().f[6]++,Gt().s[9]++,this.subscriptions.forEach((function(n){Gt().f[7]++,Gt().s[10]++,n.unsubscribe()})),Gt().s[11]++,this.cable.disconnect()},methods:{actionHandler:function(n){Gt().f[8]++,Gt().s[12]++,"next"===n.method?(Gt().b[0][0]++,Gt().s[13]++,this.$refs.eventCalendar.next()):(Gt().b[0][1]++,Gt().s[14]++,"prev"===n.method?(Gt().b[1][0]++,Gt().s[15]++,this.$refs.eventCalendar.prev()):(Gt().b[1][1]++,Gt().s[16]++,"refresh"===n.method?(Gt().b[2][0]++,Gt().s[17]++,this.refresh()):Gt().b[2][1]++))},rebuildCalendarEvents:function(){Gt().f[9]++;var n=(Gt().s[18]++,Ce(this.selectedCalendars,this.activities)),e=(Gt().s[19]++,_e(this.selectedCalendars,this.chronicles));Gt().s[20]++,this.calendarEvents=n.concat(e)},refresh:function(){Gt().f[10]++,Gt().s[21]++,this.updateActivities(),Gt().s[22]++,this.updateMetadata(),Gt().s[23]++,this.updateNotes()},getTimelines:function(){var n=this;Gt().f[11]++,Gt().s[24]++,f.get("/cosmos-api/timeline").then((function(e){Gt().f[12]++;var t=(Gt().s[25]++,e.data);Gt().s[26]++,t.forEach((function(n){Gt().f[13]++,Gt().s[27]++,n.messages=0,Gt().s[28]++,n.type="timeline"})),Gt().s[29]++,n.timelines=t}))},updateActivities:function(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(Gt().b[3][0]++,null);Gt().f[14]++;var t=(Gt().s[30]++,Object.keys(this.activities).filter((function(e){return Gt().f[15]++,Gt().s[31]++,!n.selectedCalendars.includes(e)})));Gt().s[32]++;var l,i,s=(0,a.Z)(t);try{for(s.s();!(l=s.n()).done;){var c=l.value;Gt().s[33]++,delete this.activities[c.name]}}catch(A){s.e(A)}finally{s.f()}if(Gt().s[34]++,t?(Gt().b[4][0]++,Gt().s[35]++,this.activities=(0,o.Z)({},this.activities)):Gt().b[4][1]++,Gt().s[36]++,e){Gt().b[5][0]++;var r=(Gt().s[37]++,this.timelines.find((function(n){return Gt().f[16]++,Gt().s[38]++,n.name===e})));Gt().s[39]++,Gt().b[6][0]++,i=r&&(Gt().b[6][1]++,[r])}else Gt().b[5][1]++,Gt().s[40]++,i=this.selectedCalendars.filter((function(n){return Gt().f[17]++,Gt().s[41]++,"timeline"===n.type}));Gt().s[42]++;var u,m=(0,a.Z)(i);try{var d=function(){var t=u.value;Gt().s[43]++,t.messages=0,Gt().s[44]++,Gt().b[8][0]++,e||(Gt().b[8][1]++,!n.activities[t.name])?(Gt().b[7][0]++,Gt().s[45]++,f.get("/cosmos-api/timeline/".concat(t.name,"/activities")).then((function(e){Gt().f[18]++,Gt().s[46]++,n.activities[t.name]=e.data,Gt().s[47]++,n.activities=(0,o.Z)({},n.activities)}))):Gt().b[7][1]++};for(m.s();!(u=m.n()).done;)d()}catch(A){m.e(A)}finally{m.f()}},updateMetadata:function(){var n=this;Gt().f[19]++,Gt().s[48]++,f.get("/cosmos-api/metadata").then((function(e){Gt().f[20]++,Gt().s[49]++,n.chronicles=(0,o.Z)((0,o.Z)({},n.chronicles),{},{metadata:e.data})}))},updateNotes:function(){var n=this;Gt().f[21]++,Gt().s[50]++,f.get("/cosmos-api/notes").then((function(e){Gt().f[22]++,Gt().s[51]++,n.chronicles=(0,o.Z)((0,o.Z)({},n.chronicles),{},{note:e.data})}))},subscribe:function(){var n=this;Gt().f[23]++,Gt().s[52]++,this.channels.forEach((function(e){Gt().f[24]++,Gt().s[53]++,n.cable.createSubscription(e,localStorage.scope,{received:function(e){return Gt().f[25]++,Gt().s[54]++,n.received(e)}}).then((function(e){Gt().f[26]++,Gt().s[55]++,n.subscriptions.push(e)}))}))},received:function(n){var e=this;Gt().f[27]++;var t=(Gt().s[56]++,JSON.parse(n));Gt().s[57]++,t.forEach((function(n){Gt().f[28]++,Gt().s[58]++,n.data=JSON.parse(n.data),Gt().s[59]++,e.eventHandlerFunctions[n.type][n.kind](n)}))},refreshTimelineFromEvent:function(n){Gt().f[29]++,Gt().s[60]++,this.updateActivities(n.timeline)},createdTimelineFromEvent:function(n){Gt().f[30]++,Gt().s[61]++,n.data.messages=0,Gt().s[62]++,n.data.type="timeline",Gt().s[63]++,this.timelines.push(n.data),Gt().s[64]++,this.activities[n.timeline]=[]},updatedTimelineFromEvent:function(n){Gt().f[31]++;var e=(Gt().s[65]++,this.timelines.findIndex((function(e){return Gt().f[32]++,Gt().s[66]++,e.name===n.timeline})));Gt().s[67]++,this.timelines[e]=n.data,Gt().s[68]++,this.timelines=this.timelines.slice(),Gt().s[69]++,this.activities=(0,o.Z)({},this.activities)},deletedTimelineFromEvent:function(n){Gt().f[33]++;var e=(Gt().s[70]++,this.timelines.findIndex((function(e){return Gt().f[34]++,Gt().s[71]++,e.name===n.timeline})));Gt().s[72]++,this.timelines.splice(e,e>=0?(Gt().b[9][0]++,1):(Gt().b[9][1]++,0));var t=(Gt().s[73]++,this.selectedCalendars.findIndex((function(e){return Gt().f[35]++,Gt().s[74]++,e.name===n.timeline})));Gt().s[75]++,this.selectedCalendars.splice(t,t>=0?(Gt().b[10][0]++,1):(Gt().b[10][1]++,0))},createdActivityFromEvent:function(n){Gt().f[36]++,Gt().s[76]++,this.incrementTimelineMessages(n.timeline),Gt().s[77]++,this.activities.hasOwnProperty(n.timeline)?(Gt().b[11][0]++,Gt().s[78]++,this.activities[n.timeline].push(n.data),Gt().s[79]++,this.activities=(0,o.Z)({},this.activities)):Gt().b[11][1]++},eventActivityFromEvent:function(n){if(Gt().f[37]++,Gt().s[80]++,this.incrementTimelineMessages(n.timeline),Gt().s[81]++,this.activities.hasOwnProperty(n.timeline)){Gt().b[12][0]++;var e=(Gt().s[82]++,this.activities[n.timeline].findIndex((function(e){return Gt().f[38]++,Gt().s[83]++,e.start===n.data.start})));Gt().s[84]++,this.activities[n.timeline][e]=n.data,Gt().s[85]++,this.activities=(0,o.Z)({},this.activities)}else Gt().b[12][1]++},updatedActivityFromEvent:function(n){if(Gt().f[39]++,Gt().s[86]++,n.extra=parseInt(n.extra),Gt().s[87]++,this.incrementTimelineMessages(n.timeline),Gt().s[88]++,this.activities.hasOwnProperty(n.timeline)){Gt().b[13][0]++;var e=(Gt().s[89]++,this.activities[n.timeline].findIndex((function(e){return Gt().f[40]++,Gt().s[90]++,e.start===n.extra})));Gt().s[91]++,this.activities[n.timeline][e]=n.data,Gt().s[92]++,this.activities=(0,o.Z)({},this.activities)}else Gt().b[13][1]++},deletedActivityFromEvent:function(n){if(Gt().f[41]++,Gt().s[93]++,this.incrementTimelineMessages(n.timeline),Gt().s[94]++,this.activities.hasOwnProperty(n.timeline)){Gt().b[14][0]++;var e=(Gt().s[95]++,this.activities[n.timeline].findIndex((function(e){return Gt().f[42]++,Gt().s[96]++,e.start===n.data.start})));Gt().s[97]++,this.activities[n.timeline].splice(e,e>=0?(Gt().b[15][0]++,1):(Gt().b[15][1]++,0)),Gt().s[98]++,this.activities=(0,o.Z)({},this.activities)}else Gt().b[14][1]++},incrementTimelineMessages:function(n){Gt().f[43]++,Gt().s[99]++,this.selectedCalendars.includes(n)?Gt().b[16][1]++:(Gt().b[16][0]++,Gt().s[100]++,this.timelines.find((function(e){return Gt().f[44]++,Gt().s[101]++,e.name===n})).messages++)},createdChronicleFromEvent:function(n){Gt().f[45]++;var e=(Gt().s[102]++,n.data.type);Gt().s[103]++,this.chronicles[e].push(n.data),Gt().s[104]++,this.chronicles=(0,o.Z)({},this.chronicles)},updatedChronicleFromEvent:function(n){Gt().f[46]++,Gt().s[105]++,n.extra=parseInt(n.extra);var e=(Gt().s[106]++,n.data.type),t=(Gt().s[107]++,this.chronicles[e].findIndex((function(e){return Gt().f[47]++,Gt().s[108]++,e.start===n.extra})));Gt().s[109]++,this.chronicles[e][t]=n.data,Gt().s[110]++,this.chronicles=(0,o.Z)({},this.chronicles)},deletedChronicleFromEvent:function(n){Gt().f[48]++;var e=(Gt().s[111]++,n.data.type),t=(Gt().s[112]++,this.chronicles[e].findIndex((function(e){return Gt().f[49]++,Gt().s[113]++,e.start===n.data.start})));Gt().s[114]++,this.chronicles[e].splice(t,t>=0?(Gt().b[17][0]++,1):(Gt().b[17][1]++,0)),Gt().s[115]++,this.chronicles=(0,o.Z)({},this.chronicles)}}},Yt=Bt,Vt=(0,E.Z)(Yt,l,i,!1,null,null,null),Wt=Vt.exports},2949:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".selected-title[data-v-e2bbd5c0]{background-color:var(--v-secondary-base)}.available-title[data-v-e2bbd5c0]{background-color:var(--v-primary-darken2)}",""]),e["default"]=s},8861:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-82c43f5e]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},5419:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-6c8065d7]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},3222:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-1c3fc848]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},513:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-b9464e3c]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},562:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-49b4c1c5]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},241:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-stepper--vertical .v-stepper__content[data-v-246a5924]{width:auto;margin:0 0 0 36px;padding:0}",""]),e["default"]=s},7273:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".theme--dark .v-card__subtitle[data-v-301c3b8d],.theme--dark .v-card__title[data-v-301c3b8d]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},9878:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".theme--dark .v-card__subtitle[data-v-e57e7e4c],.theme--dark .v-card__title[data-v-e57e7e4c]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},3739:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".theme--dark .v-card__subtitle[data-v-49e08040],.theme--dark .v-card__title[data-v-49e08040]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},5340:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".theme--dark .v-card__subtitle[data-v-751ff4c1],.theme--dark .v-card__title[data-v-751ff4c1]{background-color:var(--v-secondary-darken3)}",""]),e["default"]=s},3938:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,".v-list[data-v-e3bb7458] .v-label{margin-left:5px}.v-list-item__icon[data-v-e3bb7458]{margin-right:15px!important}.v-list-item__title[data-v-e3bb7458]{color:#fff}",""]),e["default"]=s},4421:function(n,e,t){"use strict";t.r(e);var l=t(3467),i=t.n(l),o=t(8715),a=t.n(o),s=a()(i());s.push([n.id,'.theme--dark .v-card__subtitle[data-v-8cfd7c66],.theme--dark .v-card__title[data-v-8cfd7c66]{background-color:var(--v-secondary-darken3)}.v-current-time[data-v-8cfd7c66]{height:2px;background-color:#ea4335;position:absolute;left:-1px;right:0;pointer-events:none}.v-current-time.first[data-v-8cfd7c66]:before{content:"";position:absolute;background-color:#ea4335;width:12px;height:12px;border-radius:50%;margin-top:-5px;margin-left:-6.5px}',""]),e["default"]=s},7196:function(n,e,t){var l=t(2949);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("5bc14780",l,!0,{sourceMap:!1,shadowMode:!1})},7896:function(n,e,t){var l=t(8861);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("795b9230",l,!0,{sourceMap:!1,shadowMode:!1})},2084:function(n,e,t){var l=t(5419);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("567f0371",l,!0,{sourceMap:!1,shadowMode:!1})},3619:function(n,e,t){var l=t(3222);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("489f4310",l,!0,{sourceMap:!1,shadowMode:!1})},1377:function(n,e,t){var l=t(513);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("ab8a9958",l,!0,{sourceMap:!1,shadowMode:!1})},9423:function(n,e,t){var l=t(562);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("451ab9f1",l,!0,{sourceMap:!1,shadowMode:!1})},849:function(n,e,t){var l=t(241);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("3b3110a6",l,!0,{sourceMap:!1,shadowMode:!1})},4117:function(n,e,t){var l=t(7273);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("51b8ac78",l,!0,{sourceMap:!1,shadowMode:!1})},3424:function(n,e,t){var l=t(9878);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("0017d3b3",l,!0,{sourceMap:!1,shadowMode:!1})},1830:function(n,e,t){var l=t(3739);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("74cadd2c",l,!0,{sourceMap:!1,shadowMode:!1})},5433:function(n,e,t){var l=t(5340);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("0ffcc5b9",l,!0,{sourceMap:!1,shadowMode:!1})},7162:function(n,e,t){var l=t(3938);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("a2f2c426",l,!0,{sourceMap:!1,shadowMode:!1})},4067:function(n,e,t){var l=t(4421);l.__esModule&&(l=l.default),"string"===typeof l&&(l=[[n.id,l,""]]),l.locals&&(n.exports=l.locals);var i=t(3514).Z;i("239ef0cc",l,!0,{sourceMap:!1,shadowMode:!1})}}]);
2
- //# sourceMappingURL=574.js.map