/*! For license information please see 366.ecba34349e85f80ef991.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:()=>D});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),b=n(2153),v=n(4228),w=n(3190),x=n(1069),j=n(4848),k=a().div.withConfig({componentId:"sc-139wzdv-0"})(["position:absolute;bottom:0;left:0;width:100%;z-index:3;overflow:hidden;border-radius:0.5em 0.5em 1em 1em;"]),I=a().div.withConfig({componentId:"sc-139wzdv-1"})(["padding:0.75em 1em;background:#121212;"]),S=a().button.withConfig({componentId:"sc-139wzdv-2"})(["display:flex;align-items:center;justify-content:center;width:100%;cursor:pointer;border-radius:1.5em;padding:",';font-size:1em;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{content:"";position:absolute;top:0;left:0;height:1px;width:100%;background:radial-gradient(50% 50% at 50% 50%,#ff8425 0%,rgba(255,132,37,0) 100%);}}'],w.Fr?"1em":"0.875em"),C=a().div.withConfig({componentId:"sc-139wzdv-3"})(['display:flex;align-items:center;gap:0.75em;padding:0.75em 1em;position:relative;background:#141414;&:before{content:"";position:absolute;top:0;left:0;height:0.125em;width:100%;background:radial-gradient(50% 100% at 50% 0%,#ff5c25 0%,rgba(255,92,37,0) 100%);}']),T=a().span.withConfig({componentId:"sc-139wzdv-4"})(["color:rgb(var(--white));text-transform:uppercase;font:0.75em/1 var(--mainFontMedium);"]);function A(e){var t=e.style,n=(0,o.useDispatch)(),r=(0,y.shallowSelector)(b.vR),i=(0,y.shallowSelector)(y.selectResources),a=i.strDecline,s=i.strSend;return!r||w.wY?null:(0,j.jsxs)(k,{style:t.container,children:[(0,j.jsx)(I,{style:t.bigWin,children:(0,j.jsx)(x.A,{style:t.messageByType,message:{content:"x".concat(Number(null==r?void 0:r.toFixed(2))),gameType:w.GN,type:w.TQ.ShareWin}})}),(0,j.jsxs)(C,{style:t.actions,children:[(0,j.jsx)(S,{style:t.button,type:"button",onClick:function(){n(b.o1.setSharedBigWinCoeff(0))},children:(0,j.jsx)(T,{style:t.btnTxt,children:a||"_Decline"})}),(0,j.jsx)(S,{style:t.button,type:"button",onClick:function(){(0,v._z)({content:"x".concat(Number(null==r?void 0:r.toFixed(2))),type:w.TQ.ShareWin,baseMessageId:null}),n(b.o1.setSharedBigWinCoeff(0))},children:(0,j.jsx)(T,{style:t.btnTxt,children:s||"_Send"})})]})]})}const O=(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:()=>T});var r=n(4914),o=n(8874),i=n.n(o),a=n(3444),s=n.n(a),c=n(7800),l=n(3190),u=n(4848);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n140,T=(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 d(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)?d(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=T[0],O=T[1],M=(0,c.shallowSelector)(c.selectResources),B=M.strWinningOdd,P=M.strSeeMore,E=M.strHide,_=a.content;switch(a.type){case l.TQ.Text:return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(x,{isInput:p,isRepliedMessage:s,buttonState:A,children:_}),C&&(0,u.jsx)(k,{children:(0,u.jsx)(I,{type:"button",onClick:function(){O((function(e){return!e}))},children:(0,u.jsx)(S,{children:A?E||"_Hide":P||"_See More"})})})]});case l.TQ.Gif:return(0,u.jsx)(h,{isSmall:s,children:(0,u.jsx)(f,{src:_,alt:"gif"})});case l.TQ.Emoji:return(0,u.jsx)(g,{isSmall:s,children:(0,u.jsx)(m,{src:_,alt:"emoji"})});case l.TQ.ShareWin:var L=a.gameType,N="".concat("https://nar-fg.cchhllpp.net/prd","/images/chat/global/bigWin/").concat("string"==typeof L?L.toLowerCase():l.GN.toLowerCase(),"ShareWin.webp");return(0,u.jsxs)(y,{style:i.shareBigWin,children:[(0,u.jsx)(b,{style:i.shareBigWinImg,src:N,alt:"bigWin"}),(0,u.jsxs)(v,{style:i.shareBigWinInfo,children:[(0,u.jsx)(w,{style:i.shareBigWinCoeff,children:_}),(0,u.jsx)(j,{style:i.shareBigWinText,children:B||"_Winning Odd"})]})]})}}const T=(0,r.memo)(C);C.defaultProps={style:{shareBigWin:{},shareBigWinImg:{},shareBigWinInfo:{},shareBigWinCoeff:{},shareBigWinText:{}},message:{},isSmall:!1,isInput:!1},C.propTypes={style:s().object,message:s().object,isSmall:s().bool,isInput:s().bool}},5108:(e,t,n)=>{n.d(t,{A:()=>Z});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),b=n.n(y),v=n(6295),w=n(4228),x=n(1069),j=n(4848),k=(0,v.getIsMobile)(),I=a().div.withConfig({componentId:"sc-1tebu7b-0"})(['position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;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;}']),S=a().span.withConfig({componentId:"sc-1tebu7b-1"})(["color:var(--white);font:0.75em/1.375 var(--mainFontBold);text-align:center;max-width:",";"],k?"55%":"65%");function C(e){var t=e.style,n=(0,d.shallowSelector)(d.selectResources).strMessageWasBlocked;return(0,j.jsx)(I,{style:t.container,children:(0,j.jsx)(S,{style:t.text,children:n||"_Your message was blocked because of Chat rules violation."})})}const T=(0,r.memo)(C);C.defaultProps={style:{container:{},text:{}}},C.propTypes={style:c().object};var A=n(7420),O="".concat("https://nar-fg.cchhllpp.net/prd","/images/chat/global/loudspeaker.webp"),M=a().div.withConfig({componentId:"sc-pw5lk7-0"})(["display:flex;align-items:center;justify-content:space-between;padding-bottom:0.5em;border-bottom:1px solid rgba(73,73,73,0.32);"]),B=(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);&.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;}"],O,M,O)),P=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-2"})(["padding-top:0.5em;"])),E=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-3"})(["display:flex;align-items:center;"])),_=(0,r.memo)(a().img.withConfig({componentId:"sc-pw5lk7-4"})(["width:1.5em;height:1.5em;border-radius:50%;margin-right:0.5em;"])),L=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-5"})(["display:flex;flex-direction:column;justify-content:center;"])),N=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-6"})(["color:rgb(var(--white));font:0.75em/1.2 var(--mainFont);"])),F=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-7"})(["color:rgba(var(--white),0.48);font:0.625em/1.2 var(--mainFont);"])),U=(0,r.memo)(a().div.withConfig({componentId:"sc-pw5lk7-8"})(["display:flex;align-items:center;gap:0.5em;"])),R=(0,r.memo)(a().button.withConfig({componentId:"sc-pw5lk7-9"})(["display:flex;align-items:center;justify-content:center;flex:1 0 1.875em;height:1.5em;background:rgba(94,94,94,0.2);border:1px solid rgba(97,97,97,0.2);font-size:1em;border-radius:1em;padding:0.25em 0.5em;cursor:pointer;&.isLiked{background:#812c2c;border:1px solid rgba(255,141,141,0.2);}"])),W=a().span.withConfig({componentId:"sc-pw5lk7-10"})(["height:0.875em;width:0.875em;flex:0 0 0.875em;"]),D=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-11"})(["color:rgb(var(--white));margin-left:0.33em;font:0.75em var(--mainFont);"])),z=(0,r.memo)(a().span.withConfig({componentId:"sc-pw5lk7-12"})(["height:1.25em;width:1.25em;margin-right:0.5em;"])),G=function(e){var t=e.message,n=e.style,r=(0,o.useDispatch)(),i=(0,d.shallowSelector)(f.St),a=i.nickName,s=i.isBlocked;return(0,j.jsxs)(B,{style:n.messageItem,className:"\n\t\t\t\t\t".concat(t.nickName===a?"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,j.jsx)(T,{style:n.blockedMessage}),(0,j.jsxs)(M,{style:n.messageHeader,children:[(0,j.jsxs)(E,{style:n.messageUserInfoBlock,children:[t.isInfluencer&&(0,j.jsx)(z,{style:n.messageInfluencerIcon,children:(0,j.jsx)(b(),{})}),(0,j.jsx)(_,{style:n.messageUserAvatar,src:t.avatarUrl,alt:"Avatar"}),(0,j.jsxs)(L,{style:n.messageUserInfo,children:[(0,j.jsx)(N,{style:n.messageUserName,children:(null==t?void 0:t.nickName)||"_User"}),(0,j.jsx)(F,{style:n.messageTime,children:(0,v.getFormattedTime)(null==t?void 0:t.date)||"_date"})]})]}),!s&&a&&(0,j.jsxs)(U,{style:n.messageActionsBlock,children:[(0,j.jsx)(R,{style:n.messageAction,type:"button",onClick:function(){return e=t,void r(f.o1.setReplyMessage(e));var e},children:(0,j.jsx)(W,{children:(0,j.jsx)(g(),{})})},"r_".concat(t.id)),(0,j.jsxs)(R,{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,w.iG)({messageId:e}):(0,w.x8)({messageId:e}));var e,n},children:[(0,j.jsx)(W,{children:(0,j.jsx)(p(),{fillColor:t.isLiked?"#ff6666":"transparent",color:t.isLiked?"#ff6666":"rgb(var(--white))"})}),!!t.likeCount&&(0,j.jsx)(D,{children:t.likeCount})]},"l_".concat(t.id))]})]}),(0,j.jsxs)(P,{style:n.messageBody,children:[t.baseMessage?(0,j.jsx)(A.A,{style:n.repliedMessageBlock,message:t.baseMessage,isSmall:!0}):null,(0,j.jsx)(x.A,{style:n.messageByType,message:t})]})]})};const H=(0,r.memo)(G);function Y(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 Q(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)?Q(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 Q(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,j.jsx)(H,{message:e},e.id)})),p&&(0,j.jsxs)($,{style:t.newMessageBtn,type:"button",onClick:k,children:[(0,j.jsx)(X,{style:t.newMessageBtnText,children:c||"_New message"}),(0,j.jsx)(J,{style:t.chatArrowIconBlock,children:(0,j.jsx)(u(),{})})]})]})}K.defaultProps={style:{container:{},messageItem:{},messageHeader:{},messageUserInfoBlock:{},messageInfluencerIcon:{},messageUserAvatar:{},messageUserInfo:{},messageUserName:{},messageTime:{},messageActionsBlock:{},messageAction:{},messageBody:{},messageByType:{},newMessageBtn:{},chatArrowIconBlock:{},newMessageBtnText:{}}},K.propTypes={style:c().object};const Z=(0,r.memo)(K)},7420:(e,t,n)=>{n.d(t,{A:()=>S});var r=n(4914),o=n(8874),i=n.n(o),a=n(6856),s=n.n(a),c=n(2677),l=n.n(c),u=n(3444),d=n.n(u),f=n(678),m=n(1069),p=n(2153),h=n(3190),g=n(4848),y=i().div.withConfig({componentId:"sc-m5a6mp-0"})(["display:flex;align-items:center;width:100%;"]),b=i().div.withConfig({componentId:"sc-m5a6mp-1"})(["display:flex;flex-direction:column;width:100%;"]),v=i().button.withConfig({componentId:"sc-m5a6mp-2"})(["width:1.625em;height:1.625em;background:transparent;font-size:1em;border:none;cursor:pointer;padding:0;position:absolute;top:50%;transform:translateY(-50%);right:0.5em;"]),w=i().div.withConfig({componentId:"sc-m5a6mp-3"})(["display:flex;align-items:center;margin-bottom:0.25em;"]),x=i().div.withConfig({componentId:"sc-m5a6mp-4"})(["display:flex;align-items:center;justify-content:space-between;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;"," "," "," ",""],(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);}"],b)}),(function(e){return(e.messageType===h.TQ.Emoji||e.messageType===h.TQ.Gif)&&(0,o.css)(["","{flex-direction:row-reverse;justify-content:flex-end;}"],b)}),(function(e){return!e.isInput&&(e.messageType===h.TQ.Emoji||e.messageType===h.TQ.Gif)&&(0,o.css)(["","{margin-bottom:0;}"],w)}),(function(e){return e.messageType===h.TQ.ShareWin&&(0,o.css)(["padding:0.5em;","{margin-bottom:1em;}","{width:100%;max-width:100%;}","{top:0.5em;transform:translateY(0);}"],w,b,v)})),j=(0,r.memo)(i().span.withConfig({componentId:"sc-m5a6mp-5"})(["display:inline-block;height:1em;width:1em;margin-right:0.5em;"])),k=(0,r.memo)(i().p.withConfig({componentId:"sc-m5a6mp-6"})(["color:rgb(var(--white));font:0.75em var(--mainFont);margin:0;"]));function I(e){var t=e.message,n=e.style,r=e.isInput,o=e.isSmall,i=(0,f.useDispatch)();return(0,g.jsxs)(x,{style:n.container,isInput:r,messageType:t.type,children:[(0,g.jsx)(y,{style:n.userInfoBlock,children:(0,g.jsxs)(b,{style:n.userInfo,children:[(0,g.jsxs)(w,{style:n.header,children:[(0,g.jsx)(j,{style:n.repliedIcon,children:(0,g.jsx)(s(),{})}),(0,g.jsx)(k,{style:n.repliedTo,children:t.nickName})]}),(0,g.jsx)(m.A,{style:n.messageByType,message:t,isInput:r,isSmall:o})]})}),r&&(0,g.jsx)(v,{style:n.closeBtn,onClick:function(){return i(p.o1.setReplyMessage({}))},children:(0,g.jsx)(l(),{color:"rgba(var(--white), 0.6)"})})]})}I.defaultProps={style:{container:{},userInfoBlock:{},userInfo:{},header:{},repliedIcon:{},repliedTo:{},closeBtn:{},messageByType:{}}},I.propTypes={style:d().object};const S=(0,r.memo)(I)},8774:(e,t,n)=>{n.d(t,{A:()=>Z});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(7800),y=n(4228),b=n(3190),v=n(2153),w=n(4848);function x(e){return x="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},x(e)}function j(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 k(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),B(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;B(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 S(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(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 C(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 T(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)||A(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 A(e,t){if(e){if("string"==typeof e)return O(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)?O(e,t):void 0}}function O(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;}}"],b.Fr?"8.5625em":"8.6875em"),_=(0,r.memo)(i().img.withConfig({componentId:"sc-fortkv-3"})(["height:",";width:calc((100% / 3) - 0.25em);"],b.Fr?"7.25em":"6.25em")),L=i().div.withConfig({componentId:"sc-fortkv-4"})(["position:relative;margin:0 0.5em;"]),N=i().div.withConfig({componentId:"sc-fortkv-5"})(["display:flex;align-content:center;justify-content:center;margin:1em 0;height:",";"],b.Fr?"1.125em":"1em"),F=i().span.withConfig({componentId:"sc-fortkv-6"})(["position:absolute;height:1.125em;width:1.125em;left:0.5em;top:50%;transform:translateY(-50%);"]),U=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 R(e){var t=e.style,n=(0,f.useDispatch)(),o=(0,r.useRef)(null),i=T((0,r.useState)(""),2),a=i[0],s=i[1],c=T((0,r.useState)(0),2),l=c[0],u=c[1],d=T((0,r.useState)(!1),2),m=d[0],p=d[1],x=T((0,r.useState)([]),2),j=x[0],A=x[1],O=(0,f.useSelector)(v.Rk),R=(0,g.shallowSelector)(g.selectResources).strSearchGIF,W="".concat("https://nar-fg.cchhllpp.net/prd","/images/chat/").concat(b.Fr?"mobile":"desktop","/poweredByGiphy.webp"),D=function(){var e,t=(e=I().mark((function e(t){var n,r,o,i,a,s,c=arguments;return I().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,M.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,M.trending({offset:n,limit:20});case 12:a=e.sent,s=a.data,r=s;case 15:A(0===n?r:function(e){return[].concat(S(e),S(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){C(i,r,o,a,s,"next",e)}function s(e){C(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e){return t.apply(this,arguments)}}(),z=function(){var e=o.current;e&&e.scrollTop+e.clientHeight>=e.scrollHeight-10&&!m&&(p(!0),D(a,l))};return(0,r.useEffect)((function(){D("")}),[]),(0,r.useEffect)((function(){var e=o.current;return e.addEventListener("scroll",z),function(){e.removeEventListener("scroll",z)}}),[j,m]),(0,w.jsxs)(B,{style:t.container,children:[(0,w.jsxs)(L,{style:t.searchBlock,children:[(0,w.jsx)(F,{style:t.searchIcon,children:(0,w.jsx)(h(),{})}),(0,w.jsx)(U,{type:"text",style:t.searchInput,value:a,onChange:function(e){var t;s(e.target.value),t=e.target.value,u(0),D(t)},placeholder:R||"_Search GIF"})]}),(0,w.jsx)(N,{style:t.poweredByGiphy,children:(0,w.jsx)("img",{src:W,alt:"Powered by Giphy"})}),(0,w.jsx)(P,{style:t.gifsContainer,children:(0,w.jsx)(E,{style:t.gifs,ref:o,children:j.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,w.jsx)(_,{onClick:function(e){return function(e,t){t.preventDefault(),t.stopPropagation(),(0,y._z)({content:e,type:b.TQ.Gif,baseMessageId:null==O?void 0:O.id}),null!=O&&O.content&&n(v.o1.setReplyMessage({}))}(i,e)},src:i,style:k(k({},t.gif),{},{cursor:"pointer"}),alt:"gif"},e.id)}))})})]})}const W=(0,r.memo)(R);R.defaultProps={style:{container:{},searchBlock:{},searchIcon:{},searchInput:{},gifsContainer:{},poweredByGiphy:{},gifs:{},gif:{}}},R.propTypes={style:s().object};var D=i().div.withConfig({componentId:"sc-10hs9b2-0"})(["display:flex;justify-content:center;margin:1em 0.25em 0;"]),z=i().div.withConfig({componentId:"sc-10hs9b2-1"})(["display:flex;flex-wrap:wrap;align-content:start;overflow:auto;flex:0 0 100%;width:100%;height:13.375em;gap:0.25em;padding:0 0.625em;&::-webkit-scrollbar{width:0.125em;height:0.125em;}&::-webkit-scrollbar-track-piece{background-color:transparent;}&::-webkit-scrollbar-thumb:vertical{height:0.3125em;background:#66462d;border-radius:0.1875em;}"]),G=i().div.withConfig({componentId:"sc-10hs9b2-2"})(["width:",";height:",";cursor:pointer;"],b.Fr?"calc((100% / 4) - 0.25em)":"calc((100% / 5) - 0.25em)",b.Fr?"5.375em":"3.5em"),H=i().img.withConfig({componentId:"sc-10hs9b2-3"})(["width:100%;height:100%;object-fit:contain;"]);function Y(e){var t=e.style,n=(0,f.useDispatch)(),r=(0,g.shallowSelector)(v.Uu),o=(0,g.shallowSelector)(v.Rk);return(0,w.jsx)(D,{style:t.emojisContainer,children:(0,w.jsx)(z,{style:t.emojis,children:r.map((function(e){var r=e.id,i=(e.name,e.url);return(0,w.jsx)(G,{style:t.emoji,onClick:function(){return function(e){(0,y._z)({content:e,type:b.TQ.Emoji,baseMessageId:null==o?void 0:o.id}),null!=o&&o.content&&n(v.o1.setReplyMessage({}))}(i)},children:(0,w.jsx)(H,{style:t.img,src:i,alt:"emoji"})},"emoji_".concat(r))}))})})}const Q=(0,r.memo)(Y);function q(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:()=>c});var r=n(6295),o=n(9133);function i(e){return i="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},i(e)}function a(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;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))}}}}]);