var parser=function(){var r={};r.fromSrt=function(r,e){var n=e?!0:!1;r=r.replace(/\r/g,"");var i=/([0-9]+)\n([0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3}) --> ([0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3})/g;r=r.split(i),r.shift();for(var a=[],o=0;o<r.length;o+=4)a.push({id:r[o].trim(),startTime:n?t(r[o+1].trim()):r[o+1].trim(),endTime:n?t(r[o+2].trim()):r[o+2].trim(),text:r[o+3].trim()});return a},r.toSrt=function(r){if(!r instanceof Array)return"";var t="";for(var n in r){var i=r[n];isNaN(i.startTime)||isNaN(i.endTime)||(i.startTime=e(parseInt(i.startTime,10)),i.endTime=e(parseInt(i.endTime,10))),t+=i.id+"\r\n",t+=i.startTime+" --> "+i.endTime+"\r\n",t+=i.text.replace("\n","\r\n")+"\r\n\r\n"}return t};var t=function(r){var t=/([0-9]+):([0-9]{2}):([0-9]{2}),([0-9]{3})/,e=t.exec(r);if(null===e)return 0;for(var n=1;5>n;n++)e[n]=parseInt(e[n],10),isNaN(e[n])&&(e[n]=0);return 36e5*e[1]+6e4*e[2]+1e3*e[3]+e[4]},e=function(r){var t=[36e5,6e4,1e3],e=[];for(var n in t){var i=(r/t[n]>>0).toString();i.length<2&&(i="0"+i),r%=t[n],e.push(i)}var a=r.toString();if(a.length<3)for(n=0;n<=3-a.length;n++)a="0"+a;return e.join(":")+","+a};return r}();"object"==typeof exports&&(module.exports=parser);
@@ -96,92 +96,65 @@
 i=/(
-%5B0-9%5D+)%5Cn(%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D,%5B0-9%5D%7B3%7D) --%3E (%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D,%5B0-9%5D
+%5Cd+)%5Cn(%5Cd%7B2%7D:%5Cd%7B2%7D:%5Cd%7B2%7D,%5Cd%7B3%7D) --%3E (%5Cd%7B2%7D:%5Cd%7B2%7D:%5Cd%7B2%7D,%5Cd
 %7B3%7D)
@@ -196,13 +196,13 @@
 =%5B%5D,
-o=0;o
+d=0;d
 %3Cr.l
@@ -207,17 +207,17 @@
 .length;
-o
+d
 +=4)a.pu
@@ -225,17 +225,17 @@
 h(%7Bid:r%5B
-o
+d
 %5D.trim()
@@ -251,17 +251,17 @@
 e:n?t(r%5B
-o
+d
 +1%5D.trim
@@ -266,17 +266,17 @@
 im()):r%5B
-o
+d
 +1%5D.trim
@@ -292,17 +292,17 @@
 e:n?t(r%5B
-o
+d
 +2%5D.trim
@@ -307,17 +307,17 @@
 im()):r%5B
-o
+d
 +2%5D.trim
@@ -326,17 +326,17 @@
 ,text:r%5B
-o
+d
 +3%5D.trim
@@ -691,44 +691,32 @@
 t=/(
-%5B0-9%5D+):(%5B0-9%5D
+%5Cd+):(%5Cd
 %7B2%7D):(
-%5B0-9%5D
+%5Cd
 %7B2%7D),(
-%5B0-9%5D
+%5Cd
 %7B3%7D)

Update for minified version