(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{CXs3:function(t,e,n){"use strict";n("EhoA")},EhoA:function(t,e,n){},YzKX:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("dl",{staticClass:"row"},[n("dt",{staticClass:"col-12 col-sm-4 pt-0 pb-0"},[t._v(t._s(t.$t("dataEntry.situation.session.startTime"))+" :")]),t._v(" "),n("dd",{staticClass:"col-12 col-sm-8 pt-0 pb-0 mb-2"},[t._v(t._s(t._f("moment")(t.startedAt,"YYYY-MM-DD HH:mm:ss")))]),t._v(" "),n("dt",{staticClass:"col-12 col-sm-4 pt-0 pb-0"},[t._v(t._s(t.$t("dataEntry.situation.session.duration"))+" :")]),t._v(" "),n("dd",{staticClass:"col-12 col-sm-8 pt-0 pb-0 mb-2"},[t._v(t._s(t.duration))])])};o._withStripped=!0;n("ls82"),n("pNMO"),n("4Brf"),n("0oug"),n("4mDm"),n("DQNa"),n("uL8W"),n("eoL8"),n("5DmW"),n("NBAS"),n("ExoC"),n("07d7"),n("5s+n"),n("SuFq"),n("PKPk"),n("3bBZ"),n("R5XZ");var r=n("G0B5"),i=n("rPYe"),c=n("K1Tf");function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function a(t,e,n){return e=f(e),function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var d=function(t,e,n,o){var r,i=arguments.length,c=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"===("undefined"==typeof Reflect?"undefined":p(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,o);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,n,c):r(e,n))||c);return i>3&&c&&Object.defineProperty(e,n,c),c},y=function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function c(t){try{s(o.next(t))}catch(t){i(t)}}function u(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(c,u)}s((o=o.apply(t,e||[])).next())}))},v=function(t){function e(){var t;return u(this,e),(t=a(this,e,arguments)).startedAt=new Date,t.milliseconds=0,t.intervalID=null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(e,t),n=e,(o=[{key:"duration",get:function(){return c.a.formatDuration(this.milliseconds)}},{key:"mounted",value:function(){var t=this;this.updateSessionData(),this.intervalID=setInterval((function(){t.setDuration()}),1e3)}},{key:"destroyed",value:function(){this.intervalID&&clearInterval(this.intervalID)}},{key:"updateSessionData",value:function(){return y(this,void 0,void 0,regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.getCurrentSession(this.$indexedDb,this.project);case 2:e=t.sent,this.startedAt=e.startedAt,this.setDuration();case 5:case"end":return t.stop()}}),t,this)})))}},{key:"setDuration",value:function(){this.milliseconds=(new Date).getTime()-this.startedAt.getTime()}}])&&s(n.prototype,o),r&&s(n,r),n;var n,o,r}(r.g);d([Object(r.d)()],v.prototype,"project",void 0),d([Object(r.h)("project")],v.prototype,"updateSessionData",null);var b=v=d([Object(r.a)({})],v),h=(n("CXs3"),n("KHd+")),m=Object(h.a)(b,o,[],!1,null,"727a9724",null);m.options.__file="assets/app/modules/data-entry/situation/SituationCurrentSession.vue";e.default=m.exports}}]);