File size: 12,534 Bytes
c930535
1
!function(){try{var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=(new n.Error).stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="c47348b9-d2ff-43e6-9582-516dc2ec89e0",n._sentryDebugIdIdentifier="sentry-dbid-c47348b9-d2ff-43e6-9582-516dc2ec89e0")}catch(n){}}(),function(){try{var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=(new n.Error).stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="c47348b9-d2ff-43e6-9582-516dc2ec89e0",n._sentryDebugIdIdentifier="sentry-dbid-c47348b9-d2ff-43e6-9582-516dc2ec89e0")}catch(n){}}(),function(){try{var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},o=(new n.Error).stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="c47348b9-d2ff-43e6-9582-516dc2ec89e0",n._sentryDebugIdIdentifier="sentry-dbid-c47348b9-d2ff-43e6-9582-516dc2ec89e0")}catch(n){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[90135],{528267:(n,o,r)=>{r.d(o,{q:()=>tn});var e,a,t,i,c,s,l,d,u,b,g,f,p,m,k,h,v,y,x,w=r(375276),I=r(58168),D=r(198587),A=r(466377),S=r(392395),C=r(853296),_=r(671835),j=r(953838),$=r(693523),N=r(153477),P=r(659480),B=r(922267),E=r(288794),z=r(261413),H=r(441427),L=r(97774),R=r(615154),F=r(296540),U=r(532306),W=r(79004),M=r(312663),G=r(959340),T=r(914421),Z=r(486489),q=r(70642),Q=r(186272),K=r(906719),O=r(502080),V=r(474848),X=["type"],J=["type","showProgressBar"],Y=["closeButton","actions","iconTitle","message","type","timeoutDuration","showProgressBar"],nn=function(n){var o,r=n.type,e=(0,D.A)(n,X);switch(r){case K._.Error:o=(0,V.jsx)(A.P,(0,I.A)({},e));break;case K._.Info:o=(0,V.jsx)(S.h,(0,I.A)({},e));break;case K._.Success:o=(0,V.jsx)(C.i,(0,I.A)({},e));break;case K._.Warning:o=(0,V.jsx)(_.l,(0,I.A)({},e));break;case K.v.InfoLoading:o=(0,V.jsx)(Z.k,{inheritColor:!0,trackColor:"color-opac-b-3"})}return o},on=(0,$.I4)(G.P).withConfig({displayName:"ScSnackbar",componentId:"sc-71f1ah-0"})(["width:100%;max-width:600px;min-width:min(280px,100%);min-height:4.8rem;padding:"," "," "," ",";",""],(0,N.C)("space-0100"),(0,P.b)("snackbar-inset-padding-right"),(0,N.C)("space-0100"),(0,P.b)("snackbar-inset-padding-left"),(0,B.H)("$type",((s={})[K._.Error]=(0,$.AH)(e||(e=(0,w.A)(["\n      background-color: ",";\n      color: ",";\n    "])),(0,P.b)("color-background-snackbar-error"),(0,P.b)("color-text-snackbar-error")),s[K._.Info]=(0,$.AH)(a||(a=(0,w.A)(["\n      background-color: ",";\n      color: ",";\n    "])),(0,P.b)("color-background-snackbar-info"),(0,P.b)("color-text-snackbar-info")),s[K._.Success]=(0,$.AH)(t||(t=(0,w.A)(["\n      background-color: ",";\n      color: ",";\n    "])),(0,P.b)("color-background-snackbar-success"),(0,P.b)("color-text-snackbar-success")),s[K._.Warning]=(0,$.AH)(i||(i=(0,w.A)(["\n      background-color: ",";\n      color: ",";\n    "])),(0,P.b)("color-background-snackbar-warn"),(0,P.b)("color-text-snackbar-warn")),s[K.v.InfoLoading]=(0,$.AH)(c||(c=(0,w.A)(["\n      background-color: ",";\n      color: ",";\n    "])),(0,P.b)("color-background-snackbar-info"),(0,P.b)("color-text-snackbar-info")),s))),rn=$.I4.div.withConfig({displayName:"ScSnackbarProgressBarContainer",componentId:"sc-71f1ah-1"})([".tw-progress-bar{background:",";}"],(0,P.b)("color-background-progress-snackbar")),en=$.I4.div.withConfig({displayName:"ScIconContainer",componentId:"sc-71f1ah-2"})(["margin-top:",";margin-right:",";position:relative;align-items:start;flex-grow:0;flex-shrink:0;"],(0,N.C)("space-0050"),(0,P.b)("snackbar-icon-gap")),an=(0,$.I4)(W.oG).withConfig({displayName:"ScSnackbarCloseButton",componentId:"sc-71f1ah-3"})(["float:right;display:inline-flex;flex-shrink:0;align-self:center;margin-block-start:",";color:",";"," "," &:active{color:",";}",";"],(function(n){return n.$compact?(0,N.C)("space-0025"):void 0}),(function(n){return n.$type===K._.Info||n.$type===K.v.InfoLoading?(0,P.b)("color-text-snackbar-info"):(0,N.C)("color-black")}),(function(n){return n.$type===K._.Info||n.$type===K.v.InfoLoading?(0,E.k)(l||(l=(0,w.A)(["color: ",";"])),(0,N.C)("color-white")):(0,E.k)(d||(d=(0,w.A)(["color: ",";"])),(0,N.C)("color-black"))}),(0,z.ND)(u||(u=(0,w.A)(["color: ",";"])),(0,N.C)("color-black")),(0,N.C)("color-black"),(0,B.H)("$type",((x={})[K._.Info]=void 0,x[K.v.InfoLoading]=void 0,x[K._.Warning]=(0,$.AH)(b||(b=(0,w.A)(["\n      ","\n      ","\n      &:active {\n        background-color: ",";\n      }\n    "])),(0,E.k)(g||(g=(0,w.A)(["\n        background-color: ",";"])),(0,P.b)("color-background-button-warn-hover")),(0,z.ND)(f||(f=(0,w.A)(["\n        background-color: ",";"])),(0,P.b)("color-background-button-warn-hover")),(0,P.b)("color-background-button-warn-active")),x[K._.Success]=(0,$.AH)(p||(p=(0,w.A)(["\n      ","\n      ","\n      &:active {\n        background-color: ",";\n      }\n    "])),(0,E.k)(m||(m=(0,w.A)(["\n        background-color: ",";"])),(0,P.b)("color-background-button-success-hover")),(0,z.ND)(k||(k=(0,w.A)(["\n        background-color: ",";"])),(0,P.b)("color-background-button-success-hover")),(0,P.b)("color-background-button-success-active")),x[K._.Error]=(0,$.AH)(h||(h=(0,w.A)(["\n      ","\n      ","\n      &:active {\n        background-color: ",";\n      }\n    "])),(0,E.k)(v||(v=(0,w.A)(["\n        background-color: ",";"])),(0,P.b)("color-background-button-error-hover")),(0,z.ND)(y||(y=(0,w.A)(["\n        background-color: ",";"])),(0,P.b)("color-background-button-error-hover")),(0,P.b)("color-background-button-error-active")),x))),tn=function(n){var o=n.type,r=n.showProgressBar,e=void 0!==r&&r,a=(0,D.A)(n,J);return(0,V.jsx)(O.$t.Provider,{value:{type:o,compact:e,id:(0,H.$)()},children:(0,V.jsx)(cn,(0,I.A)({type:o,showProgressBar:e},a))})},cn=function(n){var o,r,e=n.closeButton,a=n.actions,t=n.iconTitle,i=n.message,c=n.type,s=n.timeoutDuration,l=n.showProgressBar,d=void 0!==l&&l,u=(0,D.A)(n,Y),b=(0,R.tz)().formatMessage,g=(0,O.k0)().messageId,f=((o={})[K._.Error]=b("Error","Snackbar"),o[K._.Info]=b("Info","Snackbar"),o[K._.Success]=b("Success","Snackbar"),o[K._.Warning]=b("Warning","Snackbar"),o[K.v.InfoLoading]=b("Loading","Snackbar"),o),p=e&&(0,V.jsx)(an,{className:"tw-snackbar__close","aria-label":e["aria-label"],onClick:e.onClick,size:d?"small":"default",$type:c,$compact:d,children:(0,V.jsx)(U.y,{icon:j.g})}),m=(0,V.jsx)(en,{children:nn({type:c,title:!1===t?void 0:null!=t?t:f[c],role:!1===t?"presentation":void 0,"aria-hidden":!1===t||void 0})}),k=(0,F.isValidElement)(i)?null==(r=i.props)?void 0:r.message:void 0,h=void 0!==k;return(0,V.jsxs)(on,(0,I.A)({className:"tw-snackbar"},u,{$type:c,borderRadius:L.Z.Medium,elevation:4,position:T.yX.Relative,display:T.nl.InlineBlock,textAlign:void 0===e&&void 0===a?T.nO.Center:void 0,children:[(0,V.jsxs)(G.P,{display:T.nl.Flex,alignItems:T.k2.Center,gap:.5,children:[(0,V.jsxs)(G.P,{display:T.nl.Flex,flexDirection:"column",flexGrow:1,children:[(0,V.jsxs)(G.P,{display:T.nl.Flex,flexDirection:"row",children:[m,i]}),h&&(0,V.jsx)(G.P,{attachLeft:!0,attachRight:!0,width:"100%",children:"string"==typeof k?(0,V.jsx)(M.N,{as:"p",children:k}):k})]}),a&&(0,V.jsx)(G.P,{display:T.nl.Flex,alignSelf:T.gB.Center,justifyContent:T.A9.End,flexShrink:0,children:a}),p]}),d&&(0,V.jsx)(G.P,{padding:{x:.5,top:.75,bottom:.5},children:(0,V.jsx)(rn,{children:(0,V.jsx)(q.z2,{"aria-labelledby":g,value:100,size:q.Q8.Small,inherit:!0,mask:!0,animationDuration:s?s/1e3:void 0,animationDirection:Q.o.Down})})})]}))};cn.displayName="SnackbarContent",tn.displayName="Snackbar"},267319:(n,o,r)=>{r.d(o,{h:()=>u});var e=r(58168),a=r(564368),t=r(300531),i=r(959340),c=r(914421),s=r(906719),l=r(502080),d=r(474848),u=function(n){var o,r=(0,l.k0)(),u=r.type,b=r.compact,g=b?"small":"default";return(0,d.jsx)(i.P,{display:c.nl.Flex,justifyContent:c.A9.Start,flexDirection:c.bo.RowReverse,margin:{top:b?.25:void 0},children:n.type===s._.Info||u===s._.Info?(0,d.jsx)(a.$n,(0,e.A)({size:g,variant:"text"},n.primaryButton)):(0,d.jsx)(t.p,(0,e.A)({type:null!=(o=n.type)?o:u,size:g},n.primaryButton))})};u.displayName="SnackbarActions"},502080:(n,o,r)=>{r.d(o,{$t:()=>i,k0:()=>c});var e=r(58168),a=r(296540),t=r(906719),i=(0,a.createContext)({type:t._.Info}),c=function(){var n=(0,a.useContext)(i),o=n.id?n.id+"-message":void 0;return(0,e.A)({},n,{messageId:o,type:s(n.type)})},s=function(n){return"InfoLoading"===n?t._.Info:n}},958007:(n,o,r)=>{r.d(o,{z:()=>g});var e=r(58168),a=r(693523),t=r(72127),i=r(312663),c=r(588702),s=r(959340),l=r(914421),d=r(502080),u=r(474848),b=a.I4.div.withConfig({displayName:"ScSnackbarMessage",componentId:"sc-1qv3b7j-0"})(["display:inline-flex;align-items:center;min-height:2.8rem;"]),g=function(n){var o=(0,d.k0)().messageId,r=n.title&&"string"==typeof n.title?(0,u.jsx)(s.P,{flexGrow:1,margin:{left:.5,right:1},children:(0,u.jsx)(i.N,{lineHeight:c.aK.Heading,as:"p",fontSize:l.Z4.Size4,fontWeight:l.IT.SemiBold,children:n.title})}):n.title;return(0,u.jsx)(s.P,(0,e.A)({},(0,t.g)(n),{display:l.nl.Flex,flexDirection:"column",justifyContent:"center",width:"100%",children:r&&(0,u.jsx)(b,{className:"tw-snackbar-message",id:o,children:r})}))};g.displayName="SnackbarMessage"},70642:(n,o,r)=>{r.d(o,{Q8:()=>c,tS:()=>s,z2:()=>$});var e,a,t,i,c,s,l=r(58168),d=r(198587),u=r(375276),b=r(693523),g=r(922267),f=r(659480),p=r(97774),m=r(27346),k=r(72127),h=r(955522),v=r(216042),y=r(914421),x=r(186272),w=r(474848),I=["mask","borderRadius","status"];!function(n){n.Default="default",n.Small="sm",n.ExtraSmall="xs"}(c||(c={})),function(n){n.Default="default",n.Caution="caution",n.Error="error",n.Success="success"}(s||(s={}));var D=b.I4.div.withConfig({displayName:"ScProgressBarWrapper",componentId:"sc-1aarjxm-0"})(["overflow:hidden;width:100%;height:",";background:",";"],(0,g.H)("$size",((e={})[c.Default]=(0,f.b)("progress-bar-size-default"),e[c.Small]=(0,f.b)("progress-bar-size-small"),e[c.ExtraSmall]=(0,f.b)("progress-bar-size-extra-small"),e)),A);function A(n){return n.$mask?(0,f.b)("color-background-progress"):""}var S=(0,b.i7)(a||(a=(0,u.A)(["\n100% {\n  width: 0%;\n}\n"]))),C=(0,b.i7)(t||(t=(0,u.A)(["\n100% {\n  width: 100%;\n}\n"]))),_=b.I4.div.withConfig({displayName:"ScProgressBarFill",componentId:"sc-1aarjxm-1"})(["width:",";max-width:100%;height:100%;background:",";animation-name:",";animation-timing-function:linear;animation-fill-mode:both;animation-play-state:",";animation-duration:",";"],(function(n){var o=n.$value,r=n.$animationDirection;return void 0!==o?o+"%":r===x.o.Down?"100%":r===x.o.Up?"0%":"100%"}),(function(n){var o;return n.$inherit?"currentColor":(0,g.H)("$status",((o={})[s.Default]=(0,f.b)("color-background-progress-status"),o[s.Caution]=(0,f.b)("color-background-progress-status-caution"),o[s.Error]=(0,f.b)("color-background-progress-status-error"),o[s.Success]=(0,f.b)("color-background-progress-status-success"),o))}),(0,g.H)("$animationDirection",((i={})[x.o.Down]=S,i[x.o.Up]=C,i)),(function(n){return n.$paused&&"paused"}),(function(n){var o=n.$animationDuration;return void 0!==o&&o+"s"})),j=function(n){var o=n.mask,r=void 0===o||o,e=n.borderRadius,a=void 0===e?p.Z.Large:e,t=n.status,i=void 0===t?s.Default:t,u=(0,d.A)(n,I),b=(0,x.U)({value:u.value,animationDuration:u.animationDuration,animationDirection:u.animationDirection,paused:u.paused});return(0,w.jsx)(v.S,{borderRadius:a,children:(0,w.jsx)(D,(0,l.A)({},(0,m.Fh)(u),(0,k.g)(u),{className:"tw-progress-bar",$mask:r,$size:u.size||c.Default,role:"progressbar","aria-valuenow":b,"aria-valuemin":0,"aria-valuemax":100,children:(0,w.jsx)(v.S,{borderRadius:{topLeft:a,bottomLeft:a},display:y.nl.Block,children:(0,w.jsx)(_,{$status:i,onAnimationEnd:u.onAnimationEnd,$animationDirection:u.animationDirection,$animationDuration:u.animationDuration,$paused:u.paused,$value:u.value,$inherit:u.inherit,"data-a-target":"tw-progress-bar-animation"})})}))})};j.displayName="ProgressBarComponent";var $=(0,h.i)(j)},186272:(n,o,r)=>{r.d(o,{U:()=>t,o:()=>e});var e,a=r(296540);function t(n){var o=n.value,r=n.animationDuration,t=n.animationDirection,i=n.paused,c=t===e.Up?0:100,s=(0,a.useState)(null!=o?o:c),l=s[0],d=s[1];return(0,a.useEffect)((function(){var n=null!=o?o:c;if(d(n),r&&t&&!i){var a=t===e.Up?100:0,s=Date.now(),l=setInterval((function(){var o=Math.min((Date.now()-s)/1e3/r,1);d(Math.round(n+(a-n)*o)),o>=1&&clearInterval(l)}),500);return function(){return clearInterval(l)}}}),[c,o,r,t,i]),l}!function(n){n.Up="up",n.Down="down"}(e||(e={}))}}]);