/*! For license information please see 366.980d8fedaec657af0020.js.LICENSE.txt */ "use strict";(self.webpackChunkchat=self.webpackChunkchat||[]).push([[366],{2517:(e,t,n)=>{n.d(t,{T:()=>i});var r=n(7489),o=n(3190),i={SendMessage:function(e){var t=e.content,n=void 0===t?"":t,i=e.type,a=void 0===i?0:i,s=e.baseMessageId,c=void 0===s?null:s,l=e.timeStamp,u=e.sign;this.name=o.Hj.SendMessage,this.model={content:n,type:a,baseMessageId:c,timeStamp:l,sign:u},this.messagePackModel=(0,r.parseObjectToArray)([a,n,c,u,l])},LikeMessage:function(e){var t=e.messageId,n=void 0===t?0:t;this.name=o.Hj.LikeMessage,this.model={messageId:n},this.messagePackModel=(0,r.parseObjectToArray)([n])},UnLikeMessage:function(e){var t=e.messageId,n=void 0===t?0:t;this.name=o.Hj.UnLikeMessage,this.model={messageId:n},this.messagePackModel=(0,r.parseObjectToArray)([n])},UpdatePlayer:function(e){var t=e.nickName,n=void 0===t?null:t,i=e.defaultAvatarId,a=void 0===i?0:i;this.name=o.Hj.UpdatePlayer,this.model={nickName:n,defaultAvatarId:a},this.messagePackModel=(0,r.parseObjectToArray)([n,a])}}},11:(e,t,n)=>{n.d(t,{A:()=>H});var r=n(4914),o=n(678),i=n(8874),a=n.n(i),s=n(3444),c=n.n(s),l=n(4380),u=n.n(l),d=n(4115),f=n.n(d),m=n(3566),p=n.n(m),h=n(8402),g=n.n(h),y=n(7800),v=n(2153),b=n(4228),w=n(3190),j=n(1069),x=n(1508),I=n(4848),k=a().div.withConfig({componentId:"sc-139wzdv-0"})(["position:absolute;left:0;bottom:0;width:100%;z-index:3;overflow:hidden;border-radius:0.5em 0.5em 1em 1em;"]),C=a().div.withConfig({componentId:"sc-139wzdv-1"})(["padding:0.75em 1em;background:#121212;"]),S=a().button.withConfig({componentId:"sc-139wzdv-2"})(["",";",";width:100%;border-radius:1.5em;padding:",";border:1px solid;position:relative;&:nth-of-type(1){background:#1f1f1f;border-color:#454545;}&:nth-of-type(2){border-color:rgba(255,132,37,0.24);background:radial-gradient(50% 100% at 50% -0%,rgba(255,132,37,0.23) 0%,rgba(255,132,37,0) 100%);&:before{",";}}"],x.x6,(0,x.Dj)({alignItems:"center",justifyContent:"center"}),w.Fr?"1em":"0.875em",x.Zh),O=a().div.withConfig({componentId:"sc-139wzdv-3"})(["",";gap:0.75em;padding:0.75em 1em;position:relative;background:#141414;&:before{",";}"],(0,x.Dj)({alignItems:"center"}),x.$s),T=a().span.withConfig({componentId:"sc-139wzdv-4"})(["",";font:0.75em/1 var(--mainFontMedium);"],x.tm);function A(e){var t=e.style,n=(0,o.useDispatch)(),r=(0,y.shallowSelector)(v.vR),i=(0,y.shallowSelector)(y.selectResources),a=i.strDecline,s=i.strSend;return!r||w.wY?null:(0,I.jsxs)(k,{style:t.container,children:[(0,I.jsx)(C,{style:t.bigWin,children:(0,I.jsx)(j.A,{style:t.messageByType,message:{content:"x".concat(Number(null==r?void 0:r.toFixed(2))),gameType:w.GN,type:w.TQ.ShareWin}})}),(0,I.jsxs)(O,{style:t.actions,children:[(0,I.jsx)(S,{style:t.button,type:"button",onClick:function(){n(v.o1.setSharedBigWinCoeff(0))},children:(0,I.jsx)(T,{style:t.btnTxt,children:a||"_Decline"})}),(0,I.jsx)(S,{style:t.button,type:"button",onClick:function(){(0,b._z)({content:"x".concat(Number(null==r?void 0:r.toFixed(2))),type:w.TQ.ShareWin,baseMessageId:null}),n(v.o1.setSharedBigWinCoeff(0))},children:(0,I.jsx)(T,{style:t.btnTxt,children:s||"_Send"})})]})]})}const P=(0,r.memo)(A);A.defaultProps={style:{container:{},bigWin:{},messageByType:{},actions:{},button:{},btnTxt:{}}},A.propTypes={style:c().object};var M=n(7420);function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{n.d(t,{A:()=>P});var r=n(4914),o=n(8874),i=n.n(o),a=n(3444),s=n.n(a),c=n(7800),l=n(5094),u=n.n(l),d=n(3190),f=n(1508),m=n(4848);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n140,y=(n=(0,r.useState)(!1),o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(n,o)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),A=y[0],P=y[1],M=(0,c.shallowSelector)(c.selectResources),B=M.strWinningOdd,E=M.strSeeMore,_=M.strHide,D=d.Fr&&!u()(),L=a.content;switch(a.type){case d.TQ.Text:return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(k,{isInput:l,isRepliedMessage:s,buttonState:A,children:L}),f&&(0,m.jsx)(S,{children:(0,m.jsx)(O,{type:"button",onClick:function(){P((function(e){return!e}))},children:(0,m.jsx)(T,{children:A?_||"_Hide":E||"_See More"})})})]});case d.TQ.Gif:return(0,m.jsx)(v,{isSmall:s,children:(0,m.jsx)(h,{src:L,alt:"gif"})});case d.TQ.Emoji:return(0,m.jsx)(b,{isSmall:s,children:(0,m.jsx)(g,{src:L,alt:"emoji"})});case d.TQ.ShareWin:var N=a.gameType,F="".concat("https://nar-fg.cchhllpp.net/prd","/images/chat/").concat(D?"landscape":"global","/bigWin/").concat("string"==typeof N?N.toLowerCase():d.GN.toLowerCase(),"ShareWin.webp");return(0,m.jsxs)(w,{style:i.shareBigWin,isLandscape:D,children:[(0,m.jsx)(j,{style:i.shareBigWinImg,src:F,alt:"bigWin"}),(0,m.jsxs)(x,{style:i.shareBigWinInfo,children:[(0,m.jsx)(I,{style:i.shareBigWinCoeff,children:L}),(0,m.jsx)(C,{style:i.shareBigWinText,children:B||"_Winning Odd"})]})]})}}const P=(0,r.memo)(A);A.defaultProps={style:{shareBigWin:{},shareBigWinImg:{},shareBigWinInfo:{},shareBigWinCoeff:{},shareBigWinText:{}},message:{},isSmall:!1,isInput:!1},A.propTypes={style:s().object,message:s().object,isSmall:s().bool,isInput:s().bool}},5108:(e,t,n)=>{n.d(t,{A:()=>ne});var r=n(4914),o=n(678),i=n(8874),a=n.n(i),s=n(3444),c=n.n(s),l=n(1118),u=n.n(l),d=n(7800),f=n(2153),m=n(6316),p=n.n(m),h=n(8739),g=n.n(h),y=n(9720),v=n.n(y),b=n(6295),w=n(5094),j=n.n(w),x=n(3190),I=n(4228),k=n(1069),C=n(1508),S=n(4848),O=(0,b.getIsMobile)(),T=a().div.withConfig({componentId:"sc-1tebu7b-0"})(["",";",";",';border-radius:1em;border:0 none;background:radial-gradient(50% 50% at 50% 50%,rgb(104,21,21) 0%,rgba(41,7,7,0.7) 100%);z-index:1;overflow:hidden;backdrop-filter:blur(3px);&:after{content:"";position:absolute;bottom:0;left:50%;transform:translateX(-50%);background:radial-gradient(49.85% 100% at 50.15% 100%,#ff9191 0%,transparent 100%);mix-blend-mode:color-dodge;width:75%;height:0.875em;}'],C.PH,(0,C.Dj)({alignItems:"center",justifyContent:"center"}),C.Us),A=a().span.withConfig({componentId:"sc-1tebu7b-1"})(["color:var(--white);font:0.75em/1.375 var(--mainFontBold);text-align:center;max-width:",";"],O?"55%":"65%");function P(e){var t=e.style,n=(0,d.shallowSelector)(d.selectResources).strMessageWasBlocked;return(0,S.jsx)(T,{style:t.container,children:(0,S.jsx)(A,{style:t.text,children:n||"_Your message was blocked because of Chat rules violation."})})}const M=(0,r.memo)(P);P.defaultProps={style:{container:{},text:{}}},P.propTypes={style:c().object};var B=n(7420),E="".concat("https://nar-fg.cchhllpp.net/prd","/images/chat/global/loudspeaker.webp"),_=a().div.withConfig({componentId:"sc-pw5lk7-0"})(["",";padding-bottom:0.5em;border-bottom:1px solid rgba(73,73,73,0.32);"],(0,C.Dj)({alignItems:"center",justifyContent:"space-between"})),D=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-1"})(["position:relative;border-radius:1em;border:1px solid #383838;padding:0.5em;margin-bottom:1em;min-height:5.125em;background:#262626;"," &.personalMessage{border-color:#e65e32;background:rgba(230,94,50,0.08);margin-left:auto;&.influencerMessage{border-color:#e65e32;background:url(",") no-repeat top right/10.625em 6.25em,rgba(230,94,50,0.08);}","{border-bottom:1px solid rgba(217,81,40,0.32);}}&.influencerMessage{border-color:#383838;background:url(",") no-repeat top right/10.625em 6.25em,#3d3d3d;}&.blockedMessage{border-color:#a02222;}"],(function(e){return e.isLandscape&&(0,i.css)(["width:28.875em;"])}),E,_,E)),L=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-2"})(["padding-top:0.5em;"])),N=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-3"})(["",";"],(0,C.Dj)({alignItems:"center"}))),F=(0,r.memo)(a().img.withConfig({componentId:"sc-pw5lk7-4"})(["width:1.5em;height:1.5em;border-radius:50%;margin-right:0.5em;"])),U=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-5"})(["",";"],(0,C.Dj)({justifyContent:"center",flexDirection:"column"}))),W=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-6"})(["color:rgb(var(--white));font:0.75em/1.2 var(--mainFont);"])),R=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-7"})(["color:rgba(var(--white),0.48);font:0.625em/1.2 var(--mainFont);"])),H=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-8"})(["",";gap:0.5em;"],(0,C.Dj)({alignItems:"center"}))),G=(0,r.memo)(a().button.withConfig({componentId:"sc-pw5lk7-9"})(["",";",";flex:1 0 1.875em;height:1.5em;background:rgba(94,94,94,0.2);border:1px solid rgba(97,97,97,0.2);border-radius:1em;padding:0.25em 0.5em;&.isLiked{background:#812c2c;border:1px solid rgba(255,141,141,0.2);}"],C.x6,(0,C.Dj)({alignItems:"center",justifyContent:"center"}))),Q=a().span.withConfig({componentId:"sc-pw5lk7-10"})(["height:0.875em;width:0.875em;flex:0 0 0.875em;"]),z=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-11"})(["color:rgb(var(--white));margin-left:0.33em;font:0.75em var(--mainFont);"])),Y=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-12"})(["height:1.25em;width:1.25em;margin-right:0.5em;"])),q=function(e){var t=e.message,n=e.style;if(t.hidden)return null;var r=(0,o.useDispatch)(),i=(0,d.shallowSelector)(f.St),a=i.id,s=i.isBlocked,c=i.nickName,l=x.Fr&&!j()();return(0,S.jsxs)(D,{isLandscape:l,style:n.messageItem,className:"\n\t\t\t\t\t".concat(t.playerId?t.playerId===a?"personalMessage":"":t.nickName===c?"personalMessage":""," \n\t\t\t\t\t").concat(t.isInfluencer?"influencerMessage":"","\n\t\t\t\t\t").concat(t.profanityCount>0||t.containsProfanity?"blockedMessage":""),children:[(t.profanityCount>0||t.containsProfanity)&&(0,S.jsx)(M,{style:n.blockedMessage}),(0,S.jsxs)(_,{style:n.messageHeader,children:[(0,S.jsxs)(N,{style:n.messageUserInfoBlock,children:[t.isInfluencer&&(0,S.jsx)(Y,{style:n.messageInfluencerIcon,children:(0,S.jsx)(v(),{})}),(0,S.jsx)(F,{style:n.messageUserAvatar,src:t.avatarUrl,alt:"Avatar"}),(0,S.jsxs)(U,{style:n.messageUserInfo,children:[(0,S.jsx)(W,{style:n.messageUserName,children:(null==t?void 0:t.nickName)||"_User"}),(0,S.jsx)(R,{style:n.messageTime,children:(0,b.getFormattedTime)(null==t?void 0:t.date)||"_date"})]})]}),!s&&c&&(0,S.jsxs)(H,{style:n.messageActionsBlock,children:[(0,S.jsx)(G,{style:n.messageAction,type:"button",onClick:function(){return e=t,void r(f.o1.setReplyMessage(e));var e},children:(0,S.jsx)(Q,{children:(0,S.jsx)(g(),{})})},"r_".concat(t.id)),(0,S.jsxs)(G,{style:n.messageAction,type:"button",className:t.isLiked?"isLiked":"",onClick:function(){return e=null==t?void 0:t.id,n=t.isLiked,r(f.o1.setUserLikedMessages(e)),void(n?(0,I.iG)({messageId:e}):(0,I.x8)({messageId:e}));var e,n},children:[(0,S.jsx)(Q,{children:(0,S.jsx)(p(),{fillColor:t.isLiked?"#ff6666":"transparent",color:t.isLiked?"#ff6666":"rgb(var(--white))"})}),!!t.likeCount&&(0,S.jsx)(z,{children:t.likeCount})]},"l_".concat(t.id))]})]}),(0,S.jsxs)(L,{style:n.messageBody,children:[t.baseMessage?(0,S.jsx)(B.A,{style:n.repliedMessageBlock,message:t.baseMessage,isSmall:!0}):null,(0,S.jsx)(k.A,{style:n.messageByType,message:t})]})]})};const $=(0,r.memo)(q);function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=r-20)},onClick:I,onTouchStart:I,children:[a.map((function(e){return(0,S.jsx)($,{message:e},e.id)})),p&&(0,S.jsxs)(K,{style:t.newMessageBtn,type:"button",onClick:x,children:[(0,S.jsx)(V,{style:t.newMessageBtnText,children:c||"_New message"}),(0,S.jsx)(ee,{style:t.chatArrowIconBlock,children:(0,S.jsx)(u(),{})})]})]})}te.defaultProps={style:{container:{},messageItem:{},messageHeader:{},messageUserInfoBlock:{},messageInfluencerIcon:{},messageUserAvatar:{},messageUserInfo:{},messageUserName:{},messageTime:{},messageActionsBlock:{},messageAction:{},messageBody:{},messageByType:{},newMessageBtn:{},chatArrowIconBlock:{},newMessageBtnText:{}}},te.propTypes={style:c().object};const ne=(0,r.memo)(te)},7420:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(4914),o=n(8874),i=n.n(o),a=n(3444),s=n.n(a),c=n(678),l=n(6856),u=n.n(l),d=n(2677),f=n.n(d),m=n(7800),p=n(1069),h=n(2153),g=n(3190),y=n(1508),v=n(4848);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var j=i().div.withConfig({componentId:"sc-m5a6mp-0"})(["",";width:100%;"],(0,y.Dj)({alignItems:"center"})),x=i().div.withConfig({componentId:"sc-m5a6mp-1"})(["",";width:100%;"],(0,y.Dj)({flexDirection:"column"})),I=i().button.withConfig({componentId:"sc-m5a6mp-2"})(["",";width:1.625em;height:1.625em;top:50%;transform:translateY(-50%);right:0.5em;"],y.b),k=i().div.withConfig({componentId:"sc-m5a6mp-3"})(["",";margin-bottom:0.25em;"],(0,y.Dj)({alignItems:"center"})),C=i().div.withConfig({componentId:"sc-m5a6mp-4"})(["",";padding:0.25em 0.5em;border-radius:0.25em 0.5em 0.5em 0.25em;background:rgba(var(--white),0.16);border-left:0.25em solid rgb(var(--white));margin-bottom:0.5em;position:relative;"," "," "," ",""],(0,y.Dj)({alignItems:"center",justifyContent:"space-between"}),(function(e){return e.isInput&&(0,o.css)(["margin-bottom:0;border-radius:0.25em 0.5em 0 0;","{max-width:calc(100% - 1.75em);}"],x)}),(function(e){return(e.messageType===g.TQ.Emoji||e.messageType===g.TQ.Gif)&&(0,o.css)(["","{",";}"],x,(0,y.Dj)({flexDirection:"row-reverse",justifyContent:"flex-end"}))}),(function(e){return!e.isInput&&(e.messageType===g.TQ.Emoji||e.messageType===g.TQ.Gif)&&(0,o.css)(["","{margin-bottom:0;}"],k)}),(function(e){return e.messageType===g.TQ.ShareWin&&(0,o.css)(["padding:0.5em;","{margin-bottom:1em;}","{width:100%;max-width:100%;}","{top:0.5em;transform:translateY(0);}"],k,x,I)})),S=(0,r.memo)(i().span.withConfig({componentId:"sc-m5a6mp-5"})(["display:inline-block;height:1em;width:1em;margin-right:0.5em;"])),O=(0,r.memo)(i().p.withConfig({componentId:"sc-m5a6mp-6"})(["color:rgb(var(--white));font:0.75em var(--mainFont);margin:0;"]));function T(e){var t=e.message,n=e.style,r=e.isInput,o=e.isSmall,i=function(e){for(var t=1;t{n.d(t,{A:()=>te});var r=n(4914),o=n(8874),i=n.n(o),a=n(3444),s=n.n(a),c=n(6789),l=n.n(c),u=n(3566),d=n.n(u),f=n(678),m=n(4134),p=n(1061),h=n.n(p),g=n(5094),y=n.n(g),v=n(7800),b=n(4228),w=n(3190),j=n(2153),x=n(1508),I=n(4848);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;M(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:E(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function T(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n div{width:calc((100% / 3) - 0.25em);img{width:100%;max-width:100%;object-fit:cover;}}"],x.QX,(0,x.Dj)({alignContent:"start",isWrap:!0}),w.Fr?"8.5625em":"8.6875em"),N=(0,r.memo)(i().img.withConfig({componentId:"sc-fortkv-3"})(["height:",";width:calc((100% / 3) - 0.25em);",""],w.Fr?"7.25em":"6.25em",(function(e){return e.isLandscape&&(0,o.css)(["width:calc((100% / 4) - 0.25em);"])}))),F=i().div.withConfig({componentId:"sc-fortkv-4"})(["position:relative;margin:0 0.5em;"]),U=i().div.withConfig({componentId:"sc-fortkv-5"})(["",";margin:1em 0;height:",";"],(0,x.Dj)({alignContent:"center",justifyContent:"center"}),w.Fr?"1.125em":"1em"),W=i().span.withConfig({componentId:"sc-fortkv-6"})(["position:absolute;height:1.125em;width:1.125em;left:0.5em;top:50%;transform:translateY(-50%);"]),R=i().input.withConfig({componentId:"sc-fortkv-7"})(["border-radius:0.5em;background:#1a1a1a;color:#d1d1d1;font:0.875em var(--mainFontLight);height:2.5em;padding:0.57em 0.5em 0.5em 2.4em;text-align:start;border:none;width:100%;outline:none;"]);function H(e){var t=e.style,n=(0,f.useDispatch)(),o=(0,r.useRef)(null),i=P((0,r.useState)(""),2),a=i[0],s=i[1],c=P((0,r.useState)(0),2),l=c[0],u=c[1],d=P((0,r.useState)(!1),2),m=d[0],p=d[1],g=w.Fr&&!y()(),x=P((0,r.useState)([]),2),k=x[0],C=x[1],M=(0,f.useSelector)(j.Rk),B=(0,v.shallowSelector)(v.selectResources).strSearchGIF,H="".concat("https://nar-fg.cchhllpp.net/prd","/images/chat/").concat(w.Fr?"mobile":"desktop","/poweredByGiphy.webp"),G=function(){var e,t=(e=O().mark((function e(t){var n,r,o,i,a,s,c=arguments;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:0,r=[],!t){e.next=10;break}return e.next=5,E.search(t,{offset:n,limit:20});case 5:o=e.sent,i=o.data,r=i,e.next=15;break;case 10:return e.next=12,E.trending({offset:n,limit:20});case 12:a=e.sent,s=a.data,r=s;case 15:C(0===n?r:function(e){return[].concat(T(e),T(r))}),u(n+25),p(!1);case 18:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){A(i,r,o,a,s,"next",e)}function s(e){A(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),Q=function(){var e=o.current;e&&e.scrollTop+e.clientHeight>=e.scrollHeight-10&&!m&&(p(!0),G(a,l))};return(0,r.useEffect)((function(){G("")}),[]),(0,r.useEffect)((function(){var e=o.current;return e.addEventListener("scroll",Q),function(){e.removeEventListener("scroll",Q)}}),[k,m]),(0,I.jsxs)(_,{style:t.container,children:[(0,I.jsxs)(F,{style:t.searchBlock,children:[(0,I.jsx)(W,{style:t.searchIcon,children:(0,I.jsx)(h(),{})}),(0,I.jsx)(R,{type:"text",style:t.searchInput,value:a,onChange:function(e){var t;s(e.target.value),t=e.target.value,u(0),G(t)},placeholder:B||"_Search GIF"})]}),(0,I.jsx)(U,{style:t.poweredByGiphy,children:(0,I.jsx)("img",{src:H,alt:"Powered by Giphy"})}),(0,I.jsx)(D,{style:t.gifsContainer,children:(0,I.jsx)(L,{style:t.gifs,ref:o,children:k.map((function(e){var r,o,i=(null===(r=e.images)||void 0===r||null===(r=r.fixed_height_small)||void 0===r?void 0:r.webp)||(null===(o=e.images)||void 0===o||null===(o=o.fixed_height_small_still)||void 0===o?void 0:o.url);return(0,I.jsx)(N,{onClick:function(e){return function(e,t){t.preventDefault(),t.stopPropagation(),(0,b._z)({content:e,type:w.TQ.Gif,baseMessageId:null==M?void 0:M.id}),null!=M&&M.content&&n(j.o1.setReplyMessage({}))}(i,e)},src:i,style:S(S({},t.gif),{},{cursor:"pointer"}),isLandscape:g,alt:"gif"},e.id)}))})})]})}const G=(0,r.memo)(H);H.defaultProps={style:{container:{},searchBlock:{},searchIcon:{},searchInput:{},gifsContainer:{},poweredByGiphy:{},gifs:{},gif:{}}},H.propTypes={style:s().object};var Q=i().div.withConfig({componentId:"sc-10hs9b2-0"})(["",";margin:1em 0.25em 0;"],(0,x.Dj)({justifyContent:"center"})),z=i().div.withConfig({componentId:"sc-10hs9b2-1"})(["",";",";overflow:auto;flex:0 0 100%;width:100%;height:13.375em;gap:0.25em;padding:0 0.625em;"],x.QX,(0,x.Dj)({alignContent:"start",isWrap:!0})),Y=i().div.withConfig({componentId:"sc-10hs9b2-2"})(["width:",";height:",";cursor:pointer;"],w.Fr?"calc((100% / 4) - 0.25em)":"calc((100% / 5) - 0.25em)",w.Fr?"5.375em":"3.5em"),q=i().img.withConfig({componentId:"sc-10hs9b2-3"})(["",";object-fit:contain;"],x.PH);function $(e){var t=e.style,n=(0,f.useDispatch)(),r=(0,v.shallowSelector)(j.Uu),o=(0,v.shallowSelector)(j.Rk);return(0,I.jsx)(Q,{style:t.emojisContainer,children:(0,I.jsx)(z,{style:t.emojis,children:r.map((function(e){var r=e.id,i=(e.name,e.url);return(0,I.jsx)(Y,{style:t.emoji,onClick:function(){return function(e){(0,b._z)({content:e,type:w.TQ.Emoji,baseMessageId:null==o?void 0:o.id}),null!=o&&o.content&&n(j.o1.setReplyMessage({}))}(i)},children:(0,I.jsx)(q,{style:t.img,src:i,alt:"emoji"})},"emoji_".concat(r))}))})})}const X=(0,r.memo)($);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{function r(e){var t=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}))}n.d(t,{t:()=>r})},2213:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(6295),o=n(9133),i=n(3190);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;tr?n:r:n},setSharedBigWinCoeff:function(e,t){var n=t.payload;e.gameInfo.sharedBigWinCoefficient=n},resetChatState:function(e){delete e.services.popups[o.BASE_POPUP_NAMES.CHAT_POPUP],delete e.services.popups[o.BASE_POPUP_NAMES.CHAT_REGISTRY_POPUP],e.services.chat={id:0,name:"",configuration:{minShareCoefficient:1e4},player:{id:0,isBlocked:!1,isInfluencer:!1,nickName:"",avatarUrl:"",canChangeNickName:!1},messages:[],pinnedMessages:[],defaultAvatars:[],emojis:[]}}}},7792:(e,t,n)=>{n.d(t,{u:()=>r});var r={services:{popups:{},chat:{id:0,name:"",configuration:{minShareCoefficient:1e4},player:{id:0,isBlocked:!1,isInfluencer:!1,nickName:"",avatarUrl:"",canChangeNickName:!1},messages:[],pinnedMessages:[],defaultAvatars:[],emojis:[]}}}},8011:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(1601),o=n.n(r),i=n(6314),a=n.n(i)()(o());a.push([e.id,"",""]);const s=a},6314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},1601:e=>{e.exports=function(e){return e[1]}},1020:(e,t,n)=>{var r=n(4914),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},4848:(e,t,n)=>{e.exports=n(1020)},4376:(e,t,n)=>{var r=n(5072),o=n.n(r),i=n(7825),a=n.n(i),s=n(7659),c=n.n(s),l=n(5056),u=n.n(l),d=n(540),f=n.n(d),m=n(1113),p=n.n(m),h=n(8011),g={};g.styleTagTransform=p(),g.setAttributes=u(),g.insert=c().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=f(),o()(h.A,g),h.A&&h.A.locals&&h.A.locals},5072:e=>{var t=[];function n(e){for(var n=-1,r=0;r{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}}]);