diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..47605e4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,89 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at devops@contently.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant homepage](http://contributor-covenant.org), version 1.4, +available at [version](http://contributor-covenant.org/version/1/4) diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..4249b7d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,13 @@ +Copyright Contently, Inc. 2017 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/build/videojs-annotation-comments.cjs.min.js b/build/videojs-annotation-comments.cjs.min.js index 15faae3..6a6aa40 100644 --- a/build/videojs-annotation-comments.cjs.min.js +++ b/build/videojs-annotation-comments.cjs.min.js @@ -1,5 +1,3 @@ -/* Version 1.1.2 videojs-annotation-comments (https://github.com/contently/videojs-annotation-comments.git), Authored by Evan Carothers & Jack Pope */ - !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.AnnotationComments=t()}}(function(){var t;return function(){function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n||t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a= 2.0.0-beta.1",7:">= 4.0.0"};n.REVISION_CHANGES=p;var m="[object Object]";r.prototype={constructor:r,logger:d["default"],log:d["default"].log,registerHelper:function(t,e){if(o.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(o.toString.call(t)===m)o.extend(this.partials,t);else{if("undefined"==typeof e)throw new s["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(o.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple decorators");o.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var v=d["default"].log;n.log=v,n.createFrame=o.createFrame,n.logger=d["default"]},{"./decorators":4,"./exception":6,"./helpers":7,"./logger":15,"./utils":19}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){a["default"](t)}n.__esModule=!0,n.registerDefaultDecorators=r;var o=t("./decorators/inline"),a=i(o)},{"./decorators/inline":5}],5:[function(t,e,n){"use strict";n.__esModule=!0;var i=t("../utils");n["default"]=function(t){t.registerDecorator("inline",function(t,e,n,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var a=n.partials;n.partials=i.extend({},a,e.partials);var s=t(r,o);return n.partials=a,s}),e.partials[r.args[0]]=r.fn,o})},e.exports=n["default"]},{"../utils":19}],6:[function(t,e,n){"use strict";function i(t,e){var n=e&&e.loc,o=void 0,a=void 0;n&&(o=n.start.line,a=n.start.column,t+=" - "+o+":"+a);for(var s=Error.prototype.constructor.call(this,t),l=0;l0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var a=i.createFrame(n.data);a.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:a}}return o(e,n)})},e.exports=n["default"]},{"../utils":19}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=t("../utils"),o=t("../exception"),a=i(o);n["default"]=function(t){t.registerHelper("each",function(t,e){function n(e,n,o){u&&(u.key=e,u.index=n,u.first=0===n,u.last=!!o,c&&(u.contextPath=c+e)),l+=i(t[e],{data:u,blockParams:r.blockParams([t[e],e],[c+e,null])})}if(!e)throw new a["default"]("Must pass iterator to #each");var i=e.fn,o=e.inverse,s=0,l="",u=void 0,c=void 0;if(e.data&&e.ids&&(c=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(u=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var d=t.length;s=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o":">",'"':""","'":"'","`":"`","=":"="},h=/[&<>"'`=]/g,f=/[&<>"'`=]/,p=Object.prototype.toString;n.toString=p;var m=function(t){return"function"==typeof t};m(/x/)&&(n.isFunction=m=function(t){return"function"==typeof t&&"[object Function]"===p.call(t)}),n.isFunction=m;var v=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===p.call(t)};n.isArray=v},{}],20:[function(t,e,n){e.exports=t("./dist/cjs/handlebars.runtime")["default"]},{"./dist/cjs/handlebars.runtime":2}],21:[function(t,e,n){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r0)for(n=0;n0?"future":"past"];return x(n)?n(e):n.replace(/%s/i,e)}function L(t,e){var n=t.toLowerCase();Ri[n]=Ri[n+"s"]=Ri[e]=t}function F(t){return"string"==typeof t?Ri[t]||Ri[t.toLowerCase()]:void 0}function H(t){var e,n,i={};for(n in t)d(t,n)&&(e=F(n),e&&(i[e]=t[n]));return i}function N(t,e){Wi[t]=e}function R(t){var e=[];for(var n in t)e.push({unit:n,priority:Wi[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function W(t,e,n){var i=""+Math.abs(t),r=e-i.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function U(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(zi[t]=r),e&&(zi[e[0]]=function(){return W(r.apply(this,arguments),e[1],e[2])}),n&&(zi[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function G(t){var e,n,i=t.match(Ui);for(e=0,n=i.length;e=0&&Vi.test(t);)t=t.replace(Vi,n),Vi.lastIndex=0,i-=1;return t}function Z(t,e,n){cr[t]=x(e)?e:function(t,i){return t&&n?n:e}}function q(t,e){return d(cr,t)?cr[t](e._strict,e._locale):new RegExp(X(t))}function X(t){return J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),l(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function kt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function St(t,e,n){var i=7+e-n,r=(7+kt(t,0,i).getUTCDay()-e)%7;return-r+i-1}function Ot(t,e,n,i,r){var o,a,s=(7+n-i)%7,l=St(t,i,r),u=1+7*(e-1)+s+l;return u<=0?(o=t-1,a=et(o)+u):u>et(t)?(o=t+1,a=u-et(t)):(o=t,a=u),{year:o,dayOfYear:a}}function Mt(t,e,n){var i,r,o=St(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?(r=t.year()-1,i=a+Dt(r,e,n)):a>Dt(t.year(),e,n)?(i=a-Dt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=a),{week:i,year:r}}function Dt(t,e,n){var i=St(t,e,n),r=St(t+1,e,n);return(et(t)-i+r)/7}function xt(t){return Mt(t,this._week.dow,this._week.doy).week}function Ct(){return this._week.dow}function Pt(){return this._week.doy}function Tt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Yt(t){var e=Mt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function At(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function jt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Et(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone}function $t(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function It(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Lt(t,e,n){var i,r,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?(r=wr.call(this._weekdaysParse,a),r!==-1?r:null):"ddd"===e?(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null):"dddd"===e?(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null))):"ddd"===e?(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null))):(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:null)))}function Ft(t,e,n){var i,r,o;if(this._weekdaysParseExact)return Lt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ht(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=At(t,this.localeData()),this.add(t-e,"d")):e}function Nt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Rt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=jt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Wt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Ar),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ut(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Vt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Er),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Gt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,a=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=f([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(i),s.push(r),l.push(o),u.push(i),u.push(r),u.push(o);for(a.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=J(s[e]),l[e]=J(l[e]),u[e]=J(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"), this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function zt(){return this.hours()%12||12}function Bt(){return this.hours()||24}function Zt(t,e){U(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qt(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Jt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Qt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,n,i,r,o=0;o0;){if(i=te(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&S(r,n,!0)>=e-1)break;e--}o++}return $r}function te(t){var i=null;if(!Hr[t]&&"undefined"!=typeof n&&n&&n.exports)try{i=$r._abbr;var r=e;r("./locale/"+t),ee(i)}catch(o){}return Hr[t]}function ee(t,e){var n;return t&&(n=s(e)?re(t):ne(t,e),n?$r=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),$r._abbr}function ne(t,e){if(null!==e){var n,i=Fr;if(e.abbr=t,null!=Hr[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Hr[t]._config;else if(null!=e.parentLocale)if(null!=Hr[e.parentLocale])i=Hr[e.parentLocale]._config;else{if(n=te(e.parentLocale),null==n)return Nr[e.parentLocale]||(Nr[e.parentLocale]=[]),Nr[e.parentLocale].push({name:t,config:e}),null;i=n._config}return Hr[t]=new T(P(i,e)),Nr[t]&&Nr[t].forEach(function(t){ne(t.name,t.config)}),ee(t),Hr[t]}return delete Hr[t],null}function ie(t,e){if(null!=e){var n,i,r=Fr;i=te(t),null!=i&&(r=i._config),e=P(r,e),n=new T(e),n.parentLocale=Hr[t],Hr[t]=n,ee(t)}else null!=Hr[t]&&(null!=Hr[t].parentLocale?Hr[t]=Hr[t].parentLocale:null!=Hr[t]&&delete Hr[t]);return Hr[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return $r;if(!r(t)){if(e=te(t))return e;t=[t]}return Kt(t)}function oe(){return Ei(Hr)}function ae(t){var e,n=t._a;return n&&m(t).overflow===-2&&(e=n[fr]<0||n[fr]>11?fr:n[pr]<1||n[pr]>ct(n[hr],n[fr])?pr:n[mr]<0||n[mr]>24||24===n[mr]&&(0!==n[vr]||0!==n[yr]||0!==n[gr])?mr:n[vr]<0||n[vr]>59?vr:n[yr]<0||n[yr]>59?yr:n[gr]<0||n[gr]>999?gr:-1,m(t)._overflowDayOfYear&&(epr)&&(e=pr),m(t)._overflowWeeks&&e===-1&&(e=_r),m(t)._overflowWeekday&&e===-1&&(e=br),m(t).overflow=e),t}function se(t,e,n){return null!=t?t:null!=e?e:n}function le(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ue(t){var e,n,i,r,o,a=[];if(!t._d){for(i=le(t),t._w&&null==t._a[pr]&&null==t._a[fr]&&ce(t),null!=t._dayOfYear&&(o=se(t._a[hr],i[hr]),(t._dayOfYear>et(o)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),n=kt(o,0,t._dayOfYear),t._a[fr]=n.getUTCMonth(),t._a[pr]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=i[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[mr]&&0===t._a[vr]&&0===t._a[yr]&&0===t._a[gr]&&(t._nextDay=!0,t._a[mr]=0),t._d=(t._useUTC?kt:wt).apply(null,a),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[mr]=24),t._w&&"undefined"!=typeof t._w.d&&t._w.d!==r&&(m(t).weekdayMismatch=!0)}}function ce(t){var e,n,i,r,o,a,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)o=1,a=4,n=se(e.GG,t._a[hr],Mt(xe(),1,4).year),i=se(e.W,1),r=se(e.E,1),(r<1||r>7)&&(l=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var u=Mt(xe(),o,a);n=se(e.gg,t._a[hr],u.year),i=se(e.w,u.week),null!=e.d?(r=e.d,(r<0||r>6)&&(l=!0)):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}i<1||i>Dt(n,o,a)?m(t)._overflowWeeks=!0:null!=l?m(t)._overflowWeekday=!0:(s=Ot(n,i,r,o,a),t._a[hr]=s.year,t._dayOfYear=s.dayOfYear)}function de(t){var e,n,i,r,o,a,s=t._i,l=Rr.exec(s)||Wr.exec(s);if(l){for(m(t).iso=!0,e=0,n=Vr.length;e0&&m(e).unusedInput.push(a),s=s.slice(s.indexOf(i)+i.length),u+=i.length),zi[o]?(i?m(e).empty=!1:m(e).unusedTokens.push(o),tt(o,i,e)):e._strict&&!i&&m(e).unusedTokens.push(o);m(e).charsLeftOver=l-u,s.length>0&&m(e).unusedInput.push(s),e._a[mr]<=12&&m(e).bigHour===!0&&e._a[mr]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[mr]=be(e._locale,e._a[mr],e._meridiem),ue(e),ae(e)}function be(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function we(t){var e,n,i,r,o;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ze(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=Oe(t),t._a){var e=t._isUTC?f(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&S(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qe(){return!!this.isValid()&&!this._isUTC}function Xe(){return!!this.isValid()&&this._isUTC}function Je(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qe(t,e){var n,i,r,o=t,a=null;return $e(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(o={},e?o[e]=t:o.milliseconds=t):(a=to.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:k(a[pr])*n,h:k(a[mr])*n,m:k(a[vr])*n,s:k(a[yr])*n,ms:k(Ie(1e3*a[gr]))*n}):(a=eo.exec(t))?(n="-"===a[1]?-1:("+"===a[1],1),o={y:Ke(a[2],n),M:Ke(a[3],n),w:Ke(a[4],n),d:Ke(a[5],n),h:Ke(a[6],n),m:Ke(a[7],n),s:Ke(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=en(xe(o.from),xe(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),i=new Ee(o),$e(t)&&d(t,"_locale")&&(i._locale=t._locale),i}function Ke(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function tn(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function en(t,e){var n;return t.isValid()&&e.isValid()?(e=He(e,t),t.isBefore(e)?n=tn(t,e):(n=tn(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function nn(t,e){return function(n,i){var r,o;return null===i||isNaN(+i)||(D(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),n="string"==typeof n?+n:n,r=Qe(n,i),rn(this,r,t),this}}function rn(e,n,i,r){var o=n._milliseconds,a=Ie(n._days),s=Ie(n._months);e.isValid()&&(r=null==r||r,s&&mt(e,ot(e,"Month")+s*i),a&&at(e,"Date",ot(e,"Date")+a*i),o&&e._d.setTime(e._d.valueOf()+o*i),r&&t.updateOffset(e,a||s))}function on(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function an(e,n){var i=e||xe(),r=He(i,this).startOf("day"),o=t.calendarFormat(this,r)||"sameElse",a=n&&(x(n[o])?n[o].call(this,i):n[o]);return this.format(a||this.localeData().calendar(o,this,xe(i)))}function sn(){return new _(this)}function ln(t,e){var n=b(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&(e=F(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()9999?z(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function gn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",o=e+'[")]';return this.format(n+i+r+o)}function _n(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=z(this,e);return this.localeData().postformat(n)}function bn(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function wn(t){return this.from(xe(),t)}function kn(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Sn(t){return this.to(xe(),t)}function On(t){var e;return void 0===t?this._locale._abbr:(e=re(t),null!=e&&(this._locale=e),this)}function Mn(){return this._locale}function Dn(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function xn(t){return t=F(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Cn(){return this._d.valueOf()-6e4*(this._offset||0)}function Pn(){return Math.floor(this.valueOf()/1e3)}function Tn(){return new Date(this.valueOf())}function Yn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function An(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function jn(){return this.isValid()?this.toISOString():null}function En(){return v(this)}function $n(){return h({},m(this))}function In(){return m(this).overflow}function Ln(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Fn(t,e){U(0,[t,t.length],0,e)}function Hn(t){return Un.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Nn(t){return Un.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Rn(){return Dt(this.year(),1,4)}function Wn(){var t=this.localeData()._week;return Dt(this.year(),t.dow,t.doy)}function Un(t,e,n,i,r){var o;return null==t?Mt(this,i,r).year:(o=Dt(t,i,r),e>o&&(e=o),Vn.call(this,t,e,n,i,r))}function Vn(t,e,n,i,r){var o=Ot(t,e,n,i,r),a=kt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Gn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function zn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Bn(t,e){e[gr]=k(1e3*("0."+t))}function Zn(){return this._isUTC?"UTC":""}function qn(){return this._isUTC?"Coordinated Universal Time":""}function Xn(t){return xe(1e3*t)}function Jn(){return xe.apply(null,arguments).parseZone()}function Qn(t){return t}function Kn(t,e,n,i){var r=re(),o=f().set(i,e);return r[n](o,t)}function ti(t,e,n){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return Kn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Kn(t,i,n,"month");return r}function ei(t,e,n,i){"boolean"==typeof t?(l(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,l(e)&&(n=e,e=void 0),e=e||"");var r=re(),o=t?r._week.dow:0;if(null!=n)return Kn(e,(n+o)%7,i,"day");var a,s=[];for(a=0;a<7;a++)s[a]=Kn(e,(a+o)%7,i,"day");return s}function ni(t,e){return ti(t,e,"months")}function ii(t,e){return ti(t,e,"monthsShort")}function ri(t,e,n){return ei(t,e,n,"weekdays")}function oi(t,e,n){return ei(t,e,n,"weekdaysShort")}function ai(t,e,n){return ei(t,e,n,"weekdaysMin")}function si(){var t=this._data;return this._milliseconds=fo(this._milliseconds),this._days=fo(this._days),this._months=fo(this._months),t.milliseconds=fo(t.milliseconds),t.seconds=fo(t.seconds),t.minutes=fo(t.minutes),t.hours=fo(t.hours),t.months=fo(t.months),t.years=fo(t.years),this}function li(t,e,n,i){var r=Qe(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function ui(t,e){return li(this,t,e,1)}function ci(t,e){return li(this,t,e,-1)}function di(t){return t<0?Math.floor(t):Math.ceil(t)}function hi(){var t,e,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*di(pi(s)+a),a=0,s=0),l.milliseconds=o%1e3,t=w(o/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,n=w(e/60),l.hours=n%24,a+=w(n/24),r=w(fi(a)),s+=r,a-=di(pi(r)),i=w(s/12),s%=12,l.days=a,l.months=s,l.years=i,this}function fi(t){return 4800*t/146097}function pi(t){return 146097*t/4800}function mi(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(t=F(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+fi(e),"month"===t?n:n/12;switch(e=this._days+Math.round(pi(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function vi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN}function yi(t){return function(){return this.as(t)}}function gi(){return Qe(this)}function _i(t){return t=F(t),this.isValid()?this[t+"s"]():NaN}function bi(t){return function(){return this.isValid()?this._data[t]:NaN}}function wi(){return w(this.days()/7)}function ki(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Si(t,e,n){var i=Qe(t).abs(),r=Po(i.as("s")),o=Po(i.as("m")),a=Po(i.as("h")),s=Po(i.as("d")),l=Po(i.as("M")),u=Po(i.as("y")),c=r<=To.ss&&["s",r]||r0,c[4]=n,ki.apply(null,c)}function Oi(t){return void 0===t?Po:"function"==typeof t&&(Po=t,!0)}function Mi(t,e){return void 0!==To[t]&&(void 0===e?To[t]:(To[t]=e,"s"===t&&(To.ss=e-1),!0))}function Di(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=Si(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function xi(t){return(t>0)-(t<0)||+t}function Ci(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i=Yo(this._milliseconds)/1e3,r=Yo(this._days),o=Yo(this._months);t=w(i/60),e=w(t/60),i%=60,t%=60,n=w(o/12),o%=12;var a=n,s=o,l=r,u=e,c=t,d=i?i.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",p=xi(this._months)!==xi(h)?"-":"",m=xi(this._days)!==xi(h)?"-":"",v=xi(this._milliseconds)!==xi(h)?"-":"";return f+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?m+l+"D":"")+(u||c||d?"T":"")+(u?v+u+"H":"")+(c?v+c+"M":"")+(d?v+d+"S":"")}var Pi,Ti;Ti=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i68?1900:2e3)};var wr,kr=rt("FullYear",!0);wr=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:y()}),Jr=function(){return Date.now?Date.now():+new Date},Qr=["year","quarter","month","week","day","hour","minute","second","millisecond"];Le("Z",":"),Le("ZZ",""),Z("Z",sr),Z("ZZ",sr),Q(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Fe(sr,t)});var Kr=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var to=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,eo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Qe.fn=Ee.prototype,Qe.invalid=je;var no=nn(1,"add"),io=nn(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ro=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fn("gggg","weekYear"),Fn("ggggg","weekYear"),Fn("GGGG","isoWeekYear"),Fn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),Z("G",or),Z("g",or),Z("GG",Qi,Zi),Z("gg",Qi,Zi),Z("GGGG",nr,Xi),Z("gggg",nr,Xi),Z("GGGGG",ir,Ji),Z("ggggg",ir,Ji),K(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),K(["gg","GG"],function(e,n,i,r){n[r]=t.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),L("quarter","Q"),N("quarter",7),Z("Q",Bi),Q("Q",function(t,e){e[fr]=3*(k(t)-1)}),U("D",["DD",2],"Do","date"),L("date","D"),N("date",9),Z("D",Qi),Z("DD",Qi,Zi),Z("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],pr),Q("Do",function(t,e){e[pr]=k(t.match(Qi)[0])});var oo=rt("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),N("dayOfYear",4),Z("DDD",er),Z("DDDD",qi),Q(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),U("m",["mm",2],0,"minute"),L("minute","m"),N("minute",14),Z("m",Qi),Z("mm",Qi,Zi),Q(["m","mm"],vr);var ao=rt("Minutes",!1);U("s",["ss",2],0,"second"),L("second","s"),N("second",15),Z("s",Qi),Z("ss",Qi,Zi),Q(["s","ss"],yr);var so=rt("Seconds",!1);U("S",0,0,function(){return~~(this.millisecond()/100); }),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),N("millisecond",16),Z("S",er,Bi),Z("SS",er,Zi),Z("SSS",er,qi);var lo;for(lo="SSSS";lo.length<=9;lo+="S")Z(lo,rr);for(lo="S";lo.length<=9;lo+="S")Q(lo,Bn);var uo=rt("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var co=_.prototype;co.add=no,co.calendar=an,co.clone=sn,co.diff=pn,co.endOf=xn,co.format=_n,co.from=bn,co.fromNow=wn,co.to=kn,co.toNow=Sn,co.get=st,co.invalidAt=In,co.isAfter=ln,co.isBefore=un,co.isBetween=cn,co.isSame=dn,co.isSameOrAfter=hn,co.isSameOrBefore=fn,co.isValid=En,co.lang=ro,co.locale=On,co.localeData=Mn,co.max=Xr,co.min=qr,co.parsingFlags=$n,co.set=lt,co.startOf=Dn,co.subtract=io,co.toArray=Yn,co.toObject=An,co.toDate=Tn,co.toISOString=yn,co.inspect=gn,co.toJSON=jn,co.toString=vn,co.unix=Pn,co.valueOf=Cn,co.creationData=Ln,co.year=kr,co.isLeapYear=it,co.weekYear=Hn,co.isoWeekYear=Nn,co.quarter=co.quarters=Gn,co.month=vt,co.daysInMonth=yt,co.week=co.weeks=Tt,co.isoWeek=co.isoWeeks=Yt,co.weeksInYear=Wn,co.isoWeeksInYear=Rn,co.date=oo,co.day=co.days=Ht,co.weekday=Nt,co.isoWeekday=Rt,co.dayOfYear=zn,co.hour=co.hours=Lr,co.minute=co.minutes=ao,co.second=co.seconds=so,co.millisecond=co.milliseconds=uo,co.utcOffset=Re,co.utc=Ue,co.local=Ve,co.parseZone=Ge,co.hasAlignedHourOffset=ze,co.isDST=Be,co.isLocal=qe,co.isUtcOffset=Xe,co.isUtc=Je,co.isUTC=Je,co.zoneAbbr=Zn,co.zoneName=qn,co.dates=M("dates accessor is deprecated. Use date instead.",oo),co.months=M("months accessor is deprecated. Use month instead",vt),co.years=M("years accessor is deprecated. Use year instead",kr),co.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",We),co.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ze);var ho=T.prototype;ho.calendar=Y,ho.longDateFormat=A,ho.invalidDate=j,ho.ordinal=E,ho.preparse=Qn,ho.postformat=Qn,ho.relativeTime=$,ho.pastFuture=I,ho.set=C,ho.months=dt,ho.monthsShort=ht,ho.monthsParse=pt,ho.monthsRegex=_t,ho.monthsShortRegex=gt,ho.week=xt,ho.firstDayOfYear=Pt,ho.firstDayOfWeek=Ct,ho.weekdays=Et,ho.weekdaysMin=It,ho.weekdaysShort=$t,ho.weekdaysParse=Ft,ho.weekdaysRegex=Wt,ho.weekdaysShortRegex=Ut,ho.weekdaysMinRegex=Vt,ho.isPM=Xt,ho.meridiem=Jt,ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=M("moment.lang is deprecated. Use moment.locale instead.",ee),t.langData=M("moment.langData is deprecated. Use moment.localeData instead.",re);var fo=Math.abs,po=yi("ms"),mo=yi("s"),vo=yi("m"),yo=yi("h"),go=yi("d"),_o=yi("w"),bo=yi("M"),wo=yi("y"),ko=bi("milliseconds"),So=bi("seconds"),Oo=bi("minutes"),Mo=bi("hours"),Do=bi("days"),xo=bi("months"),Co=bi("years"),Po=Math.round,To={ss:44,s:45,m:45,h:22,d:26,M:11},Yo=Math.abs,Ao=Ee.prototype;return Ao.isValid=Ae,Ao.abs=si,Ao.add=ui,Ao.subtract=ci,Ao.as=mi,Ao.asMilliseconds=po,Ao.asSeconds=mo,Ao.asMinutes=vo,Ao.asHours=yo,Ao.asDays=go,Ao.asWeeks=_o,Ao.asMonths=bo,Ao.asYears=wo,Ao.valueOf=vi,Ao._bubble=hi,Ao.clone=gi,Ao.get=_i,Ao.milliseconds=ko,Ao.seconds=So,Ao.minutes=Oo,Ao.hours=Mo,Ao.days=Do,Ao.weeks=wi,Ao.months=xo,Ao.years=Co,Ao.humanize=Di,Ao.toISOString=Ci,Ao.toString=Ci,Ao.toJSON=Ci,Ao.locale=On,Ao.localeData=Mn,Ao.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ci),Ao.lang=ro,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Z("x",or),Z("X",lr),Q("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Q("x",function(t,e,n){n._d=new Date(k(t))}),t.version="2.22.1",i(xe),t.fn=co,t.min=Pe,t.max=Te,t.now=Jr,t.utc=f,t.unix=Xn,t.months=ni,t.isDate=u,t.locale=ee,t.invalid=y,t.duration=Qe,t.isMoment=b,t.weekdays=ri,t.parseZone=Jn,t.localeData=re,t.isDuration=$e,t.monthsShort=ii,t.weekdaysMin=ai,t.defineLocale=ne,t.updateLocale=ie,t.locales=oe,t.weekdaysShort=oi,t.normalizeUnits=F,t.relativeTimeRounding=Oi,t.relativeTimeThreshold=Mi,t.calendarFormat=on,t.prototype=co,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},t})},{}],23:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n=3?o.postLoadDataConstructor():t.on("loadeddata",o.postLoadDataConstructor.bind(o)),o}return o(e,t),a(e,[{key:"postLoadDataConstructor",value:function(){this.annotationState=new c(this.player),this.annotationState.annotations=this.options.annotationsObjects,this.controls=new u(this.player,this.options.bindArrowKeys),this.bindEvents(),this.setBounds(!1),this.options.startInAnnotationMode&&this.toggleAnnotationMode(),this.pluginReady()}},{key:"bindEvents",value:function(){var t=this;$(window).on("resize.vac-window-resize",l.throttle(this.setBounds.bind(this),500)),this.player.on("fullscreenchange",l.throttle(this.setBounds.bind(this),500)),this.options.showFullScreen||this.player.on("fullscreenchange",function(){t.player.isFullscreen_?(t.preFullscreenAnnotationsEnabled=t.active,$(t.player.el()).addClass("vac-disable-fullscreen")):$(t.player.el()).removeClass("vac-disable-fullscreen"),t.preFullscreenAnnotationsEnabled&&t.toggleAnnotationMode()}.bind(this))}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventDispatcher.fire(t,e)}},{key:"toggleAnnotationMode",value:function(){this.active=!this.active,this.player.toggleClass("vac-active"),this.annotationState.enabled=this.active,this.active?this.fire("annotationModeEnabled"):this.fire("annotationModeDisabled"),this.options.showControls&&(this.active?this.controls.render():this.controls.clear(!0))}},{key:"setBounds",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.bounds={};var e=$(this.player.el()),n=e.find(".vjs-control-bar");this.bounds.left=e.offset().left,this.bounds.top=e.offset().top,this.bounds.right=this.bounds.left+e.width(),this.bounds.bottom=this.bounds.top+e.height(),this.bounds.bottomWithoutControls=this.bounds.bottom-n.height(),t&&this.fire("playerBoundsChanged",this.bounds)}},{key:"onReady",value:function(t){return this.eventDispatcher.pluginReady?t():void this._readyCallbacks.push(t)}},{key:"pluginReady",value:function(){for(this.eventDispatcher.pluginReady=!0;this._readyCallbacks.length;)this._readyCallbacks.pop()()}},{key:"dispose",value:function(){this.controls=this.controls.teardown(),this.annotationState=this.annotationState.teardown(),this.eventDispatcher=this.eventDispatcher.teardown(),this.teardown(),this.player&&(this.player.annotationComments=null,$(this.player.el()).removeClass("vac-active"),$(this.player.el()).find("[class^='vac-']").remove()),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"dispose",this).call(this)}},{key:"teardown",value:function(){this.player&&this.player.off("fullscreenchange"),$(window).off("resize.vac-window-resize")}}]),e}(n)}},{"./components/annotation_state":26,"./components/controls":29,"./lib/event_dispatcher":35,"./lib/polyfills":39,"./lib/utils":40}],24:[function(t,e,n){"use strict";var i="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},r=t("handlebars/runtime");n.comment=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",d=t.escapeExpression;return'
\n
\n
'+d(t.lambda(null!=(a=null!=e?e.meta:e)?a.user_name:a,e))+'
\n
'+d((s=null!=(s=n.timeSince||(null!=e?e.timeSince:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"timeSince",hash:{},data:o}):s))+'\n   X\n
\n
\n
\n '+d((n.breaklines||e&&e.breaklines||u).call(l,null!=e?e.body:e,{name:"breaklines",hash:{},data:o}))+"\n
\n
\n"},useData:!0}),n.comment_list=r.template({1:function(t,e,n,i,r,o){var a;return" "+(null!=(a=t.lambda(o[0][0],e))?a:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r,o){var a,s,l=null!=e?e:t.nullContext||{};return'
\n
\n'+(null!=(a=n.each.call(l,null!=e?e.commentsHTML:e,{name:"each",hash:{},fn:t.program(1,r,1,o),inverse:t.noop,data:r,blockParams:o}))?a:"")+'
ADD REPLY
\n
\n
\n
\n
@ '+t.escapeExpression((s=null!=(s=n.rangeStr||(null!=e?e.rangeStr:e))?s:n.helperMissing,"function"==typeof s?s.call(l,{name:"rangeStr",hash:{},data:r,blockParams:o}):s))+'
\n
\n DELETE | CLOSE\n
\n
\n
\n'},useData:!0,useBlockParams:!0}),n.controls=r.template({1:function(t,e,n,i,r){var o;return null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.showControls:e,{name:"if",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r}))?o:""},2:function(t,e,n,i,r){var o;return'
\n \n'+(null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.showNav:e,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?o:"")+"
\n"},3:function(t,e,n,i,r){return'
\n
Prev
\n
Next
\n
\n'},5:function(t,e,n,i,r){var o,a=null!=e?e:t.nullContext||{};return'
\n
\n
Click and drag to select
\n
\n
\n'+(null!=(o=n["if"].call(a,null!=e?e.showControls:e,{name:"if",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r}))?o:"")+"\n"+(null!=(o=n["if"].call(a,null!=e?e.writingComment:e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r}))?o:"")},6:function(t,e,n,i,r){var o;return'
\n Select shape + range\n'+(null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.internalCommenting:e,{name:"if",hash:{},fn:t.program(7,r,0),inverse:t.noop,data:r}))?o:"")+'
\n
-1 sec
\n
+1 sec
\n
\n
\n'},7:function(t,e,n,i,r){return' \n cancel\n'},9:function(t,e,n,i,r){var o;return'
\n
\n
\n
New Annotation @ '+t.escapeExpression((o=null!=(o=n.rangeStr||(null!=e?e.rangeStr:e))?o:n.helperMissing,"function"==typeof o?o.call(null!=e?e:t.nullContext||{},{name:"rangeStr",hash:{},data:r}):o))+'
\n
\n \n
\n \n Cancel\n
\n
\n
\n
\n
\n'},compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){var o,a=null!=e?e:t.nullContext||{};return(null!=(o=n.unless.call(a,null!=e?e.adding:e,{name:"unless",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?o:"")+"\n"+(null!=(o=n["if"].call(a,null!=e?e.adding:e,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.noop,data:r}))?o:"")},useData:!0}),n.draggable_marker=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s=null!=e?e:t.nullContext||{},l=n.helperMissing,u="function",c=t.escapeExpression;return'
\n
\n'},useData:!0}),n.marker=r.template({1:function(t,e,n,i,r){return"vac-ranged-marker"},3:function(t,e,n,i,r){var o;return"width:"+t.escapeExpression((o=null!=(o=n.width||(null!=e?e.width:e))?o:n.helperMissing,"function"==typeof o?o.call(null!=e?e:t.nullContext||{},{name:"width",hash:{},data:r}):o))+";"},5:function(t,e,n,i,r){var o;return null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.tooltipBody:e,{name:"if",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r}))?o:""},6:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",d=t.escapeExpression;return'
\n \n '+d((s=null!=(s=n.tooltipTime||(null!=e?e.tooltipTime:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"tooltipTime",hash:{},data:o}):s))+" - "+d((s=null!=(s=n.tooltipBody||(null!=e?e.tooltipBody:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"tooltipBody",hash:{},data:o}):s))+"\n \n
\n"},7:function(t,e,n,i,r){return"vac-right-side"},compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",d=t.escapeExpression;return'
\n'+(null!=(a=n["if"].call(l,null!=e?e.showTooltip:e,{name:"if",hash:{},fn:t.program(5,o,0),inverse:t.noop,data:o}))?a:"")+"
\n"},useData:!0}),n.marker_wrap=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){return'
\n\t
\n
'},useData:!0}),n.new_comment=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s=null!=e?e:t.nullContext||{},l=n.helperMissing,u="function",c=t.escapeExpression;return'
\n
\n
\n \n
\n \n Cancel\n
\n
\n
\n'},useData:!0}),n.player_button=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){return'\n\n\t\n\t \n\t \n\t\n'},useData:!0})},{"handlebars/runtime":20}],25:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0],e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isOpen=!0;var r=i||!u.isWithinRange(this.range.start,this.range.end,Math.floor(this.currentTime)),o=n&&this.plugin.options.showMarkerShapeAndTooltips;this.marker.setActive(o),!n&&this.plugin.options.showCommentList&&this.commentList.render(),(!n||n&&this.plugin.options.showMarkerShapeAndTooltips)&&(this.annotationShape.render(),this.shape&&this.annotationShape.$el.on("click.vac-annotation",function(){e.plugin.annotationState.openAnnotation(e,!1,!1,!1)})),t&&this.player.pause(),r&&(this.currentTime=this.range.start),this.plugin.fire("annotationOpened",{annotation:this.data,triggered_by_timeline:n})}},{key:"close",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isOpen&&(this.isOpen=!1,this.marker.deactivate(),this.commentList.teardown(!1),this.annotationShape.$el&&this.annotationShape.$el.off("click.vac-annotation"),this.annotationShape.teardown(),t&&this.plugin.annotationState.clearActive(),this.plugin.fire("annotationClosed",this.data))}},{key:"buildSecondsActiveArray",value:function(){var t=[];if(this.range.end)for(var e=this.range.start;e<=this.range.end;e++)t.push(e);else{var n=this.range.start;t.push(n),n0&&void 0!==arguments[0])||arguments[0];this.close(!0),this.marker.teardown(),this.commentList&&this.commentList.teardown(t),t&&this.plugin.annotationState.removeAnnotation(this),this.annotationShape&&this.annotationShape.teardown(),t&&s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"teardown",this).call(this)}},{key:"data",get:function(){return{id:this.id,range:this.range,shape:this.shape,comments:this.commentList.data}}},{key:"isActive",get:function(){return this.plugin.annotationState.activeAnnotation===this}}],[{key:"newFromData",value:function(t,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=h.dataObj(i,r);t&&(t=u.parseIntObj(t)),n&&(n=u.parseIntObj(n));var s={id:o,range:t,shape:n,comments:[a]};return new e(s,r.player)}}]),e}(l)},{"./../lib/player_ui_component":38,"./../lib/utils.js":40,"./comment":27,"./comment_list":28,"./marker":31,"./shape":34}],26:[function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ee.range.start?1:0})}},{key:"addNewAnnotation",value:function(t){this._annotations.push(t),this.openAnnotation(t,!0,!0,!1,!0),this.stateChanged()}},{key:"createAndAddAnnotation",value:function(t){this.plugin.controls.uiState.adding&&this.plugin.controls.cancelAddNew();var e=d.newFromData(t.range,t.shape,t.commentStr||"",this.plugin,t.id);this.addNewAnnotation(e)}},{key:"destroyAnnotationById",value:function(t){var e=this.findAnnotation(t);e&&e.teardown()}},{key:"removeAnnotation",value:function(t){var e=t.id,n=this._annotations.indexOf(t);this._annotations.splice(n,1),this.stateChanged(),this.plugin.fire("annotationDeleted",{id:e})}},{key:"setLiveAnnotation",value:function(){if(this.enabled){var t=Math.floor(this.currentTime);if(this.skipLiveCheck)return void(t!==this.lastVideoTime&&(this.skipLiveCheck=!1));var e=this.activeAnnotationsForTime(t);if(!e.length)return this.activeAnnotation.close();var n=this.annotations[e[e.length-1]];if(this.activeAnnotation.range){if(n===this.activeAnnotation)return;var i=n.range.start,r=this.activeAnnotation.range.start;if(i===r&&i===t)return}this.openAnnotation(n,!1,!1,!0)}}},{key:"activeAnnotationsForTime",value:function(t){return this.annotations.length?this.annotationTimeMap[t]||[]:[]}},{key:"rebuildAnnotationTimeMap",value:function(){var t=this,e={};this.annotations.forEach(function(n){n.secondsActive.forEach(function(i){var r=e[i]||[];r.push(t.annotations.indexOf(n)),e[i]=r})}),this.annotationTimeMap=e}},{key:"clearActive",value:function(){this.activeAnnotation.close(!1),this._activeAnnotation=null}},{key:"openAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.plugin.active||this.plugin.toggleAnnotationMode(),this.skipLiveCheck=e,this.clearActive(),t.open(n,i,r),this.activeAnnotation=t,this.lastVideoTime=this.activeAnnotation.range.start}},{key:"openAnnotationById",value:function(t){var e=this.findAnnotation(t);e&&this.openAnnotation(e)}},{key:"findAnnotation",value:function(t){return this.annotations.find(function(e){return e.id==t})}},{key:"findComment",value:function(t){var e,n=this.annotations.map(function(t){return t.commentList.comments});return n=(e=[]).concat.apply(e,i(n)),n.find(function(e){return e.id==t})}},{key:"nextAnnotation",value:function(){if(this._activeAnnotation){var t=this.annotations.indexOf(this._activeAnnotation),e=t===this.annotations.length-1?0:t+1;return this.openAnnotation(this.annotations[e],!0)}for(var n=Math.floor(this.currentTime),i=0;in)return this.openAnnotation(this.annotations[i],!0);this.openAnnotation(this.annotations[0],!0)}},{key:"prevAnnotation",value:function(){if(this._activeAnnotation){var t=this.annotations.indexOf(this._activeAnnotation),e=0===t?this.annotations.length-1:t-1;return this.openAnnotation(this.annotations[e],!0)}for(var n=Math.floor(this.currentTime),i=this.annotations.length-1;i>=0;i--)if(this.annotations[i].range.start0&&void 0!==arguments[0]?arguments[0]:null;this._activeAnnotation=t},get:function(){return this._activeAnnotation||{close:function(){}}}},{key:"data",get:function(){return this._annotations.map(function(t){return t.data})}}]),e}(c)},{"./../lib/player_component":37,"./../lib/utils":40,"./annotation":25}],27:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"teardown",this).call(this,t)}},{key:"data",get:function(){return{id:this.id,meta:this.meta,body:this.body}}},{key:"HTML",get:function(){return this.$el[0].outerHTML}}],[{key:"newFromData",value:function(t,n,i){var r=this.dataObj(t,i);return new e(r,i.player)}},{key:"dataObj",value:function(t,e){return{meta:Object.assign({ diff --git a/build/videojs-annotation-comments.min.js b/build/videojs-annotation-comments.min.js index de29d5a..b9d3170 100644 --- a/build/videojs-annotation-comments.min.js +++ b/build/videojs-annotation-comments.min.js @@ -1,5 +1,3 @@ -/* Version 1.1.2 videojs-annotation-comments (https://github.com/contently/videojs-annotation-comments.git), Authored by Evan Carothers & Jack Pope */ - !function(){function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n||t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a= 2.0.0-beta.1",7:">= 4.0.0"};n.REVISION_CHANGES=p;var m="[object Object]";r.prototype={constructor:r,logger:h["default"],log:h["default"].log,registerHelper:function(t,e){if(o.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(o.toString.call(t)===m)o.extend(this.partials,t);else{if("undefined"==typeof e)throw new s["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(o.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple decorators");o.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var v=h["default"].log;n.log=v,n.createFrame=o.createFrame,n.logger=h["default"]},{"./decorators":4,"./exception":6,"./helpers":7,"./logger":15,"./utils":19}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){a["default"](t)}n.__esModule=!0,n.registerDefaultDecorators=r;var o=t("./decorators/inline"),a=i(o)},{"./decorators/inline":5}],5:[function(t,e,n){"use strict";n.__esModule=!0;var i=t("../utils");n["default"]=function(t){t.registerDecorator("inline",function(t,e,n,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var a=n.partials;n.partials=i.extend({},a,e.partials);var s=t(r,o);return n.partials=a,s}),e.partials[r.args[0]]=r.fn,o})},e.exports=n["default"]},{"../utils":19}],6:[function(t,e,n){"use strict";function i(t,e){var n=e&&e.loc,o=void 0,a=void 0;n&&(o=n.start.line,a=n.start.column,t+=" - "+o+":"+a);for(var s=Error.prototype.constructor.call(this,t),l=0;l0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var a=i.createFrame(n.data);a.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:a}}return o(e,n)})},e.exports=n["default"]},{"../utils":19}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=t("../utils"),o=t("../exception"),a=i(o);n["default"]=function(t){t.registerHelper("each",function(t,e){function n(e,n,o){u&&(u.key=e,u.index=n,u.first=0===n,u.last=!!o,c&&(u.contextPath=c+e)),l+=i(t[e],{data:u,blockParams:r.blockParams([t[e],e],[c+e,null])})}if(!e)throw new a["default"]("Must pass iterator to #each");var i=e.fn,o=e.inverse,s=0,l="",u=void 0,c=void 0;if(e.data&&e.ids&&(c=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(u=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var h=t.length;s=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o":">",'"':""","'":"'","`":"`","=":"="},d=/[&<>"'`=]/g,f=/[&<>"'`=]/,p=Object.prototype.toString;n.toString=p;var m=function(t){return"function"==typeof t};m(/x/)&&(n.isFunction=m=function(t){return"function"==typeof t&&"[object Function]"===p.call(t)}),n.isFunction=m;var v=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===p.call(t)};n.isArray=v},{}],20:[function(t,e,n){e.exports=t("./dist/cjs/handlebars.runtime")["default"]},{"./dist/cjs/handlebars.runtime":2}],21:[function(t,e,n){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r0)for(n=0;n0?"future":"past"];return x(n)?n(e):n.replace(/%s/i,e)}function L(t,e){var n=t.toLowerCase();Ri[n]=Ri[n+"s"]=Ri[e]=t}function F(t){return"string"==typeof t?Ri[t]||Ri[t.toLowerCase()]:void 0}function H(t){var e,n,i={};for(n in t)h(t,n)&&(e=F(n),e&&(i[e]=t[n]));return i}function N(t,e){Wi[t]=e}function R(t){var e=[];for(var n in t)e.push({unit:n,priority:Wi[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function W(t,e,n){var i=""+Math.abs(t),r=e-i.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function U(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(zi[t]=r),e&&(zi[e[0]]=function(){return W(r.apply(this,arguments),e[1],e[2])}),n&&(zi[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function G(t){var e,n,i=t.match(Ui);for(e=0,n=i.length;e=0&&Vi.test(t);)t=t.replace(Vi,n),Vi.lastIndex=0,i-=1;return t}function Z(t,e,n){cr[t]=x(e)?e:function(t,i){return t&&n?n:e}}function q(t,e){return h(cr,t)?cr[t](e._strict,e._locale):new RegExp(X(t))}function X(t){return J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),l(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function kt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function St(t,e,n){var i=7+e-n,r=(7+kt(t,0,i).getUTCDay()-e)%7;return-r+i-1}function Ot(t,e,n,i,r){var o,a,s=(7+n-i)%7,l=St(t,i,r),u=1+7*(e-1)+s+l;return u<=0?(o=t-1,a=et(o)+u):u>et(t)?(o=t+1,a=u-et(t)):(o=t,a=u),{year:o,dayOfYear:a}}function Mt(t,e,n){var i,r,o=St(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?(r=t.year()-1,i=a+Dt(r,e,n)):a>Dt(t.year(),e,n)?(i=a-Dt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=a),{week:i,year:r}}function Dt(t,e,n){var i=St(t,e,n),r=St(t+1,e,n);return(et(t)-i+r)/7}function xt(t){return Mt(t,this._week.dow,this._week.doy).week}function Ct(){return this._week.dow}function Pt(){return this._week.doy}function Tt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Yt(t){var e=Mt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function At(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function jt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Et(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone}function $t(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function It(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Lt(t,e,n){var i,r,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?(r=wr.call(this._weekdaysParse,a),r!==-1?r:null):"ddd"===e?(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null):"dddd"===e?(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null))):"ddd"===e?(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null))):(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:null)))}function Ft(t,e,n){var i,r,o;if(this._weekdaysParseExact)return Lt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ht(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=At(t,this.localeData()),this.add(t-e,"d")):e}function Nt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Rt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=jt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Wt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ar),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ut(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Vt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Er),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Gt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,a=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=f([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(i),s.push(r),l.push(o),u.push(i),u.push(r),u.push(o);for(a.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=J(s[e]),l[e]=J(l[e]),u[e]=J(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i"); }function zt(){return this.hours()%12||12}function Bt(){return this.hours()||24}function Zt(t,e){U(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qt(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Jt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Qt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,n,i,r,o=0;o0;){if(i=te(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&S(r,n,!0)>=e-1)break;e--}o++}return $r}function te(n){var i=null;if(!Hr[n]&&"undefined"!=typeof e&&e&&e.exports)try{i=$r._abbr;var r=t;r("./locale/"+n),ee(i)}catch(o){}return Hr[n]}function ee(t,e){var n;return t&&(n=s(e)?re(t):ne(t,e),n?$r=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),$r._abbr}function ne(t,e){if(null!==e){var n,i=Fr;if(e.abbr=t,null!=Hr[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Hr[t]._config;else if(null!=e.parentLocale)if(null!=Hr[e.parentLocale])i=Hr[e.parentLocale]._config;else{if(n=te(e.parentLocale),null==n)return Nr[e.parentLocale]||(Nr[e.parentLocale]=[]),Nr[e.parentLocale].push({name:t,config:e}),null;i=n._config}return Hr[t]=new T(P(i,e)),Nr[t]&&Nr[t].forEach(function(t){ne(t.name,t.config)}),ee(t),Hr[t]}return delete Hr[t],null}function ie(t,e){if(null!=e){var n,i,r=Fr;i=te(t),null!=i&&(r=i._config),e=P(r,e),n=new T(e),n.parentLocale=Hr[t],Hr[t]=n,ee(t)}else null!=Hr[t]&&(null!=Hr[t].parentLocale?Hr[t]=Hr[t].parentLocale:null!=Hr[t]&&delete Hr[t]);return Hr[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return $r;if(!r(t)){if(e=te(t))return e;t=[t]}return Kt(t)}function oe(){return Ei(Hr)}function ae(t){var e,n=t._a;return n&&m(t).overflow===-2&&(e=n[fr]<0||n[fr]>11?fr:n[pr]<1||n[pr]>ct(n[dr],n[fr])?pr:n[mr]<0||n[mr]>24||24===n[mr]&&(0!==n[vr]||0!==n[yr]||0!==n[gr])?mr:n[vr]<0||n[vr]>59?vr:n[yr]<0||n[yr]>59?yr:n[gr]<0||n[gr]>999?gr:-1,m(t)._overflowDayOfYear&&(epr)&&(e=pr),m(t)._overflowWeeks&&e===-1&&(e=_r),m(t)._overflowWeekday&&e===-1&&(e=br),m(t).overflow=e),t}function se(t,e,n){return null!=t?t:null!=e?e:n}function le(t){var e=new Date(n.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ue(t){var e,n,i,r,o,a=[];if(!t._d){for(i=le(t),t._w&&null==t._a[pr]&&null==t._a[fr]&&ce(t),null!=t._dayOfYear&&(o=se(t._a[dr],i[dr]),(t._dayOfYear>et(o)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),n=kt(o,0,t._dayOfYear),t._a[fr]=n.getUTCMonth(),t._a[pr]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=i[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[mr]&&0===t._a[vr]&&0===t._a[yr]&&0===t._a[gr]&&(t._nextDay=!0,t._a[mr]=0),t._d=(t._useUTC?kt:wt).apply(null,a),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[mr]=24),t._w&&"undefined"!=typeof t._w.d&&t._w.d!==r&&(m(t).weekdayMismatch=!0)}}function ce(t){var e,n,i,r,o,a,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)o=1,a=4,n=se(e.GG,t._a[dr],Mt(xe(),1,4).year),i=se(e.W,1),r=se(e.E,1),(r<1||r>7)&&(l=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var u=Mt(xe(),o,a);n=se(e.gg,t._a[dr],u.year),i=se(e.w,u.week),null!=e.d?(r=e.d,(r<0||r>6)&&(l=!0)):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}i<1||i>Dt(n,o,a)?m(t)._overflowWeeks=!0:null!=l?m(t)._overflowWeekday=!0:(s=Ot(n,i,r,o,a),t._a[dr]=s.year,t._dayOfYear=s.dayOfYear)}function he(t){var e,n,i,r,o,a,s=t._i,l=Rr.exec(s)||Wr.exec(s);if(l){for(m(t).iso=!0,e=0,n=Vr.length;e0&&m(t).unusedInput.push(a),s=s.slice(s.indexOf(i)+i.length),u+=i.length),zi[o]?(i?m(t).empty=!1:m(t).unusedTokens.push(o),tt(o,i,t)):t._strict&&!i&&m(t).unusedTokens.push(o);m(t).charsLeftOver=l-u,s.length>0&&m(t).unusedInput.push(s),t._a[mr]<=12&&m(t).bigHour===!0&&t._a[mr]>0&&(m(t).bigHour=void 0),m(t).parsedDateParts=t._a.slice(0),m(t).meridiem=t._meridiem,t._a[mr]=be(t._locale,t._a[mr],t._meridiem),ue(t),ae(t)}function be(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function we(t){var e,n,i,r,o;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ze(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=Oe(t),t._a){var e=t._isUTC?f(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&S(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qe(){return!!this.isValid()&&!this._isUTC}function Xe(){return!!this.isValid()&&this._isUTC}function Je(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qe(t,e){var n,i,r,o=t,a=null;return $e(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(o={},e?o[e]=t:o.milliseconds=t):(a=to.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:k(a[pr])*n,h:k(a[mr])*n,m:k(a[vr])*n,s:k(a[yr])*n,ms:k(Ie(1e3*a[gr]))*n}):(a=eo.exec(t))?(n="-"===a[1]?-1:("+"===a[1],1),o={y:Ke(a[2],n),M:Ke(a[3],n),w:Ke(a[4],n),d:Ke(a[5],n),h:Ke(a[6],n),m:Ke(a[7],n),s:Ke(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=en(xe(o.from),xe(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),i=new Ee(o),$e(t)&&h(t,"_locale")&&(i._locale=t._locale),i}function Ke(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function tn(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function en(t,e){var n;return t.isValid()&&e.isValid()?(e=He(e,t),t.isBefore(e)?n=tn(t,e):(n=tn(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function nn(t,e){return function(n,i){var r,o;return null===i||isNaN(+i)||(D(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),n="string"==typeof n?+n:n,r=Qe(n,i),rn(this,r,t),this}}function rn(t,e,i,r){var o=e._milliseconds,a=Ie(e._days),s=Ie(e._months);t.isValid()&&(r=null==r||r,s&&mt(t,ot(t,"Month")+s*i),a&&at(t,"Date",ot(t,"Date")+a*i),o&&t._d.setTime(t._d.valueOf()+o*i),r&&n.updateOffset(t,a||s))}function on(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function an(t,e){var i=t||xe(),r=He(i,this).startOf("day"),o=n.calendarFormat(this,r)||"sameElse",a=e&&(x(e[o])?e[o].call(this,i):e[o]);return this.format(a||this.localeData().calendar(o,this,xe(i)))}function sn(){return new _(this)}function ln(t,e){var n=b(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&(e=F(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()9999?z(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function gn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",o=e+'[")]';return this.format(n+i+r+o)}function _n(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=z(this,t);return this.localeData().postformat(e)}function bn(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function wn(t){return this.from(xe(),t)}function kn(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Sn(t){return this.to(xe(),t)}function On(t){var e;return void 0===t?this._locale._abbr:(e=re(t),null!=e&&(this._locale=e),this)}function Mn(){return this._locale}function Dn(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function xn(t){return t=F(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Cn(){return this._d.valueOf()-6e4*(this._offset||0)}function Pn(){return Math.floor(this.valueOf()/1e3)}function Tn(){return new Date(this.valueOf())}function Yn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function An(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function jn(){return this.isValid()?this.toISOString():null}function En(){return v(this)}function $n(){return d({},m(this))}function In(){return m(this).overflow}function Ln(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Fn(t,e){U(0,[t,t.length],0,e)}function Hn(t){return Un.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Nn(t){return Un.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Rn(){return Dt(this.year(),1,4)}function Wn(){var t=this.localeData()._week;return Dt(this.year(),t.dow,t.doy)}function Un(t,e,n,i,r){var o;return null==t?Mt(this,i,r).year:(o=Dt(t,i,r),e>o&&(e=o),Vn.call(this,t,e,n,i,r))}function Vn(t,e,n,i,r){var o=Ot(t,e,n,i,r),a=kt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Gn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function zn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Bn(t,e){e[gr]=k(1e3*("0."+t))}function Zn(){return this._isUTC?"UTC":""}function qn(){return this._isUTC?"Coordinated Universal Time":""}function Xn(t){return xe(1e3*t)}function Jn(){return xe.apply(null,arguments).parseZone()}function Qn(t){return t}function Kn(t,e,n,i){var r=re(),o=f().set(i,e);return r[n](o,t)}function ti(t,e,n){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return Kn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Kn(t,i,n,"month");return r}function ei(t,e,n,i){"boolean"==typeof t?(l(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,l(e)&&(n=e,e=void 0),e=e||"");var r=re(),o=t?r._week.dow:0;if(null!=n)return Kn(e,(n+o)%7,i,"day");var a,s=[];for(a=0;a<7;a++)s[a]=Kn(e,(a+o)%7,i,"day");return s}function ni(t,e){return ti(t,e,"months")}function ii(t,e){return ti(t,e,"monthsShort")}function ri(t,e,n){return ei(t,e,n,"weekdays")}function oi(t,e,n){return ei(t,e,n,"weekdaysShort")}function ai(t,e,n){return ei(t,e,n,"weekdaysMin")}function si(){var t=this._data;return this._milliseconds=fo(this._milliseconds),this._days=fo(this._days),this._months=fo(this._months),t.milliseconds=fo(t.milliseconds),t.seconds=fo(t.seconds),t.minutes=fo(t.minutes),t.hours=fo(t.hours),t.months=fo(t.months),t.years=fo(t.years),this}function li(t,e,n,i){var r=Qe(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function ui(t,e){return li(this,t,e,1)}function ci(t,e){return li(this,t,e,-1)}function hi(t){return t<0?Math.floor(t):Math.ceil(t)}function di(){var t,e,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*hi(pi(s)+a),a=0,s=0),l.milliseconds=o%1e3,t=w(o/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,n=w(e/60),l.hours=n%24,a+=w(n/24),r=w(fi(a)),s+=r,a-=hi(pi(r)),i=w(s/12),s%=12,l.days=a,l.months=s,l.years=i,this}function fi(t){return 4800*t/146097}function pi(t){return 146097*t/4800}function mi(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(t=F(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+fi(e),"month"===t?n:n/12;switch(e=this._days+Math.round(pi(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function vi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN}function yi(t){return function(){return this.as(t)}}function gi(){return Qe(this)}function _i(t){return t=F(t),this.isValid()?this[t+"s"]():NaN}function bi(t){return function(){return this.isValid()?this._data[t]:NaN}}function wi(){return w(this.days()/7)}function ki(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Si(t,e,n){var i=Qe(t).abs(),r=Po(i.as("s")),o=Po(i.as("m")),a=Po(i.as("h")),s=Po(i.as("d")),l=Po(i.as("M")),u=Po(i.as("y")),c=r<=To.ss&&["s",r]||r0,c[4]=n,ki.apply(null,c)}function Oi(t){return void 0===t?Po:"function"==typeof t&&(Po=t,!0)}function Mi(t,e){return void 0!==To[t]&&(void 0===e?To[t]:(To[t]=e,"s"===t&&(To.ss=e-1),!0))}function Di(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=Si(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function xi(t){return(t>0)-(t<0)||+t}function Ci(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i=Yo(this._milliseconds)/1e3,r=Yo(this._days),o=Yo(this._months);t=w(i/60),e=w(t/60),i%=60,t%=60,n=w(o/12),o%=12;var a=n,s=o,l=r,u=e,c=t,h=i?i.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var f=d<0?"-":"",p=xi(this._months)!==xi(d)?"-":"",m=xi(this._days)!==xi(d)?"-":"",v=xi(this._milliseconds)!==xi(d)?"-":"";return f+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?m+l+"D":"")+(u||c||h?"T":"")+(u?v+u+"H":"")+(c?v+c+"M":"")+(h?v+h+"S":"")}var Pi,Ti;Ti=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i68?1900:2e3)};var wr,kr=rt("FullYear",!0);wr=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:y()}),Jr=function(){return Date.now?Date.now():+new Date},Qr=["year","quarter","month","week","day","hour","minute","second","millisecond"];Le("Z",":"),Le("ZZ",""),Z("Z",sr),Z("ZZ",sr),Q(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Fe(sr,t)});var Kr=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var to=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,eo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Qe.fn=Ee.prototype,Qe.invalid=je;var no=nn(1,"add"),io=nn(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ro=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fn("gggg","weekYear"),Fn("ggggg","weekYear"),Fn("GGGG","isoWeekYear"),Fn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),Z("G",or),Z("g",or),Z("GG",Qi,Zi),Z("gg",Qi,Zi),Z("GGGG",nr,Xi),Z("gggg",nr,Xi),Z("GGGGG",ir,Ji),Z("ggggg",ir,Ji),K(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),K(["gg","GG"],function(t,e,i,r){e[r]=n.parseTwoDigitYear(t)}),U("Q",0,"Qo","quarter"),L("quarter","Q"),N("quarter",7),Z("Q",Bi),Q("Q",function(t,e){e[fr]=3*(k(t)-1)}),U("D",["DD",2],"Do","date"),L("date","D"),N("date",9),Z("D",Qi),Z("DD",Qi,Zi),Z("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],pr),Q("Do",function(t,e){e[pr]=k(t.match(Qi)[0])});var oo=rt("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),N("dayOfYear",4),Z("DDD",er),Z("DDDD",qi),Q(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),U("m",["mm",2],0,"minute"),L("minute","m"),N("minute",14),Z("m",Qi),Z("mm",Qi,Zi),Q(["m","mm"],vr);var ao=rt("Minutes",!1);U("s",["ss",2],0,"second"),L("second","s"),N("second",15),Z("s",Qi),Z("ss",Qi,Zi),Q(["s","ss"],yr);var so=rt("Seconds",!1);U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond(); }),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),N("millisecond",16),Z("S",er,Bi),Z("SS",er,Zi),Z("SSS",er,qi);var lo;for(lo="SSSS";lo.length<=9;lo+="S")Z(lo,rr);for(lo="S";lo.length<=9;lo+="S")Q(lo,Bn);var uo=rt("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var co=_.prototype;co.add=no,co.calendar=an,co.clone=sn,co.diff=pn,co.endOf=xn,co.format=_n,co.from=bn,co.fromNow=wn,co.to=kn,co.toNow=Sn,co.get=st,co.invalidAt=In,co.isAfter=ln,co.isBefore=un,co.isBetween=cn,co.isSame=hn,co.isSameOrAfter=dn,co.isSameOrBefore=fn,co.isValid=En,co.lang=ro,co.locale=On,co.localeData=Mn,co.max=Xr,co.min=qr,co.parsingFlags=$n,co.set=lt,co.startOf=Dn,co.subtract=io,co.toArray=Yn,co.toObject=An,co.toDate=Tn,co.toISOString=yn,co.inspect=gn,co.toJSON=jn,co.toString=vn,co.unix=Pn,co.valueOf=Cn,co.creationData=Ln,co.year=kr,co.isLeapYear=it,co.weekYear=Hn,co.isoWeekYear=Nn,co.quarter=co.quarters=Gn,co.month=vt,co.daysInMonth=yt,co.week=co.weeks=Tt,co.isoWeek=co.isoWeeks=Yt,co.weeksInYear=Wn,co.isoWeeksInYear=Rn,co.date=oo,co.day=co.days=Ht,co.weekday=Nt,co.isoWeekday=Rt,co.dayOfYear=zn,co.hour=co.hours=Lr,co.minute=co.minutes=ao,co.second=co.seconds=so,co.millisecond=co.milliseconds=uo,co.utcOffset=Re,co.utc=Ue,co.local=Ve,co.parseZone=Ge,co.hasAlignedHourOffset=ze,co.isDST=Be,co.isLocal=qe,co.isUtcOffset=Xe,co.isUtc=Je,co.isUTC=Je,co.zoneAbbr=Zn,co.zoneName=qn,co.dates=M("dates accessor is deprecated. Use date instead.",oo),co.months=M("months accessor is deprecated. Use month instead",vt),co.years=M("years accessor is deprecated. Use year instead",kr),co.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",We),co.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ze);var ho=T.prototype;ho.calendar=Y,ho.longDateFormat=A,ho.invalidDate=j,ho.ordinal=E,ho.preparse=Qn,ho.postformat=Qn,ho.relativeTime=$,ho.pastFuture=I,ho.set=C,ho.months=ht,ho.monthsShort=dt,ho.monthsParse=pt,ho.monthsRegex=_t,ho.monthsShortRegex=gt,ho.week=xt,ho.firstDayOfYear=Pt,ho.firstDayOfWeek=Ct,ho.weekdays=Et,ho.weekdaysMin=It,ho.weekdaysShort=$t,ho.weekdaysParse=Ft,ho.weekdaysRegex=Wt,ho.weekdaysShortRegex=Ut,ho.weekdaysMinRegex=Vt,ho.isPM=Xt,ho.meridiem=Jt,ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),n.lang=M("moment.lang is deprecated. Use moment.locale instead.",ee),n.langData=M("moment.langData is deprecated. Use moment.localeData instead.",re);var fo=Math.abs,po=yi("ms"),mo=yi("s"),vo=yi("m"),yo=yi("h"),go=yi("d"),_o=yi("w"),bo=yi("M"),wo=yi("y"),ko=bi("milliseconds"),So=bi("seconds"),Oo=bi("minutes"),Mo=bi("hours"),Do=bi("days"),xo=bi("months"),Co=bi("years"),Po=Math.round,To={ss:44,s:45,m:45,h:22,d:26,M:11},Yo=Math.abs,Ao=Ee.prototype;return Ao.isValid=Ae,Ao.abs=si,Ao.add=ui,Ao.subtract=ci,Ao.as=mi,Ao.asMilliseconds=po,Ao.asSeconds=mo,Ao.asMinutes=vo,Ao.asHours=yo,Ao.asDays=go,Ao.asWeeks=_o,Ao.asMonths=bo,Ao.asYears=wo,Ao.valueOf=vi,Ao._bubble=di,Ao.clone=gi,Ao.get=_i,Ao.milliseconds=ko,Ao.seconds=So,Ao.minutes=Oo,Ao.hours=Mo,Ao.days=Do,Ao.weeks=wi,Ao.months=xo,Ao.years=Co,Ao.humanize=Di,Ao.toISOString=Ci,Ao.toString=Ci,Ao.toJSON=Ci,Ao.locale=On,Ao.localeData=Mn,Ao.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ci),Ao.lang=ro,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Z("x",or),Z("X",lr),Q("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Q("x",function(t,e,n){n._d=new Date(k(t))}),n.version="2.22.1",i(xe),n.fn=co,n.min=Pe,n.max=Te,n.now=Jr,n.utc=f,n.unix=Xn,n.months=ni,n.isDate=u,n.locale=ee,n.invalid=y,n.duration=Qe,n.isMoment=b,n.weekdays=ri,n.parseZone=Jn,n.localeData=re,n.isDuration=$e,n.monthsShort=ii,n.weekdaysMin=ai,n.defineLocale=ne,n.updateLocale=ie,n.locales=oe,n.weekdaysShort=oi,n.normalizeUnits=F,n.relativeTimeRounding=Oi,n.relativeTimeThreshold=Mi,n.calendarFormat=on,n.prototype=co,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},n})},{}],23:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n=3?o.postLoadDataConstructor():t.on("loadeddata",o.postLoadDataConstructor.bind(o)),o}return o(e,t),a(e,[{key:"postLoadDataConstructor",value:function(){this.annotationState=new c(this.player),this.annotationState.annotations=this.options.annotationsObjects,this.controls=new u(this.player,this.options.bindArrowKeys),this.bindEvents(),this.setBounds(!1),this.options.startInAnnotationMode&&this.toggleAnnotationMode(),this.pluginReady()}},{key:"bindEvents",value:function(){var t=this;$(window).on("resize.vac-window-resize",l.throttle(this.setBounds.bind(this),500)),this.player.on("fullscreenchange",l.throttle(this.setBounds.bind(this),500)),this.options.showFullScreen||this.player.on("fullscreenchange",function(){t.player.isFullscreen_?(t.preFullscreenAnnotationsEnabled=t.active,$(t.player.el()).addClass("vac-disable-fullscreen")):$(t.player.el()).removeClass("vac-disable-fullscreen"),t.preFullscreenAnnotationsEnabled&&t.toggleAnnotationMode()}.bind(this))}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventDispatcher.fire(t,e)}},{key:"toggleAnnotationMode",value:function(){this.active=!this.active,this.player.toggleClass("vac-active"),this.annotationState.enabled=this.active,this.active?this.fire("annotationModeEnabled"):this.fire("annotationModeDisabled"),this.options.showControls&&(this.active?this.controls.render():this.controls.clear(!0))}},{key:"setBounds",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.bounds={};var e=$(this.player.el()),n=e.find(".vjs-control-bar");this.bounds.left=e.offset().left,this.bounds.top=e.offset().top,this.bounds.right=this.bounds.left+e.width(),this.bounds.bottom=this.bounds.top+e.height(),this.bounds.bottomWithoutControls=this.bounds.bottom-n.height(),t&&this.fire("playerBoundsChanged",this.bounds)}},{key:"onReady",value:function(t){return this.eventDispatcher.pluginReady?t():void this._readyCallbacks.push(t)}},{key:"pluginReady",value:function(){for(this.eventDispatcher.pluginReady=!0;this._readyCallbacks.length;)this._readyCallbacks.pop()()}},{key:"dispose",value:function(){this.controls=this.controls.teardown(),this.annotationState=this.annotationState.teardown(),this.eventDispatcher=this.eventDispatcher.teardown(),this.teardown(),this.player&&(this.player.annotationComments=null,$(this.player.el()).removeClass("vac-active"),$(this.player.el()).find("[class^='vac-']").remove()),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"dispose",this).call(this)}},{key:"teardown",value:function(){this.player&&this.player.off("fullscreenchange"),$(window).off("resize.vac-window-resize")}}]),e}(n)}},{"./components/annotation_state":26,"./components/controls":29,"./lib/event_dispatcher":36,"./lib/polyfills":40,"./lib/utils":41}],24:[function(t,e,n){var i="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},r=t("handlebars/runtime");n.comment=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",h=t.escapeExpression;return'
\n
\n
'+h(t.lambda(null!=(a=null!=e?e.meta:e)?a.user_name:a,e))+'
\n
'+h((s=null!=(s=n.timeSince||(null!=e?e.timeSince:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"timeSince",hash:{},data:o}):s))+'\n   X\n
\n
\n
\n '+h((n.breaklines||e&&e.breaklines||u).call(l,null!=e?e.body:e,{name:"breaklines",hash:{},data:o}))+"\n
\n
\n"},useData:!0}),n.comment_list=r.template({1:function(t,e,n,i,r,o){var a;return" "+(null!=(a=t.lambda(o[0][0],e))?a:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r,o){var a,s,l=null!=e?e:t.nullContext||{};return'
\n
\n'+(null!=(a=n.each.call(l,null!=e?e.commentsHTML:e,{name:"each",hash:{},fn:t.program(1,r,1,o),inverse:t.noop,data:r,blockParams:o}))?a:"")+'
ADD REPLY
\n
\n
\n
\n
@ '+t.escapeExpression((s=null!=(s=n.rangeStr||(null!=e?e.rangeStr:e))?s:n.helperMissing,"function"==typeof s?s.call(l,{name:"rangeStr",hash:{},data:r,blockParams:o}):s))+'
\n
\n DELETE | CLOSE\n
\n
\n
\n'},useData:!0,useBlockParams:!0}),n.controls=r.template({1:function(t,e,n,i,r){var o;return null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.showControls:e,{name:"if",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r}))?o:""},2:function(t,e,n,i,r){var o;return'
\n \n'+(null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.showNav:e,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?o:"")+"
\n"},3:function(t,e,n,i,r){return'
\n
Prev
\n
Next
\n
\n'},5:function(t,e,n,i,r){var o,a=null!=e?e:t.nullContext||{};return'
\n
\n
Click and drag to select
\n
\n
\n'+(null!=(o=n["if"].call(a,null!=e?e.showControls:e,{name:"if",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r}))?o:"")+"\n"+(null!=(o=n["if"].call(a,null!=e?e.writingComment:e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r}))?o:"")},6:function(t,e,n,i,r){var o;return'
\n Select shape + range\n'+(null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.internalCommenting:e,{name:"if",hash:{},fn:t.program(7,r,0),inverse:t.noop,data:r}))?o:"")+'
\n
-1 sec
\n
+1 sec
\n
\n
\n'},7:function(t,e,n,i,r){return' \n cancel\n'},9:function(t,e,n,i,r){var o;return'
\n
\n
\n
New Annotation @ '+t.escapeExpression((o=null!=(o=n.rangeStr||(null!=e?e.rangeStr:e))?o:n.helperMissing,"function"==typeof o?o.call(null!=e?e:t.nullContext||{},{name:"rangeStr",hash:{},data:r}):o))+'
\n
\n \n
\n \n Cancel\n
\n
\n
\n
\n
\n'},compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){var o,a=null!=e?e:t.nullContext||{};return(null!=(o=n.unless.call(a,null!=e?e.adding:e,{name:"unless",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?o:"")+"\n"+(null!=(o=n["if"].call(a,null!=e?e.adding:e,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.noop,data:r}))?o:"")},useData:!0}),n.draggable_marker=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s=null!=e?e:t.nullContext||{},l=n.helperMissing,u="function",c=t.escapeExpression;return'
\n
\n'},useData:!0}),n.marker=r.template({1:function(t,e,n,i,r){return"vac-ranged-marker"},3:function(t,e,n,i,r){var o;return"width:"+t.escapeExpression((o=null!=(o=n.width||(null!=e?e.width:e))?o:n.helperMissing,"function"==typeof o?o.call(null!=e?e:t.nullContext||{},{name:"width",hash:{},data:r}):o))+";"},5:function(t,e,n,i,r){var o;return null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.tooltipBody:e,{name:"if",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r}))?o:""},6:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",h=t.escapeExpression;return'
\n \n '+h((s=null!=(s=n.tooltipTime||(null!=e?e.tooltipTime:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"tooltipTime",hash:{},data:o}):s))+" - "+h((s=null!=(s=n.tooltipBody||(null!=e?e.tooltipBody:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"tooltipBody",hash:{},data:o}):s))+"\n \n
\n"},7:function(t,e,n,i,r){return"vac-right-side"},compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",h=t.escapeExpression;return'
\n'+(null!=(a=n["if"].call(l,null!=e?e.showTooltip:e,{name:"if",hash:{},fn:t.program(5,o,0),inverse:t.noop,data:o}))?a:"")+"
\n"},useData:!0}),n.marker_wrap=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){return'
\n\t
\n
'},useData:!0}),n.new_comment=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s=null!=e?e:t.nullContext||{},l=n.helperMissing,u="function",c=t.escapeExpression;return'
\n
\n
\n \n
\n \n Cancel\n
\n
\n
\n'},useData:!0}),n.player_button=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){return'\n\n\t\n\t \n\t \n\t\n'},useData:!0})},{"handlebars/runtime":20}],25:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0],e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isOpen=!0;var r=i||!u.isWithinRange(this.range.start,this.range.end,Math.floor(this.currentTime)),o=n&&this.plugin.options.showMarkerShapeAndTooltips;this.marker.setActive(o),!n&&this.plugin.options.showCommentList&&this.commentList.render(),(!n||n&&this.plugin.options.showMarkerShapeAndTooltips)&&(this.annotationShape.render(),this.shape&&this.annotationShape.$el.on("click.vac-annotation",function(){e.plugin.annotationState.openAnnotation(e,!1,!1,!1)})),t&&this.player.pause(),r&&(this.currentTime=this.range.start),this.plugin.fire("annotationOpened",{annotation:this.data,triggered_by_timeline:n})}},{key:"close",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isOpen&&(this.isOpen=!1,this.marker.deactivate(),this.commentList.teardown(!1),this.annotationShape.$el&&this.annotationShape.$el.off("click.vac-annotation"),this.annotationShape.teardown(),t&&this.plugin.annotationState.clearActive(),this.plugin.fire("annotationClosed",this.data))}},{key:"buildSecondsActiveArray",value:function(){var t=[];if(this.range.end)for(var e=this.range.start;e<=this.range.end;e++)t.push(e);else{var n=this.range.start;t.push(n),n0&&void 0!==arguments[0])||arguments[0];this.close(!0),this.marker.teardown(),this.commentList&&this.commentList.teardown(t),t&&this.plugin.annotationState.removeAnnotation(this),this.annotationShape&&this.annotationShape.teardown(),t&&s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"teardown",this).call(this)}},{key:"data",get:function(){return{id:this.id,range:this.range,shape:this.shape,comments:this.commentList.data}}},{key:"isActive",get:function(){return this.plugin.annotationState.activeAnnotation===this}}],[{key:"newFromData",value:function(t,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=d.dataObj(i,r);t&&(t=u.parseIntObj(t)),n&&(n=u.parseIntObj(n));var s={id:o,range:t,shape:n,comments:[a]};return new e(s,r.player)}}]),e}(l)},{"./../lib/player_ui_component":39,"./../lib/utils.js":41,"./comment":27,"./comment_list":28,"./marker":31,"./shape":34}],26:[function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ee.range.start?1:0})}},{key:"addNewAnnotation",value:function(t){this._annotations.push(t),this.openAnnotation(t,!0,!0,!1,!0),this.stateChanged()}},{key:"createAndAddAnnotation",value:function(t){this.plugin.controls.uiState.adding&&this.plugin.controls.cancelAddNew();var e=h.newFromData(t.range,t.shape,t.commentStr||"",this.plugin,t.id);this.addNewAnnotation(e)}},{key:"destroyAnnotationById",value:function(t){var e=this.findAnnotation(t);e&&e.teardown()}},{key:"removeAnnotation",value:function(t){var e=t.id,n=this._annotations.indexOf(t);this._annotations.splice(n,1),this.stateChanged(),this.plugin.fire("annotationDeleted",{id:e})}},{key:"setLiveAnnotation",value:function(){if(this.enabled){var t=Math.floor(this.currentTime);if(this.skipLiveCheck)return void(t!==this.lastVideoTime&&(this.skipLiveCheck=!1));var e=this.activeAnnotationsForTime(t);if(!e.length)return this.activeAnnotation.close();var n=this.annotations[e[e.length-1]];if(this.activeAnnotation.range){if(n===this.activeAnnotation)return;var i=n.range.start,r=this.activeAnnotation.range.start;if(i===r&&i===t)return}this.openAnnotation(n,!1,!1,!0)}}},{key:"activeAnnotationsForTime",value:function(t){return this.annotations.length?this.annotationTimeMap[t]||[]:[]}},{key:"rebuildAnnotationTimeMap",value:function(){var t=this,e={};this.annotations.forEach(function(n){n.secondsActive.forEach(function(i){var r=e[i]||[];r.push(t.annotations.indexOf(n)),e[i]=r})}),this.annotationTimeMap=e}},{key:"clearActive",value:function(){this.activeAnnotation.close(!1),this._activeAnnotation=null}},{key:"openAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.plugin.active||this.plugin.toggleAnnotationMode(),this.skipLiveCheck=e,this.clearActive(),t.open(n,i,r),this.activeAnnotation=t,this.lastVideoTime=this.activeAnnotation.range.start}},{key:"openAnnotationById",value:function(t){var e=this.findAnnotation(t);e&&this.openAnnotation(e)}},{key:"findAnnotation",value:function(t){return this.annotations.find(function(e){return e.id==t})}},{key:"findComment",value:function(t){var e,n=this.annotations.map(function(t){return t.commentList.comments});return n=(e=[]).concat.apply(e,i(n)),n.find(function(e){return e.id==t})}},{key:"nextAnnotation",value:function(){if(this._activeAnnotation){var t=this.annotations.indexOf(this._activeAnnotation),e=t===this.annotations.length-1?0:t+1;return this.openAnnotation(this.annotations[e],!0)}for(var n=Math.floor(this.currentTime),i=0;in)return this.openAnnotation(this.annotations[i],!0);this.openAnnotation(this.annotations[0],!0)}},{key:"prevAnnotation",value:function(){if(this._activeAnnotation){var t=this.annotations.indexOf(this._activeAnnotation),e=0===t?this.annotations.length-1:t-1;return this.openAnnotation(this.annotations[e],!0)}for(var n=Math.floor(this.currentTime),i=this.annotations.length-1;i>=0;i--)if(this.annotations[i].range.start0&&void 0!==arguments[0]?arguments[0]:null;this._activeAnnotation=t},get:function(){return this._activeAnnotation||{close:function(){}}}},{key:"data",get:function(){return this._annotations.map(function(t){return t.data})}}]),e}(c)},{"./../lib/player_component":38,"./../lib/utils":41,"./annotation":25}],27:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"teardown",this).call(this,t)}},{key:"data",get:function(){return{id:this.id,meta:this.meta,body:this.body}}},{key:"HTML",get:function(){return this.$el[0].outerHTML}}],[{key:"newFromData",value:function(t,n,i){var r=this.dataObj(t,i);return new e(r,i.player)}},{key:"dataObj",value:function(t,e){return{meta:Object.assign({datetime:c().toISOString()},e.meta),id:u.guid(),body:t}}}]),e}(l)},{"./../lib/player_ui_component":39,"./../lib/utils":41,moment:22}],28:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){ diff --git a/docs/build/videojs-annotation-comments.cjs.min.js b/docs/build/videojs-annotation-comments.cjs.min.js index 15faae3..6a6aa40 100644 --- a/docs/build/videojs-annotation-comments.cjs.min.js +++ b/docs/build/videojs-annotation-comments.cjs.min.js @@ -1,5 +1,3 @@ -/* Version 1.1.2 videojs-annotation-comments (https://github.com/contently/videojs-annotation-comments.git), Authored by Evan Carothers & Jack Pope */ - !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.AnnotationComments=t()}}(function(){var t;return function(){function t(e,n,i){function r(a,s){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n||t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a= 2.0.0-beta.1",7:">= 4.0.0"};n.REVISION_CHANGES=p;var m="[object Object]";r.prototype={constructor:r,logger:d["default"],log:d["default"].log,registerHelper:function(t,e){if(o.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(o.toString.call(t)===m)o.extend(this.partials,t);else{if("undefined"==typeof e)throw new s["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(o.toString.call(t)===m){if(e)throw new s["default"]("Arg not supported with multiple decorators");o.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var v=d["default"].log;n.log=v,n.createFrame=o.createFrame,n.logger=d["default"]},{"./decorators":4,"./exception":6,"./helpers":7,"./logger":15,"./utils":19}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){a["default"](t)}n.__esModule=!0,n.registerDefaultDecorators=r;var o=t("./decorators/inline"),a=i(o)},{"./decorators/inline":5}],5:[function(t,e,n){"use strict";n.__esModule=!0;var i=t("../utils");n["default"]=function(t){t.registerDecorator("inline",function(t,e,n,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var a=n.partials;n.partials=i.extend({},a,e.partials);var s=t(r,o);return n.partials=a,s}),e.partials[r.args[0]]=r.fn,o})},e.exports=n["default"]},{"../utils":19}],6:[function(t,e,n){"use strict";function i(t,e){var n=e&&e.loc,o=void 0,a=void 0;n&&(o=n.start.line,a=n.start.column,t+=" - "+o+":"+a);for(var s=Error.prototype.constructor.call(this,t),l=0;l0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var a=i.createFrame(n.data);a.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:a}}return o(e,n)})},e.exports=n["default"]},{"../utils":19}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}n.__esModule=!0;var r=t("../utils"),o=t("../exception"),a=i(o);n["default"]=function(t){t.registerHelper("each",function(t,e){function n(e,n,o){u&&(u.key=e,u.index=n,u.first=0===n,u.last=!!o,c&&(u.contextPath=c+e)),l+=i(t[e],{data:u,blockParams:r.blockParams([t[e],e],[c+e,null])})}if(!e)throw new a["default"]("Must pass iterator to #each");var i=e.fn,o=e.inverse,s=0,l="",u=void 0,c=void 0;if(e.data&&e.ids&&(c=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(u=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var d=t.length;s=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o":">",'"':""","'":"'","`":"`","=":"="},h=/[&<>"'`=]/g,f=/[&<>"'`=]/,p=Object.prototype.toString;n.toString=p;var m=function(t){return"function"==typeof t};m(/x/)&&(n.isFunction=m=function(t){return"function"==typeof t&&"[object Function]"===p.call(t)}),n.isFunction=m;var v=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===p.call(t)};n.isArray=v},{}],20:[function(t,e,n){e.exports=t("./dist/cjs/handlebars.runtime")["default"]},{"./dist/cjs/handlebars.runtime":2}],21:[function(t,e,n){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError("this is null or not defined");var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r0)for(n=0;n0?"future":"past"];return x(n)?n(e):n.replace(/%s/i,e)}function L(t,e){var n=t.toLowerCase();Ri[n]=Ri[n+"s"]=Ri[e]=t}function F(t){return"string"==typeof t?Ri[t]||Ri[t.toLowerCase()]:void 0}function H(t){var e,n,i={};for(n in t)d(t,n)&&(e=F(n),e&&(i[e]=t[n]));return i}function N(t,e){Wi[t]=e}function R(t){var e=[];for(var n in t)e.push({unit:n,priority:Wi[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function W(t,e,n){var i=""+Math.abs(t),r=e-i.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function U(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(zi[t]=r),e&&(zi[e[0]]=function(){return W(r.apply(this,arguments),e[1],e[2])}),n&&(zi[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function G(t){var e,n,i=t.match(Ui);for(e=0,n=i.length;e=0&&Vi.test(t);)t=t.replace(Vi,n),Vi.lastIndex=0,i-=1;return t}function Z(t,e,n){cr[t]=x(e)?e:function(t,i){return t&&n?n:e}}function q(t,e){return d(cr,t)?cr[t](e._strict,e._locale):new RegExp(X(t))}function X(t){return J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),l(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function kt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function St(t,e,n){var i=7+e-n,r=(7+kt(t,0,i).getUTCDay()-e)%7;return-r+i-1}function Ot(t,e,n,i,r){var o,a,s=(7+n-i)%7,l=St(t,i,r),u=1+7*(e-1)+s+l;return u<=0?(o=t-1,a=et(o)+u):u>et(t)?(o=t+1,a=u-et(t)):(o=t,a=u),{year:o,dayOfYear:a}}function Mt(t,e,n){var i,r,o=St(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?(r=t.year()-1,i=a+Dt(r,e,n)):a>Dt(t.year(),e,n)?(i=a-Dt(t.year(),e,n),r=t.year()+1):(r=t.year(),i=a),{week:i,year:r}}function Dt(t,e,n){var i=St(t,e,n),r=St(t+1,e,n);return(et(t)-i+r)/7}function xt(t){return Mt(t,this._week.dow,this._week.doy).week}function Ct(){return this._week.dow}function Pt(){return this._week.doy}function Tt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Yt(t){var e=Mt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function At(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function jt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Et(t,e){return t?r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:r(this._weekdays)?this._weekdays:this._weekdays.standalone}function $t(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function It(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Lt(t,e,n){var i,r,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?(r=wr.call(this._weekdaysParse,a),r!==-1?r:null):"ddd"===e?(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null):"dddd"===e?(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null))):"ddd"===e?(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:null))):(r=wr.call(this._minWeekdaysParse,a),r!==-1?r:(r=wr.call(this._weekdaysParse,a),r!==-1?r:(r=wr.call(this._shortWeekdaysParse,a),r!==-1?r:null)))}function Ft(t,e,n){var i,r,o;if(this._weekdaysParseExact)return Lt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ht(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=At(t,this.localeData()),this.add(t-e,"d")):e}function Nt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Rt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=jt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Wt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Ar),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ut(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Vt(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Er),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Gt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,a=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=f([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(i),s.push(r),l.push(o),u.push(i),u.push(r),u.push(o);for(a.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=J(s[e]),l[e]=J(l[e]),u[e]=J(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"), this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function zt(){return this.hours()%12||12}function Bt(){return this.hours()||24}function Zt(t,e){U(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qt(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Jt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Qt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,n,i,r,o=0;o0;){if(i=te(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&S(r,n,!0)>=e-1)break;e--}o++}return $r}function te(t){var i=null;if(!Hr[t]&&"undefined"!=typeof n&&n&&n.exports)try{i=$r._abbr;var r=e;r("./locale/"+t),ee(i)}catch(o){}return Hr[t]}function ee(t,e){var n;return t&&(n=s(e)?re(t):ne(t,e),n?$r=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),$r._abbr}function ne(t,e){if(null!==e){var n,i=Fr;if(e.abbr=t,null!=Hr[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Hr[t]._config;else if(null!=e.parentLocale)if(null!=Hr[e.parentLocale])i=Hr[e.parentLocale]._config;else{if(n=te(e.parentLocale),null==n)return Nr[e.parentLocale]||(Nr[e.parentLocale]=[]),Nr[e.parentLocale].push({name:t,config:e}),null;i=n._config}return Hr[t]=new T(P(i,e)),Nr[t]&&Nr[t].forEach(function(t){ne(t.name,t.config)}),ee(t),Hr[t]}return delete Hr[t],null}function ie(t,e){if(null!=e){var n,i,r=Fr;i=te(t),null!=i&&(r=i._config),e=P(r,e),n=new T(e),n.parentLocale=Hr[t],Hr[t]=n,ee(t)}else null!=Hr[t]&&(null!=Hr[t].parentLocale?Hr[t]=Hr[t].parentLocale:null!=Hr[t]&&delete Hr[t]);return Hr[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return $r;if(!r(t)){if(e=te(t))return e;t=[t]}return Kt(t)}function oe(){return Ei(Hr)}function ae(t){var e,n=t._a;return n&&m(t).overflow===-2&&(e=n[fr]<0||n[fr]>11?fr:n[pr]<1||n[pr]>ct(n[hr],n[fr])?pr:n[mr]<0||n[mr]>24||24===n[mr]&&(0!==n[vr]||0!==n[yr]||0!==n[gr])?mr:n[vr]<0||n[vr]>59?vr:n[yr]<0||n[yr]>59?yr:n[gr]<0||n[gr]>999?gr:-1,m(t)._overflowDayOfYear&&(epr)&&(e=pr),m(t)._overflowWeeks&&e===-1&&(e=_r),m(t)._overflowWeekday&&e===-1&&(e=br),m(t).overflow=e),t}function se(t,e,n){return null!=t?t:null!=e?e:n}function le(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ue(t){var e,n,i,r,o,a=[];if(!t._d){for(i=le(t),t._w&&null==t._a[pr]&&null==t._a[fr]&&ce(t),null!=t._dayOfYear&&(o=se(t._a[hr],i[hr]),(t._dayOfYear>et(o)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),n=kt(o,0,t._dayOfYear),t._a[fr]=n.getUTCMonth(),t._a[pr]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=i[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[mr]&&0===t._a[vr]&&0===t._a[yr]&&0===t._a[gr]&&(t._nextDay=!0,t._a[mr]=0),t._d=(t._useUTC?kt:wt).apply(null,a),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[mr]=24),t._w&&"undefined"!=typeof t._w.d&&t._w.d!==r&&(m(t).weekdayMismatch=!0)}}function ce(t){var e,n,i,r,o,a,s,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)o=1,a=4,n=se(e.GG,t._a[hr],Mt(xe(),1,4).year),i=se(e.W,1),r=se(e.E,1),(r<1||r>7)&&(l=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var u=Mt(xe(),o,a);n=se(e.gg,t._a[hr],u.year),i=se(e.w,u.week),null!=e.d?(r=e.d,(r<0||r>6)&&(l=!0)):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}i<1||i>Dt(n,o,a)?m(t)._overflowWeeks=!0:null!=l?m(t)._overflowWeekday=!0:(s=Ot(n,i,r,o,a),t._a[hr]=s.year,t._dayOfYear=s.dayOfYear)}function de(t){var e,n,i,r,o,a,s=t._i,l=Rr.exec(s)||Wr.exec(s);if(l){for(m(t).iso=!0,e=0,n=Vr.length;e0&&m(e).unusedInput.push(a),s=s.slice(s.indexOf(i)+i.length),u+=i.length),zi[o]?(i?m(e).empty=!1:m(e).unusedTokens.push(o),tt(o,i,e)):e._strict&&!i&&m(e).unusedTokens.push(o);m(e).charsLeftOver=l-u,s.length>0&&m(e).unusedInput.push(s),e._a[mr]<=12&&m(e).bigHour===!0&&e._a[mr]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[mr]=be(e._locale,e._a[mr],e._meridiem),ue(e),ae(e)}function be(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function we(t){var e,n,i,r,o;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ze(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=Oe(t),t._a){var e=t._isUTC?f(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&S(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function qe(){return!!this.isValid()&&!this._isUTC}function Xe(){return!!this.isValid()&&this._isUTC}function Je(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Qe(t,e){var n,i,r,o=t,a=null;return $e(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(o={},e?o[e]=t:o.milliseconds=t):(a=to.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:k(a[pr])*n,h:k(a[mr])*n,m:k(a[vr])*n,s:k(a[yr])*n,ms:k(Ie(1e3*a[gr]))*n}):(a=eo.exec(t))?(n="-"===a[1]?-1:("+"===a[1],1),o={y:Ke(a[2],n),M:Ke(a[3],n),w:Ke(a[4],n),d:Ke(a[5],n),h:Ke(a[6],n),m:Ke(a[7],n),s:Ke(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=en(xe(o.from),xe(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),i=new Ee(o),$e(t)&&d(t,"_locale")&&(i._locale=t._locale),i}function Ke(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function tn(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function en(t,e){var n;return t.isValid()&&e.isValid()?(e=He(e,t),t.isBefore(e)?n=tn(t,e):(n=tn(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function nn(t,e){return function(n,i){var r,o;return null===i||isNaN(+i)||(D(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),n="string"==typeof n?+n:n,r=Qe(n,i),rn(this,r,t),this}}function rn(e,n,i,r){var o=n._milliseconds,a=Ie(n._days),s=Ie(n._months);e.isValid()&&(r=null==r||r,s&&mt(e,ot(e,"Month")+s*i),a&&at(e,"Date",ot(e,"Date")+a*i),o&&e._d.setTime(e._d.valueOf()+o*i),r&&t.updateOffset(e,a||s))}function on(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function an(e,n){var i=e||xe(),r=He(i,this).startOf("day"),o=t.calendarFormat(this,r)||"sameElse",a=n&&(x(n[o])?n[o].call(this,i):n[o]);return this.format(a||this.localeData().calendar(o,this,xe(i)))}function sn(){return new _(this)}function ln(t,e){var n=b(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&(e=F(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()9999?z(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function gn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",o=e+'[")]';return this.format(n+i+r+o)}function _n(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=z(this,e);return this.localeData().postformat(n)}function bn(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Qe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function wn(t){return this.from(xe(),t)}function kn(t,e){return this.isValid()&&(b(t)&&t.isValid()||xe(t).isValid())?Qe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Sn(t){return this.to(xe(),t)}function On(t){var e;return void 0===t?this._locale._abbr:(e=re(t),null!=e&&(this._locale=e),this)}function Mn(){return this._locale}function Dn(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function xn(t){return t=F(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Cn(){return this._d.valueOf()-6e4*(this._offset||0)}function Pn(){return Math.floor(this.valueOf()/1e3)}function Tn(){return new Date(this.valueOf())}function Yn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function An(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function jn(){return this.isValid()?this.toISOString():null}function En(){return v(this)}function $n(){return h({},m(this))}function In(){return m(this).overflow}function Ln(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Fn(t,e){U(0,[t,t.length],0,e)}function Hn(t){return Un.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Nn(t){return Un.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Rn(){return Dt(this.year(),1,4)}function Wn(){var t=this.localeData()._week;return Dt(this.year(),t.dow,t.doy)}function Un(t,e,n,i,r){var o;return null==t?Mt(this,i,r).year:(o=Dt(t,i,r),e>o&&(e=o),Vn.call(this,t,e,n,i,r))}function Vn(t,e,n,i,r){var o=Ot(t,e,n,i,r),a=kt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Gn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function zn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Bn(t,e){e[gr]=k(1e3*("0."+t))}function Zn(){return this._isUTC?"UTC":""}function qn(){return this._isUTC?"Coordinated Universal Time":""}function Xn(t){return xe(1e3*t)}function Jn(){return xe.apply(null,arguments).parseZone()}function Qn(t){return t}function Kn(t,e,n,i){var r=re(),o=f().set(i,e);return r[n](o,t)}function ti(t,e,n){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return Kn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Kn(t,i,n,"month");return r}function ei(t,e,n,i){"boolean"==typeof t?(l(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,l(e)&&(n=e,e=void 0),e=e||"");var r=re(),o=t?r._week.dow:0;if(null!=n)return Kn(e,(n+o)%7,i,"day");var a,s=[];for(a=0;a<7;a++)s[a]=Kn(e,(a+o)%7,i,"day");return s}function ni(t,e){return ti(t,e,"months")}function ii(t,e){return ti(t,e,"monthsShort")}function ri(t,e,n){return ei(t,e,n,"weekdays")}function oi(t,e,n){return ei(t,e,n,"weekdaysShort")}function ai(t,e,n){return ei(t,e,n,"weekdaysMin")}function si(){var t=this._data;return this._milliseconds=fo(this._milliseconds),this._days=fo(this._days),this._months=fo(this._months),t.milliseconds=fo(t.milliseconds),t.seconds=fo(t.seconds),t.minutes=fo(t.minutes),t.hours=fo(t.hours),t.months=fo(t.months),t.years=fo(t.years),this}function li(t,e,n,i){var r=Qe(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function ui(t,e){return li(this,t,e,1)}function ci(t,e){return li(this,t,e,-1)}function di(t){return t<0?Math.floor(t):Math.ceil(t)}function hi(){var t,e,n,i,r,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*di(pi(s)+a),a=0,s=0),l.milliseconds=o%1e3,t=w(o/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,n=w(e/60),l.hours=n%24,a+=w(n/24),r=w(fi(a)),s+=r,a-=di(pi(r)),i=w(s/12),s%=12,l.days=a,l.months=s,l.years=i,this}function fi(t){return 4800*t/146097}function pi(t){return 146097*t/4800}function mi(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(t=F(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+fi(e),"month"===t?n:n/12;switch(e=this._days+Math.round(pi(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function vi(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN}function yi(t){return function(){return this.as(t)}}function gi(){return Qe(this)}function _i(t){return t=F(t),this.isValid()?this[t+"s"]():NaN}function bi(t){return function(){return this.isValid()?this._data[t]:NaN}}function wi(){return w(this.days()/7)}function ki(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Si(t,e,n){var i=Qe(t).abs(),r=Po(i.as("s")),o=Po(i.as("m")),a=Po(i.as("h")),s=Po(i.as("d")),l=Po(i.as("M")),u=Po(i.as("y")),c=r<=To.ss&&["s",r]||r0,c[4]=n,ki.apply(null,c)}function Oi(t){return void 0===t?Po:"function"==typeof t&&(Po=t,!0)}function Mi(t,e){return void 0!==To[t]&&(void 0===e?To[t]:(To[t]=e,"s"===t&&(To.ss=e-1),!0))}function Di(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=Si(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function xi(t){return(t>0)-(t<0)||+t}function Ci(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i=Yo(this._milliseconds)/1e3,r=Yo(this._days),o=Yo(this._months);t=w(i/60),e=w(t/60),i%=60,t%=60,n=w(o/12),o%=12;var a=n,s=o,l=r,u=e,c=t,d=i?i.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",p=xi(this._months)!==xi(h)?"-":"",m=xi(this._days)!==xi(h)?"-":"",v=xi(this._milliseconds)!==xi(h)?"-":"";return f+"P"+(a?p+a+"Y":"")+(s?p+s+"M":"")+(l?m+l+"D":"")+(u||c||d?"T":"")+(u?v+u+"H":"")+(c?v+c+"M":"")+(d?v+d+"S":"")}var Pi,Ti;Ti=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i68?1900:2e3)};var wr,kr=rt("FullYear",!0);wr=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;ethis?this:t:y()}),Jr=function(){return Date.now?Date.now():+new Date},Qr=["year","quarter","month","week","day","hour","minute","second","millisecond"];Le("Z",":"),Le("ZZ",""),Z("Z",sr),Z("ZZ",sr),Q(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Fe(sr,t)});var Kr=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var to=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,eo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Qe.fn=Ee.prototype,Qe.invalid=je;var no=nn(1,"add"),io=nn(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ro=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fn("gggg","weekYear"),Fn("ggggg","weekYear"),Fn("GGGG","isoWeekYear"),Fn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),Z("G",or),Z("g",or),Z("GG",Qi,Zi),Z("gg",Qi,Zi),Z("GGGG",nr,Xi),Z("gggg",nr,Xi),Z("GGGGG",ir,Ji),Z("ggggg",ir,Ji),K(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=k(t)}),K(["gg","GG"],function(e,n,i,r){n[r]=t.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),L("quarter","Q"),N("quarter",7),Z("Q",Bi),Q("Q",function(t,e){e[fr]=3*(k(t)-1)}),U("D",["DD",2],"Do","date"),L("date","D"),N("date",9),Z("D",Qi),Z("DD",Qi,Zi),Z("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Q(["D","DD"],pr),Q("Do",function(t,e){e[pr]=k(t.match(Qi)[0])});var oo=rt("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),N("dayOfYear",4),Z("DDD",er),Z("DDDD",qi),Q(["DDD","DDDD"],function(t,e,n){n._dayOfYear=k(t)}),U("m",["mm",2],0,"minute"),L("minute","m"),N("minute",14),Z("m",Qi),Z("mm",Qi,Zi),Q(["m","mm"],vr);var ao=rt("Minutes",!1);U("s",["ss",2],0,"second"),L("second","s"),N("second",15),Z("s",Qi),Z("ss",Qi,Zi),Q(["s","ss"],yr);var so=rt("Seconds",!1);U("S",0,0,function(){return~~(this.millisecond()/100); }),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),N("millisecond",16),Z("S",er,Bi),Z("SS",er,Zi),Z("SSS",er,qi);var lo;for(lo="SSSS";lo.length<=9;lo+="S")Z(lo,rr);for(lo="S";lo.length<=9;lo+="S")Q(lo,Bn);var uo=rt("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var co=_.prototype;co.add=no,co.calendar=an,co.clone=sn,co.diff=pn,co.endOf=xn,co.format=_n,co.from=bn,co.fromNow=wn,co.to=kn,co.toNow=Sn,co.get=st,co.invalidAt=In,co.isAfter=ln,co.isBefore=un,co.isBetween=cn,co.isSame=dn,co.isSameOrAfter=hn,co.isSameOrBefore=fn,co.isValid=En,co.lang=ro,co.locale=On,co.localeData=Mn,co.max=Xr,co.min=qr,co.parsingFlags=$n,co.set=lt,co.startOf=Dn,co.subtract=io,co.toArray=Yn,co.toObject=An,co.toDate=Tn,co.toISOString=yn,co.inspect=gn,co.toJSON=jn,co.toString=vn,co.unix=Pn,co.valueOf=Cn,co.creationData=Ln,co.year=kr,co.isLeapYear=it,co.weekYear=Hn,co.isoWeekYear=Nn,co.quarter=co.quarters=Gn,co.month=vt,co.daysInMonth=yt,co.week=co.weeks=Tt,co.isoWeek=co.isoWeeks=Yt,co.weeksInYear=Wn,co.isoWeeksInYear=Rn,co.date=oo,co.day=co.days=Ht,co.weekday=Nt,co.isoWeekday=Rt,co.dayOfYear=zn,co.hour=co.hours=Lr,co.minute=co.minutes=ao,co.second=co.seconds=so,co.millisecond=co.milliseconds=uo,co.utcOffset=Re,co.utc=Ue,co.local=Ve,co.parseZone=Ge,co.hasAlignedHourOffset=ze,co.isDST=Be,co.isLocal=qe,co.isUtcOffset=Xe,co.isUtc=Je,co.isUTC=Je,co.zoneAbbr=Zn,co.zoneName=qn,co.dates=M("dates accessor is deprecated. Use date instead.",oo),co.months=M("months accessor is deprecated. Use month instead",vt),co.years=M("years accessor is deprecated. Use year instead",kr),co.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",We),co.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ze);var ho=T.prototype;ho.calendar=Y,ho.longDateFormat=A,ho.invalidDate=j,ho.ordinal=E,ho.preparse=Qn,ho.postformat=Qn,ho.relativeTime=$,ho.pastFuture=I,ho.set=C,ho.months=dt,ho.monthsShort=ht,ho.monthsParse=pt,ho.monthsRegex=_t,ho.monthsShortRegex=gt,ho.week=xt,ho.firstDayOfYear=Pt,ho.firstDayOfWeek=Ct,ho.weekdays=Et,ho.weekdaysMin=It,ho.weekdaysShort=$t,ho.weekdaysParse=Ft,ho.weekdaysRegex=Wt,ho.weekdaysShortRegex=Ut,ho.weekdaysMinRegex=Vt,ho.isPM=Xt,ho.meridiem=Jt,ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),t.lang=M("moment.lang is deprecated. Use moment.locale instead.",ee),t.langData=M("moment.langData is deprecated. Use moment.localeData instead.",re);var fo=Math.abs,po=yi("ms"),mo=yi("s"),vo=yi("m"),yo=yi("h"),go=yi("d"),_o=yi("w"),bo=yi("M"),wo=yi("y"),ko=bi("milliseconds"),So=bi("seconds"),Oo=bi("minutes"),Mo=bi("hours"),Do=bi("days"),xo=bi("months"),Co=bi("years"),Po=Math.round,To={ss:44,s:45,m:45,h:22,d:26,M:11},Yo=Math.abs,Ao=Ee.prototype;return Ao.isValid=Ae,Ao.abs=si,Ao.add=ui,Ao.subtract=ci,Ao.as=mi,Ao.asMilliseconds=po,Ao.asSeconds=mo,Ao.asMinutes=vo,Ao.asHours=yo,Ao.asDays=go,Ao.asWeeks=_o,Ao.asMonths=bo,Ao.asYears=wo,Ao.valueOf=vi,Ao._bubble=hi,Ao.clone=gi,Ao.get=_i,Ao.milliseconds=ko,Ao.seconds=So,Ao.minutes=Oo,Ao.hours=Mo,Ao.days=Do,Ao.weeks=wi,Ao.months=xo,Ao.years=Co,Ao.humanize=Di,Ao.toISOString=Ci,Ao.toString=Ci,Ao.toJSON=Ci,Ao.locale=On,Ao.localeData=Mn,Ao.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ci),Ao.lang=ro,U("X",0,0,"unix"),U("x",0,0,"valueOf"),Z("x",or),Z("X",lr),Q("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Q("x",function(t,e,n){n._d=new Date(k(t))}),t.version="2.22.1",i(xe),t.fn=co,t.min=Pe,t.max=Te,t.now=Jr,t.utc=f,t.unix=Xn,t.months=ni,t.isDate=u,t.locale=ee,t.invalid=y,t.duration=Qe,t.isMoment=b,t.weekdays=ri,t.parseZone=Jn,t.localeData=re,t.isDuration=$e,t.monthsShort=ii,t.weekdaysMin=ai,t.defineLocale=ne,t.updateLocale=ie,t.locales=oe,t.weekdaysShort=oi,t.normalizeUnits=F,t.relativeTimeRounding=Oi,t.relativeTimeThreshold=Mi,t.calendarFormat=on,t.prototype=co,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},t})},{}],23:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n=3?o.postLoadDataConstructor():t.on("loadeddata",o.postLoadDataConstructor.bind(o)),o}return o(e,t),a(e,[{key:"postLoadDataConstructor",value:function(){this.annotationState=new c(this.player),this.annotationState.annotations=this.options.annotationsObjects,this.controls=new u(this.player,this.options.bindArrowKeys),this.bindEvents(),this.setBounds(!1),this.options.startInAnnotationMode&&this.toggleAnnotationMode(),this.pluginReady()}},{key:"bindEvents",value:function(){var t=this;$(window).on("resize.vac-window-resize",l.throttle(this.setBounds.bind(this),500)),this.player.on("fullscreenchange",l.throttle(this.setBounds.bind(this),500)),this.options.showFullScreen||this.player.on("fullscreenchange",function(){t.player.isFullscreen_?(t.preFullscreenAnnotationsEnabled=t.active,$(t.player.el()).addClass("vac-disable-fullscreen")):$(t.player.el()).removeClass("vac-disable-fullscreen"),t.preFullscreenAnnotationsEnabled&&t.toggleAnnotationMode()}.bind(this))}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventDispatcher.fire(t,e)}},{key:"toggleAnnotationMode",value:function(){this.active=!this.active,this.player.toggleClass("vac-active"),this.annotationState.enabled=this.active,this.active?this.fire("annotationModeEnabled"):this.fire("annotationModeDisabled"),this.options.showControls&&(this.active?this.controls.render():this.controls.clear(!0))}},{key:"setBounds",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.bounds={};var e=$(this.player.el()),n=e.find(".vjs-control-bar");this.bounds.left=e.offset().left,this.bounds.top=e.offset().top,this.bounds.right=this.bounds.left+e.width(),this.bounds.bottom=this.bounds.top+e.height(),this.bounds.bottomWithoutControls=this.bounds.bottom-n.height(),t&&this.fire("playerBoundsChanged",this.bounds)}},{key:"onReady",value:function(t){return this.eventDispatcher.pluginReady?t():void this._readyCallbacks.push(t)}},{key:"pluginReady",value:function(){for(this.eventDispatcher.pluginReady=!0;this._readyCallbacks.length;)this._readyCallbacks.pop()()}},{key:"dispose",value:function(){this.controls=this.controls.teardown(),this.annotationState=this.annotationState.teardown(),this.eventDispatcher=this.eventDispatcher.teardown(),this.teardown(),this.player&&(this.player.annotationComments=null,$(this.player.el()).removeClass("vac-active"),$(this.player.el()).find("[class^='vac-']").remove()),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"dispose",this).call(this)}},{key:"teardown",value:function(){this.player&&this.player.off("fullscreenchange"),$(window).off("resize.vac-window-resize")}}]),e}(n)}},{"./components/annotation_state":26,"./components/controls":29,"./lib/event_dispatcher":35,"./lib/polyfills":39,"./lib/utils":40}],24:[function(t,e,n){"use strict";var i="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},r=t("handlebars/runtime");n.comment=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",d=t.escapeExpression;return'
\n
\n
'+d(t.lambda(null!=(a=null!=e?e.meta:e)?a.user_name:a,e))+'
\n
'+d((s=null!=(s=n.timeSince||(null!=e?e.timeSince:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"timeSince",hash:{},data:o}):s))+'\n   X\n
\n
\n
\n '+d((n.breaklines||e&&e.breaklines||u).call(l,null!=e?e.body:e,{name:"breaklines",hash:{},data:o}))+"\n
\n
\n"},useData:!0}),n.comment_list=r.template({1:function(t,e,n,i,r,o){var a;return" "+(null!=(a=t.lambda(o[0][0],e))?a:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r,o){var a,s,l=null!=e?e:t.nullContext||{};return'
\n
\n'+(null!=(a=n.each.call(l,null!=e?e.commentsHTML:e,{name:"each",hash:{},fn:t.program(1,r,1,o),inverse:t.noop,data:r,blockParams:o}))?a:"")+'
ADD REPLY
\n
\n
\n
\n
@ '+t.escapeExpression((s=null!=(s=n.rangeStr||(null!=e?e.rangeStr:e))?s:n.helperMissing,"function"==typeof s?s.call(l,{name:"rangeStr",hash:{},data:r,blockParams:o}):s))+'
\n
\n DELETE | CLOSE\n
\n
\n
\n'},useData:!0,useBlockParams:!0}),n.controls=r.template({1:function(t,e,n,i,r){var o;return null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.showControls:e,{name:"if",hash:{},fn:t.program(2,r,0),inverse:t.noop,data:r}))?o:""},2:function(t,e,n,i,r){var o;return'
\n \n'+(null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.showNav:e,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?o:"")+"
\n"},3:function(t,e,n,i,r){return'
\n
Prev
\n
Next
\n
\n'},5:function(t,e,n,i,r){var o,a=null!=e?e:t.nullContext||{};return'
\n
\n
Click and drag to select
\n
\n
\n'+(null!=(o=n["if"].call(a,null!=e?e.showControls:e,{name:"if",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r}))?o:"")+"\n"+(null!=(o=n["if"].call(a,null!=e?e.writingComment:e,{name:"if",hash:{},fn:t.program(9,r,0),inverse:t.noop,data:r}))?o:"")},6:function(t,e,n,i,r){var o;return'
\n Select shape + range\n'+(null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.internalCommenting:e,{name:"if",hash:{},fn:t.program(7,r,0),inverse:t.noop,data:r}))?o:"")+'
\n
-1 sec
\n
+1 sec
\n
\n
\n'},7:function(t,e,n,i,r){return' \n cancel\n'},9:function(t,e,n,i,r){var o;return'
\n
\n
\n
New Annotation @ '+t.escapeExpression((o=null!=(o=n.rangeStr||(null!=e?e.rangeStr:e))?o:n.helperMissing,"function"==typeof o?o.call(null!=e?e:t.nullContext||{},{name:"rangeStr",hash:{},data:r}):o))+'
\n
\n \n
\n \n Cancel\n
\n
\n
\n
\n
\n'},compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){var o,a=null!=e?e:t.nullContext||{};return(null!=(o=n.unless.call(a,null!=e?e.adding:e,{name:"unless",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?o:"")+"\n"+(null!=(o=n["if"].call(a,null!=e?e.adding:e,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.noop,data:r}))?o:"")},useData:!0}),n.draggable_marker=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s=null!=e?e:t.nullContext||{},l=n.helperMissing,u="function",c=t.escapeExpression;return'
\n
\n'},useData:!0}),n.marker=r.template({1:function(t,e,n,i,r){return"vac-ranged-marker"},3:function(t,e,n,i,r){var o;return"width:"+t.escapeExpression((o=null!=(o=n.width||(null!=e?e.width:e))?o:n.helperMissing,"function"==typeof o?o.call(null!=e?e:t.nullContext||{},{name:"width",hash:{},data:r}):o))+";"},5:function(t,e,n,i,r){var o;return null!=(o=n["if"].call(null!=e?e:t.nullContext||{},null!=e?e.tooltipBody:e,{name:"if",hash:{},fn:t.program(6,r,0),inverse:t.noop,data:r}))?o:""},6:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",d=t.escapeExpression;return'
\n \n '+d((s=null!=(s=n.tooltipTime||(null!=e?e.tooltipTime:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"tooltipTime",hash:{},data:o}):s))+" - "+d((s=null!=(s=n.tooltipBody||(null!=e?e.tooltipBody:e))?s:u,("undefined"==typeof s?"undefined":i(s))===c?s.call(l,{name:"tooltipBody",hash:{},data:o}):s))+"\n \n
\n"},7:function(t,e,n,i,r){return"vac-right-side"},compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s,l=null!=e?e:t.nullContext||{},u=n.helperMissing,c="function",d=t.escapeExpression;return'
\n'+(null!=(a=n["if"].call(l,null!=e?e.showTooltip:e,{name:"if",hash:{},fn:t.program(5,o,0),inverse:t.noop,data:o}))?a:"")+"
\n"},useData:!0}),n.marker_wrap=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){return'
\n\t
\n
'},useData:!0}),n.new_comment=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,r,o){var a,s=null!=e?e:t.nullContext||{},l=n.helperMissing,u="function",c=t.escapeExpression;return'
\n
\n
\n \n
\n \n Cancel\n
\n
\n
\n'},useData:!0}),n.player_button=r.template({compiler:[7,">= 4.0.0"],main:function(t,e,n,i,r){return'\n\n\t\n\t \n\t \n\t\n'},useData:!0})},{"handlebars/runtime":20}],25:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0],e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isOpen=!0;var r=i||!u.isWithinRange(this.range.start,this.range.end,Math.floor(this.currentTime)),o=n&&this.plugin.options.showMarkerShapeAndTooltips;this.marker.setActive(o),!n&&this.plugin.options.showCommentList&&this.commentList.render(),(!n||n&&this.plugin.options.showMarkerShapeAndTooltips)&&(this.annotationShape.render(),this.shape&&this.annotationShape.$el.on("click.vac-annotation",function(){e.plugin.annotationState.openAnnotation(e,!1,!1,!1)})),t&&this.player.pause(),r&&(this.currentTime=this.range.start),this.plugin.fire("annotationOpened",{annotation:this.data,triggered_by_timeline:n})}},{key:"close",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isOpen&&(this.isOpen=!1,this.marker.deactivate(),this.commentList.teardown(!1),this.annotationShape.$el&&this.annotationShape.$el.off("click.vac-annotation"),this.annotationShape.teardown(),t&&this.plugin.annotationState.clearActive(),this.plugin.fire("annotationClosed",this.data))}},{key:"buildSecondsActiveArray",value:function(){var t=[];if(this.range.end)for(var e=this.range.start;e<=this.range.end;e++)t.push(e);else{var n=this.range.start;t.push(n),n0&&void 0!==arguments[0])||arguments[0];this.close(!0),this.marker.teardown(),this.commentList&&this.commentList.teardown(t),t&&this.plugin.annotationState.removeAnnotation(this),this.annotationShape&&this.annotationShape.teardown(),t&&s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"teardown",this).call(this)}},{key:"data",get:function(){return{id:this.id,range:this.range,shape:this.shape,comments:this.commentList.data}}},{key:"isActive",get:function(){return this.plugin.annotationState.activeAnnotation===this}}],[{key:"newFromData",value:function(t,n,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=h.dataObj(i,r);t&&(t=u.parseIntObj(t)),n&&(n=u.parseIntObj(n));var s={id:o,range:t,shape:n,comments:[a]};return new e(s,r.player)}}]),e}(l)},{"./../lib/player_ui_component":38,"./../lib/utils.js":40,"./comment":27,"./comment_list":28,"./marker":31,"./shape":34}],26:[function(t,e,n){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);ee.range.start?1:0})}},{key:"addNewAnnotation",value:function(t){this._annotations.push(t),this.openAnnotation(t,!0,!0,!1,!0),this.stateChanged()}},{key:"createAndAddAnnotation",value:function(t){this.plugin.controls.uiState.adding&&this.plugin.controls.cancelAddNew();var e=d.newFromData(t.range,t.shape,t.commentStr||"",this.plugin,t.id);this.addNewAnnotation(e)}},{key:"destroyAnnotationById",value:function(t){var e=this.findAnnotation(t);e&&e.teardown()}},{key:"removeAnnotation",value:function(t){var e=t.id,n=this._annotations.indexOf(t);this._annotations.splice(n,1),this.stateChanged(),this.plugin.fire("annotationDeleted",{id:e})}},{key:"setLiveAnnotation",value:function(){if(this.enabled){var t=Math.floor(this.currentTime);if(this.skipLiveCheck)return void(t!==this.lastVideoTime&&(this.skipLiveCheck=!1));var e=this.activeAnnotationsForTime(t);if(!e.length)return this.activeAnnotation.close();var n=this.annotations[e[e.length-1]];if(this.activeAnnotation.range){if(n===this.activeAnnotation)return;var i=n.range.start,r=this.activeAnnotation.range.start;if(i===r&&i===t)return}this.openAnnotation(n,!1,!1,!0)}}},{key:"activeAnnotationsForTime",value:function(t){return this.annotations.length?this.annotationTimeMap[t]||[]:[]}},{key:"rebuildAnnotationTimeMap",value:function(){var t=this,e={};this.annotations.forEach(function(n){n.secondsActive.forEach(function(i){var r=e[i]||[];r.push(t.annotations.indexOf(n)),e[i]=r})}),this.annotationTimeMap=e}},{key:"clearActive",value:function(){this.activeAnnotation.close(!1),this._activeAnnotation=null}},{key:"openAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.plugin.active||this.plugin.toggleAnnotationMode(),this.skipLiveCheck=e,this.clearActive(),t.open(n,i,r),this.activeAnnotation=t,this.lastVideoTime=this.activeAnnotation.range.start}},{key:"openAnnotationById",value:function(t){var e=this.findAnnotation(t);e&&this.openAnnotation(e)}},{key:"findAnnotation",value:function(t){return this.annotations.find(function(e){return e.id==t})}},{key:"findComment",value:function(t){var e,n=this.annotations.map(function(t){return t.commentList.comments});return n=(e=[]).concat.apply(e,i(n)),n.find(function(e){return e.id==t})}},{key:"nextAnnotation",value:function(){if(this._activeAnnotation){var t=this.annotations.indexOf(this._activeAnnotation),e=t===this.annotations.length-1?0:t+1;return this.openAnnotation(this.annotations[e],!0)}for(var n=Math.floor(this.currentTime),i=0;in)return this.openAnnotation(this.annotations[i],!0);this.openAnnotation(this.annotations[0],!0)}},{key:"prevAnnotation",value:function(){if(this._activeAnnotation){var t=this.annotations.indexOf(this._activeAnnotation),e=0===t?this.annotations.length-1:t-1;return this.openAnnotation(this.annotations[e],!0)}for(var n=Math.floor(this.currentTime),i=this.annotations.length-1;i>=0;i--)if(this.annotations[i].range.start0&&void 0!==arguments[0]?arguments[0]:null;this._activeAnnotation=t},get:function(){return this._activeAnnotation||{close:function(){}}}},{key:"data",get:function(){return this._annotations.map(function(t){return t.data})}}]),e}(c)},{"./../lib/player_component":37,"./../lib/utils":40,"./annotation":25}],27:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"teardown",this).call(this,t)}},{key:"data",get:function(){return{id:this.id,meta:this.meta,body:this.body}}},{key:"HTML",get:function(){return this.$el[0].outerHTML}}],[{key:"newFromData",value:function(t,n,i){var r=this.dataObj(t,i);return new e(r,i.player)}},{key:"dataObj",value:function(t,e){return{meta:Object.assign({ diff --git a/gulpfile.js b/gulpfile.js index 1515e44..c575bb7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -27,8 +27,6 @@ const FILENAME = "videojs-annotation-comments.js", CJSFILENAME = "videojs-annotation-comments.cjs.js" PACKAGE = require('./package.json'); -const ATTIBUTION = "/* Version "+PACKAGE.version+" videojs-annotation-comments (https://github.com/contently/videojs-annotation-comments.git), Authored by Evan Carothers & Jack Pope */"+"\n\n"; - //compilation function for browserify/bundler/transpilation function compile(watch, cb){ var bundler = { @@ -141,7 +139,6 @@ gulp.task('build', ['templates', 'sass', 'transpile'], (cb) => { rename(FILENAME.replace(".js",".min.js")), stripComments(), uglify(), - insert.prepend(ATTIBUTION), gulp.dest('./build') ]); @@ -150,7 +147,6 @@ gulp.task('build', ['templates', 'sass', 'transpile'], (cb) => { rename(CJSFILENAME.replace(".js",".min.js")), stripComments(), uglify(), - insert.prepend(ATTIBUTION), gulp.dest('./build'), gulp.dest('./docs/build') ], cb); diff --git a/package-lock.json b/package-lock.json index cf039aa..b2c5b09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2077,9 +2077,9 @@ "dev": true }, "browserify": { - "version": "14.5.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-14.5.0.tgz", - "integrity": "sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==", + "version": "16.2.3", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.2.3.tgz", + "integrity": "sha512-zQt/Gd1+W+IY+h/xX2NYMW4orQWhqSwyV+xsblycTtpOuB27h1fZhhNQuipJ4t79ohw4P4mMem0jp/ZkISQtjQ==", "dev": true, "requires": { "JSONStream": "^1.0.3", @@ -2089,15 +2089,15 @@ "browserify-zlib": "~0.2.0", "buffer": "^5.0.2", "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.1", + "concat-stream": "^1.6.0", "console-browserify": "^1.1.0", "constants-browserify": "~1.0.0", "crypto-browserify": "^3.0.0", "defined": "^1.0.0", "deps-sort": "^2.0.0", - "domain-browser": "~1.1.0", + "domain-browser": "^1.2.0", "duplexer2": "~0.1.2", - "events": "~1.1.0", + "events": "^2.0.0", "glob": "^7.1.0", "has": "^1.0.0", "htmlescape": "^1.1.0", @@ -2105,7 +2105,8 @@ "inherits": "~2.0.1", "insert-module-globals": "^7.0.0", "labeled-stream-splicer": "^2.0.0", - "module-deps": "^4.0.8", + "mkdirp": "^0.5.0", + "module-deps": "^6.0.0", "os-browserify": "~0.3.0", "parents": "^1.0.1", "path-browserify": "~0.0.0", @@ -2119,16 +2120,27 @@ "shell-quote": "^1.6.1", "stream-browserify": "^2.0.0", "stream-http": "^2.0.0", - "string_decoder": "~1.0.0", + "string_decoder": "^1.1.1", "subarg": "^1.0.0", "syntax-error": "^1.1.1", "through2": "^2.0.0", "timers-browserify": "^1.0.1", - "tty-browserify": "~0.0.0", + "tty-browserify": "0.0.1", "url": "~0.11.0", "util": "~0.10.1", - "vm-browserify": "~0.0.1", + "vm-browserify": "^1.0.0", "xtend": "^4.0.0" + }, + "dependencies": { + "string_decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", + "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "browserify-aes": { @@ -2665,36 +2677,15 @@ "dev": true }, "concat-stream": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz", - "integrity": "sha1-cIl4Yk2FavQaWnQd790mHadSwmY=", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { - "inherits": "~2.0.1", - "readable-stream": "~2.0.0", - "typedarray": "~0.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" } }, "concat-with-sourcemaps": { @@ -3654,19 +3645,20 @@ "dev": true }, "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.1.0.tgz", + "integrity": "sha512-TFHMqfOvxlgrfVzTEkNBSh9SvSNX/HfF4OFI2QFGCyPm02EsyILqnUeb5P6q7JZ3SFNTBL5t2sePRgrN4epUWQ==", "dev": true, "requires": { - "acorn": "^5.2.1", - "defined": "^1.0.0" + "acorn-node": "^1.3.0", + "defined": "^1.0.0", + "minimist": "^1.1.1" }, "dependencies": { - "acorn": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", - "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } } @@ -3745,9 +3737,9 @@ "dev": true }, "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", "dev": true }, "domelementtype": { @@ -4090,9 +4082,9 @@ } }, "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", "dev": true }, "evp_bytestokey": { @@ -7071,12 +7063,6 @@ "repeating": "^2.0.0" } }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, "individual": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/individual/-/individual-2.0.0.tgz", @@ -8693,26 +8679,43 @@ "dev": true }, "module-deps": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-4.1.1.tgz", - "integrity": "sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.0.tgz", + "integrity": "sha512-hKPmO06so6bL/ZvqVNVqdTVO8UAYsi3tQWlCa+z9KuWhoN4KDQtb5hcqQQv58qYiDE21wIvnttZEPiDgEbpwbA==", "dev": true, "requires": { "JSONStream": "^1.0.3", "browser-resolve": "^1.7.0", "cached-path-relative": "^1.0.0", - "concat-stream": "~1.5.0", + "concat-stream": "~1.6.0", "defined": "^1.0.0", - "detective": "^4.0.0", + "detective": "^5.0.2", "duplexer2": "^0.1.2", "inherits": "^2.0.1", "parents": "^1.0.0", "readable-stream": "^2.0.2", - "resolve": "^1.1.3", + "resolve": "^1.4.0", "stream-combiner2": "^1.1.1", "subarg": "^1.0.0", "through2": "^2.0.0", "xtend": "^4.0.0" + }, + "dependencies": { + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "resolve": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", + "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } } }, "moment": { @@ -16393,13 +16396,10 @@ } }, "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true, - "requires": { - "indexof": "0.0.1" - } + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.0.tgz", + "integrity": "sha512-iq+S7vZJE60yejDYM0ek6zg308+UZsdtPExWP9VZoCFCz1zkJoXFnAX7aZfd/ZwrkidzdUZL0C/ryW+JwAiIGw==", + "dev": true }, "watch": { "version": "0.11.0", diff --git a/package.json b/package.json index 71c4c7a..bb08256 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "name": "@contently/videojs-annotation-comments", "version": "1.1.1", - "description": "", + "description": "A plugin for video.js to add support for timeline moment/range comments and annotations", + "repository": "git@github.com:contently/videojs-annotation-comments.git", "main": "build/videojs-annotation-comments.cjs.js", "scripts": { "test": "./node_modules/gulp/bin/gulp.js test" @@ -16,7 +17,7 @@ "babel-preset-es2015": "^6.24.1", "babel-preset-es2015-script": "^1.1.0", "babelify": "^7.3.0", - "browserify": "^14.5.0", + "browserify": "^16.2.3", "chai": "^4.1.2", "es6-object-assign": "^1.1.0", "gulp": "^3.9.1", diff --git a/readme.md b/readme.md deleted file mode 100644 index 8ae783c..0000000 --- a/readme.md +++ /dev/null @@ -1,276 +0,0 @@ -[![CircleCI](https://circleci.com/gh/contently/videojs-annotation-comments/tree/master.svg?style=svg)](https://circleci.com/gh/contently/videojs-annotation-comments/tree/master) - -# AnnotationComments : Collaborate in your VideoJS player - -![AnnotationComments Screenshot1](test/screenshot.png) - -### Background - -Collaboration between videographers and clients can be tedious, with emails and phone calls that waste time trying to reference specific frames and areas of the screen. This plugin enables more efficient collaboration from the browser. - -This plugin was conceived and developed as a Hack Week project at [Contently](http://www.contently.com) by [Evan Carothers](http://www.github.com/ecaroth) and [Jack Pope](http://www.github.com/jackpope). Continuing our focus and commitment to multimedia support at Contently, the entire team productized and bulletproofed the plugin as a flexible solution to be used in our product and other open-source use cases. - -### Goals - -- **Efficient for videographers and clients alike** - Provides useful collaboration features including annotations, comments/replies, ranged time markers, and more, with intuitive controls. -- **SIMPLE & LIGHTWEIGHT** - Everything is contained within the plugin and player element. There is no need to build additional UI components. Just install VideoJS, register the plugin, setup whatever backend storage you wish, and start collaborating. -- **EXTENSIBLE** - The plugin can be integrated with existing commenting systems (as we did within Contently), and makes very few assumptions about how to store annotations. Custom events are available for communicating with external APIs, providing support for on-page interactions and data persistence. Simple CSS overrides can also allow for branding customizations with minimal effort, or completely custom UI/UX. - -### VideoJS Plugins - -[VideoJS](http://videojs.com/) is a popular open-source HTML5 video player library used by 400k+ sites. As of v6, there is an extendable plugin architecture which was used to create this plugin. This plugin is built and tested against [VideoJS v 6.2.0](https://www.npmjs.com/package/video.js/) - -### Add it to your VideoJS player - -#### As a script from build - -```javascript -// ...videojs & videojs-annotation-comments have been loaded in script tags... - -var player = videojs('video-id'); -var plugin = player.annotationComments(pluginOptions) -``` - -#### As a module - -```javascript -import videojs from 'video.js' -import AnnotationComments from 'videojs-annotation-comments' - -videojs.registerPlugin('annotationComments', AnnotationComments(videojs)) - -var player = videojs('video-id') -var plugin = player.annotationComments(pluginOptions) -``` - -### Plugin options / configuration - -When initializing the plugin, you can pass in an options array to override default options. Any excluded options are set to their default values, listed below: - -```javascript -const pluginOptions = { - // Collection of annotation data to initialize - annotationsObjects: [], - // Flexible meta data object (currently used for user data, but addl data can be provided to wrap each comment with metadata - provide the id of the current user and fullname of the current user at minimum, which are required for the UI) - meta: { user_id: null, user_name: null }, - // Use arrow keys to move through annotations when Annotation mode is active - bindArrowKeys: true, - // Show or hide the control panel and annotation toggle button (NOTE - if controls are hidden you must provide custom UI and events to drive the annotations - more on that in "Programmatic Control" below) - showControls: true, - // Show or hide the comment list when an annotation is active. If false, the text 'Click and drag to select', will follow the cursor during annotation mode - showCommentList: true, - // If false, annotations mode will be disabled in fullscreen - showFullScreen: true, - // Show or hide the tooltips with comment preview, and annotation shape, on marker hover or timeline activate - showMarkerShapeAndTooltips: true, - // If false, step two of adding annotations (writing and saving the comment) will be disabled - internalCommenting: true, - // If true, toggle the player to annotation mode immediately after init. (NOTE - "annotationModeEnabled" event is not fired for this initial state) - startInAnnotationMode: false -}; -``` - -### Annotation Data Structure - -To initialize the plugin with the `annotationsObjects` collection, use the following structure: -```javascript -const annotationsObjects = [ - id: 1, - range: { - start: 10, - end: 15 - }, - shape: { - x1: 23.47, - y1: 9.88, - x2: 60.83, - y2: 44.2 - }, - comments: [ - { - id: 1, - meta: { - datetime: '2017-03-28T19:17:32.238Z', - user_id: 1, - user_name: 'Jack Pope' - }, - body: 'The first comment!' - } - ] -]; -``` - -### Programmatic Control - -If you'd like to drive the plugin or render plugin data through external UI elements, you can configure the plugin to hide the internal components and pass data through custom events. There are two kinds of AnnotationComments API events, _externally fired_ and _internally fired_. - -##### Waiting for Plugin Ready - -Before triggering any events on the plugin, you must wait for it to be ready. You can use the `onReady` function on the plugin: - -```javascript -plugin.onReady(() => { - // do stuff with the plugin, such as fire events or setup listeners -})); -``` - -##### Supported Externally Fired Events: - -These events are external actions that can be called from your scripts to trigger events within the plugin: - -```javascript -// openAnnotation : Opens an annotation within the player given an ID -plugin.fire('openAnnotation', { id: myAnnotationId }); - -// closeActiveAnnotation : Closes any active annotation -plugin.fire('closeActiveAnnotation'); - -// newAnnotation : Adds a new annotation within the player and opens it given comment data -plugin.fire('newAnnotation', { - id: 1, - range: { start: 20, end: null }, - shape: { // NOTE - x/y vals are % based (Floats) in video, not pixel values - x1: null, - x2: null, - y1: null, - y2: null - } - commentStr: "This is my comment." -}); - -// destroyAnnotation : Removes an annotation and it's marker within the player given comment data -plugin.fire('destroyAnnotation', { id: 1 }); - -// newComment : Adds a new comment to an Annotation given an Annotation ID and a body -plugin.fire('newComment', { annotationId: 1, body: "My comment string" }); - -// destroyComment : Removes a comment from an Annotation given a Comment ID -plugin.fire('destroyComment', { id: 1 }); - -// addingAnnotation : Plugin enters the adding annotation state (adding an annotation at the current player timestamp) -plugin.fire('addingAnnotation'); - -// cancelAddingAnnotation : Plugin exits the adding annotation state -plugin.fire('cancelAddingAnnotation'); - -// toggleAnnotationMode : toggle annotation mode to alternative on/off value -plugin.fire('toggleAnnotations'); -``` - -##### Supported Internally Fired Events: -These are events that are triggered from within the running plugin and can be listened for by binding to `plugin.on` within your scripts: - -```javascript -// annotationOpened : Fired whenever an annotation is opened -plugin.on('annotationOpened', (event) => { - // event.detail = - // { - // annotation: (object) annotation data in format {id:.., comments:..., range:..., shape:...}, - // triggered_by_timeline: (boolean) TRUE = the event was triggered via a timeline action (like scrubbing or playing), FALSE = the annotation was opened via marker click, UI button interactions, or API/event input - // } -}); - -// annotationClosed : Fired whenever an annotation is closed -plugin.on('annotationClosed', (event) => { - // event.detail = annotation (object) in format {id:.., comments:..., range:..., shape:...} -}); - -// addingAnnotationDataChanged : Fired from adding annotation state if: -// 1. the marker is dragged -// 2. the start of the marker is moved via control buttons -// 3. the shape is dragged -plugin.on('addingAnnotationDataChanged', (event) => { - var newRange = event.detail.range; // returns range data if range was changed - var newShape = event.detail.shape; // returns shape data if shape was changed - // do something with the data -}); - -// annotationDeleted : Fired when an annotation has been deleted via the UI -plugin.on('annotationDeleted', (event) => { - // annotationId = event.detail -}); - -// enteredAnnotationMode : Fired when the plugin enters adding annotation mode -// includes initial range data -plugin.on('enteredAddingAnnotation', (event) => { - var startTime = event.detail.range.start; - // do something when adding annotation state begins -}); - -// onStateChanged: Fired when plugin state has changed (annotation added, removed, etc) -// This is a way to watch global plugin state, as an alternative to watching various annotation events -plugin.on('onStateChanged', (event) => { - // event.detail = annotation state data -}); - -// playerBoundsChanged : Fired when the player boundaries change due to window resize or fullscreen mode -plugin.on('playerBoundsChanged', (event) => { - var bounds = event.detail; - // do something with the new boundaries -}); - -// Entering annotation mode (annotation icon was clicked when previously 'off') -plugin.on('annotationModeEnabled', (event) => { - // do something -}); - -// Exiting annotation mode (annotation icon was clicked when previously 'on') -plugin.on('annotationModeDisabled', (event) => { - // do something -}); -``` - -### Develop and Build - -We're using [npm](https://www.npmjs.com/) for package management and [gulp](https://github.com/gulpjs/gulp) as our build system. - -The fastest way to get started: -- Clone the repo -- Run `npm install` -- Run `npm install -g gulp` -- Run `gulp build` -- Run `gulp watch` -- Visit `http://localhost:3004/test.html` to see the magic happen. - -#### Templates - -We're using the [Handlebars](http://handlebarsjs.com/) templating library to render various components within the plugin. For performance, the templates are pre-compiled into a JS file within the development environment. That way we only need to require the Handlebars runtime, saving nearly 100kb from the minified build! ⚡️ - -The `gulp templates` task is used to precompile every template to `/src/js/compiled/templates.js`. This file should _not_ be modified directly, but rather the templates themselves in `/src/templates` should be modified if changes are needed. The templates task will run automatically within `gulp watch`. - - -#### UI / CSS Customization - -The plugin uses SASS and all styles are defined in [annotaitons.scss](src/css/annotations.scss). There is extenssive commenting on classes and styles in the file. The plugin uses a deep level of specificity to prevent styles from polluting elements on the page, and all classes are prefixed with `vac-` to prevent classname collisions in the global namespace. - -You can extend/modify colors and elements quite easily by writing an overrides stylesheet to address the specific elements that you wish to modify. You can also change the variable colors in the stylesheet and compile yourself for more customization. - -_NOTE_ - our gulp build tasks use an auto-prefixer to make the styles work cross-browser, so be sure to run that yourself if you compile the SASS files with changes. - -#### Testing - -##### Feature tests - -Feature tests are currently browser-based and run by visiting `http://localhost:3004/mocha/features/index.html`. Feature tests can be added as files in the `/test/mocha/features/` directory and then included within the `index.html` file as a external scripts. - -##### Unit tests - -Unit tests are run through the `gulp test` task. If the `tdd` task is included in `gulp watch`, the tests will run with every change to the test files. Each module should have a corresponding unit test file within the `/test/mocha/modules` directory. - -#### Gulp commands - -`gulp watch`: Fires up webserver @ `http://localhost:3004/test.html`, watches for any file changes in `/src`, including js, css (scss), and templates (.hbs), repackages, and transpiles to an unminified file in `/build` on change. - -`gulp transpile`: Transpiles modules/files to build file in `/build` with JS maps - -`gulp build`: Runs transpilation, browserify, sass, then minifies to distribution filename in `/build` with attribution - -`gulp templates`: Uses Handlebars to pre-compile templates into a javascript file. See Templates section above. - -`gulp test`: Runs the mocha unit tests within the `/test/mocha/modules/` directory. - -`gulp lint`: Runs jshint linter on javascript files in `/src` - -#### License - -This plugin is [licensed](license.md) under the Apache License, Version 2.0, which is the same license used by Video.js diff --git a/silence.mpeg b/silence.mpeg deleted file mode 100644 index 08476fe..0000000 Binary files a/silence.mpeg and /dev/null differ