@streamlayer/react 1.16.0 → 1.17.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.
- package/lib/app/tvos.d.ts +5 -0
- package/lib/cjs/advertisement.js +37 -37
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index3.js +1 -0
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +1 -1
- package/lib/cjs/tvos.js +1 -0
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/app/tvos.d.ts +5 -0
- package/lib/classic/cjs/advertisement.js +37 -37
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index3.js +1 -0
- package/lib/classic/cjs/masters2.js +4 -4
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +1 -1
- package/lib/classic/cjs/tvos.js +1 -0
- package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/es/advertisement.js +2243 -2308
- package/lib/classic/es/index.js +5 -3
- package/lib/classic/es/index2.js +30 -30
- package/lib/classic/es/index3.js +76 -0
- package/lib/classic/es/insight.js +8 -8
- package/lib/classic/es/masters2.js +18 -18
- package/lib/classic/es/notification.js +25 -25
- package/lib/classic/es/points.js +10 -10
- package/lib/classic/es/provider.js +47 -47
- package/lib/classic/es/tvos.js +1352 -0
- package/lib/classic/es/useStreamLayerApp2.js +1157 -1157
- package/lib/classic/index.d.ts +1 -0
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/masters.js +26 -26
- package/lib/dist/es/masters.js +2293 -2293
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +2243 -2308
- package/lib/es/index.js +5 -3
- package/lib/es/index2.js +30 -30
- package/lib/es/index3.js +76 -0
- package/lib/es/insight.js +8 -8
- package/lib/es/masters2.js +18 -18
- package/lib/es/notification.js +25 -25
- package/lib/es/points.js +10 -10
- package/lib/es/provider.js +47 -47
- package/lib/es/tvos.js +1352 -0
- package/lib/es/useStreamLayerApp2.js +1157 -1157
- package/lib/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +24 -14
package/lib/cjs/tvos.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),p=require("react"),c=require("./provider.js"),ge=require("./index3.js"),K=require("./useStreamLayerApp2.js");var W={},be={exports:{}},Me="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Se=Me,Ve=Se;function Ae(){}function Ce(){}Ce.resetWarningCache=Ae;var He=function(){function e(r,n,o,l,a,u){if(u!==Ve){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}e.isRequired=e;function t(){return e}var s={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ce,resetWarningCache:Ae};return s.PropTypes=s,s};be.exports=He();var Ee=be.exports,we={L:1,M:0,Q:3,H:2},Te={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},ze=Te;function xe(e){this.mode=ze.MODE_8BIT_BYTE,this.data=e}xe.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}};var Ue=xe,F=we;function P(e,t){this.totalCount=e,this.dataCount=t}P.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];P.getRSBlocks=function(e,t){var s=P.getRsBlockTable(e,t);if(s==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=s.length/3,n=new Array,o=0;o<r;o++)for(var l=s[o*3+0],a=s[o*3+1],u=s[o*3+2],h=0;h<l;h++)n.push(new P(a,u));return n};P.getRsBlockTable=function(e,t){switch(t){case F.L:return P.RS_BLOCK_TABLE[(e-1)*4+0];case F.M:return P.RS_BLOCK_TABLE[(e-1)*4+1];case F.Q:return P.RS_BLOCK_TABLE[(e-1)*4+2];case F.H:return P.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};var qe=P;function Le(){this.buffer=new Array,this.length=0}Le.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var s=0;s<t;s++)this.putBit((e>>>t-s-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Fe=Le,B={glog:function(e){if(e<1)throw new Error("glog("+e+")");return B.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return B.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var m=0;m<8;m++)B.EXP_TABLE[m]=1<<m;for(var m=8;m<256;m++)B.EXP_TABLE[m]=B.EXP_TABLE[m-4]^B.EXP_TABLE[m-5]^B.EXP_TABLE[m-6]^B.EXP_TABLE[m-8];for(var m=0;m<255;m++)B.LOG_TABLE[B.EXP_TABLE[m]]=m;var Be=B,O=Be;function G(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var s=0;s<e.length&&e[s]==0;)s++;this.num=new Array(e.length-s+t);for(var r=0;r<e.length-s;r++)this.num[r]=e[r+s]}G.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),s=0;s<this.getLength();s++)for(var r=0;r<e.getLength();r++)t[s+r]^=O.gexp(O.glog(this.get(s))+O.glog(e.get(r)));return new G(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=O.glog(this.get(0))-O.glog(e.get(0)),s=new Array(this.getLength()),r=0;r<this.getLength();r++)s[r]=this.get(r);for(var r=0;r<e.getLength();r++)s[r]^=O.gexp(O.glog(e.get(r))+t);return new G(s,0).mod(e)}};var Pe=G,T=Te,ve=Pe,$e=Be,k={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},v={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;v.getBCHDigit(t)-v.getBCHDigit(v.G15)>=0;)t^=v.G15<<v.getBCHDigit(t)-v.getBCHDigit(v.G15);return(e<<10|t)^v.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;v.getBCHDigit(t)-v.getBCHDigit(v.G18)>=0;)t^=v.G18<<v.getBCHDigit(t)-v.getBCHDigit(v.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return v.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,s){switch(e){case k.PATTERN000:return(t+s)%2==0;case k.PATTERN001:return t%2==0;case k.PATTERN010:return s%3==0;case k.PATTERN011:return(t+s)%3==0;case k.PATTERN100:return(Math.floor(t/2)+Math.floor(s/3))%2==0;case k.PATTERN101:return t*s%2+t*s%3==0;case k.PATTERN110:return(t*s%2+t*s%3)%2==0;case k.PATTERN111:return(t*s%3+(t+s)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new ve([1],0),s=0;s<e;s++)t=t.multiply(new ve([1,$e.gexp(s)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case T.MODE_NUMBER:return 10;case T.MODE_ALPHA_NUM:return 9;case T.MODE_8BIT_BYTE:return 8;case T.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case T.MODE_NUMBER:return 12;case T.MODE_ALPHA_NUM:return 11;case T.MODE_8BIT_BYTE:return 16;case T.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case T.MODE_NUMBER:return 14;case T.MODE_ALPHA_NUM:return 13;case T.MODE_8BIT_BYTE:return 16;case T.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),s=0,r=0;r<t;r++)for(var n=0;n<t;n++){for(var o=0,l=e.isDark(r,n),a=-1;a<=1;a++)if(!(r+a<0||t<=r+a))for(var u=-1;u<=1;u++)n+u<0||t<=n+u||a==0&&u==0||l==e.isDark(r+a,n+u)&&o++;o>5&&(s+=3+o-5)}for(var r=0;r<t-1;r++)for(var n=0;n<t-1;n++){var h=0;e.isDark(r,n)&&h++,e.isDark(r+1,n)&&h++,e.isDark(r,n+1)&&h++,e.isDark(r+1,n+1)&&h++,(h==0||h==4)&&(s+=3)}for(var r=0;r<t;r++)for(var n=0;n<t-6;n++)e.isDark(r,n)&&!e.isDark(r,n+1)&&e.isDark(r,n+2)&&e.isDark(r,n+3)&&e.isDark(r,n+4)&&!e.isDark(r,n+5)&&e.isDark(r,n+6)&&(s+=40);for(var n=0;n<t;n++)for(var r=0;r<t-6;r++)e.isDark(r,n)&&!e.isDark(r+1,n)&&e.isDark(r+2,n)&&e.isDark(r+3,n)&&e.isDark(r+4,n)&&!e.isDark(r+5,n)&&e.isDark(r+6,n)&&(s+=40);for(var f=0,n=0;n<t;n++)for(var r=0;r<t;r++)e.isDark(r,n)&&f++;var g=Math.abs(100*f/t/t-50)/5;return s+=g*10,s}},Ge=v,Ke=Ue,_e=qe,je=Fe,D=Ge,We=Pe;function _(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var E=_.prototype;E.addData=function(e){var t=new Ke(e);this.dataList.push(t),this.dataCache=null};E.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]};E.getModuleCount=function(){return this.moduleCount};E.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=_e.getRSBlocks(e,this.errorCorrectLevel),s=new je,r=0,n=0;n<t.length;n++)r+=t[n].dataCount;for(var n=0;n<this.dataList.length;n++){var o=this.dataList[n];s.put(o.mode,4),s.put(o.getLength(),D.getLengthInBits(o.mode,e)),o.write(s)}if(s.getLengthInBits()<=r*8)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())};E.makeImpl=function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var s=0;s<this.moduleCount;s++){this.modules[s]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[s][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=_.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)};E.setupPositionProbePattern=function(e,t){for(var s=-1;s<=7;s++)if(!(e+s<=-1||this.moduleCount<=e+s))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(0<=s&&s<=6&&(r==0||r==6)||0<=r&&r<=6&&(s==0||s==6)||2<=s&&s<=4&&2<=r&&r<=4?this.modules[e+s][t+r]=!0:this.modules[e+s][t+r]=!1)};E.getBestMaskPattern=function(){for(var e=0,t=0,s=0;s<8;s++){this.makeImpl(!0,s);var r=D.getLostPoint(this);(s==0||e>r)&&(e=r,t=s)}return t};E.createMovieClip=function(e,t,s){var r=e.createEmptyMovieClip(t,s),n=1;this.make();for(var o=0;o<this.modules.length;o++)for(var l=o*n,a=0;a<this.modules[o].length;a++){var u=a*n,h=this.modules[o][a];h&&(r.beginFill(0,100),r.moveTo(u,l),r.lineTo(u+n,l),r.lineTo(u+n,l+n),r.lineTo(u,l+n),r.endFill())}return r};E.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)};E.setupPositionAdjustPattern=function(){for(var e=D.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var s=0;s<e.length;s++){var r=e[t],n=e[s];if(this.modules[r][n]==null)for(var o=-2;o<=2;o++)for(var l=-2;l<=2;l++)o==-2||o==2||l==-2||l==2||o==0&&l==0?this.modules[r+o][n+l]=!0:this.modules[r+o][n+l]=!1}};E.setupTypeNumber=function(e){for(var t=D.getBCHTypeNumber(this.typeNumber),s=0;s<18;s++){var r=!e&&(t>>s&1)==1;this.modules[Math.floor(s/3)][s%3+this.moduleCount-8-3]=r}for(var s=0;s<18;s++){var r=!e&&(t>>s&1)==1;this.modules[s%3+this.moduleCount-8-3][Math.floor(s/3)]=r}};E.setupTypeInfo=function(e,t){for(var s=this.errorCorrectLevel<<3|t,r=D.getBCHTypeInfo(s),n=0;n<15;n++){var o=!e&&(r>>n&1)==1;n<6?this.modules[n][8]=o:n<8?this.modules[n+1][8]=o:this.modules[this.moduleCount-15+n][8]=o}for(var n=0;n<15;n++){var o=!e&&(r>>n&1)==1;n<8?this.modules[8][this.moduleCount-n-1]=o:n<9?this.modules[8][15-n-1+1]=o:this.modules[8][15-n-1]=o}this.modules[this.moduleCount-8][8]=!e};E.mapData=function(e,t){for(var s=-1,r=this.moduleCount-1,n=7,o=0,l=this.moduleCount-1;l>0;l-=2)for(l==6&&l--;;){for(var a=0;a<2;a++)if(this.modules[r][l-a]==null){var u=!1;o<e.length&&(u=(e[o]>>>n&1)==1);var h=D.getMask(t,r,l-a);h&&(u=!u),this.modules[r][l-a]=u,n--,n==-1&&(o++,n=7)}if(r+=s,r<0||this.moduleCount<=r){r-=s,s=-s;break}}};_.PAD0=236;_.PAD1=17;_.createData=function(e,t,s){for(var r=_e.getRSBlocks(e,t),n=new je,o=0;o<s.length;o++){var l=s[o];n.put(l.mode,4),n.put(l.getLength(),D.getLengthInBits(l.mode,e)),l.write(n)}for(var a=0,o=0;o<r.length;o++)a+=r[o].dataCount;if(n.getLengthInBits()>a*8)throw new Error("code length overflow. ("+n.getLengthInBits()+">"+a*8+")");for(n.getLengthInBits()+4<=a*8&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=a*8||(n.put(_.PAD0,8),n.getLengthInBits()>=a*8));)n.put(_.PAD1,8);return _.createBytes(n,r)};_.createBytes=function(e,t){for(var s=0,r=0,n=0,o=new Array(t.length),l=new Array(t.length),a=0;a<t.length;a++){var u=t[a].dataCount,h=t[a].totalCount-u;r=Math.max(r,u),n=Math.max(n,h),o[a]=new Array(u);for(var f=0;f<o[a].length;f++)o[a][f]=255&e.buffer[f+s];s+=u;var g=D.getErrorCorrectPolynomial(h),y=new We(o[a],g.getLength()-1),d=y.mod(g);l[a]=new Array(g.getLength()-1);for(var f=0;f<l[a].length;f++){var b=f+d.getLength()-l[a].length;l[a][f]=b>=0?d.get(b):0}}for(var A=0,f=0;f<t.length;f++)A+=t[f].totalCount;for(var C=new Array(A),L=0,f=0;f<r;f++)for(var a=0;a<t.length;a++)f<o[a].length&&(C[L++]=o[a][f]);for(var f=0;f<n;f++)for(var a=0;a<t.length;a++)f<l[a].length&&(C[L++]=l[a][f]);return C};var Qe=_,ie={};Object.defineProperty(ie,"__esModule",{value:!0});var Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},Ye=Ee,x=Re(Ye),Ie=p,$=Re(Ie);function Re(e){return e&&e.__esModule?e:{default:e}}function Ze(e,t){var s={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=e[r]);return s}var Je={bgColor:x.default.oneOfType([x.default.object,x.default.string]).isRequired,bgD:x.default.string.isRequired,fgColor:x.default.oneOfType([x.default.object,x.default.string]).isRequired,fgD:x.default.string.isRequired,size:x.default.number.isRequired,title:x.default.string,viewBoxSize:x.default.number.isRequired,xmlns:x.default.string},le=(0,Ie.forwardRef)(function(e,t){var s=e.bgColor,r=e.bgD,n=e.fgD,o=e.fgColor,l=e.size,a=e.title,u=e.viewBoxSize,h=e.xmlns,f=h===void 0?"http://www.w3.org/2000/svg":h,g=Ze(e,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return $.default.createElement("svg",Xe({},g,{height:l,ref:t,viewBox:"0 0 "+u+" "+u,width:l,xmlns:f}),a?$.default.createElement("title",null,a):null,$.default.createElement("path",{d:r,fill:s}),$.default.createElement("path",{d:n,fill:o}))});le.displayName="QRCodeSvg";le.propTypes=Je;ie.default=le;Object.defineProperty(W,"__esModule",{value:!0});W.QRCode=void 0;var et=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},tt=Ee,I=V(tt),rt=we,st=V(rt),nt=Qe,ot=V(nt),ke=p,at=V(ke),it=ie,lt=V(it);function V(e){return e&&e.__esModule?e:{default:e}}function ut(e,t){var s={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=e[r]);return s}var dt={bgColor:I.default.oneOfType([I.default.object,I.default.string]),fgColor:I.default.oneOfType([I.default.object,I.default.string]),level:I.default.string,size:I.default.number,value:I.default.string.isRequired},Q=(0,ke.forwardRef)(function(e,t){var s=e.bgColor,r=s===void 0?"#FFFFFF":s,n=e.fgColor,o=n===void 0?"#000000":n,l=e.level,a=l===void 0?"L":l,u=e.size,h=u===void 0?256:u,f=e.value,g=ut(e,["bgColor","fgColor","level","size","value"]),y=new ot.default(-1,st.default[a]);y.addData(f),y.make();var d=y.modules;return at.default.createElement(lt.default,et({},g,{bgColor:r,bgD:d.map(function(b,A){return b.map(function(C,L){return C?"":"M "+L+" "+A+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:o,fgD:d.map(function(b,A){return b.map(function(C,L){return C?"M "+L+" "+A+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:t,size:h,viewBoxSize:d.length}))});W.QRCode=Q;Q.displayName="QRCode";Q.propTypes=dt;var ct=W.default=Q;const ft=c.styled_default("div")({name:"Container",class:"c1xv4385",propsAsIs:!1}),ht=c.styled_default("div")({name:"Header",class:"h1hbtbp8",propsAsIs:!1}),pt=c.styled_default("div")({name:"BrandBlock",class:"b1c3dxvx",propsAsIs:!1}),gt=c.styled_default("img")({name:"LogoIcon",class:"lvk233f",propsAsIs:!1}),vt=c.styled_default("div")({name:"BrandText",class:"bniy1ul",propsAsIs:!1}),mt=c.styled_default("div")({name:"BrandNameContainer",class:"blz2fxg",propsAsIs:!1}),yt=c.styled_default("span")({name:"BrandName",class:"byc93px",propsAsIs:!1}),bt=c.styled_default("span")({name:"Sponsored",class:"shnfhl9",propsAsIs:!1}),At=e=>i.jsx("svg",{viewBox:"0 0 24 24",fill:"white",xmlns:"http://www.w3.org/2000/svg",...e,children:i.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.225 4.811a.75.75 0 0 1 1.06 0L12 9.525l4.715-4.714a.75.75 0 1 1 1.06 1.06L13.06 10.5l4.715 4.715a.75.75 0 0 1-1.06 1.06L12 11.56l-4.715 4.715a.75.75 0 0 1-1.06-1.06L10.94 10.5 6.225 5.785a.75.75 0 0 1 0-1.06z"})}),Ct=c.styled_default("button")({name:"CloseButton",class:"cipq0ys",propsAsIs:!1}),Et=c.styled_default("video")({name:"FocusableVideo",class:"f1aopm9q",propsAsIs:!1}),wt=c.styled_default("div")({name:"VideoWrapper",class:"vb02wvi",propsAsIs:!1}),Tt=c.styled_default("div")({name:"VideoBlock",class:"v9c5qs6",propsAsIs:!1}),xt=()=>({focusColor:e})=>e||"#0f6cd4",te=c.styled_default("div")({name:"SendToUserButton",class:"szzabyz",propsAsIs:!1,vars:{"szzabyz-0":[xt()]}}),me=()=>i.jsx("svg",{fill:"white",style:{fill:"white",width:"30px",height:"30px",verticalAlign:"middle",marginRight:"8px"},viewBox:"0 0 40 28",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M5.57502 27.5H34.9099C37.803 27.5 39.5 25.8713 39.5 22.645V5.355C39.5 2.12878 37.7869 0.5 34.4251 0.5H5.09014C2.19706 0.5 0.5 2.12878 0.5 5.355V22.645C0.5 25.8713 2.21323 27.5 5.57502 27.5ZM5.47805 25.1039C3.87796 25.1039 2.97286 24.2425 2.97286 22.6294V5.33933C2.97286 3.74189 3.87796 2.89618 5.47805 2.89618H34.5058C36.1059 2.89618 37.0272 3.74189 37.0272 5.355V22.645C37.0272 24.2425 36.1059 25.1039 34.5058 25.1039H5.47805ZM19.9919 18.1189C21.0263 18.1189 22.0285 17.7431 22.9496 16.9287L38.1586 3.66359L36.4776 2.01915L21.5435 15.0651C21.0425 15.5035 20.5253 15.7071 19.9919 15.7071C19.4586 15.7071 18.9414 15.5035 18.4403 15.0651L3.50622 2.01915L1.82532 3.66359L17.0342 16.9287C17.9554 17.7431 18.9575 18.1189 19.9919 18.1189ZM3.74866 25.4954L15.224 14.3602L13.5431 12.7315L2.06776 23.851L3.74866 25.4954ZM36.2676 25.5111L37.9484 23.8666L26.4569 12.7315L24.7598 14.3602L36.2676 25.5111Z",fill:"white"})}),Lt=c.styled_default("div")({name:"SendToUserText",class:"sk8z5rw",propsAsIs:!1}),Bt=c.styled_default("div")({name:"Paused",class:"p8aznsd",propsAsIs:!1}),Pt=c.styled_default("h2")({name:"Title",class:"tuyd7o9",propsAsIs:!1}),_t=c.styled_default("p")({name:"Description",class:"d5xp0vd",propsAsIs:!1}),re=c.styled_default("div")({name:"QRBlock",class:"qwsbbb1",propsAsIs:!1}),se=c.styled_default("div")({name:"QRDescBlock",class:"q15u429c",propsAsIs:!1}),ne=c.styled_default("div")({name:"LearnMore",class:"l17c8eb2",propsAsIs:!1}),oe=c.styled_default("div")({name:"QRHint",class:"q1hnjpwv",propsAsIs:!1}),jt=c.styled_default("div")({name:"QRWrapper",class:"q1uhiux3",propsAsIs:!1}),It=()=>ct,Rt=c.styled_default(It())({name:"StyledQRCode",class:"sj0sb33",propsAsIs:!0}),ae=p.forwardRef(({value:e,size:t=200,fgColor:s="#0f172a",bgColor:r="#ffffff",level:n="M"},o)=>i.jsx("a",{ref:o,href:e,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",borderRadius:10},tabIndex:0,children:i.jsx(jt,{children:i.jsx(Rt,{value:e,size:t,fgColor:s,bgColor:r,level:n,viewBox:`0 0 ${t} ${t}`})})})),kt=p.forwardRef(({promotion:e},t)=>{var s,r,n,o,l,a,u;const h=e.buttonType,f=e.coupon,g=(s=e.banner)==null?void 0:s.url,y=e.type;return h===1?i.jsxs(re,{children:[i.jsx(ae,{value:g,ref:t,tabIndex:1}),i.jsxs(se,{children:[i.jsx(ne,{children:"LEARN MORE"}),i.jsx(oe,{children:"SCAN QR CODE WITH YOUR PHONE CAMERA"})]})]}):h===3?i.jsxs(re,{children:[i.jsx(ae,{value:f,ref:t}),i.jsxs(se,{children:[i.jsx(ne,{style:{fontSize:18,fontWeight:400},children:"ADD TO APPLE WALLET"}),i.jsx(oe,{style:{fontSize:17},children:"SCAN QR CODE WITH YOUR PHONE CAMERA"})]})]}):h===6&&y!==4?i.jsxs(i.Fragment,{children:[i.jsxs(te,{ref:t,tabIndex:1,focusColor:(n=(r=e==null?void 0:e.banner)==null?void 0:r.ctaButton)==null?void 0:n.color,children:[i.jsx(me,{}),"SEND INFO TO ACCOUNT EMAIL"]}),i.jsxs(re,{children:[i.jsx(ae,{value:g}),i.jsxs(se,{children:[i.jsx(ne,{children:"LEARN MORE"}),i.jsx(oe,{children:"SCAN QR CODE WITH YOUR PHONE CAMERA"})]})]})]}):h===6&&y===4?i.jsxs(te,{ref:t,tabIndex:1,focusColor:(l=(o=e==null?void 0:e.banner)==null?void 0:o.ctaButton)==null?void 0:l.color,children:[i.jsx(me,{}),i.jsx(Lt,{children:"SEND INFO TO ACCOUNT EMAIL"})]}):h===4?i.jsx(te,{ref:t,tabIndex:1,focusColor:(u=(a=e==null?void 0:e.banner)==null?void 0:a.ctaButton)==null?void 0:u.color,children:"BACK TO VIDEO"}):null}),Dt=e=>{var t,s,r,n,o,l,a,u,h,f,g,y;const{promotion:d,open:b,togglePause:A,controlVideo:C,promotionId:L,onClose:X,markAsViewed:Y}=e,N=p.useRef(null),Z=p.useRef(null),J=p.useRef(null),ee=p.useRef(null),[ue,De]=p.useState(0),j=p.useRef(0),Oe=d.type===4?ue:ue/2,de=!!((s=(t=d.banner)==null?void 0:t.video)!=null&&s.url),ce=d.autoPlayVideo===K.AutoPlayVideo.ENABLED;let H=(r=d.banner)==null?void 0:r.url;return H&&!H.startsWith("http")&&(H=`https://${H}`),p.useEffect(()=>{if(!ee.current)return;const M=new ResizeObserver(([z])=>{const R=z.contentRect.width;De(R)});return M.observe(ee.current),()=>{M.disconnect()}},[]),p.useEffect(()=>{var M;A==null||A(de||ce),b==null||b();const z=()=>{const w=[];return J.current&&w.push(J.current),d.type===5&&N.current&&w.push(N.current),Z.current&&w.push(Z.current),w};let R=z();j.current=0,(M=R[j.current])==null||M.focus();const fe=w=>{var he,pe;R=z();const U=R.length;if(U!==0){if(["ArrowDown","ArrowRight"].includes(w.key)){j.current=(j.current+1)%U,(he=R[j.current])==null||he.focus(),w.preventDefault();return}if(["ArrowUp","ArrowLeft"].includes(w.key)){j.current=(j.current-1+U)%U,(pe=R[j.current])==null||pe.focus(),w.preventDefault();return}if(w.key==="Enter"||w.key===" "){const S=R[j.current];if(!S)return;switch(S.tagName){case"A":S.click();break;case"BUTTON":S.click();break;case"VIDEO":setTimeout(()=>{const q=S;q.paused||q.ended?q.play().then(()=>{}).catch(Ne=>console.warn("⛔ start failed:",Ne)):q.pause()},0);break}w.preventDefault()}}};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[d.type,de,ce,b,A]),p.useEffect(()=>{L&&d.type&&Y&&Y()},[L,d.type,Y]),p.useEffect(()=>()=>{C==null||C({muted:!1})},[C]),p.useEffect(()=>{d.type===5&&N.current&&N.current.focus()},[d.type]),i.jsxs(ft,{ref:ee,tabIndex:0,children:[i.jsxs(ht,{children:[d.logoMode===1&&i.jsxs(pt,{children:[i.jsx(gt,{src:(n=d.sponsor)==null?void 0:n.logo,alt:"Logo"}),i.jsxs(vt,{children:[i.jsx(mt,{children:i.jsx(yt,{children:(o=d.sponsor)==null?void 0:o.name})}),i.jsx(bt,{children:"SPONSORED"})]})]}),d.logoMode===2&&d.type===4&&i.jsx("img",{src:(l=d.sponsor)==null?void 0:l.logo,alt:"Video paused preview",style:{height:"56px"}}),i.jsx(Ct,{ref:Z,onClick:X,children:i.jsx(At,{})})]}),d.logoMode===2&&d.type!==4&&i.jsx("img",{src:(a=d.sponsor)==null?void 0:a.logo,alt:"Video paused preview",style:{display:"block",alignSelf:"center",maxHeight:"72px",width:"auto"}}),((u=d.banner)==null?void 0:u.imageUrl)&&i.jsx(Tt,{style:{height:Oe},children:i.jsx("img",{src:(h=d.banner)==null?void 0:h.imageUrl,alt:"Video paused preview",style:{width:"100%",height:"100%",objectFit:"cover"}})}),((f=d.banner)==null?void 0:f.video)&&i.jsx(wt,{children:i.jsx(Et,{ref:J,tabIndex:0,muted:!1,autoPlay:!1,loop:!0,playsInline:!0,controls:!0,children:i.jsx("source",{src:d.banner.video.url,type:"video/mp4"})})}),i.jsx(Bt,{children:"PAUSED"}),d.type===5&&i.jsxs(i.Fragment,{children:[i.jsx(Pt,{children:(g=d.banner)==null?void 0:g.title}),i.jsx(_t,{children:(y=d.banner)==null?void 0:y.body})]}),i.jsx(kt,{promotion:d,ref:N})]})},Ot=({advertisement:e,close:t,skipAutoClose:s,sidebar:r,banner:n,markAsViewed:o,open:l,controlVideo:a,advertisementPaused:u,togglePause:h})=>e.promotion?r?i.jsx(ge.b,{className:"PromoSidebarContainer",direction:r,hiding:!1,children:i.jsx(Dt,{markAsViewed:o,promotionId:e.question.id,promotion:e.promotion,onClose:t,open:l,controlVideo:a,skipAutoClose:s,advertisementPaused:u,togglePause:h})}):n?i.jsx(ge.B,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:n}):null:null,Nt=c.styled_default("div")({name:"AdvertisementUIWrap",class:"a3844y1",propsAsIs:!1}),Mt=e=>{const t=e.target;if(t instanceof HTMLAnchorElement&&t.target==="_blank"){const s=t.getAttribute("data-promo-id")||"",r=t.getAttribute("data-promo-type")||K.PromotionType.UNSET;t.getAttribute("data-a")==="button"&&c.eventBus.emit("advertisement",{action:"buttonSelect",payload:{id:s,type:r}}),t.getAttribute("data-a")==="banner"&&c.eventBus.emit("advertisement",{action:"bannerSelect",payload:{id:s,type:r}})}},St=({gamification:e,skipAutoClose:t,sidebar:s,banner:r,persistent:n,controlVideo:o})=>{const l=p.useRef(null),a=c.useStore(e.advertisement.$store);c.b(l,{enabled:!!a.data,event:"click",listener:Mt});const u=!r&&!s;return a.data===void 0||!n&&a.isViewed?null:i.jsx(Nt,{ref:l,style:{height:u?"auto":"100%"},className:c.cx_default("SL-AdvertisementUIWrap","SL-AdvertisementUIWrap--lower-third"),children:i.jsx(Ot,{sidebar:s,banner:r,advertisement:a.data,advertisementPaused:!!a.isPaused,togglePause:a.togglePause||(()=>{}),close:a.close,markAsViewed:e.advertisement.markAsViewed,open:e.advertisement.open,skipAutoClose:t,controlVideo:o})})},ye=({sdk:e,sidebar:t,banner:s,skipAutoClose:r,persistent:n})=>{if(!c.useStore(e.featuresList.getStore()))return null;const o=e.getFeature(K.SdkOverlayType.GAMES);return o?i.jsx(St,{gamification:o,sidebar:t,banner:s,persistent:n,skipAutoClose:r,controlVideo:e.controlVideoPlayer}):null},Vt=c.styled_default("div")({name:"Container",class:"cheo2r6",propsAsIs:!1}),Ht=c.styled_default("div")({name:"ContentContainer",class:"c1pvfh8e",propsAsIs:!1}),zt=c.styled_default("div")({name:"Sidebar",class:"s1ew4id0",propsAsIs:!1}),Ut=c.styled_default("div")({name:"Banner",class:"bci5mwc",propsAsIs:!1}),qt=c.styled_default("div")({name:"VideoContainer",class:"v1y91bzn",propsAsIs:!1}),Ft=c.styled_default("div")({name:"VideoBox",class:"vqmlsjk",propsAsIs:!1}),$t=c.styled_default("div")({name:"VideoPlayer",class:"vyn4uy0",propsAsIs:!1}),Gt=c.styled_default("div")({name:"AdContainer",class:"a9sufrb",propsAsIs:!1}),Kt=c.styled_default("span")({name:"AdLabel",class:"acv3bdg",propsAsIs:!1}),Wt=({gamification:e,sidebar:t,banner:s,video:r,uiState:n})=>{var o,l;const a=c.useStore(e.advertisement.$store),u=p.useRef(null),h=p.useRef(null),f=p.useCallback(()=>{const d=h.current,b=u.current;if(!d||!b)return;const{width:A,height:C}=d.getBoundingClientRect(),{width:L,height:X}=b.getBoundingClientRect();(A>L||C>X)&&(d.style.width==="100%"?(d.style.height="100%",d.style.width="auto"):(d.style.width="100%",d.style.height="auto"))},[]);p.useEffect(()=>{if(u.current){const d=new ResizeObserver(b=>{for(const A of b)A.contentBoxSize&&f()});return d.observe(u.current),()=>{d.disconnect()}}return()=>{}},[f]),p.useEffect(f);const g=n.promotionSidebar,y=n.promotionBanner;return i.jsxs(Vt,{style:{backgroundImage:`url(${(l=(o=a==null?void 0:a.data)==null?void 0:o.promotion)==null?void 0:l.backgroundImageLandscapeUrl})`},className:"Container",children:[i.jsxs(Ht,{className:"ContentContainer",style:{width:g?"calc(100% - var(--sidebar-width))":"100%"},children:[i.jsxs(qt,{className:"VideoContainer",ref:u,style:{height:y?"calc(100% - var(--banner-height))":"100%"},children:[i.jsx(Gt,{children:i.jsx(Kt,{children:"Ad"})}),i.jsx(Ft,{ref:h,className:"VideoBox",children:i.jsx($t,{className:"VideoPlayer",children:r})})]}),i.jsx(Ut,{className:"Banner",style:{height:y?"var(--banner-height)":"0px"},children:y&&s})]}),i.jsx(zt,{style:{width:g?"var(--sidebar-width)":"0px"},className:"Sidebar",children:g&&t})]})},Qt=({persistent:e,children:t,sdk:s,uiState:r})=>{if(!c.useStore(s.featuresList.getStore()))return null;const n=s.getFeature(K.SdkOverlayType.GAMES);return n?i.jsx(Wt,{gamification:n,sidebar:i.jsx(ye,{sdk:s,persistent:e,sidebar:"right"}),banner:i.jsx(ye,{sdk:s,persistent:e,banner:"bottom"}),video:t,uiState:r}):null},Xt=({persistent:e,children:t})=>{const s=c.useStreamLayer(),r=c.useStreamLayerUI(),n=c.useStreamLayerTheme();return s?i.jsx("div",{className:"StreamLayerSDK",children:i.jsx(c.h,{customTheme:n.theme,themeMode:n.themeMode,children:i.jsx(Qt,{sdk:s,persistent:e,uiState:r,children:t})})}):null};exports.StreamLayerSDKTv=Xt;
|