@castlabs/prestoplay 6.12.0 → 6.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -6
  5. package/cjs/cl.cast.js +110 -110
  6. package/cjs/cl.conviva.js +33 -33
  7. package/cjs/cl.core.js +518 -517
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +72 -72
  10. package/cjs/cl.externs.js +63 -52
  11. package/cjs/cl.freewheel.js +24 -24
  12. package/cjs/cl.hls.js +68 -67
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +22 -22
  16. package/cjs/cl.mse.js +275 -272
  17. package/cjs/cl.muxdata.js +15 -14
  18. package/cjs/cl.onboard.js +3 -3
  19. package/cjs/cl.persistent.js +13 -13
  20. package/cjs/cl.playlist.js +6 -6
  21. package/cjs/cl.simid.js +15 -15
  22. package/cjs/cl.smooth.js +71 -71
  23. package/cjs/cl.thumbnails.js +26 -24
  24. package/cjs/cl.tizen.js +69 -69
  25. package/cjs/cl.ttml.js +28 -28
  26. package/cjs/cl.verimatrix.js +5 -5
  27. package/cjs/cl.vimond.js +13 -13
  28. package/cjs/cl.vr.js +19 -19
  29. package/cjs/cl.vtt.js +14 -14
  30. package/cjs/cl.youbora.js +18 -18
  31. package/cjs/polyfill.min.js +26 -23
  32. package/cl.adobe.js +3 -3
  33. package/cl.airplay.js +3 -3
  34. package/cl.broadpeak.js +5 -5
  35. package/cl.cast.js +87 -87
  36. package/cl.conviva.js +27 -27
  37. package/cl.core.js +428 -425
  38. package/cl.crypto.js +9 -9
  39. package/cl.dash.js +67 -67
  40. package/cl.externs.js +63 -52
  41. package/cl.freewheel.js +19 -19
  42. package/cl.hls.js +69 -69
  43. package/cl.hlssmpte.js +5 -5
  44. package/cl.htmlcue.js +26 -26
  45. package/cl.ima.js +17 -17
  46. package/cl.mse.js +243 -241
  47. package/cl.muxdata.js +13 -12
  48. package/cl.onboard.js +4 -4
  49. package/cl.persistent.js +10 -10
  50. package/cl.playlist.js +5 -5
  51. package/cl.simid.js +13 -13
  52. package/cl.smooth.js +59 -59
  53. package/cl.thumbnails.js +19 -17
  54. package/cl.tizen.js +57 -57
  55. package/cl.ttml.js +22 -22
  56. package/cl.verimatrix.js +4 -4
  57. package/cl.vimond.js +8 -8
  58. package/cl.vr.js +15 -15
  59. package/cl.vtt.js +12 -12
  60. package/cl.youbora.js +15 -15
  61. package/package.json +4 -4
  62. package/typings.d.ts +135 -30
package/cjs/cl.vr.js CHANGED
@@ -1,24 +1,24 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var Wu="touchmove",Xu="touchstart",Yu=function(a,b,c,d){this.x=a||0;this.y=b||0;this.a=c||0;this.f=d||1},Zu=function(a,b){var c=a.x,d=a.y,e=a.a,f=a.f;b.set(1-2*(d*d+e*e),2*(c*d-e*f),2*(c*e+d*f),0,2*(c*d+e*f),1-2*(c*c+e*e),2*(d*e-c*f),0,2*(c*e-d*f),2*(d*e+c*f),1-2*(c*c+d*d),0,0,0,0,1)},$u=function(a,b,c){c*=.5;var d=Math.sqrt(a*a+b*b),e=Math.sin(c);return new Yu(a/d*e,b/d*e,0/d*e,Math.cos(c))},av=function(a,b,c){this.x=a||0;this.y=b||0;this.a=c||0},bv=function(a,b){isFinite(b)?(a.x*=b,a.y*=b,a.a*=
3
- b):(a.x=0,a.y=0,a.a=0)},cv=function(a,b){return a.x*b.x+a.y*b.y+a.a*b.a},dv=function(a,b,c){var d=b.x,e=b.y;b=b.a;var f=c.x,g=c.y;c=c.a;a.x=e*c-b*g;a.y=b*f-d*c;a.a=d*g-e*f;return a},ev=function(){this.a=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},fv=function(a,b,c){b=b.a;c=c.a;var d=a.a,e=0;do d[4*e]=b[4*e]*c[0]+b[4*e+1]*c[4]+b[4*e+2]*c[8]+b[4*e+3]*c[12],d[4*e+1]=b[4*e]*c[1]+b[4*e+1]*c[5]+b[4*e+2]*c[9]+b[4*e+3]*c[13],d[4*e+2]=b[4*e]*c[2]+b[4*e+1]*c[6]+b[4*e+2]*c[10]+b[4*e+3]*c[14],d[4*e+
4
- 3]=b[4*e]*c[3]+b[4*e+1]*c[7]+b[4*e+2]*c[11]+b[4*e+3]*c[15];while(4>++e);return a},gv=function(a){var b=new av(0,0,0),c=new av(0,0,1),d=new av,e=new av,f=new av;a=a.a;var g=new av(0,1,0);f.x=b.x-g.x;f.y=b.y-g.y;f.a=b.a-g.a;g=f.length();bv(f,1/g);c=dv(d,c,f);g=c.length();bv(c,1/g);dv(e,f,d);a[0]=d.x;a[1]=d.y;a[2]=d.a;a[3]=-cv(d,b);a[4]=e.x;a[5]=e.y;a[6]=e.a;a[7]=-cv(e,b);a[8]=f.x;a[9]=f.y;a[10]=f.a;a[11]=-cv(f,b);a[12]=0;a[13]=0;a[14]=0;a[15]=1},iv=function(a){this.a=a;this.f=a.createProgram();this.l=
5
- hv(this,!1,"uniform highp mat4 Mvpm;\nattribute highp vec4 aPosition;\nattribute highp vec2 aTexCoord;\nvarying highp vec2 oTexCoord;\nvoid main()\n{\n gl_Position \x3d Mvpm * aPosition;\n oTexCoord \x3d aTexCoord;\n}\n");this.j=hv(this,!0,"precision highp float;\nuniform sampler2D Texture0;\nvarying highp vec2 oTexCoord;\nvoid main()\n{\n gl_FragColor \x3d texture2D(Texture0, oTexCoord);\n gl_FragColor.w \x3d 1.0;\n}\n");a.attachShader(this.f,this.l);a.attachShader(this.f,this.j);a.bindAttribLocation(this.f,
6
- 0,"aPosition");a.bindAttribLocation(this.f,1,"aTexCoord");a.linkProgram(this.f);if(!a.getProgramParameter(this.f,a.LINK_STATUS))throw new _.P(1,9,9004,"Unable to initialize shader");a.useProgram(this.f);this.h=a.getUniformLocation(this.f,"Mvpm");a.uniform1i(a.getUniformLocation(this.f,"Texture0"),0);a.useProgram(null)},hv=function(a,b,c){b=a.a.createShader(b?a.a.FRAGMENT_SHADER:a.a.VERTEX_SHADER);a.a.shaderSource(b,c);a.a.compileShader(b);if(!a.a.getShaderParameter(b,a.a.COMPILE_STATUS))throw new _.P(1,
7
- 9,9004,"Unable to compile GL shader: "+a.a.getShaderInfoLog(b));return b},jv=function(a){this.a=a;var b=[],c,d;for(d=0;70>=d;d++){var e=3>=d?d/4/64:67<=d?(63+(d-66)/4)/64:(d-3)/64;var f=(e-.5)*Math.PI,g=Math.cos(f);for(c=0;128>=c;c++){var h=c/128,l=(.5+h)*Math.PI*2;128===c?(b.push(b[645*d]),b.push(b[645*d+1]),b.push(b[645*d+2])):(b.push(100*Math.cos(l)*g),b.push(100*Math.sin(l)*g),b.push(100*Math.sin(f)));0===d||70===d?b.push(.5):b.push(1-h);b.push(1-e)}}e=[];for(c=0;128>c;c++)for(d=0;70>d;d++)f=
8
- 5*(129*d+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*d+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*d+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]);this.h=e.length/5;this.f=a.createBuffer();b=new Float32Array(e);a.bindBuffer(a.ARRAY_BUFFER,this.f);a.bufferData(a.ARRAY_BUFFER,b,a.STATIC_DRAW)},kv=function(a,
9
- b){this.a=b;this.f=this.a.createTexture();b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.f);b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,a);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.bindTexture(b.TEXTURE_2D,null)},lv=function(){var a=this;this.o=this.w=this.M=this.J=this.A=
10
- this.ia=this.H=this.f=this.a=this.m=null;this.g=new _.K("clpp.vr");this.I=70;this.fa=1;this.T=this.P=!1;this.G=function(){if(a.a&&a.f){a.f.viewport(0,0,a.a.width,a.a.height);var b=a.M.a,c=Math.tan(.5*a.I*Math.PI/180);b[0]=1/(a.a.width/a.a.height*c);b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1/c;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=2E3/-1999.9;b[11]=200/-1999.9;b[12]=0;b[13]=0;b[14]=-1;b[15]=1}};this.l=this.j=0;this.h={x:0,y:0};this.V=new ev;this.da=new ev;this.oa=new ev;this.pa=new ev;this.B=this.tl.bind(this);
11
- this.D=this.ul.bind(this);this.K=this.sl.bind(this)},mv=function(a){var b=$u(1,0,a.l*Math.PI/180);Zu($u(0,1,a.j*Math.PI/180),a.V);Zu(b,a.da);gv(a.oa);fv(a.pa,a.V,a.oa);fv(a.H,a.da,a.pa)},nv=function(a){a.a&&(a.a.removeEventListener("mousemove",a.B,!1),a.a.removeEventListener(Wu,a.B,!1),a.a.removeEventListener("mouseup",a.D,!1),a.a.removeEventListener("touchend",a.D,!1))},ov=function(){};av.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.a*this.a)};ev.prototype.set=function(a,b,c,d,e,f,g,h,l,m,n,p,q,t,v,z){var D=this.a;D[0]=a;D[4]=b;D[8]=c;D[12]=d;D[1]=e;D[5]=f;D[9]=g;D[13]=h;D[2]=l;D[6]=m;D[10]=n;D[14]=p;D[3]=q;D[7]=t;D[11]=v;D[15]=z;return this};var pv={alpha:!1,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!1,devicePixelRatio:1};_.w(lv,_.kt);_.r=lv.prototype;_.r.onPlayerCreated=function(a){this.g.info("Player created");this.m=a};
12
- _.r.onContentWillLoad=function(a){var b=a.getConfiguration();if(b.vr&&b.vr.enable){var c=b.vr,d=c.fieldOfView,e=c.sensitivity,f=c.invertHorizontalControl;c=c.invertVerticalControl;if(void 0!==d&&_.N.ma(d))this.I=d;else throw new _.P(1,7,7100,"fieldOfView configuration must be a number");if(void 0!==e&&_.N.ma(e)&&0<e)this.fa=e;else throw new _.P(1,7,7100,"sensitivity configuration must be a positive number");this.P=!!f;this.T=!!c;if(a=a.getSurface())if((d=a.getMedia())&&d.tagName.toLowerCase()===_.rg){this.g.info("Initialize VR Surface");
13
- if(!this.a){this.a=document.createElement("canvas");this.a.style.width="100%";this.f=this.a.getContext("webgl",pv)||this.a.getContext("experimental-webgl",pv);if(!this.f)throw new _.P(1,9,9003,"Unable to create GL context");this.H=new ev;gv(this.H);this.ia=new jv(this.f);this.A=new iv(this.f);this.J=new ev;this.M=new ev;this.o=this.w=null;this.a.addEventListener(_.If,this.G)}a.addElementToContainer(this.a,!0,!0);a.hideMediaElement();b.vr.attachMouseListener&&(this.a.addEventListener("mousedown",this.K,
14
- !1),this.a.addEventListener(Xu,this.K,!1));this.G();this.Ih()}else this.g.info("No video element found, can not initialize VR plugin");else this.g.info("No surface found, can not initialize VR plugin")}};
15
- _.r.onPlayerWillRelease=function(){this.g.info("Releasing VR plugin resources");this.w&&cancelAnimationFrame(this.w);this.h.x=0;this.l=this.j=this.h.y=0;this.f&&(delete this.f,this.f=null);this.a&&(nv(this),this.a.removeEventListener(_.If,this.G),this.a.parentElement.removeChild(this.a),this.a.removeEventListener("mousedown",this.K,!1),delete this.a,this.a=null)};_.r.onPlayerWillDestroy=function(){var a=this;return _.E(function(b){a.m=null;_.y(b)})};_.r.id=function(){return"vr"};
16
- _.r.Ih=function(){if(this.m&&this.f){var a=this.m.getSurface();if(a&&(a=a.getMedia())&&a.tagName.toLowerCase()===_.rg){this.w=requestAnimationFrame(this.Ih.bind(this));var b=this.f;this.o||a.readyState!==a.HAVE_ENOUGH_DATA||(this.o=new kv(a,b));b.clearColor(0,0,0,1);b.clearDepth(1);b.clearStencil(0);b.enable(b.DEPTH_TEST);b.depthFunc(b.LEQUAL);b.frontFace(b.CCW);b.cullFace(b.BACK);b.disable(b.CULL_FACE);b.enable(b.BLEND);b.blendFunc(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA);b.depthMask(!0);b.clearColor(0,
17
- 0,0,1);b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT);if(this.o){var c=this.A;c.a.useProgram(c.f);c=fv(this.J,this.M,this.H).a;var d=c[1];c[1]=c[4];c[4]=d;d=c[2];c[2]=c[8];c[8]=d;d=c[6];c[6]=c[9];c[9]=d;d=c[3];c[3]=c[12];c[12]=d;d=c[7];c[7]=c[13];c[13]=d;d=c[11];c[11]=c[14];c[14]=d;b.uniformMatrix4fv(this.A.h,!1,this.J.a);c=this.o;c.a.activeTexture(c.a.TEXTURE0);c.a.bindTexture(c.a.TEXTURE_2D,c.f);b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,a);a=this.ia;a.a.bindBuffer(a.a.ARRAY_BUFFER,
2
+ var f=function(window){var av="touchmove",bv="touchstart",cv=function(a,b,c,d){this.x=a||0;this.y=b||0;this.a=c||0;this.f=d||1},dv=function(a,b){var c=a.x,d=a.y,e=a.a,f=a.f;b.set(1-2*(d*d+e*e),2*(c*d-e*f),2*(c*e+d*f),0,2*(c*d+e*f),1-2*(c*c+e*e),2*(d*e-c*f),0,2*(c*e-d*f),2*(d*e+c*f),1-2*(c*c+d*d),0,0,0,0,1)},ev=function(a,b,c){c*=.5;var d=Math.sqrt(a*a+b*b),e=Math.sin(c);return new cv(a/d*e,b/d*e,0/d*e,Math.cos(c))},fv=function(a,b,c){this.x=a||0;this.y=b||0;this.a=c||0},gv=function(a,b){isFinite(b)?(a.x*=b,a.y*=b,a.a*=
3
+ b):(a.x=0,a.y=0,a.a=0)},hv=function(a,b){return a.x*b.x+a.y*b.y+a.a*b.a},iv=function(a,b,c){var d=b.x,e=b.y;b=b.a;var f=c.x,g=c.y;c=c.a;a.x=e*c-b*g;a.y=b*f-d*c;a.a=d*g-e*f;return a},jv=function(){this.a=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},kv=function(a,b,c){b=b.a;c=c.a;var d=a.a,e=0;do d[4*e]=b[4*e]*c[0]+b[4*e+1]*c[4]+b[4*e+2]*c[8]+b[4*e+3]*c[12],d[4*e+1]=b[4*e]*c[1]+b[4*e+1]*c[5]+b[4*e+2]*c[9]+b[4*e+3]*c[13],d[4*e+2]=b[4*e]*c[2]+b[4*e+1]*c[6]+b[4*e+2]*c[10]+b[4*e+3]*c[14],d[4*e+
4
+ 3]=b[4*e]*c[3]+b[4*e+1]*c[7]+b[4*e+2]*c[11]+b[4*e+3]*c[15];while(4>++e);return a},lv=function(a){var b=new fv(0,0,0),c=new fv(0,0,1),d=new fv,e=new fv,f=new fv;a=a.a;var g=new fv(0,1,0);f.x=b.x-g.x;f.y=b.y-g.y;f.a=b.a-g.a;g=f.length();gv(f,1/g);c=iv(d,c,f);g=c.length();gv(c,1/g);iv(e,f,d);a[0]=d.x;a[1]=d.y;a[2]=d.a;a[3]=-hv(d,b);a[4]=e.x;a[5]=e.y;a[6]=e.a;a[7]=-hv(e,b);a[8]=f.x;a[9]=f.y;a[10]=f.a;a[11]=-hv(f,b);a[12]=0;a[13]=0;a[14]=0;a[15]=1},nv=function(a){this.a=a;this.f=a.createProgram();this.l=
5
+ mv(this,!1,"uniform highp mat4 Mvpm;\nattribute highp vec4 aPosition;\nattribute highp vec2 aTexCoord;\nvarying highp vec2 oTexCoord;\nvoid main()\n{\n gl_Position \x3d Mvpm * aPosition;\n oTexCoord \x3d aTexCoord;\n}\n");this.j=mv(this,!0,"precision highp float;\nuniform sampler2D Texture0;\nvarying highp vec2 oTexCoord;\nvoid main()\n{\n gl_FragColor \x3d texture2D(Texture0, oTexCoord);\n gl_FragColor.w \x3d 1.0;\n}\n");a.attachShader(this.f,this.l);a.attachShader(this.f,this.j);a.bindAttribLocation(this.f,
6
+ 0,"aPosition");a.bindAttribLocation(this.f,1,"aTexCoord");a.linkProgram(this.f);if(!a.getProgramParameter(this.f,a.LINK_STATUS))throw new _.P(1,9,9004,"Unable to initialize shader");a.useProgram(this.f);this.h=a.getUniformLocation(this.f,"Mvpm");a.uniform1i(a.getUniformLocation(this.f,"Texture0"),0);a.useProgram(null)},mv=function(a,b,c){b=a.a.createShader(b?a.a.FRAGMENT_SHADER:a.a.VERTEX_SHADER);a.a.shaderSource(b,c);a.a.compileShader(b);if(!a.a.getShaderParameter(b,a.a.COMPILE_STATUS))throw new _.P(1,
7
+ 9,9004,"Unable to compile GL shader: "+a.a.getShaderInfoLog(b));return b},ov=function(a){this.a=a;var b=[],c,d;for(d=0;70>=d;d++){var e=3>=d?d/4/64:67<=d?(63+(d-66)/4)/64:(d-3)/64;var f=(e-.5)*Math.PI,g=Math.cos(f);for(c=0;128>=c;c++){var h=c/128,l=(.5+h)*Math.PI*2;128===c?(b.push(b[645*d]),b.push(b[645*d+1]),b.push(b[645*d+2])):(b.push(100*Math.cos(l)*g),b.push(100*Math.sin(l)*g),b.push(100*Math.sin(f)));0===d||70===d?b.push(.5):b.push(1-h);b.push(1-e)}}e=[];for(c=0;128>c;c++)for(d=0;70>d;d++)f=
8
+ 5*(129*d+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*d+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*d+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]),f=5*(129*(d+1)+c+1),e.push(b[f],b[f+1],b[f+2],b[f+3],b[f+4]);this.h=e.length/5;this.f=a.createBuffer();b=new Float32Array(e);a.bindBuffer(a.ARRAY_BUFFER,this.f);a.bufferData(a.ARRAY_BUFFER,b,a.STATIC_DRAW)},pv=function(a,
9
+ b){this.a=b;this.f=this.a.createTexture();b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.f);b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,a);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.bindTexture(b.TEXTURE_2D,null)},qv=function(){var a=this;this.o=this.w=this.M=this.J=this.A=
10
+ this.ha=this.H=this.f=this.a=this.m=null;this.g=new _.K("clpp.vr");this.I=70;this.ea=1;this.T=this.P=!1;this.G=function(){if(a.a&&a.f){a.f.viewport(0,0,a.a.width,a.a.height);var b=a.M.a,c=Math.tan(.5*a.I*Math.PI/180);b[0]=1/(a.a.width/a.a.height*c);b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=1/c;b[6]=0;b[7]=0;b[8]=0;b[9]=0;b[10]=2E3/-1999.9;b[11]=200/-1999.9;b[12]=0;b[13]=0;b[14]=-1;b[15]=1}};this.l=this.j=0;this.h={x:0,y:0};this.V=new jv;this.da=new jv;this.pa=new jv;this.qa=new jv;this.B=this.tl.bind(this);
11
+ this.C=this.ul.bind(this);this.K=this.sl.bind(this)},rv=function(a){var b=ev(1,0,a.l*Math.PI/180);dv(ev(0,1,a.j*Math.PI/180),a.V);dv(b,a.da);lv(a.pa);kv(a.qa,a.V,a.pa);kv(a.H,a.da,a.qa)},sv=function(a){a.a&&(a.a.removeEventListener("mousemove",a.B,!1),a.a.removeEventListener(av,a.B,!1),a.a.removeEventListener("mouseup",a.C,!1),a.a.removeEventListener("touchend",a.C,!1))},uv=function(){};fv.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.a*this.a)};jv.prototype.set=function(a,b,c,d,e,f,g,h,l,m,n,p,q,t,v,z){var D=this.a;D[0]=a;D[4]=b;D[8]=c;D[12]=d;D[1]=e;D[5]=f;D[9]=g;D[13]=h;D[2]=l;D[6]=m;D[10]=n;D[14]=p;D[3]=q;D[7]=t;D[11]=v;D[15]=z;return this};var vv={alpha:!1,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!1,devicePixelRatio:1};_.w(qv,_.rt);_.r=qv.prototype;_.r.onPlayerCreated=function(a){this.g.info("Player created");this.m=a};
12
+ _.r.onContentWillLoad=function(a){var b=a.getConfiguration();if(b.vr&&b.vr.enable){var c=b.vr,d=c.fieldOfView,e=c.sensitivity,f=c.invertHorizontalControl;c=c.invertVerticalControl;if(void 0!==d&&_.N.na(d))this.I=d;else throw new _.P(1,7,7100,"fieldOfView configuration must be a number");if(void 0!==e&&_.N.na(e)&&0<e)this.ea=e;else throw new _.P(1,7,7100,"sensitivity configuration must be a positive number");this.P=!!f;this.T=!!c;if(a=a.getSurface())if((d=a.getMedia())&&d.tagName.toLowerCase()===_.sg){this.g.info("Initialize VR Surface");
13
+ if(!this.a){this.a=document.createElement("canvas");this.a.style.width="100%";this.f=this.a.getContext("webgl",vv)||this.a.getContext("experimental-webgl",vv);if(!this.f)throw new _.P(1,9,9003,"Unable to create GL context");this.H=new jv;lv(this.H);this.ha=new ov(this.f);this.A=new nv(this.f);this.J=new jv;this.M=new jv;this.o=this.w=null;this.a.addEventListener(_.Jf,this.G)}a.addElementToContainer(this.a,!0,!0);a.hideMediaElement();b.vr.attachMouseListener&&(this.a.addEventListener("mousedown",this.K,
14
+ !1),this.a.addEventListener(bv,this.K,!1));this.G();this.Hh()}else this.g.info("No video element found, can not initialize VR plugin");else this.g.info("No surface found, can not initialize VR plugin")}};
15
+ _.r.onPlayerWillRelease=function(){this.g.info("Releasing VR plugin resources");this.w&&cancelAnimationFrame(this.w);this.h.x=0;this.l=this.j=this.h.y=0;this.f&&(delete this.f,this.f=null);this.a&&(sv(this),this.a.removeEventListener(_.Jf,this.G),this.a.parentElement.removeChild(this.a),this.a.removeEventListener("mousedown",this.K,!1),delete this.a,this.a=null)};_.r.onPlayerWillDestroy=function(){var a=this;return _.E(function(b){a.m=null;_.y(b)})};_.r.id=function(){return"vr"};
16
+ _.r.Hh=function(){if(this.m&&this.f){var a=this.m.getSurface();if(a&&(a=a.getMedia())&&a.tagName.toLowerCase()===_.sg){this.w=requestAnimationFrame(this.Hh.bind(this));var b=this.f;this.o||a.readyState!==a.HAVE_ENOUGH_DATA||(this.o=new pv(a,b));b.clearColor(0,0,0,1);b.clearDepth(1);b.clearStencil(0);b.enable(b.DEPTH_TEST);b.depthFunc(b.LEQUAL);b.frontFace(b.CCW);b.cullFace(b.BACK);b.disable(b.CULL_FACE);b.enable(b.BLEND);b.blendFunc(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA);b.depthMask(!0);b.clearColor(0,
17
+ 0,0,1);b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT);if(this.o){var c=this.A;c.a.useProgram(c.f);c=kv(this.J,this.M,this.H).a;var d=c[1];c[1]=c[4];c[4]=d;d=c[2];c[2]=c[8];c[8]=d;d=c[6];c[6]=c[9];c[9]=d;d=c[3];c[3]=c[12];c[12]=d;d=c[7];c[7]=c[13];c[13]=d;d=c[11];c[11]=c[14];c[14]=d;b.uniformMatrix4fv(this.A.h,!1,this.J.a);c=this.o;c.a.activeTexture(c.a.TEXTURE0);c.a.bindTexture(c.a.TEXTURE_2D,c.f);b.texImage2D(b.TEXTURE_2D,0,b.RGB,b.RGB,b.UNSIGNED_BYTE,a);a=this.ha;a.a.bindBuffer(a.a.ARRAY_BUFFER,
18
18
  a.f);a.a.vertexAttribPointer(0,3,a.a.FLOAT,!1,20,0);a.a.vertexAttribPointer(1,2,a.a.FLOAT,!1,20,12);a.a.enableVertexAttribArray(0);a.a.enableVertexAttribArray(1);a.a.drawArrays(a.a.TRIANGLES,0,a.h);a=this.o;a.a.bindTexture(a.a.TEXTURE_2D,null);this.A.a.useProgram(null)}}}};
