diff --git a/docs/Root.1c06208c.js b/docs/Root.21c5ecc9.js similarity index 99% rename from docs/Root.1c06208c.js rename to docs/Root.21c5ecc9.js index 27e56f7..ea910b0 100644 --- a/docs/Root.1c06208c.js +++ b/docs/Root.21c5ecc9.js @@ -55462,7 +55462,20 @@ Vue.mixin(module.exports = { } }); -},{"vue":"NtAQ"}],"iTBu":[function(require,module,exports) { +},{"vue":"NtAQ"}],"oSP9":[function(require,module,exports) { +var define; +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=6)}([function(t,e,n){"use strict";function r(){d=!1}function i(t){if(!t)return void(f!==m&&(f=m,r()));if(t!==f){if(t.length!==m.length)throw new Error("Custom alphabet for shortid must be "+m.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter(function(t,e,n){return e!==n.lastIndexOf(t)});if(e.length)throw new Error("Custom alphabet for shortid must be "+m.length+" unique characters. These characters were not unique: "+e.join(", "));f=t,r()}}function o(t){return i(t),f}function a(t){h.seed(t),p!==t&&(r(),p=t)}function s(){f||i(m);for(var t,e=f.split(""),n=[],r=h.nextValue();e.length>0;)r=h.nextValue(),t=Math.floor(r*e.length),n.push(e.splice(t,1)[0]);return n.join("")}function c(){return d||(d=s())}function u(t){return c()[t]}function l(){return f||m}var f,p,d,h=n(19),m="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";t.exports={get:l,characters:o,seed:a,lookup:u,shuffled:c}},function(t,e,n){"use strict";var r=n(5),i=n.n(r);e.a={animateIn:function(t){i()({targets:t,translateY:"-35px",opacity:1,duration:300,easing:"easeOutCubic"})},animateOut:function(t,e){i()({targets:t,opacity:0,marginTop:"-40px",duration:300,easing:"easeOutExpo",complete:e})},animateOutBottom:function(t,e){i()({targets:t,opacity:0,marginBottom:"-40px",duration:300,easing:"easeOutExpo",complete:e})},animateReset:function(t){i()({targets:t,left:0,opacity:1,duration:300,easing:"easeOutExpo"})},animatePanning:function(t,e,n){i()({targets:t,duration:10,easing:"easeOutQuad",left:e,opacity:n})},animatePanEnd:function(t,e){i()({targets:t,opacity:0,duration:300,easing:"easeOutExpo",complete:e})},clearAnimation:function(t){var e=i.a.timeline();t.forEach(function(t){e.add({targets:t.el,opacity:0,right:"-40px",duration:300,offset:"-=150",easing:"easeOutExpo",complete:function(){t.remove()}})})}}},function(t,e,n){"use strict";t.exports=n(16)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(8),i=n(1),o="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},a=n(2);n(11).polyfill();var s=function t(e){var n=this;return this.id=a.generate(),this.options=e,this.cached_options={},this.global={},this.groups=[],this.toasts=[],this.container=null,l(this),u(this),this.group=function(e){e||(e={}),e.globalToasts||(e.globalToasts={}),Object.assign(e.globalToasts,n.global);var r=new t(e);return n.groups.push(r),r},this.register=function(t,e,r){return r=r||{},f(n,t,e,r)},this.show=function(t,e){return c(n,t,e)},this.success=function(t,e){return e=e||{},e.type="success",c(n,t,e)},this.info=function(t,e){return e=e||{},e.type="info",c(n,t,e)},this.error=function(t,e){return e=e||{},e.type="error",c(n,t,e)},this.remove=function(t){n.toasts=n.toasts.filter(function(e){return e.el.hash!==t.hash}),t.parentNode&&t.parentNode.removeChild(t)},this.clear=function(t){return i.a.clearAnimation(n.toasts,function(){t&&t()}),n.toasts=[],!0},this},c=function(t,e,i){i=i||{};var a=null;if("object"!==(void 0===i?"undefined":o(i)))return console.error("Options should be a type of object. given : "+i),null;t.options.singleton&&t.toasts.length>0&&(t.cached_options=i,t.toasts[t.toasts.length-1].goAway(0));var s=Object.assign({},t.options);return Object.assign(s,i),a=n.i(r.a)(t,e,s),t.toasts.push(a),a},u=function(t){var e=t.options.globalToasts,n=function(e,n){return"string"==typeof n&&t[n]?t[n].apply(t,[e,{}]):c(t,e,n)};e&&(t.global={},Object.keys(e).forEach(function(r){t.global[r]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e[r].apply(null,[t,n])}}))},l=function(t){var e=document.createElement("div");e.id=t.id,e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","false"),document.body.appendChild(e),t.container=e},f=function(t,e,n,r){t.options.globalToasts||(t.options.globalToasts={}),t.options.globalToasts[e]=function(t,e){var i=null;return"string"==typeof n&&(i=n),"function"==typeof n&&(i=n(t)),e(i,r)},u(t)}},function(t,e,n){n(22);var r=n(21)(null,null,null,null);t.exports=r.exports},function(t,e,n){(function(n){var r,i,o,a={scope:{}};a.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},a.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:void 0!==n&&null!=n?n:t},a.global=a.getGlobal(this),a.SYMBOL_PREFIX="jscomp_symbol_",a.initSymbol=function(){a.initSymbol=function(){},a.global.Symbol||(a.global.Symbol=a.Symbol)},a.symbolCounter_=0,a.Symbol=function(t){return a.SYMBOL_PREFIX+(t||"")+a.symbolCounter_++},a.initSymbolIterator=function(){a.initSymbol();var t=a.global.Symbol.iterator;t||(t=a.global.Symbol.iterator=a.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&a.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return a.arrayIterator(this)}}),a.initSymbolIterator=function(){}},a.arrayIterator=function(t){var e=0;return a.iteratorPrototype(function(){return en&&(n+=1),1n?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(n[1])/360;var r=parseInt(n[2])/100,i=parseInt(n[3])/100,n=n[4]||1;if(0==r)i=r=t=i;else{var o=.5>i?i*(1+r):i+r-i*r,a=2*i-o,i=e(a,o,t+1/3),r=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*i+","+255*r+","+255*t+","+n+")"}function f(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function p(t){return-1=d.currentTime)for(var x=0;x=h||!e)&&(d.began||(d.began=!0,o("begin")),o("run")),g>s&&g=e&&m!==e||!e)&&(i(e),v||a())),o("update"),t>=e&&(d.remaining?(u=c,"alternate"===d.direction&&(d.reversed=!d.reversed)):(d.pause(),d.completed||(d.completed=!0,o("complete"),"Promise"in window&&(f(),p=n()))),l=0)}t=void 0===t?{}:t;var c,u,l=0,f=null,p=n(),d=L(t);return d.reset=function(){var t=d.direction,e=d.loop;for(d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.completed=!1,d.reversed="reverse"===t,d.remaining="alternate"===t&&1===e?2:e,i(0),t=d.children.length;t--;)d.children[t].reset()},d.tick=function(t){c=t,u||(u=c),s((l+c-u)*j.speed)},d.seek=function(t){s(r(t))},d.pause=function(){var t=H.indexOf(d);-1=e&&0<=r&&1>=r){var o=new Float32Array(11);if(e!==n||r!==i)for(var a=0;11>a;++a)o[a]=t(.1*a,e,r);return function(a){if(e===n&&r===i)return a;if(0===a)return 0;if(1===a)return 1;for(var s=0,c=1;10!==c&&o[c]<=a;++c)s+=.1;--c;var c=s+(a-o[c])/(o[c+1]-o[c])*.1,u=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e;if(.001<=u){for(s=0;4>s&&0!==(u=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e);++s)var l=t(c,e,r)-a,c=c-l/u;a=c}else if(0===u)a=c;else{var c=s,s=s+.1,f=0;do{l=c+(s-c)/2,u=t(l,e,r)-a,0++f);a=l}return t(a,n,i)}}}}(),z=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),r={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,n){return 1-t(1-e,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,n){return.5>e?t(2*e,n)/2:1-t(-2*e+2,n)/2}]},i={linear:F(.25,.25,.75,.75)},o={};for(e in r)o.type=e,r[o.type].forEach(function(t){return function(e,r){i["ease"+t.type+n[r]]=R.fnc(e)?e:F.apply(s,e)}}(o)),o={type:o.type};return i}(),Y={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,r,i){r[i]||(r[i]=[]),r[i].push(e+"("+n+")")}},H=[],q=0,V=function(){function t(){q=requestAnimationFrame(e)}function e(e){var n=H.length;if(n){for(var r=0;rn&&(e.duration=r.duration),e.children.push(r)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},j.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},j})}).call(e,n(25))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n.n(i),a={install:function(t,e){e||(e={});var n=new r.a(e);t.component("toasted",o.a),t.toasted=t.prototype.$toasted=n}};"undefined"!=typeof window&&window.Vue&&(window.Toasted=a),e.default=a},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(1),i=this,o="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},a=function(t,e,n){return setTimeout(function(){if(n.cached_options.position&&n.cached_options.position.includes("bottom"))return void r.a.animateOutBottom(t,function(){n.remove(t)});r.a.animateOut(t,function(){n.remove(t)})},e),!0},s=function(t,e){return("object"===("undefined"==typeof HTMLElement?"undefined":o(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":o(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)?t.appendChild(e):t.innerHTML=e,i},c=function(t,e){var n=!1;return{el:t,text:function(e){return s(t,e),this},goAway:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:800;return n=!0,a(t,r,e)},remove:function(){e.remove(t)},disposed:function(){return n}}}},function(t,e,n){"use strict";var r=n(12),i=n.n(r),o=n(1),a=n(7),s="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},c=n(2);String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}});var u={},l=null,f=function(t){return t.className=t.className||null,t.onComplete=t.onComplete||null,t.position=t.position||"top-right",t.duration=t.duration||null,t.keepOnHover=t.keepOnHover||!1,t.theme=t.theme||"toasted-primary",t.type=t.type||"default",t.containerClass=t.containerClass||null,t.fullWidth=t.fullWidth||!1,t.icon=t.icon||null,t.action=t.action||null,t.fitToScreen=t.fitToScreen||null,t.closeOnSwipe=void 0===t.closeOnSwipe||t.closeOnSwipe,t.iconPack=t.iconPack||"material",t.className&&"string"==typeof t.className&&(t.className=t.className.split(" ")),t.className||(t.className=[]),t.theme&&t.className.push(t.theme.trim()),t.type&&t.className.push(t.type),t.containerClass&&"string"==typeof t.containerClass&&(t.containerClass=t.containerClass.split(" ")),t.containerClass||(t.containerClass=[]),t.position&&t.containerClass.push(t.position.trim()),t.fullWidth&&t.containerClass.push("full-width"),t.fitToScreen&&t.containerClass.push("fit-to-screen"),u=t,t},p=function(t,e){var r=document.createElement("div");if(r.classList.add("toasted"),r.hash=c.generate(),e.className&&e.className.forEach(function(t){r.classList.add(t)}),("object"===("undefined"==typeof HTMLElement?"undefined":s(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":s(t))&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName)?r.appendChild(t):r.innerHTML=t,d(e,r),e.closeOnSwipe){var u=new i.a(r,{prevent_default:!1});u.on("pan",function(t){var e=t.deltaX;r.classList.contains("panning")||r.classList.add("panning");var n=1-Math.abs(e/80);n<0&&(n=0),o.a.animatePanning(r,e,n)}),u.on("panend",function(t){var n=t.deltaX;Math.abs(n)>80?o.a.animatePanEnd(r,function(){"function"==typeof e.onComplete&&e.onComplete(),r.parentNode&&l.remove(r)}):(r.classList.remove("panning"),o.a.animateReset(r))})}if(Array.isArray(e.action))e.action.forEach(function(t){var e=m(t,n.i(a.a)(r,l));e&&r.appendChild(e)});else if("object"===s(e.action)){var f=m(e.action,n.i(a.a)(r,l));f&&r.appendChild(f)}return r},d=function(t,e){if(t.icon){var n=document.createElement("i");switch(n.setAttribute("aria-hidden","true"),t.iconPack){case"fontawesome":n.classList.add("fa");var r=t.icon.name?t.icon.name:t.icon;r.includes("fa-")?n.classList.add(r.trim()):n.classList.add("fa-"+r.trim());break;case"mdi":n.classList.add("mdi");var i=t.icon.name?t.icon.name:t.icon;i.includes("mdi-")?n.classList.add(i.trim()):n.classList.add("mdi-"+i.trim());break;case"custom-class":var o=t.icon.name?t.icon.name:t.icon;"string"==typeof o?o.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(o)&&o.forEach(function(t){n.classList.add(t.trim())});break;case"callback":var a=t.icon&&t.icon instanceof Function?t.icon:null;a&&(n=a(n));break;default:n.classList.add("material-icons"),n.textContent=t.icon.name?t.icon.name:t.icon}t.icon.after&&n.classList.add("after"),h(t,n,e)}},h=function(t,e,n){t.icon&&(t.icon.after&&t.icon.name?n.appendChild(e):(t.icon.name,n.insertBefore(e,n.firstChild)))},m=function(t,e){if(!t)return null;var n=document.createElement("a");if(n.classList.add("action"),n.classList.add("ripple"),t.text&&(n.text=t.text),t.href&&(n.href=t.href),t.target&&(n.target=t.target),t.icon){n.classList.add("icon");var r=document.createElement("i");switch(u.iconPack){case"fontawesome":r.classList.add("fa"),t.icon.includes("fa-")?r.classList.add(t.icon.trim()):r.classList.add("fa-"+t.icon.trim());break;case"mdi":r.classList.add("mdi"),t.icon.includes("mdi-")?r.classList.add(t.icon.trim()):r.classList.add("mdi-"+t.icon.trim());break;case"custom-class":"string"==typeof t.icon?t.icon.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(t.icon)&&t.icon.forEach(function(t){n.classList.add(t.trim())});break;default:r.classList.add("material-icons"),r.textContent=t.icon}n.appendChild(r)}return t.class&&("string"==typeof t.class?t.class.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(t.class)&&t.class.forEach(function(t){n.classList.add(t.trim())})),t.push&&n.addEventListener("click",function(n){if(n.preventDefault(),!u.router)return void console.warn("[vue-toasted] : Vue Router instance is not attached. please check the docs");u.router.push(t.push),t.push.dontClose||e.goAway(0)}),t.onClick&&"function"==typeof t.onClick&&n.addEventListener("click",function(n){t.onClick&&(n.preventDefault(),t.onClick(n,e))}),n};e.a=function(t,e,r){l=t,r=f(r);var i=l.container;r.containerClass.unshift("toasted-container"),i.className!==r.containerClass.join(" ")&&(i.className="",r.containerClass.forEach(function(t){i.classList.add(t)}));var s=p(e,r);e&&i.appendChild(s),s.style.opacity=0,o.a.animateIn(s);var c=r.duration,u=void 0;if(null!==c){var d=function(){return setInterval(function(){null===s.parentNode&&window.clearInterval(u),s.classList.contains("panning")||(c-=20),c<=0&&(o.a.animateOut(s,function(){"function"==typeof r.onComplete&&r.onComplete(),s.parentNode&&l.remove(s)}),window.clearInterval(u))},20)};u=d(),r.keepOnHover&&(s.addEventListener("mouseover",function(){window.clearInterval(u)}),s.addEventListener("mouseout",function(){u=d()}))}return n.i(a.a)(s,l)}},function(t,e,n){e=t.exports=n(10)(),e.push([t.i,".toasted{padding:0 20px}.toasted.rounded{border-radius:24px}.toasted .primary,.toasted.toasted-primary{border-radius:2px;min-height:38px;line-height:1.1em;background-color:#353535;padding:6px 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted .primary.success,.toasted.toasted-primary.success{background:#4caf50}.toasted .primary.error,.toasted.toasted-primary.error{background:#f44336}.toasted .primary.info,.toasted.toasted-primary.info{background:#3f51b5}.toasted .primary .action,.toasted.toasted-primary .action{color:#a1c2fa}.toasted.bubble{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#ff7043;padding:0 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted.bubble.success{background:#4caf50}.toasted.bubble.error{background:#f44336}.toasted.bubble.info{background:#3f51b5}.toasted.bubble .action{color:#8e2b0c}.toasted.outline{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#fff;border:1px solid #676767;padding:0 20px;font-size:15px;color:#676767;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);font-weight:700}.toasted.outline.success{color:#4caf50;border-color:#4caf50}.toasted.outline.error{color:#f44336;border-color:#f44336}.toasted.outline.info{color:#3f51b5;border-color:#3f51b5}.toasted.outline .action{color:#607d8b}.toasted-container{position:fixed;z-index:10000}.toasted-container,.toasted-container.full-width{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.toasted-container.full-width{max-width:86%;width:100%}.toasted-container.full-width.fit-to-screen{min-width:100%}.toasted-container.full-width.fit-to-screen .toasted:first-child{margin-top:0}.toasted-container.full-width.fit-to-screen.top-right{top:0;right:0}.toasted-container.full-width.fit-to-screen.top-left{top:0;left:0}.toasted-container.full-width.fit-to-screen.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.full-width.fit-to-screen.bottom-right{right:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-left{left:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.top-right{top:10%;right:7%}.toasted-container.top-left{top:10%;left:7%}.toasted-container.top-center{top:10%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.toasted-container.bottom-right{right:5%;bottom:7%}.toasted-container.bottom-left{left:5%;bottom:7%}.toasted-container.bottom-center{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:7%}.toasted-container.bottom-left .toasted,.toasted-container.top-left .toasted{float:left}.toasted-container.bottom-right .toasted,.toasted-container.top-right .toasted{float:right}.toasted-container .toasted{top:35px;width:auto;clear:both;margin-top:10px;position:relative;max-width:100%;height:auto;word-break:normal;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;box-sizing:inherit}.toasted-container .toasted .fa,.toasted-container .toasted .fab,.toasted-container .toasted .far,.toasted-container .toasted .fas,.toasted-container .toasted .material-icons,.toasted-container .toasted .mdi{margin-right:.5rem;margin-left:-.4rem}.toasted-container .toasted .fa.after,.toasted-container .toasted .fab.after,.toasted-container .toasted .far.after,.toasted-container .toasted .fas.after,.toasted-container .toasted .material-icons.after,.toasted-container .toasted .mdi.after{margin-left:.5rem;margin-right:-.4rem}.toasted-container .toasted .action{text-decoration:none;font-size:.8rem;padding:8px;margin:5px -7px 5px 7px;border-radius:3px;text-transform:uppercase;letter-spacing:.03em;font-weight:600;cursor:pointer}.toasted-container .toasted .action.icon{padding:4px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toasted-container .toasted .action.icon .fa,.toasted-container .toasted .action.icon .material-icons,.toasted-container .toasted .action.icon .mdi{margin-right:0;margin-left:4px}.toasted-container .toasted .action.icon:hover{text-decoration:none}.toasted-container .toasted .action:hover{text-decoration:underline}@media only screen and (max-width:600px){.toasted-container{min-width:100%}.toasted-container .toasted:first-child{margin-top:0}.toasted-container.top-right{top:0;right:0}.toasted-container.top-left{top:0;left:0}.toasted-container.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.bottom-right{right:0;bottom:0}.toasted-container.bottom-left{left:0;bottom:0}.toasted-container.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.bottom-center,.toasted-container.top-center{-ms-flex-align:stretch!important;align-items:stretch!important}.toasted-container.bottom-left .toasted,.toasted-container.bottom-right .toasted,.toasted-container.top-left .toasted,.toasted-container.top-right .toasted{float:none}.toasted-container .toasted{border-radius:0}}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}function p(t,e,n){var r,i=e.prototype;r=t.prototype=Object.create(i),r.constructor=t,r._super=i,n&&ht(r,n)}function d(t,e){return function(){return t.apply(e,arguments)}}function h(t,e){return typeof t==gt?t.apply(e?e[0]||s:s,e):t}function m(t,e){return t===s?e:t}function v(t,e,n){l(x(e),function(e){t.addEventListener(e,n,!1)})}function g(t,e,n){l(x(e),function(e){t.removeEventListener(e,n,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function x(t){return t.trim().split(/\s+/g)}function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]}):r.sort()),r}function C(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=j(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,c=e.center=N(r);e.timeStamp=xt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=R(s,c),e.distance=D(s,c),P(n,e),e.offsetDirection=X(e.deltaX,e.deltaY);var u=_(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=bt(u.x)>bt(u.y)?u.x:u.y,e.scale=a?z(a.pointers,r):1,e.rotation=a?F(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,L(n,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Mt&&o.eventType!==Pt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}function L(t,e){var n,r,i,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(e.eventType!=Lt&&(c>It||a.velocity===s)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,f=_(c,u,l);r=f.x,i=f.y,n=bt(f.x)>bt(f.y)?f.x:f.y,o=X(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}function j(t){for(var e=[],n=0;n=bt(e)?t<0?Nt:_t:e<0?Xt:Dt}function D(t,e,n){n||(n=Yt);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function R(t,e,n){n||(n=Yt);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function F(t,e){return R(e[1],e[0],Ht)+R(t[1],t[0],Ht)}function z(t,e){return D(e[0],e[1],Ht)/D(t[0],t[1],Ht)}function Y(){this.evEl=Vt,this.evWin=Wt,this.pressed=!1,A.apply(this,arguments)}function H(){this.evEl=$t,this.evWin=Gt,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function q(){this.evTarget=Qt,this.evWin=Jt,this.started=!1,A.apply(this,arguments)}function V(t,e){var n=w(t.touches),r=w(t.changedTouches);return e&(Pt|Lt)&&(n=E(n.concat(r),"identifier",!0)),[n,r]}function W(){this.evTarget=te,this.targetIds={},A.apply(this,arguments)}function U(t,e){var n=w(t.touches),r=this.targetIds;if(e&(Mt|kt)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=w(t.changedTouches),s=[],c=this.target;if(o=n.filter(function(t){return y(t.target,c)}),e===Mt)for(i=0;i-1&&r.splice(t,1)};setTimeout(i,ee)}}function Z(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;r=he&&e(n.options.event+tt(r))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&pe||!(this.state&pe)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),p(ot,rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&pe)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),p(at,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distancee.time;if(this._input=t,!r||!n||t.eventType&(Pt|Lt)&&!i)this.reset();else if(t.eventType&Mt)this.reset(),this._timer=c(function(){this.state=me,this.tryEmit()},e.time,this);else if(t.eventType&Pt)return me;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===me&&(t&&t.eventType&Pt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=xt(),this.manager.emit(this.options.event,this._input)))}}),p(st,rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&pe)}}),p(ct,rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Rt|Ft,pointers:1},getTouchAction:function(){return it.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Rt|Ft)?e=t.overallVelocity:n&Rt?e=t.overallVelocityX:n&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Pt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),p(ut,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ae]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance0&&(e+=a(i)),e+=a(n)}var i,o,a=n(15),s=(n(0),1567752802062),c=7;t.exports=r},function(t,e,n){"use strict";function r(t){for(var e,n=0,r="";!e;)r+=a(o,i.get(),1),e=tn.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i0;)r=h.nextValue(),t=Math.floor(r*e.length),n.push(e.splice(t,1)[0]);return n.join("")}function c(){return d||(d=s())}function u(t){return c()[t]}function l(){return f||m}var f,p,d,h=n(19),m="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";t.exports={get:l,characters:o,seed:a,lookup:u,shuffled:c}},function(t,e,n){"use strict";var r=n(5),i=n.n(r);e.a={animateIn:function(t){i()({targets:t,translateY:"-35px",opacity:1,duration:300,easing:"easeOutCubic"})},animateOut:function(t,e){i()({targets:t,opacity:0,marginTop:"-40px",duration:300,easing:"easeOutExpo",complete:e})},animateOutBottom:function(t,e){i()({targets:t,opacity:0,marginBottom:"-40px",duration:300,easing:"easeOutExpo",complete:e})},animateReset:function(t){i()({targets:t,left:0,opacity:1,duration:300,easing:"easeOutExpo"})},animatePanning:function(t,e,n){i()({targets:t,duration:10,easing:"easeOutQuad",left:e,opacity:n})},animatePanEnd:function(t,e){i()({targets:t,opacity:0,duration:300,easing:"easeOutExpo",complete:e})},clearAnimation:function(t){var e=i.a.timeline();t.forEach(function(t){e.add({targets:t.el,opacity:0,right:"-40px",duration:300,offset:"-=150",easing:"easeOutExpo",complete:function(){t.remove()}})})}}},function(t,e,n){"use strict";t.exports=n(16)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(8),i=n(1),o="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},a=n(2);n(11).polyfill();var s=function t(e){var n=this;return this.id=a.generate(),this.options=e,this.cached_options={},this.global={},this.groups=[],this.toasts=[],this.container=null,l(this),u(this),this.group=function(e){e||(e={}),e.globalToasts||(e.globalToasts={}),Object.assign(e.globalToasts,n.global);var r=new t(e);return n.groups.push(r),r},this.register=function(t,e,r){return r=r||{},f(n,t,e,r)},this.show=function(t,e){return c(n,t,e)},this.success=function(t,e){return e=e||{},e.type="success",c(n,t,e)},this.info=function(t,e){return e=e||{},e.type="info",c(n,t,e)},this.error=function(t,e){return e=e||{},e.type="error",c(n,t,e)},this.remove=function(t){n.toasts=n.toasts.filter(function(e){return e.el.hash!==t.hash}),t.parentNode&&t.parentNode.removeChild(t)},this.clear=function(t){return i.a.clearAnimation(n.toasts,function(){t&&t()}),n.toasts=[],!0},this},c=function(t,e,i){i=i||{};var a=null;if("object"!==(void 0===i?"undefined":o(i)))return console.error("Options should be a type of object. given : "+i),null;t.options.singleton&&t.toasts.length>0&&(t.cached_options=i,t.toasts[t.toasts.length-1].goAway(0));var s=Object.assign({},t.options);return Object.assign(s,i),a=n.i(r.a)(t,e,s),t.toasts.push(a),a},u=function(t){var e=t.options.globalToasts,n=function(e,n){return"string"==typeof n&&t[n]?t[n].apply(t,[e,{}]):c(t,e,n)};e&&(t.global={},Object.keys(e).forEach(function(r){t.global[r]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e[r].apply(null,[t,n])}}))},l=function(t){var e=document.createElement("div");e.id=t.id,e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","false"),document.body.appendChild(e),t.container=e},f=function(t,e,n,r){t.options.globalToasts||(t.options.globalToasts={}),t.options.globalToasts[e]=function(t,e){var i=null;return"string"==typeof n&&(i=n),"function"==typeof n&&(i=n(t)),e(i,r)},u(t)}},function(t,e,n){n(22);var r=n(21)(null,null,null,null);t.exports=r.exports},function(t,e,n){(function(n){var r,i,o,a={scope:{}};a.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},a.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:void 0!==n&&null!=n?n:t},a.global=a.getGlobal(this),a.SYMBOL_PREFIX="jscomp_symbol_",a.initSymbol=function(){a.initSymbol=function(){},a.global.Symbol||(a.global.Symbol=a.Symbol)},a.symbolCounter_=0,a.Symbol=function(t){return a.SYMBOL_PREFIX+(t||"")+a.symbolCounter_++},a.initSymbolIterator=function(){a.initSymbol();var t=a.global.Symbol.iterator;t||(t=a.global.Symbol.iterator=a.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&a.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return a.arrayIterator(this)}}),a.initSymbolIterator=function(){}},a.arrayIterator=function(t){var e=0;return a.iteratorPrototype(function(){return en&&(n+=1),1n?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(n[1])/360;var r=parseInt(n[2])/100,i=parseInt(n[3])/100,n=n[4]||1;if(0==r)i=r=t=i;else{var o=.5>i?i*(1+r):i+r-i*r,a=2*i-o,i=e(a,o,t+1/3),r=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*i+","+255*r+","+255*t+","+n+")"}function f(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function p(t){return-1=d.currentTime)for(var x=0;x=h||!e)&&(d.began||(d.began=!0,o("begin")),o("run")),g>s&&g=e&&m!==e||!e)&&(i(e),v||a())),o("update"),t>=e&&(d.remaining?(u=c,"alternate"===d.direction&&(d.reversed=!d.reversed)):(d.pause(),d.completed||(d.completed=!0,o("complete"),"Promise"in window&&(f(),p=n()))),l=0)}t=void 0===t?{}:t;var c,u,l=0,f=null,p=n(),d=L(t);return d.reset=function(){var t=d.direction,e=d.loop;for(d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.completed=!1,d.reversed="reverse"===t,d.remaining="alternate"===t&&1===e?2:e,i(0),t=d.children.length;t--;)d.children[t].reset()},d.tick=function(t){c=t,u||(u=c),s((l+c-u)*j.speed)},d.seek=function(t){s(r(t))},d.pause=function(){var t=H.indexOf(d);-1=e&&0<=r&&1>=r){var o=new Float32Array(11);if(e!==n||r!==i)for(var a=0;11>a;++a)o[a]=t(.1*a,e,r);return function(a){if(e===n&&r===i)return a;if(0===a)return 0;if(1===a)return 1;for(var s=0,c=1;10!==c&&o[c]<=a;++c)s+=.1;--c;var c=s+(a-o[c])/(o[c+1]-o[c])*.1,u=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e;if(.001<=u){for(s=0;4>s&&0!==(u=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e);++s)var l=t(c,e,r)-a,c=c-l/u;a=c}else if(0===u)a=c;else{var c=s,s=s+.1,f=0;do{l=c+(s-c)/2,u=t(l,e,r)-a,0++f);a=l}return t(a,n,i)}}}}(),z=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),r={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,n){return 1-t(1-e,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,n){return.5>e?t(2*e,n)/2:1-t(-2*e+2,n)/2}]},i={linear:F(.25,.25,.75,.75)},o={};for(e in r)o.type=e,r[o.type].forEach(function(t){return function(e,r){i["ease"+t.type+n[r]]=R.fnc(e)?e:F.apply(s,e)}}(o)),o={type:o.type};return i}(),Y={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,r,i){r[i]||(r[i]=[]),r[i].push(e+"("+n+")")}},H=[],q=0,V=function(){function t(){q=requestAnimationFrame(e)}function e(e){var n=H.length;if(n){for(var r=0;rn&&(e.duration=r.duration),e.children.push(r)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},j.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},j})}).call(e,n(25))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n.n(i),a={install:function(t,e){e||(e={});var n=new r.a(e);t.component("toasted",o.a),t.toasted=t.prototype.$toasted=n}};"undefined"!=typeof window&&window.Vue&&(window.Toasted=a),e.default=a},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(1),i=this,o="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},a=function(t,e,n){return setTimeout(function(){if(n.cached_options.position&&n.cached_options.position.includes("bottom"))return void r.a.animateOutBottom(t,function(){n.remove(t)});r.a.animateOut(t,function(){n.remove(t)})},e),!0},s=function(t,e){return("object"===("undefined"==typeof HTMLElement?"undefined":o(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":o(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)?t.appendChild(e):t.innerHTML=e,i},c=function(t,e){var n=!1;return{el:t,text:function(e){return s(t,e),this},goAway:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:800;return n=!0,a(t,r,e)},remove:function(){e.remove(t)},disposed:function(){return n}}}},function(t,e,n){"use strict";var r=n(12),i=n.n(r),o=n(1),a=n(7),s="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},c=n(2);String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}});var u={},l=null,f=function(t){return t.className=t.className||null,t.onComplete=t.onComplete||null,t.position=t.position||"top-right",t.duration=t.duration||null,t.keepOnHover=t.keepOnHover||!1,t.theme=t.theme||"toasted-primary",t.type=t.type||"default",t.containerClass=t.containerClass||null,t.fullWidth=t.fullWidth||!1,t.icon=t.icon||null,t.action=t.action||null,t.fitToScreen=t.fitToScreen||null,t.closeOnSwipe=void 0===t.closeOnSwipe||t.closeOnSwipe,t.iconPack=t.iconPack||"material",t.className&&"string"==typeof t.className&&(t.className=t.className.split(" ")),t.className||(t.className=[]),t.theme&&t.className.push(t.theme.trim()),t.type&&t.className.push(t.type),t.containerClass&&"string"==typeof t.containerClass&&(t.containerClass=t.containerClass.split(" ")),t.containerClass||(t.containerClass=[]),t.position&&t.containerClass.push(t.position.trim()),t.fullWidth&&t.containerClass.push("full-width"),t.fitToScreen&&t.containerClass.push("fit-to-screen"),u=t,t},p=function(t,e){var r=document.createElement("div");if(r.classList.add("toasted"),r.hash=c.generate(),e.className&&e.className.forEach(function(t){r.classList.add(t)}),("object"===("undefined"==typeof HTMLElement?"undefined":s(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":s(t))&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName)?r.appendChild(t):r.innerHTML=t,d(e,r),e.closeOnSwipe){var u=new i.a(r,{prevent_default:!1});u.on("pan",function(t){var e=t.deltaX;r.classList.contains("panning")||r.classList.add("panning");var n=1-Math.abs(e/80);n<0&&(n=0),o.a.animatePanning(r,e,n)}),u.on("panend",function(t){var n=t.deltaX;Math.abs(n)>80?o.a.animatePanEnd(r,function(){"function"==typeof e.onComplete&&e.onComplete(),r.parentNode&&l.remove(r)}):(r.classList.remove("panning"),o.a.animateReset(r))})}if(Array.isArray(e.action))e.action.forEach(function(t){var e=m(t,n.i(a.a)(r,l));e&&r.appendChild(e)});else if("object"===s(e.action)){var f=m(e.action,n.i(a.a)(r,l));f&&r.appendChild(f)}return r},d=function(t,e){if(t.icon){var n=document.createElement("i");switch(n.setAttribute("aria-hidden","true"),t.iconPack){case"fontawesome":n.classList.add("fa");var r=t.icon.name?t.icon.name:t.icon;r.includes("fa-")?n.classList.add(r.trim()):n.classList.add("fa-"+r.trim());break;case"mdi":n.classList.add("mdi");var i=t.icon.name?t.icon.name:t.icon;i.includes("mdi-")?n.classList.add(i.trim()):n.classList.add("mdi-"+i.trim());break;case"custom-class":var o=t.icon.name?t.icon.name:t.icon;"string"==typeof o?o.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(o)&&o.forEach(function(t){n.classList.add(t.trim())});break;case"callback":var a=t.icon&&t.icon instanceof Function?t.icon:null;a&&(n=a(n));break;default:n.classList.add("material-icons"),n.textContent=t.icon.name?t.icon.name:t.icon}t.icon.after&&n.classList.add("after"),h(t,n,e)}},h=function(t,e,n){t.icon&&(t.icon.after&&t.icon.name?n.appendChild(e):(t.icon.name,n.insertBefore(e,n.firstChild)))},m=function(t,e){if(!t)return null;var n=document.createElement("a");if(n.classList.add("action"),n.classList.add("ripple"),t.text&&(n.text=t.text),t.href&&(n.href=t.href),t.target&&(n.target=t.target),t.icon){n.classList.add("icon");var r=document.createElement("i");switch(u.iconPack){case"fontawesome":r.classList.add("fa"),t.icon.includes("fa-")?r.classList.add(t.icon.trim()):r.classList.add("fa-"+t.icon.trim());break;case"mdi":r.classList.add("mdi"),t.icon.includes("mdi-")?r.classList.add(t.icon.trim()):r.classList.add("mdi-"+t.icon.trim());break;case"custom-class":"string"==typeof t.icon?t.icon.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(t.icon)&&t.icon.forEach(function(t){n.classList.add(t.trim())});break;default:r.classList.add("material-icons"),r.textContent=t.icon}n.appendChild(r)}return t.class&&("string"==typeof t.class?t.class.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(t.class)&&t.class.forEach(function(t){n.classList.add(t.trim())})),t.push&&n.addEventListener("click",function(n){if(n.preventDefault(),!u.router)return void console.warn("[vue-toasted] : Vue Router instance is not attached. please check the docs");u.router.push(t.push),t.push.dontClose||e.goAway(0)}),t.onClick&&"function"==typeof t.onClick&&n.addEventListener("click",function(n){t.onClick&&(n.preventDefault(),t.onClick(n,e))}),n};e.a=function(t,e,r){l=t,r=f(r);var i=l.container;r.containerClass.unshift("toasted-container"),i.className!==r.containerClass.join(" ")&&(i.className="",r.containerClass.forEach(function(t){i.classList.add(t)}));var s=p(e,r);e&&i.appendChild(s),s.style.opacity=0,o.a.animateIn(s);var c=r.duration,u=void 0;if(null!==c){var d=function(){return setInterval(function(){null===s.parentNode&&window.clearInterval(u),s.classList.contains("panning")||(c-=20),c<=0&&(o.a.animateOut(s,function(){"function"==typeof r.onComplete&&r.onComplete(),s.parentNode&&l.remove(s)}),window.clearInterval(u))},20)};u=d(),r.keepOnHover&&(s.addEventListener("mouseover",function(){window.clearInterval(u)}),s.addEventListener("mouseout",function(){u=d()}))}return n.i(a.a)(s,l)}},function(t,e,n){e=t.exports=n(10)(),e.push([t.i,".toasted{padding:0 20px}.toasted.rounded{border-radius:24px}.toasted .primary,.toasted.toasted-primary{border-radius:2px;min-height:38px;line-height:1.1em;background-color:#353535;padding:6px 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted .primary.success,.toasted.toasted-primary.success{background:#4caf50}.toasted .primary.error,.toasted.toasted-primary.error{background:#f44336}.toasted .primary.info,.toasted.toasted-primary.info{background:#3f51b5}.toasted .primary .action,.toasted.toasted-primary .action{color:#a1c2fa}.toasted.bubble{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#ff7043;padding:0 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted.bubble.success{background:#4caf50}.toasted.bubble.error{background:#f44336}.toasted.bubble.info{background:#3f51b5}.toasted.bubble .action{color:#8e2b0c}.toasted.outline{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#fff;border:1px solid #676767;padding:0 20px;font-size:15px;color:#676767;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);font-weight:700}.toasted.outline.success{color:#4caf50;border-color:#4caf50}.toasted.outline.error{color:#f44336;border-color:#f44336}.toasted.outline.info{color:#3f51b5;border-color:#3f51b5}.toasted.outline .action{color:#607d8b}.toasted-container{position:fixed;z-index:10000}.toasted-container,.toasted-container.full-width{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.toasted-container.full-width{max-width:86%;width:100%}.toasted-container.full-width.fit-to-screen{min-width:100%}.toasted-container.full-width.fit-to-screen .toasted:first-child{margin-top:0}.toasted-container.full-width.fit-to-screen.top-right{top:0;right:0}.toasted-container.full-width.fit-to-screen.top-left{top:0;left:0}.toasted-container.full-width.fit-to-screen.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.full-width.fit-to-screen.bottom-right{right:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-left{left:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.top-right{top:10%;right:7%}.toasted-container.top-left{top:10%;left:7%}.toasted-container.top-center{top:10%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.toasted-container.bottom-right{right:5%;bottom:7%}.toasted-container.bottom-left{left:5%;bottom:7%}.toasted-container.bottom-center{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:7%}.toasted-container.bottom-left .toasted,.toasted-container.top-left .toasted{float:left}.toasted-container.bottom-right .toasted,.toasted-container.top-right .toasted{float:right}.toasted-container .toasted{top:35px;width:auto;clear:both;margin-top:10px;position:relative;max-width:100%;height:auto;word-break:normal;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;box-sizing:inherit}.toasted-container .toasted .fa,.toasted-container .toasted .fab,.toasted-container .toasted .far,.toasted-container .toasted .fas,.toasted-container .toasted .material-icons,.toasted-container .toasted .mdi{margin-right:.5rem;margin-left:-.4rem}.toasted-container .toasted .fa.after,.toasted-container .toasted .fab.after,.toasted-container .toasted .far.after,.toasted-container .toasted .fas.after,.toasted-container .toasted .material-icons.after,.toasted-container .toasted .mdi.after{margin-left:.5rem;margin-right:-.4rem}.toasted-container .toasted .action{text-decoration:none;font-size:.8rem;padding:8px;margin:5px -7px 5px 7px;border-radius:3px;text-transform:uppercase;letter-spacing:.03em;font-weight:600;cursor:pointer}.toasted-container .toasted .action.icon{padding:4px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toasted-container .toasted .action.icon .fa,.toasted-container .toasted .action.icon .material-icons,.toasted-container .toasted .action.icon .mdi{margin-right:0;margin-left:4px}.toasted-container .toasted .action.icon:hover{text-decoration:none}.toasted-container .toasted .action:hover{text-decoration:underline}@media only screen and (max-width:600px){.toasted-container{min-width:100%}.toasted-container .toasted:first-child{margin-top:0}.toasted-container.top-right{top:0;right:0}.toasted-container.top-left{top:0;left:0}.toasted-container.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.bottom-right{right:0;bottom:0}.toasted-container.bottom-left{left:0;bottom:0}.toasted-container.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.bottom-center,.toasted-container.top-center{-ms-flex-align:stretch!important;align-items:stretch!important}.toasted-container.bottom-left .toasted,.toasted-container.bottom-right .toasted,.toasted-container.top-left .toasted,.toasted-container.top-right .toasted{float:none}.toasted-container .toasted{border-radius:0}}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}function p(t,e,n){var r,i=e.prototype;r=t.prototype=Object.create(i),r.constructor=t,r._super=i,n&&ht(r,n)}function d(t,e){return function(){return t.apply(e,arguments)}}function h(t,e){return typeof t==gt?t.apply(e?e[0]||s:s,e):t}function m(t,e){return t===s?e:t}function v(t,e,n){l(x(e),function(e){t.addEventListener(e,n,!1)})}function g(t,e,n){l(x(e),function(e){t.removeEventListener(e,n,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function x(t){return t.trim().split(/\s+/g)}function T(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;rn[e]}):r.sort()),r}function C(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=j(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,c=e.center=N(r);e.timeStamp=xt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=R(s,c),e.distance=D(s,c),P(n,e),e.offsetDirection=X(e.deltaX,e.deltaY);var u=_(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=bt(u.x)>bt(u.y)?u.x:u.y,e.scale=a?z(a.pointers,r):1,e.rotation=a?F(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,L(n,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Mt&&o.eventType!==Pt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}function L(t,e){var n,r,i,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(e.eventType!=Lt&&(c>It||a.velocity===s)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,f=_(c,u,l);r=f.x,i=f.y,n=bt(f.x)>bt(f.y)?f.x:f.y,o=X(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}function j(t){for(var e=[],n=0;n=bt(e)?t<0?Nt:_t:e<0?Xt:Dt}function D(t,e,n){n||(n=Yt);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function R(t,e,n){n||(n=Yt);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function F(t,e){return R(e[1],e[0],Ht)+R(t[1],t[0],Ht)}function z(t,e){return D(e[0],e[1],Ht)/D(t[0],t[1],Ht)}function Y(){this.evEl=Vt,this.evWin=Wt,this.pressed=!1,A.apply(this,arguments)}function H(){this.evEl=$t,this.evWin=Gt,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function q(){this.evTarget=Qt,this.evWin=Jt,this.started=!1,A.apply(this,arguments)}function V(t,e){var n=w(t.touches),r=w(t.changedTouches);return e&(Pt|Lt)&&(n=E(n.concat(r),"identifier",!0)),[n,r]}function W(){this.evTarget=te,this.targetIds={},A.apply(this,arguments)}function U(t,e){var n=w(t.touches),r=this.targetIds;if(e&(Mt|kt)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=w(t.changedTouches),s=[],c=this.target;if(o=n.filter(function(t){return y(t.target,c)}),e===Mt)for(i=0;i-1&&r.splice(t,1)};setTimeout(i,ee)}}function Z(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;r=he&&e(n.options.event+tt(r))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&pe||!(this.state&pe)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),p(ot,rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&pe)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),p(at,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distancee.time;if(this._input=t,!r||!n||t.eventType&(Pt|Lt)&&!i)this.reset();else if(t.eventType&Mt)this.reset(),this._timer=c(function(){this.state=me,this.tryEmit()},e.time,this);else if(t.eventType&Pt)return me;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===me&&(t&&t.eventType&Pt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=xt(),this.manager.emit(this.options.event,this._input)))}}),p(st,rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&pe)}}),p(ct,rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Rt|Ft,pointers:1},getTouchAction:function(){return it.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Rt|Ft)?e=t.overallVelocity:n&Rt?e=t.overallVelocityX:n&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&Pt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),p(ut,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ae]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance0&&(e+=a(i)),e+=a(n)}var i,o,a=n(15),s=(n(0),1567752802062),c=7;t.exports=r},function(t,e,n){"use strict";function r(t){for(var e,n=0,r="";!e;)r+=a(o,i.get(),1),e=tn.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i ({ - cb: watcher.cb, - sync: watcher.sync - })); // disable - - - for (let index in this._watchers) { - this._watchers[index] = Object.assign(this._watchers[index], { - cb: () => null, - sync: true - }); - } - - if (this.$withoutWatchers.showSource) { - console.group(`[${source}] suspended all watch functions`); - } - - callback(); - - if (this.$withoutWatchers.showSource) { - console.groupEnd(); - console.log(`[${source}] resumed all watch functions`); - } // enable - - - for (let index in this._watchers) { - this._watchers[index] = Object.assign(this._watchers[index], watchers[index]); - } - } - - } -}); },{"vue":"NtAQ"}],"Y7uC":[function(require,module,exports) { // api // workers @@ -66628,7 +66586,49 @@ _vue.default.use(_vuePlyr.default, { invertTime: false } }); -},{"vue":"NtAQ","vue-plyr":"fgJi","vue-plyr/dist/vue-plyr.css":"jJO6"}],"Xeh1":[function(require,module,exports) { +},{"vue":"NtAQ","vue-plyr":"fgJi","vue-plyr/dist/vue-plyr.css":"jJO6"}],"aLvM":[function(require,module,exports) { +// api +// this.withoutWatchers(source, callback) +let Vue = require("vue").default; // TODO: potenial issue if a second source calls this before the first one ends (async) +// TODO: issues with dynamically added watchers + + +Vue.mixin(module.exports = { + methods: { + $withoutWatchers(source, callback) { + const watchers = this._watchers.map(watcher => ({ + cb: watcher.cb, + sync: watcher.sync + })); // disable + + + for (let index in this._watchers) { + this._watchers[index] = Object.assign(this._watchers[index], { + cb: () => null, + sync: true + }); + } + + if (this.$withoutWatchers.showSource) { + console.group(`[${source}] suspended all watch functions`); + } + + callback(); + + if (this.$withoutWatchers.showSource) { + console.groupEnd(); + console.log(`[${source}] resumed all watch functions`); + } // enable + + + for (let index in this._watchers) { + this._watchers[index] = Object.assign(this._watchers[index], watchers[index]); + } + } + + } +}); +},{"vue":"NtAQ"}],"Xeh1":[function(require,module,exports) { module.exports = { "child": require("./child.js"), "css-baseline-plugin": require("./css-baseline-plugin.js"), @@ -66637,14 +66637,14 @@ module.exports = { "portal-plugin": require("./portal-plugin.js"), "resolvables-plugin": require("./resolvables-plugin.js"), "root-hooks-plugin": require("./root-hooks-plugin.js"), - "router-plugin": require("./router-plugin.js"), "vue-toasted-plugin": require("./vue-toasted-plugin.js"), + "router-plugin": require("./router-plugin.js"), "window-listeners-plugin": require("./window-listeners-plugin.js"), - "without-watchers": require("./without-watchers.js"), "workers-plugin": require("./workers-plugin.js"), - "youtube-player-plugin": require("./youtube-player-plugin.js") + "youtube-player-plugin": require("./youtube-player-plugin.js"), + "without-watchers": require("./without-watchers.js") }; -},{"./child.js":"HT0w","./css-baseline-plugin.js":"xmsx","./good-vue-plugin.js":"plSt","./keen-ui-plugin.js":"FJCK","./portal-plugin.js":"HMJZ","./resolvables-plugin.js":"mVwj","./root-hooks-plugin.js":"T1YL","./router-plugin.js":"yBli","./vue-toasted-plugin.js":"Gnxb","./window-listeners-plugin.js":"XpWL","./without-watchers.js":"aLvM","./workers-plugin.js":"Y7uC","./youtube-player-plugin.js":"mQXc"}],"jqRt":[function(require,module,exports) { +},{"./child.js":"HT0w","./css-baseline-plugin.js":"xmsx","./good-vue-plugin.js":"plSt","./keen-ui-plugin.js":"FJCK","./portal-plugin.js":"HMJZ","./resolvables-plugin.js":"mVwj","./root-hooks-plugin.js":"T1YL","./vue-toasted-plugin.js":"Gnxb","./router-plugin.js":"yBli","./window-listeners-plugin.js":"XpWL","./workers-plugin.js":"Y7uC","./youtube-player-plugin.js":"mQXc","./without-watchers.js":"aLvM"}],"jqRt":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -94014,7 +94014,6 @@ exports.labelConfidenceIsValid = labelConfidenceIsValid; exports.observerIsValid = observerIsValid; exports.labelIsValid = labelIsValid; exports.quickLocalValidationCheck = quickLocalValidationCheck; -exports.coerceTimestamp = coerceTimestamp; exports.validateTimestamps = validateTimestamps; exports.timestampsToCsv = timestampsToCsv; Object.defineProperty(exports, "isLocalVideo", { @@ -94041,7 +94040,7 @@ Object.defineProperty(exports, "videoIdIsValid", { return _video_tooling.videoIdIsValid; } }); -exports.timestampsCsvToActions = exports.createDefaultTimestampEntry = exports.InvalidFormatError = exports.createUuid = void 0; +exports.timestampsCsvToActions = exports.InvalidFormatError = exports.createUuid = exports.Timestamp = void 0; var utils = _interopRequireWildcard(require("./pure_tools.js")); @@ -94056,7 +94055,105 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } // import * as typedCsv from './typed_csv.js' // see the run/build script for why we can't just import this (and why its a global) -const createUuid = () => new Date().getTime() + `${Math.random()}`.slice(1); +class Timestamp { + constructor(arg = {}, { + currentTime = 0, + observer = "", + recentLabel = "" + } = { + currentTime: 0, + observer: "", + recentLabel: "" + }) { + this.timestampId = createUuid(); + this.videoId = null; + this.startTime = (currentTime || 0).toFixed(3) - 0; + this.endTime = (currentTime || 0).toFixed(3) - 0; + this.observer = observer || ""; + this.isHuman = true; + this.confirmedBy = []; + this.rejectedBy = []; + this.label = recentLabel || "example-label"; + this.labelConfidence = 1.0; + this.comment = ""; + this.spacialInfo = {}; + + for (const [key, value] of Object.entries(arg || {})) { + try { + this[key] = value; + } catch (error) {} + } + + this.confirmedBy = this.confirmedBy || []; + this.rejectedBy = this.rejectedBy || []; + } + /** + * guarentees timestampId will be correct and tries to help label, observer, startTime, endTime + */ + + + coerce() { + // + // enforce unix timestamp (e.g. id) + // + this.timestampId = coerceTimestampId(this.timestampId); // + // enforce simplfied names + // + + this.label = coerceLabel(this.label); // + // enforce numeric start/endTimes + // + + this.startTime -= 0; + this.endTime -= 0; + this.labelConfidence -= 0; // help customInfo show up + + this.customInfo = this.customInfo || {}; + return this; + } + + get type() { + return this.startTime !== this.endTime ? "segment" : "marker"; + } + + get confirmedBySomeone() { + return this.confirmedBy.length > 0; + } + + get rejectedBySomeone() { + return this.rejectedBy.length > 0; + } + + get duration() { + return this.endTime - this.startTime; + } + + toJSON() { + return { + timestampId: this.timestampId, + "(type)": this.type, + videoId: this.videoId, + startTime: this.startTime, + endTime: this.endTime, + observer: this.observer, + isHuman: this.isHuman, + "(confirmedBySomeone)": this.confirmedBySomeone, + "(rejectedBySomeone)": this.rejectedBySomeone, + confirmedBy: [...this.confirmedBy], + rejectedBy: [...this.rejectedBy], + label: this.label, + labelConfidence: this.labelConfidence, + comment: this.comment, + spacialInfo: JSON.parse(JSON.stringify(this.spacialInfo || {})), + customInfo: JSON.parse(JSON.stringify(this.customInfo || {})) + }; + } + +} + +exports.Timestamp = Timestamp; + +const createUuid = () => `v${new Date().getTime()}${Math.random()}`.slice(1); exports.createUuid = createUuid; const namePattern = /^[a-z0-9-.]+$/; @@ -94079,32 +94176,12 @@ class InvalidFormatError extends Error { return yaml.stringify(this.messages); } -} - -exports.InvalidFormatError = InvalidFormatError; - -const createDefaultTimestampEntry = currentTime => ({ - timestampId: createUuid(), - type: "marker", - videoId: null, - startTime: (currentTime || 0).toFixed(3) - 0, - endTime: (currentTime || 0).toFixed(3) - 0, - observer: window.storageObject.observer || "", - isHuman: true, - confirmedBySomeone: false, - rejectedBySomeone: false, - confirmedBy: [], - rejectedBy: [], - label: window.storageObject.recentLabel || "example-label", - labelConfidence: 0.95, - comment: "", - spacialInfo: {} -}); // +} // // indvidual coercsion // -exports.createDefaultTimestampEntry = createDefaultTimestampEntry; +exports.InvalidFormatError = InvalidFormatError; const nameCoerce = name => (0, _string_helpers.toKebabCase)((name || "").toLowerCase().replace(/[^a-zA-Z0-9-.]/g, "-"), { keepTrailingSeparators: true, @@ -94192,49 +94269,6 @@ function quickLocalValidationCheck({ videoId: (0, _video_tooling.videoIdIsValid)(timestampData.videoId) }; } -/** - * guarentees timestampId will be correct and tries to help label, observer, startTime, endTime - */ - - -function coerceTimestamp(timestampEntry) { - // doing this prevents/removes extraneous properties - timestampEntry = { - timestampId: timestampEntry?.timestampId, - type: timestampEntry?.startTime != timestampEntry?.endTime ? "segment" : "marker", - videoId: timestampEntry?.videoId, - startTime: timestampEntry?.startTime, - endTime: timestampEntry?.endTime, - observer: timestampEntry?.observer, - isHuman: timestampEntry?.isHuman, - confirmedBySomeone: timestampEntry?.confirmedBySomeone, - rejectedBySomeone: timestampEntry?.rejectedBySomeone, - confirmedBy: timestampEntry?.confirmedBy || [], - rejectedBy: timestampEntry?.rejectedBy || [], - label: timestampEntry?.label, - labelConfidence: timestampEntry?.labelConfidence, - comment: timestampEntry?.comment, - spacialInfo: timestampEntry?.spacialInfo, - customInfo: timestampEntry?.customInfo - }; // - // enforce unix timestamp (e.g. id) - // - - timestampEntry.timestampId = coerceTimestampId(timestampEntry.timestampId); // - // enforce simplfied names - // - - timestampEntry.label = coerceLabel(timestampEntry.label); // - // enforce numeric start/endTimes - // - - timestampEntry.startTime -= 0; - timestampEntry.endTime -= 0; - timestampEntry.labelConfidence -= 0; // help customInfo show up - - timestampEntry.customInfo = timestampEntry.customInfo || {}; - return timestampEntry; -} function validateTimestamps(timestamps) { const errorMessagesPerTimestamp = []; @@ -94335,48 +94369,17 @@ function validateTimestamps(timestamps) { // -const timestampDownlaodHeaders = ["uploadAction", "timestampId", "(type)", "videoId", "startTime", "endTime", "observer", "isHuman", "(confirmedBySomeone)", "(rejectedBySomeone)", "confirmedBy", "rejectedBy", "label", "labelConfidence", "comment", "spacialInfo"]; - function timestampsToCsv(entries) { const timestamps = []; for (const each of entries) { - // TODO: do coersion of correctness on download - let confirmedBy = each?.confirmedBy || []; - - if (!confirmedBy || confirmedBy instanceof Array && confirmedBy.length == 0) { - confirmedBy = null; - } - - let rejectedBy = each?.rejectedBy || []; - - if (!rejectedBy || rejectedBy instanceof Array && rejectedBy.length == 0) { - rejectedBy = null; - } - - timestamps.push({ - "uploadAction": "update", - "timestampId": each.timestampId, - "(type)": each.startTime != each.endTime ? "segment" : "marker", - "videoId": each.videoId, - "startTime": each.startTime, - "endTime": each.endTime, - "observer": each.observer, - "isHuman": each.isHuman, - "(confirmedBySomeone)": each.confirmedBy instanceof Array && each.confirmedBy.length > 0, - "(rejectedBySomeone)": each.rejectedBy instanceof Array && each.rejectedBy.length > 0, - confirmedBy, - rejectedBy, - "label": each.label, - "labelConfidence": each.labelConfidence, - "comment": each.comment || null, - "spacialInfo": Object.keys(each?.spacialInfo || {}).length > 0 ? each.spacialInfo : null - }); // flatten out video - - for (const [key, value] of Object.entries(each.video || {})) { - timestamps.slice(-1)[0][`(video.${key})`] = value; - } // flatten out customInfo - + const outputTimestamp = new Timestamp(each).toJSON(); + timestamps.push(outputTimestamp); // NOTE: there is no video key + // // flatten out video + // for (const [key, value] of Object.entries(each.video||{})) { + // timestamps.slice(-1)[0][`(video.${key})`] = value + // } + // flatten out customInfo for (const [key, value] of Object.entries(each.customInfo || {})) { timestamps.slice(-1)[0][`customInfo.${key}`] = value; @@ -94387,6 +94390,8 @@ function timestampsToCsv(entries) { return output; } +const autoProcessKeys = Object.keys(new Timestamp()).filter(key => key != "customInfo"); + const timestampsCsvToActions = async csvString => { const { headers, @@ -94421,9 +94426,7 @@ const timestampsCsvToActions = async csvString => { } } - const detectedKeys = ["videoId", "startTime", "endTime", "observer", "isHuman", "label", "labelConfidence", "comment", "spacialInfo"]; - - for (const detectedKey of detectedKeys) { + for (const detectedKey of autoProcessKeys) { if (uploadAction == "update") { if (eachEntry[detectedKey] != null) { timestampObject[detectedKey] = eachEntry[detectedKey]; @@ -94433,8 +94436,6 @@ const timestampsCsvToActions = async csvString => { } } - eachEntry.confirmedBy = `${eachEntry.confirmedBy}`.split(","); - eachEntry.rejectedBy = `${eachEntry.rejectedBy}`.split(","); timestampActions.push([uploadAction, [timestampId], timestampObject]); } @@ -95498,7 +95499,7 @@ const frontendDb = { // synchonous changes before bulk set // if (withCoersion) { - timestampEntries = timestampEntries.map(timestampTooling.coerceTimestamp); + timestampEntries = timestampEntries.map(each => new timestampTooling.Timestamp(each).coerce()); } // // validate // @@ -95555,17 +95556,31 @@ const frontendDb = { where = [], returnObject = false }) { - return indexDb.select({ + const result = await indexDb.select({ from: "timestamps", where, returnObject }); + + if (returnObject) { + for (const [key, value] of Object.entries(result)) { + result[key] = new timestampTooling.Timestamp(value); + } + } else { + let i = 0; + + for (const each of result) { + result[i++] = new timestampTooling.Timestamp(each); + } + } + + return result; }, async deleteTimestamp({ - uuidOfSelectedSegment + uuidOfSelectedTimestamp }) { - return indexDb.deletes([["timestamps", uuidOfSelectedSegment]]); + return indexDb.deletes([["timestamps", uuidOfSelectedTimestamp]]); }, async getVideoById(videoId) { @@ -95827,8 +95842,8 @@ const frontendDb = { // - results["uncertain"] || (results["uncertain"] = {}); - results["uncertain"].color = "gray"; // sort results by largest segmentCount + results["comment"] || (results["comment"] = {}); + results["comment"].color = "gray"; // sort results by largest segmentCount results = Object.fromEntries(Object.entries(results).sort((0, _pure_tools.dynamicSort)([1, "segmentCount"], true))); return results; @@ -96157,7 +96172,7 @@ exports.default = _default; /* template */ Object.assign($0aeb93, (function () { - var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._g({staticClass:"side-button",class:{left: _vm.$attrs.left, right: _vm.$attrs.right}},this.$listeners),[_c('ui-tooltip',{attrs:{"position":"top","animation":"fade"}},[_vm._v(_vm._s(_vm.$attrs.left && "go to previous timestamp")+"\n"+_vm._s(_vm.$attrs.right && "go to next timestamp"))]),_c('span',[_vm._v(_vm._s(_vm.$attrs.left && "←")+"\n"+_vm._s(_vm.$attrs.right && "→"))])],1)} + var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._g({staticClass:"side-button",class:{left: _vm.$attrs.left, right: _vm.$attrs.right}},this.$listeners),[_c('ui-tooltip',{attrs:{"position":"top","animation":"fade"}},[_vm._v(_vm._s(_vm.$attrs.left && "go to previous timestamp (ctrl+left arrow)")+"\n"+_vm._s(_vm.$attrs.right && "go to next timestamp (ctrl+right arrow)"))]),_c('span',[_vm._v(_vm._s(_vm.$attrs.left && "←")+"\n"+_vm._s(_vm.$attrs.right && "→"))])],1)} var staticRenderFns = [] return { @@ -98316,8 +98331,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de // // const timestampTooling = { - coerceTimestamp: _timestamp_tooling.coerceTimestamp, - createDefaultTimestampEntry: _timestamp_tooling.createDefaultTimestampEntry, quickLocalValidationCheck: _timestamp_tooling.quickLocalValidationCheck, coerceLabel: _timestamp_tooling.coerceLabel, coerceObserver: _timestamp_tooling.coerceObserver, @@ -98331,7 +98344,7 @@ const timestampTooling = { // globalEvents.deleteTimestampRequest var _default = { - props: ["currentTime", "jumpSegment"], + props: ["currentTime", "jumpToTimestampByIndex"], components: { JsonTree: require('vue-json-tree').default, UiSwitch: require("../atoms/UiSwitch").default, @@ -98340,10 +98353,13 @@ var _default = { }, data() { - const defaultTimestampData = timestampTooling.coerceTimestamp(timestampTooling.createDefaultTimestampEntry()); return { window, - timestampData: defaultTimestampData, + timestampData: new _timestamp_tooling.Timestamp({}, { + currentTime: this.currentTime, + observer: window.storageObject.observer, + recentLabel: window.storageObject.recentLabel + }).coerce(), dataCopy: null, editing: false, dontShow: true, @@ -98352,7 +98368,7 @@ var _default = { }, mounted() { - window.Editor = this; // debugging + window.TimestampEditor = this; // debugging this.resetData(); this.$root.videoInterface.wheneverVideoIsLoaded(this.wheneverVideoChanges); @@ -98372,7 +98388,12 @@ var _default = { return !Object.values(this.isValid).some(value => !value); }, + invalidFields() { + return Object.entries(this.isValid).filter(([key, value]) => !value).map(([key, value]) => key); + }, + isValid() { + // its bad to mutate inside of a computed property, but whatever if (this.timestampData.endTime < this.timestampData.startTime) { this.timestampData.endTime = this.timestampData.startTime; } @@ -98387,12 +98408,12 @@ var _default = { rootHooks: { watch: { // when the selected segment changes - selectedSegment() { - let selectedSegment = this.$root.selectedSegment; - console.log(`selectedSegment is:`, selectedSegment); + selectedTimestamp() { + let selectedTimestamp = this.$root.selectedTimestamp; + console.log(`selectedTimestamp is:`, selectedTimestamp); - if (selectedSegment instanceof Object) { - this.timestampData = timestampTooling.coerceTimestamp(selectedSegment); + if (selectedTimestamp instanceof Object) { + this.timestampData = new _timestamp_tooling.Timestamp(selectedTimestamp).coerce(); } }, @@ -98522,11 +98543,11 @@ var _default = { }, noSegment() { - return !(this.$root.selectedSegment instanceof Object) && !this.editing; + return !(this.$root.selectedTimestamp instanceof Object) && !this.editing; }, deSelectSegment() { - this.$root.selectedSegment = null; + this.$root.selectedTimestamp = null; }, async onNewTimestamp() { @@ -98538,17 +98559,17 @@ var _default = { onEditTimestamp() { // save a copy encase they cancel - this.dataCopy = JSON.parse(JSON.stringify(this.timestampData)); // instantly convert to kebab case if somehow it isn't already + this.dataCopy = this.timestampData.toJSON(); // this is redundant but whatever - this.timestampData.label = (0, _basicsBundle.toKebabCase)(`${this.timestampData.label}`.toLowerCase()); + this.timestampData.label = timestampTooling.coerceLabel(this.timestampData.label); this.timestampData.videoId = this.$root.videoInterface.videoId; this.timestampData.observer = this.$root.email; this.editing = true; }, onCancelEdit() { - // save a copy encase they cancel - this.timestampData = JSON.parse(JSON.stringify(this.dataCopy)); + // restore copy + this.timestampData = new _timestamp_tooling.Timestamp(this.dataCopy); this.editing = false; }, @@ -98564,7 +98585,7 @@ var _default = { } if (!this.allValid) { - this.$toasted.show(`Some fields are invalid`).goAway(2500); + this.$toasted.show(`These fields are invalid: ${this.invalidFields}`).goAway(3500); return; } @@ -98600,7 +98621,7 @@ var _default = { async onDelete() { console.log(`onDelete called`); this.editing = false; - let index = this.$root.selectedSegment.$displayIndex; + let index = this.$root.selectedTimestamp.$displayIndex; const timestampId = this.timestampData.timestampId; if (timestampId) { @@ -98609,16 +98630,21 @@ var _default = { this.$toasted.show(`Data has been deleted`).goAway(2500); } - this.$root.selectedSegment = {}; // go to next segment + this.$root.selectedTimestamp = {}; // go to next segment - this.jumpSegment(index + 1); + this.jumpToTimestampByIndex(index + 1); }, resetData() { this.editing = false; this.dataCopy = {}; - this.timestampData = timestampTooling.createDefaultTimestampEntry(this.currentTime); - this.timestampData.videoId = this.$root.videoInterface.videoId; + this.timestampData = new _timestamp_tooling.Timestamp({ + videoId: this.$root.videoInterface.videoId + }, { + currentTime: this.currentTime, + observer: window.storageObject.observer, + recentLabel: window.storageObject.recentLabel + }).coerce(); }, setStartToCurrentTime() { @@ -98640,7 +98666,7 @@ exports.default = _default; /* template */ Object.assign($775800, (function () { - var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{attrs:{"data-fjio3y598t3hi2":"data-fjio3y598t3hi2","width":"min-content","margin-bottom":"2rem","align-self":"flex-start","position":"relative","min-width":"20rem","min-height":"44vh"}},[_c('column',{staticClass:"add-container"},[_c('ui-button',{staticClass:"add-button",style:(("opacity: " + (_vm.editing?0:1))),attrs:{"icon":"add","color":"primary","raised":"raised","tooltip":"create a new timestamp","tooltipPosition":"right"},on:{"click":_vm.onNewTimestamp}},[_vm._v("New Timestamp")])],1),_c('container',{attrs:{"height":"20px"}}),_c('transition',{attrs:{"name":"fade"}},[_c('column',{staticClass:"timestamp-widget",attrs:{"min-height":"37rem","position":"relative","align-v":"top"}},[(!_vm.noSegment() && !_vm.editing)?_c('row',{staticStyle:{"position":"absolute","font-size":"1rem","color":"gray","right":"0.9rem","top":"0.7rem","cursor":"pointer","opacity":"0.5"},on:{"click":_vm.deSelectSegment}},[_vm._v("X"),_c('ui-tooltip',{attrs:{"position":"top","animation":"fade"}},[_vm._v("De-Select this segment")])],1):_vm._e(),(_vm.noSegment())?_c('row',{staticStyle:{"position":"absolute","width":"100%","height":"100%","font-size":"1.476rem","color":"gray"}},[_vm._v("No Timestamp Selected")]):_vm._e(),(!_vm.noSegment())?_c('column',{attrs:{"align-h":"center","width":"100%"}},[_c('transition',{attrs:{"name":"fade"}},[_c('column',{attrs:{"width":"100%"}},[(!_vm.noSegment() || _vm.editing)?_c('row',{staticClass:"button-row",attrs:{"align-h":"space-evenly","width":"100%","margin-bottom":"0.7rem","margin-top":"0.5rem","display":_vm.editing?'flex':'none'}},[_c('ui-button',{staticClass:"save-button",style:(("opacity: " + (_vm.editing?1:0))),attrs:{"icon":"save","color":"primary"},on:{"click":_vm.onSaveEdit}},[_vm._v("Save")]),_c('container',{attrs:{"flex-basis":"10%","width":"10%"}}),_c('ui-button',{staticClass:"delete-button",style:(("opacity: " + (_vm.editing?1:0))),attrs:{"icon":"delete","color":"red"},on:{"click":_vm.onDelete}},[_vm._v("Delete")])],1):_vm._e(),(!_vm.noSegment() && !_vm.editing)?_c('row',{staticClass:"button-row",attrs:{"align-h":"space-evenly","width":"100%","margin-bottom":"0.7rem","margin-top":"0.5rem","display":(!_vm.noSegment() && !_vm.editing)?'flex':'none'}},[_c('ui-button',{staticClass:"confirm-button",style:(("opacity: " + ((_vm.editing) && _vm.$root.selectedSegment?0:1) + "; --button-color: " + (_vm.hasRejected()? 'darkgray' : 'var(--soft-green)') + "; min-width: 7rem; font-size: 0.7em; " + (_vm.isOwner ? 'opacity: 0.3; box-shadow: 0 0 0 1px; color: gray;' : '') + " ")),attrs:{"tooltip":_vm.isOwner ? "(only someone else can confirm your timestamp)" : "Click if you agree with this timestamp","icon":"check"},on:{"click":_vm.toggleConfirm}},[_vm._v(_vm._s(_vm.hasConfirmed()? "Confirmed" : "Confirm"))]),_c('container',{attrs:{"flex-basis":"10%","width":"10%"}}),_c('ui-button',{staticClass:"reject-button",style:(("opacity: " + ((_vm.editing) && _vm.$root.selectedSegment?0:1) + "; --button-color: " + (_vm.hasConfirmed()? 'darkgray' : 'var(--red)') + "; min-width: 7rem; font-size: 0.7em;" + (_vm.isOwner ? 'opacity: 0.3; box-shadow: 0 0 0 1px; color: gray;' : '') + " ")),attrs:{"tooltip":_vm.isOwner ? "(only someone else can reject your timestamp)" : "Click if you disagree with this timestamp","icon":"cancel"},on:{"click":_vm.toggleReject}},[_vm._v(_vm._s(_vm.hasRejected()? "Rejected" : "Reject"))])],1):_vm._e()],1)],1)],1):_vm._e(),_c('container',{attrs:{"height":"10px"}}),_c('transition',{attrs:{"name":"fade"}},[(!_vm.noSegment())?_c('row',{attrs:{"align-h":"space-between","width":"100%"}},[_c('h5',{staticStyle:{"font-size":"1.35rem"}},[_vm._v("Timestamp")]),_c('container',{attrs:{"position":"relative"}},[_c('ui-button',{staticClass:"edit-button",style:(("opacity: " + ((!_vm.editing) && _vm.$root.selectedSegment?1:0) + "; width: 7rem;")),attrs:{"icon":"edit","color":"primary"},on:{"click":_vm.onEditTimestamp}},[_vm._v("Edit")]),_c('transition',{attrs:{"name":"fade"}},[_c('ui-button',{staticClass:"cancel-button",style:(("position: absolute; opacity: " + (_vm.editing?1:0) + "; pointer-events: " + (_vm.editing?'all':'none') + ";")),attrs:{"icon":"cancel","color":"accent"},on:{"click":_vm.onCancelEdit}},[_vm._v("Cancel")])],1)],1)],1):_vm._e()],1),_c('transition',{attrs:{"name":"fade"}},[(!_vm.noSegment())?_c('container',{staticClass:"input-area",attrs:{"margin-top":"2rem"},on:{"keydown":_vm.preventBubbling,"click":_vm.handleClickToEdit}},[_c('row',{staticClass:"start-time-wrapper"},[_c('ui-textbox',{attrs:{"tabindex":"1","disabled":!_vm.editing,"label":"Start Time (seconds)","placeholder":("" + (_vm.timestampData.startTime)),"invalid":!_vm.isValid.startTime,"type":"number"},model:{value:(_vm.timestampData.startTime),callback:function ($$v) {_vm.$set(_vm.timestampData, "startTime", _vm._n($$v))},expression:"timestampData.startTime"}}),(_vm.editing)?_c('ui-button',{staticClass:"set-to-current-time-button",attrs:{"tabindex":"-1","color":"primary","size":"small","tooltip":"Set start time to current video time","tooltipPosition":"top"},on:{"click":_vm.setStartToCurrentTime}},[_c('ui-icon',[_vm._v("skip_next")])],1):_vm._e()],1),_c('row',{staticClass:"end-time-wrapper"},[_c('ui-textbox',{ref:"endTimeElement",attrs:{"tabindex":"2","disabled":!_vm.editing,"label":"End Time (seconds)","placeholder":("" + (_vm.timestampData.endTime)),"invalid":!_vm.isValid.endTime,"type":"number"},model:{value:(_vm.timestampData.endTime),callback:function ($$v) {_vm.$set(_vm.timestampData, "endTime", _vm._n($$v))},expression:"timestampData.endTime"}}),(_vm.editing)?_c('ui-button',{staticClass:"set-to-current-time-button",attrs:{"tabindex":"-1","color":"primary","size":"small","tooltip":"Set end time to current video time","tooltipPosition":"top"},on:{"click":_vm.setEndToCurrentTime}},[_c('ui-icon',[_vm._v("skip_next")])],1):_vm._e(),(_vm.editing)?_c('ui-tooltip',{attrs:{"position":"left","animation":"fade","trigger":_vm.$refs.endTimeElement}},[_vm._v(_vm._s("> start, ≤ duration"))]):_vm._e()],1),_c('div',{attrs:{"tabindex":"-1"}},[(_vm.editing)?_c('ui-tooltip',{attrs:{"position":"left","animation":"fade","trigger":_vm.$refs.labelElement}},[_vm._v("all lowercase letters, numbers, dashes and periods")]):_vm._e(),_c('UiAutocomplete',{ref:"labelElement",attrs:{"tabindex":"3","invalid":!_vm.isValid.label,"suggestions":Object.keys(_vm.$root.labels),"disabled":!_vm.editing,"minChars":"0","floating-label":"floating-label","label":"Label"},on:{"select":_vm.onLabelChange,"input":_vm.onLabelChange,"paste":_vm.onLabelChange},model:{value:(_vm.timestampData.label),callback:function ($$v) {_vm.$set(_vm.timestampData, "label", $$v)},expression:"timestampData.label"}})],1),_c('div',{attrs:{"tabindex":"-1"}},[(_vm.editing)?_c('ui-tooltip',{attrs:{"position":"left","animation":"fade","trigger":_vm.$refs.labelConfidenceElement}},[_vm._v("a value between -1 and 1")]):_vm._e(),_c('ui-textbox',{ref:"labelConfidenceElement",attrs:{"tabindex":"4","disabled":!_vm.editing,"floating-label":"floating-label","label":"Label Confidence","invalid":!_vm.isValid.labelConfidence},model:{value:(_vm.timestampData.labelConfidence),callback:function ($$v) {_vm.$set(_vm.timestampData, "labelConfidence", $$v)},expression:"timestampData.labelConfidence"}})],1),_c('div',{attrs:{"tabindex":"-1"}},[_c('UiTextbox',{attrs:{"tabindex":"5","disabled":!_vm.editing,"floating-label":"floating-label","label":"Comment"},model:{value:(_vm.timestampData.comment),callback:function ($$v) {_vm.$set(_vm.timestampData, "comment", $$v)},expression:"timestampData.comment"}})],1),_c('div',{staticStyle:{"min-height":"4rem"}}),(!_vm.noSegment())?_c('column',{attrs:{"align-h":"center","width":"90%","background":"whitesmoke","border-radius":"1rem","padding":"1rem","overflow":_vm.showOtherData?'auto':'hidden',"position":"absolute","bottom":"1rem","left":"5%","box-shadow":"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3)"},on:{"mouseenter":_vm.doShowOtherData,"mouseleave":_vm.hideOtherData}},[_c('span',{staticStyle:{"width":"12rem","text-align":"center","color":"var(--gray)","padding":"0.5rem","border-radius":"1rem"}},[_vm._v("other data")]),_c('transition',{attrs:{"name":"quick-fade"}},[_c('column',{style:(("transition: all ease 0.3s; opacity: " + (_vm.showOtherData?1:0) + "; max-height: " + (_vm.showOtherData?'40rem':0) + "; height: fit-content; max-width: 100%; min-width: 100%; ")),attrs:{"align-h":"left"}},[_c('div',{staticStyle:{"margin-top":"0.5rem"}}),_c('div',[_c('ui-textbox',{ref:"observerElement",attrs:{"disabled":true,"floating-label":"floating-label","label":"Observer","invalid":!_vm.isValid.observer},on:{"change":_vm.onObserverChange,"input":_vm.onObserverChange},model:{value:(_vm.timestampData.observer),callback:function ($$v) {_vm.$set(_vm.timestampData, "observer", $$v)},expression:"timestampData.observer"}})],1),_c('ui-textbox',{attrs:{"disabled":true,"floating-label":"floating-label","label":"Created At"},model:{value:(_vm.humanTime),callback:function ($$v) {_vm.humanTime=$$v},expression:"humanTime"}}),_c('ui-textbox',{attrs:{"disabled":true,"floating-label":"floating-label","label":"Video Id","invalid":!_vm.isValid.videoId},model:{value:(_vm.timestampData.videoId),callback:function ($$v) {_vm.$set(_vm.timestampData, "videoId", $$v)},expression:"timestampData.videoId"}}),_c('ui-textbox',{staticStyle:{"margin-top":"-0.4rem"},attrs:{"disabled":true,"floating-label":"floating-label","label":"Timestamp Id","tooltip":"This is based on 'Created At'"},model:{value:(_vm.timestampData.timestampId),callback:function ($$v) {_vm.$set(_vm.timestampData, "timestampId", $$v)},expression:"timestampData.timestampId"}}),_c('column',{attrs:{"align-h":"left","color":"gray","width":"100%","max-width":"100%","overflow":"auto"}},[_vm._v("customInfo"),_c('JsonTree',{staticClass:"json-tree",attrs:{"data":_vm.timestampData.customInfo||{}}})],1)],1)],1)],1):_vm._e()],1):_vm._e()],1)],1)],1)],1)} + var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{attrs:{"data-fjio3y598t3hi2":"data-fjio3y598t3hi2","width":"min-content","margin-bottom":"2rem","align-self":"flex-start","position":"relative","min-width":"20rem","min-height":"44vh"}},[_c('column',{staticClass:"add-container"},[_c('ui-button',{staticClass:"add-button",style:(("opacity: " + (_vm.editing?0:1))),attrs:{"icon":"add","color":"primary","raised":"raised","tooltip":"create a new timestamp","tooltipPosition":"right"},on:{"click":_vm.onNewTimestamp}},[_vm._v("New Timestamp")])],1),_c('container',{attrs:{"height":"20px"}}),_c('transition',{attrs:{"name":"fade"}},[_c('column',{staticClass:"timestamp-widget",attrs:{"min-height":"37rem","position":"relative","align-v":"top"}},[(!_vm.noSegment() && !_vm.editing)?_c('row',{staticStyle:{"position":"absolute","font-size":"1rem","color":"gray","right":"0.9rem","top":"0.7rem","cursor":"pointer","opacity":"0.5"},on:{"click":_vm.deSelectSegment}},[_vm._v("X"),_c('ui-tooltip',{attrs:{"position":"top","animation":"fade"}},[_vm._v("De-Select this segment")])],1):_vm._e(),(_vm.noSegment())?_c('row',{staticStyle:{"position":"absolute","width":"100%","height":"100%","font-size":"1.476rem","color":"gray"}},[_vm._v("No Timestamp Selected")]):_vm._e(),(!_vm.noSegment())?_c('column',{attrs:{"align-h":"center","width":"100%"}},[_c('transition',{attrs:{"name":"fade"}},[_c('column',{attrs:{"width":"100%"}},[(!_vm.noSegment() || _vm.editing)?_c('row',{staticClass:"button-row",attrs:{"align-h":"space-evenly","width":"100%","margin-bottom":"0.7rem","margin-top":"0.5rem","display":_vm.editing?'flex':'none'}},[_c('ui-button',{staticClass:"save-button",style:(("opacity: " + (_vm.editing?1:0))),attrs:{"icon":"save","color":"primary"},on:{"click":_vm.onSaveEdit}},[_vm._v("Save")]),_c('container',{attrs:{"flex-basis":"10%","width":"10%"}}),_c('ui-button',{staticClass:"delete-button",style:(("opacity: " + (_vm.editing?1:0))),attrs:{"icon":"delete","color":"red"},on:{"click":_vm.onDelete}},[_vm._v("Delete")])],1):_vm._e(),(!_vm.noSegment() && !_vm.editing)?_c('row',{staticClass:"button-row",attrs:{"align-h":"space-evenly","width":"100%","margin-bottom":"0.7rem","margin-top":"0.5rem","display":(!_vm.noSegment() && !_vm.editing)?'flex':'none'}},[_c('ui-button',{staticClass:"confirm-button",style:(("opacity: " + ((_vm.editing) && _vm.$root.selectedTimestamp?0:1) + "; --button-color: " + (_vm.hasRejected()? 'darkgray' : 'var(--soft-green)') + "; min-width: 7rem; font-size: 0.7em; " + (_vm.isOwner ? 'opacity: 0.3; box-shadow: 0 0 0 1px; color: gray;' : '') + " ")),attrs:{"tooltip":_vm.isOwner ? "(only someone else can confirm your timestamp)" : "Click if you agree with this timestamp","icon":"check"},on:{"click":_vm.toggleConfirm}},[_vm._v(_vm._s(_vm.hasConfirmed()? "Confirmed" : "Confirm"))]),_c('container',{attrs:{"flex-basis":"10%","width":"10%"}}),_c('ui-button',{staticClass:"reject-button",style:(("opacity: " + ((_vm.editing) && _vm.$root.selectedTimestamp?0:1) + "; --button-color: " + (_vm.hasConfirmed()? 'darkgray' : 'var(--red)') + "; min-width: 7rem; font-size: 0.7em;" + (_vm.isOwner ? 'opacity: 0.3; box-shadow: 0 0 0 1px; color: gray;' : '') + " ")),attrs:{"tooltip":_vm.isOwner ? "(only someone else can reject your timestamp)" : "Click if you disagree with this timestamp","icon":"cancel"},on:{"click":_vm.toggleReject}},[_vm._v(_vm._s(_vm.hasRejected()? "Rejected" : "Reject"))])],1):_vm._e()],1)],1)],1):_vm._e(),_c('container',{attrs:{"height":"10px"}}),_c('transition',{attrs:{"name":"fade"}},[(!_vm.noSegment())?_c('row',{attrs:{"align-h":"space-between","width":"100%"}},[_c('h5',{staticStyle:{"font-size":"1.35rem"}},[_vm._v("Timestamp")]),_c('container',{attrs:{"position":"relative"}},[_c('ui-button',{staticClass:"edit-button",style:(("opacity: " + ((!_vm.editing) && _vm.$root.selectedTimestamp?1:0) + "; width: 7rem;")),attrs:{"icon":"edit","color":"primary"},on:{"click":_vm.onEditTimestamp}},[_vm._v("Edit")]),_c('transition',{attrs:{"name":"fade"}},[_c('ui-button',{staticClass:"cancel-button",style:(("position: absolute; opacity: " + (_vm.editing?1:0) + "; pointer-events: " + (_vm.editing?'all':'none') + ";")),attrs:{"icon":"cancel","color":"accent"},on:{"click":_vm.onCancelEdit}},[_vm._v("Cancel")])],1)],1)],1):_vm._e()],1),_c('transition',{attrs:{"name":"fade"}},[(!_vm.noSegment())?_c('container',{staticClass:"input-area",attrs:{"margin-top":"2rem"},on:{"keydown":_vm.preventBubbling,"click":_vm.handleClickToEdit}},[_c('row',{staticClass:"start-time-wrapper"},[_c('ui-textbox',{attrs:{"tabindex":"1","disabled":!_vm.editing,"label":"Start Time (seconds)","placeholder":("" + (_vm.timestampData.startTime)),"invalid":!_vm.isValid.startTime,"type":"number"},model:{value:(_vm.timestampData.startTime),callback:function ($$v) {_vm.$set(_vm.timestampData, "startTime", _vm._n($$v))},expression:"timestampData.startTime"}}),(_vm.editing)?_c('ui-button',{staticClass:"set-to-current-time-button",attrs:{"tabindex":"-1","color":"primary","size":"small","tooltip":"Set start time to current video time","tooltipPosition":"top"},on:{"click":_vm.setStartToCurrentTime}},[_c('ui-icon',[_vm._v("skip_next")])],1):_vm._e()],1),_c('row',{staticClass:"end-time-wrapper"},[_c('ui-textbox',{ref:"endTimeElement",attrs:{"tabindex":"2","disabled":!_vm.editing,"label":"End Time (seconds)","placeholder":("" + (_vm.timestampData.endTime)),"invalid":!_vm.isValid.endTime,"type":"number"},model:{value:(_vm.timestampData.endTime),callback:function ($$v) {_vm.$set(_vm.timestampData, "endTime", _vm._n($$v))},expression:"timestampData.endTime"}}),(_vm.editing)?_c('ui-button',{staticClass:"set-to-current-time-button",attrs:{"tabindex":"-1","color":"primary","size":"small","tooltip":"Set end time to current video time","tooltipPosition":"top"},on:{"click":_vm.setEndToCurrentTime}},[_c('ui-icon',[_vm._v("skip_next")])],1):_vm._e(),(_vm.editing)?_c('ui-tooltip',{attrs:{"position":"left","animation":"fade","trigger":_vm.$refs.endTimeElement}},[_vm._v(_vm._s("> start, ≤ duration"))]):_vm._e()],1),_c('div',{attrs:{"tabindex":"-1"}},[(_vm.editing)?_c('ui-tooltip',{attrs:{"position":"left","animation":"fade","trigger":_vm.$refs.labelElement}},[_vm._v("all lowercase letters, numbers, dashes and periods")]):_vm._e(),_c('UiAutocomplete',{ref:"labelElement",attrs:{"tabindex":"3","invalid":!_vm.isValid.label,"suggestions":Object.keys(_vm.$root.labels),"disabled":!_vm.editing,"minChars":"0","floating-label":"floating-label","label":"Label"},on:{"select":_vm.onLabelChange,"input":_vm.onLabelChange,"paste":_vm.onLabelChange},model:{value:(_vm.timestampData.label),callback:function ($$v) {_vm.$set(_vm.timestampData, "label", $$v)},expression:"timestampData.label"}})],1),_c('div',{attrs:{"tabindex":"-1"}},[(_vm.editing)?_c('ui-tooltip',{attrs:{"position":"left","animation":"fade","trigger":_vm.$refs.labelConfidenceElement}},[_vm._v("a value between -1 and 1")]):_vm._e(),_c('ui-textbox',{ref:"labelConfidenceElement",attrs:{"tabindex":"4","disabled":!_vm.editing,"floating-label":"floating-label","label":"Label Confidence","invalid":!_vm.isValid.labelConfidence},model:{value:(_vm.timestampData.labelConfidence),callback:function ($$v) {_vm.$set(_vm.timestampData, "labelConfidence", $$v)},expression:"timestampData.labelConfidence"}})],1),_c('div',{attrs:{"tabindex":"-1"}},[_c('UiTextbox',{attrs:{"tabindex":"5","disabled":!_vm.editing,"floating-label":"floating-label","label":"Comment"},model:{value:(_vm.timestampData.comment),callback:function ($$v) {_vm.$set(_vm.timestampData, "comment", $$v)},expression:"timestampData.comment"}})],1),_c('div',{staticStyle:{"min-height":"4rem"}}),(!_vm.noSegment())?_c('column',{attrs:{"align-h":"center","width":"90%","background":"whitesmoke","border-radius":"1rem","padding":"1rem","overflow":_vm.showOtherData?'auto':'hidden',"position":"absolute","bottom":"1rem","left":"5%","box-shadow":"0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3)"},on:{"mouseenter":_vm.doShowOtherData,"mouseleave":_vm.hideOtherData}},[_c('span',{staticStyle:{"width":"12rem","text-align":"center","color":"var(--gray)","padding":"0.5rem","border-radius":"1rem"}},[_vm._v("other data")]),_c('transition',{attrs:{"name":"quick-fade"}},[_c('column',{style:(("transition: all ease 0.3s; opacity: " + (_vm.showOtherData?1:0) + "; max-height: " + (_vm.showOtherData?'40rem':0) + "; height: fit-content; max-width: 100%; min-width: 100%; ")),attrs:{"align-h":"left"}},[_c('div',{staticStyle:{"margin-top":"0.5rem"}}),_c('div',[_c('ui-textbox',{ref:"observerElement",attrs:{"disabled":true,"floating-label":"floating-label","label":"Observer","invalid":!_vm.isValid.observer},on:{"change":_vm.onObserverChange,"input":_vm.onObserverChange},model:{value:(_vm.timestampData.observer),callback:function ($$v) {_vm.$set(_vm.timestampData, "observer", $$v)},expression:"timestampData.observer"}})],1),_c('ui-textbox',{attrs:{"disabled":true,"floating-label":"floating-label","label":"Created At"},model:{value:(_vm.humanTime),callback:function ($$v) {_vm.humanTime=$$v},expression:"humanTime"}}),_c('ui-textbox',{attrs:{"disabled":true,"floating-label":"floating-label","label":"Video Id","invalid":!_vm.isValid.videoId},model:{value:(_vm.timestampData.videoId),callback:function ($$v) {_vm.$set(_vm.timestampData, "videoId", $$v)},expression:"timestampData.videoId"}}),_c('ui-textbox',{staticStyle:{"margin-top":"-0.4rem"},attrs:{"disabled":true,"floating-label":"floating-label","label":"Timestamp Id","tooltip":"This is based on 'Created At'"},model:{value:(_vm.timestampData.timestampId),callback:function ($$v) {_vm.$set(_vm.timestampData, "timestampId", $$v)},expression:"timestampData.timestampId"}}),_c('column',{attrs:{"align-h":"left","color":"gray","width":"100%","max-width":"100%","overflow":"auto"}},[_vm._v("customInfo"),_c('JsonTree',{staticClass:"json-tree",attrs:{"data":_vm.timestampData.customInfo||{}}})],1)],1)],1)],1):_vm._e()],1):_vm._e()],1)],1)],1)],1)} var staticRenderFns = [] return { @@ -98652,7 +98678,7 @@ var staticRenderFns = [] }; })()); -},{"vue":"NtAQ","../tooling/timestamp_tooling.js":"qVTX","../tooling/database.js":"GPZG","../tooling/basics.bundle.js":"WnUT","../tooling/pure_tools.js":"b1NV","../tooling/events.js":"kB7J","vue-json-tree":"vQbQ","../atoms/UiSwitch":"iTmx","../atoms/UiTextbox":"eU8V","../atoms/UiAutocomplete":"ieyg"}],"RG1B":[function(require,module,exports) { +},{"vue":"NtAQ","../tooling/timestamp_tooling.js":"qVTX","../tooling/database.js":"GPZG","../tooling/basics.bundle.js":"WnUT","../tooling/pure_tools.js":"b1NV","../tooling/events.js":"kB7J","vue-json-tree":"vQbQ","../atoms/UiSwitch":"iTmx","../atoms/UiTextbox":"eU8V","../atoms/UiAutocomplete":"ieyg"}],"Re3h":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -98753,7 +98779,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; // // // -// const { get, set @@ -98777,38 +98802,38 @@ var _default = { }, data: () => ({ allLabelsOn: false, - segmentsInfo: { + timestampsInfo: { maxLevel: 1, - organizedSegments: [] + organizedTimestamps: [] }, - processedKeySegments: [] + processedKeyTimestamps: [] }), mounted() { - window.SegmentDisplay = this; - this.$root.videoInterface.wheneverVideoIsLoaded(this.resetSelectedSegment); + window.TimelineDisplay = this; + this.$root.videoInterface.wheneverVideoIsLoaded(this.resetselectedTimestamp); this.$root.videoInterface.onceVideoIsLoaded(() => { untracked.caller = "initalLoad"; - this.updateSegments(); + this.updateTimeline(); }); - const name = "SegmentDisplay"; + const name = "TimelineDisplay"; (0, _events.everyTime)(_events.globalEvents.timestampStorageUpdatedEntries).then((who, updatedTimestampEntries) => { console.log(`${name} saw [timestampStorageUpdatedEntries] from ${who}`); const updatedTimestampEntriesIds = updatedTimestampEntries.map(each => each.timestampId); console.debug(`updatedTimestampEntries is:`, updatedTimestampEntries); // this should cause the segment display to update - this.$root.videoInterface.keySegments = [...this.$root.videoInterface.keySegments.filter(each => !updatedTimestampEntriesIds.includes(each.timestampId)), ...updatedTimestampEntries]; - this.updateSegments(); + this.$root.videoInterface.keyTimestamps = [...this.$root.videoInterface.keyTimestamps.filter(each => !updatedTimestampEntriesIds.includes(each.timestampId)), ...updatedTimestampEntries]; + this.updateTimeline(); }); (0, _events.everyTime)(_events.globalEvents.timestampStorageDeletedEntries).then((who, deletedTimestampIds) => { console.log(`${name} saw [timestampStorageDeletedEntries] from ${who}`); // this should cause the segment display to update - this.$root.videoInterface.keySegments = [...this.$root.videoInterface.keySegments.filter(each => !deletedTimestampIds.includes(each.timestampId))]; - this.updateSegments(); + this.$root.videoInterface.keyTimestamps = [...this.$root.videoInterface.keyTimestamps.filter(each => !deletedTimestampIds.includes(each.timestampId))]; + this.updateTimeline(); }); (0, _events.everyTime)(_events.globalEvents.addedLabel).then(who => { console.log(`${name} saw [addedLabel] from ${who}`); - this.updateSegments(); + this.updateTimeline(); }); }, @@ -98816,35 +98841,36 @@ var _default = { rootHooks: { watch: { labels() { - console.log(`[SegmentDisplay] labels changed`); // make sure the label is still valid + console.log(`[TimelineDisplay] labels changed`); // make sure the label is still valid - let label = this.$root?.selectedSegment?.label; + let label = this.$root?.selectedTimestamp?.label; if (label) { // if no longer selected if (!(this.$root?.labels || {})[label]?.selected) { // reset the selected segment - this.$root.selectedSegment = null; + this.$root.selectedTimestamp = null; } } if (this.$root.videoInterface?.player?.duration) { - console.log(`[SegmentDisplay] labels changed, updating segments`); + console.log(`[TimelineDisplay] labels changed, updating segments`); untracked.caller = "labels"; - this.updateSegments(); + this.updateTimeline(); } }, - "videoInterface.keySegments": function () { + "videoInterface.keyTimestamps": function () { this.$root.videoInterface.onceVideoIsLoaded(() => { - untracked.caller = "videoInterface.keySegments"; - this.updateSegments(); + untracked.caller = "videoInterface.keyTimestamps"; + this.updateTimeline(); }); } } }, windowListeners: { keydown(eventObject) { + // this mess of an if statement is to prevent triggering these while typing in a text box (or a makeshift text box thats not actually an ) if (["DIV", "BUTTON", "BODY"].includes(eventObject.target.tagName) || (eventObject?.path || []).includes(this.$el) || `${eventObject.target.id}`.startsWith("plyr-")) { // // key controls @@ -98854,7 +98880,7 @@ var _default = { if (eventObject.ctrlKey) { console.log(`going to next clip`); eventObject.preventDefault(); - this.selectNextSegment(); + this.selectNextTimestamp(); } break; @@ -98863,7 +98889,7 @@ var _default = { if (eventObject.ctrlKey) { console.log(`going to previous clip`); eventObject.preventDefault(); - this.selectPreviousSegment(); + this.selectPreviousTimestamp(); } break; @@ -98885,54 +98911,54 @@ var _default = { }, methods: { - resetSelectedSegment() { - this.$root.selectedSegment = null; + resetselectedTimestamp() { + this.$root.selectedTimestamp = null; }, - theColor(eachSegment) { - return this.$root.labels[eachSegment.label]?.color; + theColor(eachTimestamp) { + return this.$root.labels[eachTimestamp.label]?.color; }, - updateSegments() { + updateTimeline() { if (!this.$root.videoInterface?.player?.duration) { - console.warn(`[SegmentDisplay] updateSegments was called too early. This shouldn't happen so check where it is being called from`); - console.debug(`[SegmentDisplay] updateSegments caller is:`, untracked.caller); + console.warn(`[TimelineDisplay] updateTimeline was called too early. This shouldn't happen so check where it is being called from`); + console.debug(`[TimelineDisplay] updateTimeline caller is:`, untracked.caller); return; } - this.processedKeySegments = this.processNewSegments({ + this.processedKeyTimestamps = this.processNewTimestamps({ duration: this.$root.videoInterface?.player?.duration, - keySegments: this.$root.videoInterface.keySegments + keyTimestamps: this.$root.videoInterface.keyTimestamps }); - this.segmentsInfo = this.organizeVisualSegments({ + this.timestampsInfo = this.organizeVisualTimestamps({ namesOfSelectedLabels: this.$root.getNamesOfSelectedLabels(), - processedKeySegments: this.processedKeySegments - }); // ^output looks like: this.segmentsInfo = { + processedKeyTimestamps: this.processedKeyTimestamps + }); // ^output looks like: this.timestampsInfo = { // maxLevel: 1, - // organizedSegments: [] + // organizedTimestamps: [] // } }, - processNewSegments({ + processNewTimestamps({ duration, - keySegments + keyTimestamps }) { if (!duration) { - console.warn(`[processNewSegments] processNewSegments was called with no duration (find where its being called from to fix)`); - return keySegments; + console.warn(`[processNewTimestamps] processNewTimestamps was called with no duration (find where its being called from to fix)`); + return keyTimestamps; } // element needs to be shown as at least __ % of the video width const minWidthPercent = 3; let minWidthInSeconds = duration / (100 / minWidthPercent); - keySegments = keySegments.map(eachSegment => { + keyTimestamps = keyTimestamps.map(eachTimestamp => { // // add render info // // create the display info for each segment - let effectiveStart = eachSegment.startTime; - let effectiveEnd = eachSegment.endTime; - let segmentDuration = eachSegment.endTime - eachSegment.startTime; // if segment is too small artificially make it bigger + let effectiveStart = eachTimestamp.startTime; + let effectiveEnd = eachTimestamp.endTime; + let segmentDuration = eachTimestamp.endTime - eachTimestamp.startTime; // if segment is too small artificially make it bigger if (segmentDuration < minWidthInSeconds) { let additionalAmountForEachSide = (minWidthInSeconds - segmentDuration) / 2; // sometimes this will result in a negative amount, but thats okay @@ -98942,7 +98968,7 @@ var _default = { effectiveEnd += additionalAmountForEachSide; } - eachSegment.$renderData = { + eachTimestamp.$renderData = { effectiveEnd, effectiveStart, // how wide the element should be @@ -98950,21 +98976,21 @@ var _default = { // how close to the left the element should be leftPercent: `${effectiveStart / duration * 100}%` }; - return eachSegment; + return eachTimestamp; }).sort((0, _pure_tools.dynamicSort)(["$renderData", "effectiveStart"])).map((each, index) => (each.$displayIndex = index, each)); - return keySegments; + return keyTimestamps; }, - organizeVisualSegments({ - processedKeySegments, + organizeVisualTimestamps({ + processedKeyTimestamps, namesOfSelectedLabels }) { // only return segments that match the selected labels - let displaySegments = (processedKeySegments || []).filter(eachSegment => eachSegment.$shouldDisplay = namesOfSelectedLabels.includes(eachSegment.label) || namesOfSelectedLabels.length == 0); // 2 percent of the width of the video + let displaySegments = (processedKeyTimestamps || []).filter(eachTimestamp => eachTimestamp.$shouldDisplay = namesOfSelectedLabels.includes(eachTimestamp.label) || namesOfSelectedLabels.length == 0); // 2 percent of the width of the video let levels = []; - for (let eachSegment of displaySegments) { + for (let eachTimestamp of displaySegments) { // find the smallest viable level let level = 0; @@ -98978,7 +99004,7 @@ var _default = { let indexOfLastElementOnThisLevel = levels[level].length - 1; let lastElementOnThisLevel = levels[level][indexOfLastElementOnThisLevel]; - if (eachSegment.$renderData.effectiveStart > lastElementOnThisLevel.$renderData.effectiveEnd) { + if (eachTimestamp.$renderData.effectiveStart > lastElementOnThisLevel.$renderData.effectiveEnd) { break; } @@ -98987,20 +99013,20 @@ var _default = { if (levels[level] == undefined) { - levels[level] = [eachSegment]; // otherwise add it to the end of the level + levels[level] = [eachTimestamp]; // otherwise add it to the end of the level } else { - levels[level].push(eachSegment); + levels[level].push(eachTimestamp); } const heightOfSegment = 2.2; // rem - eachSegment.$renderData.level = level; - eachSegment.$renderData.topAmount = `${level * heightOfSegment}rem`; + eachTimestamp.$renderData.level = level; + eachTimestamp.$renderData.topAmount = `${level * heightOfSegment}rem`; } return { maxLevel: levels.length, - organizedSegments: levels.flat() + organizedTimestamps: levels.flat() }; }, @@ -99027,21 +99053,21 @@ var _default = { } }, - async seekToSegmentStart() { + async seekToTimestampStart() { // if no segment is selected - if (!this.$root.selectedSegment) { + if (!this.$root.selectedTimestamp) { // the go to the first displayable segment - // console.debug(`[seekToSegmentStart] there is no selected segment`) - // console.debug(`[seekToSegmentStart] calling jumpSegment(0) and returning`) - return this.jumpSegment(0); + // console.debug(`[seekToTimestampStart] there is no selected segment`) + // console.debug(`[seekToTimestampStart] calling jumpToTimestampByIndex(0) and returning`) + return this.jumpToTimestampByIndex(0); } // make sure the selected segment has a start time if (!(0, _pure_tools.checkIf)({ - value: this.$root.selectedSegment.startTime, + value: this.$root.selectedTimestamp.startTime, is: Number })) { - console.error(`[seekToSegmentStart] this.$root.selectedSegment.startTime isn't a number: ${JSON.stringify(this.$root.selectedSegment.startTime)}`); + console.error(`[seekToTimestampStart] this.$root.selectedTimestamp.startTime isn't a number: ${JSON.stringify(this.$root.selectedTimestamp.startTime)}`); return; } @@ -99056,7 +99082,7 @@ var _default = { const seekAction = player => { try { - const startTime = this.$root.selectedSegment.startTime; // console.debug(`[seekToSegmentStart] seeking to ${startTime}`) + const startTime = this.$root.selectedTimestamp.startTime; // console.debug(`[seekToTimestampStart] seeking to ${startTime}`) player.currentTime = startTime; // there is a render issue and this is a hack to fix it @@ -99070,8 +99096,8 @@ var _default = { } catch (error) {} // sometimes an error is caused by switching videos, and all thats needed is a restart } catch (err) { - // console.debug(`[seekToSegmentStart] seeking to segment start (will retry):`,err) - return this.seekToSegmentStart(); + // console.debug(`[seekToTimestampStart] seeking to segment start (will retry):`,err) + return this.seekToTimestampStart(); } }; // if the video is already loaded then just do the thing @@ -99093,7 +99119,7 @@ var _default = { await untracked.singleActionAfterVideoLoaded[videoId](player); } catch (error) { console.error(error.stack); - console.error(`[seekToSegmentStart] error with untracked.singleActionAfterVideoLoaded[videoId]():`); + console.error(`[seekToTimestampStart] error with untracked.singleActionAfterVideoLoaded[videoId]():`); console.error(error); } } @@ -99101,7 +99127,7 @@ var _default = { untracked.singleActionAfterVideoLoaded[videoId] = null; } catch (error) { console.error(error.stack); - console.error(`[seekToSegmentStart] error with untracked.singleActionAfterVideoLoaded[videoId]():`); + console.error(`[seekToTimestampStart] error with untracked.singleActionAfterVideoLoaded[videoId]():`); console.error(error); } // then resolve after the singular action is done @@ -99115,11 +99141,11 @@ var _default = { } }, - closestSegment({ + closestTimestamp({ time, forward = true }) { - if (this.segmentsInfo.organizedSegments.length == 0) { + if (this.timestampsInfo.organizedTimestamps.length == 0) { return null; } else { let segment = null; @@ -99127,14 +99153,14 @@ var _default = { if (forward) { let runningIndex = -1; - for (const each of this.segmentsInfo.organizedSegments) { + for (const each of this.timestampsInfo.organizedTimestamps) { if (each.startTime > time) { segment = each; break; } } } else { - const segmentsBackwards = [...this.segmentsInfo.organizedSegments]; // first one is largest number of seconds + const segmentsBackwards = [...this.timestampsInfo.organizedTimestamps]; // first one is largest number of seconds segmentsBackwards.sort((a, b) => a.endTime - b.endTime).sort((a, b) => b.startTime - a.startTime); @@ -99150,55 +99176,55 @@ var _default = { } }, - selectNextSegment() { - let segment = this.$root.selectedSegment; + selectNextTimestamp() { + let segment = this.$root.selectedTimestamp; if (segment) { - this.jumpSegment(segment.$displayIndex + 1); + this.jumpToTimestampByIndex(segment.$displayIndex + 1); } else { - window.SegmentDisplay = this; - segment = this.closestSegment({ + window.TimelineDisplay = this; + segment = this.closestTimestamp({ time: this.currentTime, forward: true }); if (segment) { - this.jumpSegment(segment.$displayIndex); + this.jumpToTimestampByIndex(segment.$displayIndex); } } }, - selectPreviousSegment() { - let segment = this.$root.selectedSegment; + selectPreviousTimestamp() { + let segment = this.$root.selectedTimestamp; if (segment) { - this.jumpSegment(segment.$displayIndex - 1); + this.jumpToTimestampByIndex(segment.$displayIndex - 1); } else { - window.SegmentDisplay = this; - segment = this.closestSegment({ + window.TimelineDisplay = this; + segment = this.closestTimestamp({ time: this.currentTime, forward: false }); if (segment) { - this.jumpSegment(segment.$displayIndex); + this.jumpToTimestampByIndex(segment.$displayIndex); } } }, - async jumpSegment(newIndex) { + async jumpToTimestampByIndex(newIndex) { const functionCallId = Math.random().toFixed(6); - let debug = (message, ...args) => 1 || console.debug(`[jumpSegment: ${functionCallId}] ${message}`, ...args); // basic saftey check + let debug = (message, ...args) => 1 || console.debug(`[jumpToTimestampByIndex: ${functionCallId}] ${message}`, ...args); // basic saftey check - if (!(this.processedKeySegments instanceof Array) || this.processedKeySegments.length == 0) { + if (!(this.processedKeyTimestamps instanceof Array) || this.processedKeyTimestamps.length == 0) { return debug("segments don't exist, returning"); } // get the previous segment or the first one in the list - let segment = this.$root.selectedSegment || this.processedKeySegments[0]; - const startingPoint = (0, _pure_tools.wrapIndex)(newIndex, this.processedKeySegments); + let segment = this.$root.selectedTimestamp || this.processedKeyTimestamps[0]; + const startingPoint = (0, _pure_tools.wrapIndex)(newIndex, this.processedKeyTimestamps); let indexOfPreviousSegment = !segment ? 0 : segment.$displayIndex; if (newIndex != indexOfPreviousSegment || !segment.$shouldDisplay) { @@ -99206,7 +99232,7 @@ var _default = { debug(`jump direction is: ${direction}`); while (1) { - let newSegment = this.processedKeySegments[(0, _pure_tools.wrapIndex)(newIndex, this.processedKeySegments)]; // if its a displayable segment then good, were done + let newSegment = this.processedKeyTimestamps[(0, _pure_tools.wrapIndex)(newIndex, this.processedKeyTimestamps)]; // if its a displayable segment then good, were done if (newSegment.$shouldDisplay) { segment = newSegment; @@ -99217,7 +99243,7 @@ var _default = { newIndex += direction; // if somehow ended back at the start then fail - if ((0, _pure_tools.wrapIndex)(newIndex, this.processedKeySegments) == startingPoint) { + if ((0, _pure_tools.wrapIndex)(newIndex, this.processedKeyTimestamps) == startingPoint) { debug("couldn't find a displayable segment"); break; } @@ -99226,16 +99252,16 @@ var _default = { if (!segment || !segment.$shouldDisplay) { debug(`!segment || !segment.$shouldDisplay is: ${!segment || !segment.$shouldDisplay}`); - this.$root.selectedSegment = null; + this.$root.selectedTimestamp = null; } else { - this.$root.selectedSegment = segment; + this.$root.selectedTimestamp = segment; } - debug(`this.$root.selectedSegment is:`, this.$root.selectedSegment); + debug(`this.$root.selectedTimestamp is:`, this.$root.selectedTimestamp); - if (this.$root.selectedSegment instanceof Object) { + if (this.$root.selectedTimestamp instanceof Object) { debug("seeking to segment start since a new index was found"); - await this.seekToSegmentStart(); + await this.seekToTimestampStart(); } }, @@ -99251,21 +99277,21 @@ var _default = { this.$root.labels[labelName] = actualValue; }, generalTimeoutFrequency); // this is a hack to force the segment display to update - this.$root.videoInterface.updateKeySegments(); + this.$root.videoInterface.updateKeyTimestamps(); } } }; exports.default = _default; - var $9e2fc6 = exports.default || module.exports; + var $241882 = exports.default || module.exports; - if (typeof $9e2fc6 === 'function') { - $9e2fc6 = $9e2fc6.options; + if (typeof $241882 === 'function') { + $241882 = $241882.options; } /* template */ - Object.assign($9e2fc6, (function () { - var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{staticClass:"segments",attrs:{"align-h":"left"}},[_c('transition',{attrs:{"name":"fade"}},[_c('h5',[_vm._v("Timestamps")])]),_c('transition',{attrs:{"name":"fade"}},[_c('row',{staticClass:"segment-container",attrs:{"align-h":"space-between","position":"relative","height":((_vm.segmentsInfo.maxLevel*2.2) + "rem"),"min-height":_vm.segmentsInfo.organizedSegments.length <= 0 ? '13rem' : 0}},[(_vm.segmentsInfo.organizedSegments.length <= 0)?_c('column',{attrs:{"font-size":"14pt","font-weight":"lighter","color":"gray","position":"absolute","min-height":"12rem","width":"100%","align-h":"center","text-align":"center","padding":"0.7rem"}},[_vm._v("No timestamps with given filters"),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press N")]),_vm._v(" to create an timestamp at the current time)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press M")]),_vm._v(" to set the endTime)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press alt+S")]),_vm._v(" to save the timestamp)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press C")]),_vm._v(" to confirm an timestamp)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press X")]),_vm._v(" to reject an timestamp)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}})]):_vm._e(),_vm._l((_vm.segmentsInfo.organizedSegments),function(eachSegment,index){return (_vm.segmentsInfo.organizedSegments.length > 0)?_c('row',{key:eachSegment.timestampId||eachSegment.timestampId,staticClass:"segment",style:(("--color: " + (_vm.theColor(eachSegment)))),attrs:{"left":eachSegment.$renderData.leftPercent,"width":eachSegment.$renderData.widthPercent,"top":eachSegment.$renderData.topAmount,"isHuman":eachSegment.isHuman,"confirmedBySomeone":eachSegment.confirmedBySomeone,"rejectedBySomeone":eachSegment.rejectedBySomeone,"selected":eachSegment.timestampId == (_vm.$root.selectedSegment&&_vm.$root.selectedSegment.timestampId),"background-color":_vm.theColor(eachSegment),"border-color":_vm.theColor(eachSegment)},on:{"click":function($event){return _vm.jumpSegment(eachSegment.$displayIndex)}}},[_vm._v(_vm._s(_vm.computeSymbol(eachSegment.confirmedBySomeone, eachSegment.rejectedBySomeone))),_c('ui-tooltip',{attrs:{"position":"left","animation":"fade"}},[_c('column',{attrs:{"align-h":"left"}},[_c('span',[_vm._v("label: "+_vm._s(eachSegment.label))]),_c('span',[_vm._v("length: "+_vm._s((eachSegment.endTime - eachSegment.startTime).toFixed(2))+" sec")]),_c('span',[_vm._v("start: "+_vm._s(eachSegment.startTime.toFixed(3))+" sec")]),_c('span',[_vm._v("human?: "+_vm._s(eachSegment.isHuman))])])],1)],1):_vm._e()})],2)],1),_c('row',{attrs:{"position":"relative","align-h":"left","align-v":"top","width":"100%"}},[_c('h5',[_vm._v("Filter Timestamps by Label")]),_c('ui-button',{staticClass:"outline-button",staticStyle:{"position":"absolute","right":"1.5rem","top":"-0.3rem","--button-color":"darkgray"},on:{"click":_vm.toggleAllLabels}},[_vm._v("Toggle All")])],1),_c('container',{staticClass:"labels"},_vm._l((_vm.$root.labels),function(eachLevel,eachLabelName){return (eachLabelName != '(no segments)')?_c('container',{staticClass:"label-toggle",style:(("--label-color: " + (_vm.$root.labels[eachLabelName].selected ? _vm.$root.labels[eachLabelName].color : 'gray') + ";"))},[_c('ui-checkbox',{staticStyle:{"align-items":"flex-start","white-space":"nowrap"},on:{"change":function($event){return _vm.toggleLabel(eachLabelName)}},model:{value:(_vm.$root.labels[eachLabelName].selected),callback:function ($$v) {_vm.$set(_vm.$root.labels[eachLabelName], "selected", $$v)},expression:"$root.labels[eachLabelName].selected"}},[_vm._v(_vm._s(eachLabelName))])],1):_vm._e()}),1)],1)} + Object.assign($241882, (function () { + var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{staticClass:"segments",attrs:{"align-h":"left"}},[_c('transition',{attrs:{"name":"fade"}},[_c('h5',[_vm._v("Timestamps")])]),_c('transition',{attrs:{"name":"fade"}},[_c('row',{staticClass:"timeline-container",attrs:{"align-h":"space-between","position":"relative","height":((_vm.timestampsInfo.maxLevel*2.2) + "rem"),"min-height":_vm.timestampsInfo.organizedTimestamps.length <= 0 ? '13rem' : 0}},[(_vm.timestampsInfo.organizedTimestamps.length <= 0)?_c('column',{attrs:{"font-size":"14pt","font-weight":"lighter","color":"gray","position":"absolute","min-height":"12rem","width":"100%","align-h":"center","text-align":"center","padding":"0.7rem"}},[_vm._v("No timestamps with given filters"),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press N")]),_vm._v(" to create an timestamp at the current time)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press M")]),_vm._v(" to set the endTime)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press alt+S")]),_vm._v(" to save the timestamp)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press C")]),_vm._v(" to confirm an timestamp)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}}),_c('span',{staticStyle:{"margin-bottom":"-1rem"}},[_vm._v("("),_c('u',[_vm._v("press X")]),_vm._v(" to reject a timestamp)")]),_c('span',{staticStyle:{"display":"block","height":"1rem"}})]):_vm._e(),_vm._l((_vm.timestampsInfo.organizedTimestamps),function(eachTimestamp,index){return (_vm.timestampsInfo.organizedTimestamps.length > 0)?_c('row',{key:eachTimestamp.timestampId||eachTimestamp.timestampId,staticClass:"segment",style:(("--color: " + (_vm.theColor(eachTimestamp)))),attrs:{"left":eachTimestamp.$renderData.leftPercent,"width":eachTimestamp.$renderData.widthPercent,"top":eachTimestamp.$renderData.topAmount,"isHuman":eachTimestamp.isHuman,"confirmedBySomeone":eachTimestamp.confirmedBySomeone,"rejectedBySomeone":eachTimestamp.rejectedBySomeone,"selected":eachTimestamp.timestampId == (_vm.$root.selectedTimestamp&&_vm.$root.selectedTimestamp.timestampId),"background-color":_vm.theColor(eachTimestamp),"border-color":_vm.theColor(eachTimestamp)},on:{"click":function($event){return _vm.jumpToTimestampByIndex(eachTimestamp.$displayIndex)}}},[_vm._v(_vm._s(_vm.computeSymbol(eachTimestamp.confirmedBySomeone, eachTimestamp.rejectedBySomeone))),_c('ui-tooltip',{attrs:{"position":"left","animation":"fade"}},[_c('column',{attrs:{"align-h":"left"}},[_c('span',[_vm._v("label: "+_vm._s(eachTimestamp.label))]),_c('span',[_vm._v("length: "+_vm._s((eachTimestamp.endTime - eachTimestamp.startTime).toFixed(2))+" sec")]),_c('span',[_vm._v("start: "+_vm._s(eachTimestamp.startTime.toFixed(3))+" sec")]),_c('span',[_vm._v("human?: "+_vm._s(eachTimestamp.isHuman))])])],1)],1):_vm._e()})],2)],1),_c('row',{attrs:{"position":"relative","align-h":"left","align-v":"top","width":"100%"}},[_c('h5',[_vm._v("Filter Timestamps by Label")]),_c('ui-button',{staticClass:"outline-button",staticStyle:{"position":"absolute","right":"1.5rem","top":"-0.3rem","--button-color":"darkgray"},on:{"click":_vm.toggleAllLabels}},[_vm._v("Toggle All")])],1),_c('container',{staticClass:"labels"},_vm._l((_vm.$root.labels),function(eachLevel,eachLabelName){return _c('container',{staticClass:"label-toggle",style:(("--label-color: " + (_vm.$root.labels[eachLabelName].selected ? _vm.$root.labels[eachLabelName].color : 'gray') + ";"))},[_c('ui-checkbox',{staticStyle:{"align-items":"flex-start","white-space":"nowrap"},on:{"change":function($event){return _vm.toggleLabel(eachLabelName)}},model:{value:(_vm.$root.labels[eachLabelName].selected),callback:function ($$v) {_vm.$set(_vm.$root.labels[eachLabelName], "selected", $$v)},expression:"$root.labels[eachLabelName].selected"}},[_vm._v(_vm._s(eachLabelName))])],1)}),1)],1)} var staticRenderFns = [] return { @@ -131658,7 +131684,7 @@ var _default = { for (const each of entries) { await _database.frontendDb.deleteTimestamp({ - uuidOfSelectedSegment: each.timestampId + uuidOfSelectedTimestamp: each.timestampId }); count++; toastElement.innerHTML = toastElement.innerHTML.replace(/

.+/, `

${count} of ${entries.length}`); @@ -131673,7 +131699,7 @@ var _default = { }); } - this.$root.videoInterface.updateKeySegments(); + this.$root.videoInterface.updateKeyTimestamps(); } }, @@ -132205,7 +132231,7 @@ var _default = { VideoPlayer: require("../atoms/VideoPlayer").default, InfoSection: require("../molecules/InfoSection").default, TimestampEditor: require("../organisms/TimestampEditor").default, - SegmentDisplay: require("../organisms/SegmentDisplay").default, + TimelineDisplay: require("../organisms/TimelineDisplay").default, WrappedTopSearch: require("../organisms/WrappedTopSearch").default, Card: require("../molecules/Card").default, VideoLister: require("../organisms/VideoLister").default, @@ -132358,16 +132384,16 @@ var _default = { this.currentTime = value; }, - wrapperForJumpSegment(...args) { - this.$refs.segmentDisplay.jumpSegment(...args); + wrapperForjumpToTimestampByIndex(...args) { + this.$refs.timelineDisplay.jumpToTimestampByIndex(...args); }, wrapperForSelectNextSegment() { - return this.$refs.segmentDisplay.selectNextSegment(); + return this.$refs.timelineDisplay.selectNextTimestamp(); }, wrapperForSelectPreviousSegment() { - return this.$refs.segmentDisplay.selectPreviousSegment(); + return this.$refs.timelineDisplay.selectPreviousTimestamp(); } } @@ -132381,7 +132407,7 @@ exports.default = _default; /* template */ Object.assign($aaa267, (function () { - var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{attrs:{"width":"100%","height":"100vh","align-h":"center","align-v":"top","overflow":"auto","overflow-x":"hidden"}},[_c('WrappedTopSearch'),(!_vm.aVideoIsSelected())?_c('column',{attrs:{"width":"100%","height":"100vh","flex-shrink":"1","color":"gray"}},[_c('h5',{staticStyle:{"text-align":"center"}},[_vm._v("Once you have videos in your HOME/Videos folder"),_c('span',{staticStyle:{"height":"1rem","width":"100%","display":"block"}}),_vm._v("check the Videos tab up there ↗"),_c('span',{staticStyle:{"height":"1rem","width":"100%","display":"block"}}),_c('span',{staticStyle:{"height":"1rem","width":"100%","display":"block"}}),_vm._v("Alternatively, paste a youtube link into the search bar at the top")])]):_vm._e(),_c('transition',{attrs:{"name":"fade"}},[_c('row',{directives:[{name:"show",rawName:"v-show",value:(_vm.aVideoIsSelected()),expression:"aVideoIsSelected()"}],staticClass:"center-stage",attrs:{"align-v":"top","align-h":"center","padding-top":"8rem"}},[_c('column',{staticClass:"main-container",attrs:{"flex-grow":"1","align-v":"top"}},[_c('row',{staticClass:"below-video-search",attrs:{"flex-basis":"100%","padding-top":"1rem","align-v":"top","opacity":_vm.aVideoIsSelected()? 1 : 0}},[_c('column',{staticClass:"video-width-sizer",attrs:{"align-v":"top"}},[_c('row',{attrs:{"width":"96%","position":"relative"}},[_c('VideoPlayer',{ref:"videoPlayer",attrs:{"videoPathOrUrl":_vm.$root.videoInterface.videoPath},on:{"videoLoaded":_vm.$root.videoInterface.tellRootTheVideoHasLoaded,"currentTimeChanged":_vm.updateCurrentTime}})],1),(_vm.$root.videoInterface.videoId)?_c('container',{staticClass:"below-video"},[_c('SideButton',{staticClass:"left-side-button",attrs:{"left":"left"},on:{"click":_vm.wrapperForSelectPreviousSegment}}),_c('SegmentDisplay',{ref:"segmentDisplay",attrs:{"currentTime":_vm.currentTime}}),_c('SideButton',{staticClass:"right-side-button",attrs:{"right":"right"},on:{"click":_vm.wrapperForSelectNextSegment}})],1):_vm._e(),_c('row',{attrs:{"width":"100%","padding":"2rem","align-v":"top"}},[(_vm.videoInfo&&_vm.videoInfo.videoId)?_c('JsonTree',{staticClass:"json-tree",staticStyle:{"margin-right":"5px","overflow":"auto"},attrs:{"data":_vm.videoInfo||{}}}):_vm._e(),(_vm.videoInfo&&_vm.videoInfo.videoId)?_c('column',{attrs:{"flex-basis":"40%","width":"100%"}},[_c('UiSwitch',{on:{"click":_vm.clickedHasWatchedVideo},model:{value:(_vm.watchedSwitch),callback:function ($$v) {_vm.watchedSwitch=$$v},expression:"watchedSwitch"}},[_c('div',{staticStyle:{"width":"10rem"}},[_vm._v("Watched Video")])]),_c('UiSwitch',{on:{"click":_vm.clickedHasLabeledVideo},model:{value:(_vm.labeledSwitch),callback:function ($$v) {_vm.labeledSwitch=$$v},expression:"labeledSwitch"}},[_c('div',{staticStyle:{"width":"10rem"}},[_vm._v("Labeled Video")])]),_c('UiSwitch',{on:{"click":_vm.clickedHasVerifiedVideo},model:{value:(_vm.verifiedSwitch),callback:function ($$v) {_vm.verifiedSwitch=$$v},expression:"verifiedSwitch"}},[_c('div',{staticStyle:{"width":"10rem"}},[_vm._v("Verified Labels")])])],1):_vm._e()],1)],1)],1)],1),(_vm.$root.videoInterface.videoId)?_c('column',{staticClass:"side-container",attrs:{"align-v":"top","overflow":"visible","min-height":"50rem","width":"fit-content"}},[_c('TimestampEditor',{attrs:{"jumpSegment":_vm.wrapperForJumpSegment,"currentTime":_vm.currentTime}}),_c('InfoSection',{staticClass:"info-section",attrs:{"labelName":_vm.activeData().labelName,"videoId":_vm.activeData().videoId,"currentTime":_vm.currentTime}})],1):_vm._e()],1)],1)],1)} + var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{attrs:{"width":"100%","height":"100vh","align-h":"center","align-v":"top","overflow":"auto","overflow-x":"hidden"}},[_c('WrappedTopSearch'),(!_vm.aVideoIsSelected())?_c('column',{attrs:{"width":"100%","height":"100vh","flex-shrink":"1","color":"gray"}},[_c('h5',{staticStyle:{"text-align":"center"}},[_vm._v("Once you have videos in your HOME/Videos folder"),_c('span',{staticStyle:{"height":"1rem","width":"100%","display":"block"}}),_vm._v("check the Videos tab up there ↗"),_c('span',{staticStyle:{"height":"1rem","width":"100%","display":"block"}}),_c('span',{staticStyle:{"height":"1rem","width":"100%","display":"block"}}),_vm._v("Alternatively, paste a youtube link into the search bar at the top")])]):_vm._e(),_c('transition',{attrs:{"name":"fade"}},[_c('row',{directives:[{name:"show",rawName:"v-show",value:(_vm.aVideoIsSelected()),expression:"aVideoIsSelected()"}],staticClass:"center-stage",attrs:{"align-v":"top","align-h":"center","padding-top":"8rem"}},[_c('column',{staticClass:"main-container",attrs:{"flex-grow":"1","align-v":"top"}},[_c('row',{staticClass:"below-video-search",attrs:{"flex-basis":"100%","padding-top":"1rem","align-v":"top","opacity":_vm.aVideoIsSelected()? 1 : 0}},[_c('column',{staticClass:"video-width-sizer",attrs:{"align-v":"top"}},[_c('row',{attrs:{"width":"96%","position":"relative"}},[_c('VideoPlayer',{ref:"videoPlayer",attrs:{"videoPathOrUrl":_vm.$root.videoInterface.videoPath},on:{"videoLoaded":_vm.$root.videoInterface.tellRootTheVideoHasLoaded,"currentTimeChanged":_vm.updateCurrentTime}})],1),(_vm.$root.videoInterface.videoId)?_c('container',{staticClass:"below-video"},[_c('SideButton',{staticClass:"left-side-button",attrs:{"left":"left"},on:{"click":_vm.wrapperForSelectPreviousSegment}}),_c('TimelineDisplay',{ref:"timelineDisplay",attrs:{"currentTime":_vm.currentTime}}),_c('SideButton',{staticClass:"right-side-button",attrs:{"right":"right"},on:{"click":_vm.wrapperForSelectNextSegment}})],1):_vm._e(),_c('row',{attrs:{"width":"100%","padding":"2rem","align-v":"top"}},[(_vm.videoInfo&&_vm.videoInfo.videoId)?_c('JsonTree',{staticClass:"json-tree",staticStyle:{"margin-right":"5px","overflow":"auto"},attrs:{"data":_vm.videoInfo||{}}}):_vm._e(),(_vm.videoInfo&&_vm.videoInfo.videoId)?_c('column',{attrs:{"flex-basis":"40%","width":"100%"}},[_c('UiSwitch',{on:{"click":_vm.clickedHasWatchedVideo},model:{value:(_vm.watchedSwitch),callback:function ($$v) {_vm.watchedSwitch=$$v},expression:"watchedSwitch"}},[_c('div',{staticStyle:{"width":"10rem"}},[_vm._v("Watched Video")])]),_c('UiSwitch',{on:{"click":_vm.clickedHasLabeledVideo},model:{value:(_vm.labeledSwitch),callback:function ($$v) {_vm.labeledSwitch=$$v},expression:"labeledSwitch"}},[_c('div',{staticStyle:{"width":"10rem"}},[_vm._v("Labeled Video")])]),_c('UiSwitch',{on:{"click":_vm.clickedHasVerifiedVideo},model:{value:(_vm.verifiedSwitch),callback:function ($$v) {_vm.verifiedSwitch=$$v},expression:"verifiedSwitch"}},[_c('div',{staticStyle:{"width":"10rem"}},[_vm._v("Verified Labels")])])],1):_vm._e()],1)],1)],1)],1),(_vm.$root.videoInterface.videoId)?_c('column',{staticClass:"side-container",attrs:{"align-v":"top","overflow":"visible","min-height":"50rem","width":"fit-content"}},[_c('TimestampEditor',{attrs:{"jumpToTimestampByIndex":_vm.wrapperForjumpToTimestampByIndex,"currentTime":_vm.currentTime}}),_c('InfoSection',{staticClass:"info-section",attrs:{"labelName":_vm.activeData().labelName,"videoId":_vm.activeData().videoId,"currentTime":_vm.currentTime}})],1):_vm._e()],1)],1)],1)} var staticRenderFns = [] return { @@ -132393,7 +132419,7 @@ var staticRenderFns = [] }; })()); -},{"../tooling/database.js":"GPZG","../tooling/events.js":"kB7J","../tooling/pure_tools.js":"b1NV","../tooling/video_tooling.js":"u92t","../tooling/basics.bundle.js":"WnUT","../atoms/UiSwitch":"iTmx","../atoms/SideButton":"CzpK","../atoms/VideoPlayer":"ALCG","../molecules/InfoSection":"tPI3","../organisms/TimestampEditor":"K7ts","../organisms/SegmentDisplay":"RG1B","../organisms/WrappedTopSearch":"F49y","../molecules/Card":"OSGx","../organisms/VideoLister":"mlHE","vue-json-tree":"vQbQ"}],"bZ7G":[function(require,module,exports) { +},{"../tooling/database.js":"GPZG","../tooling/events.js":"kB7J","../tooling/pure_tools.js":"b1NV","../tooling/video_tooling.js":"u92t","../tooling/basics.bundle.js":"WnUT","../atoms/UiSwitch":"iTmx","../atoms/SideButton":"CzpK","../atoms/VideoPlayer":"ALCG","../molecules/InfoSection":"tPI3","../organisms/TimestampEditor":"K7ts","../organisms/TimelineDisplay":"Re3h","../organisms/WrappedTopSearch":"F49y","../molecules/Card":"OSGx","../organisms/VideoLister":"mlHE","vue-json-tree":"vQbQ"}],"bZ7G":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -133270,7 +133296,7 @@ var _default = { // return // } // } - // this.$root.videoInterface.updateKeySegments() + // this.$root.videoInterface.updateKeyTimestamps() // this.$toasted.show(`Upload Finished`, { // closeOnSwipe: false, // action: { text:'Close', onClick: (e, toastObject)=>{toastObject.goAway(0)} }, @@ -133294,7 +133320,7 @@ exports.default = _default; /* template */ Object.assign($d3ae45, (function () { - var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{staticClass:"upload-wrapper",attrs:{"akfdjguo3359gip":"akfdjguo3359gip"}},[_c('ui-fab',{staticClass:"help-button",attrs:{"color":"gray","icon":"live_help","raised":"raised","tooltip":"Upload Format Requirements","tooltipPosition":"left"},on:{"click":_vm.showHelp}}),_c('ui-fab',{staticClass:"help-button",attrs:{"color":"gray","icon":"download","raised":"raised","tooltip":"Download All Data","tooltipPosition":"left"},on:{"click":_vm.downloadAllData}}),_c('ui-fab',{staticClass:"upload-button",attrs:{"color":"blue","raised":"raised","tooltip":"upload multiple timestamps","tooltipPosition":"left"}},[_c('ui-icon',[_vm._v("cloud_upload")]),_c('ui-fileupload',{attrs:{"name":"file","type":"secondary","multiple":true},on:{"change":_vm.onUploadTimestamp}})],1),_c('portal',{attrs:{"to":"modal-popups"}},[_c('ui-modal',{ref:"helpModal",staticClass:"modal",attrs:{"fj20485gh93oi53g":"fj20485gh93oi53g","title":"Example Upload","transition":"scale-up"}},[_vm._v("If you're unsure about what to upload, try downloading the data first."),_c('br'),_vm._v("The download is a a zip file with bunch of .typed.csv files that you can edit in Excel"),_c('br'),_vm._v("To upload new data, modify those .typed.csv, and then select all of them for upload.")])],1)],1)} + var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('column',{staticClass:"upload-wrapper",attrs:{"akfdjguo3359gip":"akfdjguo3359gip"}},[_c('ui-fab',{staticClass:"help-button",attrs:{"color":"gray","icon":"live_help","raised":"raised","tooltip":"Upload Format Requirements","tooltipPosition":"left"},on:{"click":_vm.showHelp}}),_c('ui-fab',{staticClass:"help-button",attrs:{"color":"gray","icon":"download","raised":"raised","tooltip":"Download All Data","tooltipPosition":"left"},on:{"click":_vm.downloadAllData}}),_c('ui-fab',{staticClass:"upload-button",attrs:{"color":"blue","raised":"raised","tooltip":"upload multiple timestamps","tooltipPosition":"left"}},[_c('ui-icon',[_vm._v("cloud_upload")]),_c('ui-fileupload',{attrs:{"name":"file","type":"secondary","multiple":true},on:{"change":_vm.onUploadTimestamp}})],1),_c('portal',{attrs:{"to":"modal-popups"}},[_c('ui-modal',{ref:"helpModal",staticClass:"modal",attrs:{"fj20485gh93oi53g":"fj20485gh93oi53g","title":"Example Upload","transition":"scale-up"}},[_vm._v("If you're unsure about what to upload, try downloading the data first."),_c('br'),_vm._v("The download is a zip of csv files, including instructions about their contents"),_c('br'),_vm._v("To upload new data, modify the csv file contents (keep the names the same), and then select all of them for upload.")])],1)],1)} var staticRenderFns = [] return { @@ -133485,43 +133511,45 @@ const name = "timestampStorageManager"; newTimestampData = [newTimestampData]; } - for (let timestampEntry of newTimestampData) { - timestampEntry = timestampTooling.coerceTimestamp(timestampEntry); // - // send request to database - // + let index = 0; - try { - await _database.frontendDb.setTimestamp(timestampEntry, { - withCoersion: true - }); - } catch (error) { - _vue.default.toasted.show(`There was an error on the database`).goAway(5500); - - console.error("# "); - console.error("# Database ERROR"); - console.error("# "); - console.error(error.stack); - console.error(error); - console.error("# "); - - _vue.default.toasted.show(error.message.slice(0, 65), { - closeOnSwipe: false, - action: { - text: 'Close', - onClick: (e, toastObject) => { - toastObject.goAway(0); - } + for (const each of newTimestampData) { + if (!(each instanceof timestampTooling.Timestamp)) { + newTimestampData[index++] = new timestampTooling.Timestamp(each); + } + } + + try { + await _database.frontendDb.setTimestamps(newTimestampData, { + withCoersion: true + }); + } catch (error) { + _vue.default.toasted.show(`There was an error saving to the database`).goAway(5500); + + console.error("# "); + console.error("# Database ERROR"); + console.error("# "); + console.error(error.stack); + console.error(error); + console.error("# "); + + _vue.default.toasted.show(error.message.slice(0, 65), { + closeOnSwipe: false, + action: { + text: 'Close', + onClick: (e, toastObject) => { + toastObject.goAway(0); } - }); + } + }); - _vue.default.toasted.show(`(Full error log in the console)`).goAway(6500); // throw error + _vue.default.toasted.show(`(Full error log in the console)`).goAway(6500); // throw error - return { - success: false, - errorMessage: "" - }; - } + return { + success: false, + errorMessage: "" + }; } (0, _events.trigger)(_events.globalEvents.timestampStorageUpdatedEntries, name, newTimestampData); @@ -133532,7 +133560,7 @@ const name = "timestampStorageManager"; }); (0, _events.everyTime)(_events.globalEvents.deleteTimestampRequest).then(async (who, timestampId) => { await _database.frontendDb.deleteTimestamp({ - uuidOfSelectedSegment: timestampId + uuidOfSelectedTimestamp: timestampId }); (0, _events.trigger)(_events.globalEvents.timestampStorageDeletedEntries, name, [timestampId]); }); @@ -133719,8 +133747,8 @@ var _default = RootComponent = { _videoLoadedPermanentCallbacks: new Set(), _videoLoadedTemporaryCallbacks: new Set(), _player: null, - keySegments: [], - keySegmentsPromise: Promise.resolve([]), + keyTimestamps: [], + keyTimestampsPromise: Promise.resolve([]), // this gets triggered first/immediately async _videoInRouteHasChanged() { @@ -133826,7 +133854,7 @@ var _default = RootComponent = { $root.videoInterface._videoLoadedTemporaryCallbacks = new Set(); const currentVideoId = $root.videoInterface.videoId; // get the segments for the current video - $root.videoInterface.updateKeySegments(); + $root.videoInterface.updateKeyTimestamps(); }, get aVideoIsSelected() { @@ -133852,7 +133880,10 @@ var _default = RootComponent = { if (player == null) { console.log(`[Root] loaded null video`); // if there's no duration then wait for it to load } else if (!$root.videoInterface?.player?.duration) { - console.log(`[Root] WARNING: tellRootTheVideoHasLoaded was called too early. It should only be called once the video player has a duration`); + if ($root.videoInterface?.player) { + console.log(`[Root] WARNING: tellRootTheVideoHasLoaded was called too early. It should only be called once the video player has a duration`); + } + return new Promise((resolve, reject) => { setTimeout(() => { console.log(`waiting for duration to load`); @@ -133864,22 +133895,22 @@ var _default = RootComponent = { return $root.videoInterface._videoLoadedPromise.resolve($root.videoInterface._player); }, - updateKeySegments() { + updateKeyTimestamps() { const currentVideoId = $root.videoInterface.videoId; - $root.videoInterface.keySegmentsPromise = _database.frontendDb.getTimestamps({ + $root.videoInterface.keyTimestampsPromise = _database.frontendDb.getTimestamps({ where: [{ valueOf: ['videoId'], is: currentVideoId }], returnObject: false - }).then(keySegments => { + }).then(keyTimestamps => { const videoIdChanged = currentVideoId != $root.videoInterface.videoId; if (videoIdChanged) { return; } - $root.videoInterface.keySegments = keySegments; + $root.videoInterface.keyTimestamps = keyTimestamps; }); }, @@ -134004,7 +134035,7 @@ var _default = RootComponent = { window.storageObject.videoPaths = videoPaths; } } catch (error) { - console.warn(`Error getting videoPaths: ${error}`); + console.warn(`Asked local server for videoPaths, but got error: ${error}`); } } @@ -134036,7 +134067,7 @@ var _default = RootComponent = { disagreement: 0 } }, - selectedSegment: null, + selectedTimestamp: null, labels: {}, videos: {}, email: window.storageObject.email @@ -134067,7 +134098,7 @@ var _default = RootComponent = { }); (0, _events.everyTime)(_events.globalEvents.rootDeSelectTimestampRequest).then(who => { console.log(`${name} saw [rootDeSelectTimestampRequest] from ${who}`); - this.$root.selectedSegment = null; + this.$root.selectedTimestamp = null; }); }, @@ -134292,7 +134323,7 @@ var _default = RootComponent = { if (!this.$root.labels[labelName]) { // if the label doesnt exist - this.$toasted.show(`Note: Thats a new label name`).goAway(3500); // then add it + this.$toasted.show(`Note: Thats a new label name`).goAway(7500); // then add it this.$root.labels[labelName] = { color: (0, utils.getColor)(labelName), diff --git a/docs/Root.c5092744.css b/docs/Root.7f92515c.css similarity index 99% rename from docs/Root.c5092744.css rename to docs/Root.7f92515c.css index 44027e1..a9285ee 100644 --- a/docs/Root.c5092744.css +++ b/docs/Root.7f92515c.css @@ -5653,7 +5653,7 @@ div[data-fjio3y598t3hi2] .quick-fade-enter, div[data-fjio3y598t3hi2] .quick-fade .segments .labels .ui-checkbox { margin: 0; } -.segments .segment-container { +.segments .timeline-container { margin-bottom: 0.7rem; width: 95%; align-self: center; @@ -5661,7 +5661,7 @@ div[data-fjio3y598t3hi2] .quick-fade-enter, div[data-fjio3y598t3hi2] .quick-fade overflow: visible; transition: all ease 0.5s; } -.segments .segment-container .segment { +.segments .timeline-container .segment { color: var(--color); position: absolute; min-height: 1.4rem; @@ -5675,10 +5675,10 @@ div[data-fjio3y598t3hi2] .quick-fade-enter, div[data-fjio3y598t3hi2] .quick-fade animation-iteration-count: infinite; animation-play-state: running; } -.segments .segment-container .segment[selected] { +.segments .timeline-container .segment[selected] { animation-name: pulse-fade; } -.segments .segment-container .segment:not([isHuman]) { +.segments .timeline-container .segment:not([isHuman]) { background-color: transparent; --border-width: 8px // this is used later; border-width: var(--border-width); @@ -5687,7 +5687,7 @@ div[data-fjio3y598t3hi2] .quick-fade-enter, div[data-fjio3y598t3hi2] .quick-fade overflow: hidden; background-color: transparent !important; } -.segments .segment-container .segment:not([isHuman]):not([rejectedBySomeone]):not([confirmedBySomeone]):not([selected]) { +.segments .timeline-container .segment:not([isHuman]):not([rejectedBySomeone]):not([confirmedBySomeone]):not([selected]) { border-width: 0; --border-gap: 10px; --border-width: 2px; @@ -5697,7 +5697,7 @@ div[data-fjio3y598t3hi2] .quick-fade-enter, div[data-fjio3y598t3hi2] .quick-fade background-position: left top, right bottom, left bottom, right top; animation: border-dance 1s infinite linear; } -.segments .segment-container .segment:hover { +.segments .timeline-container .segment:hover { box-shadow: var(--shadow-1); opacity: 0.9; } diff --git a/docs/index.html b/docs/index.html index 4142641..d8cb2a2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,11 +6,11 @@ Ible - +

- + \ No newline at end of file