iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: https://static.tradingview.com/static/bundles/53104.c241a14a985dc8ad3682.js
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[53104,9859],{770442:e=>{e.exports={tabsContainer:"tabsContainer-tL9o0CPj"}},60043:e=>{e.exports={card:"card-cSATnK2X",hidden:"hidden-cSATnK2X",content:"content-cSATnK2X"}},995082:e=>{e.exports={cards:"cards-VoAlinkR",filmstripItems:"filmstripItems-VoAlinkR",emptyStateIcon:"emptyStateIcon-VoAlinkR",emptyStateContainer:"emptyStateContainer-VoAlinkR"}},332611:e=>{e.exports={card:"card-Gmn0iifS",content:"content-Gmn0iifS",arrow:"arrow-Gmn0iifS",wrap:"wrap-Gmn0iifS",text:"text-Gmn0iifS"}},698110:e=>{e.exports={container:"container-yrIMi47q",title:"title-yrIMi47q",title_normal:"title_normal-yrIMi47q",icon:"icon-yrIMi47q",text:"text-yrIMi47q",text_large:"text_large-yrIMi47q",action:"action-yrIMi47q"}},91185:e=>{e.exports={preview:"preview-qDpqIVTJ",content:"content-qDpqIVTJ",title:"title-qDpqIVTJ",description:"description-qDpqIVTJ",descriptionLine:"descriptionLine-qDpqIVTJ",info:"info-qDpqIVTJ",infoBlock:"infoBlock-qDpqIVTJ",infoBlockLine:"infoBlockLine-qDpqIVTJ",infoControl:"infoControl-qDpqIVTJ",infoControlLine:"infoControlLine-qDpqIVTJ"}},121167:e=>{e.exports={squareTabButton:"squareTabButton-huvpscfz",selected:"selected-huvpscfz",disableActiveStateStyles:"disableActiveStateStyles-huvpscfz",disableFocusOutline:"disableFocusOutline-huvpscfz",xlarge:"xlarge-huvpscfz",tabHiddenContent:"tabHiddenContent-huvpscfz",medium:"medium-huvpscfz",small:"small-huvpscfz",xsmall:"xsmall-huvpscfz",fake:"fake-huvpscfz",content:"content-huvpscfz",tabContent:"tabContent-huvpscfz"}},535140:e=>{e.exports={arrowIcon:"arrowIcon-nV6fm1zO",dropped:"dropped-nV6fm1zO"}},550650:e=>{e.exports={"css-value-square-tabs-xsmall-gap":"4px","css-value-square-tabs-small-gap":"8px","css-value-square-tabs-medium-gap":"12px","css-value-square-tabs-xlarge-gap":"12px"}},558215:e=>{e.exports={"css-value-square-tabs-xsmall-gap":"4px","css-value-square-tabs-small-gap":"8px","css-value-square-tabs-medium-gap":"12px","css-value-square-tabs-xlarge-gap":"12px",scrollWrap:"scrollWrap-mf1FlhVw",enableScroll:"enableScroll-mf1FlhVw",squareTabs:"squareTabs-mf1FlhVw",content:"content-mf1FlhVw",xsmall:"xsmall-mf1FlhVw",squareTabButton:"squareTabButton-mf1FlhVw",endSlotWrap:"endSlotWrap-mf1FlhVw",small:"small-mf1FlhVw",medium:"medium-mf1FlhVw",xlarge:"xlarge-mf1FlhVw"}},718083:(e,t,a)=>{"use strict";a.d(t,{useDisclosure:()=>c});var i=a(50959),n=a(650151),s=a(607423),o=a(405964),l=a(763341),r=a(481058);function c(e){const{id:t,listboxId:a,disabled:c,buttonTabIndex:d=0,onFocus:u,onBlur:m,onClick:h}=e,[b,p]=(0,i.useState)(!1),[v,f]=(0,o.useFocus)(),g=v||b,S=a??void 0!==t?(0,r.createDomId)(t,"listbox"):void 0,E=(0,i.useRef)(null),T=(0,i.useCallback)((e=>E.current?.focus(e)),[E]),I=(0,i.useRef)(null),w=(0,i.useCallback)((()=>(0,n.ensureNotNull)(I.current).focus()),[I]),C=(0,i.useCallback)((()=>p(!0)),[p]),y=(0,i.useCallback)(((e=!1,t=!1)=>{p(!1);const{activeElement:a}=document;a&&(0,s.isTextEditingField)(a)||t||T({preventScroll:e})}),[p,T]),_=(0,i.useCallback)((()=>{b?y():C() }),[b,y,C]),k=c?[]:[u,f.onFocus],B=c?[]:[m,f.onBlur],x=c?[]:[h,_],A=(0,l.createSafeMulticastEventHandler)(...k),M=(0,l.createSafeMulticastEventHandler)(...B),L=(0,l.createSafeMulticastEventHandler)(...x);return{listboxId:S,isOpened:b,isFocused:g,buttonTabIndex:c?-1:d,listboxTabIndex:-1,open:C,close:y,toggle:_,onOpen:w,buttonFocusBindings:{onFocus:A,onBlur:M},onButtonClick:L,buttonRef:E,listboxRef:I,buttonAria:{"aria-controls":b?S:void 0,"aria-expanded":b,"aria-disabled":c}}}},499408:(e,t,a)=>{"use strict";a.d(t,{useKeepActiveItemIntoView:()=>o});var i=a(50959),n=a(650151),s=a(266329);function o(e={}){const{activeItem:t,getKey:a,...o}=e,l=(0,i.useRef)(null),r=(0,i.useRef)(new Map),c=(0,s.useScrollIntoViewHelper)(l.current),d=(0,i.useCallback)((()=>{null!==c.current&&null!==l.current&&c.current.getContainer()!==l.current&&c.current.setContainer(l.current)}),[c,l]),u=(0,i.useCallback)((e=>{l.current=e}),[l]),m=(0,i.useCallback)(((e,t)=>{const i=a?a(e):e;t?r.current.set(i,t):r.current.delete(i)}),[r,a]),h=(0,i.useCallback)(((e,t)=>{if(!e)return;const i=a?a(e):e,s=r.current.get(i);s&&(d(),(0,n.ensureNotNull)(c.current).scrollTo(s,t))}),[r,c,a]);return(0,i.useEffect)((()=>h(t,o)),[h,t]),[u,m,h]}},846503:(e,t,a)=>{"use strict";a.d(t,{useMobileTouchState:()=>s});var i=a(50959),n=a(167175);function s(){const[e,t]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{t(n.mobiletouch)}),[]),e}},266329:(e,t,a)=>{"use strict";a.d(t,{useScrollIntoViewHelper:()=>u});var i=a(50959),n=a(650151),s=a(315949);const o={duration:200,additionalScroll:0},l={vertical:{scrollSize:"scrollHeight",clientSize:"clientHeight",start:"top",end:"bottom",size:"height"},horizontal:{scrollSize:"scrollWidth",clientSize:"clientWidth",start:"left",end:"right",size:"width"}};function r(e,t){const a=l[e];return t[a.scrollSize]>t[a.clientSize]}function c(e,t,a,i,n,o){const r=function(e,t,a,i=0){const n=l[e];return{start:-1*i,middle:-1*(Math.floor(a[n.size]/2)-Math.floor(t[n.size]/2)),end:-1*(a[n.size]-t[n.size])+i}}(e,i,n,o.additionalScroll);let c=0;if(o.snapToMiddle||function(e,t,a){const i=l[e];return t[i.start]a[i.end]+a[i.size]/2}(e,i,n))c=r.middle;else{const t=function(e,t,a,i=0){const n=l[e],s=t[n.start]+Math.floor(t[n.size]/2),o=a[n.start]+Math.floor(a[n.size]/2);return{start:t[n.start]-a[n.start]-i,middle:s-o,end:t[n.end]-a[n.end]+i}}(e,i,n,o.additionalScroll),a=function(e){const{start:t,middle:a,end:i}=e,n=new Map([[Math.abs(t),{key:"start",value:Math.sign(t)}],[Math.abs(a),{key:"middle",value:Math.sign(a)}],[Math.abs(i),{key:"end",value:Math.sign(i)}]]),s=Math.min(...n.keys());return n.get(s)}(t);c=void 0!==a?r[a.key]:0}return o.align&&(c=r[o.align]),(0,s.scrollTo)({...o,target:t,targetRect:i,wrap:a,wrapRect:n,additionalScroll:c,direction:e})}class d{constructor(e=null){this._container=null,this._lastScrolledElement=null,this._stopVerticalScroll=null,this._stopHorizontalScroll=null,this._container=e}scrollTo(e,t=o){if(null!==this._container&&null!==e&&!function(e,t,a=0){ const i=e.getBoundingClientRect(),n=t.getBoundingClientRect();return i.top-n.top>=0&&n.bottom-i.bottom>=0&&i.left-n.left>=a&&n.right-i.right>=a}(e,this._container,t.visibilityDetectionOffsetInline)){const a=e.getBoundingClientRect(),i=this._container.getBoundingClientRect();this.stopScroll(),r("vertical",this._container)&&(this._stopVerticalScroll=c("vertical",e,this._container,a,i,this._modifyOptions("vertical",t))),r("horizontal",this._container)&&(this._stopHorizontalScroll=c("horizontal",e,this._container,a,i,this._modifyOptions("horizontal",t)))}this._lastScrolledElement=e}scrollToLastElement(e){this.scrollTo(this._lastScrolledElement,e)}stopScroll(){null!==this._stopVerticalScroll&&this._stopVerticalScroll(),null!==this._stopHorizontalScroll&&this._stopHorizontalScroll()}getContainer(){return this._container}setContainer(e){this._container=e,this._container?.contains(this._lastScrolledElement)||(this._lastScrolledElement=null)}destroy(){this.stopScroll(),this._container=null,this._lastScrolledElement=null}_handleScrollEnd(e){"vertical"===e?this._stopVerticalScroll=null:this._stopHorizontalScroll=null}_modifyOptions(e,t){return Object.assign({},t,{onScrollEnd:()=>{this._handleScrollEnd(e),void 0!==t.onScrollEnd&&t.onScrollEnd()}})}}function u(e){const t=(0,i.useRef)(null);return(0,i.useEffect)((()=>(t.current=new d(e),()=>(0,n.ensureNotNull)(t.current).destroy())),[]),t}},325520:(e,t,a)=>{"use strict";a.d(t,{useTabs:()=>p});var i=a(50959),n=a(997382),s=a(763341),o=a(405964),l=a(499408),r=a(650151),c=a(283657),d=a(507017);function u(){return!1}function m(e){const{activationType:t="manual"}=e,a=(0,i.useMemo)((()=>t),[]);return(0,r.assert)(t===a,"Activation type must be invariant."),"automatic"===t?function(e){const{isRtl:t,items:a,preventDefaultIfHandled:n=!0,isHighlighted:s,onHighlight:o,onActivate:l,isCollapsed:r=u,orientation:m}=e,h=(0,i.useCallback)((e=>{o(e),r(e)||l(e)}),[o,l,r]);return(0,c.useKeyboardEventHandler)([(0,d.useItemsKeyboardNavigation)(m,t,a,s,h,!0)],n)}(e):function(e){const{isRtl:t,items:a,preventDefaultIfHandled:n=!0,isHighlighted:s,onHighlight:o,onActivate:l,orientation:r}=e,u=a.find(s),m=(0,i.useCallback)((()=>{void 0!==u&&l(u)}),[u,l]),h=(0,i.useCallback)((e=>o(e)),[o]),b=(0,d.useItemsKeyboardNavigation)(r,t,a,s,h,!0),p=(0,c.useKeyboardActionHandler)([13,32],m);return(0,c.useKeyboardEventHandler)([b,p],n)}(e)}var h=a(846503);const b=24;function p(e){const{id:t,items:a,orientation:r,activationType:c="manual",disabled:d,tablistLabelId:u,tablistLabel:p,focusOnHighlight:v=!0,preventDefaultIfKeyboardActionHandled:f=!0,scrollIntoViewOptions:g,isActive:S,onActivate:E,isCollapsed:T,isRtl:I,isDisclosureOpened:w,isRadioGroup:C}=e,y=(0,h.useMobileTouchState)(),_=w?null:r||"horizontal",k=(0,i.useRef)(e.itemsRefs?.current??new Map),[B,x]=(0,i.useState)(),[A,M]=(0,o.useFocus)(),L=a.find(S),V=(0,i.useCallback)((e=>!d&&!e.disabled&&e===B),[d,B]),N=(0,i.useCallback)((e=>{const t=k.current.get(e);v&&void 0!==t&&t!==document.activeElement&&t.focus()}),[v]),R=(0,i.useRef)(),q=(0,i.useCallback)(((e,t)=>{ d||e.disabled||(x(e),"number"==typeof t?(clearTimeout(R.current),R.current=setTimeout((()=>N(e)),t)):N(e))}),[d,x,N,w]),H=(0,i.useCallback)((e=>{d||e.disabled||(E(e),V(e)||q(e))}),[d,E,V,q]),P=m({isRtl:I,items:(0,i.useMemo)((()=>a.filter((e=>!d&&!e.disabled))),[a,d]),activationType:c,preventDefaultIfHandled:f,onActivate:H,isHighlighted:V,onHighlight:q,isCollapsed:T,orientation:_}),D=(0,i.useCallback)((e=>{let t=null;for(const[a,i]of k.current.entries())if(e.target===i){t=a;break}t&&!V(t)&&("automatic"===c&&T&&!T(t)?H(t):q(t))}),[c,V,q,H,T]);(0,i.useEffect)((()=>{y||void 0!==L&&x(L)}),[L,y]),(0,i.useEffect)((()=>{A||x(void 0)}),[A]),(0,i.useEffect)((()=>()=>clearTimeout(R.current)),[]);const O=g?.additionalScroll??0,[z,F]=(0,l.useKeepActiveItemIntoView)({...g,visibilityDetectionOffsetInline:O+b,snapToMiddle:!0,activeItem:B??L,getKey:(0,i.useCallback)((e=>e.id),[])}),Z=(0,i.useCallback)(((e,t)=>{F(e,t),null!==t?k.current.set(e,t):k.current.delete(e)}),[F]);return{tabsBindings:a.map((e=>{const t=V(e),a=S(e),i=e.disabled??d??!1,s=!i&&(A?t:a);return{...(0,n.getTabAttributes)(e.id,s,a,e.tabpanelId,i,C,""),highlighted:t,active:a,handleItemRef:Z}})),tablistBinding:{...(0,n.getTabListAttributes)(t,r,d,u,p,C),onBlur:M.onBlur,onFocus:(0,s.createSafeMulticastEventHandler)(M.onFocus,D),onKeyDown:P},scrollWrapBinding:{ref:z},onActivate:H,onHighlight:q,isHighlighted:V}}},997382:(e,t,a)=>{"use strict";function i(e,t="horizontal",a,i,n,s){return{id:e,role:s?"radiogroup":"tablist","aria-orientation":t,"aria-label":n,"aria-labelledby":i,"aria-disabled":a}}function n(e,t,a,i,n,s,o){return{id:e,role:s?"radio":"tab",tabIndex:t?0:-1,disabled:n,"aria-selected":s?void 0:a,"aria-checked":s?a:void 0,"aria-controls":i,"aria-disabled":n,"aria-label":o}}var s;a.d(t,{TabNames:()=>s,getTabAttributes:()=>n,getTabListAttributes:()=>i}),function(e){e.SquareButtonTabs="square-button-tabs",e.UnderlineButtonTabs="underline-button-tabs",e.UnderlineAnchorTabs="underline-anchor-tabs",e.RoundAnchorTabs="round-anchor-tabs",e.RoundButtonTabs="round-button-tabs",e.LightButtonTabs="light-button-tabs"}(s||(s={}))},315949:(e,t,a)=>{"use strict";a.d(t,{scrollTo:()=>n});var i=a(745269);function n(e){const{additionalScroll:t=0,duration:a=i.dur,func:n=i.easingFunc.easeInOutCubic,onScrollEnd:s,target:o,wrap:l,direction:r="vertical"}=e;let{targetRect:c,wrapRect:d}=e;c=c??o.getBoundingClientRect(),d=d??l.getBoundingClientRect();const u=("vertical"===r?c.top-d.top:c.left-d.left)+t,m="vertical"===r?"scrollTop":"scrollLeft",h=l?l[m]:0;let b,p=0;return p=window.requestAnimationFrame((function e(t){let i;if(b?i=t-b:(i=0,b=t),i>=a)return l[m]=h+u,void(s&&s());const o=h+u*n(i/a);l[m]=Math.floor(o),p=window.requestAnimationFrame(e)})),function(){window.cancelAnimationFrame(p),s&&s()}}},143813:(e,t,a)=>{"use strict";a.d(t,{AdvertisementContainer:()=>n});var i=a(50959);const n=(0,i.forwardRef)(((e,t)=>{const{children:a,childrenCount:n}=e;return i.createElement("div",{ref:t,style:void 0!==n?{"--filmstrip-right-button-order":n}:void 0},a)}))},552698:(e,t,a)=>{"use strict";a.d(t,{ BlockWrapperTabbed:()=>l});var i=a(50959),n=a(251661),s=a(371123),o=a(770442);function l(e){const t=(0,i.useCallback)((t=>{e.tabsConfig?.onTabClick(t.id)}),[e.tabsConfig?.onTabClick]),a=(0,i.useCallback)((t=>t.id===e.tabsConfig?.selectedTabId),[e.tabsConfig?.selectedTabId]);return i.createElement(s.CmsBaseWidget,{id:e.id,header:e.header,subheader:e.subheader,size:e.size,footer:e.footer},(l=e.tabsConfig,Boolean(l&&l.tabs.length>1)&&i.createElement("div",{className:o.tabsContainer},i.createElement(n.SquareTabs,{id:e.tabsConfig.id,items:e.tabsConfig.tabs,onActivate:t,isActive:a,size:"medium"}))),e.children(e.items,e.tabsConfig?.selectedTabId));var l}},60346:(e,t,a)=>{"use strict";a.d(t,{AdvertisementCard:()=>d});var i=a(50959),n=a(497754),s=a.n(n),o=a(579452),l=a(795688),r=a(304698),c=a(60043);function d(e){const t=(0,i.useRef)(null),[a,n]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!1),{fallBackItem:m,fallBackFunction:h,onDisplay:b}=e;return(0,i.useEffect)((()=>{!async function(){if(!t.current)return;const e=(await(0,r.mainIdeaFeedAd)())();if(!await e.enabled())return h?.(),u(!0),void(b&&b(!0));e.slot().setPlacement(o.Placement.MainPage).setUnit(o.AdUnit.NewMainIdeasStream).setTargeting("placement",o.PlacementTargeting.MainPage);const a=await e.build();a.empty.then((e=>{e?(a.destroy(),h?.(),u(!0)):window.loginStateChange.subscribe(null,(()=>{window.is_authenticated&&(0,l.enabled)("NO_SPONSORED_ADS")&&(h?.(),n(!1))}),!0),b&&b(!e)})),a.load.then((()=>{n(!0)})),t.current.id=a.id,a.render()}()}),[]),d&&m?m:i.createElement("div",{className:s()(c.card,e.className,!a&&c.hidden)},i.createElement("div",{className:c.content,ref:t}))}},616461:(e,t,a)=>{"use strict";a.d(t,{getCardsContent:()=>u});var i=a(50959),n=a(539351),s=a(686011),o=a(830493),l=a(91185);function r(e){return i.createElement(s.ImageCard,{stretchLinkTitleMode:"outline-only",style:e.style},i.createElement("div",{className:l.content},i.createElement("div",{className:l.title}),i.createElement("div",{className:l.description},i.createElement("div",{className:l.descriptionLine}),i.createElement("div",{className:l.descriptionLine})),i.createElement("div",{className:l.info},i.createElement("div",{className:l.infoBlock},i.createElement("div",{className:l.infoBlockLine}),i.createElement("div",{className:l.infoBlockLine})),i.createElement("div",{className:l.infoControl},i.createElement("div",{className:l.infoControlLine}),i.createElement("div",{className:l.infoControlLine})))),i.createElement(o.Preview,{className:l.preview,resizeMode:o.PreviewResizeMode.Ratio16by9}))}var c=a(759875),d=a(60346);function u(e,t,a,s=0,o=!1){const l=[];if(e.length)for(let t=0;t{"use strict";a.d(t,{SET_IS_EDUCATIONS:()=>s,SET_IS_HOT:()=>l,SET_IS_PICKED:()=>r,SET_IS_PUBLIC:()=>o,SET_IS_VISIBLE:()=>n,SET_LIKES:()=>c,SET_SELECTED_TAB:()=>i,SET_STATE:()=>d});const i="SET_SELECTED_TAB",n="SET_IS_VISIBLE",s="SET_IS_EDUCATIONS",o="SET_IS_PUBLIC",l="SET_IS_HOT",r="SET_IS_PICKED",c="SET_LIKES",d="SET_STATE"},540986:(e,t,a)=>{"use strict";a.d(t,{ideaFromDto:()=>s});var i=a(736421),n=a(783359);function s(e){return{id:e.id,imageUrl:e.image_url,authorName:e.user.username,authorId:e.user.id,authorProfileHref:(0,i.getUserProfilePath)({username:e.user.username,is_broker:e.user.is_broker}),commentsHref:`${e.chart_url}#chart-view-comment-form`,publicationTimestamp:1e3*e.date_timestamp,...void 0!==e.updated_date_timestamp&&null!==e.updated_date_timestamp?{updatedPublicationTimestamp:1e3*e.updated_date_timestamp}:{},imageSources:[{srcSet:e.image.middle_webp||void 0,type:"image/webp"}],imageFallbackSrc:e.image.middle,imageBackgroundColor:e.image.bg_color||void 0,symbolLogoUrls:e.symbol.logo_urls,symbolShortName:e.symbol.short_name,symbolPageHref:e.symbol.badge.url||void 0,symbolLogoAlt:e.symbol.badge.label,name:e.name,title:e.name,href:e.chart_url,isLiked:e.is_liked,likesCount:e.likes_count,commentsCount:e.comments_count,isEditorsPick:e.is_picked,isPublic:e.is_public,isRemovable:!1,isVisible:e.is_visible,isEducation:e.is_education,isHot:e.is_hot,scriptType:e.script_type?o(e.script_type):void 0,isVideoIdea:e.is_video,durationMs:e.video_duration?1e3*parseInt(e.video_duration):void 0,ideaStrategy:c(e),brokerPlan:e.user.broker_plan?e.user.broker_plan:void 0,permissions:{can_pick_ideas:Boolean(e.actions?.could_be_picked),can_moderate_ideas:Boolean(e.actions?.could_be_moderated)},moderatorButtons:[],...void 0!==e.reputation&&null!==e.reputation?{reputationEntries:l(e.reputation)}:{},description:e.description}}function o(e){switch(e){case"strategy":return n.ScriptType.Strategy;case"indicator":return n.ScriptType.Indicator;case"library":return n.ScriptType.Library;default:return}}function l(e){if(e)return[{label:"Total",value:e.total.toString(),childEntries:[{...r(e.ratings,"Ratings")},{...r(e.comments,"Comments")},{...r(e.age,"Age")}]},{...r(e.views,"Views")}]}function r(e,t){return{label:t,value:e.complete?.toString()||"-",secondaryValue:e.raw?.toString()||"-"}}function c(e){if(!e.is_script)return e.is_education?"education":1===e.symbol.direction?"long":2===e.symbol.direction?"short":void 0}},759875:(e,t,a)=>{"use strict";a.d(t,{DEFAULT_THEME:()=>l,SeeAllCard:()=>r});var i=a(50959),n=a(79205),s=a(778844),o=a(332611);const l=o;function r(e){const{children:t,style:a,theme:o=l,...r}=e,c="href"in r?"a":"div";return i.createElement(c,{className:o.card,style:a,...r},i.createElement("p",{className:o.content},i.createElement("span",{className:o.wrap},i.createElement("span",{className:o.text},t)," ",i.createElement(n.Icon,{className:o.arrow,icon:s}))))}},655358:(e,t,a)=>{"use strict";a.d(t,{useCardsWithTabsData:()=>S}) ;var i=a(50959),n=a(664349),s=a(650151),o=a(840021);function l(e,t){switch(t.type){case o.SET_STATE:return t.payload;case o.SET_SELECTED_TAB:return{...e,selectedTabId:t.payload};case o.SET_IS_VISIBLE:case o.SET_IS_EDUCATIONS:case o.SET_IS_PUBLIC:case o.SET_IS_HOT:case o.SET_IS_PICKED:case o.SET_LIKES:const a=new Map;return e.tabsData.forEach(((e,i)=>{const n=e.map((e=>e.id===t.payload.id?{...e,...t.payload}:e));a.set(i,n)})),{...e,tabsData:a};default:return e}}const r=e=>({type:o.SET_STATE,payload:e}),c=e=>({type:o.SET_SELECTED_TAB,payload:e}),d=e=>({type:o.SET_IS_VISIBLE,payload:e}),u=e=>({type:o.SET_IS_EDUCATIONS,payload:e}),m=e=>({type:o.SET_IS_PUBLIC,payload:e}),h=e=>({type:o.SET_IS_HOT,payload:e}),b=e=>({type:o.SET_IS_PICKED,payload:e}),p=e=>({type:o.SET_LIKES,payload:e});var v=a(292039),f=a(516049);function g(e){const t=new Map,a=new Map,i=[];return e.forEach((e=>{t.set(e.id,e.items);const{readMoreLink:n,readMoreTitle:s}=e.readMoreData;t.set(e.id,e.items),a.set(e.id,{readMoreLink:n,readMoreTitle:s}),i.push({id:e.id,label:e.label})})),{tabsData:t,tabsReadMoreData:a,buttons:i}}function S(e,t,a,o){const S=(0,i.useMemo)((()=>g(t)),[t]);S.tabsData.has(e)||([e]=S.tabsData.keys());const[E,T]=(0,i.useReducer)(l,{selectedTabId:e,tabsData:S.tabsData}),I=(0,s.ensureDefined)(E.tabsData.get(E.selectedTabId)).map((e=>({...e,moderatorButtons:(0,v.getIdeaCardModerateButtons)({...e,setIsPicked:C,setIsEducation:y,setIsVisible:_,setIsHot:k,setIsPublic:B}),onLikeClick:()=>x(e)}))),w={id:a,tabs:S.buttons,selectedTabId:E.selectedTabId,onTabClick:e=>o?async function(e,t,a){if(t===E.selectedTabId)return;const i=await a();T(r({selectedTabId:t,tabsData:g(i).tabsData}))}(0,e,o):function(e,t){if(t===E.selectedTabId)return;T(c(t))}(0,e)};return{selectedTabId:E.selectedTabId,tabData:I,tabsConfig:w,readMoreData:(0,s.ensureDefined)(S.tabsReadMoreData.get(E.selectedTabId))};function C(e){T(b({id:e.id,isEditorsPick:e.isEditorsPick}))}function y(e){T(u({id:e.id,isEducation:e.isEducation}))}function _(e){T(d({id:e.id,isVisible:e.isVisible}))}function k(e){T(h({id:e.id,isHot:e.isHot}))}function B(e){T(m({id:e.id,isPublic:e.isPublic}))}function x(e){if(!window.is_authenticated)return void window.runOrSignIn((()=>x(e)),{source:"Click idea like button"});if(!e.imageUrl)return;const t={id:e.id,isLiked:!e.isLiked,likesCount:(e.likesCount||0)+(e.isLiked?-1:1)};T(p(t)),(0,n.handleLikeIdea)(e.imageUrl,t.isLiked).catch((t=>{throw(0,n.isLikesRateLimitError)(t)&&(0,f.showLikesRateLimitWarning)(),T(p(e)),t})).then((t=>{t&&T(p({id:e.id,isLiked:(0,n.getLikeResult)(t.result),likesCount:t.score}))}))}}},898960:(e,t,a)=>{"use strict";a.d(t,{EmptyStateBlock:()=>r});var i=a(50959),n=a(497754),s=a.n(n),o=a(698110);function l(e){const{title:t,tagName:a,titleSize:n}=e,l=a||"strong";return i.createElement(l,{className:s()(o.title,o[`title_${n}`])},t)}function r(e){return i.createElement("div",{className:n(o.container,e.className)},i.createElement("div",{className:n(o.icon,e.iconClass)}),e.title&&i.createElement(l,{title:e.title,titleSize:e.titleSize, tagName:e.titleTagName}),e.text&&i.createElement("div",{className:n(o.text,"large"===e.textSize&&o.text_large)},e.text),e.action&&i.createElement("div",{className:o.action},e.action))}},664349:(e,t,a)=>{"use strict";a.r(t),a.d(t,{getLikeResult:()=>c,handleLikeIdea:()=>l,handleVoidRequest:()=>o,isLikesRateLimitError:()=>r,toggleIdeaModerateState:()=>s});var i,n=a(389559);async function s(e,t){const a=new FormData;a.append("id",e.id.toString()),a.append("type",i[t]),a.append("set_on",`${!e[t]}`);try{return await o("/moderate_idea/",a),{...e,[t]:!e[t]}}catch(t){return e}}async function o(e,t){const a=await fetch(e,{method:"POST",body:t});try{const e=await a.json();return a.ok?e:Promise.reject(new n.APIError(a.status,e))}catch{return Promise.reject(new n.APIError(a.status,{}))}}async function l(e,t){const a=await fetch(`/api/v1/ideas/${e}/like/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:+t})});try{const e=await a.json();return a.ok?e:Promise.reject(new n.APIError(a.status,e))}catch{return Promise.reject(new n.APIError(a.status,{}))}}function r(e){return e instanceof n.APIError&&"rate_limit"===e.payload.code}function c(e){return"like"===e}!function(e){e.isVisible="recommend",e.isEducation="education",e.isHot="hot",e.isPublic="public",e.isEditorsPick="pick"}(i||(i={}))},292039:(e,t,a)=>{"use strict";a.d(t,{getIdeaCardModerateButtons:()=>f});var i=a(444372),n=a(664349),s=a(501601),o=a(794065),l=a(867683),r=a(564930),c=a(72701),d=a(486988),u=a(308280),m=a(401715),h=a(72100),b=a(640526),p=a(849862),v=a(886886);function f(e){const{isEducation:t,isPublic:f,isVisible:g,isHot:S,isEditorsPick:E,permissions:T,authorName:I,href:w,setIsPicked:C,setIsEducation:y,setIsVisible:_,setIsHot:k,setIsPublic:B}=e,x=[];return T.can_pick_ideas&&x.push({isSelected:Boolean(E),title:Boolean(E)?i.t(null,void 0,a(52293)):i.t(null,void 0,a(228418)),"aria-label":i.t(null,void 0,a(52293)),iconOnly:!0,startIcon:Boolean(E)?l:o,onClick:()=>(0,n.toggleIdeaModerateState)(e,"isEditorsPick").then(C).catch(C)}),T.can_moderate_ideas&&x.push({isSelected:Boolean(t),title:Boolean(t)?i.t(null,void 0,a(852484)):i.t(null,void 0,a(298822)),"aria-label":i.t(null,void 0,a(852484)),iconOnly:!0,startIcon:Boolean(t)?c:r,onClick:()=>(0,n.toggleIdeaModerateState)(e,"isEducation").then(y).catch(y)},{isSelected:Boolean(g),title:Boolean(g)?i.t(null,void 0,a(439836)):i.t(null,void 0,a(852638)),"aria-label":i.t(null,void 0,a(439836)),iconOnly:!0,startIcon:Boolean(g)?u:d,onClick:()=>(0,n.toggleIdeaModerateState)(e,"isVisible").then(_).catch(_)},{isSelected:Boolean(S),title:Boolean(S)?i.t(null,void 0,a(306491)):i.t(null,void 0,a(821020)),"aria-label":i.t(null,void 0,a(306491)),iconOnly:!0,startIcon:Boolean(S)?h:m,onClick:()=>(0,n.toggleIdeaModerateState)(e,"isHot").then(k).catch(k)},{isSelected:Boolean(f),title:Boolean(f)?i.t(null,void 0,a(236906)):i.t(null,void 0,a(963308)),"aria-label":i.t(null,void 0,a(236906)),iconOnly:!0,startIcon:Boolean(f)?p:b,onClick:()=>(0,n.toggleIdeaModerateState)(e,"isPublic").then(B).catch(B)},{isSelected:!0, title:i.t(null,void 0,a(294830)),"aria-label":i.t(null,void 0,a(294830)),iconOnly:!0,startIcon:v,onClick:()=>(0,s.noteForAuthor)(I,w)}),x}},516049:(e,t,a)=>{"use strict";a.r(t),a.d(t,{showLikesRateLimitWarning:()=>s});var i=a(444372),n=a(779923);function s(){(0,n.showWarning)({title:i.t(null,void 0,a(560007)),text:i.t(null,void 0,a(963929)),buttonText:i.t(null,void 0,a(515462))})}},251661:(e,t,a)=>{"use strict";a.d(t,{SquareTabs:()=>i.SquareTabs});var i=a(365847);a(50959),a(264882);a(549138)},549138:(e,t,a)=>{"use strict";a.d(t,{SquareTabContent:()=>s});var i=a(50959),n=(a(586240),a(435697),a(558215));function s({endSlot:e,children:t,className:a,"aria-hidden":s}){return i.createElement("span",{"aria-hidden":s,className:a},t&&i.createElement("span",{className:n.content},t),e&&i.createElement("span",{className:n.endSlotWrap},e))}},264882:(e,t,a)=>{"use strict";a.d(t,{SquareTabsImpl:()=>_});var i=a(50959),n=a(497754),s=a(444372),o=a(997382),l=a(248723),r=a(551080),c=a(728804);const d=(0,i.createContext)("small");var u=a(549138),m=a(121167);const h=(0,i.forwardRef)(((e,t)=>{const a=i.useContext(d),s=(0,i.useContext)(c.CustomBehaviourContext),{id:o,active:l,fake:r,theme:h=m,enableActiveStateStyles:b=s.enableActiveStateStyles,hideFocusOutline:p=!1,endSlot:v,children:f,...g}=e;return i.createElement("button",{...g,id:o,ref:t,className:n(h.squareTabButton,l&&h.selected,h[a],r&&h.fake,!b&&h.disableActiveStateStyles,p&&h.disableFocusOutline)},i.createElement(u.SquareTabContent,{endSlot:v,className:m.tabContent},f),i.createElement(u.SquareTabContent,{"aria-hidden":!0,endSlot:v,className:m.tabHiddenContent},f))}));h.displayName="SquareTabButton";const b=(0,i.forwardRef)(((e,t)=>{const{item:a,highlighted:n,handleItemRef:s,onClick:o,...l}=e,c=(0,i.useCallback)((()=>{o&&o(a)}),[o,a]),d=(0,i.useCallback)((e=>{s&&s(a,e),(0,r.isomorphicRef)(t)(e)}),[a,s,t]);return i.createElement(h,{...l,id:a.id,onClick:c,ref:d,endSlot:a.endSlot,"aria-label":"radio"===l.role?a.label:void 0},a.label)}));b.displayName="SquareTab";var p=a(662929),v=a(217802),f=a(634993),g=a(79205),S=a(602948),E=a(535140);function T(e){const{isDropped:t=!1}=e;return i.createElement(g.Icon,{icon:S,className:n(E.arrowIcon,t&&E.dropped)})}function I(e){const{disabled:t,isOpened:a,hideFocusOutline:n,fake:s,items:o,buttonContent:l,buttonRef:r,buttonTheme:c,isHighlighted:d,onButtonClick:u,onItemClick:m,onClose:b}=e,g=(0,i.useRef)(null),S=(0,p.useMergedRefs)([r,g]);return i.createElement(v.PopupMenuDisclosureView,{buttonRef:g,listboxTabIndex:-1,isOpened:a,onClose:b,listboxAria:{"aria-hidden":!0},button:i.createElement(h,{"aria-hidden":!0,disabled:t,active:a,onClick:u,ref:S,tabIndex:-1,theme:c,hideFocusOutline:n,fake:s},l,i.createElement(T,{isDropped:a})),popupChildren:o.map((e=>i.createElement(f.PopupMenuItem,{key:e.id,onClick:m,onClickArg:e,isActive:d(e),label:e.label,isDisabled:e.disabled,dontClosePopup:!0})))})}var w=a(557505),C=a(881025),y=a(550650);function _(e){ const{disabled:t,moreButtonContent:r=()=>s.t(null,void 0,a(437117)),size:c="small",theme:u=w.defaultTheme,className:m,style:h,"data-name":p,"aria-controls":v,isRadioGroup:f}=e,g=parseInt(y[`css-value-square-tabs-${c}-gap`]),{enableActiveStateStyles:S,moreButtonRef:E,setItemRef:T,getBindings:_,handleMoreButtonClick:k,handleCollapsedItemClick:B,scrollWrapBinding:x,overflowBehaviour:A,tablistBinding:M,visibleTabs:L,hiddenTabs:V,handleActivate:N,isMobileTouch:R,getItemId:q,isDisclosureOpened:H,isHighlighted:P,closeDisclosure:D}=(0,l.useTabsMainHandlers)(o.TabNames.SquareButtonTabs,e,{isRtl:C.isRtl,scrollIntoViewOptions:{additionalScroll:g},isRadioGroup:f});return i.createElement(d.Provider,{value:c},i.createElement("div",{...x,className:n(u.scrollWrap,"scroll"===A&&u.enableScroll,m),style:h,"data-name":p},i.createElement("div",{...M,className:n(u.squareTabs,u[c])},L.map((e=>{const{"aria-disabled":t,...a}=_(e)??{};return i.createElement(b,{...a,key:e.id,item:e,onClick:()=>N(e),theme:u,enableActiveStateStyles:S,hideFocusOutline:R,ref:T(q(e)),...e.dataId&&{"data-id":e.dataId},"aria-controls":v})})),V.map((e=>{const{"aria-disabled":t,...a}=_(e)??{};return i.createElement(b,{...a,key:e.id,item:e,theme:u,enableActiveStateStyles:S,fake:!0,"aria-controls":v})})),i.createElement(I,{disabled:t,isOpened:H,items:V,buttonContent:r({hiddenTabs:V}),buttonRef:E,buttonTheme:u,isHighlighted:P,onButtonClick:k,onItemClick:B,onClose:D,hideFocusOutline:R,fake:0===V.length}))))}},365847:(e,t,a)=>{"use strict";a.d(t,{SquareTabs:()=>s});var i=a(50959),n=a(264882);function s(e){const{"data-name":t="square-tabs-buttons",...a}=e;return i.createElement(n.SquareTabsImpl,{...a,"data-name":t})}},557505:(e,t,a)=>{"use strict";a.d(t,{defaultTheme:()=>o});var i=a(995683),n=a(558215),s=a(121167);const o=(0,i.mergeThemes)(s,n)},304698:(e,t,a)=>{"use strict";a.d(t,{ideaFeedAd:()=>s,leaderBoardAd:()=>o,mainIdeaFeedAd:()=>n,publishedIdeaBannerAd:()=>i});const i=async()=>(await Promise.all([a.e(1072),a.e(24377),a.e(8721),a.e(19276),a.e(37583)]).then(a.bind(a,815577))).publishedIdeaBannerAd,n=async()=>(await Promise.all([a.e(1072),a.e(24377),a.e(8721),a.e(19276),a.e(99627)]).then(a.bind(a,895185))).mainIdeaFeedAd,s=async()=>(await Promise.all([a.e(1072),a.e(24377),a.e(8721),a.e(19276),a.e(99627)]).then(a.bind(a,895185))).ideaFeedAd,o=async()=>(await Promise.all([a.e(1072),a.e(24377),a.e(8721),a.e(19276),a.e(47763)]).then(a.bind(a,783218))).leaderBoardAd},389559:(e,t,a)=>{"use strict";a.d(t,{APIError:()=>o,handleJSONRequest:()=>s});var i=a(702598);function n({path:e,requestData:t,signal:a}){const n=new URL(e,window.origin);if("GET"===t.method&&t.query)for(const[e,a]of Object.entries(t.query))void 0!==a&&n.searchParams.append(e,a);const s={method:t.method,credentials:"same-origin",signal:a};return"POST"!==t.method&&"PUT"!==t.method||(s.body=JSON.stringify(t.body),s.headers=new Headers({"Content-Type":"application/json"})),(0,i.fetch)(n.toString(),s)}async function s(e){const t=await n(e);try{const e=await t.json();return t.ok?e:Promise.reject(new o(t.status,e)) }catch{return Promise.reject(new o(t.status,{}))}}class o extends Error{constructor(e,t){super([e,t.code,t.detail].filter(Boolean).join(" - ")),this.status=e,this.payload=t,this.name="APIError",Object.setPrototypeOf(this,new.target.prototype)}}},794065:e=>{e.exports=''},564930:e=>{e.exports=''},486988:e=>{e.exports=''},849862:e=>{e.exports=''},640526:e=>{e.exports=''},886886:e=>{ e.exports=''},401715:e=>{e.exports=''},867683:e=>{e.exports=''},72701:e=>{e.exports=''},308280:e=>{e.exports=''},72100:e=>{ e.exports=''}}]);