19
- _.r.sl=function(a){this.g.debug("Mouse Down. Enable VR mouse interaction");a.preventDefault();if(0===a.button||a.type===Xu)a.type===Xu?a.touches[0]&&(this.h.x=a.touches[0].clientX,this.h.y=a.touches[0].clientY):(this.h.x=a.clientX,this.h.y=a.clientY),this.g.debug("Mouse Start coordinates:",this.h,a),this.a.addEventListener("mousemove",this.B,!1),this.a.addEventListener(Wu,this.B,!1),this.a.addEventListener("mouseup",this.D,!1),this.a.addEventListener("touchend",this.D,!1)};
20
- _.r.tl=function(a){a.preventDefault();var b=a.clientX,c=a.clientY;a.type===Wu&&a.touches[0]&&(b=a.touches[0].clientX,c=a.touches[0].clientY);a=this.h.x-b;var d=this.h.y-c;this.h.x=b;this.h.y=c;b=this.fa;c=d*b*(this.T?-1:1);this.j+=a*b*(this.P?-1:1);this.l+=c;mv(this)};_.r.ul=function(a){this.g.debug("Mouse Up. Removing mouse interaction listeners");a.preventDefault();nv(this)};_.r.Ok=function(a,b){this.l=b;this.j=a;mv(this)};_.r.ak=function(){return{x:this.j,y:this.l}};
21
- _.r.hm=function(a){this.I=a;this.G()};_.H("clpp.vr.VrPlugin",lv);lv.prototype.setCameraFieldOfView=lv.prototype.hm;lv.prototype.getCameraCoordinates=lv.prototype.ak;lv.prototype.moveCamera=lv.prototype.Ok;lv.Id="vr";ov.prototype.create=function(){return new lv};_.jq(new ov);};
19
+ _.r.sl=function(a){this.g.debug("Mouse Down. Enable VR mouse interaction");a.preventDefault();if(0===a.button||a.type===bv)a.type===bv?a.touches[0]&&(this.h.x=a.touches[0].clientX,this.h.y=a.touches[0].clientY):(this.h.x=a.clientX,this.h.y=a.clientY),this.g.debug("Mouse Start coordinates:",this.h,a),this.a.addEventListener("mousemove",this.B,!1),this.a.addEventListener(av,this.B,!1),this.a.addEventListener("mouseup",this.C,!1),this.a.addEventListener("touchend",this.C,!1)};
20
+ _.r.tl=function(a){a.preventDefault();var b=a.clientX,c=a.clientY;a.type===av&&a.touches[0]&&(b=a.touches[0].clientX,c=a.touches[0].clientY);a=this.h.x-b;var d=this.h.y-c;this.h.x=b;this.h.y=c;b=this.ea;c=d*b*(this.T?-1:1);this.j+=a*b*(this.P?-1:1);this.l+=c;rv(this)};_.r.ul=function(a){this.g.debug("Mouse Up. Removing mouse interaction listeners");a.preventDefault();sv(this)};_.r.Ok=function(a,b){this.l=b;this.j=a;rv(this)};_.r.$j=function(){return{x:this.j,y:this.l}};
21
+ _.r.hm=function(a){this.I=a;this.G()};_.H("clpp.vr.VrPlugin",qv);qv.prototype.setCameraFieldOfView=qv.prototype.hm;qv.prototype.getCameraCoordinates=qv.prototype.$j;qv.prototype.moveCamera=qv.prototype.Ok;qv.Id="vr";uv.prototype.create=function(){return new qv};_.nq(new uv);};
22
22
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
23
23
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
24
24
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.vtt.js CHANGED
@@ -1,18 +1,18 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var Cu=" The setting will be ignored.",Du="VTT parser encountered an invalid VTT setting: ",Eu="application/x-subrip",Fu="text/srt",Gu='text/vtt; codecs\x3d"vtt"',Hu='text/vtt; codecs\x3d"wvtt"',Iu=function(a){_.kj(a,/[ \t]+/gm)},Ju=function(a){return a.a==a.f.length?null:(a=_.kj(a,/[^ \t\n]*/gm))?a[0]:null},Ku=function(){},Lu=function(a){var b="";for(a=a.split(/\n/);3<a.length;){for(var c=3;c<a.length;++c)a[2]+="\n"+a[c];a.splice(3,a.length-3)}if(3!==a.length)return"";c=0;!a[0].match(/\d+:\d+:\d+/)&&
3
- a[1].match(/\d+:\d+:\d+/)&&(b+=a[0].match(/\w+/)+"\n",++c);if(a[c].match(/\d+:\d+:\d+/)){var d=a[1].match(/(\d+):(\d+):(\d+)(?:,(\d+))?\s*--?>\s*(\d+):(\d+):(\d+)(?:,(\d+))?/);if(d)b+=d[1]+":"+d[2]+":"+d[3]+"."+d[4]+" --\x3e ",b+=d[5]+":"+d[6]+":"+d[7]+"."+d[8]+"\n",++c;else return""}else return"";a[c]&&(b+=a[c]+"\n\n");return b},Mu=function(){},Nu=function(a){this.a=a},Pu=function(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=_.Yh:a.textAlign=
4
- _.qt[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?_.pg:_.qg;else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b==_.Ae||b==_.Rf?_.Ae:b==_.Ce||b==_.ke?_.Ce:_.sd);else if(d=/^region:(.*)$/.exec(b)){if(b=Ou(c,d[1]))a.region=b}else{a:{if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),
5
- c[2]&&(a.lineAlign=_.At[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.$h,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.At[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Ou=function(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:(_.J("VTT parser could not find a region with id: ",b," The region will be ignored."),null)},Qu=function(a){a=_.kj(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;
6
- var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)},Ru=function(){Nu.apply(this,arguments)},Su=function(){this.a=null;this.g=new _.K("clpp.vtt.mp4")},Uu=function(a,b,c){var d,e,f;(new _.lm).L("payl",_.om(function(g){d=_.R.Z(g)})).L("iden",_.om(function(g){e=_.R.Z(g)})).L("sttg",_.om(function(g){f=_.R.Z(g)})).parse(a);return d?Tu(d,e,f,b,c):null},Tu=function(a,b,c,d,e){a=new _.ci(d,e,a,_.yg);b&&(a.id=b);if(c)for(b=new _.jj(c),c=Ju(b);c;)Pu(a,c,[])||
7
- _.J(Du,c,Cu),Iu(b),c=Ju(b);return a},Vu=function(){this.j=new Mu};Ku.prototype.a=function(a){a=_.R.Z(a);a=a.replace(/\r+/g,"");a=a.replace(/^\s+|\s+$/g,"");a=a.replace(/<[a-zA-Z\\/][^>]*>/g,"");var b=a.split("\n\n");a="";if(0<b.length){a+="WEBVTT\n\n";b=_.u(b);for(var c=b.next();!c.done;c=b.next())a+=Lu(c.value)}return _.R.Ua(a)};Mu.prototype.create=function(){return new Ku};Mu.prototype.probe=function(a,b){return(a===Fu||a===Eu)&&b===_.bg};Nu.prototype.parseInit=function(){};
8
- Nu.prototype.parseMedia=function(a,b){var c=_.R.Z(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new _.P(_.Q,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Qu(new _.jj(e[1]));if(null==c)throw new _.P(_.Q,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
9
- f/9E4-c}}else this.a.streaming.relativeTextTimestamp&&null!==b.segmentStart&&(c=b.segmentStart);f=[];e=_.u(d);for(var g=e.next();!g.done;g=e.next()){var h=g.value;if(/^region/.test(h.toLowerCase())){h=new _.jj(h.replace(/\n/g," "));g=new _.fi;Ju(h);Iu(h);for(var l=Ju(h);l;){var m;a:{var n=g,p=l;if(m=/^id:(.*)$/.exec(p))n.id=m[1];else if(m=/^width:(\d{1,2}|100)%$/.exec(p))n.width=Number(m[1]);else if(m=/^lines:(\d+)$/.exec(p))n.height=Number(m[1]),n.heightUnits=2;else if(m=/^regionanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))n.regionAnchorX=
10
- Number(m[1]),n.regionAnchorY=Number(m[2]);else if(m=/^viewportanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2]);else if(/^scroll:up$/.exec(p))n.scroll="up";else{m=!1;break a}m=!0}m||_.J("VTT parser encountered an invalid VTTRegion setting: ",l,Cu);Iu(h);l=Ju(h)}f.push(g)}}e=[];h=_.u(d);for(g=h.next();!g.done;g=h.next())if(g=g.value,/^style/.test(g.toLowerCase())){g=g.replace(/^style/i,"").replace(/\n/g," ");l=/[^{}]+{[^{}]*}/g;do(m=l.exec(g))&&
11
- e.push(m[0]);while(m)}h=[];d=_.u(d);for(g=d.next();!g.done;g=d.next())if(g=g.value,g.includes("--\x3e")){p=g.split("\n");var q=c;if(1==p.length&&!p[0]||/^NOTE($|[ \t])/.test(p[0])||"STYLE"==p[0])g=null;else{g=null;p[0].includes("--\x3e")||(g=p[0],p.splice(0,1));l=new _.jj(p[0]);m=Qu(l);var t=_.kj(l,/[ \t]+--\x3e[ \t]+/g);n=Qu(l);if(null==m||null==t||null==n)throw new _.P(_.Q,2,2001);m+=q;n+=q;p=p.slice(1).join("\n").trim();m=new _.ci(m,n,p,_.yg);g&&(m.id=g);Iu(l);for(n=Ju(l);n;)Pu(m,n,f)||_.J(Du,
12
- n,Cu),Iu(l),n=Ju(l);null!=g&&(m.id=g);g=m}g&&h.push(g)}return{cues:h,styles:e}};_.w(Ru,Nu);Ru.prototype.parseMedia=function(a,b){return Nu.prototype.parseMedia.call(this,(new Ku).a(a),b)};Su.prototype.parseInit=function(a){var b=this,c=!1;(new _.lm).L(_.Ne,_.mm).L(_.eg,_.mm).L(_.Ie,_.mm).Y("mdhd",function(d){0==d.version?(d.reader.skip(4),d.reader.skip(4),b.a=_.W(d.reader),d.reader.skip(4)):(d.reader.skip(8),d.reader.skip(8),b.a=_.W(d.reader),d.reader.skip(8));d.reader.skip(4)}).L(_.Me,_.mm).L(_.Uf,_.mm).Y(_.Wf,_.nm).L("wvtt",function(){c=!0}).parse(a);if(!this.a)throw new _.P(_.Q,2,2008);if(!c)throw new _.P(_.Q,2,2008);};
13
- Su.prototype.parseMedia=function(a,b){if(!this.a)throw this.g.error("No init segment for MP4+VTT!"),new _.P(_.Q,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,l=!1,m=null;(new _.lm).L("moof",_.mm).L("traf",_.mm).Y("tfdt",function(I){g=!0;c=0==I.version?_.W(I.reader):_.im(I.reader)}).Y("tfhd",function(I){var O=I.flags;I=I.reader;I.skip(4);O&1&&I.skip(8);O&2&&I.skip(4);m=O&8?_.W(I):null}).Y("trun",function(I){h=!0;var O=I.version,M=I.flags;I=I.reader;var aa=_.W(I);M&1&&I.skip(4);M&4&&I.skip(4);for(var oa=[],
14
- pa=0;pa<aa;pa++){var Ja={duration:null,sampleSize:null,Tf:null};M&256&&(Ja.duration=_.W(I));M&512&&(Ja.sampleSize=_.W(I));M&1024&&I.skip(4);M&2048&&(Ja.Tf=0==O?_.W(I):_.hm(I));oa.push(Ja)}d=oa}).L(_.He,_.om(function(I){l=!0;e=I})).parse(a);if(!l&&!g&&!h)throw new _.P(_.Q,2,2008);var n=c,p=new DataView(e.buffer,e.byteOffset,e.byteLength);p=new _.cm(p,!1);for(var q=_.u(d),t=q.next();!t.done;t=q.next()){t=t.value;var v=t.duration||m,z=t.Tf?c+t.Tf:n;n=z+(v||0);var D=0;do{var G=_.W(p);D+=G;var F=_.W(p);
15
- F=_.qm(F);var C=null;"vttc"==F?8<G&&(C=_.km(p,G-8)):("vtte"!=F&&this.g.error("Unknown box "+F+"! Skipping!"),p.skip(G-8));v?C&&f.push(Uu(C,b.periodStart+z/this.a,b.periodStart+n/this.a)):this.g.error("WVTT sample duration unknown, and no default found!")}while(t.sampleSize&&D<t.sampleSize)}return{cues:f.filter(_.mi),styles:[]}};_.w(Vu,_.Er);Vu.prototype.f=function(){_.Zs[_.bg]=Nu;_.Zs[Gu]=Nu;_.Zs[Hu]=Nu;_.Zs[_.Wc]=Su;_.Zs[Fu]=Ru;_.Zs[Eu]=Ru;_.nk.push(this.j)};Vu.prototype.a=function(){_.$s(_.bg);_.$s(Gu);_.$s(Hu);_.$s(_.Wc);_.$s(Fu);_.$s(Eu);_.pk(this.j)};Vu.prototype.id=function(){return"subtitles-vtt"};_.H("clpp.vtt.VttComponent",Vu);};
2
+ var f=function(window){var Hu=" The setting will be ignored.",Iu="VTT parser encountered an invalid VTT setting: ",Ju="application/x-subrip",Ku="text/srt",Lu='text/vtt; codecs\x3d"vtt"',Mu='text/vtt; codecs\x3d"wvtt"',Nu=function(a){_.lj(a,/[ \t]+/gm)},Ou=function(a){return a.a==a.f.length?null:(a=_.lj(a,/[^ \t\n]*/gm))?a[0]:null},Pu=function(){},Qu=function(a){var b="";for(a=a.split(/\n/);3<a.length;){for(var c=3;c<a.length;++c)a[2]+="\n"+a[c];a.splice(3,a.length-3)}if(3!==a.length)return"";c=0;!a[0].match(/\d+:\d+:\d+/)&&
3
+ a[1].match(/\d+:\d+:\d+/)&&(b+=a[0].match(/\w+/)+"\n",++c);if(a[c].match(/\d+:\d+:\d+/)){var d=a[1].match(/(\d+):(\d+):(\d+)(?:,(\d+))?\s*--?>\s*(\d+):(\d+):(\d+)(?:,(\d+))?/);if(d)b+=d[1]+":"+d[2]+":"+d[3]+"."+d[4]+" --\x3e ",b+=d[5]+":"+d[6]+":"+d[7]+"."+d[8]+"\n",++c;else return""}else return"";a[c]&&(b+=a[c]+"\n\n");return b},Ru=function(){},Su=function(a){this.a=a},Uu=function(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=_.Zh:a.textAlign=
4
+ _.Nt[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?_.qg:_.rg;else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign=b==_.Ce||b==_.Sf?_.Ce:b==_.De||b==_.le?_.De:_.sd);else if(d=/^region:(.*)$/.exec(b)){if(b=Tu(c,d[1]))a.region=b}else{a:{if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),
5
+ c[2]&&(a.lineAlign=_.Ot[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=_.ai,a.line=Number(c[1]),c[2]&&(a.lineAlign=_.Ot[c[2].toUpperCase()]);else{a=!1;break a}a=!0}return a}return!0},Tu=function(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:(_.J("VTT parser could not find a region with id: ",b," The region will be ignored."),null)},Vu=function(a){a=_.lj(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;
6
+ var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)},Wu=function(){Su.apply(this,arguments)},Xu=function(){this.a=null;this.g=new _.K("clpp.vtt.mp4")},Zu=function(a,b,c){var d,e,f;(new _.mm).L("payl",_.pm(function(g){d=_.R.Z(g)})).L("iden",_.pm(function(g){e=_.R.Z(g)})).L("sttg",_.pm(function(g){f=_.R.Z(g)})).parse(a);return d?Yu(d,e,f,b,c):null},Yu=function(a,b,c,d,e){a=new _.di(d,e,a,_.zg);b&&(a.id=b);if(c)for(b=new _.kj(c),c=Ou(b);c;)Uu(a,c,[])||
7
+ _.J(Iu,c,Hu),Nu(b),c=Ou(b);return a},$u=function(){this.j=new Ru};Pu.prototype.a=function(a){a=_.R.Z(a);a=a.replace(/\r+/g,"");a=a.replace(/^\s+|\s+$/g,"");a=a.replace(/<[a-zA-Z\\/][^>]*>/g,"");var b=a.split("\n\n");a="";if(0<b.length){a+="WEBVTT\n\n";b=_.u(b);for(var c=b.next();!c.done;c=b.next())a+=Qu(c.value)}return _.R.Va(a)};Ru.prototype.create=function(){return new Pu};Ru.prototype.probe=function(a,b){return(a===Ku||a===Ju)&&b===_.cg};Su.prototype.parseInit=function(){};
8
+ Su.prototype.parseMedia=function(a,b){var c=_.R.Z(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new _.P(_.Q,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Vu(new _.kj(e[1]));if(null==c)throw new _.P(_.Q,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
9
+ f/9E4-c}}else this.a.streaming.relativeTextTimestamp&&null!==b.segmentStart&&(c=b.segmentStart);f=[];e=_.u(d);for(var g=e.next();!g.done;g=e.next()){var h=g.value;if(/^region/.test(h.toLowerCase())){h=new _.kj(h.replace(/\n/g," "));g=new _.gi;Ou(h);Nu(h);for(var l=Ou(h);l;){var m;a:{var n=g,p=l;if(m=/^id:(.*)$/.exec(p))n.id=m[1];else if(m=/^width:(\d{1,2}|100)%$/.exec(p))n.width=Number(m[1]);else if(m=/^lines:(\d+)$/.exec(p))n.height=Number(m[1]),n.heightUnits=2;else if(m=/^regionanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))n.regionAnchorX=
10
+ Number(m[1]),n.regionAnchorY=Number(m[2]);else if(m=/^viewportanchor:(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(p))n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2]);else if(/^scroll:up$/.exec(p))n.scroll="up";else{m=!1;break a}m=!0}m||_.J("VTT parser encountered an invalid VTTRegion setting: ",l,Hu);Nu(h);l=Ou(h)}f.push(g)}}e=[];h=_.u(d);for(g=h.next();!g.done;g=h.next())if(g=g.value,/^style/.test(g.toLowerCase())){g=g.replace(/^style/i,"").replace(/\n/g," ");l=/[^{}]+{[^{}]*}/g;do(m=l.exec(g))&&
11
+ e.push(m[0]);while(m)}h=[];d=_.u(d);for(g=d.next();!g.done;g=d.next())if(g=g.value,g.includes("--\x3e")){p=g.split("\n");var q=c;if(1==p.length&&!p[0]||/^NOTE($|[ \t])/.test(p[0])||"STYLE"==p[0])g=null;else{g=null;p[0].includes("--\x3e")||(g=p[0],p.splice(0,1));l=new _.kj(p[0]);m=Vu(l);var t=_.lj(l,/[ \t]+--\x3e[ \t]+/g);n=Vu(l);if(null==m||null==t||null==n)throw new _.P(_.Q,2,2001);m+=q;n+=q;p=p.slice(1).join("\n").trim();m=new _.di(m,n,p,_.zg);g&&(m.id=g);Nu(l);for(n=Ou(l);n;)Uu(m,n,f)||_.J(Iu,
12
+ n,Hu),Nu(l),n=Ou(l);null!=g&&(m.id=g);g=m}g&&h.push(g)}return{cues:h,styles:e}};_.w(Wu,Su);Wu.prototype.parseMedia=function(a,b){return Su.prototype.parseMedia.call(this,(new Pu).a(a),b)};Xu.prototype.parseInit=function(a){var b=this,c=!1;(new _.mm).L(_.Oe,_.nm).L(_.fg,_.nm).L(_.Je,_.nm).Y("mdhd",function(d){0==d.version?(d.reader.skip(4),d.reader.skip(4),b.a=_.W(d.reader),d.reader.skip(4)):(d.reader.skip(8),d.reader.skip(8),b.a=_.W(d.reader),d.reader.skip(8));d.reader.skip(4)}).L(_.Ne,_.nm).L(_.Vf,_.nm).Y(_.Xf,_.om).L("wvtt",function(){c=!0}).parse(a);if(!this.a)throw new _.P(_.Q,2,2008);if(!c)throw new _.P(_.Q,2,2008);};
13
+ Xu.prototype.parseMedia=function(a,b){if(!this.a)throw this.g.error("No init segment for MP4+VTT!"),new _.P(_.Q,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,l=!1,m=null;(new _.mm).L("moof",_.nm).L("traf",_.nm).Y("tfdt",function(I){g=!0;c=0==I.version?_.W(I.reader):_.jm(I.reader)}).Y("tfhd",function(I){var O=I.flags;I=I.reader;I.skip(4);O&1&&I.skip(8);O&2&&I.skip(4);m=O&8?_.W(I):null}).Y("trun",function(I){h=!0;var O=I.version,M=I.flags;I=I.reader;var ba=_.W(I);M&1&&I.skip(4);M&4&&I.skip(4);for(var ha=[],
14
+ qa=0;qa<ba;qa++){var Ta={duration:null,sampleSize:null,Sf:null};M&256&&(Ta.duration=_.W(I));M&512&&(Ta.sampleSize=_.W(I));M&1024&&I.skip(4);M&2048&&(Ta.Sf=0==O?_.W(I):_.im(I));ha.push(Ta)}d=ha}).L(_.Ie,_.pm(function(I){l=!0;e=I})).parse(a);if(!l&&!g&&!h)throw new _.P(_.Q,2,2008);var n=c,p=new DataView(e.buffer,e.byteOffset,e.byteLength);p=new _.dm(p,!1);for(var q=_.u(d),t=q.next();!t.done;t=q.next()){t=t.value;var v=t.duration||m,z=t.Sf?c+t.Sf:n;n=z+(v||0);var D=0;do{var G=_.W(p);D+=G;var F=_.W(p);
15
+ F=_.rm(F);var B=null;"vttc"==F?8<G&&(B=_.lm(p,G-8)):("vtte"!=F&&this.g.error("Unknown box "+F+"! Skipping!"),p.skip(G-8));v?B&&f.push(Zu(B,b.periodStart+z/this.a,b.periodStart+n/this.a)):this.g.error("WVTT sample duration unknown, and no default found!")}while(t.sampleSize&&D<t.sampleSize)}return{cues:f.filter(_.ni),styles:[]}};_.w($u,_.Ir);$u.prototype.f=function(){_.ft[_.cg]=Su;_.ft[Lu]=Su;_.ft[Mu]=Su;_.ft[_.Wc]=Xu;_.ft[Ku]=Wu;_.ft[Ju]=Wu;_.ok.push(this.j)};$u.prototype.a=function(){_.gt(_.cg);_.gt(Lu);_.gt(Mu);_.gt(_.Wc);_.gt(Ku);_.gt(Ju);_.qk(this.j)};$u.prototype.id=function(){return"subtitles-vtt"};_.H("clpp.vtt.VttComponent",$u);};
16
16
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
17
17
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
18
18
  else{_=this.clpp._;(f.call(g,this));}
package/cjs/cl.youbora.js CHANGED
@@ -1,24 +1,24 @@
1
1
  (function(){var g={}; var _ = _ || {}
2
- var f=function(window){var ru='" event to Youbora',su='Reporting "',tu="clpp.npaw.YouboraPlugin",uu="content.isLive",vu=function(a){return(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:function(b){return{code:""+b.code,message:b.message,severity:b.severity}}},wu=function(a,b,c,d){b=vu(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.me;b.severity===_.Q?(d.fireFatalError(b.code,b.message,b.metadata),c.debug('Reporting "fatal '+a+'" to Youbora',b.code,
3
- b)):(d.fireError(b.code,b.message,b.metadata),c.debug(su+a+'" to Youbora',b.code,b));return b},xu=function(a){function b(c){var d=youbora.Adapter.call(this,c)||this;d.m=c;d.a=new _.Dh;d.g=new _.K("clpp.npaw.YouboraAdapter");d.w=!1;d.h=!1;d.registerListeners();d.B=!1;return d}_.w(b,youbora.Adapter);b.prototype.getPlayhead=function(){return this.getIsLive()?-1:this.m.getPosition()};b.prototype.getDuration=function(){return this.m.getDuration()};b.prototype.getRendition=function(){var c=this.m.getTrackManager();
4
- if(c&&(c=c.ha())){var d=c.width;var e=c.height;var f=c.bandwidth}d&&e&&f||(c=this.l(),d=d||c.width,e=e||c.height,f=f||c.streamBandwidth);return youbora.Util.buildRenditionString(d,e,f)};b.prototype.getIsLive=function(){return this.m.isLive()};b.prototype.getResource=function(){var c=this.m.getLoadedSource();return c&&c.url};b.prototype.getBitrate=function(){return this.l().streamBandwidth};b.prototype.getThroughput=function(){return this.l().estimatedBandwidth};b.prototype.getPlayrate=function(){return this.m.getPlaybackRate()};
5
- b.prototype.getFramesPerSecond=function(){var c=this.m.getTrackManager();return c&&(c=c.Ra())?c.frameRate:null};b.prototype.getPlayerName=function(){return _.xa};b.prototype.getVersion=function(){return"6.12.0-castlabsadapter-js"};b.prototype.getPlayerVersion=function(){return _.ia};b.prototype.registerListeners=function(){this.m&&this.a&&(this.g.debug("registering listeners"),youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Sf,this.K.bind(this)),this.a.on(this.m,_.me,this.H.bind(this)),this.a.on(this.m,
6
- _.mg,this.J.bind(this)),this.a.on(this.m,_.lg,this.I.bind(this)),this.a.on(this.m,_.Nc,this.D.bind(this)),this.a.on(this.m,_.nd,this.G.bind(this)))};b.prototype.unregisterListeners=function(){this.g.debug(_.gc);_.Gh(this.a)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.B=!0};b.prototype.l=function(){return this.m.getStats()||_.zo()};b.prototype.o=function(){return!!this.m.getConfiguration().autoplay};b.prototype.K=function(c){c=c.detail;this.j("state change",c);
7
- if(c)switch(c.currentState){case _.Po:this.o()&&this.f();break;case _.Ro:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.Qo:this.o()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Do:this.fireBufferEnd();this.fireStop();break;case _.Ko:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Io:this.fireBufferBegin();break;default:this.g.debug("Unhandled state",c)}};b.prototype.f=function(){this.plugin.isInitiated||
8
- (this.h=!1,this.fireInit())};b.prototype.A=function(){var c=this.m.getDrmInfo();c&&(c=c.keySystem,(c=c.startsWith(_.Rd)?"Widevine":c.startsWith(_.Md)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.$e)?"ClearKey":c.startsWith(_.Ld)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()};b.prototype.H=function(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=wu(c,this.m,this.g,this))&&c.severity===_.Q&&(this.h=!0)};
9
- b.prototype.J=function(){this.j(_.Lf);this.m.isEnded()||(this.f(),this.fireSeekBegin())};b.prototype.I=function(){this.j(_.Kf);this.fireSeekEnd()};b.prototype.D=function(c){this.g.debug("adsTimeline",c);c=c.adsTimeline;this.w=!!c&&c.nb()};b.prototype.G=function(c){this.g.debug("Casting",c);this.fireCasted()};b.prototype.j=function(c,d){for(var e=[],f=1;f<arguments.length;++f)e[f-1]=arguments[f];this.g.debug.apply(this.g,[su+c+ru].concat(_.Ng(e)))};return new b(a)},yu=function(a){function b(c){var d=
10
- youbora.Adapter.call(this,c)||this;d.m=c;d.a=null;d.j=null;d.f=new _.Dh;d.g=new _.K("clpp.npaw.YouboraAdsAdapter");d.registerListeners();d.A=!1;d.l=!1;return d}_.w(b,youbora.Adapter);b.prototype.getDuration=function(){return this.a&&this.a.getDuration()};b.prototype.getRendition=function(){var c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.Bb(),this.a.Ab(),this.a.mb()));return c};b.prototype.getBitrate=function(){return this.a&&this.a.mb()};b.prototype.getPlayhead=function(){var c=this.m.getAdsManager();
11
- return c&&c.getPosition()};b.prototype.getResource=function(){return this.a&&this.a.getMediaUrl()};b.prototype.getTitle=function(){return this.a&&this.a.getTitle()};b.prototype.getProvider=function(){return this.a&&this.a.getAdvertiserName()};b.prototype.getCreativeId=function(){return this.a&&this.a.getCreativeId()};b.prototype.getPosition=function(){var c=youbora.Constants.AdPosition,d=null;if(this.a)switch(this.a.bb()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.g.debug("Ad position",
2
+ var f=function(window){var wu='" event to Youbora',xu='Reporting "',yu="clpp.npaw.YouboraPlugin",zu="content.isLive",Au=function(a){return(a=a.getConfiguration().youbora)&&a.errorFilter?a.errorFilter:function(b){return{code:""+b.code,message:b.message,severity:b.severity}}},Bu=function(a,b,c,d){b=Au(b)(a);if(!b)return c.debug("Error not sent to Youbora",a.code,a.message),null;a=10003===a.code?"ad error":_.ne;b.severity===_.Q?(d.fireFatalError(b.code,b.message,b.metadata),c.debug('Reporting "fatal '+a+'" to Youbora',b.code,
3
+ b)):(d.fireError(b.code,b.message,b.metadata),c.debug(xu+a+'" to Youbora',b.code,b));return b},Cu=function(a){function b(c){var d=youbora.Adapter.call(this,c)||this;d.m=c;d.a=new _.Eh;d.g=new _.K("clpp.npaw.YouboraAdapter");d.w=!1;d.h=!1;d.registerListeners();d.B=!1;return d}_.w(b,youbora.Adapter);b.prototype.getPlayhead=function(){return this.getIsLive()?-1:this.m.getPosition()};b.prototype.getDuration=function(){return this.m.getDuration()};b.prototype.getRendition=function(){var c=this.m.getTrackManager();
4
+ if(c&&(c=c.ka())){var d=c.width;var e=c.height;var f=c.bandwidth}d&&e&&f||(c=this.l(),d=d||c.width,e=e||c.height,f=f||c.streamBandwidth);return youbora.Util.buildRenditionString(d,e,f)};b.prototype.getIsLive=function(){return this.m.isLive()};b.prototype.getResource=function(){var c=this.m.getLoadedSource();return c&&c.url};b.prototype.getBitrate=function(){return this.l().streamBandwidth};b.prototype.getThroughput=function(){return this.l().estimatedBandwidth};b.prototype.getPlayrate=function(){return this.m.getPlaybackRate()};
5
+ b.prototype.getFramesPerSecond=function(){var c=this.m.getTrackManager();return c&&(c=c.Ia())?c.frameRate:null};b.prototype.getPlayerName=function(){return _.wa};b.prototype.getVersion=function(){return"6.14.0-castlabsadapter-js"};b.prototype.getPlayerVersion=function(){return _.ja};b.prototype.registerListeners=function(){this.m&&this.a&&(this.g.debug("registering listeners"),youbora.Util.logAllEvents(this.m),this.a.on(this.m,_.Tf,this.K.bind(this)),this.a.on(this.m,_.ne,this.H.bind(this)),this.a.on(this.m,
6
+ _.og,this.J.bind(this)),this.a.on(this.m,_.mg,this.I.bind(this)),this.a.on(this.m,_.Nc,this.C.bind(this)),this.a.on(this.m,_.nd,this.G.bind(this)))};b.prototype.unregisterListeners=function(){this.g.debug(_.gc);_.Hh(this.a)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.B=!0};b.prototype.l=function(){return this.m.getStats()||_.Do()};b.prototype.o=function(){return!!this.m.getConfiguration().autoplay};b.prototype.K=function(c){c=c.detail;this.j("state change",c);
7
+ if(c)switch(c.currentState){case _.To:this.o()&&this.f();break;case _.Vo:this.f();this.A();this.fireResume();this.fireBufferEnd();break;case _.Uo:this.o()&&this.f();this.A();this.fireBufferEnd();this.firePause();break;case _.Ho:this.fireBufferEnd();this.fireStop();break;case _.Oo:this.fireBufferEnd();this.w&&this.plugin.getAdsAdapter()?this.firePause():this.fireStop();break;case _.Mo:this.fireBufferBegin();break;default:this.g.debug("Unhandled state",c)}};b.prototype.f=function(){this.plugin.isInitiated||
8
+ (this.h=!1,this.fireInit())};b.prototype.A=function(){var c=this.m.getDrmInfo();c&&(c=c.keySystem,(c=c.startsWith(_.Rd)?"Widevine":c.startsWith(_.Md)?"FairPlay":c.match(/^com\.(microsoft|chromecast)\.playready/)?"PlayReady":c.startsWith(_.af)?"ClearKey":c.startsWith(_.Ld)?"Primetime":c)&&this.plugin.setOptions({"content.drm":c}));this.fireJoin()};b.prototype.H=function(c){!(c=c.detail)||this.h||10003===c.code&&this.plugin.getAdsAdapter()||(c=Bu(c,this.m,this.g,this))&&c.severity===_.Q&&(this.h=!0)};
9
+ b.prototype.J=function(){this.j(_.Mf);this.m.isEnded()||(this.f(),this.fireSeekBegin())};b.prototype.I=function(){this.j(_.Lf);this.fireSeekEnd()};b.prototype.C=function(c){this.g.debug("adsTimeline",c);c=c.adsTimeline;this.w=!!c&&c.pb()};b.prototype.G=function(c){this.g.debug("Casting",c);this.fireCasted()};b.prototype.j=function(c,d){for(var e=[],f=1;f<arguments.length;++f)e[f-1]=arguments[f];this.g.debug.apply(this.g,[xu+c+wu].concat(_.Og(e)))};return new b(a)},Du=function(a){function b(c){var d=
10
+ youbora.Adapter.call(this,c)||this;d.m=c;d.a=null;d.j=null;d.f=new _.Eh;d.g=new _.K("clpp.npaw.YouboraAdsAdapter");d.registerListeners();d.A=!1;d.l=!1;return d}_.w(b,youbora.Adapter);b.prototype.getDuration=function(){return this.a&&this.a.getDuration()};b.prototype.getRendition=function(){var c=null;this.a&&(c=youbora.Util.buildRenditionString(this.a.Bb(),this.a.Ab(),this.a.ob()));return c};b.prototype.getBitrate=function(){return this.a&&this.a.ob()};b.prototype.getPlayhead=function(){var c=this.m.getAdsManager();
11
+ return c&&c.getPosition()};b.prototype.getResource=function(){return this.a&&this.a.getMediaUrl()};b.prototype.getTitle=function(){return this.a&&this.a.getTitle()};b.prototype.getProvider=function(){return this.a&&this.a.getAdvertiserName()};b.prototype.getCreativeId=function(){return this.a&&this.a.getCreativeId()};b.prototype.getPosition=function(){var c=youbora.Constants.AdPosition,d=null;if(this.a)switch(this.a.cb()){case 0:d=c.Preroll;break;case 2:d=c.Postroll;break;case 1:d=c.Midroll}this.g.debug("Ad position",
12
12
  d);return d};b.prototype.getIsSkippable=function(){return this.a&&-1!==this.a.getSkipTimeOffset()};b.prototype.getAudioEnabled=function(){var c=this.m.getAdsManager();return c&&0<c.getVolume()};b.prototype.getExpectedBreaks=function(){return this.j&&this.j.getCuePoints().length};b.prototype.getGivenBreaks=function(){return this.getExpectedBreaks()};b.prototype.getExpectedAds=function(){return this.a&&this.a.Db()};b.prototype.getGivenAds=function(){return this.getExpectedAds()};b.prototype.getBreaksTime=
13
- function(){var c=this;return this.j&&this.j.getCuePoints().map(function(d){return-1===d?c.m.getDuration():d})};b.prototype.getIsFullscreen=function(){return this.m.getSurface().isFullscreen()};b.prototype.getIsVisible=function(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug("is container visible",c);return c};b.prototype.getPlayerName=function(){return _.xa};b.prototype.getVersion=function(){return"6.12.0-castlabsadsadapter-js"};b.prototype.getPlayerVersion=
14
- function(){return _.ia};b.prototype.registerListeners=function(){this.m&&this.f&&(this.f.on(this.m,_.Nc,this.V.bind(this)),this.f.on(this.m,_.Ic,this.T.bind(this)),this.f.on(this.m,_.Ec,this.K.bind(this)),this.f.on(this.m,_.Gc,this.M.bind(this)),this.f.on(this.m,_.zc,this.I.bind(this)),this.f.on(this.m,_.Ac,this.o.bind(this,1)),this.f.on(this.m,_.Dc,this.o.bind(this,2)),this.f.on(this.m,_.Kc,this.o.bind(this,3)),this.f.on(this.m,_.yc,this.H.bind(this)),this.f.on(this.m,_.Hc,this.P.bind(this)),this.f.on(this.m,
15
- _.me,this.J.bind(this)),this.f.on(this.m,_.vc,this.B.bind(this)),this.f.on(this.m,_.wc,this.D.bind(this)),this.f.on(this.m,_.xc,this.G.bind(this)),this.f.on(this.m,_.Fc,this.w.bind(this)))};b.prototype.unregisterListeners=function(){_.Gh(this.f)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.A=!0};b.prototype.V=function(c){this.g.debug("ad timeline changed",c);this.j=c.adsTimeline};b.prototype.T=function(c){this.a=c.ad;this.h("ad start",this.a);this.fireStart();
13
+ function(){var c=this;return this.j&&this.j.getCuePoints().map(function(d){return-1===d?c.m.getDuration():d})};b.prototype.getIsFullscreen=function(){return this.m.getSurface().isFullscreen()};b.prototype.getIsVisible=function(){var c=this.m.getSurface().getContainer();c=youbora.Util.calculateAdViewability(c);this.g.debug("is container visible",c);return c};b.prototype.getPlayerName=function(){return _.wa};b.prototype.getVersion=function(){return"6.14.0-castlabsadsadapter-js"};b.prototype.getPlayerVersion=
14
+ function(){return _.ja};b.prototype.registerListeners=function(){this.m&&this.f&&(this.f.on(this.m,_.Nc,this.V.bind(this)),this.f.on(this.m,_.Hc,this.T.bind(this)),this.f.on(this.m,_.Dc,this.K.bind(this)),this.f.on(this.m,_.Fc,this.M.bind(this)),this.f.on(this.m,_.yc,this.I.bind(this)),this.f.on(this.m,_.zc,this.o.bind(this,1)),this.f.on(this.m,_.Cc,this.o.bind(this,2)),this.f.on(this.m,_.Jc,this.o.bind(this,3)),this.f.on(this.m,_.xc,this.H.bind(this)),this.f.on(this.m,_.Gc,this.P.bind(this)),this.f.on(this.m,
15
+ _.ne,this.J.bind(this)),this.f.on(this.m,_.uc,this.B.bind(this)),this.f.on(this.m,_.vc,this.C.bind(this)),this.f.on(this.m,_.wc,this.G.bind(this)),this.f.on(this.m,_.Ec,this.w.bind(this)))};b.prototype.unregisterListeners=function(){_.Hh(this.f)};b.prototype.dispose=function(){youbora.Adapter.prototype.dispose.call(this);this.A=!0};b.prototype.V=function(c){this.g.debug("ad timeline changed",c);this.j=c.adsTimeline};b.prototype.T=function(c){this.a=c.ad;this.h("ad start",this.a);this.fireStart();
16
16
  this.fireJoin()};b.prototype.I=function(){this.h("ad ended");this.fireStop()};b.prototype.K=function(){this.h("ad pause");this.w();this.firePause()};b.prototype.M=function(){this.h("ad resume");this.w();this.fireResume()};b.prototype.G=function(){this.l=!0;this.h("ad buffering started");this.fireBufferBegin()};b.prototype.w=function(){this.l&&(this.h("ad buffering ended"),this.l=!1,this.fireBufferEnd())};b.prototype.o=function(c){this.h("ad quartile",c);this.fireQuartile(c)};b.prototype.H=function(){this.h("ad clicked");
17
- var c=this.a&&this.a.Rb();this.g.debug("ad click through url: ",c);this.fireClick(c)};b.prototype.P=function(){this.h("ad skipped");this.fireSkip()};b.prototype.B=function(c){this.a=c.ad;this.h("ad break start",this.a);this.fireBreakStart()};b.prototype.D=function(){this.h("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){var c=this.plugin.getAdapter();c&&c.fireStop()}};b.prototype.J=function(c){(c=c.detail)&&10003===c.code&&wu(c,this.m,this.g,this)};
18
- b.prototype.h=function(c,d){for(var e=[],f=1;f<arguments.length;++f)e[f-1]=arguments[f];this.g.debug.apply(this.g,[su+c+ru].concat(_.Ng(e)))};return new b(a)},zu=function(){this.a=null;this.g=new _.K(tu);this.m=null},Au=function(a,b){if(b.namespace()===_.Cd)return a.g.info("Youbora does not report when casting."),!1;var c=b.getConfiguration().youbora;if(!_.N.bh(c))return a.g.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn("accountCode key is missing in Youbora config"),
19
- b.onError(new _.P(1,9,9101)),!1;if(_.N.R(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.P(1,9,9100)),!1;"6.8.49"!==youbora.VERSION&&(a.g.warn("Youbora SDK version is not supported. The supported version is 6.8.49, found version "+(youbora.VERSION+". Some or all features of YouboraPlugin may not work correctly.")),b.onError(new _.P(1,9,9102)));return!0},Bu=function(){};_.w(zu,_.kt);_.r=zu.prototype;_.r.Of=function(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(xu(this.m)),this.a.setAdsAdapter(yu(this.m))};_.r.getAdapter=function(){return this.a&&this.a.getAdapter()};_.r.getAdsAdapter=function(){return this.a&&this.a.getAdsAdapter()};_.r.onPlayerCreated=function(a){this.m=a;Au(this,a)&&(a=a.getConfiguration().youbora,this.Of(new youbora.Plugin(a)))};
20
- _.r.onContentWillLoad=function(a,b){if(Au(this,a)){var c=a.getConfiguration(),d=c.youbora;void 0===d[uu]&&(d[uu]=b.isLive);void 0===d["content.title"]&&(d["content.title"]=b.name);void 0===d.viewerId&&(d.viewerId=c.viewerId);this.a||this.Of(new youbora.Plugin(d));this.a.setOptions(d)}};_.r.onPlayerWillRelease=function(){};_.r.onPlayerWillDestroy=function(){};_.r.id=function(){return"youbora"};_.H(tu,zu);zu.prototype.getAdsAdapter=zu.prototype.getAdsAdapter;zu.prototype.getAdapter=zu.prototype.getAdapter;
21
- zu.prototype.setYouboraPlugin=zu.prototype.Of;zu.Id="youbora";Bu.prototype.create=function(){return new zu};_.jq(new Bu);};
17
+ var c=this.a&&this.a.Rb();this.g.debug("ad click through url: ",c);this.fireClick(c)};b.prototype.P=function(){this.h("ad skipped");this.fireSkip()};b.prototype.B=function(c){this.a=c.ad;this.h("ad break start",this.a);this.fireBreakStart()};b.prototype.C=function(){this.h("ad break stop");this.fireBreakStop();if(this.getPosition()===youbora.Constants.AdPosition.Postroll){var c=this.plugin.getAdapter();c&&c.fireStop()}};b.prototype.J=function(c){(c=c.detail)&&10003===c.code&&Bu(c,this.m,this.g,this)};
18
+ b.prototype.h=function(c,d){for(var e=[],f=1;f<arguments.length;++f)e[f-1]=arguments[f];this.g.debug.apply(this.g,[xu+c+wu].concat(_.Og(e)))};return new b(a)},Eu=function(){this.a=null;this.g=new _.K(yu);this.m=null},Fu=function(a,b){if(b.namespace()===_.Cd)return a.g.info("Youbora does not report when casting."),!1;var c=b.getConfiguration().youbora;if(!_.N.bh(c))return a.g.warn("Youbora plugin is loaded but not configured. Will do nothing."),!1;if(!c.accountCode)return a.g.warn("accountCode key is missing in Youbora config"),
19
+ b.onError(new _.P(1,9,9101)),!1;if(_.N.R(window.youbora))return a.g.warn("Youbora SDK not found."),b.onError(new _.P(1,9,9100)),!1;"6.8.49"!==youbora.VERSION&&(a.g.warn("Youbora SDK version is not supported. The supported version is 6.8.49, found version "+(youbora.VERSION+". Some or all features of YouboraPlugin may not work correctly.")),b.onError(new _.P(1,9,9102)));return!0},Gu=function(){};_.w(Eu,_.rt);_.r=Eu.prototype;_.r.Nf=function(a){this.a&&(this.a.removeAdsAdapter(),this.a.removeAdapter());if(this.a=a)this.a.setAdapter(Cu(this.m)),this.a.setAdsAdapter(Du(this.m))};_.r.getAdapter=function(){return this.a&&this.a.getAdapter()};_.r.getAdsAdapter=function(){return this.a&&this.a.getAdsAdapter()};_.r.onPlayerCreated=function(a){this.m=a;Fu(this,a)&&(a=a.getConfiguration().youbora,this.Nf(new youbora.Plugin(a)))};
20
+ _.r.onContentWillLoad=function(a,b){if(Fu(this,a)){var c=a.getConfiguration(),d=c.youbora;void 0===d[zu]&&(d[zu]=b.isLive);void 0===d["content.title"]&&(d["content.title"]=b.name);void 0===d.viewerId&&(d.viewerId=c.viewerId);this.a||this.Nf(new youbora.Plugin(d));this.a.setOptions(d)}};_.r.onPlayerWillRelease=function(){};_.r.onPlayerWillDestroy=function(){};_.r.id=function(){return"youbora"};_.H(yu,Eu);Eu.prototype.getAdsAdapter=Eu.prototype.getAdsAdapter;Eu.prototype.getAdapter=Eu.prototype.getAdapter;
21
+ Eu.prototype.setYouboraPlugin=Eu.prototype.Nf;Eu.Id="youbora";Gu.prototype.create=function(){return new Eu};_.nq(new Gu);};
22
22
  if(typeof(module)!="undefined"&&module.exports){var x=require("./cl.core.js");_ = x._;(f.call(g,this));module.exports=g;}
23
23
  else if (typeof(define)!="undefined"&&define.amd) {define(["./cl.core"], function(c){_=c._;(f.call(g,this));return g;});}
24
24
  else{_=this.clpp._;(f.call(g,this));}
@@ -1,36 +1,37 @@
1
- /* Polyfill service v3.110.1
2
- * Disable minification (remove `.min` from URL path) for more info */
1
+ /*
2
+ * Polyfill service v3.111.0
3
+ * Disable minification (remove `.min` from URL path) for more info
4
+ */
3
5
 
4
- (function(self, undefined) {function ArrayCreate(r){if(1/r==-Infinity&&(r=0),r>Math.pow(2,32)-1)throw new RangeError("Invalid array length");var n=[];return n.length=r,n}function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function Get(n,t){return n[t]}function HasOwnProperty(r,t){return Object.prototype.hasOwnProperty.call(r,t)}function HasProperty(n,r){return r in n}function IsArray(r){return"[object Array]"===Object.prototype.toString.call(r)}function IsCallable(n){return"function"==typeof n}function RequireObjectCoercible(e){if(null===e||e===undefined)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}function SameValueNonNumber(e,n){return e===n}function ToBoolean(o){return Boolean(o)}function ToObject(e){if(null===e||e===undefined)throw TypeError();return Object(e)}function GetV(t,e){return ToObject(t)[e]}function GetMethod(e,n){var r=GetV(e,n);if(null===r||r===undefined)return undefined;if(!1===IsCallable(r))throw new TypeError("Method not callable: "+n);return r}function Type(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in self&&(e instanceof self.Symbol||e.constructor===self.Symbol)?"symbol":"object"}}function GetPrototypeFromConstructor(t,o){var r=Get(t,"prototype");return"object"!==Type(r)&&(r=o),r}function IsConstructor(t){return"object"===Type(t)&&("function"==typeof t&&!!t.prototype)}function IsRegExp(e){if("object"!==Type(e))return!1;var n="Symbol"in self&&"match"in self.Symbol?Get(e,self.Symbol.match):undefined;if(n!==undefined)return ToBoolean(n);try{var t=e.lastIndex;return e.lastIndex=0,RegExp.prototype.exec.call(e),!0}catch(l){}finally{e.lastIndex=t}return!1}function IteratorClose(r,t){if("object"!==Type(r["[[Iterator]]"]))throw new Error(Object.prototype.toString.call(r["[[Iterator]]"])+"is not an Object.");var e=r["[[Iterator]]"],o=GetMethod(e,"return");if(o===undefined)return t;try{var n=Call(o,e)}catch(c){var a=c}if(t)return t;if(a)throw a;if("object"!==Type(n))throw new TypeError("Iterator's return method returned a non-object.");return t}function IteratorComplete(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return ToBoolean(Get(t,"done"))}function IteratorNext(t){if(arguments.length<2)var e=Call(t["[[NextMethod]]"],t["[[Iterator]]"]);else e=Call(t["[[NextMethod]]"],t["[[Iterator]]"],[arguments[1]]);if("object"!==Type(e))throw new TypeError("bad iterator");return e}function IteratorStep(t){var r=IteratorNext(t);return!0!==IteratorComplete(r)&&r}function IteratorValue(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return Get(t,"value")}function OrdinaryToPrimitive(r,t){if("string"===t)var e=["toString","valueOf"];else e=["valueOf","toString"];for(var i=0;i<e.length;++i){var n=e[i],a=Get(r,n);if(IsCallable(a)){var o=Call(a,r);if("object"!==Type(o))return o}}throw new TypeError("Cannot convert to primitive.")}function SameValue(e,a){return Type(e)===Type(a)&&("number"===Type(e)?!(!isNaN(e)||!isNaN(a))||(0!==e||0!==a||1/e==1/a)&&e===a:SameValueNonNumber(e,a))}function SameValueZero(n,e){return Type(n)===Type(e)&&("number"===Type(n)?!(!isNaN(n)||!isNaN(e))||(1/n===Infinity&&1/e==-Infinity||(1/n==-Infinity&&1/e===Infinity||n===e)):SameValueNonNumber(n,e))}function SpeciesConstructor(e,o){var r=Get(e,"constructor");if(r===undefined)return o;if("object"!==Type(r))throw new TypeError("O.constructor is not an Object");var n="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.species?r[self.Symbol.species]:undefined;if(n===undefined||null===n)return o;if(IsConstructor(n))return n;throw new TypeError("No constructor found")}function ToInteger(n){if("symbol"===Type(n))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(n);return isNaN(t)?0:1/t===Infinity||1/t==-Infinity||t===Infinity||t===-Infinity?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function ToLength(n){var t=ToInteger(n);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}function ToPrimitive(e){var t=arguments.length>1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}function ToPropertyKey(r){var i=ToPrimitive(r,String);return"symbol"===Type(i)?i:ToString(i)}if (!("Date"in self&&"now"in self.Date&&"getTime"in self.Date.prototype
5
- )) {Date.now=function e(){return(new Date).getTime()};}if (!("devicePixelRatio"in self
6
- )) {self.devicePixelRatio=1;}if (!("MutationObserver"in self
6
+ (function(self, undefined) {if (!("Date"in self&&"now"in self.Date&&"getTime"in self.Date.prototype
7
+ )) {Date.now=function e(){return(new Date).getTime()};}if (!("MutationObserver"in self
7
8
  )) {window.MutationObserver||(window.MutationObserver=function(t){"use strict";function e(t){this._watched=[],this._listener=t}function a(t){!function a(){var r=t.takeRecords();r.length&&t._listener(r,t),t._timeout=setTimeout(a,e._period)}()}function r(e){var a={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(var r in e)g(a,r)&&e[r]!==t&&(a[r]=e[r]);return a}function n(t,e){var a=s(t,e);return function(n){var i,u=n.length;e.charData&&3===t.nodeType&&t.nodeValue!==a.charData&&n.push(new r({type:"characterData",target:t,oldValue:a.charData})),e.attr&&a.attr&&o(n,t,a.attr,e.afilter),(e.kids||e.descendents)&&(i=l(n,t,a,e)),(i||n.length!==u)&&(a=s(t,e))}}function i(t,e){return e.value}function u(t,e){return"style"!==e.name?e.value:t.style.cssText}function o(t,e,a,n){for(var i,u,o={},l=e.attributes,s=l.length;s--;)i=l[s],u=i.name,n&&!g(n,u)||(m(e,i)!==a[u]&&t.push(r({type:"attributes",target:e,attributeName:u,oldValue:a[u],attributeNamespace:i.namespaceURI})),o[u]=!0);for(u in a)o[u]||t.push(r({target:e,type:"attributes",attributeName:u,oldValue:a[u]}))}function l(e,a,n,i){function u(t,a,n,u,s){for(var d,c,h,f=t.length-1,p=-~((f-s)/2);h=t.pop();)d=n[h.i],c=u[h.j],i.kids&&p&&Math.abs(h.i-h.j)>=f&&(e.push(r({type:"childList",target:a,addedNodes:[d],removedNodes:[d],nextSibling:d.nextSibling,previousSibling:d.previousSibling})),p--),i.attr&&c.attr&&o(e,d,c.attr,i.afilter),i.charData&&3===d.nodeType&&d.nodeValue!==c.charData&&e.push(r({type:"characterData",target:d,oldValue:c.charData})),i.descendents&&l(d,c)}function l(a,n){for(var h,f,g,v,b,m,y,D=a.childNodes,N=n.kids,V=D.length,_=N?N.length:0,k=0,S=0,w=0;S<V||w<_;)m=D[S],b=N[w],y=b&&b.node,m===y?(i.attr&&b.attr&&o(e,m,b.attr,i.afilter),i.charData&&b.charData!==t&&m.nodeValue!==b.charData&&e.push(r({type:"characterData",target:m,oldValue:b.charData})),f&&u(f,a,D,N,k),i.descendents&&(m.childNodes.length||b.kids&&b.kids.length)&&l(m,b),S++,w++):(s=!0,h||(h={},f=[]),m&&(h[g=c(m)]||(h[g]=!0,-1===(v=d(N,m,w))?i.kids&&(e.push(r({type:"childList",target:a,addedNodes:[m],nextSibling:m.nextSibling,previousSibling:m.previousSibling})),k++):f.push({i:S,j:v})),S++),y&&y!==D[S]&&(h[g=c(y)]||(h[g]=!0,-1===(v=p(D,y,S))?i.kids&&(e.push(r({type:"childList",target:n.node,removedNodes:[y],nextSibling:N[w+1],previousSibling:N[w-1]})),k--):f.push({i:v,j:w})),w++));f&&u(f,a,D,N,k)}var s;return l(a,n),s}function s(t,e){var a=!0;return function r(t){var n={node:t};return!e.charData||3!==t.nodeType&&8!==t.nodeType?(e.attr&&a&&1===t.nodeType&&(n.attr=f(t.attributes,function(a,r){return e.afilter&&!e.afilter[r.name]||(a[r.name]=m(t,r)),a},{})),a&&(e.kids||e.charData||e.attr&&e.descendents)&&(n.kids=h(t.childNodes,r)),a=e.descendents):n.charData=t.nodeValue,n}(t)}function d(t,e,a){return p(t,e,a,v("node"))}function c(t){try{return t.id||(t[D]=t[D]||y++)}catch(e){try{return t.nodeValue}catch(a){return y++}}}function h(t,e){for(var a=[],r=0;r<t.length;r++)a[r]=e(t[r],r,t);return a}function f(t,e,a){for(var r=0;r<t.length;r++)a=e(a,t[r],r,t);return a}function p(t,e,a,r){for(;a<t.length;a++)if((r?t[a][r]:t[a])===e)return a;return-1}function g(e,a){return e[a]!==t}function v(t){return t}e._period=30,e.prototype={observe:function(t,e){for(var r={attr:!!(e.attributes||e.attributeFilter||e.attributeOldValue),kids:!!e.childList,descendents:!!e.subtree,charData:!(!e.characterData&&!e.characterDataOldValue)},i=this._watched,u=0;u<i.length;u++)i[u].tar===t&&i.splice(u,1);e.attributeFilter&&(r.afilter=f(e.attributeFilter,function(t,e){return t[e]=!0,t},{})),i.push({tar:t,fn:n(t,r)}),this._timeout||a(this)},takeRecords:function(){for(var t=[],e=this._watched,a=0;a<e.length;a++)e[a].fn(t);return t},disconnect:function(){this._watched=[],clearTimeout(this._timeout),this._timeout=null}};var b=document.createElement("i");b.style.top=0,b="null"!=b.attributes.style.value;var m=b?i:u,y=1,D="mo_id";return e}(void 0));}if (!("defineProperty"in Object&&function(){try{var e={}
8
9
  return Object.defineProperty(e,"test",{value:42}),!0}catch(t){return!1}}()
9
- )) {!function(e){var t=Object.prototype.hasOwnProperty.call(Object.prototype,"__defineGetter__"),r="A property cannot both have accessors and be writable or have a value";Object.defineProperty=function n(o,i,f){if(e&&(o===window||o===document||o===Element.prototype||o instanceof Element))return e(o,i,f);if(null===o||!(o instanceof Object||"object"==typeof o))throw new TypeError("Object.defineProperty called on non-object");if(!(f instanceof Object))throw new TypeError("Property description must be an object");var c=String(i),a="value"in f||"writable"in f,p="get"in f&&typeof f.get,s="set"in f&&typeof f.set;if(p){if(p===undefined)return o;if("function"!==p)throw new TypeError("Getter must be a function");if(!t)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(a)throw new TypeError(r);Object.__defineGetter__.call(o,c,f.get)}else o[c]=f.value;if(s){if(s===undefined)return o;if("function"!==s)throw new TypeError("Setter must be a function");if(!t)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(a)throw new TypeError(r);Object.__defineSetter__.call(o,c,f.set)}return"value"in f&&(o[c]=f.value),o}}(Object.defineProperty);}function CreateDataProperty(e,r,t){var a={value:t,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(e,r,a),!0}catch(n){return!1}}function CreateDataPropertyOrThrow(t,r,o){var e=CreateDataProperty(t,r,o);if(!e)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(o)+"` to property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`");return e}function FlattenIntoArray(r,t,e,a,n){for(var o=arguments[5],i=arguments[6],l=a,g=0;g<e;){var h=ToString(g);if(!0===HasProperty(t,h)){var y=Get(t,h);5 in arguments&&(y=Call(o,i,[y,g,t]));var f=!1;if(n>0&&(f=IsArray(y)),!0===f){l=FlattenIntoArray(r,y,ToLength(Get(y,"length")),l,n-1)}else{if(l>=Math.pow(2,53)-1)throw new TypeError("targetIndex is greater than or equal to 2^53-1");CreateDataPropertyOrThrow(r,ToString(l),y),l+=1}}g+=1}return l}function CreateIterResultObject(e,r){if("boolean"!==Type(r))throw new Error;var t={};return CreateDataProperty(t,"value",e),CreateDataProperty(t,"done",r),t}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}if (!("isArray"in Array
10
- )) {CreateMethodProperty(Array,"isArray",function r(e){return IsArray(e)});}if (!("find"in Array.prototype
10
+ )) {!function(e){var t=Object.prototype.hasOwnProperty.call(Object.prototype,"__defineGetter__"),r="A property cannot both have accessors and be writable or have a value";Object.defineProperty=function n(o,i,f){if(e&&(o===window||o===document||o===Element.prototype||o instanceof Element))return e(o,i,f);if(null===o||!(o instanceof Object||"object"==typeof o))throw new TypeError("Object.defineProperty called on non-object");if(!(f instanceof Object))throw new TypeError("Property description must be an object");var c=String(i),a="value"in f||"writable"in f,p="get"in f&&typeof f.get,s="set"in f&&typeof f.set;if(p){if(p===undefined)return o;if("function"!==p)throw new TypeError("Getter must be a function");if(!t)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(a)throw new TypeError(r);Object.__defineGetter__.call(o,c,f.get)}else o[c]=f.value;if(s){if(s===undefined)return o;if("function"!==s)throw new TypeError("Setter must be a function");if(!t)throw new TypeError("Getters & setters cannot be defined on this javascript engine");if(a)throw new TypeError(r);Object.__defineSetter__.call(o,c,f.set)}return"value"in f&&(o[c]=f.value),o}}(Object.defineProperty);}function ArrayCreate(r){if(1/r==-Infinity&&(r=0),r>Math.pow(2,32)-1)throw new RangeError("Invalid array length");var n=[];return n.length=r,n}function Call(t,l){var n=arguments.length>2?arguments[2]:[];if(!1===IsCallable(t))throw new TypeError(Object.prototype.toString.call(t)+"is not a function.");return t.apply(l,n)}function CreateDataProperty(e,r,t){var a={value:t,writable:!0,enumerable:!0,configurable:!0};try{return Object.defineProperty(e,r,a),!0}catch(n){return!1}}function CreateDataPropertyOrThrow(t,r,o){var e=CreateDataProperty(t,r,o);if(!e)throw new TypeError("Cannot assign value `"+Object.prototype.toString.call(o)+"` to property `"+Object.prototype.toString.call(r)+"` on object `"+Object.prototype.toString.call(t)+"`");return e}function CreateMethodProperty(e,r,t){var a={value:t,writable:!0,enumerable:!1,configurable:!0};Object.defineProperty(e,r,a)}if (!("freeze"in Object
11
+ )) {CreateMethodProperty(Object,"freeze",function e(r){return r});}if (!("getPrototypeOf"in Object
12
+ )) {CreateMethodProperty(Object,"getPrototypeOf",function t(o){if(o!==Object(o))throw new TypeError("Object.getPrototypeOf called on non-object");var e=o.__proto__;return e||null===e?e:"function"==typeof o.constructor&&o instanceof o.constructor?o.constructor.prototype:o instanceof Object?Object.prototype:null});}if (!("keys"in Object&&function(){return 2===Object.keys(arguments).length}(1,2)&&function(){try{return Object.keys(""),!0}catch(t){return!1}}()
13
+ )) {CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h<o.length;++h)s.push(String(h));if(a&&o.length>0)for(var g=0;g<o.length;++g)s.push(String(g));else for(var w in o)t()&&"__proto__"===w||y&&"prototype"===w||!e.call(o,w)||s.push(String(w));if(c)for(var d=p(o),$=0;$<i.length;++$)d&&"constructor"===i[$]||!e.call(o,i[$])||s.push(i[$]);return s}}());}function Get(n,t){return n[t]}function HasOwnProperty(r,t){return Object.prototype.hasOwnProperty.call(r,t)}function HasProperty(n,r){return r in n}function IsArray(r){return"[object Array]"===Object.prototype.toString.call(r)}if (!("isArray"in Array
14
+ )) {CreateMethodProperty(Array,"isArray",function r(e){return IsArray(e)});}function IsCallable(n){return"function"==typeof n}if (!("bind"in Function.prototype
15
+ )) {CreateMethodProperty(Function.prototype,"bind",function t(n){var r=Array,o=Object,e=r.prototype,l=function g(){},p=e.slice,a=e.concat,i=e.push,c=Math.max,u=this;if(!IsCallable(u))throw new TypeError("Function.prototype.bind called on incompatible "+u);for(var y,h=p.call(arguments,1),s=function(){if(this instanceof y){var t=u.apply(this,a.call(h,p.call(arguments)));return o(t)===t?t:this}return u.apply(n,a.call(h,p.call(arguments)))},f=c(0,u.length-h.length),b=[],d=0;d<f;d++)i.call(b,"$"+d);return y=Function("binder","return function ("+b.join(",")+"){ return binder.apply(this, arguments); }")(s),u.prototype&&(l.prototype=u.prototype,y.prototype=new l,l.prototype=null),y});}function RequireObjectCoercible(e){if(null===e||e===undefined)throw TypeError(Object.prototype.toString.call(e)+" is not coercible to Object.");return e}function SameValueNonNumber(e,n){return e===n}function ToBoolean(o){return Boolean(o)}function ToObject(e){if(null===e||e===undefined)throw TypeError();return Object(e)}function GetV(t,e){return ToObject(t)[e]}function GetMethod(e,n){var r=GetV(e,n);if(null===r||r===undefined)return undefined;if(!1===IsCallable(r))throw new TypeError("Method not callable: "+n);return r}function Type(e){switch(typeof e){case"undefined":return"undefined";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";default:return null===e?"null":"Symbol"in self&&(e instanceof self.Symbol||e.constructor===self.Symbol)?"symbol":"object"}}if (!("isNaN"in Number
16
+ )) {!function(){var e=self;CreateMethodProperty(Number,"isNaN",function r(n){return"number"===Type(n)&&!!e.isNaN(n)})}();}if (!("isExtensible"in Object
17
+ )) {!function(e){CreateMethodProperty(Object,"isExtensible",function t(n){return"object"===Type(n)&&(!e||e(n))})}(Object.isExtensible);}function CreateIterResultObject(e,r){if("boolean"!==Type(r))throw new Error;var t={};return CreateDataProperty(t,"value",e),CreateDataProperty(t,"done",r),t}function GetPrototypeFromConstructor(t,o){var r=Get(t,"prototype");return"object"!==Type(r)&&(r=o),r}function IsConstructor(t){return"object"===Type(t)&&("function"==typeof t&&!!t.prototype)}function IsRegExp(e){if("object"!==Type(e))return!1;var n="Symbol"in self&&"match"in self.Symbol?Get(e,self.Symbol.match):undefined;if(n!==undefined)return ToBoolean(n);try{var t=e.lastIndex;return e.lastIndex=0,RegExp.prototype.exec.call(e),!0}catch(l){}finally{e.lastIndex=t}return!1}function IteratorClose(r,t){if("object"!==Type(r["[[Iterator]]"]))throw new Error(Object.prototype.toString.call(r["[[Iterator]]"])+"is not an Object.");var e=r["[[Iterator]]"],o=GetMethod(e,"return");if(o===undefined)return t;try{var n=Call(o,e)}catch(c){var a=c}if(t)return t;if(a)throw a;if("object"!==Type(n))throw new TypeError("Iterator's return method returned a non-object.");return t}function IteratorComplete(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return ToBoolean(Get(t,"done"))}function IteratorNext(t){if(arguments.length<2)var e=Call(t["[[NextMethod]]"],t["[[Iterator]]"]);else e=Call(t["[[NextMethod]]"],t["[[Iterator]]"],[arguments[1]]);if("object"!==Type(e))throw new TypeError("bad iterator");return e}function IteratorStep(t){var r=IteratorNext(t);return!0!==IteratorComplete(r)&&r}function IteratorValue(t){if("object"!==Type(t))throw new Error(Object.prototype.toString.call(t)+"is not an Object.");return Get(t,"value")}function OrdinaryToPrimitive(r,t){if("string"===t)var e=["toString","valueOf"];else e=["valueOf","toString"];for(var i=0;i<e.length;++i){var n=e[i],a=Get(r,n);if(IsCallable(a)){var o=Call(a,r);if("object"!==Type(o))return o}}throw new TypeError("Cannot convert to primitive.")}function SameValue(e,a){return Type(e)===Type(a)&&("number"===Type(e)?!(!isNaN(e)||!isNaN(a))||(0!==e||0!==a||1/e==1/a)&&e===a:SameValueNonNumber(e,a))}function SameValueZero(n,e){return Type(n)===Type(e)&&("number"===Type(n)?!(!isNaN(n)||!isNaN(e))||(1/n===Infinity&&1/e==-Infinity||(1/n==-Infinity&&1/e===Infinity||n===e)):SameValueNonNumber(n,e))}function SpeciesConstructor(e,o){var r=Get(e,"constructor");if(r===undefined)return o;if("object"!==Type(r))throw new TypeError("O.constructor is not an Object");var n="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.species?r[self.Symbol.species]:undefined;if(n===undefined||null===n)return o;if(IsConstructor(n))return n;throw new TypeError("No constructor found")}function ToInteger(n){if("symbol"===Type(n))throw new TypeError("Cannot convert a Symbol value to a number");var t=Number(n);return isNaN(t)?0:1/t===Infinity||1/t==-Infinity||t===Infinity||t===-Infinity?t:(t<0?-1:1)*Math.floor(Math.abs(t))}function ToLength(n){var t=ToInteger(n);return t<=0?0:Math.min(t,Math.pow(2,53)-1)}function ToPrimitive(e){var t=arguments.length>1?arguments[1]:undefined;if("object"===Type(e)){if(arguments.length<2)var i="default";else t===String?i="string":t===Number&&(i="number");var r="function"==typeof self.Symbol&&"symbol"==typeof self.Symbol.toPrimitive?GetMethod(e,self.Symbol.toPrimitive):undefined;if(r!==undefined){var n=Call(r,e,[i]);if("object"!==Type(n))return n;throw new TypeError("Cannot convert exotic object to primitive.")}return"default"===i&&(i="number"),OrdinaryToPrimitive(e,i)}return e}function ToString(t){switch(Type(t)){case"symbol":throw new TypeError("Cannot convert a Symbol value to a string");case"object":return ToString(ToPrimitive(t,String));default:return String(t)}}if (!("find"in Array.prototype
11
18
  )) {CreateMethodProperty(Array.prototype,"find",function e(r){var t=ToObject(this),n=ToLength(Get(t,"length"));if(!1===IsCallable(r))throw new TypeError(r+" is not a function");for(var o=arguments.length>1?arguments[1]:undefined,a=0;a<n;){var i=ToString(a),f=Get(t,i);if(ToBoolean(Call(r,o,[f,a,t])))return f;a+=1}return undefined});}if (!("findIndex"in Array.prototype
12
19
  )) {CreateMethodProperty(Array.prototype,"findIndex",function e(r){var t=ToObject(this),n=ToLength(Get(t,"length"));if(!1===IsCallable(r))throw new TypeError(r+" is not a function");for(var o=arguments.length>1?arguments[1]:undefined,a=0;a<n;){var i=ToString(a),l=Get(t,i);if(ToBoolean(Call(r,o,[l,a,t])))return a;a+=1}return-1});}if (!("forEach"in Array.prototype
13
20
  )) {CreateMethodProperty(Array.prototype,"forEach",function r(t){var e=ToObject(this),n=e instanceof String?e.split(""):e,o=ToLength(Get(e,"length"));if(!1===IsCallable(t))throw new TypeError(t+" is not a function");for(var a=arguments.length>1?arguments[1]:undefined,i=0;i<o;){var f=ToString(i);if(HasProperty(n,f)){var l=Get(n,f);Call(t,a,[l,i,e])}i+=1}return undefined});}if (!("includes"in Array.prototype
14
21
  )) {CreateMethodProperty(Array.prototype,"includes",function e(r){"use strict";var t=ToObject(this),o=ToLength(Get(t,"length"));if(0===o)return!1;var n=ToInteger(arguments[1]);if(n>=0)var a=n;else(a=o+n)<0&&(a=0);for(;a<o;){var i=Get(t,ToString(a));if(SameValueZero(r,i))return!0;a+=1}return!1});}if (!("indexOf"in Array.prototype
15
- )) {CreateMethodProperty(Array.prototype,"indexOf",function r(t){var e=ToObject(this),n=ToLength(Get(e,"length"));if(0===n)return-1;var i=ToInteger(arguments[1]);if(i>=n)return-1;if(i>=0)var o=1/i==-Infinity?0:i;else(o=n+i)<0&&(o=0);for(;o<n;){if(HasProperty(e,ToString(o))){if(t===Get(e,ToString(o)))return o}o+=1}return-1});}if (!("bind"in Function.prototype
16
- )) {CreateMethodProperty(Function.prototype,"bind",function t(n){var r=Array,o=Object,e=r.prototype,l=function g(){},p=e.slice,a=e.concat,i=e.push,c=Math.max,u=this;if(!IsCallable(u))throw new TypeError("Function.prototype.bind called on incompatible "+u);for(var y,h=p.call(arguments,1),s=function(){if(this instanceof y){var t=u.apply(this,a.call(h,p.call(arguments)));return o(t)===t?t:this}return u.apply(n,a.call(h,p.call(arguments)))},f=c(0,u.length-h.length),b=[],d=0;d<f;d++)i.call(b,"$"+d);return y=Function("binder","return function ("+b.join(",")+"){ return binder.apply(this, arguments); }")(s),u.prototype&&(l.prototype=u.prototype,y.prototype=new l,l.prototype=null),y});}if (!("isNaN"in Number
17
- )) {!function(){var e=self;CreateMethodProperty(Number,"isNaN",function r(n){return"number"===Type(n)&&!!e.isNaN(n)})}();}if (!("freeze"in Object
18
- )) {CreateMethodProperty(Object,"freeze",function e(r){return r});}if (!("getOwnPropertyDescriptor"in Object&&"function"==typeof Object.getOwnPropertyDescriptor&&function(){try{return"3"===Object.getOwnPropertyDescriptor("13.7",1).value}catch(t){return!1}}()
19
- )) {!function(){var e=Object.getOwnPropertyDescriptor,t=function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(e){return!1}},r={}.toString,n="".split;CreateMethodProperty(Object,"getOwnPropertyDescriptor",function c(o,i){var a=ToObject(o);a=("string"===Type(a)||a instanceof String)&&"[object String]"==r.call(o)?n.call(o,""):Object(o);var u=ToPropertyKey(i);if(t)try{return e(a,u)}catch(l){}if(HasOwnProperty(a,u))return{enumerable:!0,configurable:!0,writable:!0,value:a[u]}})}();}if (!("getPrototypeOf"in Object
20
- )) {CreateMethodProperty(Object,"getPrototypeOf",function t(o){if(o!==Object(o))throw new TypeError("Object.getPrototypeOf called on non-object");var e=o.__proto__;return e||null===e?e:"function"==typeof o.constructor&&o instanceof o.constructor?o.constructor.prototype:o instanceof Object?Object.prototype:null});}if (!("isExtensible"in Object
21
- )) {!function(e){CreateMethodProperty(Object,"isExtensible",function t(n){return"object"===Type(n)&&(!e||e(n))})}(Object.isExtensible);}if (!("keys"in Object&&function(){return 2===Object.keys(arguments).length}(1,2)&&function(){try{return Object.keys(""),!0}catch(t){return!1}}()
22
- )) {CreateMethodProperty(Object,"keys",function(){"use strict";function t(){var t;try{t=Object.create({})}catch(r){return!0}return o.call(t,"__proto__")}function r(t){var r=n.call(t),e="[object Arguments]"===r;return e||(e="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),e}var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.prototype.propertyIsEnumerable,c=!o.call({toString:null},"toString"),l=o.call(function(){},"prototype"),i=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var r=t.constructor;return r&&r.prototype===t},a={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&e.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{u(window[t])}catch(r){return!0}}catch(r){return!0}return!1}(),p=function(t){if("undefined"==typeof window||!f)return u(t);try{return u(t)}catch(r){return!1}};return function s(o){var u="[object Function]"===n.call(o),a=r(o),f="[object String]"===n.call(o),s=[];if(o===undefined||null===o)throw new TypeError("Cannot convert undefined or null to object");var y=l&&u;if(f&&o.length>0&&!e.call(o,0))for(var h=0;h<o.length;++h)s.push(String(h));if(a&&o.length>0)for(var g=0;g<o.length;++g)s.push(String(g));else for(var w in o)t()&&"__proto__"===w||y&&"prototype"===w||!e.call(o,w)||s.push(String(w));if(c)for(var d=p(o),$=0;$<i.length;++$)d&&"constructor"===i[$]||!e.call(o,i[$])||s.push(i[$]);return s}}());}if (!("assign"in Object
22
+ )) {CreateMethodProperty(Array.prototype,"indexOf",function r(t){var e=ToObject(this),n=ToLength(Get(e,"length"));if(0===n)return-1;var i=ToInteger(arguments[1]);if(i>=n)return-1;if(i>=0)var o=1/i==-Infinity?0:i;else(o=n+i)<0&&(o=0);for(;o<n;){if(HasProperty(e,ToString(o))){if(t===Get(e,ToString(o)))return o}o+=1}return-1});}if (!("getOwnPropertyNames"in Object&&function(){try{return Object.getOwnPropertyNames(1),!0}catch(t){return!1}}()
23
+ )) {!function(){var t={}.toString,e="".split,r=[].concat,o=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames||Object.keys,n="object"==typeof self?c(self):[];CreateMethodProperty(Object,"getOwnPropertyNames",function l(a){var p=ToObject(a);if("[object Window]"===t.call(p))try{return c(p)}catch(j){return r.call([],n)}p="[object String]"==t.call(p)?e.call(p,""):Object(p);for(var i=c(p),s=["length","prototype"],O=0;O<s.length;O++){var b=s[O];o.call(p,b)&&!i.includes(b)&&i.push(b)}if(i.includes("__proto__")){var f=i.indexOf("__proto__");i.splice(f,1)}return i})}();}if (!("includes"in String.prototype
24
+ )) {CreateMethodProperty(String.prototype,"includes",function e(t){"use strict";var r=arguments.length>1?arguments[1]:undefined,n=RequireObjectCoercible(this),i=ToString(n);if(IsRegExp(t))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=ToString(t),g=ToInteger(r),a=i.length,p=Math.min(Math.max(g,0),a);return-1!==String.prototype.indexOf.call(i,o,p)});}if (!("startsWith"in String.prototype
25
+ )) {CreateMethodProperty(String.prototype,"startsWith",function t(e){"use strict";var r=arguments.length>1?arguments[1]:undefined,n=RequireObjectCoercible(this),i=ToString(n);if(IsRegExp(e))throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var o=ToString(e),s=ToInteger(r),a=i.length,g=Math.min(Math.max(s,0),a);return!(o.length+g>a)&&0===i.substr(g).indexOf(e)});}function FlattenIntoArray(r,t,e,a,n){for(var o=arguments[5],i=arguments[6],l=a,g=0;g<e;){var h=ToString(g);if(!0===HasProperty(t,h)){var y=Get(t,h);5 in arguments&&(y=Call(o,i,[y,g,t]));var f=!1;if(n>0&&(f=IsArray(y)),!0===f){l=FlattenIntoArray(r,y,ToLength(Get(y,"length")),l,n-1)}else{if(l>=Math.pow(2,53)-1)throw new TypeError("targetIndex is greater than or equal to 2^53-1");CreateDataPropertyOrThrow(r,ToString(l),y),l+=1}}g+=1}return l}function ToPropertyKey(r){var i=ToPrimitive(r,String);return"symbol"===Type(i)?i:ToString(i)}if (!("getOwnPropertyDescriptor"in Object&&"function"==typeof Object.getOwnPropertyDescriptor&&function(){try{return"3"===Object.getOwnPropertyDescriptor("13.7",1).value}catch(t){return!1}}()
26
+ )) {!function(){var e=Object.getOwnPropertyDescriptor,t=function(){try{return 1===Object.defineProperty(document.createElement("div"),"one",{get:function(){return 1}}).one}catch(e){return!1}},r={}.toString,n="".split;CreateMethodProperty(Object,"getOwnPropertyDescriptor",function c(o,i){var a=ToObject(o);a=("string"===Type(a)||a instanceof String)&&"[object String]"==r.call(o)?n.call(o,""):Object(o);var u=ToPropertyKey(i);if(t)try{return e(a,u)}catch(l){}if(HasOwnProperty(a,u))return{enumerable:!0,configurable:!0,writable:!0,value:a[u]}})}();}if (!("assign"in Object
23
27
  )) {CreateMethodProperty(Object,"assign",function e(t,r){var n=ToObject(t);if(1===arguments.length)return n;var o,c,a,l,i=Array.prototype.slice.call(arguments,1);for(o=0;o<i.length;o++){var p=i[o];for(p===undefined||null===p?a=[]:(l="[object String]"===Object.prototype.toString.call(p)?String(p).split(""):ToObject(p),a=Object.keys(l)),c=0;c<a.length;c++){var b,y=a[c];try{var g=Object.getOwnPropertyDescriptor(l,y);b=g!==undefined&&!0===g.enumerable}catch(u){b=Object.prototype.propertyIsEnumerable.call(l,y)}if(b){var j=Get(l,y);n[y]=j}}}return n});}if (!("defineProperties"in Object
24
28
  )) {CreateMethodProperty(Object,"defineProperties",function e(r,t){if("object"!==Type(r))throw new TypeError("Object.defineProperties called on non-object");for(var o=ToObject(t),n=Object.keys(o),c=[],i=0;i<n.length;i++){var b=n[i],f=Object.getOwnPropertyDescriptor(o,b);if(f!==undefined&&f.enumerable){var p=Get(o,b),a=p;c.push([b,a])}}for(var j=0;j<c.length;j++){var d=c[j][0];a=c[j][1],Object.defineProperty(r,d,a)}return r});}if (!("create"in Object
25
29
  )) {!function(){function e(){}if({__proto__:null}instanceof Object)t=function(){var e=document.createElement("iframe");e.style.display="none";var o=document.body||document.documentElement;o.appendChild(e),e.src="javascript:";var n=e.contentWindow.Object.prototype;o.removeChild(e),e=null,delete n.constructor,delete n.hasOwnProperty,delete n.propertyIsEnumerable,delete n.isPrototypeOf,delete n.toLocaleString,delete n.toString,delete n.valueOf;var r=function l(){};return r.prototype=n,t=function(){return new r},new r};else var t=function(){return{__proto__:null}};CreateMethodProperty(Object,"create",function o(n,r){if("object"!==Type(n)&&"null"!==Type(n))throw new TypeError("Object prototype may only be an Object or null");if("null"===Type(n))var l=t();else e.prototype=n,l=new e,l.__proto__=n,l.constructor.prototype=n,l.__proto__=n;return 1 in arguments?Object.defineProperties(l,r):l})}();}function OrdinaryCreateFromConstructor(r,e){var t=arguments[2]||{},o=GetPrototypeFromConstructor(r,e),a=Object.create(o);for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Object.defineProperty(a,n,{configurable:!0,enumerable:!1,writable:!0,value:t[n]});return a}function Construct(r){var t=arguments.length>2?arguments[2]:r,o=arguments.length>1?arguments[1]:[];if(!IsConstructor(r))throw new TypeError("F must be a constructor.");if(!IsConstructor(t))throw new TypeError("newTarget must be a constructor.");if(t===r)return new(Function.prototype.bind.apply(r,[null].concat(o)));var n=OrdinaryCreateFromConstructor(t,Object.prototype);return Call(r,n,o)}function ArraySpeciesCreate(e,r){if(0===r&&1/r==-Infinity&&(r=0),!1===IsArray(e))return ArrayCreate(r);var n=Get(e,"constructor");if("object"===Type(n)&&null===(n="Symbol"in self&&"species"in self.Symbol?Get(n,self.Symbol.species):undefined)&&(n=undefined),n===undefined)return ArrayCreate(r);if(!IsConstructor(n))throw new TypeError("C must be a constructor");return Construct(n,[r])}if (!("filter"in Array.prototype
26
- )) {CreateMethodProperty(Array.prototype,"filter",function r(e){var t=ToObject(this),o=ToLength(Get(t,"length"));if(!1===IsCallable(e))throw new TypeError(e+" is not a function");for(var a=arguments.length>1?arguments[1]:undefined,n=ArraySpeciesCreate(t,0),i=0,l=0;i<o;){var f=ToString(i);if(HasProperty(t,f)){var h=Get(t,f);ToBoolean(Call(e,a,[h,i,t]))&&(CreateDataPropertyOrThrow(n,ToString(l),h),l+=1)}i+=1}return n});}if (!("flatMap"in Array.prototype
30
+ )) {CreateMethodProperty(Array.prototype,"filter",function r(e){var t=ToObject(this),o=ToLength(Get(t,"length"));if(!1===IsCallable(e))throw new TypeError(e+" is not a function");for(var a=arguments.length>1?arguments[1]:undefined,n=ArraySpeciesCreate(t,0),i=0,l=0;i<o;){var f=ToString(i);if(HasProperty(t,f)){var h=Get(t,f);ToBoolean(Call(e,a,[h,i,t]))&&(CreateDataPropertyOrThrow(n,ToString(l),h),l+=1)}i+=1}return n});}if (!("flat"in Array.prototype
31
+ )) {CreateMethodProperty(Array.prototype,"flat",function t(){"use strict";var t=arguments[0],e=ToObject(this),r=ToLength(Get(e,"length")),o=1;void 0!==t&&(o=ToInteger(t));var a=ArraySpeciesCreate(e,0);return FlattenIntoArray(a,e,r,0,o),a});}if (!("flatMap"in Array.prototype
27
32
  )) {CreateMethodProperty(Array.prototype,"flatMap",function e(r){"use strict";var t=ToObject(this),a=ToLength(Get(t,"length"));if(!1===IsCallable(r))throw new TypeError("mapperFunction is not callable.");var n;n=1 in arguments?arguments[1]:undefined;var o=ArraySpeciesCreate(t,0);return FlattenIntoArray(o,t,a,0,1,r,n),o});}if (!("map"in Array.prototype
28
- )) {CreateMethodProperty(Array.prototype,"map",function r(e){var t=ToObject(this),a=ToLength(Get(t,"length"));if(!1===IsCallable(e))throw new TypeError(e+" is not a function");for(var o=arguments.length>1?arguments[1]:undefined,n=ArraySpeciesCreate(t,a),i=0;i<a;){var p=ToString(i);if(HasProperty(t,p)){var h=Get(t,p),l=Call(e,o,[h,i,t]);CreateDataPropertyOrThrow(n,p,l)}i+=1}return n});}if (!("getOwnPropertyNames"in Object&&function(){try{return Object.getOwnPropertyNames(1),!0}catch(t){return!1}}()
29
- )) {!function(){var t={}.toString,e="".split,r=[].concat,o=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames||Object.keys,n="object"==typeof self?c(self):[];CreateMethodProperty(Object,"getOwnPropertyNames",function l(a){var p=ToObject(a);if("[object Window]"===t.call(p))try{return c(p)}catch(j){return r.call([],n)}p="[object String]"==t.call(p)?e.call(p,""):Object(p);for(var i=c(p),s=["length","prototype"],O=0;O<s.length;O++){var b=s[O];o.call(p,b)&&!i.includes(b)&&i.push(b)}if(i.includes("__proto__")){var f=i.indexOf("__proto__");i.splice(f,1)}return i})}();}if (!("values"in Object
30
- )) {!function(){var t={}.toString,e="".split;CreateMethodProperty(Object,"values",function r(n){var c="[object String]"==t.call(n)?e.call(n,""):ToObject(n);return Object.keys(c).map(function(t){return c[t]})})}();}if (!("requestAnimationFrame"in self
31
- )) {!function(n){var e,t=Date.now(),o=function(){return n.performance&&"function"==typeof n.performance.now?n.performance.now():Date.now()-t};if("mozRequestAnimationFrame"in n?e="moz":"webkitRequestAnimationFrame"in n&&(e="webkit"),e)n.requestAnimationFrame=function(t){return n[e+"RequestAnimationFrame"](function(){t(o())})},n.cancelAnimationFrame=n[e+"CancelAnimationFrame"];else{var i=Date.now();n.requestAnimationFrame=function(n){if("function"!=typeof n)throw new TypeError(n+" is not a function");var e=Date.now(),t=16+i-e;return t<0&&(t=0),i=e,setTimeout(function(){i=Date.now(),n(o())},t)},n.cancelAnimationFrame=function(n){clearTimeout(n)}}}(self);}if (!("includes"in String.prototype
32
- )) {CreateMethodProperty(String.prototype,"includes",function e(t){"use strict";var r=arguments.length>1?arguments[1]:undefined,n=RequireObjectCoercible(this),i=ToString(n);if(IsRegExp(t))throw new TypeError("First argument to String.prototype.includes must not be a regular expression");var o=ToString(t),g=ToInteger(r),a=i.length,p=Math.min(Math.max(g,0),a);return-1!==String.prototype.indexOf.call(i,o,p)});}if (!("startsWith"in String.prototype
33
- )) {CreateMethodProperty(String.prototype,"startsWith",function t(e){"use strict";var r=arguments.length>1?arguments[1]:undefined,n=RequireObjectCoercible(this),i=ToString(n);if(IsRegExp(e))throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var o=ToString(e),s=ToInteger(r),a=i.length,g=Math.min(Math.max(s,0),a);return!(o.length+g>a)&&0===i.substr(g).indexOf(e)});}if (!("Symbol"in self
33
+ )) {CreateMethodProperty(Array.prototype,"map",function r(e){var t=ToObject(this),a=ToLength(Get(t,"length"));if(!1===IsCallable(e))throw new TypeError(e+" is not a function");for(var o=arguments.length>1?arguments[1]:undefined,n=ArraySpeciesCreate(t,a),i=0;i<a;){var p=ToString(i);if(HasProperty(t,p)){var h=Get(t,p),l=Call(e,o,[h,i,t]);CreateDataPropertyOrThrow(n,p,l)}i+=1}return n});}if (!("values"in Object
34
+ )) {!function(){var t={}.toString,e="".split;CreateMethodProperty(Object,"values",function r(n){var c="[object String]"==t.call(n)?e.call(n,""):ToObject(n);return Object.keys(c).map(function(t){return c[t]})})}();}if (!("Symbol"in self
34
35
  )) {!function(e,r,n){"use strict";function t(e){if("symbol"===Type(e))return e;throw TypeError(e+" is not a symbol")}var u,o=function(){try{var r={};return e.defineProperty(r,"t",{configurable:!0,enumerable:!1,get:function(){return!0},set:undefined}),!!r.t}catch(n){return!1}}(),i=0,a=""+Math.random(),c="__symbol:",l=c.length,f="__symbol@@"+a,s={},v="defineProperty",y="defineProperties",b="getOwnPropertyNames",p="getOwnPropertyDescriptor",h="propertyIsEnumerable",m=e.prototype,d=m.hasOwnProperty,g=m[h],w=m.toString,S=Array.prototype.concat,P=e.getOwnPropertyNames?e.getOwnPropertyNames(self):[],O=e[b],j=function $(e){if("[object Window]"===w.call(e))try{return O(e)}catch(r){return S.call([],P)}return O(e)},E=e[p],N=e.create,T=e.keys,_=e.freeze||e,k=e[v],F=e[y],I=E(e,b),x=function(e,r,n){if(!d.call(e,f))try{k(e,f,{enumerable:!1,configurable:!1,writable:!1,value:{}})}catch(t){e[f]={}}e[f]["@@"+r]=n},z=function(e,r){var n=N(e);return j(r).forEach(function(e){q.call(r,e)&&L(n,e,r[e])}),n},A=function(e){var r=N(e);return r.enumerable=!1,r},D=function ee(){},M=function(e){return e!=f&&!d.call(H,e)},W=function(e){return e!=f&&d.call(H,e)},q=function re(e){var r=""+e;return W(r)?d.call(this,r)&&this[f]&&this[f]["@@"+r]:g.call(this,e)},B=function(r){var n={enumerable:!1,configurable:!0,get:D,set:function(e){u(this,r,{enumerable:!1,configurable:!0,writable:!0,value:e}),x(this,r,!0)}};try{k(m,r,n)}catch(o){m[r]=n.value}H[r]=k(e(r),"constructor",J);var t=E(G.prototype,"description");return t&&k(H[r],"description",t),_(H[r])},C=function(e){var r=t(e);if(Y){var n=V(r);if(""!==n)return n.slice(1,-1)}if(s[r]!==undefined)return s[r];var u=r.toString(),o=u.lastIndexOf("0.");return u=u.slice(10,o),""===u?undefined:u},G=function ne(){var r=arguments[0];if(this instanceof ne)throw new TypeError("Symbol is not a constructor");var n=c.concat(r||"",a,++i);r===undefined||null!==r&&!isNaN(r)&&""!==String(r)||(s[n]=String(r));var t=B(n);return o||e.defineProperty(t,"description",{configurable:!0,enumerable:!1,value:C(t)}),t},H=N(null),J={value:G},K=function(e){return H[e]},L=function te(e,r,n){var t=""+r;return W(t)?(u(e,t,n.enumerable?A(n):n),x(e,t,!!n.enumerable)):k(e,r,n),e},Q=function(e){return function(r){return d.call(e,f)&&d.call(e[f],"@@"+r)}},R=function ue(e){return j(e).filter(e===m?Q(e):W).map(K)};I.value=L,k(e,v,I),I.value=R,k(e,"getOwnPropertySymbols",I),I.value=function oe(e){return j(e).filter(M)},k(e,b,I),I.value=function ie(e,r){var n=R(r);return n.length?T(r).concat(n).forEach(function(n){q.call(r,n)&&L(e,n,r[n])}):F(e,r),e},k(e,y,I),I.value=q,k(m,h,I),I.value=G,k(n,"Symbol",I),I.value=function(e){var r=c.concat(c,e,a);return r in m?H[r]:B(r)},k(G,"for",I),I.value=function(e){if(M(e))throw new TypeError(e+" is not a symbol");return d.call(H,e)?e.slice(2*l,-a.length):void 0},k(G,"keyFor",I),I.value=function ae(e,r){var n=E(e,r);return n&&W(r)&&(n.enumerable=q.call(e,r)),n},k(e,p,I),I.value=function ce(e,r){return 1===arguments.length||void 0===r?N(e):z(e,r)},k(e,"create",I);var U=null===function(){return this}.call(null);if(I.value=U?function(){var e=w.call(this);return"[object String]"===e&&W(this)?"[object Symbol]":e}:function(){if(this===window)return"[object Null]";var e=w.call(this);return"[object String]"===e&&W(this)?"[object Symbol]":e},k(m,"toString",I),u=function(e,r,n){var t=E(m,r);delete m[r],k(e,r,n),e!==m&&k(m,r,t)},function(){try{var r={};return e.defineProperty(r,"t",{configurable:!0,enumerable:!1,get:function(){return!0},set:undefined}),!!r.t}catch(n){return!1}}()){var V;try{V=Function("s","var v = s.valueOf(); return { [v]() {} }[v].name;")}catch(Z){}var X=function(){},Y=V&&"inferred"===X.name?V:null;e.defineProperty(n.Symbol.prototype,"description",{configurable:!0,enumerable:!1,get:function(){return C(this)}})}}(Object,0,self);}if (!("Symbol"in self&&"iterator"in self.Symbol
35
36
  )) {Object.defineProperty(self.Symbol,"iterator",{value:self.Symbol("iterator")});}function GetIterator(t){var e=arguments.length>1?arguments[1]:GetMethod(t,Symbol.iterator),r=Call(e,t);if("object"!==Type(r))throw new TypeError("bad iterator");var o=GetV(r,"next"),a=Object.create(null);return a["[[Iterator]]"]=r,a["[[NextMethod]]"]=o,a["[[Done]]"]=!1,a}if (!("Symbol"in self&&"species"in self.Symbol
36
37
  )) {Object.defineProperty(Symbol,"species",{value:Symbol("species")});}if (!("Map"in self&&function(t){try{var n=new t.Map([[1,1],[2,2]])
@@ -43,5 +44,7 @@ return 2===e.size&&"Symbol"in self&&"iterator"in self.Symbol&&"function"==typeof
43
44
  )) {!function(){"use strict";function n(){return tn[q][B]||D}function t(n){return n&&"object"==typeof n}function e(n){return"function"==typeof n}function r(n,t){return n instanceof t}function o(n){return r(n,A)}function i(n,t,e){if(!t(n))throw a(e)}function u(){try{return b.apply(R,arguments)}catch(n){return Y.e=n,Y}}function c(n,t){return b=n,R=t,u}function f(n,t){function e(){for(var e=0;e<o;)t(r[e],r[e+1]),r[e++]=T,r[e++]=T;o=0,r.length>n&&(r.length=n)}var r=L(n),o=0;return function(n,t){r[o++]=n,r[o++]=t,2===o&&tn.nextTick(e)}}function s(n,t){var o,i,u,f,s=0;if(!n)throw a(N);var l=n[tn[q][z]];if(e(l))i=l.call(n);else{if(!e(n.next)){if(r(n,L)){for(o=n.length;s<o;)t(n[s],s++);return s}throw a(N)}i=n}for(;!(u=i.next()).done;)if((f=c(t)(u.value,s++))===Y)throw e(i[G])&&i[G](),f.e;return s}function a(n){return new TypeError(n)}function l(n){return(n?"":Q)+(new A).stack}function h(n,t){var e="on"+n.toLowerCase(),r=F[e];E&&E.listeners(n).length?n===X?E.emit(n,t._v,t):E.emit(n,t):r?r({reason:t._v,promise:t}):tn[n](t._v,t)}function v(n){return n&&n._s}function _(n){if(v(n))return new n(Z);var t,r,o;return t=new n(function(n,e){if(t)throw a();r=n,o=e}),i(r,e),i(o,e),t}function d(n,t){var e=!1;return function(r){e||(e=!0,I&&(n[M]=l(!0)),t===U?g(n,r):y(n,t,r))}}function p(n,t,r,o){return e(r)&&(t._onFulfilled=r),e(o)&&(n[J]&&h(W,n),t._onRejected=o),I&&(t._p=n),n[n._c++]=t,n._s!==$&&rn(n,t),t}function m(n){if(n._umark)return!0;n._umark=!0;for(var t,e=0,r=n._c;e<r;)if(t=n[e++],t._onRejected||m(t))return!0}function w(n,t){function e(n){return r.push(n.replace(/^\s+|\s+$/g,""))}var r=[];return I&&(t[M]&&e(t[M]),function o(n){n&&K in n&&(o(n._next),e(n[K]+""),o(n._p))}(t)),(n&&n.stack?n.stack:n)+("\n"+r.join("\n")).replace(nn,"")}function j(n,t){return n(t)}function y(n,t,e){var r=0,i=n._c;if(n._s===$)for(n._s=t,n._v=e,t===O&&(I&&o(e)&&(e.longStack=w(e,n)),on(n));r<i;)rn(n,n[r++]);return n}function g(n,r){if(r===n&&r)return y(n,O,a(V)),n;if(r!==S&&(e(r)||t(r))){var o=c(k)(r);if(o===Y)return y(n,O,o.e),n;e(o)?(I&&v(r)&&(n._next=r),v(r)?x(n,r,o):tn.nextTick(function(){x(n,r,o)})):y(n,U,r)}else y(n,U,r);return n}function k(n){return n.then}function x(n,t,e){var r=c(e,t)(function(e){t&&(t=S,g(n,e))},function(e){t&&(t=S,y(n,O,e))});r===Y&&t&&(y(n,O,r.e),t=S)}var T,b,R,S=null,C="object"==typeof self,F=self,P=F.Promise,E=F.process,H=F.console,I=!0,L=Array,A=Error,O=1,U=2,$=3,q="Symbol",z="iterator",B="species",D=q+"("+B+")",G="return",J="_uh",K="_pt",M="_st",N="Invalid argument",Q="\nFrom previous ",V="Chaining cycle detected for promise",W="rejectionHandled",X="unhandledRejection",Y={e:S},Z=function(){},nn=/^.+\/node_modules\/yaku\/.+\n?/gm,tn=function(n){var r,o=this;if(!t(o)||o._s!==T)throw a("Invalid this");if(o._s=$,I&&(o[K]=l()),n!==Z){if(!e(n))throw a(N);r=c(n)(d(o,U),d(o,O)),r===Y&&y(o,O,r.e)}};tn["default"]=tn,function en(n,t){for(var e in t)n[e]=t[e]}(tn.prototype,{then:function(n,t){if(this._s===undefined)throw a();return p(this,_(tn.speciesConstructor(this,tn)),n,t)},"catch":function(n){return this.then(T,n)},"finally":function(n){return this.then(function(t){return tn.resolve(n()).then(function(){return t})},function(t){return tn.resolve(n()).then(function(){throw t})})},_c:0,_p:S}),tn.resolve=function(n){return v(n)?n:g(_(this),n)},tn.reject=function(n){return y(_(this),O,n)},tn.race=function(n){var t=this,e=_(t),r=function(n){y(e,U,n)},o=function(n){y(e,O,n)},i=c(s)(n,function(n){t.resolve(n).then(r,o)});return i===Y?t.reject(i.e):e},tn.all=function(n){function t(n){y(o,O,n)}var e,r=this,o=_(r),i=[];return(e=c(s)(n,function(n,u){r.resolve(n).then(function(n){i[u]=n,--e||y(o,U,i)},t)}))===Y?r.reject(e.e):(e||y(o,U,[]),o)},tn.Symbol=F[q]||{},c(function(){Object.defineProperty(tn,n(),{get:function(){return this}})})(),tn.speciesConstructor=function(t,e){var r=t.constructor;return r?r[n()]||e:e},tn.unhandledRejection=function(n,t){H&&H.error("Uncaught (in promise)",I?t.longStack:w(n,t))},tn.rejectionHandled=Z,tn.enableLongStackTrace=function(){I=!0},tn.nextTick=C?function(n){P?new P(function(n){n()}).then(n):setTimeout(n)}:E.nextTick,tn._s=1;var rn=f(999,function(n,t){var e,r;return(r=n._s!==O?t._onFulfilled:t._onRejected)===T?void y(t,n._s,n._v):(e=c(j)(r,n._v))===Y?void y(t,O,e.e):void g(t,e)}),on=f(9,function(n){m(n)||(n[J]=1,h(X,n))});F.Promise=tn}();}if (!("Promise"in self&&"finally"in self.Promise.prototype
44
45
  )) {!function(){var t=Function.prototype.bind.call(Function.prototype.call,Promise.prototype.then),o=function(t,o){return new t(function(t){t(o())})};CreateMethodProperty(Promise.prototype,"finally",function(e){var r=this;if("object"!==Type(r))throw new TypeError("Method %PromisePrototype%.finally called on incompatible receiver "+Object.prototype.toString.call(r));var n=SpeciesConstructor(r,Promise);if(!1===IsCallable(e))var i=e,c=e;else i=function(r){return t(o(n,e),function(){return r})},c=function(r){return t(o(n,e),function(){throw r})};return t(r,i,c)})}();}if (!((function(){try{if("WeakMap"in self&&0===self.WeakMap.length){var e={},t=new self.WeakMap([[e,"test"]])
45
46
  return"test"===t.get(e)&&!1===t["delete"](0)}return!1}catch(a){return!1}})()
46
- )) {!function(e){var t=Symbol("undef"),r=function a(){if(!(this instanceof a))throw new TypeError('Constructor WeakMap requires "new"');var e=OrdinaryCreateFromConstructor(this,a.prototype,{_keys:[],_values:[],_es6WeakMap:!0}),t=arguments.length>0?arguments[0]:undefined;if(null===t||t===undefined)return e;var r=Get(e,"set");if(!IsCallable(r))throw new TypeError("WeakMap.prototype.set is not a function");try{for(var o=GetIterator(t);;){var p=IteratorStep(o);if(!1===p)return e;var n=IteratorValue(p);if("object"!==Type(n))try{throw new TypeError("Iterator value "+n+" is not an entry object")}catch(s){return IteratorClose(o,s)}try{var i=Get(n,"0"),l=Get(n,"1");Call(r,e,[i,l])}catch(u){return IteratorClose(o,u)}}}catch(u){if(Array.isArray(t)||"[object Arguments]"===Object.prototype.toString.call(t)||t.callee){var y,c=t.length;for(y=0;y<c;y++)i=t[y][0],l=t[y][1],Call(r,e,[i,l])}}return e};Object.defineProperty(r,"prototype",{configurable:!1,enumerable:!1,writable:!1,value:{}}),CreateMethodProperty(r.prototype,"constructor",r),CreateMethodProperty(r.prototype,"delete",function(e){var r=this;if("object"!==Type(r))throw new TypeError("Method WeakMap.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6WeakMap)throw new TypeError("Method WeakMap.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(r));var o=r._keys;if("object"!==Type(e))return!1;for(var a=0;a<o.length;a++)if(r._keys[a]!==t&&SameValue(r._keys[a],e))return this._keys[a]=t,this._values[a]=t,this._size=--this._size,!0;return!1}),CreateMethodProperty(r.prototype,"get",function p(e){var r=this;if("object"!==Type(r))throw new TypeError("Method WeakMap.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6WeakMap)throw new TypeError("Method WeakMap.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));var o=r._keys;if("object"!==Type(e))return undefined;for(var a=0;a<o.length;a++)if(r._keys[a]!==t&&SameValue(r._keys[a],e))return r._values[a];return undefined}),CreateMethodProperty(r.prototype,"has",function n(e){var r=this;if("object"!=typeof r)throw new TypeError("Method WeakMap.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6WeakMap)throw new TypeError("Method WeakMap.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));var o=r._keys;if("object"!==Type(e))return!1;for(var a=0;a<o.length;a++)if(r._keys[a]!==t&&SameValue(r._keys[a],e))return!0;return!1}),CreateMethodProperty(r.prototype,"set",function i(e,r){var o=this;if("object"!==Type(o))throw new TypeError("Method WeakMap.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));if(!0!==o._es6WeakMap)throw new TypeError("Method WeakMap.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));var a=o._keys;if("object"!==Type(e))throw new TypeError("Invalid value used as weak map key");for(var p=0;p<a.length;p++)if(o._keys[p]!==t&&SameValue(o._keys[p],e))return o._values[p]=r,o;var n={"[[Key]]":e,"[[Value]]":r};return o._keys.push(n["[[Key]]"]),o._values.push(n["[[Value]]"]),o}),Object.defineProperty(r.prototype,Symbol.toStringTag,{configurable:!0,enumerable:!1,writable:!1,value:"WeakMap"}),"name"in r||Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,writable:!1,value:"WeakMap"});try{CreateMethodProperty(e,"WeakMap",r)}catch(o){e.WeakMap=r}}(self);}})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
47
+ )) {!function(e){var t=Symbol("undef"),r=function a(){if(!(this instanceof a))throw new TypeError('Constructor WeakMap requires "new"');var e=OrdinaryCreateFromConstructor(this,a.prototype,{_keys:[],_values:[],_es6WeakMap:!0}),t=arguments.length>0?arguments[0]:undefined;if(null===t||t===undefined)return e;var r=Get(e,"set");if(!IsCallable(r))throw new TypeError("WeakMap.prototype.set is not a function");try{for(var o=GetIterator(t);;){var p=IteratorStep(o);if(!1===p)return e;var n=IteratorValue(p);if("object"!==Type(n))try{throw new TypeError("Iterator value "+n+" is not an entry object")}catch(s){return IteratorClose(o,s)}try{var i=Get(n,"0"),l=Get(n,"1");Call(r,e,[i,l])}catch(u){return IteratorClose(o,u)}}}catch(u){if(Array.isArray(t)||"[object Arguments]"===Object.prototype.toString.call(t)||t.callee){var y,c=t.length;for(y=0;y<c;y++)i=t[y][0],l=t[y][1],Call(r,e,[i,l])}}return e};Object.defineProperty(r,"prototype",{configurable:!1,enumerable:!1,writable:!1,value:{}}),CreateMethodProperty(r.prototype,"constructor",r),CreateMethodProperty(r.prototype,"delete",function(e){var r=this;if("object"!==Type(r))throw new TypeError("Method WeakMap.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6WeakMap)throw new TypeError("Method WeakMap.prototype.clear called on incompatible receiver "+Object.prototype.toString.call(r));var o=r._keys;if("object"!==Type(e))return!1;for(var a=0;a<o.length;a++)if(r._keys[a]!==t&&SameValue(r._keys[a],e))return this._keys[a]=t,this._values[a]=t,this._size=--this._size,!0;return!1}),CreateMethodProperty(r.prototype,"get",function p(e){var r=this;if("object"!==Type(r))throw new TypeError("Method WeakMap.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6WeakMap)throw new TypeError("Method WeakMap.prototype.get called on incompatible receiver "+Object.prototype.toString.call(r));var o=r._keys;if("object"!==Type(e))return undefined;for(var a=0;a<o.length;a++)if(r._keys[a]!==t&&SameValue(r._keys[a],e))return r._values[a];return undefined}),CreateMethodProperty(r.prototype,"has",function n(e){var r=this;if("object"!=typeof r)throw new TypeError("Method WeakMap.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));if(!0!==r._es6WeakMap)throw new TypeError("Method WeakMap.prototype.has called on incompatible receiver "+Object.prototype.toString.call(r));var o=r._keys;if("object"!==Type(e))return!1;for(var a=0;a<o.length;a++)if(r._keys[a]!==t&&SameValue(r._keys[a],e))return!0;return!1}),CreateMethodProperty(r.prototype,"set",function i(e,r){var o=this;if("object"!==Type(o))throw new TypeError("Method WeakMap.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));if(!0!==o._es6WeakMap)throw new TypeError("Method WeakMap.prototype.set called on incompatible receiver "+Object.prototype.toString.call(o));var a=o._keys;if("object"!==Type(e))throw new TypeError("Invalid value used as weak map key");for(var p=0;p<a.length;p++)if(o._keys[p]!==t&&SameValue(o._keys[p],e))return o._values[p]=r,o;var n={"[[Key]]":e,"[[Value]]":r};return o._keys.push(n["[[Key]]"]),o._values.push(n["[[Value]]"]),o}),Object.defineProperty(r.prototype,Symbol.toStringTag,{configurable:!0,enumerable:!1,writable:!1,value:"WeakMap"}),"name"in r||Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,writable:!1,value:"WeakMap"});try{CreateMethodProperty(e,"WeakMap",r)}catch(o){e.WeakMap=r}}(self);}if (!("devicePixelRatio"in self
48
+ )) {self.devicePixelRatio=1;}if (!("requestAnimationFrame"in self
49
+ )) {!function(n){var e,t=Date.now(),o=function(){return n.performance&&"function"==typeof n.performance.now?n.performance.now():Date.now()-t};if("mozRequestAnimationFrame"in n?e="moz":"webkitRequestAnimationFrame"in n&&(e="webkit"),e)n.requestAnimationFrame=function(t){return n[e+"RequestAnimationFrame"](function(){t(o())})},n.cancelAnimationFrame=n[e+"CancelAnimationFrame"];else{var i=Date.now();n.requestAnimationFrame=function(n){if("function"!=typeof n)throw new TypeError(n+" is not a function");var e=Date.now(),t=16+i-e;return t<0&&(t=0),i=e,setTimeout(function(){i=Date.now(),n(o())},t)},n.cancelAnimationFrame=function(n){clearTimeout(n)}}}(self);}})('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
47
50
  "ResizeObserver"in window||function(){"use strict";var e,t=[],n="ResizeObserver loop completed with undelivered notifications.";!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(e||(e={}));var r,i=function(e){return Object.freeze(e)},o=function(){return function(e,t){this.inlineSize=e,this.blockSize=t,i(this)}}(),s=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,i(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),a=function(e){return e instanceof SVGElement&&"getBBox"in e},c=function(e){if(a(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||e.getClientRects().length)},u=function(e){var t,n,r=null===(n=null===(t=e)||void 0===t?void 0:t.ownerDocument)||void 0===n?void 0:n.defaultView;return!!(r&&e instanceof r.Element)},h="undefined"!=typeof window?window:{},d=new WeakMap,f=/auto|scroll/,v=/^tb|vertical/,l=/msie|trident/i.test(h.navigator&&h.navigator.userAgent),p=function(e){return parseFloat(e||"0")},g=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new o((n?t:e)||0,(n?e:t)||0)},b=i({devicePixelContentBoxSize:g(),borderBoxSize:g(),contentBoxSize:g(),contentRect:new s(0,0,0,0)}),w=function(e,t){if(void 0===t&&(t=!1),d.has(e)&&!t)return d.get(e);if(c(e))return d.set(e,b),b;var n=getComputedStyle(e),r=a(e)&&e.ownerSVGElement&&e.getBBox(),o=!l&&"border-box"===n.boxSizing,u=v.test(n.writingMode||""),h=!r&&f.test(n.overflowY||""),w=!r&&f.test(n.overflowX||""),E=r?0:p(n.paddingTop),x=r?0:p(n.paddingRight),T=r?0:p(n.paddingBottom),z=r?0:p(n.paddingLeft),m=r?0:p(n.borderTopWidth),y=r?0:p(n.borderRightWidth),S=r?0:p(n.borderBottomWidth),B=z+x,O=E+T,R=(r?0:p(n.borderLeftWidth))+y,C=m+S,k=w?e.offsetHeight-C-e.clientHeight:0,N=h?e.offsetWidth-R-e.clientWidth:0,D=o?B+R:0,M=o?O+C:0,P=r?r.width:p(n.width)-D-N,_=r?r.height:p(n.height)-M-k,F=P+B+N+R,I=_+O+k+C,L=i({devicePixelContentBoxSize:g(Math.round(P*devicePixelRatio),Math.round(_*devicePixelRatio),u),borderBoxSize:g(F,I,u),contentBoxSize:g(P,_,u),contentRect:new s(z,E,P,_)});return d.set(e,L),L},E=function(t,n,r){var i=w(t,r),o=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(n){case e.DEVICE_PIXEL_CONTENT_BOX:return a;case e.BORDER_BOX:return o;default:return s}},x=function(){return function(e){var t=w(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=i([t.borderBoxSize]),this.contentBoxSize=i([t.contentBoxSize]),this.devicePixelContentBoxSize=i([t.devicePixelContentBoxSize])}}(),T=function(e){if(c(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},z=function(){var e=1/0,n=[];t.forEach(function(t){if(0!==t.activeTargets.length){var r=[];t.activeTargets.forEach(function(t){var n=new x(t.target),i=T(t.target);r.push(n),t.lastReportedSize=E(t.target,t.observedBox),i<e&&(e=i)}),n.push(function(){t.callback.call(t.observer,r,t.observer)}),t.activeTargets.splice(0,t.activeTargets.length)}});for(var r=0,i=n;r<i.length;r++){(0,i[r])()}return e},m=function(e){t.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(T(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},y=function(){var e,r=0;for(m(r);t.some(function(e){return e.activeTargets.length>0});)r=z(),m(r);return t.some(function(e){return e.skippedTargets.length>0})&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:n}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=n),window.dispatchEvent(e)),r>0},S=[],B=function(e){if(!r){var t=0,n=document.createTextNode("");new MutationObserver(function(){return S.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),r=function(){n.textContent=""+(t?t--:t++)}}S.push(e),r()},O=0,R={attributes:!0,characterData:!0,childList:!0,subtree:!0},C=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],k=function(e){return void 0===e&&(e=0),Date.now()+e},N=!1,D=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!N){N=!0;var n,r=k(e);n=function(){var n=!1;try{n=y()}finally{if(N=!1,e=r-k(),!O)return;n?t.run(1e3):e>0?t.run(e):t.start()}},B(function(){requestAnimationFrame(n)})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,R)};document.body?t():h.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),C.forEach(function(t){return h.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),C.forEach(function(t){return h.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},e}()),M=function(e){!O&&e>0&&D.start(),!(O+=e)&&D.stop()},P=function(){function t(t,n){this.target=t,this.observedBox=n||e.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e,t=E(this.target,this.observedBox,!0);return e=this.target,a(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},t}(),_=function(){return function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}}(),F=new WeakMap,I=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},L=function(){function e(){}return e.connect=function(e,t){var n=new _(e,t);F.set(e,n)},e.observe=function(e,n,r){var i=F.get(e),o=0===i.observationTargets.length;I(i.observationTargets,n)<0&&(o&&t.push(i),i.observationTargets.push(new P(n,r&&r.box)),M(1),D.schedule())},e.unobserve=function(e,n){var r=F.get(e),i=I(r.observationTargets,n),o=1===r.observationTargets.length;i>=0&&(o&&t.splice(t.indexOf(r),1),r.observationTargets.splice(i,1),M(-1))},e.disconnect=function(e){var t=this,n=F.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),W=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");L.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!u(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");L.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!u(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");L.unobserve(this,e)},e.prototype.disconnect=function(){L.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();window.ResizeObserver=W,window.ResizeObserverEntry=x,window.ResizeObserverSize=o}();
package/cl.adobe.js CHANGED
@@ -1,3 +1,3 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var BQ=function(a){a.f=new _.br;a.f.on(a.m,_.Jf,()=>zQ(a));a.f.on(a.m,_.If,()=>{s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.fe,()=>AQ(a));a.f.on(a.m,_.qf,b=>{b=b.detail;switch(b.currentState){case _.nn:a.a.length||AQ(a);s.Media.play(a.a,a.m.getPosition());break;case _.mn:case _.en:zQ(a);break;case _.bn:case _.kn:case _.jn:a.h.info(`Close session for ${a.a} `+`in player state ${b.currentState}.`),zQ(a),s.Media.close(a.a),a.a=""}})},zQ=function(a){s.Media.stop(a.a,a.m.getPosition())},
2
- AQ=function(a){{const b=a.m.getLoadedSource();a.a=b?b.name||b.url:""}a.h.info(`Open session for ${a.a} `+`with duration ${a.m.getDuration()}`);s.Media.open(a.a,a.m.getDuration(),_.pa)},CQ=class extends _.ft{constructor(){super();this.m=this.f=null;this.a="";this.h=new _.R("clpp.adobe.AdobePlugin")}onPlayerCreated(a){window.s&&s.Media?(this.m=a,BQ(this)):this.h.warn("Adobe API not available.")}onPlayerWillDestroy(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""}id(){return"adobe"}};
3
- _.z("clpp.adobe.AdobeAnalyticsPlugin",CQ);CQ.Id="adobe";_.oo(new class{create(){return new CQ}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var NQ=function(a){a.f=new _.ir;a.f.on(a.m,_.Lf,()=>LQ(a));a.f.on(a.m,_.Kf,()=>{s.Media.play(a.a,a.m.getPosition())});a.f.on(a.m,_.he,()=>MQ(a));a.f.on(a.m,_.sf,b=>{b=b.detail;switch(b.currentState){case _.rn:a.a.length||MQ(a);s.Media.play(a.a,a.m.getPosition());break;case _.qn:case _.jn:LQ(a);break;case _.fn:case _.on:case _.nn:a.g.info(`Close session for ${a.a} `+`in player state ${b.currentState}.`),LQ(a),s.Media.close(a.a),a.a=""}})},LQ=function(a){s.Media.stop(a.a,a.m.getPosition())},
2
+ MQ=function(a){{const b=a.m.getLoadedSource();a.a=b?b.name||b.url:""}a.g.info(`Open session for ${a.a} `+`with duration ${a.m.getDuration()}`);s.Media.open(a.a,a.m.getDuration(),_.pa)},OQ=class extends _.kt{constructor(){super();this.m=this.f=null;this.a="";this.g=new _.R("clpp.adobe.AdobePlugin")}onPlayerCreated(a){window.s&&s.Media?(this.m=a,NQ(this)):this.g.warn("Adobe API not available.")}onPlayerWillDestroy(){this.f&&(this.f.release(),this.f=null);this.m=null;this.a=""}id(){return"adobe"}};
3
+ _.z("clpp.adobe.AdobeAnalyticsPlugin",OQ);OQ.Id="adobe";_.so(new class{create(){return new OQ}});};f.call(g, window);
package/cl.airplay.js CHANGED
@@ -1,3 +1,3 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var yQ=class extends _.ft{constructor(){super();this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Lr(()=>{this.m.play().catch(()=>{})});this.g=new _.br}onPlayerCreated(a){this.m=a;this.a=a.getSurface().getMedia()}onContentWillLoad(){this.a&&(this.g.on(this.a,"webkitplaybacktargetavailabilitychanged",this.w.bind(this)),this.g.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.A.bind(this)))}onPlayerWillRelease(){this.o.stop();this.g.release()}id(){return"airplay"}w(a){switch(a.availability){case "available":this.f=
2
- !0;break;case "not-available":this.f=!1}this.m.trigger(new _.F(_.qc,{canCast:this.f}))}A(){const a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.pc:_.oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.nn)this.l?this.m.play().catch(()=>{}):this.o.ca(.01);this.m.trigger(new _.F(a))}kb(){return this.j}Jd(){return this.f}Xg(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())}};_.z("clpp.airplay.AirPlayPlugin",yQ);yQ.prototype.showCastMenu=yQ.prototype.Xg;
3
- yQ.prototype.canCast=yQ.prototype.Jd;yQ.prototype.isCasting=yQ.prototype.kb;yQ.Id="airplay";_.oo(new class{create(){return new yQ}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var KQ=class extends _.kt{constructor(){super();this.a=this.m=null;this.l=this.f=this.j=!1;this.o=new _.Sr(()=>{this.m.play().catch(()=>{})});this.h=new _.ir}onPlayerCreated(a){this.m=a;this.a=a.getSurface().getMedia()}onContentWillLoad(){this.a&&(this.h.on(this.a,"webkitplaybacktargetavailabilitychanged",this.w.bind(this)),this.h.on(this.a,"webkitcurrentplaybacktargetiswirelesschanged",this.A.bind(this)))}onPlayerWillRelease(){this.o.stop();this.h.release()}id(){return"airplay"}w(a){switch(a.availability){case "available":this.f=
2
+ !0;break;case "not-available":this.f=!1}this.m.trigger(new _.F(_.qc,{canCast:this.f}))}A(){const a=(this.j=this.a.webkitCurrentPlaybackTargetIsWireless)?_.pc:_.oc;if(this.l||!this.m.isPaused()||this.m.getState()===_.rn)this.l?this.m.play().catch(()=>{}):this.o.ca(.01);this.m.trigger(new _.F(a))}mb(){return this.j}Kd(){return this.f}Zg(){this.f&&(this.l=!this.m.isPaused(),this.a.webkitShowPlaybackTargetPicker())}};_.z("clpp.airplay.AirPlayPlugin",KQ);KQ.prototype.showCastMenu=KQ.prototype.Zg;
3
+ KQ.prototype.canCast=KQ.prototype.Kd;KQ.prototype.isCasting=KQ.prototype.mb;KQ.Id="airplay";_.so(new class{create(){return new KQ}});};f.call(g, window);
package/cl.broadpeak.js CHANGED
@@ -1,5 +1,5 @@
1
- import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var rQ=function(){return!window.SmartLib||!window.GenericPlayerApi},sQ=function(a,b){const c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"";b=b.uuid||null;a.g||(a.g=SmartLib.getInstance(),a.g.init(c,d,e),typeof b===_.tf&&a.g.setUUID(b))},uQ=function(a,b){b=b.customParameters||{};a.a=a.g.createStreamingSession();for(const c in b)a.a.setCustomParameter(c,b[c]);a.l.on(a.m,_.Md,a.U.bind(a));a.j=tQ(a.m);a.a.attachPlayer(a.j)},vQ=function(a,b){_.Sg(a.l);a.f&&(a.f.release(),
2
- a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},wQ=class{constructor(a,b){this.m=a;this.f=b;this.a=new _.br;this.g=!1}init(){const a=this.m,b=this.a;b.on(a,_.qf,this.o.bind(this));b.on(a,_.Jc,this.j.bind(this));b.on(a,"seek",this.l.bind(this))}j(a){a=a.detail;typeof a.bandwidth===_.r&&this.f.notifyLayerSwitch(a.bandwidth/1E3)}o(a){const b=this.m,c=this.f;a=a.detail;const d=a.currentState;a.previousState===_.en&&c.notifyStallEnd(!b.isPaused());switch(d){case _.en:c.notifyStallStart();break;
3
- case _.nn:this.g?c.notifyResume():(c.notifyFirstImage(),this.g=!0);break;case _.mn:c.notifyPause()}}l(){const a=1E3*this.m.getPosition();this.f.notifySeek(a)}release(){this.a&&(_.Sg(this.a),this.a=null)}};var tQ=a=>{class b extends GenericPlayerApi{constructor(c){super();this.m=c;this.a=_.Mj()}getPlayerName(){return _.pa}getVersion(){return _.da}getOSName(){return this.a.os}getDeviceVersion(){return this.a.osVersion.name}getDeviceType(){return"browser"}getTotalDuration(){return this.m.isLive()?0:1E3*this.m.getDuration()}getCurrentPosition(){return 1E3*this.m.getPosition()}getCurrentBitrate(){const c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3}}return new b(a)};var xQ=class extends _.ft{constructor(){super();this.j=this.f=this.a=this.g=this.m=null;this.l=new _.br}onPlayerCreated(a){this.m=a}onContentWillLoad(a,b){const c=a.getConfiguration().broadpeak;if(c){if(rQ())return a.onError(new _.H(1,9,11E3));sQ(this,c);uQ(this,c);return this.a.getURL(b.url).then(d=>{if(d.isError()){const e=d.getDetailedErrorCode();d=d.getDetailedErrorMessage();this.m.onError(new _.H(1,9,11001,{bpkErrorCode:e,message:d}));vQ(this,void 0)}else b.url=d.getURL(),this.f=new wQ(this.m,
4
- this.j),this.f.init()})}}U(a){a=a.detail;if(7003===a.code)vQ(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.G)switch(a.category){case 3:vQ(this,SmartLib.BPDecodingError);break;case 1:vQ(this,SmartLib.BPNetworkingError);break;case 6:vQ(this,SmartLib.BPAccessRightError);break;default:vQ(this,SmartLib.BPUnspecifiedError)}}onPlayerWillRelease(){rQ()||vQ(this,SmartLib.BPSessionEndsNormally)}id(){return"broadpeak"}};_.z("clpp.broadpeak.BroadpeakPlugin",xQ);xQ.isSdkMissing=rQ;xQ.Id="broadpeak";
5
- _.oo(new class{create(){return new xQ}});};f.call(g, window);
1
+ import {clpp} from "./cl.core.js";let g={};const _ = clpp._;var f=function(window){'use strict';var DQ=function(){return!window.SmartLib||!window.GenericPlayerApi},EQ=function(a,b){const c=b.analyticsAddress||null,d=b.nanoCDNHost||null,e=b.broadpeakDomainNames||"";b=b.uuid||null;a.h||(a.h=SmartLib.getInstance(),a.h.init(c,d,e),typeof b===_.vf&&a.h.setUUID(b))},GQ=function(a,b){b=b.customParameters||{};a.a=a.h.createStreamingSession();a.a.setOption(StreamingSessionOptions.SESSION_PRECACHE,!0);for(const c in b)a.a.setCustomParameter(c,b[c]);a.o.on(a.m,_.Nd,a.U.bind(a));a.l=FQ(a.m);
2
+ a.a.attachPlayer(a.l)},HQ=function(a,b){_.Ug(a.o);a.f&&(a.f.release(),a.f=null);a.a&&(a.a.stopStreamingSession(b),a.a=null)},IQ=class{constructor(a,b){this.m=a;this.f=b;this.a=new _.ir;this.h=!1}init(){const a=this.m,b=this.a;b.on(a,_.sf,this.o.bind(this));b.on(a,_.Jc,this.j.bind(this));b.on(a,"seek",this.l.bind(this))}j(a){a=a.detail;typeof a.bandwidth===_.r&&this.f.notifyLayerSwitch(a.bandwidth/1E3)}o(a){const b=this.m,c=this.f;a=a.detail;const d=a.currentState;a.previousState===_.jn&&c.notifyStallEnd(!b.isPaused());
3
+ switch(d){case _.jn:c.notifyStallStart();break;case _.rn:this.h?c.notifyResume():(c.notifyFirstImage(),this.h=!0);break;case _.qn:c.notifyPause()}}l(){const a=1E3*this.m.getPosition();this.f.notifySeek(a)}release(){this.a&&(_.Ug(this.a),this.a=null)}};var FQ=a=>{class b extends GenericPlayerApi{constructor(c){super();this.m=c;this.a=_.Oj()}getPlayerName(){return _.pa}getVersion(){return _.da}getOSName(){return this.a.os}getDeviceVersion(){return this.a.osVersion.name}getDeviceType(){return"browser"}getTotalDuration(){return this.m.isLive()?0:1E3*this.m.getDuration()}getCurrentPosition(){return 1E3*this.m.getPosition()}getCurrentBitrate(){const c=this.m.getStats();return(c?c.streamBandwidth:0)/1E3}}return new b(a)};var JQ=class extends _.kt{constructor(){super();this.l=this.f=this.a=this.h=this.m=null;this.o=new _.ir;this.j=!1}onPlayerCreated(a){this.m=a}onContentWillLoad(a,b){const c=a.getConfiguration().broadpeak;if(c){if(DQ())return a.onError(new _.H(1,9,11E3));this.j=!0;EQ(this,c);GQ(this,c);return this.a.getURL(b.url).then(d=>{if(d.isError()){const e=d.getDetailedErrorCode();d=d.getDetailedErrorMessage();this.m.onError(new _.H(1,9,11001,{bpkErrorCode:e,message:d}));HQ(this,void 0)}else b.url=d.getURL(),
4
+ this.f=new IQ(this.m,this.l),this.f.init()})}}onContentLoaded(){!1!==this.j&&this.a.precacheEnded()}U(a){a=a.detail;if(7003===a.code)HQ(this,SmartLib.BPFormatNotSupportedError);else if(a.severity===_.G)switch(a.category){case 3:HQ(this,SmartLib.BPDecodingError);break;case 1:HQ(this,SmartLib.BPNetworkingError);break;case 6:HQ(this,SmartLib.BPAccessRightError);break;default:HQ(this,SmartLib.BPUnspecifiedError)}}onPlayerWillRelease(){DQ()||HQ(this,SmartLib.BPSessionEndsNormally);this.j=!1}id(){return"broadpeak"}};
5
+ _.z("clpp.broadpeak.BroadpeakPlugin",JQ);JQ.isSdkMissing=DQ;JQ.Id="broadpeak";_.so(new class{create(){return new JQ}});};f.call(g, window);