webpackJsonpjwplayer([12],{47:function(t,e,n){var r,i;r=[n(46)],i=function(t){function e(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}}function n(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function r(){this.values=Object.create(null)}function i(t,e,n,r){var i=r?t.split(r):[t];for(var a in i)if("string"==typeof i[a]){var s=i[a].split(n);if(2===s.length){var o=s[0],u=s[1];e(o,u)}}}function a(t,e,a){function s(){var e=n(t);if(null===e)throw new Error("Malformed timestamp: "+f);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function c(t,e){var n=new r;i(t,function(t,e){switch(t){case"region":for(var r=a.length-1;r>=0;r--)if(a[r].id===e){n.set(t,a[r].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":var i=e.split(","),s=i[0];n.integer(t,s),n.percent(t,s)&&n.set("snapToLines",!1),n.alt(t,s,["auto"]),2===i.length&&n.alt("lineAlign",i[1],["start",u,"end"]);break;case"position":i=e.split(","),n.percent(t,i[0]),2===i.length&&n.alt("positionAlign",i[1],["start",u,"end","line-left","line-right","auto"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start",u,"end","left","right"])}},/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");var s=n.get("line","auto");"auto"===s&&o.line===-1&&(s=-1),e.line=s,e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100),e.align=n.get("align",u);var c=n.get("position","auto");"auto"===c&&50===o.position&&(c="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=c}function l(){t=t.replace(/^\s+/,"")}var f=t;if(l(),e.startTime=s(),l(),"-->"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+f);t=t.substr(3),l(),e.endTime=s(),l(),c(t,e)}var s=function(t,n){this.window=t,this.state="INITIAL",this.buffer="",this.decoder=n||new e,this.regionList=[]};r.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){var n;return!!((n=e.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(e=parseFloat(e),e>=0&&e<=100))&&(this.set(t,e),!0)}};var o=new t(0,0,0),u="middle"===o.align?"middle":"center";return s.prototype={parse:function(e){function n(){for(var t=s.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,s.buffer=t.substr(e),n}function r(t){i(t,function(t,e){switch(t){case"Region":console.log("parse region",e)}},/:/)}var s=this;e&&(s.buffer+=s.decoder.decode(e,{stream:!0}));try{var o;if("INITIAL"===s.state){if(!/\r\n|\n/.test(s.buffer))return this;o=n();var u=o.match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new Error("Malformed WebVTT signature.");s.state="HEADER"}for(var c=!1;s.buffer;){if(!/\r\n|\n/.test(s.buffer))return this;switch(c?c=!1:o=n(),s.state){case"HEADER":/:/.test(o)?r(o):o||(s.state="ID");continue;case"NOTE":o||(s.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){s.state="NOTE";break}if(!o)continue;if(s.cue=new t(0,0,""),s.state="CUE",o.indexOf("-->")===-1){s.cue.id=o;continue}case"CUE":try{a(o,s.cue,s.regionList)}catch(l){s.cue=null,s.state="BADCUE";continue}s.state="CUETEXT";continue;case"CUETEXT":var f=o.indexOf("-->")!==-1;if(!o||f&&(c=!0)){s.oncue&&s.oncue(s.cue),s.cue=null,s.state="ID";continue}s.cue.text&&(s.cue.text+="\n"),s.cue.text+=o;continue;case"BADCUE":o||(s.state="ID");continue}}}catch(l){"CUETEXT"===s.state&&s.cue&&s.oncue&&s.oncue(s.cue),s.cue=null,s.state="INITIAL"===s.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return t.onflush&&t.onflush(),this}},s}.apply(e,r),!(void 0!==i&&(t.exports=i))}});