Loading
Showing the first 250,000 characters. Open raw for the full source.
function(e,t,a){a.d(t,{x:()=>pS}),a(321073);var n,l,i,s,r=a(477900),o=a(582128),d=a(17928),c=a(314116),u=a(270003),m=a(243721),h=a(532446),x=a(821609),p=a(834730),g=a(364522),v=a(611677),j=a(691885),f=a(95477),b=a(404778),y=a(77729),E=a(952818),_=a(905552),C=a(543838),S=a(157257),N=a(915725),A=a(655180),k=a(282098),I=a(227628),D=a(468550);let T=(0,a(196765).v)(()=>({enabled:!1,pending:null,lastResult:null}));function O(e){T.setState({enabled:e})}function R(e){T.setState({pending:e})}function w(e){T.setState({lastResult:e})}var M=a(781710),L=a(696016),P=a(264572).Buffer;function U(){let e=T(e=>e.enabled),t=T(e=>e.pending),a=T(e=>e.lastResult),n=o.useCallback(async(e,t,a,n)=>{let l=C.Ay.getMediaEngine();if(null==l.setClipsPerfMonitoring)return w("setClipsPerfMonitoring unsupported in this build"),null;R(n);try{let n=await l.setClipsPerfMonitoring(e,t,a);return O(n.enabled),n}catch(e){return w(`${n} failed: ${e instanceof Error?e.message:String(e)}`),null}finally{R(null)}},[]),l=o.useCallback(async t=>{O(t);let a=await n(t,!1,!1,t?"enable":"disable");null!=a?w(`recorder ${a.enabled?"enabled":"disabled"}`):O(e)},[n,e]),i=o.useCallback(async()=>{let t=await n(e,!0,!1,"save");if(null==t)return;if(""===t.html)return void w("save: server returned empty html");let a=`clips-perf-${new Date().toISOString().replace(/[:.]/g,"-")}.html`;try{let e=P.from(t.html,"utf8"),n=await y.A.fileManager.saveWithDialog2(e,a);if(null!=n&&!0===n.canceledByUser)return void w("save: canceled");w(`saved ${t.eventCount} events (${t.html.length} bytes)`)}catch(e){w(`save failed: ${e instanceof Error?e.message:String(e)}`)}},[n,e]),s=o.useCallback(async()=>{let t=await n(e,!1,!0,"clear");null!=t&&w(`cleared ${t.eventCount} events`)},[n,e]);return(0,r.jsxs)(u.n,{label:"Clips v3 Performance",children:[(0,r.jsx)(m.d,{label:"Record Clips v3 performance",description:"Toggles the in-process perf recorder inside discord_clips.exe.",checked:e,disabled:null!=t,onChange:l}),(0,r.jsxs)(h.M,{children:[(0,r.jsx)(x.$,{text:"Save as file...",disabled:null!=t,onClick:i}),(0,r.jsx)(x.$,{text:"Clear recording",variant:"secondary",disabled:null!=t,onClick:s})]}),(null!=t||null!=a)&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:null!=t?`working: ${t}...`:a})]})}function G(){let e=(0,I.MZ)(e=>e.isOpen),t=(0,D.sY)(e=>e.isOpen),[a,n]=o.useState(3),l=o.useCallback(e=>{let t=Object.values(N.Ay.getClips()),a=t.find(e=>null!=e.applicationId);if(a?.applicationId==null)return;let n=a.applicationId,l=t.filter(e=>e.applicationId===n).slice(0,e);N.Ay.devSetLastClipsSession({applicationName:a.applicationName,newClipIds:l.map(e=>e.id),ended:!0}),(0,D.M8)(n)},[]),i=o.useCallback(e=>{e?l(a):(0,D.kF)()},[l,a]),s=o.useCallback(()=>{let e=Object.values(N.Ay.getClips()),t=(0,_.A)(E.Ay,S.A),a=(t?.id!=null?e.find(e=>e.applicationId===t.id):void 0)??e.find(e=>null!=e.applicationId);if(a?.applicationId==null)return;let n=a.applicationId,l=e.filter(e=>e.applicationId===n).slice(0,10);N.Ay.devSetLastClipsSession({applicationName:a.applicationName,newClipIds:l.map(e=>e.id),ended:!0}),(0,I.w9)()},[]),C=o.useCallback(e=>{e?s():(0,I.yj)()},[s]),T=o.useCallback(e=>{n(e),t&&l(e)},[l,t]),[O,R]=o.useState(L.rb.KILL),[w,P]=o.useState(1),[G,B]=o.useState(""),[F,$]=o.useState(""),V=(0,d.bG)([N.Ay],()=>N.Ay.isAutoStashEnabled()),W=o.useCallback(e=>{e?(0,c.A)({title:"Stash all gaming sessions?",subtitle:"Every gaming session will be stashed to your Desktop (inside the `decider_stash` folder) when it ends. This setting is not persistent \u2014 it resets to off each time Discord launches.",confirmText:"Enable",variant:"primary",onConfirm:()=>{A.mN(!0)}}):A.mN(!1)},[]),[z,H]=o.useState([]),[K,Y]=o.useState(void 0),q=o.useCallback(e=>{H(e),Y(t=>null!=t&&e.includes(t)?t:e[0])},[]),J=o.useCallback(async()=>{let e=y.A.clips.debugListStashedClipDeciderSessions;null!=e&&q(await e())},[q]);o.useEffect(()=>{let e=!0,t=y.A.clips.debugListStashedClipDeciderSessions;if(null!=t)return t().then(t=>{e&&q(t)}),()=>{e=!1}},[q]);let Q=(0,d.bG)([N.Ay],()=>N.Ay.getState().clipsSettings.enableAutoclipping),X=(0,d.bG)([N.Ay],()=>N.Ay.getEnableAutoclipping());return(0,r.jsx)(g.Ip,{children:(0,r.jsxs)(v.l,{children:[(0,r.jsx)(u.n,{label:"Send Test Signals",children:(0,r.jsxs)(h.M,{children:[(0,r.jsx)(x.$,{text:"Manual",onClick:()=>A.Ts({type:L.Gy.MANUAL})}),(0,r.jsx)(x.$,{text:"Distributed",onClick:()=>A.Ts({type:L.Gy.DISTRIBUTED,remoteTriggerUserId:"123",remoteTriggerClipId:"456"})}),(0,r.jsx)(x.$,{text:"Shouting",onClick:()=>A.Ts({type:L.Gy.SHOUTING,userId:"123",confidence:1})}),(0,r.jsx)(x.$,{text:"Laughter",onClick:()=>k.A.debugCreateRankableLaughterClip()})]})}),(0,r.jsxs)(u.n,{label:"Game Event Creator",children:[(0,r.jsxs)(h.M,{children:[(0,r.jsx)(j.l,{label:"Event Type",value:O,onSelectionChange:e=>R(e),options:[{id:"kill",label:"Kill",value:L.rb.KILL},{id:"multikill",label:"Multikill",value:L.rb.MULTIKILL},{id:"death",label:"Death",value:L.rb.DEATH},{id:"assist",label:"Assist",value:L.rb.ASSIST},{id:"item",label:"Item",value:L.rb.ITEM},{id:"victory",label:"Victory",value:L.rb.VICTORY},{id:"defeat",label:"Defeat",value:L.rb.DEFEAT},{id:"level_up",label:"Level Up",value:L.rb.LEVEL_UP},{id:"treasure",label:"Treasure",value:L.rb.TREASURE},{id:"objective_kill",label:"Objective Kill",value:L.rb.OBJECTIVE_KILL}],selectionMode:"single",fullWidth:!0}),(0,r.jsx)(j.l,{label:"Importance",value:w,onSelectionChange:P,options:[{id:"low",label:"Low",value:0},{id:"medium",label:"Medium",value:.5},{id:"high",label:"High",value:1}],selectionMode:"single",fullWidth:!0})]}),(0,r.jsx)(f.k,{label:"Title (optional)",value:G,onChange:B,placeholder:"e.g., First Blood"}),(0,r.jsx)(f.k,{label:"Description (optional)",value:F,onChange:$,placeholder:"e.g., Killed enemy ADC in bot lane"}),(0,r.jsx)(x.$,{text:"Create Game Event",onClick:()=>{A.Ts({type:L.Gy.GAME_EVENT,eventType:O,importance:w,title:G,description:F})}}),(0,r.jsx)(m.d,{label:"Auto-stash decider data",description:"Stashes every gaming session to your Desktop when it ends. Resets to off on each Discord launch.",checked:V,onChange:W}),(0,r.jsx)(j.l,{label:"Stash session (re-run ranking)",value:K,onSelectionChange:e=>Y(e),options:z.map(e=>({id:e,label:e,value:e})),placeholder:0===z.length?"No stashed sessions":"Most recent",disabled:0===z.length,selectionMode:"single",fullWidth:!0}),(0,r.jsxs)(h.M,{children:[(0,r.jsx)(x.$,{text:"re-run ranking",onClick:()=>{k.i.debugRerunRanking(K).catch(e=>{L.nx.error("re-run ranking failed",e)})}}),(0,r.jsx)(x.$,{text:"run automontage",onClick:()=>{k.i.debugRunAutoMontage(K).catch(e=>{L.nx.error("run automontage failed",e)})}}),(0,r.jsx)(x.$,{text:"refresh sessions",variant:"secondary",onClick:()=>{J()}})]})]}),(0,r.jsx)(u.n,{label:"Clip Metadata Tool",children:(0,r.jsx)(M.A,{})}),(0,r.jsx)(b.c,{}),(0,r.jsx)(U,{}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(u.n,{label:"Reminder UI",children:[(0,r.jsx)(m.d,{label:"Clips Quick Bar",description:"Force-show the inline quick bar above the account panel. Fabricates a session (up to 10 clips) from your recent clips so it can be tested without capturing a real game session.",checked:e,onChange:C}),(0,r.jsx)(m.d,{label:"Clips Reminder",description:"Force-show the post-session ClipsReminder panel. Fabricates a session from your most recent clips (and game) so it can be tested without capturing a real game session.",checked:t,onChange:i}),(0,r.jsx)(j.l,{label:"Clip count",value:a,onSelectionChange:T,options:[{id:"1",label:"1 clip",value:1},{id:"2",label:"2 clips",value:2},{id:"3",label:"3 clips",value:3}],selectionMode:"single",fullWidth:!0}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(u.n,{label:"Clips Settings",children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["autoclippingEnabled (internal): ",String(Q)]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["autoclippingEnabled (exposed): ",String(X)]}),(0,r.jsx)(x.$,{text:"unset autoclipping default",onClick:()=>{A.uL(void 0,!1)}})]})]})]})})}var B=a(503698),F=a.n(B),$=a(939249),V=a(683071),W=a(331322),z=a(811893),H=a(297264),K=a(538064),Y=a(265059),q=a(902592),J=a(869146);a(323874),a(14289),a(35956);var Q=a(789645),X=a(589158),Z=a(65593),ee=a(377980),et=a(581298),ea=a(393284),en=a(287809),el=a(901139),ei=a(641886),es=a(780898),er=a(652215),eo=a(121686),ed=a(427262);function ec(e){let{nameplate:t}=e,a=(0,d.bG)([en.default],()=>en.default.getCurrentUser()),n=ed.Ay.useName(a)??"";return(0,r.jsx)(eo.g,{username:n,selfMute:!1,selfDeaf:!1,serverMute:!1,serverDeaf:!1,suppress:!1,speaking:!1,streaming:!1,status:er.clD.ONLINE,currentUser:a,activities:[],applicationStream:void 0,userTag:"",speakingWhileMuted:!1,speakingWhilePTTInactive:!1,occluded:!1,dismissibleContents:{avatar:[],settings:[]},awaitingRemote:!1,nameplate:t,voiceChannel:null,isQuestBarEmpty:!0,isListenAlongVisible:!1})}var eu=a(736653),em=a(653523),eh=a(475601);function ex(e){let{selected:t,onSelect:a}=e,n=(0,eu.Ay)();return(0,r.jsxs)("div",{className:eh.N,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Preselected Gradient"}),(0,r.jsx)("div",{className:eh.Z,children:ei.Z6.map(e=>{let l=n!==er.NJ8.LIGHT?e.darkBackground:e.lightBackground,i=t===e.name;return(0,r.jsx)(em.S4,{onSelect:()=>a(e),style:{background:l},name:e.name,isSelected:i},e.name)})})]})}var ep=a(715069),eg=a(95701),ev=a(331884);function ej(e){let{selected:t,nameplate:a}=e,n=(0,ev.i)(),l=new eg.cq({id:"0",type:er.rbe.DM,name:"self",guild_id:"0",recipients:[n.id]});return(0,r.jsx)(ep.th,{selected:t,channel:l,user:n,nameplate:a})}var ef=a(698638),eb=a(52940);function ey(){let[e,t]=(0,o.useState)(!1),[a,n]=(0,o.useState)(!1),[l,i]=(0,o.useState)(null),{node:s}=(0,et.Ay)(ea.k,""),d=(0,el.Ay)(e=>e.toolsCache),{setToolsCache:c,removeToolsCache:u}=(0,el.DE)(),{setImgCache:m}=(0,el.TW)(),h=(0,o.useCallback)(e=>{let t=d[e];null!=t?i({previewToolKey:t.url,palette:t.palette,skuId:"0"}):i(t=>null==t?{previewToolKey:e,palette:ei.Wj,skuId:"0"}:{...t,previewToolKey:e})},[d]),g=(0,o.useCallback)(e=>{i(t=>null==t?null:{...t,palette:e})},[]),v=(0,o.useCallback)(e=>{u(e)},[u]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:eb.ne,children:[(0,r.jsxs)("div",{className:eb.gO,children:[(0,r.jsx)(x.$,{size:"sm",onClick:()=>{n(!1),t(e=>!e)},variant:"secondary",text:"Toggle Themes"}),(0,r.jsx)(x.$,{size:"sm",onClick:()=>{t(!1),n(e=>!e)},variant:"secondary",text:"Toggle Gradients"})]}),(0,r.jsxs)("div",{className:eb.uQ,children:[e&&(0,r.jsx)(ee.A,{node:s}),a&&(0,r.jsx)(ex,{selected:l?.palette?.name,onSelect:e=>{l?.previewToolKey!=null&&c(l.previewToolKey,l.previewToolKey,e),g(e)}})]})]}),(0,r.jsxs)("div",{className:eb.iW,children:[(0,r.jsx)(eE,{nameplate:l},l?.palette?.name),(0,r.jsxs)("div",{className:eb.Uo,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Drag background image to screen"}),(0,r.jsx)(Z.A,{title:"upload image",description:"upload the background",icons:ef.xi,onDrop:async e=>{let t=URL.createObjectURL(e[0]),a=e[0],n=await a.arrayBuffer();m(t,t,(0,es.nI)(n)),c(t,t,ei.Wj)}}),(0,r.jsx)("div",{className:eb.is,children:Object.values(d).map(e=>{let{url:t}=e;return(0,r.jsx)(e_,{src:t,onSetStatic:h,removeAsset:v},t)})}),(0,r.jsx)(eS,{label:"gradient override",onChange:e=>g({name:ei.AK,darkBackground:e,lightBackground:e})}),(0,r.jsx)(eC,{label:"set",onClick:()=>{}})]})]})]})}function eE(e){let{nameplate:t}=e,[a,n]=(0,o.useState)(320),l=(0,o.useRef)(null),i=(0,o.useRef)(null),s=(0,o.useRef)(null),d=(0,o.useRef)(document),c=(0,o.useCallback)(e=>{if(null!=l.current){let t=l.current.getBoundingClientRect();n(Math.max(264,Math.min(432,e.clientX-t.left)))}},[]),u=(0,o.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=e.currentTarget.ownerDocument;function a(e){e.preventDefault(),c(e)}function n(){null!=i.current&&(t.removeEventListener("mousemove",i.current),i.current=null),null!=s.current&&(t.removeEventListener("mouseup",s.current),s.current=null)}d.current=t,i.current=a,s.current=n,t.addEventListener("mousemove",a),t.addEventListener("mouseup",n)},[c]);return(0,o.useEffect)(()=>()=>{null!=i.current&&(d.current.removeEventListener("mousemove",i.current),i.current=null),null!=s.current&&(d.current.removeEventListener("mouseup",s.current),s.current=null)},[]),(0,r.jsx)(g.Ip,{className:eb.Fp,orientation:"horizontal",children:(0,r.jsxs)("div",{ref:l,className:eb.ey,style:{width:`${a}px`},children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Memberlist"}),(0,r.jsx)(eN,{nameplate:t}),(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"DMs"}),(0,r.jsx)(eA,{nameplate:t}),(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"RTC"}),(0,r.jsx)(ek,{nameplate:t}),(0,r.jsx)("div",{className:eb.Di,onMouseDown:u})]})})}function e_(e){let{src:t,onSetStatic:a,removeAsset:n}=e;return(0,r.jsxs)("div",{className:eb.xO,children:[(0,r.jsx)($.D,{onClick:()=>n(t),className:eb.yV,children:(0,r.jsx)(Q.P,{size:"custom",width:16,height:16,name:"x"})}),(0,r.jsx)("img",{className:eb.Ez,src:t,alt:""}),(0,r.jsx)("div",{className:eb.Lu,children:(0,r.jsx)(x.$,{onClick:()=>a(t),size:"sm",variant:"secondary",text:"set nameplate"})})]})}function eC(e){let{label:t,onClick:a}=e;return(0,r.jsxs)("div",{className:eb.Uu,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"coming soon"}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:t,disabled:!0,onClick:a})]})}function eS(e){let{label:t,onChange:a}=e;return(0,r.jsxs)("div",{className:eb.Im,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:t}),(0,r.jsx)("input",{onChange:e=>{a(e.target.value)},className:eb.QL,placeholder:"#000000"})]})}function eN(e){let{nameplate:t}=e,a=(0,d.bG)([en.default],()=>en.default.getCurrentUser());return(0,r.jsx)("div",{className:eb.VH,children:(0,r.jsxs)("div",{className:eb.H1,children:[(0,r.jsx)(p.E,{className:eb.Pf,variant:"text-sm/semibold",children:"DEFAULT"}),(0,r.jsx)(X.A,{nameplate:t,user:a,currentUser:a}),(0,r.jsx)(p.E,{className:eb.Pf,variant:"text-sm/semibold",children:"FOCUSED"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(X.A,{nameplate:t,selected:!0,user:a,currentUser:a}),(0,r.jsx)(X.A,{selected:!0,user:a,currentUser:a})]})]})})}function eA(e){let{nameplate:t}=e;return(0,r.jsx)("div",{className:eb.VH,children:(0,r.jsxs)("div",{className:eb.H1,children:[(0,r.jsx)(p.E,{className:eb.Pf,variant:"text-sm/semibold",children:"DEFAULT"}),(0,r.jsx)(ej,{nameplate:t}),(0,r.jsx)(p.E,{className:eb.Pf,variant:"text-sm/semibold",children:"FOCUSED"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(ej,{selected:!0,nameplate:t}),(0,r.jsx)(ej,{selected:!0})]})]})})}function ek(e){let{nameplate:t}=e;return(0,r.jsx)("div",{className:eb.VH,children:(0,r.jsx)("div",{className:eb.X2,children:(0,r.jsx)(ec,{nameplate:t})})})}a(508300);var eI=a(132500),eD=a(157559),eT=a(780777),eO=a(993408),eR=a(315949),ew=a(25176),eM=a(816866),eL=a(87558),eP=a(575593),eU=a(631903),eG=a(224640),eB=a(408278),eF=a(972213),e$=a(43990),eV=a(192308),eW=a(661531),ez=a(231723),eH=a(900686),eK=a(986687),eY=a(252102),eq=a(435558),eJ=a.n(eq),eQ=a(855915),eX=a(480335);let eZ=e=>{let{profileEffect:t}=e,a=o.useMemo(()=>(0,eq.cloneDeep)(t),[t]),n=o.useMemo(()=>t.effects.some(e=>null!=e.randomizedSources&&e.randomizedSources.length>0),[t.effects]),l=o.useMemo(()=>{if(n){var e;let n=1===(e=a.effects.reduce((e,t)=>{let a=1+(t.randomizedSources??[]).length;return a>1?1===e?a:Math.min(a,e):e},1))?-1:Math.floor(Math.random()*e);n>0&&t.effects.forEach((e,t)=>{null!=e.randomizedSources&&e.randomizedSources.length>0&&(a.effects[t].src=e.randomizedSources[n-1].src)})}return a},[t.effects,a,n]),i="debug",{layerData:s}=(0,eQ.A)({skuId:i,layers:l.effects});return(0,r.jsx)(eX.p,{profileEffect:l,skuId:i,layerData:s})};var e0=a(586886),e1=a(778765);let e2="https://cdn.discordapp.com/assets/content/ad2a252a6866e1ecb3bab521e2baaabbf13ab2d1ecaa8af67862c53c91f76761.png",e3={[eL.qH.THUMBNAIL]:null,[eL.qH.STATIC]:null,[eL.qH.REDUCED_MOTION]:null},e6="debug",e5="reduced-motion-preview-modal";function e8(e){let{transitionState:t,onClose:a,frameSrc:n,theme:l}=e;return(0,r.jsx)(eG.d,{transitionState:t,size:"md",onClose:a,maxHeight:"viewport",children:(0,r.jsxs)("div",{className:e0.Xd,children:[(0,r.jsx)("div",{className:e0.y6,children:(0,r.jsx)(eB.K,{"aria-label":"Close",onClick:a,icon:eF.XLargeIcon,variant:"overlay-secondary",size:"sm"})}),(0,r.jsxs)("div",{className:e0.rU,children:[(0,r.jsx)(e$.N,{theme:l,children:e=>(0,r.jsx)("img",{src:e2,alt:"",className:F()(e0.aM,e),"aria-hidden":!0})}),null!=n&&""!==n&&(0,r.jsx)("img",{src:n,className:e0.SD,alt:"Reduced motion preview"})]})]})})}function e4(e){let{type:t,frame:a,theme:n,onClear:l}=e,i=t===eL.qH.REDUCED_MOTION,s=i?e2:e1.A,o=(0,r.jsx)(e$.N,{theme:n,children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{src:s,alt:"",className:F()(e0.aM,e),"aria-hidden":!0}),a?.src!=null&&""!==a.src&&(0,r.jsx)("img",{src:a.src,className:F()(e0.SD,e),alt:""})]})});return(0,r.jsxs)("div",{className:e0.pK,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:t}),i?(0,r.jsx)($.D,{className:F()(e0.zd,e0.eB),onClick:function(){(0,eV.hasModalOpen)(e5)?(0,eV.closeModal)(e5):(0,eV.openModalLazy)(()=>Promise.resolve(e=>(0,r.jsx)(e8,{...e,frameSrc:a?.src??null,theme:n})),{modalKey:e5,onCloseRequest:()=>(0,eV.closeModal)(e5)})},children:o}):(0,r.jsx)("div",{className:e0.zd,children:o}),null!=a&&(0,r.jsx)(x.$,{variant:"critical-secondary",size:"sm",text:"Clear",onClick:l})]})}let e9=e=>{let{profileEffect:t}=e,{upsertProfileEffect:a}=(0,eM.wu)(),n=(0,d.bG)([en.default],()=>en.default.getCurrentUser()),[l,i]=o.useState(!0),s=o.useRef({}),[c,u]=o.useState(!1),[m,h]=o.useState(!1),[g,v]=o.useState(8),[j,f]=o.useState([]),[b,y]=o.useState(e3),E=o.useRef([]),[_,C]=o.useState(t.name),S=_.toLowerCase().replace(/\s+/g,"_"),N=o.useMemo(()=>({type:eP.R.PROFILE_EFFECT,skuId:e6,title:e6,description:e6,accessibilityLabel:e6,reducedMotionSrc:"",thumbnailPreviewSrc:"",effects:j,animationType:eU.l.ANIMATION_TYPE_UNSPECIFIED}),[j]),A=c?eW.A.themes.DARK:eW.A.themes.LIGHT;function k(e){let t=e.currentTarget.files;return null==t?null:t[0]}function I(e,t){let a=k(t);null!=a&&(0,eL.Mz)(a,t=>{y(n=>({...n,[e]:(0,eL.GT)(t,a)}))})}o.useEffect(()=>{let e=t.effects;e.length>0&&f(e.map(e=>({...e,name:e.name??(0,eL.XG)(e.src),randomizedSources:e.randomizedSources?.map(e=>({...e,filename:e.filename??(0,eL.XG)(e.src)}))})))},[t.effects]),o.useEffect(()=>{let e=t.stillFrames;null!=e&&Object.entries(e).forEach(e=>{let[t,a]=e;if(null!=a){if(""!==a.src&&null!=a.src&&(""===a.base64||null==a.base64))y(e=>({...e,[t]:a}));else if(""!==a.base64&&null!=a.base64){let e=(0,eL.fB)(a.base64);a.src=e,E.current.push(e),y(e=>({...e,[t]:a}))}}})},[t.stillFrames]);let D={profileEffect:t,upsertProfileEffect:a},T=o.useRef(D);return(o.useEffect(()=>{T.current=D}),o.useEffect(()=>{let{profileEffect:e,upsertProfileEffect:t}=T.current;e.readonly||t({skuId:e.skuId,name:_,effects:j,stillFrames:b})},[j,b,_]),o.useEffect(()=>()=>{E.current.forEach(e=>{URL.revokeObjectURL(e)}),E.current=[]},[]),null==n)?(0,r.jsx)("div",{}):(0,r.jsxs)("div",{className:e0.zr,children:[(0,r.jsxs)("div",{style:{display:"none"},children:[(0,r.jsx)(eT.A,{ref:e=>{s.current.animated=e},onChange:function(e){let t=k(e);null!=t&&(0,eL.Mz)(t,async e=>{let a=await (0,eL.Ay)(e,t,j.length);f(e=>[...e,a])})},multiple:!1}),(0,r.jsx)(eT.A,{ref:e=>{s.current.thumbnail=e},onChange:e=>I(eL.qH.THUMBNAIL,e),multiple:!1}),(0,r.jsx)(eT.A,{ref:e=>{s.current.static=e},onChange:e=>I(eL.qH.STATIC,e),multiple:!1}),(0,r.jsx)(eT.A,{ref:e=>{s.current.reducedMotion=e},onChange:e=>I(eL.qH.REDUCED_MOTION,e),multiple:!1})]}),(0,r.jsxs)("div",{className:e0.Vg,children:[(0,r.jsxs)("div",{className:F()(e0.nM,e0.uW),children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Profile Effect Name"}),(0,r.jsx)("input",{type:"text",value:_,className:e0.hF,onChange:e=>{C(e.target.value)}})]}),(0,r.jsxs)("div",{className:e0.nM,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Dark Theme"}),(0,r.jsx)("input",{type:"checkbox",checked:c,className:e0.OO,onChange:()=>{u(!c)}}),(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Show User Profile"}),(0,r.jsx)("input",{type:"checkbox",checked:m,className:e0.OO,onChange:()=>{h(!m)}})]}),(0,r.jsxs)("div",{className:e0.nM,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Border Radius"}),(0,r.jsx)("input",{type:"range",min:4,max:24,step:2,value:g,onChange:e=>v(+e.target.value)}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[g,"px"]})]}),(0,r.jsxs)("div",{className:F()(e0.nz,e0.VH),style:{borderRadius:g},children:[m?(0,r.jsx)("div",{className:e0.jq,children:(0,r.jsx)(eY.A,{user:n,currentUser:n,transitionState:ez.ip.ENTERED,onClose:()=>{},themeContainerClassName:e0.JB})}):(0,r.jsx)(e$.N,{theme:A,children:e=>(0,r.jsx)("div",{className:F()(e0.aM,e),children:(0,r.jsx)("img",{src:e1.A,alt:"",width:400})})}),l&&(0,r.jsx)("div",{className:e0.KJ,children:(0,r.jsx)(eZ,{profileEffect:N})})]}),(0,r.jsx)("div",{children:m&&(0,r.jsxs)("div",{className:F()(e0.f5,e0.VH),style:{borderRadius:g},children:[(0,r.jsx)(eK.A,{user:n,pendingAvatar:void 0,pendingProfileEffect:null,hideProfileFrame:!0,canUsePremiumCustomization:!0,isTryItOut:!0}),(0,r.jsx)(eZ,{profileEffect:N})]})}),(0,r.jsxs)("div",{className:e0.nz,children:[(0,r.jsxs)("div",{className:e0.nM,children:[(0,r.jsx)(x.$,{variant:"active",text:"Upload Animated Layer",onClick:()=>s.current.animated?.activateUploadDialogue()}),(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Make sure to upload the bottommost layer first!"})]}),(0,r.jsxs)("div",{className:e0.nM,children:[(0,r.jsx)(x.$,{variant:"active",text:"Upload thumbnail.png",onClick:()=>s.current.thumbnail?.activateUploadDialogue()}),(0,r.jsx)(x.$,{variant:"active",text:"Upload static.png",onClick:()=>s.current.static?.activateUploadDialogue()}),(0,r.jsx)(x.$,{variant:"active",text:"Upload reduced_motion.png",onClick:()=>s.current.reducedMotion?.activateUploadDialogue()})]}),(0,r.jsx)("div",{className:e0.q6,children:(0,r.jsx)("div",{className:e0.nM,children:(0,r.jsx)(x.$,{variant:"primary",text:"Replay Animation",onClick:()=>{i(!1),setTimeout(()=>i(!0),100)}})})}),(0,r.jsxs)("div",{className:F()(e0.q6,e0.XA),children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Please download both configs for the drop package!"}),(0,r.jsx)(p.E,{variant:"text-sm/bold",color:"text-feedback-critical",children:"WARNING: The full config is really big :0"}),(0,r.jsxs)("div",{className:e0.nM,children:[(0,r.jsx)(eH.A,{fileContents:()=>(0,eL.rs)(j),contentType:"text/plain",fileName:`${S}_timing_config.txt`,children:(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Download Timing Config"})}),(0,r.jsx)(eH.A,{fileContents:function(){return JSON.stringify({...t,name:_,readonly:!1,effects:j,stillFrames:b})},contentType:"text/plain",fileName:`${S}_config.txt`,children:(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Download Full Config"})})]})]}),(0,r.jsxs)("div",{className:e0.uW,children:[(0,r.jsx)(H.D,{variant:"heading-lg/bold",children:"Still Frames"}),(0,r.jsx)("div",{className:e0.mv,children:Object.entries(b).map(e=>{let[t,a]=e;return(0,r.jsx)(e4,{type:t,frame:a,theme:A,onClear:()=>{y(e=>({...e,[t]:null}))}},t)})})]}),j.some(e=>(e.randomizedSources??[]).length>0)&&(0,r.jsxs)("div",{className:F()(e0.uW,e0.l7),children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Rules of Randomized Effects"}),(0,r.jsxs)("ol",{children:[(0,r.jsx)("li",{children:"When an effect has randomization, all layers with random options must have the same number of options."}),(0,r.jsx)("li",{children:"The duration for the random options of a layer must be the same"}),(0,r.jsx)("li",{children:"If multiple layers have randomization, the same option will be used for all layers. (For example, the second option will be used for ALL layers)"}),(0,r.jsx)("li",{children:'Click "Replay Animation" to "reroll" the randomization'})]})]})]}),(0,r.jsxs)("div",{className:F()(e0.Vg,e0.ZF),children:[(0,r.jsx)("div",{className:e0.cD,children:(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Clear Assets",onClick:function(){f([]),y(e3)}})}),j.map((e,t)=>(0,r.jsxs)("div",{className:e0.ec,children:[(0,r.jsxs)("div",{className:e0.D1,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:e.name}),(0,r.jsx)("img",{src:e.src,className:e0.oq,alt:""}),null!=e.randomizedSources&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Alternatives"}),e.randomizedSources.map((e,t)=>(0,r.jsxs)("div",{children:[null!=e.filename&&(0,r.jsx)(H.D,{variant:"heading-sm/semibold",children:e.filename}),(0,r.jsx)("img",{src:e.src,className:e0.oq,alt:""})]},e.filename??`randomized-${t}`))]})]}),(0,r.jsxs)("div",{className:F()(e0.Vg,e0.uW),children:[(0,r.jsxs)("div",{className:e0.nz,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Start"}),(0,r.jsx)("input",{type:"number",value:e.start,className:e0.hF,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.start=+e.target.value,n[t]=l,n})},contentEditable:!0})]}),(0,r.jsxs)("div",{className:e0.nz,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Duration"}),(0,r.jsx)("input",{type:"number",value:e.duration,className:e0.hF,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.duration=+e.target.value,n[t]=l,n})},contentEditable:!0})]})]}),(0,r.jsxs)("div",{className:F()(e0.Vg,e0.uW),children:[(0,r.jsxs)("div",{className:e0.nz,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Loop"}),(0,r.jsx)("input",{type:"checkbox",checked:e.loop,className:e0.OO,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.loop=e.target.checked,n[t]=l,n})}})]}),(0,r.jsx)("div",{className:e0.nz,children:e.loop&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:"Loop Delay"}),(0,r.jsx)("input",{type:"number",value:e.loopDelay,className:e0.hF,onChange:e=>{f(a=>{let n=[...a],l=a[t];return l.loopDelay=+e.target.value,n[t]=l,n})},contentEditable:!0})]})})]}),(0,r.jsx)("div",{style:{display:"none"},children:(0,r.jsx)(eT.A,{ref:e=>{s.current[`randomized-${t}`]=e},onChange:e=>{let a;null!=(a=k(e))&&(0,eL.Mz)(a,e=>{f(n=>{let l=[...n],i=n[t];if(null==i)return n;let s={...i};return null==s.randomizedSources&&(s.randomizedSources=[]),s.randomizedSources.push({src:e,filename:a.name}),l[t]=s,l})})},multiple:!1})}),(0,r.jsxs)("div",{className:F()(e0.nM,e0._N),children:[(0,r.jsx)(x.$,{variant:"secondary",text:"Add Alternative",onClick:()=>s.current[`randomized-${t}`]?.activateUploadDialogue()}),(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Remove Layer",onClick:()=>{f(t=>t.filter(t=>t!==e))}})]})]},t))]})]})]})},e7="Make sure you're only uploading text files!";function te(e){let{profileEffect:t,onClick:a}=e,{deleteProfileEffect:n}=(0,eM.wu)();return(0,r.jsxs)($.D,{className:e0.B0,onClick:a,children:[(0,r.jsx)("div",{className:e0.yV,style:{backgroundImage:`url(${t.effects?.[0]?.base64})`}}),(0,r.jsxs)("div",{className:e0.eL,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",children:t.name}),(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Delete",onClick:e=>{e.preventDefault(),e.stopPropagation(),n(t.skuId)}})]})]})}function tt(){let{profileEffects:e,upsertProfileEffect:t,clearAll:a}=(0,eM.wu)(),[n,l]=o.useState(),i=o.useRef(null),{categories:s}=(0,eR.A)(),d=o.useMemo(()=>(0,eO.Wj)(s),[s]),[c,u]=o.useState(""),m=o.useMemo(()=>""===c?d:d.filter(e=>{let t=c.toLowerCase(),a=e.title?.toLowerCase()??"",n=e.description?.toLowerCase()??"";return a.includes(t)||n.includes(t)}),[c,d]),h=o.useCallback((e,a)=>{if(null==a||!e.type.startsWith("text/"))return(0,ew.Ni)(e7);let[n,l]=a.split(",");if(!n.includes("text/plain"))return(0,ew.Ni)(e7);let i=JSON.parse(atob(l));i.skuId=(0,eI.A)(),t(i),(0,ew.GF)("Profile Effect (maybe??) imported!")},[t]),g=o.useCallback(e=>{e.currentTarget?.files==null?(0,ew.Ni)("Error uploading file. Try again!"):(0,ew.KE)(e.currentTarget.files,h,ew.Ni)},[h]);return(0,r.jsxs)("div",{className:e0.zr,children:[null==n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:e0.nz,children:[(0,r.jsxs)("div",{className:F()(e0.uW,e0.nM),children:[(0,r.jsx)(H.D,{variant:"heading-xl/bold",children:"Custom Profile Effects"}),(0,r.jsx)(x.$,{variant:"critical-secondary",text:"Clear All",onClick:async()=>{await eD.A.confirm({title:"Clear All Profile Effects",body:"Are you sure you want to clear all profile effects? This cannot be undone.",confirmText:"Clear All",confirmVariant:"critical-primary"})&&(a(),(0,ew.GF)("All profile effects cleared!"))}})]}),(0,r.jsx)("div",{className:e0.Iv,children:Object.values(e).map(e=>(0,r.jsx)(te,{profileEffect:e,onClick:()=>l(e)},e.skuId))})]}),(0,r.jsxs)("div",{className:F()(e0.nM,e0._N,e0.uW),children:[(0,r.jsxs)("div",{className:e0.au,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-overlay-light",children:"Import Shared Config"}),(0,r.jsx)(eT.A,{ref:i,onChange:g,multiple:!1})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Create New Effect",onClick:function(){t({skuId:(0,eI.A)(),name:"New Profile Effect",effects:[]})}})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{className:e0.uW,children:[(0,r.jsx)(H.D,{variant:"heading-xl/bold",children:"All Effects"}),(0,r.jsx)(f.k,{value:c,onChange:e=>{u(e)}}),(0,r.jsx)("div",{className:e0.xm,children:m.map(e=>(0,r.jsx)($.D,{className:e0.S5,style:{backgroundImage:`url(${e.thumbnailPreviewSrc})`},onClick:()=>{let t={[eL.qH.THUMBNAIL]:null!=e.thumbnailPreviewSrc&&""!==e.thumbnailPreviewSrc?{src:e.thumbnailPreviewSrc,name:"thumbnail.png",base64:""}:null,[eL.qH.STATIC]:null!=e.staticFrameSrc&&""!==e.staticFrameSrc?{src:e.staticFrameSrc,name:"static.png",base64:""}:null,[eL.qH.REDUCED_MOTION]:null!=e.reducedMotionSrc&&""!==e.reducedMotionSrc?{src:e.reducedMotionSrc,name:"reduced_motion.png",base64:""}:null};l({skuId:e.skuId,name:e.title,effects:e.effects,stillFrames:t,readonly:!0})},children:(0,r.jsx)("div",{className:e0.Hd,children:(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-overlay-light",children:e.title})})},e.skuId))})]})]}),null!=n&&(0,r.jsx)(e9,{profileEffect:n})]})}var ta=a(935399),tn=a(462887),tl=a(289873),ti=a(478016),ts=a(565645),tr=a(7584),to=a(619499),td=a(207803),tc=a(84540),tu=a(836602),tm=a(999291),th=a(903209),tx=a(841702),tp=a(892118),tg=a(744808),tv=a(965452),tj=a(626768),tf=a(464896);function tb(){let e=(0,eu.Ay)();return(0,r.jsxs)("div",{className:tv.z3,children:[(0,r.jsx)("img",{src:(0,tn.M)(e)?tj:tf,alt:""}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"No frames found on your account. You must be granted test profile frame entitlements to use this tool."})]})}function ty(){let e=(0,d.bG)([en.default],()=>en.default.getCurrentUser()),t=(0,tm.Ay)(e?.id);o.useEffect(()=>{e?.id!=null&&(0,th.A)(e.id)},[e?.id]);let{purchases:a,isFetchingPurchases:n}=(0,tx.Bf)(),l=o.useMemo(()=>(0,eO.MG)(a,new Map),[a]),[{pendingProfileFrame:i},s]=(0,d.yK)([tu.A],()=>[tu.A.getPendingChanges(),tu.A.showNotice()]),c=void 0===i?t?.profileFrame:i,u=null!=c?a.get(c.skuId):void 0,m=(0,tp.s)(u?.items[0])?u.items[0]:void 0;return(0,ta.l0)(td.RE),(0,r.jsxs)("div",{className:tv.kL,children:[(0,r.jsxs)(H.D,{variant:"heading-xl/bold",children:[(0,r.jsx)(ts.A,{emojiName:tr.Ay.getByName("frame_with_picture")?.surrogates,className:tv.Zg}),"Profile Frames!"]}),0===l.length&&n&&(0,r.jsx)(tl.y,{}),0===l.length&&!n&&(0,r.jsx)(tb,{}),l.length>0&&(0,r.jsxs)("div",{className:tv.MK,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Select a frame to preview. Save to apply the frame to your main profile."}),(0,r.jsxs)("ul",{className:tv.p_,children:[(0,r.jsx)("li",{children:(0,r.jsx)(x.$,{text:"None",variant:"secondary",fullWidth:!0,icon:null==c?ti.U:void 0,disabled:null==c,onClick:()=>(0,tc.p)({profileFrame:null})})},"none"),l.map(e=>{let t=a.get(e.skuId);return null==t?null:(0,r.jsx)("li",{children:(0,r.jsx)(x.$,{text:t.name,variant:"secondary",fullWidth:!0,icon:c?.skuId===e.skuId?ti.U:void 0,disabled:c?.skuId===e.skuId,onClick:()=>(0,tc.p)({profileFrame:e})})},e.skuId)})]}),s&&(0,r.jsx)(to.A,{}),(0,r.jsxs)("div",{className:tv.VH,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Preview:"}),(0,r.jsxs)("div",{className:tv.ME,children:[(0,r.jsx)("img",{src:e1.A,alt:""}),null!=m&&(0,r.jsx)(tg.A,{frame:m,isPreview:!0})]})]})]})]})}var tE=a(702841),t_=a(793574),tC=a(590180),tS=a(4227),tN=a(258245),tA=a(61750),tk=a(228366),tI=a(499454),tD=a(202541);let tT="devtools-collectibles-gift";async function tO(e){let{skuId:t,sender:a}=e,n={code:tT,user:{id:a.id},sku_id:t,uses:0,max_uses:1,expires_at:null,redeemed:!1,application_id:er.FYj,gift_style:tD.o2.STANDARD_BOX};await tk.h.dispatch({type:"GIFT_CODE_RESOLVE_SUCCESS",giftCode:n}),(0,tI.h)({processedCode:tT})}var tR=a(80101);let tw=e=>{let[t,a]=o.useState(0);return o.useLayoutEffect(()=>{let e=tS.A.getPurchase;return tS.A.getPurchase=e=>void 0,tS.A.emitChange(),a(1),()=>{tS.A.getPurchase=e,tS.A.emitChange()}},[]),(0,r.jsx)("div",{className:tR.Do,children:(0,r.jsx)(tN.A,{...e},t)})},tM=()=>{let e=(0,tE.bG)([en.default],()=>en.default.getCurrentUser()),t=(0,tE.bG)([tC.A],()=>tC.A.categories),a=(0,tE.bG)([tS.A],()=>tS.A.purchases),n=(0,tE.bG)([tC.A],()=>tC.A.lastSuccessfulFetch),l=t.size>0&&a.size>0&&null!=n,{isFetching:i,categories:s}=(0,tx.Ay)({logPerf:!1,stalePurchasesOK:!0,noOp:l}),d=l?t:s,c=l||!i&&d.size>0,[u,m]=o.useState(""),[h,g]=o.useState(null),[v,j]=o.useState(null);return(o.useEffect(()=>{if(""===u.trim()||!c){g(null),j(null);return}let e=tC.A.getProduct(u),t=tC.A.getCategoryForProduct(u);null!=e&&null!=t?(g(e),j(t)):(g(null),j(null))},[u,c]),i)?(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Loading categories and collectibles..."}):null==e?(0,r.jsx)(p.E,{variant:"text-md/normal",children:"No user found"}):(0,r.jsxs)("div",{className:tR.kL,children:[(0,r.jsxs)("div",{className:tR.uW,children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Product Configuration"}),(0,r.jsxs)("div",{className:tR.qp,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",className:tR.NB,children:"Primary Product SKU ID"}),(0,r.jsx)(f.k,{value:u,onChange:m,placeholder:"Enter product SKU ID"}),!c&&""!==u.trim()&&(0,r.jsx)(p.E,{variant:"text-sm/normal",className:tR.KQ,children:"Loading products..."}),c&&""!==u.trim()&&null==h&&(0,r.jsx)(p.E,{variant:"text-sm/normal",className:tR.kc,children:"Product not found"}),null!=h&&(0,r.jsxs)(p.E,{variant:"text-sm/normal",className:tR.xT,children:["Found: ",h.name]})]})]}),(0,r.jsxs)("div",{className:tR.uW,children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Product Preview"}),null!=h&&null!=v?(0,r.jsxs)("div",{className:tR.i1,children:[(0,r.jsx)(tw,{skuId:h.skuId}),(0,r.jsx)(x.$,{variant:"primary",onClick:function(){null!=h&&null!=e&&(0,tA.A)({product:h,analyticsLocations:[t_.A.COLLECTIBLES_SHOP_CARD]})},text:"Show Collectibles Collected Modal"}),(0,r.jsx)(x.$,{variant:"primary",onClick:function(){null!=h&&null!=e&&tO({skuId:h.skuId,sender:e})},text:"Show Gift Accept Modal"})]}):(0,r.jsx)("div",{className:tR.qf,children:(0,r.jsx)(p.E,{variant:"text-md/normal",className:tR.X2,children:"Enter a valid product SKU ID to see the preview"})})]})]})};var tL=a(646695);let tP={profile_effects:1,nameplates:2,profile_frames:3,product_preview:4};function tU(e){let{setTab:t}=e,a=(0,d.bG)([J.A],()=>J.A.getWindowOpen(er.MLl.DEVTOOLS_POPOUT));return(0,r.jsxs)("div",{className:tL.Qs,children:[(0,r.jsx)($.D,{onClick:()=>{t(1)},children:(0,r.jsx)("div",{className:F()(tL.vK,tL.Dg),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Profile Effects"})})}),(0,r.jsx)($.D,{onClick:()=>{t(2)},children:(0,r.jsx)("div",{className:F()(tL.vK,tL.st),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Nameplates"})})}),(0,r.jsx)($.D,{onClick:()=>{t(3)},children:(0,r.jsx)("div",{className:F()(tL.vK,tL.BW),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Profile Frames"})})}),(0,r.jsx)($.D,{onClick:()=>{t(4)},children:(0,r.jsx)("div",{className:F()(tL.vK,tL.IP),children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-overlay-light",children:"Products"})})}),!a&&(0,r.jsx)("div",{style:{marginTop:16},children:(0,r.jsx)(V.w,{type:"warning",children:(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Not enough space?"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"You can pop out the DevTools to see the full layout."}),(0,r.jsx)(x.$,{size:"sm",icon:z.t,variant:"secondary",onClick:q.openDevToolsPopout,text:"Popout DevTools"})]})})})]})}let tG=function(){let[e,t]=o.useState(()=>{let e=Y.A.lastOpenSubTabId;return null!=e&&e in tP?tP[e]:0});return o.useEffect(()=>{null!=Y.A.lastOpenSubTabId&&(0,K.Jt)({lastOpenSubTabId:null})},[]),(0,r.jsxs)(g.Ip,{className:tL.iE,children:[(0,r.jsxs)("div",{className:tL.C$,children:[(0,r.jsx)(H.D,{variant:"heading-xxl/medium",children:"Collectibles DevTools"}),0!==e&&(0,r.jsx)(x.$,{variant:"primary",onClick:()=>t(0),text:"Back"})]}),function(){switch(e){case 1:return(0,r.jsx)(tt,{});case 2:return(0,r.jsx)(ey,{});case 3:return(0,r.jsx)(ty,{});case 4:return(0,r.jsx)(tM,{});default:return(0,r.jsx)(tU,{setTab:t})}}()]})};var tB=a(681154),tF=a(306264),t$=a(506774),tV=a(587895),tW=a(429913),tz=a(475825),tH=a(730441);function tK(e){let{columns:t,data:a,className:n,rowClassName:l,onClickRow:i,selectedRowKey:s,rowHeight:d=40}=e,c=o.useMemo(()=>t.map(e=>({renderHeader:()=>(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:e.key}),...e})),[t]),u=0===a.length?[1]:[a.length];return(0,r.jsx)("div",{className:tH.CZ,children:(0,r.jsx)(tz.OZ,{className:n,innerClassName:tH.tp,sections:u,sectionHeight:40,renderSection:e=>{let{section:t}=e,n=tH.ZR;return(0,r.jsx)("div",{className:n,children:c.map(e=>{let n=e.cellClassName,l={width:`calc(${e.cellWidth??"1fr"} - 16px)`};return(0,r.jsx)("div",{className:n,style:l,children:e.renderHeader?.(e,a)},`dev-tools-th-${t}-${e.key}`)})},`dev-tools-header-${t}`)},rowHeight:d,renderRow:e=>{let{rowIndex:t}=e,n=a[t];if(null==n)return null;let o=n.key,u=F()(tH.jD,{[tH.wD]:o===s,rowClassName:l});return(0,r.jsx)($.D,{className:u,onClick:()=>i?.(n),children:c.map(e=>{let a=e.cellClassName,l={width:`calc(${e.cellWidth??"1fr"} - 16px)`,height:`calc(${d}px - 16px)`};return(0,r.jsx)("div",{className:a,style:l,children:e.render?.(n,void 0,t)},`dev-tools-td-${t}-${e.key}`)})},`dev-tools-tr-${t}`)}})})}var tY=a(409626),tq=a(692969),tJ=a(760751),tQ=a(403362),tX=a(435738),tZ=a(99753),t0=a(402860),t1=a(574520),t2=a(808323),t3=a(583846),t6=a(424994),t5=a(14570);function t8(e){let{id:t}=e,a=(0,d.bG)([en.default],()=>en.default.getUser(t));return null==a?null:(0,r.jsx)($.D,{className:t5._,onClick:function(){(0,t0.openUserProfileModal)({sourceAnalyticsLocations:[t_.A.DEV_TOOLS],userId:t})},children:(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a.username})})}function t4(){let e=(0,d.bG)([tZ.A],()=>tZ.A.getFeed(t6.X1.GLOBAL_FEED)),t=(0,d.bG)([tZ.A],()=>tZ.A.getFilters()),a=(0,d.cf)([t1.A],()=>{let t={};for(let a of e?.entries??[])t[(0,t1.$)(a.content)]=t1.A.canRenderContent(a.content);return t},[e]),n=(0,d.bG)([tX.A],()=>tX.A.getImpressionCappedItemIds());if(null==t)return null;let l=e?.entries?.flatMap(e=>{let{content:l}=e;if(!(0,t2.l)(t,l))return[];let i=a[(0,t1.$)(l)];return(0,r.jsxs)("li",{className:t5.p,children:[(0,r.jsx)(t8,{type:l.author_type,id:l.author_id}),!i&&(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Expired or no matching presence"}),(0,t3.I5)(l)&&(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Expired at ",l.expires_at]}),n.has(l.id)&&(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Impression capped"})]},l.id)});return(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Selected Content"}),null!=l?(0,r.jsx)("ul",{children:l}):(0,r.jsx)("div",{children:"(none?)"})]})}var t9=a(576470),t7=a(693879);function ae(){let e=(0,d.bG)([tZ.A],()=>tZ.A.getFeed(t6.X1.GLOBAL_FEED)?.refresh_stale_inbox_after_ms!=null),{loading:t,nextFetchDate:a}=(0,d.cf)([tZ.A],()=>tZ.A.getFeedState(t6.X1.GLOBAL_FEED)??{loading:!1}),n=(0,d.bG)([tZ.A],()=>tZ.A.getLastFeedFetchDate(t6.X1.GLOBAL_FEED));return(0,r.jsxs)("div",{children:[t?(0,r.jsx)(p.E,{variant:"text-md/normal",children:"(fetching)"}):(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Next fetch: ",null!=a?(0,r.jsx)(t9.A,{deadline:a}):e?"(awaiting push)":"(unscheduled)"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Last fetch:"," ",null!=n?(0,r.jsx)(t7.z,{inline:!0,entry:{start:n.getTime()}}):"(never)"]})]})}var at=a(225418);let aa=[{key:"type",cellClassName:F()(at.Hn,at.T$),render(e){let{type:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/semibold",children:tB.ContentInventoryEntryType[t]})}},{key:"count",cellClassName:F()(at.Hn,at.MX),render(e){let{entries:t}=e;return(0,r.jsx)("div",{children:(0,r.jsx)(p.E,{variant:"text-md/normal",children:t.length})})}},{key:"only?",cellClassName:at.Hn,render(e){let{type:t}=e;return(0,r.jsx)(an,{type:t})}}];function an(e){let{type:t}=e,a=(0,d.bG)([tZ.A],()=>tZ.A.getFilters()),n=a?.types?.has(t)??!1;return(0,r.jsx)(m.d,{checked:n,onChange:function(){n?tk.h.dispatch({type:"CONTENT_INVENTORY_SET_FILTERS",filters:void 0}):tk.h.dispatch({type:"CONTENT_INVENTORY_SET_FILTERS",filters:{types:new Set([t])}})}})}function al(){var e;let t,a=(0,d.bG)([tZ.A],()=>tZ.A.getFeed(t6.X1.GLOBAL_FEED)),n=(0,d.bG)([tZ.A],()=>tZ.A.getDebugImpressionCappingDisabled()),l=(0,d.bG)([tX.A],()=>tX.A.getDebugFastImpressionCappingEnabled()),i=(e=a?.entries?.map(e=>e.content),Object.keys(t=eJ().groupBy(e,e=>e.content_type)).map(e=>{let a=t[e];return{key:`${e}`,type:a[0].content_type,entries:a}})),s=(0,d.bG)([tZ.A],()=>tZ.A.getFeedState(t6.X1.GLOBAL_FEED)?.loading===!0),[c,u]=o.useState(""),m=(0,d.bG)([tJ.A,tV.A],()=>parseInt(c)>0?c:tJ.A.searchGamesByName(c)[0]??tV.A.getApplicationByName(c)?.id,[c]),h=(0,tq.A)({applicationId:m,location:"DevToolsContentInventory",source:tY.GameProfileSources.DevTools}),v=Object.entries(t$.w.get("GameProfileModal")??{}).filter(e=>{let[t,a]=e;return a}).map(e=>{let[t]=e;return t}),j=(0,tW.A)(v).filter(tQ.Vq);return(0,r.jsx)("div",{className:tH.nd,children:(0,r.jsxs)(g.Ip,{className:at.Qs,children:[(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Inventory"}),i.length>0&&(0,r.jsx)(tK,{columns:aa,data:i}),(0,r.jsx)(ae,{}),(0,r.jsx)(x.$,{variant:"primary",text:"Refresh Now",fullWidth:!0,onClick:function(){tk.h.dispatch({type:"CONTENT_INVENTORY_MANUAL_REFRESH",feedId:t6.X1.GLOBAL_FEED,feature:tF.M.INBOX})},loading:s})]}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Impression Capping"}),(0,r.jsx)(x.$,{variant:"primary",text:"Clear Impressions",fullWidth:!0,onClick:function(){tk.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_CLEAR_IMPRESSIONS"})}}),(0,r.jsx)(x.$,{variant:"primary",text:"Log Impressions",fullWidth:!0,onClick:function(){tk.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_LOG_IMPRESSIONS"})}}),(0,r.jsx)(x.$,{variant:"primary",text:n?"Enable Impression Capping":"Disable Impression Capping",fullWidth:!0,onClick:function(){tk.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_TOGGLE_IMPRESSION_CAPPING"})}}),(0,r.jsx)(x.$,{variant:"primary",text:l?"Disable Fast Impression Capping":"Enable Fast Impression Capping",fullWidth:!0,onClick:function(){tk.h.dispatch({type:"CONTENT_INVENTORY_DEBUG_TOGGLE_FAST_IMPRESSION_CAPPING"})}})]}),!1,(0,r.jsx)(t4,{}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Game Profile"}),(0,r.jsx)(f.k,{placeholder:"App ID or full name",onChange:e=>(0===e.length||e.length>=18)&&u(e),onKeyDown:e=>{"Enter"===e.key&&(c===e.currentTarget.value?h?.(e):u(e.currentTarget.value))},error:c.length>0&&null==h?`No game profile for ${m??c+" - try by id"}.`:void 0,helperText:null!=h?"Game profile found":void 0}),(0,r.jsx)("ul",{children:j.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(ai,{application:e})},`follow-game-${e.id}`))})]})]})})}function ai(e){let{application:t}=e,a=(0,tq.A)({applicationId:t.id,location:"DevToolsContentInventory",source:tY.GameProfileSources.DevTools});return(0,r.jsx)($.D,{onClick:a,children:(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:t.name})})}var as=a(890497),ar=a(769015),ao=a(311043),ad=a(569926),ac=a(282435);function au(e){return ac.jN.get(e)??0}function am(e){let{gameId:t}=e,{data:a,isLoading:n}=(0,ad.I)(t),l=(0,d.bG)([ao.A],()=>ao.A.hasNoData(t),[t]);return n||null==a&&!l?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Loading\u2026"}):null==a?(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:["No game found for ID ",t]}):(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)(ar.A,{game:a,size:ar.M.SMALL}),(0,r.jsxs)(W.B,{gap:0,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a.name}),(0,r.jsx)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:a.id})]})]})}function ah(){let[e,t]=o.useState(null),[a,n]=o.useState(""),l=(0,d.bG)([tJ.A],()=>tJ.A.games),i=o.useMemo(()=>l.filter(e=>null!=e.name&&""!==e.name).map(e=>({id:e.id,value:e.id,label:e.name})).sort((e,t)=>au(t.value)-au(e.value)),[l]),s=o.useMemo(()=>({baseSort:(e,t)=>au(t.item.value)-au(e.item.value),keys:["label"]}),[]),c=o.useCallback(e=>{t(e),null!=e&&n("")},[]),u=o.useCallback(e=>{n(e),e.trim().length>0&&t(null)},[]),m=a.trim(),h=m.length>0?m:e??void 0,g=(0,tq.A)({gameId:h,location:"DevToolsGameProfile",source:tY.GameProfileSources.DevTools});return(0,r.jsx)("div",{className:tH.nd,children:(0,r.jsxs)(W.B,{gap:32,padding:12,fullWidth:!1,children:[(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Game Profile"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Search for a game by name, or paste a game ID, then open its profile."})]}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:"Search"}),(0,r.jsx)(as.Z,{label:"Search games",hideLabel:!0,placeholder:"Search for a game\u2026",options:i,value:m.length>0?void 0:e??void 0,onSelectionChange:c,selectionMode:"single",clearable:!0,matchSorterOptions:s})]}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:"Game ID"}),(0,r.jsx)(f.k,{label:"Game ID",hideLabel:!0,placeholder:"Paste a game ID",value:a,onChange:u}),m.length>0&&(0,r.jsx)(am,{gameId:m})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Open Game Profile",fullWidth:!0,disabled:null==g,onClick:g??void 0})]})})}var ax=a(923477),ap=a(750672);function ag(){let e=(0,ax.O)(e=>e.requestHighlightFirstCard);return(0,r.jsxs)("div",{className:F()(tH.nd,ap.k),children:[(0,r.jsx)(H.D,{variant:"heading-lg/normal",children:"Game Server Hosting"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:'Replays the post-purchase scroll + highlight on the first card in the "Your game servers" list, exactly like clicking "View game server" after checkout. Open the Game Servers shop tab (/shop?tab=game-servers) with at least one owned server first.'}),(0,r.jsx)(x.$,{variant:"secondary",text:"Run post-purchase highlight (first card)",onClick:e})]})}var av=a(554146),aj=a(594061),af=a(617617),ab=a(355898),ay=a(644103),aE=a(574560),a_=a(434265);let aC=[av.M.GAME_ACCOUNT_LINK_RECURRING_UPSELL,av.M.APP_WIDGET_V2_PROFILE_UPSELL_COACHMARK,av.M.APP_WIDGET_V2_PROFILE_UPSELL_SUGGESTED].map(e=>({id:String(e),label:av.M[e],value:e})),aS={"global-cooldown":"global cooldown","per-game-cooldown":"per-game cooldown",disabled:"disabled"};function aN(){let[e,t]=o.useState("dismissals"),[a,n]=o.useState(av.M.GAME_ACCOUNT_LINK_RECURRING_UPSELL),l=(0,d.bG)([af.A],()=>af.A.settings.userContent?.recurringDismissibleContentStates[a]??null),i=(0,d.bG)([aE.A],()=>aE.A.getAllGameUpsellDismissals(a)),s=o.useMemo(()=>Object.keys(i??{}),[i]),c=(0,tW.A)(s),[u,m]=o.useState(""),[h,g]=o.useState([]);o.useEffect(()=>(0,ay.Y)(e=>{g(t=>[e,...t].slice(0,100))}),[]);let v=o.useMemo(()=>{let e=new Set;for(let t of h)for(let a of t.applicationIds)e.add(a);return[...e]},[h]),y=(0,tW.A)(v),E=o.useMemo(()=>Object.fromEntries(v.map((e,t)=>[e,y[t]])),[v,y]),_=l?.lastDismissedAtMs!=null&&"0"!==l.lastDismissedAtMs?new Date(Number(l.lastDismissedAtMs)).toLocaleString():"Never";return(0,r.jsxs)("div",{className:a_.nd,children:[(0,r.jsxs)("div",{className:a_.$H,children:[(0,r.jsx)($.D,{className:F()(a_.V3,{[a_.u7]:"dismissals"===e}),onClick:()=>t("dismissals"),children:"Dismissals"}),(0,r.jsxs)($.D,{className:F()(a_.V3,{[a_.u7]:"call-log"===e}),onClick:()=>t("call-log"),children:["Call Log ",h.length>0?`(${h.length})`:""]})]}),"dismissals"===e?(0,r.jsxs)("div",{className:a_.Lj,children:[(0,r.jsx)("div",{className:a_.uW,children:(0,r.jsx)(j.l,{label:"Dismissible Content",value:a,onSelectionChange:e=>n(e),options:aC,selectionMode:"single",fullWidth:!0})}),(0,r.jsxs)("div",{className:a_.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Global DCF State"}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:["Last dismissed: ",_]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:["Times dismissed: ",l?.numTimesDismissed??0]}),(0,r.jsx)(x.$,{variant:"secondary",text:"Reset Global DCF State",onClick:()=>(0,aj._N)(a)})]}),(0,r.jsxs)("div",{className:a_.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Mark as Dismissed"}),(0,r.jsx)(f.k,{label:"Game ID",value:u,onChange:e=>m(e),placeholder:"Enter Game ID"}),(0,r.jsx)(x.$,{variant:"secondary",text:"Mark as Dismissed",disabled:""===u.trim(),onClick:()=>{(0,ab.M)([u.trim()],a),m("")}})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:F()(a_.uW,a_.LY),children:[(0,r.jsxs)(H.D,{variant:"heading-md/bold",children:["Per-Game Dismissals (",s.length,")"]}),0===s.length?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"No dismissal data for this content type."}):(0,r.jsxs)(r.Fragment,{children:[s.map((e,t)=>{let n=c[t],l=i?.[e];if(null==l)return null;let s=n?.getIconURL(32);return(0,r.jsxs)("div",{className:a_.Nr,children:[(0,r.jsxs)("div",{className:a_.MY,children:[null!=s&&(0,r.jsx)("img",{src:s,alt:"",className:a_.Z2}),(0,r.jsxs)("div",{className:a_.qi,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:n?.name??"Unknown App"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:e})]}),(0,r.jsx)(x.$,{variant:"secondary",text:"Clear",onClick:()=>(0,ab.e)(e,a)})]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Last dismissed: ",new Date(l.dismissedAt).toLocaleString()]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Times dismissed: ",l.timesDismissed]})]},e)}),(0,r.jsx)(x.$,{variant:"critical-primary",text:"Clear All",onClick:()=>{for(let e of s)(0,ab.e)(e,a)}})]})]})]}):(0,r.jsx)("div",{className:a_.Lj,children:(0,r.jsxs)("div",{className:a_.uW,children:[(0,r.jsxs)("div",{className:a_.aq,children:[(0,r.jsxs)(H.D,{variant:"heading-md/bold",children:["Hook Calls (",h.length,")"]}),(0,r.jsx)(x.$,{variant:"secondary",text:"Clear",onClick:()=>g([])})]}),0===h.length?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"No calls recorded yet. Hook calls to useShouldShowGameUpsellForMultipleGames will appear here."}):h.map((e,t)=>(0,r.jsxs)("div",{className:a_.Nr,children:[(0,r.jsxs)("div",{className:a_.O9,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:new Date(e.timestamp).toLocaleTimeString()}),e.disabled&&(0,r.jsx)("span",{className:a_.t7,children:"(disabled)"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:av.M[e.dismissibleContent]})]}),0===e.applicationIds.length?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"No apps"}):e.applicationIds.map(t=>{let a=E[t],n=a?.getIconURL(20),l=e.eligibleToShow.includes(t),i=e.excludedReasons[t];return(0,r.jsxs)("div",{className:a_.Ss,children:[null!=n&&(0,r.jsx)("img",{src:n,alt:"",className:a_.rb}),(0,r.jsx)("span",{className:a_.Jd,children:a?.name??t}),l?(0,r.jsx)("span",{className:a_.OK,children:"eligible"}):null!=i?(0,r.jsx)("span",{className:a_.t7,children:aS[i]}):null]},t)})]},t))]})})]})}var aA=a(696986),ak=a(47167),aI=a(734057),aD=a(994500),aT=a(310031),aO=a(394953),aR=a(618216);let aw=[{key:"channelName",cellClassName:F()(aR.Hn,aR.HA),render(e){let{channelName:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}},{key:"channelId",cellClassName:F()(aR.Hn,aR.Zm),render(e){let{channelId:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}}],aM=[{key:"channelName",cellClassName:F()(aR.Hn,aR.HA),render(e){let{channelName:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}},{key:"loadState",cellClassName:F()(aR.Hn,aR.C7),render(e){let{loadState:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}},{key:"channelId",cellClassName:F()(aR.Hn,aR.Zm),render(e){let{channelId:t}=e;return(0,r.jsx)(p.E,{variant:"text-md/normal",children:t})}}];function aL(){let{unreadRecentMentionsCount:e,unreadChannelIds:t}=(0,aO.U4)(),{isLoading:a,hasLoadedEver:n,hasPreloaded:l,hasMoreToLoad:i,isLoadingComplete:s}=(0,tE.cf)([aT.A],()=>({isLoading:aT.A.isLoading,hasLoadedEver:aT.A.hasLoadedEver,hasPreloaded:aT.A.hasPreloaded,hasMoreToLoad:aT.A.hasMoreToLoad,isLoadingComplete:aT.A.isLoadingComplete})),o=(0,tE.bG)([aT.A],()=>aT.A.currentRequestAnalyticsPayload),d=(0,tE.cf)([aT.A],()=>aT.A.getChannelInfoMap()),c=(0,tE.cf)([aI.A],()=>{let e={};return Object.entries(d).forEach(t=>{let[a]=t,n=aI.A.getChannel(a);e[a]=n??null}),e}),u=(0,tE.cf)([aI.A],()=>t.reduce((e,t)=>{let a=aI.A.getChannel(t);return e[t]=a??null,e},{})),h=(0,tE.bG)([aT.A],()=>aT.A.getInboxMessages()),x=(0,tE.bG)([aT.A],()=>aT.A.getDevOverrides().navOnClick);return(0,r.jsx)("div",{className:tH.nd,children:(0,r.jsxs)(g.Ip,{className:aR.Qs,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Inbox"}),(0,r.jsxs)("div",{children:["Inbox Message Count: ",h.length]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Dev Overrides"}),(0,r.jsx)("div",{style:{display:"flex",alignItems:"center",marginTop:8},children:(0,r.jsx)(m.d,{label:"Nav On Click",checked:!!x,onChange:e=>{tk.h.dispatch({type:"NOTIFICATIONS_INBOX_SET_DEV_OVERRIDES",navOnClick:e})}})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Unreads and Badging"}),(0,r.jsx)(aA.h,{size:8}),(0,r.jsxs)("div",{children:["Unread Recent Mentions Count: ",e]}),(0,r.jsxs)("div",{children:["Unread Channel Count: ",t.length]}),(0,r.jsx)(tK,{columns:aw,data:Object.entries(u).map(e=>{let[t,a]=e;return{key:t,channelId:t,channelName:null!=a?(0,ak.m1)(a,en.default,aD.A):""}})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Store State"}),(0,r.jsxs)("div",{children:["Is Loading: ",a?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Has Preloaded: ",l?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Has Loaded Ever: ",n?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Has More To Load: ",i?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Is Loading Complete: ",s?"\u2705":"\u274C"]}),(0,r.jsxs)("div",{children:["Last Loading Trigger: ",o?.loadingTrigger]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Channel Info Map"}),(0,r.jsxs)("div",{children:["Total Channels: ",Object.keys(d).length]}),(0,r.jsx)(tK,{columns:aM,data:Object.entries(d).map(e=>{let t,[a,n]=e;return{key:a,channelId:a,channelName:null!=(t=c[a])?(0,ak.m1)(t,en.default,aD.A):"",loadState:n.loadState}})})]})]})})}var aP=a(976860),aU=a(396813),aG=a(786800);let aB=function(){return(0,r.jsxs)("div",{className:aG.k,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-feedback-info",style:{marginBottom:"8px"},children:"Click the button below to clear your Minor Reward Capping History."}),(0,r.jsx)(x.$,{onClick:()=>{(0,aU.Ov)(),(0,aP.pX)(er.BVt.QUEST_HOME)},text:"Clear History"}),(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-feedback-info",children:"Your may have to refresh your client after being redirected to the Quest Home in order to see these changes."})]})};var aF=a(271866),a$=a(868511),aV=a(147964),aW=a(760716),az=a(115093),aH=a(970628);let aK=window.GLOBAL_ENV.RELEASE_CHANNEL===az.B.STAGING?"1438571444891025408":"1346069614634864772";function aY(){let e=(0,aW.i)(e=>e.overrideApplicationId),t=(0,aW.i)(e=>e.setOverrideApplicationId),a=null!=e,n=(0,aW.i)(e=>e.overrideNitroEligibilityForSocialLayerStorefront),l=(0,aW.i)(e=>e.setOverrideNitroEligibilityForSocialLayerStorefront),i=(0,aW.i)(e=>e.isNitroEligibleForSocialLayerStorefront),s=(0,aW.i)(e=>e.setIsNitroEligibleForSocialLayerStorefront),[c,u]=o.useState(aK),[h,p]=o.useState(er.FYj),g=o.useCallback(e=>{e?t(c):t(null)},[c,t]),v=o.useCallback(e=>{u(e),a&&t(e)},[a,t]),j=(0,aW.i)(e=>e.showSelfActivity),b=(0,aW.i)(e=>e.setShowSelfActivity),y=(0,aW.i)(e=>e.recommendationApplicationIds),E=(0,aW.i)(e=>e.setRecommendationApplicationIds),_=o.useCallback(e=>{e?E(h):E(null)},[h,E]),C=(0,d.bG)([aV.A],()=>null!=aV.A.testModeApplicationId),S=o.useCallback(e=>{e?(0,eV.openModal)(e=>(0,r.jsx)(a$.A,{...e})):aF.cL()},[]),N=(0,tq.A)({location:"DevToolsSlayerStorefrontPanel",applicationId:c,source:tY.GameProfileSources.Embed,trackEntryPointImpression:!0}),A=o.useCallback(e=>{N?.(e)},[N]),k=o.useCallback(()=>{(0,aP.pX)(er.BVt.COLLECTIBLES_SHOP_GAME_SHOP(c))},[c]);return(0,r.jsx)("div",{className:F()(tH.nd,aH.n),children:(0,r.jsxs)("div",{className:aH.k,children:[(0,r.jsx)(f.k,{label:"Application ID",value:c,onChange:v}),(0,r.jsx)(H.D,{variant:"heading-lg/normal",children:"Activity Override"}),(0,r.jsx)(m.d,{label:"Override activity application ID",checked:a,onChange:g}),(0,r.jsx)(m.d,{label:"Show own voice activity (bypass self check)",checked:j,onChange:b}),(0,r.jsx)(m.d,{label:"Enable application test mode",checked:C,onChange:S}),(0,r.jsx)(x.$,{text:"Open Game Profile Modal",onClick:A}),(0,r.jsx)(x.$,{text:"Navigate to App Game Shop",onClick:k}),(0,r.jsx)(H.D,{variant:"heading-lg/normal",children:"Wishlists"}),(0,r.jsx)(f.k,{label:"Recommendation application IDs",value:h,onChange:p,disabled:null==y}),(0,r.jsx)(m.d,{label:"Enable recommendation application IDs override",checked:null!=y,onChange:_}),(0,r.jsx)(m.d,{label:"Override nitro eligibility for social layer storefront",checked:n,onChange:l}),(0,r.jsx)(m.d,{label:"Is nitro eligible for social layer storefront",checked:i,onChange:s})]})})}var aq=a(540999),aJ=a(723702),aQ=a(865116);a(670812),a(772958);var aX=a(58736);a(558179),a(21574);var aZ=a(231545),a0=a(761929),a1=a(180808);function a2(e){let{resizableNode:t,minHeight:a,onResize:n}=e,l=(0,a0.A)({minDimension:a,resizableDomNodeRef:t,onElementResize:n,orientation:a0.R.VERTICAL_TOP,usePointerEvents:!0});return(0,r.jsx)("div",{onPointerDown:l,className:a1.Di})}function a3(e){let{children:t,className:a,initialHeight:n,minHeight:l}=e,i=o.useRef(null),[s,d]=o.useState(n);return(0,r.jsxs)("div",{ref:i,className:a1.kL,style:{minHeight:l,height:s},children:[(0,r.jsx)(a2,{resizableNode:i,minHeight:l,onResize:d}),(0,r.jsx)("div",{className:F()(a1.KZ,a),children:t})]})}var a6=a(231643);a(140346),a6.fu.NONE,a6.fu.NONE;var a5=a(825484),a8=a(688810),a4=a(975460),a9=a(206828),a7=a(487431),ne=a(712440),nt=a(733110),na=a(134861),nn=a(71393),nl=a(967198),ni=a(942370),ns=a(375708),nr=a(211850),no=a(681135);function nd(){var e;let t,a,n=o.useRef(null),{analyticsLocations:l}=(0,a8.Ay)(t_.A.DEV_TOOLS),[i,s]=o.useState(""),c=(0,d.bG)([nl.A],()=>nl.A.getGuildId()),u=(0,d.bG)([nn.A],()=>nn.A.getGuild(c)),m=u?.gameApplicationIds??[],h=(0,tW.A)(m).filter(e=>null!=e),g=(0,d.bG)([E.Ay,S.A],()=>(0,_.A)(E.Ay,S.A)),v=(0,tW.h)(i),j=(0,a4.g)(v),y=(0,d.yK)([tV.A],()=>v?.linkedGames?.map(e=>tV.A.getApplication(e.id)).filter(e=>null!=e)??[]),C=(0,a9.RD)(v,{allowedFlows:[ni._.RPC],debug:!0}),N=(0,a9.RD)(v,{allowedFlows:[ni._.WEB],debug:!0}),A=(0,d.bG)([na.A],()=>null!=j&&na.A.isConnected(j.id)),k=(0,a9.RD)(v,{debug:!0}),{canDeauthorize:I,deauthorize:D}=(e=k.connectionApp?.id,t=(0,d.bG)([nt.default],()=>nt.default.getNewestTokenForApplication(e)),a=o.useCallback(()=>{null!=t&&ne.A.delete(t.id)},[t]),{canDeauthorize:null!=t,deauthorize:a});return(0,r.jsxs)("div",{ref:n,className:F()(tH.nd,no.nd),children:[(0,r.jsxs)("div",{className:no.kL,children:[(0,r.jsx)(H.D,{variant:"heading-lg/normal",children:"Application"}),(0,r.jsx)(f.k,{label:"Application ID",value:i,onChange:s}),null!=g&&null!=g.id?(0,r.jsx)(x.$,{onClick:()=>s(g.id),variant:"primary",text:`Use detected game: ${g.name} (${g.id})`}):null,null!=u?h.length>0?(0,r.jsxs)("div",{className:no.Mc,children:[(0,r.jsxs)(p.E,{variant:"text-sm/semibold",color:"text-subtle",children:[u.name," (",u.id,") \xb7 Official games"]}),(0,r.jsx)(a5.e,{size:"sm",wrap:!0,children:h.map(e=>(0,r.jsx)(x.$,{onClick:()=>s(e.id),variant:i===e.id?"primary":"secondary",text:`${e.name} (${e.id})`},e.id))})]}):(0,r.jsxs)(p.E,{variant:"text-md/normal",color:"text-subtle",children:[u.name," (",u.id,") \xb7 No official games"]}):(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-subtle",children:"No guild selected"}),(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:no.J3,children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Application Name: ",null!=v?v.name:"N/A"]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Linked Games:"," ",y.length>0?y.map(e=>(0,a4.t)(v)?.id===e.id?`${e.name}*`:e.name).join(", "):"N/A"]})]})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:no.kL,children:[(0,r.jsx)(H.D,{variant:"heading-lg/normal",children:"Authorization status"}),(0,r.jsx)(a7.VT,{flow:ni._.RPC,showGlobalFlowToggle:!0,overallStatus:C.debug.isSubscribedToAuthorizeRequest?a7.nW.OVERALL_GOOD:A?a7.nW.WARN:a7.nW.OVERALL_BAD,name:ns.intl.string(nr.default.AGLx00),steps:[{status:A?a7.nW.GOOD:a7.nW.BAD,text:ns.intl.string(nr.default.kxF9br),description:A?null:ns.intl.string(nr.default.PFxxJa),learnMoreLink:A?null:"https://discord.com/developers/docs/discord-social-sdk/how-to/debug-log"},{status:C.debug.isSubscribedToAuthorizeRequest?a7.nW.GOOD:A?a7.nW.WARN:a7.nW.BAD,text:ns.intl.string(nr.default.S94dzs),description:C.debug.isSubscribedToAuthorizeRequest||!A?null:ns.intl.string(nr.default.aTULMB),learnMoreLink:C.debug.isSubscribedToAuthorizeRequest||!A?null:"https://discord.com/developers/docs/discord-social-sdk/how-to/debug-log"}],isChosen:k.chosenFlow===ni._.RPC}),(0,r.jsx)(a7.VT,{flow:ni._.WEB,showGlobalFlowToggle:!0,overallStatus:N.debug.hasConnectionEntrypointUrl?a7.nW.OVERALL_GOOD:a7.nW.OVERALL_BAD,name:ns.intl.string(nr.default.K3ObrU),steps:[{status:N.debug.hasConnectionEntrypointUrl?a7.nW.GOOD:a7.nW.BAD,text:ns.intl.string(nr.default["8a7IrV"]),description:N.debug.hasConnectionEntrypointUrl?ns.intl.formatToPlainString(nr.default["9iLeL2"],{url:N.connectionApp?.connectionEntrypointUrl}):null}],isChosen:k.chosenFlow===ni._.WEB}),(0,r.jsx)(a7.Sy,{status:k.hasAlreadyLinked?a7.nW.OVERALL_GOOD:a7.nW.OVERALL_BAD,text:ns.intl.string(ns.t["Vu/zmQ"])}),0===k.debug.validFlows.length&&(0,r.jsx)(p.E,{style:{minWidth:0,overflow:"hidden"},variant:"text-md/medium",children:ns.intl.string(nr.default.eg0mNa)}),(0,r.jsx)(x.$,{disabled:!k.canStartAuthorization,fullWidth:!0,onClick:()=>k.startAuthorization({analyticsLocations:l}),variant:"primary",text:"Start Authorization"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:"This will start whichever authorization flow is available. RPC authorization takes precedence over web."}),(0,r.jsxs)(a5.e,{fullWidth:!0,children:[(0,r.jsx)(x.$,{disabled:!C.canStartAuthorization,onClick:()=>C.startAuthorization({analyticsLocations:l}),variant:"secondary",text:"Start In-App Authorization"}),(0,r.jsx)(x.$,{disabled:!N.canStartAuthorization,onClick:()=>N.startAuthorization({analyticsLocations:l}),variant:"secondary",text:"Start Web Authorization"})]}),(0,r.jsx)(x.$,{disabled:!I,fullWidth:!0,onClick:D,variant:"critical-primary",text:"Deauthorize"})]}),v?.applicationAccountLinkBenefitConfig!=null&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.c,{}),(0,r.jsxs)("div",{className:no.kL,children:[(0,r.jsx)(H.D,{variant:"heading-lg/normal",children:"Benefit configuration"}),(0,r.jsx)("div",{className:no.Nr,children:(0,r.jsxs)("div",{className:no.Tc,children:[null!=v.applicationAccountLinkBenefitConfig.reward_image&&(0,r.jsx)("img",{src:v.applicationAccountLinkBenefitConfig.reward_image,alt:"Reward",className:no.L8}),(0,r.jsx)(p.E,{variant:"text-md/semibold",children:v.applicationAccountLinkBenefitConfig.reward_name??"Unnamed Reward"})]})})]})]})]})}var nc=a(427358),nu=a(541660);function nm(e){let{title:t,sortKey:a,activeSortKey:n,sortDir:l,onClick:i}=e,s=n===a?"desc"===l?" \u25BC":" \u25B2":"";return(0,r.jsx)($.D,{className:nu.K8,onClick:()=>i(a),children:(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:t+s})})}function nh(){let[e,t]=o.useState("affinity"),[a,n]=o.useState("desc"),l=o.useCallback(a=>{e===a?n(e=>"asc"===e?"desc":"asc"):(t(a),n("username"===a?"asc":"desc"))},[e]),i=(0,d.yK)([nc.A,en.default],()=>nc.A.getUserAffinities().map(e=>{let{otherUserId:t,communicationProbability:a,vcProbability:n,isFriend:l}=e;return{user:en.default.getUser(t),affinity:a,vcProbability:n,isFriend:l,key:t}})),s=o.useMemo(()=>[...i].sort((t,n)=>{let l;if("username"===e){let e=t.user?.username??t.key,a=n.user?.username??n.key;l=e.localeCompare(a)}else l=t[e]-n[e];return"desc"===a?-l:l}),[i,e,a]),c=o.useMemo(()=>[{key:"user",cellClassName:nu.iL,renderHeader:()=>(0,r.jsx)(nm,{title:"USER",sortKey:"username",activeSortKey:e,sortDir:a,onClick:l}),render(e){let{user:t,key:a}=e;return t?.username??a}},{key:"affinity",renderHeader:()=>(0,r.jsx)(nm,{title:"COMMUNICATION AFFINITY",sortKey:"affinity",activeSortKey:e,sortDir:a,onClick:l}),cellClassName:nu.nz,render(e){let{affinity:t}=e;return t.toFixed(5)}},{key:"vcProbability",renderHeader:()=>(0,r.jsx)(nm,{title:"VOICE AFFINITY",sortKey:"vcProbability",activeSortKey:e,sortDir:a,onClick:l}),cellClassName:nu.nz,render(e){let{vcProbability:t}=e;return t.toFixed(5)}},{key:"isFriend",renderHeader:()=>(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"IS FRIEND"}),cellClassName:nu.nz,render(e){let{isFriend:t}=e;return t.toString()}}],[e,a,l]);return 0===i.length?null:(0,r.jsx)(tK,{className:tH.nd,columns:c,rowClassName:nu.nM,data:s})}var nx=a(379257),np=a(847599),ng=a(486866);function nv(){return(0,r.jsx)("div",{className:F()(tH.nd,ng.k),children:(0,r.jsxs)("div",{children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Quick Actions"}),(0,r.jsx)(b.c,{gap:16}),(0,r.jsxs)("div",{className:ng.h,children:[(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Launch Age Verification Test Tool",onClick:()=>void(0,eV.openModalLazy)(async()=>{let{default:e}=await a.e("629079").then(a.bind(a,357578));return t=>(0,r.jsx)(e,{...t})},{onCloseCallback:void 0}),fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Launch Age Verification Modal",onClick:()=>nx.A.showAgeVerificationGetStartedModal({entryPoint:np.q1.DEV_TOOLS_QUICK_ACTIONS}),fullWidth:!0})]})]})})}var nj=a(536637),nf=a.n(nj),nb=a(862482),ny=a(624479),nE=a(555704),n_=a(285796),nC=a(241326),nS=a(683438),nN=a(297413),nA=a(379078),nk=a(704554),nI=a(957565),nD=a(58703),nT=a(80703),nO=a(280450);let nR=0,nw=[],nM=0,nL=[],nP=!1;class nU extends d.Ay.Store{static displayName="AnalyticsLogStore";initialize(){this.waitFor(nO.default,aq.A)}get loggedEvents(){return nw}get loggedEventsVersion(){return nM}get loggedTriggers(){return nL}get trackTriggers(){return nP}}let nG=new nU(tk.h,{TRACK:function(e){let{event:t,properties:a,fingerprint:n}=e;aq.A.isDeveloper&&(nw.push({key:(nR++).toString(),event:t,properties:a,fingerprint:null!=n?(0,nT.d)(n):nO.default.getId(),timestamp:new Date}),nM++,nw.length>500&&(nw=nw.slice(-Math.floor(250))))},TRACK_TRIGGER:function(e){let{experimentId:t,descriptor:a,exposureType:n,excluded:l,location:i,previouslyTracked:s}=e;!aq.A.isDeveloper||nP&&(nL=[...nL,{key:(0,eI.A)(),experimentId:t,descriptor:a,exposureType:n,excluded:l,location:i,previouslyTracked:s,timestamp:new Date}]).length>500&&nL.shift()},SET_TRACK_TRIGGERS:function(e){let{enabled:t}=e;nP=t},ANALYTICS_LOG_CLEAR:function(){nw=[],nM++,nL=[]}});var nB=a(658675);function nF(e){let{className:t,children:a}=e;return(0,r.jsx)("dl",{className:F()(tH.qo,t),children:a})}function n$(e){let{name:t,children:a,copyValue:n}=e,[l,i]=o.useState(!1);return o.useEffect(()=>{if(l){let e=setTimeout(()=>i(!1),1e3);return()=>clearTimeout(e)}},[l]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("dt",{className:tH.Bz,children:t}),(0,r.jsxs)("dd",{className:tH.Nw,children:[a,null!=n?(0,r.jsx)($.D,{tag:"span",className:tH.nH,onClick:()=>(0,nI.C)(n,()=>i(!0)),children:l?(0,r.jsx)(ti.U,{color:"currentColor",size:"sm"}):(0,r.jsx)(ny.CopyIcon,{color:"currentColor",size:"sm"})}):null]})]})}function nV(e){let{value:t}=e;return(0,r.jsx)(nB.P,{checked:t})}var nW=a(412966);let nz=[{key:"Event",cellClassName:nW.Hz,render(e){let{event:t}=e;return t}},{key:"Location",cellClassName:nW.QN,render(e){let{properties:t}=e;return null==t.location?null:t.location}}];function nH(e){let{children:t}=e;return(0,r.jsx)(g.Ip,{orientation:"auto",className:nW._D,children:(0,r.jsx)("dl",{children:t})})}function nK(e){let{name:t,children:a,copyValue:n}=e,[l,i]=o.useState(!1);return o.useEffect(()=>{if(l){let e=setTimeout(()=>i(!1),1e3);return()=>clearTimeout(e)}},[l]),(0,r.jsxs)("div",{className:nW.fY,children:[(0,r.jsx)("dt",{className:nW.m2,children:t}),(0,r.jsx)("dd",{children:a}),(0,r.jsx)($.D,{tag:"span",className:nW.nH,onClick:()=>(0,nI.C)(JSON.stringify(n),()=>i(!0)),children:l?(0,r.jsx)(ti.U,{color:"currentColor",size:"sm"}):(0,r.jsx)(ny.CopyIcon,{color:"currentColor",size:"sm"})})]})}let nY=new Set(["client_performance_cpu","client_performance_memory"]),nq=[{id:"details",name:"Details",group:a6.fu.NONE,render:e=>{let{loggedEvent:{event:t,properties:a,timestamp:n,fingerprint:l},onClose:i,filteredEvents:s}=e,o=en.default.getUser(l),d=nf()(n);return(0,r.jsxs)("div",{className:nW.sw,"data-mtctest-ignore":"true",children:[(0,r.jsxs)(aX.Ay,{className:F()(tH.jr,nW.nZ),children:[(0,r.jsx)(aX.Ay.Icon,{icon:nE.U,tooltip:t}),(0,r.jsxs)(aX.Ay.Title,{wrapperClassName:nW.qd,children:[t,(0,r.jsx)($.D,{tag:"span",className:nW.KE,onClick:()=>(0,nI.C)(t),children:(0,r.jsx)(ny.CopyIcon,{color:"currentColor",size:"sm"})})]}),(0,r.jsx)(aX.Ay.Icon,{icon:ny.CopyIcon,tooltip:"Copy all properties",onClick:()=>{(0,nI.C)(JSON.stringify({event:t,timestamp:n,fingerprint:l,user:o?.id,...a},(e,t)=>void 0===t?null:t,2))}}),(0,r.jsx)(aX.Ay.Icon,{icon:n_.a,tooltip:"Close",onClick:i})]}),(0,r.jsxs)(nF,{className:nW.ZK,children:[(0,r.jsx)(n$,{name:"Timestamp (local)",copyValue:n.toISOString(),children:(0,r.jsxs)("time",{dateTime:n.toISOString(),title:(0,nD.i$)(d,"LLLL"),children:["(",nf().locale(),") ",(0,nD.mk)(d)]})}),null!=o&&(0,r.jsx)(n$,{name:"User",copyValue:o.id,children:(0,r.jsx)(nN.A,{user:o})}),(0,r.jsx)(n$,{name:"Fingerprint",copyValue:l,children:(0,r.jsx)("code",{children:l})})]}),(0,r.jsx)(nH,{children:Object.entries(a).map(e=>{let[a,n]=e,l=nY.has(a)?function(e,t,a){let n=e.filter(e=>e.event===t);if(0===n.length)return{average:null,count:0};let l=null,i=0;for(let e of n){let t=e.properties[a];"number"==typeof t&&(i+=1,null==l?l=t:l+=t)}return{average:null!==l?l/n.length:null,count:i}}(s,t,a):null;return(0,r.jsxs)("div",{children:[(0,r.jsx)(nK,{name:`${a}:`,copyValue:{[a]:n||null},children:null!=n?(0,r.jsx)("code",{children:JSON.stringify(n)}):(0,r.jsx)("code",{className:nW.HO,children:"null"})},a),null!==l&&null!==l.average&&(0,r.jsx)(nK,{name:`${a}_avg:`,copyValue:{[a]:n||null},children:(0,r.jsxs)("code",{children:[l.average.toFixed(3)," (",l.count,")"]})},`${a}_avg`)]},`${a}_container`)})})]})}}],nJ={events:{label:"Events",filter:e=>Object.entries(nJ).filter(e=>{let[t]=e;return"events"!==t}).map(t=>{let[a,{filter:n}]=t;return!n(e)}).every(e=>e)},experiments:{label:"Experiments",filter:e=>["experiment_user_triggered","experiment_guild_triggered"].includes(e.event)},impressions:{label:"Impressions",filter:e=>e.event.startsWith("impression_")},networkActions:{label:"Network",filter:e=>e.event.startsWith("network_action")}},nQ={searchType:nA.n.REGEX,searchStringGenerator:e=>{let{event:t,properties:a}=e;return null!=a.location?[t,a.location]:t},throttleMs:100};function nX(){let e=o.useRef(null),[t,a]=o.useState(""),n=(0,d.bG)([nG],()=>nG.loggedEventsVersion),[l,i]=o.useState(()=>Object.keys(nJ)),[s,c]=o.useState(nG.loggedEvents),u=o.useCallback(e=>{c(e)},[]);(0,nk.RT)(t,nG.loggedEvents,u,nQ,[n]);let m=s.filter(e=>{for(let t of l)if(nJ[t].filter(e))return!0;return!1}),[h,x]=o.useState(void 0),p=m.find(e=>e.key===h),{TabBar:g,renderSelectedTab:v}=(0,a6.Ay)({tabs:nq},[]);return(0,r.jsxs)("div",{ref:e,className:F()(tH.nd,nW.nd),children:[(0,r.jsxs)("div",{className:nW.rh,children:[(0,r.jsx)(nb.$n,{className:nW.Q$,look:nb.$n.Looks.BLANK,size:nb.$n.Sizes.ICON,onClick:K.eY,children:(0,r.jsx)("span",{title:ns.intl.string(ns.t.VkKicb),children:(0,r.jsx)(nC.TrashIcon,{size:"md",color:"currentColor","aria-label":ns.intl.string(ns.t.VkKicb)})})}),(0,r.jsx)("div",{className:nW.Bi}),(0,r.jsx)("div",{className:nW.uW,children:Object.entries(nJ).map(e=>{let[t,a]=e;return(0,r.jsx)($.D,{className:F()(nW.pb,l.includes(t)&&nW.bx),onClick:()=>{i(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},children:a.label},t)})})]}),(0,r.jsx)("div",{className:nW.rh,children:(0,r.jsx)(nS.I,{size:"sm",query:t,onChange:a,onClear:()=>a(""),placeholder:"Search by event name"})}),(0,r.jsx)(tK,{columns:nz,data:m,selectedRowKey:h,onClickRow:e=>x(e.key)}),null!=p&&(0,r.jsxs)(a3,{className:nW.rf,minHeight:100,initialHeight:null!=e.current?e.current.clientHeight/2:300,children:[(0,r.jsx)(g,{}),v({loggedEvent:p,onClose:()=>x(void 0),filteredEvents:m})]})]})}var nZ=a(382483),n0=a(385113),n1=a(317672);function n2(e){let{config:t}=e,a=Object.entries(t.surfaces??{});return(0,r.jsxs)(W.B,{gap:8,padding:8,className:n1.lt,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",color:"text-strong",children:t.display_name}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Config ID: ",t.config_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["App ID: ",t.application_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Status: ",t.status]}),null!=t.updated_at&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Updated: ",t.updated_at]}),null!=t.published_at&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Published: ",t.published_at]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(p.E,{variant:"text-xs/semibold",color:"text-strong",children:["Surfaces (",a.length,")"]}),0===a.length?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"No surfaces configured"}):a.map(e=>{let[t,a]=e;return(0,r.jsxs)(W.B,{gap:4,padding:4,className:n1.YL,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",color:"text-default",children:t}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Layout: ",a.layout]})]},t)})]})}function n3(e){let{config:t,isSelected:a,onSelect:n}=e;return(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",gap:8,padding:8,className:a?n1.FM:n1.gt,children:[(0,r.jsx)($.D,{className:n1.Av,onClick:n,children:(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/medium",color:"text-strong",children:t.display_name}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:[t.config_id," \xb7 ",t.application_id]})]})}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Refetch",onClick:()=>(0,nZ.un)(t.application_id,{force:!0})})]})}function n6(){let e=(0,d.bG)([n0.A],()=>n0.A.getFeaturedFetchState());return(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Featured Configs"}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["(",e,")"]})]}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Force Refetch",onClick:()=>(0,nZ.Wq)({force:!0})})]})}function n5(){let e=(0,d.bG)([n0.A],()=>n0.A.getDeveloperFetchState());return(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Developer Configs"}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["(",e,")"]})]}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Force Refetch",onClick:()=>(0,nZ.i$)({force:!0})})]})}function n8(){let[e,t]=o.useState(""),a=(0,d.bG)([n0.A],()=>e.length>0?n0.A.getFetchState(e):null),n=(0,d.bG)([n0.A],()=>e.length>0?n0.A.getConfigs(e):null);return(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Fetch by Application ID"}),(0,r.jsx)(f.k,{placeholder:"Application ID",value:e,onChange:e=>t(e)}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Fetch",disabled:0===e.length,onClick:()=>(0,nZ.un)(e,{force:!0})}),null!=a&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",color:"text-muted",children:["Status: ",a]}),null!=n&&n.length>0&&(0,r.jsx)(W.B,{gap:4,children:n.map(e=>(0,r.jsx)(n2,{config:e},e.config_id))})]})}function n4(e){let{configs:t,selectedConfigId:a,onSelectConfig:n}=e,l=(0,d.bG)([n0.A],()=>n0.A.getFeaturedFetchState());return(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsxs)(p.E,{variant:"text-md/semibold",color:"text-strong",children:["All Loaded Configs (",t.length,")"]}),l===n0.e.FETCHING&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Loading..."}),t.map(e=>(0,r.jsx)(n3,{config:e,isSelected:a===e.config_id,onSelect:()=>n(a===e.config_id?null:e.config_id)},e.config_id))]})}function n9(e){let{config:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.c,{}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:"Config Details"}),(0,r.jsx)(n2,{config:t})]})]})}function n7(){let[e,t]=o.useState(null),a=Object.values((0,d.bG)([n0.A],()=>n0.A.getAllConfigsByApplication())).flat(),n=null!=e?a.find(t=>t.config_id===e):null;return(0,r.jsx)(g.Ar,{children:(0,r.jsxs)(W.B,{gap:16,padding:8,className:n1.zr,children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",color:"text-strong",children:"Application Widget Configs"}),(0,r.jsx)(x.$,{size:"sm",variant:"critical-secondary",text:"Reset store",onClick:()=>tk.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_DEBUG_RESET"})}),(0,r.jsx)(n6,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(n5,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(n8,{}),(0,r.jsx)(b.c,{}),(0,r.jsx)(n4,{configs:a,selectedConfigId:e,onSelectConfig:t}),null!=n&&(0,r.jsx)(n9,{config:n})]})})}var le=a(513520),lt=a(130100),la=a(468747);let ln=[{key:"Channel",cellClassName:la._w,render(e){let{channelName:t}=e;return t}},{key:"score",renderHeader:()=>(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"SCORE"}),cellClassName:la.t6,render(e){let{score:t}=e;return t.toFixed(5)}}];function ll(){o.useEffect(()=>{(0,le.I)()},[]);let e=(0,d.yK)([lt.A,aI.A],()=>lt.A.getChannelAffinities().map(e=>{let{channelId:t,score:a}=e;return{key:t,channelName:aI.A.getChannel(t)?.name??t,score:a}}).sort((e,t)=>t.score-e.score));return 0===e.length?null:(0,r.jsx)(tK,{className:tH.nd,columns:ln,rowClassName:la.nM,data:e})}function li(){return(0,r.jsxs)(p.E,{variant:"text-lg/normal",children:["Under Construction"," ",(0,r.jsx)("span",{role:"img","aria-label":"Construction",children:"\uD83D\uDEA7"})]})}var ls=a(105565),lr=a(558845),lo=a(333714);function ld(e){switch(e){case ls.r.DC_DISMISSED:return"DISMISS:";case ls.r.DC_SHOWN:return"SHOW:";case ls.r.DC_SHOW_REQUEST:return"REQUEST TO SHOW:";default:return"UNKNOWN TYPE:"}}let lc=[{key:"events",render(e){let{event:t,dismissibleContent:a}=e;return`${t} ${av.M[a]}`}}],lu=[{key:"candidates",render(e){let{dismissibleContent:t}=e;return`${av.M[t]}`}}];function lm(){let e=(0,d.bG)([ls.A],()=>ls.A.getDCFEvents()),t=(0,lr.Ay)(e=>e.candidates),a=(0,lr.Ay)(e=>e.lastWinnerTime),n=0!==a?nf()(a).fromNow():"n/a",l=(0,lr.Ay)(e=>0===e.lastWinnerTime?null:e.recentlyShown[0]),i=e.map(e=>{let{eventType:t,dismissibleContent:a}=e;return{key:ld(t)+a.toString(),event:ld(t),dismissibleContent:a}}),s=Array.from(t.keys()).map(e=>({key:e.toString(),dismissibleContent:e}));return(0,r.jsxs)("div",{className:lo.KE,children:[(0,r.jsxs)("div",{className:lo.pq,children:["Last winner time: ",n]}),(0,r.jsx)("br",{}),(0,r.jsxs)("div",{className:lo.pq,children:["Last winner: ",null!=l?av.M[l]:"None"]}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:lo.uI,children:(0,r.jsx)(tK,{className:lo.Th,columns:lu,data:s})}),(0,r.jsx)("br",{}),(0,r.jsx)(tK,{columns:lc,data:i})]})}var lh=a(689175),lx=a(541689),lp=a(199773);function lg(){let e=(0,o.useCallback)(e=>{let t=new Set(lv());t.delete(e);let a=Array.from(t).slice(0,4);a.unshift(e),t$.w.set("RecentDismissibleOverrides",a)},[]);return[lv(),e]}function lv(){return t$.w.get("RecentDismissibleOverrides")??[]}a(667532);var lj=a(662546),lf=a(643278),lb=a(256787),ly=a(20439);let lE=o.memo(function(e){let{className:t,content:a,onChange:n}=e,l=av.M[a],{isDismissed:i,handleToggleDismissState:s}=(0,ly.A)(l),[d,c]=o.useState(!1),u=o.useCallback(()=>{n?.(a),s()},[n,s,a]),h=o.useCallback(e=>{e.preventDefault(),c(!0),navigator.clipboard.writeText(a.toLowerCase())},[a]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(W.B,{className:t,direction:"horizontal",align:"center",children:[(0,r.jsx)(eB.K,{size:"sm",variant:"icon-only",icon:d?lj.O:lf.ClipboardListIcon,onClick:h,"aria-label":d?"Copied":"Copy"}),(0,r.jsx)(m.d,{label:`${a.toLowerCase()} (${av.M[a]})`,description:(0,lb.Zm)(l)?function(e){let t=af.A.settings.userContent?.recurringDismissibleContentStates?.[e];if(null==t)return null;let a=[],{lastDismissedVersion:n,lastDismissedAtMs:l,lastDismissedObjectId:i}=t;if(void 0!==n&&0!==n&&a.push(`last_dismissed_version: ${n}`),void 0!==l){let e=Number(l),t=Number.isNaN(e)?"n/a":new Date(e).toLocaleString();a.push(`last_dismissed_at: ${t}`)}return(void 0!==i&&"0"!==i&&a.push(`last_dismissed_object_id: ${i}`),0===a.length)?null:a.join(", ")}(l):null,checked:i,onChange:u})]}),(0,r.jsx)(b.c,{})]})});function l_(e){let{items:t,onChange:a}=e,[n,l]=lg(),i=(0,o.useCallback)(e=>{l(e),a?.(e)},[l,a]);return(0,r.jsx)(W.B,{gap:16,children:t.filter(e=>isNaN(Number(e))).map(e=>(0,r.jsx)(lE,{content:e,onChange:i},e))})}function lC(e){let{searchQuery:t=""}=e,a=(0,lr.Ay)(e=>e.recentlyShown),[n,l]=lg(),i=n.filter(e=>e.toLowerCase().includes(t.toLowerCase())).filter(e=>!a.includes(av.M[e])).slice(0,3);return 0===i.length?null:(0,r.jsx)(u.n,{label:"Recent Overrides",children:(0,r.jsx)(l_,{items:i})})}function lS(e){let{searchQuery:t=""}=e,a=(0,lr.Ay)(e=>e.recentlyShown).map(e=>av.M[e]).filter(e=>e.toLowerCase().includes(t.toLowerCase())).slice(0,3);return 0===a.length?null:(0,r.jsx)(u.n,{label:"Recently Shown",children:(0,r.jsx)(l_,{items:a})})}var lN=a(607734);function lA(){let{dailyCapReached:e,dailyCapOverridden:t,newUserMinAgeRequiredOverridden:a}=(0,d.cf)([lp.A],()=>({dailyCapReached:lp.A.hasUserHitDCCap(),dailyCapOverridden:lp.A.dailyCapOverridden,newUserMinAgeRequiredOverridden:lp.A.newUserMinAgeRequiredOverridden})),[n,l]=o.useState(""),[i,s]=o.useState(20),c=o.useMemo(()=>Object.keys(av.M).filter(e=>e.toLowerCase().includes(n.toLowerCase())).reverse(),[n]),h=o.useCallback(e=>{let t=e.currentTarget;t.scrollHeight-t.scrollTop<=t.clientHeight+100&&i<c.length&&s(e=>e+100)},[i,c.length]);return(0,r.jsx)(lh.Ch,{onScroll:h,children:(0,r.jsxs)("div",{className:lN.KE,children:[(0,r.jsxs)(u.n,{label:"Dismissible Content Overrides",children:[(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(x.$,{variant:"primary",text:"Reset Daily Cap",onClick:()=>(0,lx.Ab)()}),(0,r.jsx)(x.$,{variant:"primary",text:"Undismiss All DCs",onClick:()=>(0,aj.nT)()}),(0,r.jsx)(x.$,{variant:"primary",text:"Dismiss All DCs",onClick:()=>(0,aj.D1)()}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:`Daily Cap Reached: ${e?"Yes":"No"}`})]}),(0,r.jsx)(m.d,{label:"Override Dismissible Content Daily Cap",checked:t,onChange:lx.SE}),(0,r.jsx)(m.d,{label:"Override Minimum User Account Age Requirement",checked:a,onChange:lx.U$})]}),(0,r.jsx)(lS,{}),(0,r.jsx)(lC,{}),(0,r.jsxs)(u.n,{label:"All Dismissible Contents",children:[(0,r.jsx)(nS.I,{query:n,onChange:l,onClear:()=>l("")}),(0,r.jsx)(l_,{items:c.slice(0,i)})]})]})})}var lk=a(276086),lI=a(154323),lD=a(504565);function lT(){let e=(0,d.bG)([lI.A],()=>lI.A.allWithDescriptions(),[],d.My),t=o.useMemo(()=>e.map(e=>{let[t,a,n]=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m.d,{label:n,description:t,checked:a,onChange:e=>(0,lk.L)(t,e)},t),(0,r.jsx)(b.c,{gap:16})]})}),[e]);return(0,r.jsxs)("div",{className:lD.kL,children:[(0,r.jsx)("div",{"data-button-hoisted-classname-wrapper":!0,className:lD.x6,children:(0,r.jsx)(x.$,{variant:"primary",text:"Clear all",onClick:lk.$,fullWidth:!0})}),(0,r.jsx)("div",{className:lD.vu,children:t})]})}var lO=a(106839);function lR(){let e=(0,d.bG)([tJ.A],()=>tJ.A.detectableGamesEtag),t=(0,d.bG)([tJ.A],()=>tJ.A.lastFetched),a=(0,d.bG)([tJ.A],()=>tJ.A.games.length);return(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:"Cache Status"}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[(0,r.jsx)("strong",{children:"Total games:"})," ",a]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[(0,r.jsx)("strong",{children:"ETag:"})," ",""===e?"(empty)":(0,r.jsx)("span",{className:lO.ti,children:e})]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[(0,r.jsx)("strong",{children:"Last fetched:"})," ",null==t?"never":new Date(t).toLocaleString()]})]})}function lw(e){let{game:t}=e,{data:a}=(0,ad.I)(t.id),n=null!=a&&a.name!==t.name;return(0,r.jsxs)(W.B,{gap:12,className:lO.f_,children:[(0,r.jsxs)(W.B,{direction:"horizontal",gap:12,align:"center",children:[(0,r.jsx)(ar.A,{game:a,size:ar.M.LARGE}),(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(H.D,{variant:"heading-lg/bold",children:t.name}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:t.id})]})]}),(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"GameStore"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:null==a?"No record fetched. The icon above comes from here, not from the detectable payload, so it is blank.":`name: ${a.name}`}),n&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Differs from the detectable name above."})]}),(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"DetectableGameStore"}),(0,r.jsx)("pre",{className:lO.aY,children:JSON.stringify(t,null,2)})]})]})}function lM(){let[e,t]=o.useState(null),[a,n]=o.useState(""),l=(0,d.bG)([tJ.A],()=>tJ.A.games),i=o.useMemo(()=>l.filter(e=>null!=e.name&&""!==e.name).map(e=>({id:e.id,value:e.id,label:e.name})),[l]),s=o.useCallback(e=>{t(e),null!=e&&n("")},[]),c=o.useCallback(e=>{n(e),e.trim().length>0&&t(null)},[]),u=a.trim(),m=u.length>0?u:e??void 0,h=(0,d.bG)([tJ.A],()=>null!=m?tJ.A.getDetectableGame(m)??null:null,[m]);return(0,r.jsx)("div",{className:F()(tH.nd,lO.kL),children:(0,r.jsxs)(W.B,{gap:16,padding:12,className:lO.rf,children:[(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Detectable Cache"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Inspect the local detectable games cache. Use this to verify whether a SKU or executable change has propagated to your client."})]}),(0,r.jsx)(lR,{}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:"Search"}),(0,r.jsx)(as.Z,{label:"Search games",hideLabel:!0,placeholder:"Search for a game\u2026",options:i,value:u.length>0?void 0:e??void 0,onSelectionChange:s,selectionMode:"single",clearable:!0})]}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:"Game ID"}),(0,r.jsx)(f.k,{label:"Game ID",hideLabel:!0,placeholder:"Paste a game ID",value:a,onChange:c})]}),null!=m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.c,{}),null!=h?(0,r.jsx)(lw,{game:h}):(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:["No entry in cache for ID ",m,"."]})]})]})})}var lL=a(691540),lP=a(97483),lU=a(123292),lG=a(780907),lB=a(56562);let lF=[{label:"Wuthering Waves",value:"1247227126416146462"},{label:"Marvel Rivals",value:"1314395942253756416"},{label:"VALORANT",value:"700136079562375258"},{label:"League of Legends",value:"1402418696126992445"},{label:"World of Warcraft",value:"356875762940379136"}];function l$(e){let{runningGame:t,isDebugGame:a}=e,{data:n}=(0,ad.I)(t.id);return(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,children:[null!=n&&(0,r.jsx)(ar.A,{game:n}),(0,r.jsxs)(W.B,{justify:"center",gap:0,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:n?.name}),a&&(0,r.jsx)(p.E,{variant:"text-xxs/normal",children:"Debug"})]})]})}function lV(){let e=(0,d.bG)([E.Ay],()=>E.Ay.getRunningGames()),t=(0,d.bG)([E.Ay],()=>E.Ay.getDebugRunningGame()),[a,n]=(0,o.useState)(t?.id??""),l=(0,o.useMemo)(()=>lF.map(e=>{let{label:t,value:a}=e;return{label:t,value:a,id:a}}),[]);function i(e){if(null==e||""===e)return void(0,lG.xt)(null);let t=tJ.A.getDetectableGame(e),a=t?.executables[0],n=t?.thirdPartySkus[0]?.distributor;if(null==t||null==a)return(0,lL.P0)({id:"devtools-set-debug-game-error",type:lP.Ck.FAILURE,message:"Invalid Game ID"});(0,lG.xt)({id:t.id,name:t.name,exeName:a.name,exePath:"",lastFocused:Date.now()/1e3,pid:-1,pidPath:[],hidden:!1,elevated:!1,processName:a.name,distributor:n,windowHandle:void 0,fullscreenType:lB.aI.UNKNOWN,cmdLine:"",nativeProcessObserverId:-1})}return(0,r.jsxs)(W.B,{gap:32,padding:12,fullWidth:!1,children:[(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Running Games"}),e.length>0&&(0,r.jsx)("div",{children:e.map(e=>(0,r.jsx)(l$,{runningGame:e,isDebugGame:t?.id===e.id},e.id))})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Set Debug Running Game"}),(0,r.jsx)(f.k,{label:"Custom Game ID",value:a,onChange:n}),(0,r.jsx)(as.Z,{label:"Pick a Preset Game",options:l,value:t?.id??"",onSelectionChange:function(e){i(e)},selectionMode:"single",clearable:!0}),(0,r.jsxs)(W.B,{direction:"horizontal",gap:16,justify:"end",align:"end",children:[null!=t&&(0,r.jsx)(lU.Q,{variant:"secondary",text:"Clear",onClick:()=>i(null)}),(0,r.jsx)(x.$,{variant:"primary",text:"Detect Game",onClick:()=>i(a)})]})]})]})}var lW=a(636537),lz=a(240248),lH=a(974009);function lK(){let[e,t]=o.useState(!1),[a,n]=o.useState(null),[l,i]=o.useState(null),s=o.useCallback(async()=>{try{t(!0),n(null),i(null);let e=await lW.Bo.put({url:"/users/@me/developer-portal/onboarding",body:{completed:!1},rejectWithError:!0});n(`${e.status}: ${e.text}`)}catch(e){i(e instanceof Error?e.message:String(e))}finally{t(!1)}},[]);return(0,r.jsxs)(W.B,{direction:"vertical",gap:4,children:[(0,r.jsx)(x.$,{variant:"primary",onClick:s,text:"Reset Onboarding",disabled:e,fullWidth:!0}),!(0,lz.uJ)(a)&&(0,r.jsx)(p.E,{variant:"text-md/normal",color:"status-positive",children:a}),!(0,lz.uJ)(l)&&(0,r.jsx)(p.E,{variant:"text-md/normal",color:"text-feedback-critical",children:l})]})}function lY(){return(0,r.jsx)("div",{className:lH.n,children:(0,r.jsx)(W.B,{direction:"vertical",gap:16,children:(0,r.jsx)(lK,{})})})}a(172879);var lq=a(64015),lJ=a.n(lq),lQ=a(874804),lX=a(866665),lZ=a(782134),l0=a(113494),l1=a(603349),l2=a(108715);function l3(e){return parseFloat(e.toFixed(3))}let l6=[{key:"Store",cellClassName:l2.lA,render(e){let{trace:t}=e;return t.name}},{key:"Time",cellClassName:l2.i7,render(e){let{trace:t}=e;return`${l3(t.time)} ms`}}];function l5(e){let{actionLog:t}=e,a=o.useMemo(()=>t.traces.map(e=>({key:e.name,trace:e})),[t]);return(0,r.jsx)(g.Ip,{children:(0,r.jsx)(tK,{columns:l6,data:a})})}let l8=[{id:"action",name:"Action",group:a6.fu.NONE,render(e){let{actionLog:t}=e,a=nf()(t.createdAt);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(nF,{className:l2.mP,children:[(0,r.jsx)(n$,{name:"Created at",children:(0,r.jsx)("time",{dateTime:t.createdAt?.toISOString(),title:(0,nD.i$)(a,"LLLL"),children:(0,nD.mk)(a)})}),(0,r.jsxs)(n$,{name:"Total Time",children:[l3(t.totalTime)," ms"]})]}),(0,r.jsx)(g.Ip,{className:l2.Dx,children:(0,r.jsx)(aZ.A,{data:t.action})})]})}},{id:"traces",name:"Store Handlers",group:a6.fu.NONE,render(e){let{actionLog:t}=e;return(0,r.jsx)(l5,{actionLog:t})}}];function l4(e){let{actionLog:t,initialHeight:a}=e,n=o.useMemo(()=>t.error?[...l8,{id:"error",name:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l1.A,{className:l2.ik}),"Error"]}),group:a6.fu.NONE,render(e){let{actionLog:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:F()(l2.u4,tH.KE),children:(0,r.jsx)("div",{className:tH.R5,children:(0,r.jsx)(nb.$n,{className:tH.Q$,size:nb.$n.Sizes.MIN,onClick:()=>console.error(t.error),children:"Log to Console"})})}),(0,r.jsx)(g.Ip,{className:l2.Dx,children:(0,r.jsx)(aZ.A,{data:t.error})})]})}}]:l8,[t]),{TabBar:l,renderSelectedTab:i}=(0,a6.Ay)({tabs:n},[n]);return(0,r.jsxs)(a3,{className:l2.rf,minHeight:100,initialHeight:a,children:[(0,r.jsx)(l,{}),(0,r.jsxs)(aX.Ay,{className:F()(tH.jr,l2.nZ),children:[(0,r.jsx)(aX.Ay.Icon,{icon:lQ.K,tooltip:t.name}),(0,r.jsx)(aX.Ay.Title,{wrapperClassName:F()(tH.qd,tH.ZE),className:tH.Pz,children:t.name}),(0,r.jsx)(aX.Ay.Icon,{icon:ny.CopyIcon,tooltip:"Copy event data",onClick:()=>{var e;let a=JSON.stringify(Object.keys(e=t.action).reduce((t,a)=>{var n;return t[a]=(n=e[a],er.AKn.test(n)?"REDACTED":n),t},{}),null,2);(0,nI.C)(a,()=>(0,lL.P0)({id:"copy-action-log-name",type:lP.Ck.SUCCESS,message:"Copied action log data to clipboard"}))}})]}),i({actionLog:t})]})}let l9=[{key:"Action",cellClassName:l2.lA,render(e){let{actionLog:t}=e;return(0,r.jsxs)(r.Fragment,{children:[t.error&&(0,r.jsx)(l1.A,{className:l2.ik}),t.name]})}},{key:"Total Time",cellClassName:l2.i7,render(e){let{actionLog:t}=e;return`${l3(t.totalTime)} ms`}},{key:"Timestamp",cellClassName:l2.i7,render(e){let{actionLog:t}=e;return nf()(t.createdAt).format("HH:mm:ss.SSS")}}],l7={searchType:nA.n.REGEX,searchStringGenerator:e=>{let{actionLog:t}=e;return t.name},throttleMs:100};function ie(){let e=o.useRef(null),[t,a]=o.useState(""),n=function(e){let[t,a]=o.useState(e.logs);return o.useEffect(()=>{let t=lJ()(()=>{a([...e.logs])},500);return e.on("log",t),()=>{e.off("log",t)}},[e]),t}(tk.h.actionLogger),l=o.useMemo(()=>n.map(e=>({key:e.id.toString(),actionLog:e})).toReversed(),[n]),[i,s]=o.useState(l),[d,c]=o.useState(l),[u,m]=o.useState(!1),[h,x]=o.useState(),p=o.useCallback(e=>{c(e)},[]);(0,nk.RT)(t,u?i:l,p,l7);let g=o.useCallback(e=>{s(l),m(e)},[l]),v=t.trim().length>0,j=o.useMemo(()=>v?d:u?i:l,[l,d,v,u,i]),f=u?"Enable Event Tracking":"Pause Event Tracking";return(0,r.jsxs)("div",{ref:e,className:F()(tH.nd,l2.nd),children:[(0,r.jsxs)("div",{className:l2.KE,children:[(0,r.jsx)(lX.m,{text:f,children:(0,r.jsx)(eB.K,{size:"sm",variant:u?"primary":"active",icon:u?lZ.PlayIcon:l0.PauseIcon,"aria-label":f,onClick:()=>g(!u)})}),(0,r.jsx)(nS.I,{size:"sm",query:t,onChange:a,onClear:()=>a(""),placeholder:"Search by action name"})]}),(0,r.jsx)(tK,{columns:l9,data:j,selectedRowKey:h?.id.toString(),onClickRow:e=>x(e.actionLog)}),null!=h&&(0,r.jsx)(l4,{actionLog:h,initialHeight:null!=e.current?e.current.clientHeight/2:300})]})}var it=a(936388),ia=a(269248);function il(){let e=o.useRef(null);return(0,r.jsx)("div",{ref:e,className:F()(tH.nd,ia.n),children:(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Reset Uploaded Key Versions Cache",onClick:it.A.clearUploadedKeyVersions})})}var ii=a(37962),is=a(881520),ir=a(670455),io=a(932661);let id=[{id:"seconds",label:"second(s)",value:1e3},{id:"minutes",label:"minute(s)",value:6e4},{id:"hours",label:"hour(s)",value:36e5},{id:"days",label:"day(s)",value:864e5}];function ic(){let[e,t]=o.useState(null),[a,n]=o.useState(0),[l,i]=o.useState(1e3),[s,c]=o.useState(0),m=(0,d.bG)([is.A],()=>null===e?null:is.A.getFeedbackConfig(ir.MW[e])??ii.u[ir.MW[e]]),h=Object.entries(ir.MW),g=h.slice(h.length/2).map(e=>{let[t]=e;return{id:t,label:t,value:t}}),v=o.useMemo(()=>null!=e&&s>=0&&s<=100&&a>=0,[e,s,a]);return(0,r.jsx)("div",{className:io.kL,children:(0,r.jsxs)(W.B,{gap:32,children:[(0,r.jsx)(j.l,{label:"Feedback Survey",options:g,value:e,onSelectionChange:t,placeholder:"Select Feedback Survey",selectionMode:"single",fullWidth:!0}),(0,r.jsxs)(u.n,{label:"Override Survey Cooldown",children:[null!=m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Current cooldown"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/1e3} second(s) or`}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/6e4} minute(s) or`}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/36e5} hour(s) or`}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:`${m.cooldown/864e5} day(s)`})]}),(0,r.jsxs)(W.B,{direction:"horizontal",align:"end",children:[(0,r.jsx)(f.k,{label:"Override cooldown",min:0,value:a.toString(),type:"number",placeholder:"Duration length",onChange:e=>n(parseFloat(e))}),(0,r.jsx)(j.l,{label:"Override cooldown duration type",hideLabel:!0,options:id,value:l,onSelectionChange:i,selectionMode:"single",fullWidth:!0})]})]}),(0,r.jsx)(b.c,{}),(0,r.jsx)(u.n,{label:"Override Survey Chance",children:(0,r.jsx)(f.k,{label:"Override chance",description:null!=m?`Current chance: ${100*m.chance}%`:void 0,helperText:"As a percentage",min:0,max:100,value:s.toString(),type:"number",onChange:e=>c(parseFloat(e))})}),(0,r.jsxs)(a5.e,{children:[(0,r.jsx)(x.$,{variant:"critical-primary",text:"Clear Override",onClick:()=>void(null!=m&&tk.h.dispatch({type:"FEEDBACK_OVERRIDE_CLEAR",feedbackType:m.feedbackType})),disabled:!v}),(0,r.jsx)(x.$,{variant:"primary",text:"Update",onClick:()=>void(null!=m&&tk.h.dispatch({type:"FEEDBACK_OVERRIDE_SET",feedbackType:m.feedbackType,cooldown:a*l,chance:s/100})),disabled:!v})]}),null==e&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Error: need to select a survey"}),!(a>=0)&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Error: cooldown needs to be a number greater than 0"}),!(s>=0&&s<=100)&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:"Error: chance needs to be a number between 0 and 100"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Clear override resets a feedback survey to its default values"})]})})}var iu=a(334279),im=a(663417),ih=a(147925),ix=a(557009);async function ip(){return(await lW.Bo.get({url:er.Rsh.ENTITLEMENTS_FOR_APPLICATION(tD.tv),oldFormErrors:!0,query:{exclude_consumed:!0,exclude_ended:!0},rejectWithError:!0})).body.map(e=>ix.A.createFromServer(e))}async function ig(e){await lW.Bo.post({url:"/debug/entitlements/fractional-premium",body:{count:1,sku_id:e},rejectWithError:!1})}async function iv(e){let t="/debug/entitlements/fractional-premium";null!=e&&(t=`${t}/${e}`),await lW.Bo.del({url:t,rejectWithError:!0})}async function ij(){await lW.Bo.post({url:"/debug/entitlements/fulfillment",rejectWithError:!1})}function ib(){let[e,t]=o.useState([]),[a,n]=o.useState(!1),l=(0,o.useCallback)(async()=>{try{n(!0);let e=await ip();t(e)}finally{n(!1)}},[]),i=(0,o.useCallback)(async e=>{await ig(e),await l()},[l]);return{grantFractionalPremium:i,deleteFractionalPremium:(0,o.useCallback)(async e=>{await iv(e),await l()},[l]),triggerNextEntitlementFulfillment:(0,o.useCallback)(async()=>{await ij(),await l()},[l]),refreshEntitlementList:l,entitlements:e,loading:a}}var iy=a(267577),iE=a(370109);let i_={[er.GD.QUEST_REWARD]:"Quest Reward",[er.GD.DEVELOPER_GIFT]:"Developer Gift",[er.GD.INVOICE]:"Invoice",[er.GD.REVERSE_TRIAL]:"Reverse Trial",[er.GD.FRACTIONAL_PREMIUM_GIVEBACK]:"Giveback",[er.GD.SUBSCRIPTION]:"Subscription",[er.GD.SUBSCRIPTION_MEMBER]:"Subscription Member"};function iC(e){let t,{entitlement:a,active:n,onDelete:l}=e;function i(e){return null!=e?(0,nD.i$)(e,"LLL"):"---"}return(0,r.jsxs)("div",{className:F()(iy.Nr,n?iE.C1:""),children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["ID: ",a.id," "]}),!n&&(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["SKU: ",iS.find(e=>e.value===a.skuId)?.label]}),null!=a.startsAt&&null!=a.endsAt&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Start: ",i(a.startsAt)," "]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["End: ",i(a.endsAt)," "]})]}),(0,r.jsxs)(p.E,{variant:"text-md/normal",children:["Entitlement source type: ",null!=(t=a.sourceType)&&t in i_?i_[t]:`Unknown source type ${t}`]}),n&&null!=l&&(0,r.jsx)(nb.$n,{className:iy.RW,size:nb.$n.Sizes.TINY,color:nb.$n.Colors.RED,look:nb.$n.Looks.OUTLINED,onClick:l,children:"Delete"})]})}let iS=[{id:"1h",label:"1 hour",value:iu.j.PREMIUM_TIER_2_1_HOUR},{id:"1d",label:"1 day",value:iu.j.PREMIUM_TIER_2_1_DAY},{id:"3d",label:"3 days",value:iu.j.PREMIUM_TIER_2_3_DAY}];function iN(){let[e,t]=o.useState(!1),[a,n]=o.useState(iu.j.PREMIUM_TIER_2_1_HOUR),[l,i]=o.useState([]),[s,d]=o.useState([]),{refreshEntitlementList:c,grantFractionalPremium:u,deleteFractionalPremium:m,triggerNextEntitlementFulfillment:h,entitlements:v,loading:f}=ib();return o.useEffect(()=>{c()},[c]),o.useEffect(()=>{i(v.filter(e=>null!=e.endsAt&&e.endsAt>new Date&&e.type===er.zF_.FRACTIONAL_REDEMPTION)),d(v.filter(e=>Object.values(iu.j).includes(e.skuId)&&null==e.startsAt))},[v]),(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)("div",{className:iE.l$,children:[(0,r.jsxs)("div",{className:iE.dL,children:[(0,r.jsx)(p.E,{style:{marginBottom:"8px"},variant:"text-lg/bold",children:"Manage Fractional Nitro"}),(0,r.jsxs)($.D,{onClick:()=>t(!e),className:iy.As,children:[(0,r.jsx)("div",{children:(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Info"})}),(0,r.jsx)(ih.A,{direction:e?ih.A.Directions.UP:ih.A.Directions.DOWN})]})]}),e&&(0,r.jsxs)("div",{style:{margin:"8px 0"},children:[(0,r.jsx)(p.E,{variant:"text-md/normal",style:{fontStyle:"italic"},color:"text-muted",children:"Subscriptions paused by Fractional Nitro do not automatically resume in local or staging environments. Subscription has to be resumed manually via Admin."}),(0,r.jsx)("br",{}),(0,r.jsx)(p.E,{variant:"text-md/normal",style:{fontStyle:"italic"},color:"text-muted",children:"Entitlement fulfillment tasks do not run automatically in local environments. This task is required to handle the scheduled unfulfillment of Fractional Nitro after it's time has elapsed."})]}),(0,r.jsxs)("section",{style:{marginBottom:"8px"},className:F()([iy.uW,iE.Uo]),children:[(0,r.jsx)(j.l,{label:"Fractional Premium SKU",value:a,options:iS,onSelectionChange:n,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Grant Fractional Nitro",onClick:()=>u(a)})]}),(0,r.jsxs)("section",{className:iy.uW,children:[(0,r.jsxs)("div",{style:{flexWrap:"wrap"},className:iE.dL,children:[(0,r.jsx)(p.E,{style:{marginBottom:"8px"},variant:"text-lg/semibold",children:"Entitlements"}),(0,r.jsxs)("div",{className:iy.GC,children:[(0,r.jsx)(nb.$n,{disabled:f,size:nb.$n.Sizes.TINY,color:nb.$n.Colors.PRIMARY,look:nb.$n.Looks.OUTLINED,onClick:()=>h(),children:"Run fulfillment"}),(0,r.jsx)(nb.$n,{disabled:f,size:nb.$n.Sizes.TINY,color:nb.$n.Colors.RED,look:nb.$n.Looks.OUTLINED,onClick:()=>m(),children:"Delete all"}),(0,r.jsx)(nb.$n,{disabled:f,look:nb.$n.Looks.BLANK,size:nb.$n.Sizes.ICON,onClick:c,children:(0,r.jsx)("span",{title:"Refresh",children:(0,r.jsx)(im.RefreshIcon,{size:"xs",color:"currentColor"})})})]})]}),l.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{style:{marginTop:"15px"},variant:"text-md/bold",children:"Active premium"}),(0,r.jsx)("div",{children:l.map(e=>(0,r.jsx)(iC,{entitlement:e,active:!0,onDelete:()=>m(e.id)},e.id))})]}),s.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{style:{marginTop:"15px"},variant:"text-md/bold",children:"Unconsumed Fractional Premium"}),(0,r.jsx)("div",{children:s.map(e=>(0,r.jsx)(iC,{entitlement:e},e.id))})]})]})]})})}var iA=a(832604),ik=a(264572).Buffer;let iI=/[^a-zA-Z0-9_.-]+/g;function iD(e){let{runningGame:t}=e,a=(0,iA.A)(t.pid,void 0),[n,l]=(0,o.useState)(!1),i=t.name??t.exeName??"",s=null!=a&&!n;async function d(){if(null!=a){l(!0);try{let e,t=await y.A.fileManager.saveWithDialog2(ik.from(a.slice(a.indexOf(",")+1),"base64"),(e=i.trim().replace(iI,"_"),`${e.length>0?e:"icon"}.png`),void 0);null==t||t.canceledByUser||(0,lL.P0)({id:"devtools-save-icon-success",type:lP.Ck.SUCCESS,message:`Saved icon to ${t.directory}`})}catch{(0,lL.P0)({id:"devtools-save-icon-failure",type:lP.Ck.FAILURE,message:"Failed to save icon"})}finally{l(!1)}}}return(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",justify:"space-between",gap:12,children:[(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",gap:12,fullWidth:!1,children:[null!=a?(0,r.jsx)("img",{src:a,alt:i,width:48,height:48}):(0,r.jsx)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:"no icon"}),(0,r.jsxs)(W.B,{direction:"vertical",gap:0,fullWidth:!1,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:i}),(0,r.jsxs)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:[t.id??"(no id)"," \xb7 ",t.distributor??"unknown",":",t.sku??"\u2014"]}),(0,r.jsx)(p.E,{variant:"text-xxs/normal",color:"text-muted",children:t.exePath})]})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Save Icon",onClick:d,disabled:!s})]})}function iT(){let e=(0,d.bG)([E.Ay],()=>E.Ay.getRunningGames());return(0,r.jsxs)(W.B,{gap:16,padding:12,fullWidth:!1,children:[(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(H.D,{variant:"heading-md/bold",children:"Game Icon Extractor"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Save a running game's locally-detected icon as a PNG."})]}),(0,r.jsx)(b.c,{}),(0,r.jsxs)(W.B,{gap:12,children:[(0,r.jsx)(H.D,{variant:"heading-sm/bold",children:"Running Games"}),0===e.length?(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"No games detected. Launch a game first."}):e.map(e=>(0,r.jsx)(iD,{runningGame:e},`${e.pid}-${e.exePath}`))]})]})}var iO=a(390544),iR=a(498480),iw=a(475669),iM=a(486223);function iL(){let e=(0,d.bG)([nl.A],()=>nl.A.getGuildId()),t=(0,d.bG)([nn.A],()=>nn.A.getGuild(e)?.name),a=(0,d.bG)([iw.A],()=>iw.A.getStateForGuild(e)?.instances),n=o.useMemo(()=>Object.values(a??{})[0],[a]),l=o.useCallback(t=>{null!=n&&null!=e&&tk.h.dispatch({type:"GAME_SERVER_UPDATE_INSTANCE_SUCCESS",guildId:e,instance:{...n,status:t}})},[n,e]),i=o.useMemo(()=>Object.values(iO.M).map(e=>(0,r.jsx)(x.$,{variant:"primary",text:e,onClick:()=>{l(e)}},e)),[l]),s=o.useCallback(()=>{null!=n&&null!=e&&tk.h.dispatch({type:"GAME_SERVER_UPDATE_INSTANCE_SUCCESS",guildId:e,instance:{...n,serverIP:void 0,port:void 0,gameServerPanelUrl:void 0}})},[n,e]);return null==e?null:(0,r.jsxs)(g.Ip,{className:iM.kL,children:[(0,r.jsx)("div",{className:iM.uW,children:(0,r.jsx)(H.D,{variant:"heading-md/normal",children:`Current guild: ${t}`})}),(0,r.jsxs)("div",{className:iM.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:`Set server state for first server: ${n?.name}`}),(0,r.jsx)("div",{className:iM.UD,children:i}),(0,r.jsx)(p.E,{variant:"eyebrow",children:"Remove Server Info"}),(0,r.jsx)("div",{className:iM.UD,children:(0,r.jsx)(x.$,{variant:"primary",text:"Remove IP Address & Game Server Panel URL",onClick:s})}),(0,r.jsx)(p.E,{variant:"eyebrow",children:"Reset server"}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset",onClick:()=>{(0,iR.cq)(e)}})]})]})}function iP(e,t){let a="boolean"==typeof t?t:!aQ.Ay.get(e);tk.h.dispatch({type:"DEV_TOOLS_DEV_SETTING_SET",toggle:e,value:a})}var iU=a(257446);function iG(e){let{devSettingsCategory:t}=e,a=(0,d.bG)([aQ.Ay],()=>aQ.Ay.allByCategory(t),[t],d.My),n=o.useMemo(()=>a.map(e=>{let[t,a,{label:n}]=e;return(0,r.jsx)(m.d,{label:n,description:t,checked:a,onChange:e=>iP(t,e)},t)}),[a]);return(0,r.jsx)("div",{className:F()(tH.nd,iU.n),children:n})}var iB=a(950305),iF=a(231483),i$=a(597770),iV=a(433492),iW=a(695458),iz=a(796140),iH=a(268791),iK=a(836480),iY=a(855473),iq=a(626258),iJ=a(420854),iQ=a(373846),iX=a(657044),iZ=a(141060),i0=a(608599),i1=a(685761),i2=a(157225),i3=a(362704),i6=a(625903),i5=a(628284),i8=a(320448),i4=a(562708),i9=a(830215),i7=a(381689),se=a(889227),st=a(499785),sa=a(315069);class sn extends sa.A{id;summary;userIds;password;constructor(e){super(),this.id=e.pool_id,this.summary=e.summary,this.userIds=e.user_ids}static fromServer(e){return new sn(e)}setPassword(e){return this.password=e,this}}let sl={pools:null,users:null};function si(e){null==sl.users&&(sl.users=new Map),sl.users.set(e.id,new se.A(e))}class ss extends d.Ay.PersistedStore{static displayName="GeneratedTestUsersStore";static persistKey="GeneratedTestUsersStore";initialize(e){null!=e&&(null!=e.pools&&(sl.pools=new Map(Object.entries(e.pools))),null!=e.users&&(sl.users=new Map(Object.entries(e.users))))}getState(){return{pools:null!=sl.pools?Object.fromEntries(sl.pools):null,users:null!=sl.users?Object.fromEntries(sl.users):null}}getUsersForPool(e){return Array.from(sl.users?.values()??[]).filter(t=>sl.pools?.get(e)?.userIds.includes(t.id))}getPool(e){return sl.pools?.get(e)??null}getUser(e){return sl.users?.get(e)??null}getPools(){return null===sl.pools?null:Array.from(sl.pools.values())}}let sr=new ss(tk.h,{GENERATED_POOL_BY_ID_FETCH_SUCCESS:function(e){let{pool:t,users:a}=e;null==sl.pools&&(sl.pools=new Map),sl.pools.set(t.id,t),a.forEach(si)},GENERATED_POOL_REMOVE_FROM_LIST:function(e){let{poolId:t}=e,a=sl.pools?.get(t);if(null==a)return!1;a.userIds.length>0&&a.userIds.forEach(e=>{sl.users?.delete(e)}),sl.pools?.delete(t)}});var so=a(835002);async function sd(e,t){return await st.A.get({url:er.Rsh.GENERATED_POOL_BY_ID(e),trackedActionData:{event:i4.NetworkActionNames.USER_LOGIN},rejectWithError:!1}).then(e=>{let{ok:a,body:n}=e;if(!a)return void i7.A.showFailedToast(so.OB.GENERIC_ERROR);let{generated_pool:l,users:i}=n;tk.h.dispatch({type:"GENERATED_POOL_BY_ID_FETCH_SUCCESS",pool:sn.fromServer(l).setPassword(t),users:i.map(e=>new se.A(e))})}).catch(()=>(i7.A.showFailedToast(so.OB.GENERIC_ERROR),null))}var sc=a(844330),su=a(157416);let sm=[iB.UserIcon,iF.ShieldIcon,i$.GiftIcon,iV.K,iW.m,iz.c,iH.$,iK.CompassIcon,iY.Z,iq.A,iJ.E,iQ.C,iX._,iZ.i,i0.L,i1.f,i2.N,i3.Y,i6.SettingsIcon],sh=["text-default","text-feedback-positive","text-feedback-warning","text-feedback-info","text-feedback-critical"];function sx(){let[e,t]=o.useState(""),[a,n]=o.useState(""),[l,i]=o.useState(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("form",{onSubmit:async l=>{l.preventDefault(),i(!0);try{await sd(e,a),t(""),n("")}finally{i(!1)}},children:(0,r.jsxs)(W.B,{direction:"vertical",align:"center",gap:8,children:[(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",gap:4,children:[(0,r.jsx)(f.k,{fullWidth:!0,value:e,onChange:t,placeholder:"Pool ID",disabled:l}),(0,r.jsx)(f.k,{type:"password",fullWidth:!0,value:a,onChange:n,placeholder:"Password",disabled:l})]}),(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",gap:4,children:[(0,r.jsx)(x.$,{type:"button",size:"md",fullWidth:!0,variant:"secondary",text:"Clear",onClick:()=>{t(""),n("")},disabled:0===e.length||0===a.length||l}),(0,r.jsx)(x.$,{type:"submit",size:"md",fullWidth:!0,variant:"primary",text:"Add Pool",disabled:0===e.length||0===a.length||l,loading:l})]})]})}),(0,r.jsx)(b.c,{gap:4})]})}function sp(e){let{pool:t}=e,{id:a,summary:n}=t,l=sr.getUsersForPool(a),i=(0,d.bG)([nO.default],()=>nO.default.getId()),s=sm[Number(a)%sm.length],c=sh[Number(a)%sh.length],u=o.useCallback(()=>{tk.h.dispatch({type:"GENERATED_POOL_REMOVE_FROM_LIST",poolId:a})},[a]);return(0,r.jsx)(W.B,{direction:"horizontal",align:"start",justify:"space-between",children:(0,r.jsx)(sc.A,{icon:(0,r.jsx)(p.E,{variant:"text-md/medium",color:c,className:su.td,children:(0,r.jsx)(s,{size:"custom",width:24,height:24,color:"currentColor"})}),title:n,className:su.JC,subtitle:`${l.length} users`,children:(0,r.jsxs)(W.B,{direction:"vertical",gap:4,padding:{left:24,right:8,bottom:16},fullWidth:!1,children:[l.map((e,a)=>(0,r.jsxs)(o.Fragment,{children:[0!==a&&(0,r.jsx)(b.c,{gap:4}),(0,r.jsx)($.D,{onClick:a=>{a.stopPropagation(),function(e,t){let a=sr.getUser(t);if(null==a)throw Error("User not found");let n=sr.getPool(e)?.password;if(null==n)throw Error("Pool password not found");if(null==a.email)throw Error("User email not found");i9.A.login({login:a.email,password:n,isMultiAccount:!0,source:"generated_test_user"}).catch(()=>(i7.A.showFailedToast(so.OB.GENERIC_ERROR),null))}(t.id,e.id)},"aria-disabled":i===e.id,className:F()(su.vk,{[su.Pe]:i===e.id}),children:(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",justify:"space-between",gap:8,padding:{right:8},fullWidth:!1,children:[(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",gap:8,fullWidth:!1,className:F()({[su.WP]:i===e.id}),children:[(0,r.jsx)(iB.UserIcon,{size:"custom",width:20,height:20,color:"currentColor"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:e.username}),(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",className:su.c1,children:e.email})]})]}),i===e.id?(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-positive",children:(0,r.jsx)(i5.y,{size:"sm",color:"currentColor"})}):(0,r.jsx)(i8._,{size:"sm",color:"currentColor"})]},e.id)},e.id)]},e.id)),(0,r.jsx)("div",{className:su.UD,children:(0,r.jsx)(x.$,{icon:nC.TrashIcon,text:"",size:"sm",variant:"secondary",onClick:u})})]})})})}function sg(){let e=(0,d.yK)([sr],()=>sr.getPools()??[]);return(0,r.jsxs)(W.B,{padding:16,gap:16,fullWidth:!1,className:su.kL,children:[(0,r.jsx)(sx,{}),(0,r.jsx)(g.Ip,{className:su.Ik,children:e?.map(e=>(0,r.jsx)(sp,{pool:e},e.id))})]})}var sv=a(582306),sj=a(507104),sf=a(846466);function sb(e){let t=new Date(e);return t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})+" "+t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}function sy(e,t){return null!=t?`/users/@me/gift-intents/dismissals/${e}/${t}`:`/users/@me/gift-intents/dismissals/${e}`}let sE=tD.np.FRIEND_ANNIVERSARY;function s_(e){return 403===e?.status?"Forbidden (403). This account is likely not in the backend-persistence experiment; clearing also requires a staff account.":e instanceof Error?e.message:String(e)}function sC(){let e=(0,d.bG)([sj.Ay],()=>sj.Ay.getDevToolTotalFriendAnniversaries()),t=(0,d.bG)([sj.Ay],()=>sj.Ay.getDevToolCurrentDate()),a=(0,d.bG)([sj.Ay],()=>sj.Ay.getMessageGiftIntentLastShownMap()),n=(0,d.bG)([sj.Ay],()=>sj.Ay.getHighestAffinityFriendAnniversaries()),l=(0,d.bG)([sj.Ay],()=>sj.Ay.getHighAffinityFriendAnniversaries()),i=(0,d.bG)([en.default],()=>en.default.getCurrentUser()?.isStaff()??!1),s=(0,d.bG)([aD.A],()=>aD.A.getFriendIDs().filter(e=>!aD.A.isIgnored(e)&&null!=aD.A.getSince(e)).length),c=(0,d.bG)([af.A],()=>{let e=Number(af.A.settings.userContent?.lastGiftIntentDismissedAtMs??"0");return Number.isNaN(e)||0===e?null:e}),[u,m]=o.useState([]),[h,v]=o.useState(null),[f,b]=o.useState(!1),[y,E]=o.useState(!1),[_,C]=o.useState(!1),[S,N]=o.useState(void 0),A=o.useCallback(async()=>{E(!0);try{let{body:e}=await lW.Bo.get({url:"/users/@me/gift-intent-dismissals",rejectWithError:!0});m(e.dismissals??[]),v(null),b(!1)}catch(t){let e=t.status;v(s_(t)),b(403===e),403===e&&m([])}finally{E(!1)}},[]);async function k(e){C(!0);try{await e(),v(null),await A()}catch(e){v(s_(e))}finally{C(!1)}}o.useEffect(()=>{A()},[A,c]);let I=u.filter(e=>e.intent_type===sE),D=new Map(I.map(e=>[e.target_id,Number(e.dismissed_at_ms)])),T=Array.from(new Set([...Object.keys(a),...D.keys()])),O=Array.from(new Set([...n,...l])),R=O.map(e=>({id:e,value:e,label:en.default.getUser(e)?.username??`Unknown User (${e})`})),w=y||_;function M(e){tk.h.dispatch({type:"DEV_TOOLS_SET_FRIEND_ANNIVERSARY_COUNT",total:e})}function L(e){let t=nc.A.getUserAffinity(e);return t?.dmProbability!=null?`${(100*t.dmProbability).toFixed(3)}%`:"N/A"}return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)("div",{className:sf.l$,children:[(0,r.jsx)(p.E,{className:sf.Iv,variant:"text-lg/bold",children:"Friend Anniversary"}),(0,r.jsx)("div",{className:sf.Pm,children:(0,r.jsxs)(W.B,{gap:8,direction:"horizontal",style:{flex:1},children:[(0,r.jsx)(j.l,{label:"Number of anniversaries to generate",selectionMode:"single",options:[{id:"none",label:"None",value:null},{id:"1",label:"1",value:1},{id:"2",label:"2",value:2},{id:"3",label:"3",value:3},{id:"4",label:"4",value:4},{id:"5",label:"5",value:5},{id:"10",label:"10",value:10},{id:"25",label:"25",value:25}],value:e,onSelectionChange:e=>{M(e)}}),(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Re-randomize",disabled:null==e,onClick:function(){tk.h.dispatch({type:"DEV_TOOLS_RESAMPLE_FRIEND_ANNIVERSARIES"})}}),(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Clear",onClick:()=>{M(null)}})]})}),null!=e&&(0,r.jsx)("div",{className:sf.Pm,children:(0,r.jsxs)(W.B,{gap:8,children:[0===s?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-warning",children:"No friends with an anniversary date, so no anniversaries can be generated."}):(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Generated ",O.length," of ",e," requested",O.length<e?` (only ${s} friend${1===s?"":"s"} with an anniversary date).`:"."]}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"Affinity is the percent chance that User A will DM or GDM User B in the next 7 days."}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"The devtool automatically assigns users as high affinity regardless of actual affinity for testing."}),n.length>0&&(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"Highest Affinity Friend Anniversaries:"}),n.map(e=>{let t=en.default.getUser(e),a=t?.username??`Unknown User (${e})`;return(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:[a," (",L(e),")"]},e)})]}),l.length>0&&(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"High Affinity Friend Anniversaries:"}),l.map(e=>{let t=en.default.getUser(e),a=t?.username??`Unknown User (${e})`;return(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:[a," (",L(e),")"]},e)})]})]})}),(0,r.jsx)("div",{className:sf.Pm,children:(0,r.jsxs)(W.B,{gap:8,direction:"horizontal",children:[(0,r.jsx)(sv.J,{label:"Override current date used for cooldowns",value:null!=t?nf()(t):void 0,onSelect:function(e){let t=nf()(),a=e.clone().hours(t.hours()).minutes(t.minutes()).seconds(t.seconds()).milliseconds(t.milliseconds());tk.h.dispatch({type:"DEV_TOOLS_SET_CURRENT_DATE",date:a.valueOf()})}}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Clear",onClick:function(){tk.h.dispatch({type:"DEV_TOOLS_RESET_CURRENT_DATE"})}})]})}),(0,r.jsxs)("div",{className:sf.Pm,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Reset gift message cooldown (per-user, 14d)"}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Reset",onClick:function(){tk.h.dispatch({type:"DEV_TOOLS_GIFT_MESSAGE_COOLDOWN_RESET"})}})]}),(0,r.jsxs)("div",{className:sf.Pm,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Clear last seen friend anniversaries in All Friends"}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear",onClick:function(){tk.h.dispatch({type:"DEV_TOOLS_FRIENDS_LIST_GIFT_INTENTS_SHOWN_RESET"})}})]}),(0,r.jsx)("div",{className:sf.Pm,children:(0,r.jsxs)(W.B,{gap:12,fullWidth:!0,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:"Backend dismissal sync"}),(0,r.jsxs)(W.B,{gap:4,children:[f&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-warning",children:"This account is not in the backend-persistence experiment, so nothing here will persist to the server."}),!i&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-warning",children:"Clearing server dismissals requires a staff account."}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Server last recorded a dismissal:"," ",null!=c?sb(c):"never"]})]}),(0,r.jsxs)(W.B,{gap:8,direction:"horizontal",align:"end",children:[(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Refresh",onClick:()=>{A()},disabled:w}),(0,r.jsx)(x.$,{size:"sm",variant:"primary",text:"Clear all",onClick:function(){k(()=>lW.Bo.del({url:sy(sE),rejectWithError:!0}))},disabled:w||!i||f||0===I.length})]}),(0,r.jsxs)(W.B,{gap:8,direction:"horizontal",align:"end",children:[(0,r.jsx)(j.l,{label:"Dismiss a generated anniversary on the server",selectionMode:"single",options:R,value:S,onSelectionChange:e=>{N(e)}}),(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Dismiss on server",onClick:function(){null!=S&&k(()=>lW.Bo.post({url:"/users/@me/gift-intents/dismiss",body:{intent_type:sE,target_id:S},rejectWithError:!0}))},disabled:w||f||null==S})]}),0===R.length&&(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"Generate friend anniversaries above to pick a target to dismiss."}),null!=h&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-feedback-critical",children:h}),y&&(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"Loading..."}),!y&&0===T.length&&(0,r.jsx)(p.E,{variant:"text-xs/normal",children:"No dismissals recorded locally or on the server."}),!y&&T.length>0&&(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"Local vs. server (per friend):"}),T.map(e=>{let t=en.default.getUser(e),n=t?.username??`Unknown User (${e})`,l=a[e],s=D.get(e);return(0,r.jsxs)(W.B,{gap:8,direction:"horizontal",justify:"space-between",align:"center",children:[(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:[n,": local ",null!=l?sb(l):"none",", server"," ",null!=s?sb(s):"none"]}),null!=s&&(0,r.jsx)(x.$,{size:"sm",variant:"secondary",text:"Clear",onClick:()=>{k(()=>lW.Bo.del({url:sy(sE,e),rejectWithError:!0}))},disabled:w||!i||f})]},e)})]})]})})]})})}var sS=a(460890),sN=a(28863),sA=a(517461),sk=a(214947),sI=a(403581),sD=a(34188);let sT=["ILLO_BLUE","ILLO_GREEN","ILLO_PINK","ILLO_ORANGE","ILLO_PURPLE","ILLO_YELLOW","BLUE_NEW","GREEN_NEW","NEUTRAL","ORANGE_NEW","RED_NEW","TEAL_NEW","YELLOW_NEW"];var sO=a(277583);let sR=[0,.5,1],sw=["Center","Inner ring","Outer ring"],sM=sR.length,sL="ILLO_BLUE",sP="ILLO_BLUE_40",sU=Array.from({length:sM},()=>sP),sG=Array.from({length:sM},()=>sL),sB=["1","0.5","0"],sF=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i,s$=[{label:"Light",value:er.NJ8.LIGHT,id:er.NJ8.LIGHT},{label:"Ash",value:er.NJ8.ASH,id:er.NJ8.ASH},{label:"Dark",value:er.NJ8.DARK,id:er.NJ8.DARK},{label:"Onyx",value:er.NJ8.ONYX,id:er.NJ8.ONYX}],sV={[er.NJ8.ASH]:er.NJ8.DARK,[er.NJ8.ONYX]:er.NJ8.DARK,[er.NJ8.LIGHT]:er.NJ8.DARK},sW={[er.NJ8.LIGHT]:"light",[er.NJ8.ASH]:"ash",[er.NJ8.DARK]:"dark",[er.NJ8.ONYX]:"onyx"},sz=[{id:"friends",icon:sk.$,text:"Friends"},{id:"nitro",icon:sI.t,text:"Nitro Home",nitroHoverGradient:!0},{id:"shop",icon:sD.U,text:"Shop",useCustomGradient:!0}],sH=sT.map(e=>({label:e,value:e,id:e})),sK=Object.fromEntries(sT.map(e=>[e,Object.keys(eW.A.unsafe_rawColors).filter(t=>String(t).startsWith(e+"_")).sort((e,t)=>parseInt(String(e).split("_").pop()??"0",10)-parseInt(String(t).split("_").pop()??"0",10)).map(e=>{let t=String(e).split("_").pop()??e,[a,n,l]=eW.A.unsafe_rawColors[e].resolve().rgba(),i=(.299*a+.587*n+.114*l)/255>.5?eW.A.unsafe_rawColors.OPACITY_BLACK_28:eW.A.unsafe_rawColors.OPACITY_WHITE_28,s=(0,r.jsx)("span",{className:sO.oP,style:{background:`rgb(${a}, ${n}, ${l})`,border:`1px solid ${i.css}`}});return{label:t,value:e,id:String(e),leading:s}})]));var sY=a(306327);function sq(e,t,a){return e.map((e,n)=>n===t?a:e)}function sJ(e,t){let[a,n,l,i]=eW.A.unsafe_rawColors[e].resolve().rgba({opacity:t});return{r:a,g:n,b:l,a:i}}function sQ(e,t){let a=eW.A.unsafe_rawColors[e].resolve();return null!=t?a.hex({opacity:t}):a.hex()}function sX(e){let{yaml:t,label:a}=e,n=o.useCallback(()=>{navigator.clipboard.writeText(t)},[t]);return(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"center",justify:"space-between",children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a}),(0,r.jsx)(eB.K,{icon:ny.CopyIcon,"aria-label":`Copy ${a} YAML`,onClick:n,variant:"secondary",size:"sm"})]}),(0,r.jsx)("pre",{className:sO.RP,children:t})]})}function sZ(e){let{allResolvedStops:t}=e,a=o.useMemo(()=>sw.map((e,a)=>{let n;return n=s$.map(e=>{let n,l,{value:i}=e,s=sW[i],r=t[i];return` ${s}:
color: ${-1===(l=(n=String(r.colors[a]).toLowerCase()).lastIndexOf("_"))?n.replace(/_/g,"-"):n.slice(0,l).replace(/_/g,"-")+"."+n.slice(l+1)}
opacity: ${r.opacities[a]}`}).join("\n"),`type: background
colors:
${n}
gradient-colors:
color-mix: false
codegen:
web: true
mobile: false`}),[t]);return(0,r.jsxs)(W.B,{gap:16,children:[(0,r.jsx)(H.D,{variant:"heading-sm/semibold",children:"Token YAML"}),sw.map((e,t)=>(0,r.jsx)(sX,{yaml:a[t],label:e},e))]})}function s0(e,t,a){let{r:n,g:l,b:i,a:s}=function(e,t){if(t<=e[0].position){let t=e[0];return{r:t.r,g:t.g,b:t.b,a:t.opacity}}for(let a=0;a<e.length-1;a++){let n=e[a],l=e[a+1];if(t<=l.position){if(l.position===n.position)return{r:n.r,g:n.g,b:n.b,a:n.opacity};let e=(t-n.position)/(l.position-n.position);return{r:n.r+(l.r-n.r)*e,g:n.g+(l.g-n.g)*e,b:n.b+(l.b-n.b)*e,a:n.opacity+(l.opacity-n.opacity)*e}}}let a=e[e.length-1];return{r:a.r,g:a.g,b:a.b,a:a.opacity}}(t,a),r=.5*s;return new sY.A("srgb",[(e.r*(1-r)+n*r)/255,(e.g*(1-r)+l*r)/255,(e.b*(1-r)+i*r)/255])}function s1(e,t,a){var n;let l=a.map(e=>{let[t,a,n]=eW.A.unsafe_rawColors[e.color].resolve().rgba();return{r:t,g:a,b:n,opacity:e.opacity,position:e.position}}),i=1/0;for(let a of l)(n=e.contrast(s0(t,l,a.position),"WCAG21"))<i&&(i=n);for(let a=0;a<l.length-1;a++){let{contrast:n}=function(e,t,a,n,l){let i=1/0,s=n;for(let r=0;r<=100;r++){let o=n+r/100*(l-n),d=a.contrast(s0(e,t,o),"WCAG21");d<i&&(i=d,s=o)}return{contrast:i,position:s}}(t,l,e,l[a].position,l[a+1].position);n<i&&(i=n)}return Math.round(100*i)/100}function s2(e){let[t,a,n]=eW.A.colors.TEXT_DEFAULT.resolve(e).rgba(),[l,i,s]=eW.A.colors.BACKGROUND_BASE_LOWEST.resolve(e).rgba(),[r,o,d,c]=eW.A.colors.INTERACTIVE_BACKGROUND_HOVER.resolve(e).rgba();return{text:new sY.A("srgb",[t/255,a/255,n/255]),background:{r:l*(1-c)+r*c,g:i*(1-c)+o*c,b:s*(1-c)+d*c}}}function s3(){return{colors:Array.from({length:sM},()=>void 0),scales:Array.from({length:sM},()=>void 0),opacities:Array.from({length:sM},()=>void 0)}}function s6(){return{[er.NJ8.LIGHT]:s3(),[er.NJ8.ASH]:{colors:[...sU],scales:[...sG],opacities:[...sB]},[er.NJ8.DARK]:s3(),[er.NJ8.ONYX]:s3()}}function s5(){let e=(0,sS.G9)(),[t,a]=o.useState(er.NJ8.DARK),[n,l]=(0,sA.V)("DevToolsGradientContrastPanel_themeStops",s6()),i=n??s6(),[s,d]=o.useState(["","",""]),[c,u]=o.useState([null,null,null]),[m,h]=o.useState(null),{images:v,renderPickers:j}=function(){let[e,t]=o.useState(null),a=o.useRef(null),n=o.useCallback(e=>{let a=e.target.files?.[0];if(null==a)return;let n=new FileReader;n.onload=()=>t({src:n.result,name:a.name}),n.readAsDataURL(a),e.target.value=""},[]),l=o.useCallback(()=>(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"center",children:[(0,r.jsx)("input",{ref:a,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp,image/avif",onChange:n,style:{display:"none"}}),null!=e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",children:e.name}),(0,r.jsx)(lU.Q,{text:"Remove",variant:"critical",textVariant:"text-sm/medium",onClick:()=>t(null)})]}):(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Upload button hover image",onClick:()=>a.current?.click()})]}),[e,n]);return{images:{buttonBackground:e},renderPickers:l}}(),b=o.useMemo(()=>Object.fromEntries(s$.map(e=>{let{value:t}=e;return[t,function(e,t){let a=[],n=[],l=[];for(let i=0;i<sM;i++){let s,r,o,d=t;for(;null!=d;){let t=e[d];if(s??=t.colors[i],r??=t.scales[i],o??=t.opacities[i],null!=s&&null!=r&&null!=o)break;d=sV[d]}a.push(s??sU[i]),n.push(r??sG[i]),l.push(o??sB[i])}return{colors:a,scales:n,opacities:l}}(i,t)]})),[i]),y=b[t],E=o.useCallback(e=>{l({...i,[t]:e(i[t])})},[t,l,i]),_=o.useMemo(()=>s2({theme:t,saturation:1}),[t]),C=o.useMemo(()=>{let e=[];for(let t=0;t<sM;t++){let a=parseFloat(y.opacities[t]);if(isNaN(a)||a<0||a>1)return null;e.push({color:y.colors[t],opacity:a,position:sR[t]})}return e},[y]),S=o.useMemo(()=>{if(null==C)return null;let{text:e,background:t}=_;return sw.map((a,n)=>sK[y.scales[n]].map(a=>{let l=s1(e,t,sq(C,n,{...C[n],color:a.value}));return{...a,trailing:`(${l}:1)`}}))},[C,_,y.scales]),N=o.useMemo(()=>{try{return s$.map(e=>{let{value:t,label:a}=e,n=b[t],l=[];for(let e=0;e<sM;e++){let i=parseFloat(n.opacities[e]);if(isNaN(i)||i<0||i>1)return{theme:t,label:a,result:null};l.push({color:n.colors[e],opacity:i,position:sR[e]})}return{theme:t,label:a,result:function(e,t){let a,{text:n,background:l}=s2(t),i=s1(n,l,e),s=i>=4.5;if(!s)for(let t=0;t<e.length;t++){let i=function(e){let t=String(e).match(/^(.+)_\d+$/);if(null==t)return null;let a=t[1];return sT.includes(a)?a:null}(e[t].color);if(null==i)continue;let s=parseInt(String(e[t].color).split("_").pop()??"0",10),r=1/0;for(let{value:o}of sK[i]){if(o===e[t].color)continue;let i=s1(n,l,sq(e,t,{...e[t],color:o}));if(i>=4.5){let e=Math.abs(parseInt(String(o).split("_").pop()??"0",10)-s);e<r&&(r=e,a={stopIndex:t,suggestedColor:o,resultingMinContrast:i})}}}return{passes:s,minContrastRatio:i,suggestion:a}}(l,{theme:t,saturation:1})}})}catch{return null}},[b]);return(0,r.jsx)(g.Ar,{className:sO.XG,children:(0,r.jsxs)(W.B,{gap:24,padding:8,className:sO.zr,children:[(0,r.jsx)(H.D,{variant:"heading-lg/medium",children:"Tab Hover Gradient Token Generator & Contrast Checker"}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/normal",children:"Checks that tab hover gradients pass WCAG AA (4.5:1) contrast against the text in the tab, accounting for opacities and hover states."}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Pick colors for each gradient stop (center, inner ring, outer ring) per theme. Each color in the dropdown will show the minimum contrast ratio for the gradient if the color were selected. Dark-family themes inherit: values set on Dark cascade to Darker and Onyx unless overridden."}),(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"Use the hex field to paste in a hex color \u2014 it will snap to the closest allowed token and show the deltaE distance."}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:["Copy the generated YAML at the bottom to create your token definitions to be used by the"," ",(0,r.jsx)(sN.Anchor,{href:"https://design.discord.tools/foundations/color/token-pipeline",children:"token pipeline"}),"."]})]}),(0,r.jsx)(as.Z,{selectionMode:"single",label:"Theme",value:t,onSelectionChange:e=>a(e),closeOnSelect:!0,options:s$}),(0,r.jsxs)(W.B,{gap:16,children:[(0,r.jsx)(H.D,{variant:"heading-sm/semibold",children:"Gradient Stops"}),(0,r.jsx)("div",{className:sO.G9,children:sw.map((e,t)=>{let a=""!==s[t];return(0,r.jsxs)(o.Fragment,{children:[(0,r.jsxs)(W.B,{gap:0,className:sO.hi,children:[(0,r.jsx)(p.E,{variant:"text-md/medium",children:e}),(0,r.jsx)(lU.Q,{variant:"secondary",textVariant:"text-xs/normal",text:`(${sQ(y.colors[t],parseFloat(y.opacities[t]))})`,onClick:()=>navigator.clipboard.writeText(sQ(y.colors[t],parseFloat(y.opacities[t])))})]}),(0,r.jsx)(as.Z,{selectionMode:"single",label:"Scale",disabled:a,value:y.scales[t],onSelectionChange:e=>{let a=sK[e][0]?.value;E(n=>({...n,scales:sq(n.scales,t,e),colors:null!=a?sq(n.colors,t,a):n.colors}))},closeOnSelect:!0,options:sH}),(0,r.jsx)(as.Z,{selectionMode:"single",label:"Value",disabled:a,value:y.colors[t],onSelectionChange:e=>E(a=>({...a,colors:sq(a.colors,t,e)})),closeOnSelect:!0,options:S?.[t]??sK[y.scales[t]]}),(0,r.jsx)(f.k,{label:"Opacity",name:`opacity-${t}`,value:y.opacities[t],onChange:e=>E(a=>({...a,opacities:sq(a.opacities,t,e)})),placeholder:"0\u20131"}),(0,r.jsx)(f.k,{label:`Hex${a&&null!=c[t]?` (dE: ${c[t]})`:""}`,name:`hex-${t}`,value:s[t],onChange:e=>{d(a=>sq(a,t,e));let a=function(e){if(!sF.test(e))return null;try{return new sY.A(e.startsWith("#")?e:`#${e}`)}catch{return null}}(e);if(null!=a){let e=function(e){let t=sP,a=sL,n=1/0;for(let l of sT)for(let i of sK[l]){let s=e.deltaE(function(e){let[t,a,n]=eW.A.unsafe_rawColors[e].resolve().rgba();return new sY.A("srgb",[t/255,a/255,n/255])}(i.value),"2000");s<n&&(n=s,t=i.value,a=l)}return{color:t,scale:a,deltaE:Math.round(100*n)/100}}(a);u(a=>sq(a,t,e.deltaE)),E(a=>({...a,scales:sq(a.scales,t,e.scale),colors:sq(a.colors,t,e.color)}))}else u(e=>sq(e,t,null))},placeholder:"#hex"})]},t)})})]}),j(),(0,r.jsx)(H.D,{variant:"heading-sm/semibold",children:"Preview"}),(0,r.jsx)(sS.GE,{value:{...e,theme:t},children:(0,r.jsx)(e$.N,{theme:t,children:e=>(0,r.jsx)("div",{className:e,children:(0,r.jsx)(W.B,{gap:16,children:(0,r.jsx)("ul",{className:sO.$8,style:{background:eW.A.colors.BACKGROUND_BASE_LOWEST.css},children:sz.map((e,t)=>(0,r.jsx)(ep.z9,{route:"",selected:m===e.id,onClick:()=>h(e.id),icon:e.icon,text:e.text,showHoverGradient:!0,nitroHoverGradient:"nitroHoverGradient"in e,role:"listitem",tabIndex:0,onFocus:()=>{},..."useCustomGradient"in e&&{hoverGradientStart:sJ(y.colors[0],parseFloat(y.opacities[0])),hoverGradientMiddle:sJ(y.colors[1],parseFloat(y.opacities[1])),hoverGradientEnd:sJ(y.colors[2],parseFloat(y.opacities[2]))},...{"data-list-item-id":`devtools-preview-${t}`},children:"useCustomGradient"in e&&v.buttonBackground?.src!=null&&(0,r.jsx)("div",{style:{position:"absolute",height:"100%",bottom:0,insetInlineEnd:0,pointerEvents:"none",borderRadius:"inherit"},children:(0,r.jsx)("img",{src:v.buttonBackground.src,alt:"","aria-hidden":!0,style:{height:"100%",maxWidth:"100%",objectFit:"cover",objectPosition:"bottom right",borderRadius:"inherit"}})})},e.id))})})})})}),null!=N&&(0,r.jsxs)(W.B,{gap:16,children:[(0,r.jsx)(H.D,{variant:"heading-sm/semibold",children:"Results"}),N.map(e=>{let{theme:t,label:a,result:n}=e;return null!=n?(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:a}),(0,r.jsxs)(V.w,{type:n.passes?"success":"critical",children:[n.passes?"\u2713 Passes":"\u2717 Fails"," WCAG AA \u2014 Min contrast: ",n.minContrastRatio," : 1"]}),!n.passes&&null!=n.suggestion&&(0,r.jsxs)(W.B,{gap:4,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Suggestion:"}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",children:[sw[n.suggestion.stopIndex],": ",(0,r.jsx)("strong",{children:n.suggestion.suggestedColor})," \u2192"," ",n.suggestion.resultingMinContrast," : 1"]})]}),!n.passes&&null==n.suggestion&&(0,r.jsx)(p.E,{variant:"text-sm/normal",children:"No single swap from the same color scale would fix the contrast ratio."})]},t):null})]}),(0,r.jsx)(sZ,{allResolvedStops:b})]})})}var s8=a(820739),s4=a(230135),s9=a(45780),s7=a(868652),re=a(859241);let rt=[av.M.GUILD_POWERUP_PERKS_COACHMARK,av.M.GUILD_POWERUPS_OVERVIEW_SIDEBAR_COACHMARK,av.M.GUILD_POWERUP_NOTIFICATION,av.M.GUILD_TAG_AVAILABLE_COACHMARK,av.M.GUILD_POWERUP_NEW_PERK_AVAILABLE_COACHMARK,av.M.GUILD_POWERUP_NEW_PERK_AVAILABLE_BADGE],ra=[av.V.GUILD_POWERUP_LEVEL_1_COACHMARK,av.V.GUILD_POWERUP_LEVEL_2_COACHMARK,av.V.GUILD_POWERUP_LEVEL_3_COACHMARK,av.V.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK,av.V.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK],rn=[av.V.ADOPT_CLAN_IDENTITY_NOTICE],rl=[av.M.VANITY_URL_POWERUP_ROLLBACK_NOTIFICATION,av.M.VANITY_URL_POWERUP_ROLLBACK_MODAL,av.M.VANITY_URL_POWERUP_EDUCATIONAL_POPOVER];function ri(e){switch(e){case av.V.GUILD_POWERUP_LEVEL_1_COACHMARK:return"GUILD_POWERUP_LEVEL_1_COACHMARK";case av.V.GUILD_POWERUP_LEVEL_2_COACHMARK:return"GUILD_POWERUP_LEVEL_2_COACHMARK";case av.V.GUILD_POWERUP_LEVEL_3_COACHMARK:return"GUILD_POWERUP_LEVEL_3_COACHMARK";case av.V.GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK:return"GUILD_POWERUP_SINGLE_SKU_PURCHASE_COACHMARK";case av.V.GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK:return"GUILD_POWERUP_CHOICE_SKU_PURCHASE_COACHMARK";case av.V.ADOPT_CLAN_IDENTITY_NOTICE:return"ADOPT_CLAN_IDENTITY_NOTICE";default:return String(e)}}var rs=a(374336);async function rr(e,t,a){await lW.Bo.patch({url:er.Rsh.APPLIED_BOOST_MODIFY_END_DATE,body:{applied_boost_ids:t.map(e=>e.id),ends_at:a?null:nf()().add(1,"day")},rejectWithError:!0}),(0,s8.VU)(e),(0,s7.Xd)(e,!0)}async function ro(e){await lW.Bo.post({url:er.Rsh.SEND_POWERUPS_SYSTEM_MESSAGE(e),rejectWithError:!0})}function rd(){let e=(0,d.bG)([nl.A],()=>nl.A.getGuildId()),t=(0,d.bG)([nn.A],()=>nn.A.getGuild(e)?.name),a=(0,d.yK)([af.A],()=>[...ra,...rn].filter(t=>null!=e&&(0,s9.zs)(t,e))),n=(0,d.yK)([re.A],()=>null!=e?re.A.getAppliedGuildBoostsForGuild(e)??[]:[]);if(null!=e)return(0,r.jsxs)(g.Ip,{className:rs.kL,children:[(0,r.jsx)("div",{className:rs.uW,children:(0,r.jsx)(H.D,{variant:"heading-md/normal",children:`Current guild: ${t}`})}),(0,r.jsxs)("div",{className:rs.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:rs.wx,children:"Reset Notification Indicators"}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset",onClick:()=>{(0,s7.qM)()}})]}),(0,r.jsxs)("div",{className:rs.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:rs.wx,children:"Reset Progress Bar State"}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset",onClick:s4.O})]}),(0,r.jsxs)("div",{className:rs.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:"Set Warning State"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(x.$,{variant:"primary",text:"Set Half Boosts expiring in 1 day",onClick:()=>{rr(e,n.slice(Math.floor(n.length/2)),!1)}}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset End Date",onClick:()=>{rr(e,n,!0)}})]})]}),(0,r.jsxs)("div",{className:rs.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:rs.wx,children:"Reset User Level DCs"}),(0,r.jsx)(W.B,{gap:16,children:rt.map(e=>(0,r.jsx)(lE,{className:rs.z6,content:av.M[e]},av.M[e]))})]}),(0,r.jsx)("div",{className:rs.uW,children:(0,r.jsx)(u.n,{label:"Reset Guild Level DCs",children:ra.map(t=>(0,r.jsx)(m.d,{label:ri(t),checked:a.includes(t),onChange:a=>{a?(0,s9._$)(t,e,!1):((0,aj._N)(av.M.GUILD_POWERUP_NOTIFICATION),(0,s9.hk)(t,e))}},t))})}),(0,r.jsx)("div",{className:rs.uW,children:(0,r.jsx)(u.n,{label:"Reset Server Tag Guild Level DCs",children:rn.map(t=>(0,r.jsx)(m.d,{label:ri(t),checked:a.includes(t),onChange:a=>{a?(0,s9._$)(t,e,!1):((0,aj._N)(av.M.GUILD_POWERUP_NOTIFICATION),(0,s9.hk)(t,e))}},t))})}),(0,r.jsxs)("div",{className:rs.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:rs.wx,children:"Reset Powerup Rollback DCs"}),rl.map(e=>(0,r.jsx)(lE,{className:rs.z6,content:av.M[e]},av.M[e]))]}),(0,r.jsxs)("div",{className:rs.uW,children:[(0,r.jsx)(p.E,{variant:"eyebrow",className:rs.wx,children:"Send Powerups System Message"}),(0,r.jsx)(x.$,{variant:"primary",text:"Send System Message",onClick:()=>{ro(e)}})]}),(0,r.jsx)(x.$,{variant:"primary",text:"Reset GameServer ToS",onClick:()=>{(0,iR.Wp)(!1)}})]})}var rc=a(450510),ru=a(648048);function rm(e){let{hotspotLocation:t}=e,[a,n]=(0,d.yK)([rc.HP],()=>[rc.HP.hasHotspot(t,!0),rc.HP.getHotspotOverride(t)]);return(0,r.jsx)(j.l,{label:t,errorMessage:a?"Inactive":void 0,successMessage:a?"Active":void 0,value:n,options:[{id:"none",value:void 0,label:"No Override"},{id:"active",value:!0,label:"Force Active"},{id:"inactive",value:!1,label:"Force Inactive"}],onSelectionChange:e=>null!=e?(0,rc.Kl)(t,e):(0,rc.LF)(t),selectionMode:"single",fullWidth:!0})}function rh(){return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsx)(u.n,{label:"Hotspots",description:"All the 'hotspots' in app, and their current status. Use the select menu to override them on or off.",className:ru.IN,children:(0,r.jsx)(W.B,{gap:20,children:Object.keys(rc._2).sort((e,t)=>e.localeCompare(t)).map(e=>(0,r.jsx)(rm,{hotspotLocation:e},e))})})})}var rx=a(632296),rp=a(855522),rg=a(37646),rv=a(773669);function rj(){let e=(0,d.bG)([rv.default],()=>rv.default.locale),[t,a]=o.useState(),n=(0,rx.runtimeHashMessageKey)(t??""),l=o.useMemo(()=>ns.t[n],[n]);return(0,r.jsxs)("div",{children:[(0,r.jsxs)(aX.Ay,{children:[(0,r.jsx)(aX.Ay.Icon,{icon:rg.U,tooltip:"Locale"}),(0,r.jsx)(aX.Ay.Title,{children:"Locale"})]}),(0,r.jsxs)(nF,{children:[(0,r.jsx)(n$,{name:"Active System",children:"@discord/intl"}),(0,r.jsx)(n$,{name:"App",children:e}),(0,r.jsx)(n$,{name:"System",children:ns.systemLocale}),(0,r.jsx)(n$,{name:"@discord/intl",children:ns.intl.currentLocale}),(0,r.jsx)(n$,{name:"common i18n",children:rp.A.getLocale()}),(0,r.jsx)(n$,{name:"Moment",children:nf().locale()})]}),(0,r.jsxs)(aX.Ay,{children:[(0,r.jsx)(aX.Ay.Icon,{icon:rg.U,tooltip:"Messages"}),(0,r.jsx)(aX.Ay.Title,{children:"New System Messages"})]}),(0,r.jsx)(nF,{children:(0,r.jsx)(n$,{name:"Unique Rendered Main Messages",children:Object.keys(ns.t).length})}),(0,r.jsx)("div",{style:{margin:16},children:(0,r.jsx)(f.k,{onChange:function(e){a(e)},name:"Message name",placeholder:"Find a message"})}),(0,r.jsxs)(nF,{children:[(0,r.jsx)(n$,{name:"Hashed key",children:n}),(0,r.jsx)(n$,{name:"Exists?",children:null!=l?"yes":"no"})]}),(0,r.jsx)(aZ.A,{data:l?.(e)})]})}var rf=a(434404);function rb(){let{node:e}=(0,et.Ay)(rf.F,"");return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsx)("div",{style:{padding:"var(--space-8)"},children:(0,r.jsx)(ee.A,{node:e},e.key)})})}var ry=a(361158),rE=a(80556),r_=a(219503),rC=a(665095),rS=a(87404);function rN(){return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)("div",{className:iE.l$,children:[(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Verification Layer"}),(0,r.jsx)("div",{className:iE.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Open Verification Layer",onClick:function(){(0,ry.B8)(()=>(0,r.jsx)(rC.A,{}),{layerKey:rS._s,Layer:rE.Ay})}})})]}),(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Safety Flow"}),(0,r.jsx)("div",{className:iE.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Open Safety Flow",onClick:function(){(0,ry.B8)(e=>{let{closeLayer:t}=e;return(0,r.jsx)(r_.A,{onClose:t})},{layerKey:rS._s,Layer:rE.Ay})}})})]}),(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Layer Controls"}),(0,r.jsx)("div",{className:iE.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Close All Layers",onClick:function(){ry.xr.setState({fullScreenLayers:[]})}})})]})]})})}a(393431),a(532706),a(42231),a(232424),a(949626),a(767709),a(65162);var rA=a(687813),rk=a(604121);let rI={"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Messages_Opt.lottie":()=>a.e("136508").then(a.t.bind(a,655671,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Notifications_Opt.lottie":()=>a.e("405252").then(a.t.bind(a,323823,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Servers_CombinedEE.lottie":()=>a.e("565154").then(a.t.bind(a,670649,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_Servers_Opt.lottie":()=>a.e("277248").then(a.t.bind(a,342787,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Navigation_You_Opt.lottie":()=>a.e("393401").then(a.t.bind(a,959328,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/Lottie_Requests_Messages.lottie":()=>a.e("748614").then(a.t.bind(a,713893,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Activities.lottie":()=>a.e("32431").then(a.t.bind(a,857778,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/AppsIcon.lottie":()=>a.e("337415").then(a.t.bind(a,996858,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Camera.lottie":()=>a.e("475913").then(a.t.bind(a,999344,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Deafen.lottie":()=>a.e("61309").then(a.t.bind(a,433356,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/EndCall.lottie":()=>a.e("727847").then(a.t.bind(a,72922,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/GIF.lottie":()=>a.e("932886").then(a.t.bind(a,456309,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Gift.lottie":()=>a.e("243734").then(a.t.bind(a,733813,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Microphone.lottie":()=>a.e("926620").then(a.t.bind(a,890007,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/OrbsEarnSpend.lottie":()=>a.e("492568").then(a.t.bind(a,149707,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/OrbsEarnSpendLightTheme.lottie":()=>a.e("282715").then(a.t.bind(a,147734,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Screenshare.lottie":()=>a.e("829721").then(a.t.bind(a,218048,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Settings.lottie":()=>a.e("494483").then(a.t.bind(a,155806,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Soundboard.lottie":()=>a.e("350115").then(a.t.bind(a,535662,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Sticker.lottie":()=>a.e("897473").then(a.t.bind(a,956248,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/web/Waveform.lottie":()=>a.e("665373").then(a.t.bind(a,914028,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge01.lottie":()=>a.e("875199").then(a.t.bind(a,904066,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge02.lottie":()=>a.e("633900").then(a.t.bind(a,185319,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge03.lottie":()=>a.e("665405").then(a.t.bind(a,743372,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge06.lottie":()=>a.e("227648").then(a.t.bind(a,195011,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge09.lottie":()=>a.e("729095").then(a.t.bind(a,619578,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge12.lottie":()=>a.e("994131").then(a.t.bind(a,676574,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge15.lottie":()=>a.e("765404").then(a.t.bind(a,384407,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge18.lottie":()=>a.e("911817").then(a.t.bind(a,110320,17)),"discord_common/js/packages/tokens/tools/platforms/lottie/originals/native/gems/Lottie_NitroGems_Badge24.lottie":()=>a.e("284996").then(a.t.bind(a,248476,17)),"discord_common/js/shared/animations/app/gifts/seasonal/box/box-action.lottiejson":()=>a.e("719534").then(a.t.bind(a,87037,19)),"discord_common/js/shared/animations/app/gifts/seasonal/box/box-idle.lottiejson":()=>a.e("812250").then(a.t.bind(a,553998,19)),"discord_common/js/shared/animations/app/gifts/seasonal/box/box-loop.lottiejson":()=>a.e("58526").then(a.t.bind(a,138157,19)),"discord_common/js/shared/animations/app/gifts/seasonal/cake/cake-action.lottiejson":()=>a.e("964376").then(a.t.bind(a,37259,19)),"discord_common/js/shared/animations/app/gifts/seasonal/cake/cake-idle.lottiejson":()=>a.e("730800").then(a.t.bind(a,683891,19)),"discord_common/js/shared/animations/app/gifts/seasonal/cake/cake-loop.lottiejson":()=>a.e("852436").then(a.t.bind(a,45887,19)),"discord_common/js/shared/animations/app/gifts/seasonal/chest/chest-action.lottiejson":()=>a.e("403086").then(a.t.bind(a,118301,19)),"discord_common/js/shared/animations/app/gifts/seasonal/chest/chest-idle.lottiejson":()=>a.e("437690").then(a.t.bind(a,733057,19)),"discord_common/js/shared/animations/app/gifts/seasonal/chest/chest-loop.lottiejson":()=>a.e("582078").then(a.t.bind(a,553101,19)),"discord_common/js/shared/animations/app/gifts/seasonal/coffee/coffee-action.lottiejson":()=>a.e("751992").then(a.t.bind(a,558251,19)),"discord_common/js/shared/animations/app/gifts/seasonal/coffee/coffee-idle.lottiejson":()=>a.e("264400").then(a.t.bind(a,94995,19)),"discord_common/js/shared/animations/app/gifts/seasonal/coffee/coffee-loop.lottiejson":()=>a.e("239476").then(a.t.bind(a,367327,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/gift_icon/seasonal-gifting-wumpus-action.lottiejson":()=>a.e("827568").then(a.t.bind(a,579571,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/gift_icon/seasonal-gifting-wumpus-loop.lottiejson":()=>a.e("525676").then(a.t.bind(a,322151,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/seasonal_wumpus/seasonal-wumpus-action.lottiejson":()=>a.e("710803").then(a.t.bind(a,27870,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/seasonal_wumpus/seasonal-wumpus-idle.lottiejson":()=>a.e("410191").then(a.t.bind(a,837074,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/seasonal_wumpus/seasonal-wumpus-loop.lottiejson":()=>a.e("761223").then(a.t.bind(a,547450,19)),"discord_common/js/shared/animations/app/gifts/seasonal/nitroween/halloween-action.lottiejson":()=>a.e("969842").then(a.t.bind(a,809865,19)),"discord_common/js/shared/animations/app/gifts/seasonal/nitroween/halloween-idle.lottiejson":()=>a.e("699166").then(a.t.bind(a,334829,19)),"discord_common/js/shared/animations/app/gifts/standard/box/box-action.lottiejson":()=>a.e("698287").then(a.t.bind(a,380082,19)),"discord_common/js/shared/animations/app/gifts/standard/box/box-idle.lottiejson":()=>a.e("212427").then(a.t.bind(a,676614,19)),"discord_common/js/shared/animations/app/gifts/standard/box/box-loop.lottiejson":()=>a.e("831939").then(a.t.bind(a,900110,19)),"discord_common/js/shared/animations/app/gifts/standard/cake/cake-action.lottiejson":()=>a.e("371305").then(a.t.bind(a,629456,19)),"discord_common/js/shared/animations/app/gifts/standard/cake/cake-idle.lottiejson":()=>a.e("170625").then(a.t.bind(a,254424,19)),"discord_common/js/shared/animations/app/gifts/standard/cake/cake-loop.lottiejson":()=>a.e("233449").then(a.t.bind(a,690576,19)),"discord_common/js/shared/animations/app/gifts/standard/chest/chest-action.lottiejson":()=>a.e("346791").then(a.t.bind(a,690842,19)),"discord_common/js/shared/animations/app/gifts/standard/chest/chest-idle.lottiejson":()=>a.e("828115").then(a.t.bind(a,755678,19)),"discord_common/js/shared/animations/app/gifts/standard/chest/chest-loop.lottiejson":()=>a.e("408891").then(a.t.bind(a,778422,19)),"discord_common/js/shared/animations/app/gifts/standard/coffee/coffee-action.lottiejson":()=>a.e("958009").then(a.t.bind(a,433504,19)),"discord_common/js/shared/animations/app/gifts/standard/coffee/coffee-idle.lottiejson":()=>a.e("702897").then(a.t.bind(a,976584,19)),"discord_common/js/shared/animations/app/gifts/standard/coffee/coffee-loop.lottiejson":()=>a.e("252793").then(a.t.bind(a,858464,19)),"discord_app/images/burst_reactions/BurstReaction_Anime_v01_Lottie.lottiejson":()=>a.e("674149").then(a.t.bind(a,965892,19)),"discord_app/images/burst_reactions/BurstReaction_Arcade_v01.lottiejson":()=>a.e("517087").then(a.t.bind(a,44194,19)),"discord_app/images/burst_reactions/BurstReaction_BlackHoles_v01.lottiejson":()=>a.e("4289").then(a.t.bind(a,141208,19)),"discord_app/images/burst_reactions/BurstReaction_BlastOff_v04.lottiejson":()=>a.e("277339").then(a.t.bind(a,420054,19)),"discord_app/images/burst_reactions/BurstReaction_Crystal_v04.lottiejson":()=>a.e("366414").then(a.t.bind(a,33565,19)),"discord_app/images/burst_reactions/BurstReaction_Fireworks_v03.lottiejson":()=>a.e("331165").then(a.t.bind(a,414956,19)),"discord_app/images/burst_reactions/BurstReaction_Fusion_v03.lottiejson":()=>a.e("158541").then(a.t.bind(a,221340,19)),"discord_app/images/burst_reactions/BurstReaction_Pop_v04.lottiejson":()=>a.e("910169").then(a.t.bind(a,710208,19)),"discord_app/images/burst_reactions/BurstReaction_PowerUp_v05.lottiejson":()=>a.e("276601").then(a.t.bind(a,333984,19)),"discord_app/images/burst_reactions/BurstReaction_Puzzle_v01_Lottie.lottiejson":()=>a.e("484163").then(a.t.bind(a,211342,19)),"discord_app/images/burst_reactions/BurstReaction_Spotlight_v01_Lottie.lottiejson":()=>a.e("252029").then(a.t.bind(a,714316,19)),"discord_app/images/burst_reactions/BurstReaction_StarBlast_v03.lottiejson":()=>a.e("623997").then(a.t.bind(a,851404,19)),"discord_app/images/burst_reactions/BurstReaction_Tube_v01_Lottie.lottiejson":()=>a.e("667133").then(a.t.bind(a,821644,19)),"discord_app/images/burst_reactions/BurstReaction_UFO_v01_Lottie.lottiejson":()=>a.e("684765").then(a.t.bind(a,51244,19)),"discord_app/images/burst_reactions/BurstReaction_Whirlwind_v01_Lottie.lottiejson":()=>a.e("235583").then(a.t.bind(a,668994,19)),"discord_app/images/burst_reactions/mobile/fullscreen/SuperReactions_Mobile_Send_Spotlight_v1.lottiejson":()=>a.e("47862").then(a.t.bind(a,911573,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Anime_v1.lottiejson":()=>a.e("946711").then(a.t.bind(a,23434,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Arcade_v1.lottiejson":()=>a.e("751153").then(a.t.bind(a,743496,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_BlackHoles_v1.lottiejson":()=>a.e("32803").then(a.t.bind(a,252462,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_BlastOff_v1.lottiejson":()=>a.e("819842").then(a.t.bind(a,341529,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Crystal_v1.lottiejson":()=>a.e("585529").then(a.t.bind(a,762464,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Fireworks_v1.lottiejson":()=>a.e("697197").then(a.t.bind(a,47036,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Fusion_v1.lottiejson":()=>a.e("192933").then(a.t.bind(a,279172,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Pop_v1.lottiejson":()=>a.e("905560").then(a.t.bind(a,824888,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_PowerUp_v1.lottiejson":()=>a.e("863011").then(a.t.bind(a,432302,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Puzzle_v1.lottiejson":()=>a.e("369845").then(a.t.bind(a,854420,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Spotlight_v1.lottiejson":()=>a.e("888607").then(a.t.bind(a,997730,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_StarBlast_v2.lottiejson":()=>a.e("696874").then(a.t.bind(a,281073,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Tube_v1.lottiejson":()=>a.e("894147").then(a.t.bind(a,192718,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_UFO_v2.lottiejson":()=>a.e("84992").then(a.t.bind(a,513667,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Whirlwind_v1.lottiejson":()=>a.e("349693").then(a.t.bind(a,754124,19)),"discord_app/modules/guild_member_verification/images/islandMiddleAnimation.lottiejson":()=>a.e("244678").then(a.t.bind(a,144759,19)),"discord_app/modules/premium/web/animations/guild_sidebar_premium_entrypoint_dt.json":()=>a.e("515048").then(a.t.bind(a,366043,19)),"discord_app/modules/premium/web/animations/guild_sidebar_premium_entrypoint_lt.json":()=>a.e("612512").then(a.t.bind(a,789091,19)),"discord_common/js/shared/animations/app/activities/AppsIconWordlePromo.lottiejson":()=>a.e("173550").then(a.t.bind(a,527613,19)),"discord_common/js/shared/animations/app/nearby/nearby.lottiejson":()=>a.e("293780").then(a.t.bind(a,957439,19)),"discord_common/js/shared/animations/app/premium_guild_subscribe/dark.lottiejson":()=>a.e("245470").then(a.t.bind(a,622637,19)),"discord_common/js/shared/animations/app/premium_guild_subscribe/light.lottiejson":()=>a.e("23478").then(a.t.bind(a,262037,19)),"discord_common/js/shared/animations/app/premium_guild_subscription_system_message_easter_egg/index.lottiejson":()=>a.e("698150").then(a.t.bind(a,633343,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/hd_streaming.lottiejson":()=>a.e("520795").then(a.t.bind(a,551574,19)),"discord_common/js/shared/animations/app/premium-payment-tier-2/index.lottiejson":()=>a.e("869421").then(a.t.bind(a,548375,19)),"discord_app/images/burst_reactions/BurstReaction_Bubbles_v03.lottiejson":()=>a.e("91770").then(a.t.bind(a,95553,19)),"discord_app/images/burst_reactions/BurstReaction_Portal_v03.lottiejson":()=>a.e("196515").then(a.t.bind(a,178862,19)),"discord_app/images/burst_reactions/BurstReaction_Slime_v02.lottiejson":()=>a.e("109302").then(a.t.bind(a,16341,19)),"discord_app/images/burst_reactions/mobile/fullscreen/SuperReactions_Mobile_Send_Slime_v1.lottiejson":()=>a.e("247554").then(a.t.bind(a,748761,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Bubbles_v2.lottiejson":()=>a.e("807739").then(a.t.bind(a,106870,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Portal_v1.lottiejson":()=>a.e("979067").then(a.t.bind(a,458486,19)),"discord_app/images/burst_reactions/mobile/SuperReactions_Mobile_Slime_v2.lottiejson":()=>a.e("924584").then(a.t.bind(a,388059,19)),"discord_app/modules/app_launcher/native/images/onboarding_glow.lottiejson":()=>a.e("507985").then(a.t.bind(a,9640,19)),"discord_app/modules/global_discovery_apps/discovering-dabatouille-animation.lottiejson":()=>a.e("995947").then(a.t.bind(a,604902,19)),"discord_app/modules/guild_boosting/animations/animated_guild_icon.lottiejson":()=>a.e("24645").then(a.t.bind(a,624420,19)),"discord_app/modules/guild_member_verification/images/wavingHandLottieAnimation.lottiejson":()=>a.e("515423").then(a.t.bind(a,155147,19)),"discord_app/modules/guild_onboarding/native/animations/landing.lottiejson":()=>a.e("124093").then(a.t.bind(a,280780,19)),"discord_app/modules/guild_onboarding/web/animations/balloon-dog.lottiejson":()=>a.e("225961").then(a.t.bind(a,739408,19)),"discord_app/modules/guild_onboarding/web/animations/bubble-island-02.lottiejson":()=>a.e("187356").then(a.t.bind(a,194199,19)),"discord_app/modules/guild_onboarding/web/animations/grilling-island-02.lottiejson":()=>a.e("556026").then(a.t.bind(a,113473,19)),"discord_app/modules/guild_onboarding/web/animations/main-island-02.lottiejson":()=>a.e("416301").then(a.t.bind(a,694268,19)),"discord_app/modules/guild_onboarding/web/animations/waffle-island-02.lottiejson":()=>a.e("722191").then(a.t.bind(a,896018,19)),"discord_app/modules/poggermode/images/enable_animation.lottiejson":()=>a.e("504660").then(a.t.bind(a,662336,19)),"discord_app/modules/premium/powerups/web/images/server_boost_highlight.json":()=>a.e("867807").then(a.t.bind(a,217762,19)),"discord_app/modules/quests/images/confetti.lottiejson":()=>a.e("40119").then(a.t.bind(a,718698,19)),"discord_app/modules/quests/web/images/quest_bar_background.json":()=>a.e("837316").then(a.t.bind(a,599279,19)),"discord_app/modules/quests/web/images/quest_bar_sparkle.json":()=>a.e("897536").then(a.t.bind(a,478979,19)),"discord_app/modules/self_mod/inappropriate_conversation/images/vibing_wumpus.lottiejson":()=>a.e("114823").then(a.t.bind(a,718074,19)),"discord_common/js/shared/animations/app/everyone_popout/dark.lottiejson":()=>a.e("480467").then(a.t.bind(a,661022,19)),"discord_common/js/shared/animations/app/everyone_popout/light.lottiejson":()=>a.e("892705").then(a.t.bind(a,111992,19)),"discord_common/js/shared/animations/app/gifts/seasonal/marketing/coachmark/seasonal-gifting-coachmark.lottiejson":()=>a.e("561250").then(a.t.bind(a,762361,19)),"discord_common/js/shared/animations/app/playstation/playstation_connecting.lottiejson":()=>a.e("435066").then(a.t.bind(a,844512,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/emoji.lottiejson":()=>a.e("717124").then(a.t.bind(a,616175,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/interstitial_wheel_dark.lottiejson":()=>a.e("394675").then(a.t.bind(a,735678,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/interstitial_wheel_light.lottiejson":()=>a.e("278465").then(a.t.bind(a,247704,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/profile_customization.lottiejson":()=>a.e("762807").then(a.t.bind(a,202282,19)),"discord_common/js/shared/animations/app/premium_marketing_surface/unlock.lottiejson":()=>a.e("131838").then(a.t.bind(a,650125,19)),"discord_common/js/shared/animations/app/premium_marketing/index.lottiejson":()=>a.e("406954").then(a.t.bind(a,186910,19)),"discord_common/js/shared/animations/app/premium_payment_guild/index.lottiejson":()=>a.e("945870").then(a.t.bind(a,738503,19)),"discord_common/js/shared/animations/app/premium-activated-tier-1/premium-activated-tier-1.lottiejson":()=>a.e("505642").then(a.t.bind(a,242993,19)),"discord_common/js/shared/animations/app/premium-payment-tier-0/index.lottiejson":()=>a.e("678503").then(a.t.bind(a,635489,19)),"discord_common/js/shared/animations/app/premium-payment-tier-1/index.lottiejson":()=>a.e("119898").then(a.t.bind(a,262546,19)),"discord_common/js/shared/animations/app/xbox/voice_connect.lottiejson":()=>a.e("40348").then(a.t.bind(a,971799,19)),"discord_common/js/shared/animations/app/xbox/xbox_connecting.lottiejson":()=>a.e("876121").then(a.t.bind(a,709376,19))};function rD(e){let{default:t}=e;return fetch(t).then(e=>e.arrayBuffer()).then(e=>new Promise((t,a)=>{let n=new Uint8Array(e);rA.$1(n,(e,n)=>{null!=e&&a(e);let l=Object.keys(n).reduce((e,t)=>({...e,[t]:JSON.parse(rA.he(n[t]))}),{}),i=l["manifest.json"];t(l[`animations/${i.animations[0].id}.json`])})}))}function rT(){let[e,t]=o.useState(void 0),[a,n]=o.useState(400),[l,i]=o.useState(400);return(0,r.jsx)("div",{style:{margin:24},children:(0,r.jsxs)(W.B,{gap:24,children:[(0,r.jsx)(as.Z,{options:Object.keys(rI).map(e=>({id:e,label:e,value:e})),value:e,onSelectionChange:t,selectionMode:"single"}),(0,r.jsxs)(W.B,{gap:8,direction:"horizontal",children:[(0,r.jsx)(f.k,{value:a.toString(),onChange:e=>n(Number(e)),label:"Width"}),(0,r.jsx)(f.k,{value:l.toString(),onChange:e=>i(Number(e)),label:"Height"})]}),(0,r.jsx)(x.$,{size:"sm",disabled:null==e,onClick:async()=>{if(null==e)return;let t=rI[e],a=new Blob([JSON.stringify(e.endsWith(".lottie")?await t().then(rD).then(eJ().cloneDeep):await t().then(e=>eJ().cloneDeep(e.default)))],{type:"application/json"}),n=URL.createObjectURL(a),l=document.createElement("a");l.href=n,l.download=`${e.split("/").pop()}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(n)},text:"Download"}),null!=e&&(0,r.jsx)("div",{style:{width:a,height:l},children:(0,r.jsx)(rk.a,{importData:()=>{let t=rI[e];return e.endsWith(".lottie")?t().then(rD).then(eJ().cloneDeep):t().then(e=>eJ().cloneDeep(e.default))}},e)})]})})}var rO=a(442433),rR=a(395671);let rw={ClipsContextMenu:async()=>{let{default:e}=await a.e("344751").then(a.bind(a,575538));return t=>(0,r.jsx)(e,{...t})},ActivityPopoutHeaderOverflowMenu:async()=>{let{default:e}=await a.e("832986").then(a.bind(a,728033)),t=new rR.kJ({id:"123456789",name:"Test Activity",icon:null,description:"A test activity for devtools",type:1,coverImage:void 0,primarySkuId:void 0,bot:void 0,splash:void 0,thirdPartySkus:[],isMonetized:!1,isVerified:!1,roleConnectionsVerificationUrl:void 0,parentId:void 0,connectionEntrypointUrl:void 0});return()=>(0,r.jsx)(e,{application:t,channelId:"987654321",onClose:rO.Z_})},GuildChannelListContextMenu:async()=>{let{default:e}=await Promise.all([a.e("309004"),a.e("419690"),a.e("845322"),a.e("110758")]).then(a.bind(a,455557)),t=Object.values(nn.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,guild:t})},GuildContextMenu:async()=>{let{default:e}=await Promise.all([a.e("876364"),a.e("996907"),a.e("8159"),a.e("361922"),a.e("186856"),a.e("766811"),a.e("301850"),a.e("936875"),a.e("862179"),a.e("722784"),a.e("906470"),a.e("774550"),a.e("923981"),a.e("331696"),a.e("806391"),a.e("803511"),a.e("424216"),a.e("840100"),a.e("22865"),a.e("173896"),a.e("57358"),a.e("722765"),a.e("33909"),a.e("754596"),a.e("357625"),a.e("308093"),a.e("401106"),a.e("498589"),a.e("21486"),a.e("304419"),a.e("45268"),a.e("617281"),a.e("164716"),a.e("170282"),a.e("259465"),a.e("655327"),a.e("335532"),a.e("56955"),a.e("463455"),a.e("403655"),a.e("317615"),a.e("577154"),a.e("877730"),a.e("611899"),a.e("527552"),a.e("769266"),a.e("487873"),a.e("765626"),a.e("683302"),a.e("660608"),a.e("744554"),a.e("541137"),a.e("331212"),a.e("638259"),a.e("339072"),a.e("683621"),a.e("711162"),a.e("275179"),a.e("289789"),a.e("116125"),a.e("977412"),a.e("19385"),a.e("692811"),a.e("249681"),a.e("869047"),a.e("996382"),a.e("771657"),a.e("122218"),a.e("309004"),a.e("449145"),a.e("430997"),a.e("728136"),a.e("216084"),a.e("343116"),a.e("36624"),a.e("273669"),a.e("22547"),a.e("466147"),a.e("50342"),a.e("428235"),a.e("161058"),a.e("333097"),a.e("409391"),a.e("115368"),a.e("810262"),a.e("346313"),a.e("463726"),a.e("343233"),a.e("756684"),a.e("256373"),a.e("583827"),a.e("806354"),a.e("556026"),a.e("416301"),a.e("722191"),a.e("225961"),a.e("359702"),a.e("708364"),a.e("399108"),a.e("452823"),a.e("779348"),a.e("647011"),a.e("331203"),a.e("466913"),a.e("583518"),a.e("71719"),a.e("419690"),a.e("893767"),a.e("213848"),a.e("39214"),a.e("588307"),a.e("514878"),a.e("676376"),a.e("426508"),a.e("361347"),a.e("842935"),a.e("73091"),a.e("269178"),a.e("886692"),a.e("752695"),a.e("916373"),a.e("324484"),a.e("925172"),a.e("232347"),a.e("8458"),a.e("11810"),a.e("591977"),a.e("890152"),a.e("174337"),a.e("646570"),a.e("287973"),a.e("357197"),a.e("314863"),a.e("623386"),a.e("384951"),a.e("560165"),a.e("712390"),a.e("71167"),a.e("113446"),a.e("161309"),a.e("694529"),a.e("995210"),a.e("477319"),a.e("721300"),a.e("966016"),a.e("218489"),a.e("317699"),a.e("257032"),a.e("772238"),a.e("845322"),a.e("94832"),a.e("637038"),a.e("426386"),a.e("865338"),a.e("652191"),a.e("314656"),a.e("639855"),a.e("214530"),a.e("149409"),a.e("645291"),a.e("632607")]).then(a.bind(a,860417)),t=Object.values(nn.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,guild:t})},GuildFolderContextMenu:async()=>{let{default:e}=await a.e("232857").then(a.bind(a,842112));return t=>(0,r.jsx)(e,{...t,folderId:1,folderColor:void 0,folderName:void 0,unread:!1})},DeveloperContextMenu:async()=>{let{default:e}=await a.e("715687").then(a.bind(a,646938));return t=>(0,r.jsx)(e,{...t,id:"123456789",label:"Copy Test ID"})},UserSettingsMenu:async()=>{let{default:e}=await Promise.all([a.e("594045"),a.e("926132"),a.e("44491")]).then(a.bind(a,907206));return t=>(0,r.jsx)(e,{...t,onClose:rO.Z_})},ExpressionPickerContextMenu:async()=>{let{default:e}=await a.e("446132").then(a.bind(a,233503));return t=>(0,r.jsx)(e,{...t})},ForumTagContextMenu:async()=>{let{default:e}=await a.e("432612").then(a.bind(a,960015)),t={id:"123456789",name:"Test Forum Tag"};return()=>(0,r.jsx)(e,{tag:t})},GuildRoleConnectionsModalContextMenu:async()=>{let{default:e}=await a.e("868001").then(a.bind(a,699896));return t=>(0,r.jsx)(e,{...t,roleId:"123456789",onLeaveRole:()=>{console.log("Leave role clicked"),(0,rO.Z_)()}})},StaffOnlyEntryDebugMenu:async()=>{let{default:e}=await Promise.all([a.e("886456"),a.e("789346")]).then(a.bind(a,949881)),{ContentInventoryEntryType:t}=await Promise.resolve().then(a.bind(a,681154)),{ContentInventoryAuthorType:n}=await Promise.resolve().then(a.bind(a,6161)),l=en.default.getCurrentUser(),i={id:"mock-entry-123",author_id:l?.id??"123456789",author_type:n.USER,content_type:t.PLAYED_GAME,participants:[],traits:[],extra:{type:"played_game_extra",game_name:"Test Game",application_id:"123456789"}};return()=>(0,r.jsx)(e,{entry:i,requestId:"mock-request-123"})},AddQuestionsContextMenu:async()=>{let{AddQuestionsContextMenu:e}=await Promise.all([a.e("289789"),a.e("722765"),a.e("11810"),a.e("314656")]).then(a.bind(a,892921)),t=Object.values(nn.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,addFormField:e=>{console.log("Add form field:",e),(0,rO.Z_)()},guild:t,allowTerms:!0})},ChannelListThreadContextMenu:async()=>{let{default:e}=await Promise.all([a.e("926132"),a.e("955557"),a.e("947502"),a.e("343266"),a.e("965789"),a.e("412255"),a.e("63340"),a.e("65200"),a.e("285802"),a.e("703869"),a.e("51212"),a.e("584615")]).then(a.bind(a,612826)),t=nn.A.getGuilds(),n=null;for(let e of Object.values(t)){for(let t of Object.values(aI.A.getMutableGuildChannelsForGuild(e.id))){let e=aI.A.getAllThreadsForParent(t.id);if(e.length>0){n=e[0];break}}if(null!=n)break}return null==n?(console.log("No thread channel found for ChannelListThreadContextMenu"),()=>null):t=>(0,r.jsx)(e,{...t,channel:n})},MembersTableSortContextMenu:async()=>{let{default:e}=await a.e("73091").then(a.bind(a,779662)),t=Object.values(nn.A.getGuilds())[0];return null==t?()=>null:()=>(0,r.jsx)(e,{guildId:t.id,onClose:rO.Z_})},MembersTableJoinTypeContextMenu:async()=>{let{default:e}=await Promise.all([a.e("541137"),a.e("71719"),a.e("514878"),a.e("966016")]).then(a.bind(a,316173)),t=Object.values(nn.A.getGuilds())[0];return null==t?()=>null:()=>(0,r.jsx)(e,{guildId:t.id,onClose:rO.Z_})}},rM={GuildShopSortOptions:o.lazy(async()=>{let{default:e}=await Promise.all([a.e("583518"),a.e("255197"),a.e("250974")]).then(a.bind(a,324269)),{default:t}=await a.e("255197").then(a.bind(a,558060));return{default:()=>(0,r.jsx)(t,{defaultSortOption:void 0,children:(0,r.jsx)(e,{})})}})};function rL(){let e=o.useMemo(()=>Object.keys(rw).map(e=>({label:e,value:e,id:e})).sort((e,t)=>e.label.localeCompare(t.label)),[]),t=o.useMemo(()=>Object.keys(rM).map(e=>({label:e,value:e,id:e})).sort((e,t)=>e.label.localeCompare(t.label)),[]),[a,n]=o.useState(null),[l,i]=o.useState(null),s=o.useCallback(e=>{null!=a&&(0,rO.L3)(e,rw[a])},[a]),d=null!=l?rM[l]:null;return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)(W.B,{className:iE.l$,gap:16,children:[(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:"Context Menus"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Select a menu and click Open to trigger it as a context menu at the button position."})]}),(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"end",children:[(0,r.jsx)(as.Z,{label:"Open a Context Menu",placeholder:"Select a menu",options:e,value:a,onSelectionChange:n,selectionMode:"single"}),(0,r.jsx)(x.$,{variant:"primary",text:"Open",disabled:null==a,onClick:s})]}),(0,r.jsxs)(W.B,{gap:8,children:[(0,r.jsx)(p.E,{variant:"eyebrow",children:"Popout Menus"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Select a popout menu to render it. Click the rendered button to open the popout."})]}),(0,r.jsx)(W.B,{direction:"horizontal",gap:8,align:"end",children:(0,r.jsx)(as.Z,{label:"Render a Popout Menu",placeholder:"Select a popout",options:t,value:l,onSelectionChange:i,selectionMode:"single"})}),null!=d&&(0,r.jsx)(o.Suspense,{fallback:(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"Loading..."}),children:(0,r.jsx)(d,{})})]})})}var rP=a(253506),rU=a(665260),rG=a(97808),rB=a(778712),rF=a(308528),r$=a(148494),rV=a(571694),rW=a(963852),rz=a(704844),rH=a(309010),rK=a(645959),rY=a(716371),rq=a(32946);let rJ=[{id:"USER_JOIN",value:er.lAJ.USER_JOIN,label:"User Join"},{id:"CHANNEL_PINNED_MESSAGE",value:er.lAJ.CHANNEL_PINNED_MESSAGE,label:"Channel Pinned Message"},{id:"GUILD_BOOST",value:er.lAJ.GUILD_BOOST,label:"Guild Boost"},{id:"GUILD_BOOST_TIER_1",value:er.lAJ.GUILD_BOOST_TIER_1,label:"Guild Boost Tier 1"},{id:"GUILD_BOOST_TIER_2",value:er.lAJ.GUILD_BOOST_TIER_2,label:"Guild Boost Tier 2"},{id:"GUILD_BOOST_TIER_3",value:er.lAJ.GUILD_BOOST_TIER_3,label:"Guild Boost Tier 3"},{id:"THREAD_CREATED",value:er.lAJ.THREAD_CREATED,label:"Thread Created"},{id:"CHANNEL_FOLLOW_ADD",value:er.lAJ.CHANNEL_FOLLOW_ADD,label:"Channel Follow Add"},{id:"STAGE_START",value:er.lAJ.STAGE_START,label:"Stage Start"},{id:"STAGE_END",value:er.lAJ.STAGE_END,label:"Stage End"},{id:"STAGE_SPEAKER",value:er.lAJ.STAGE_SPEAKER,label:"Stage Speaker"},{id:"STAGE_RAISE_HAND",value:er.lAJ.STAGE_RAISE_HAND,label:"Stage Raise Hand"},{id:"STAGE_TOPIC",value:er.lAJ.STAGE_TOPIC,label:"Stage Topic"},{id:"VOICE_SESSION",value:er.lAJ.VOICE_SESSION,label:"Voice Session"},{id:"FRIEND_REQUEST_ACCEPTED",value:er.lAJ.FRIEND_REQUEST_ACCEPTED,label:"Friend Request Accepted"},{id:"GUILD_DISCOVERY_DISQUALIFIED",value:er.lAJ.GUILD_DISCOVERY_DISQUALIFIED,label:"Discovery Disqualified"},{id:"GUILD_DISCOVERY_REQUALIFIED",value:er.lAJ.GUILD_DISCOVERY_REQUALIFIED,label:"Discovery Requalified"},{id:"GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING",value:er.lAJ.GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING,label:"Discovery Grace Initial Warning"},{id:"GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING",value:er.lAJ.GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING,label:"Discovery Grace Final Warning"},{id:"RECIPIENT_ADD",value:er.lAJ.RECIPIENT_ADD,label:"Recipient Add"},{id:"RECIPIENT_REMOVE",value:er.lAJ.RECIPIENT_REMOVE,label:"Recipient Remove"},{id:"CALL",value:er.lAJ.CALL,label:"Call"}];function rQ(){let[e,t]=o.useState(er.lAJ.USER_JOIN),a=(0,d.bG)([rH.Ay],()=>rH.Ay.getChannelId(),[]),n=o.useCallback(()=>{if(null==a||null==e)return;let t=(0,rW.Ay)({channelId:a,content:"",type:e,state:er.cmJ.SENT});r$.A.receiveMessage(a,t,!1)},[a,e]),l=o.useCallback(()=>{if(null!=a)for(let{value:e}of rJ){let t=(0,rW.Ay)({channelId:a,content:"",type:e,state:er.cmJ.SENT});r$.A.receiveMessage(a,t,!1)}},[a]);return(0,r.jsxs)("div",{className:rq.gs,children:[(0,r.jsx)(as.Z,{label:"Inject System Message",selectionMode:"single",options:rJ,placeholder:"Select type",value:e,onSelectionChange:t}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Inject",onClick:n,disabled:null==a||null==e}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Inject All",onClick:l,disabled:null==a})]})}function rX(){let e=(0,d.yK)([rK.A],()=>rK.A.getSortedChannels()[1]),[t,a]=o.useState(e.length>0?e[0].channelId:void 0),{selectedChannel:n,options:l}=(0,d.cf)([aI.A,en.default,aD.A],()=>({selectedChannel:aI.A.getChannel(t),options:e.map(e=>{let t=aI.A.getChannel(e.channelId);return{id:e.channelId,value:e.channelId,label:null!=t?(0,ak.m1)(t,en.default,aD.A):e.channelId,leading:null!=t?(0,r.jsx)(rG.eu,{src:(0,rV.Y)(t),"aria-hidden":!0,size:rB._3.SIZE_16}):void 0}})})),i=o.useCallback(()=>{if(null==n||!n.isPrivate())return;let e=(0,rU.PQ)(n.recipientFlags??0,rP.o.DISMISSED_IN_GAME_MESSAGE_NUX);rz.A.updatePrivateChannelRecipientFlags(n.id,e)},[n]),s=!!n?.isPrivate()&&(0,rU.Lt)(n.recipientFlags??0,rP.o.DISMISSED_IN_GAME_MESSAGE_NUX);return(0,r.jsxs)("div",{className:rq.gs,children:[(0,r.jsx)(as.Z,{label:"In-Game NUX Message for DMs",selectionMode:"single",options:l,placeholder:"Select DM",value:t,onSelectionChange:a}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:s?"Clear NUX Flag":"Set NUX Flag",onClick:i,disabled:null==t})]})}function rZ(){let e=o.useCallback(()=>{rF.A.openPrivateChannel({recipientIds:[rY.K]})},[]);return(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Open System DM",onClick:e})}function r0(){let e=(0,d.bG)([aQ.Ay],()=>aQ.Ay.allByCategory(aQ.xW.MESSAGING),[],d.My).map(e=>{let[t,a,{label:n}]=e;return(0,r.jsx)(m.d,{label:n,description:t,checked:a,onChange:e=>iP(t,e)},t)});return(0,r.jsxs)("div",{className:F()(tH.nd,rq.nd),children:[e,(0,r.jsx)("div",{className:rq.yF}),(0,r.jsx)(rQ,{}),(0,r.jsx)("div",{className:rq.yF}),(0,r.jsx)(rX,{}),(0,r.jsx)("div",{className:rq.yF}),(0,r.jsx)(rZ,{})]})}var r1=a(459838),r2=a(772707),r3=a(150934),r6=a(598653),r5=a(166403),r8=a(625494),r4=a(204925),r9=a(325278);let r7={EmailEnterModal:async()=>{let{default:e}=await a.e("429232").then(a.bind(a,180275));return t=>(0,r.jsx)(e,{...t,headerText:ns.intl.string(ns.t.ZLRYGU),confirmButtonText:ns.intl.string(ns.t.PDTjLN),confirmButtonVariant:"primary"})},EmailPincodeModal:async()=>{let{default:e}=await a.e("919840").then(a.bind(a,79779));return t=>(0,r.jsx)(e,{...t,headerText:ns.intl.string(ns.t.H3Q7U8),onFormSubmit:()=>{},onResend:()=>{},onSuccess:()=>{},confirmButtonText:ns.intl.string(ns.t["13ofGu"]),impression:{impressionName:i4.ImpressionNames.URF_CONFIRM_EMAIL_CODE}})},AgeVerificationRetryModal:async()=>{let{default:e}=await Promise.all([a.e("469663"),a.e("334260"),a.e("518467")]).then(a.bind(a,297102));return t=>(0,r.jsx)(e,{...t,entryPoint:np.q1.DEV_TOOLS_AGE_VERIFICATION_RETRY_MODAL})},ExistingUserAgeGatePrompt:async()=>{let{default:e}=await Promise.all([a.e("533651"),a.e("682758"),a.e("280022"),a.e("810136")]).then(a.bind(a,776971));return t=>(0,r.jsx)(e,{...t,source:r4.w_.NSFW_SERVER})},ExistingUserAgeGateUnderage:async()=>{let{default:e}=await a.e("280959").then(a.bind(a,784578));return t=>(0,r.jsx)(e,{...t})},NewUserAgeGate:async()=>{let{default:e}=await Promise.all([a.e("533651"),a.e("682758"),a.e("319623"),a.e("280022"),a.e("401143")]).then(a.bind(a,284778));return t=>(0,r.jsx)(e,{...t})},NUFModal:async()=>{let{default:e}=await Promise.all([a.e("140606"),a.e("122326"),a.e("533651"),a.e("944492"),a.e("419580"),a.e("197804"),a.e("756856"),a.e("682758"),a.e("999574"),a.e("280022"),a.e("250475"),a.e("993265"),a.e("258118")]).then(a.bind(a,111185));return t=>(0,r.jsx)(e,{...t,onSlideChange:()=>{}})},ClaimAccountModal:async()=>{let{default:e}=await Promise.all([a.e("213042"),a.e("319623"),a.e("121007")]).then(a.bind(a,888363));return t=>(0,r.jsx)(e,{claimRequired:!0,...t})},AutomatedUnderageAppealModal:async()=>{let{default:e}=await Promise.all([a.e("51194"),a.e("909018")]).then(a.bind(a,466702));return t=>(0,r.jsx)(e,{...t,classificationId:"123"})},AutomodRaidResolveModal:async()=>{let{default:e}=await Promise.all([a.e("513221"),a.e("273669"),a.e("307133")]).then(a.bind(a,580812));return t=>(0,r.jsx)(e,{...t,guildId:"123",messageId:null})},AutomodUserProfileQuarantineAlert:async()=>{let{default:e}=await a.e("452343").then(a.bind(a,725034));return t=>(0,r.jsx)(e,{...t,guildId:"123"})},PhoneVerificationModal:async()=>{let{default:e}=await Promise.all([a.e("590275"),a.e("766806"),a.e("989545"),a.e("311493")]).then(a.bind(a,914724));return t=>(0,r.jsx)(e,{error:null,working:!1,validPhone:!1,...t})},VoiceSettingsModal:async()=>{let{default:e}=await a.e("796531").then(a.bind(a,880510));return t=>(0,r.jsx)(e,{...t,mediaEngineContext:r1.x.DEFAULT,subtitle:"Devtools subtitle"})},DynamicGraphicDemo:async()=>{let{DynamicGraphicComponent:e}=await Promise.resolve().then(a.bind(a,116833));return t=>(0,r.jsx)(r2.k,{...t,title:"Dynamic Graphics Demo",subtitle:"This modal demonstrates the dynamic graphics system",graphic:{type:"dynamic",component:e.DEMO,aspectRatio:"6/4",props:{text:"Dynamic Content Loaded!"}},actions:[{variant:"primary",text:"Close",onClick:t.onClose}],children:(0,r.jsx)("div",{children:"This modal showcases the new dynamic graphics system where components can be loaded dynamically based on enum values, providing type safety while maintaining runtime flexibility."})})},OverlayDisabledSurveyModal:async()=>{let{default:e}=await Promise.all([a.e("914052"),a.e("82318")]).then(a.bind(a,387101)),{OverlayToggledClientSettingType:t}=await Promise.resolve().then(a.bind(a,810412));return a=>(0,r.jsx)(e,{...a,clientSettingType:t.LEGACY_GAME,gameId:"123456789"})},PremiumSubscriptionPauseModal:async()=>{let{PremiumSubscriptionPauseModalSelect:e}=await Promise.all([a.e("489361"),a.e("80347")]).then(a.bind(a,318998)),{CancellationContext:t}=await Promise.resolve().then(a.bind(a,916974)),{PremiumTypes:n}=await Promise.resolve().then(a.bind(a,202541)),l={id:"test-subscription-id",userId:"test-user-id",status:1,currency:"usd",currentPeriodStart:new Date,currentPeriodEnd:new Date(Date.now()+2592e6),items:[{id:"test-item-id",planId:"511651880837840896",quantity:1}],paymentSourceId:"test-payment-source",renewalMutations:null,hasActiveTrial:!1},i=o.forwardRef((a,i)=>{let[s,d]=o.useState(null);return(0,r.jsx)(t.Provider,{value:{setStep:()=>{},premiumType:n.TIER_2,onClose:a.onClose,transitionState:a.transitionState,premiumSubscription:l,analyticsLocations:[],analyticsLocation:void 0,confettiCanvas:null,churnUserDiscountOffer:null,isFetchingChurnDiscountOffer:!1,fullPrice:"$9.99",discountedPrice:void 0,planId:"511651880837840896",paymentsBlocked:!1,renewalInvoice:null,renewalInvoiceDetails:null,handleCancellation:async()=>{},applyOffer:async()=>{},pauseDuration:s,setPauseDuration:d},children:(0,r.jsx)(e,{})})});return i.displayName="PremiumSubscriptionPauseModalWrapper",e=>(0,r.jsx)(i,{...e})},NewMemberActionModal:async()=>{let{default:e}=await Promise.all([a.e("266281"),a.e("287973"),a.e("652191"),a.e("813949"),a.e("354569")]).then(a.bind(a,251632)),{NewMemberActionTypes:t}=await Promise.resolve().then(a.bind(a,374084)),n={channelId:"123456789",title:"Welcome to the server!",description:"Say hello in the welcome channel",actionType:t.CHAT,emoji:null,icon:null};return t=>(0,r.jsx)(e,{...t,guildId:"123456789",action:n,onSave:(e,t,a)=>{console.log("NewMemberActionModal onSave:",{action:e,iconData:t,shouldSaveIcon:a})},onDelete:()=>{console.log("NewMemberActionModal onDelete")}})},PlayStationModal:async()=>{let{default:e}=await Promise.all([a.e("187880"),a.e("538035")]).then(a.bind(a,14860)),t=await Promise.resolve().then(a.bind(a,643501)),{createChannelRecord:n}=await Promise.resolve().then(a.bind(a,95701)),l=n({id:"123456789",name:"test-voice-channel",type:2,guild_id:"987654321",position:0,permissionOverwrites:{},parent_id:void 0,nsfw:!1,topic:void 0,lastMessageId:void 0,bitrate:64e3,userLimit:0,rateLimitPerUser:0,icon:null,ownerId:null,application_id:null,lastPinTimestamp:null,rtcRegion:null,videoQualityMode:null,messageCount:0,memberCount:0,threadMetadata:void 0,member:void 0,defaultAutoArchiveDuration:void 0,flags:0,totalMessageSent:0,availableTags:[],appliedTags:[],defaultReactionEmoji:null,defaultThreadRateLimitPerUser:0,defaultSortOrder:null,defaultForumLayout:0}),i={"device-1":{id:"device-1",name:"PS5 - Living Room",platform:"playstation"},"device-2":{id:"device-2",name:"PS5 - Bedroom",platform:"playstation"},"device-3":{id:"device-3",name:"PS4 - Office",platform:"playstation"}},s=a=>{let n=t.default.getDevicesForPlatform,s=t.default.getFetchingDevices,o=t.default.getLastSelectedDeviceByPlatform,d=t.default.getAwaitingRemoteSessionInfo;t.default.getDevicesForPlatform=e=>e===er.fg2.PLAYSTATION?i:n.call(t.default,e),t.default.getFetchingDevices=e=>e!==er.fg2.PLAYSTATION&&s.call(t.default,e),t.default.getLastSelectedDeviceByPlatform=e=>e===er.fg2.PLAYSTATION?"device-1":o.call(t.default,e),t.default.getAwaitingRemoteSessionInfo=()=>null;let c=a.onClose;return a.onClose=async()=>{t.default.getDevicesForPlatform=n,t.default.getFetchingDevices=s,t.default.getLastSelectedDeviceByPlatform=o,t.default.getAwaitingRemoteSessionInfo=d,await c()},(0,r.jsx)(e,{...a,channel:l,platform:er.fg2.PLAYSTATION})};return s.displayName="PlayStationModalWrapper",s},GameDetectionReportModal:async()=>{let{default:e}=await Promise.all([a.e("568035"),a.e("627495")]).then(a.bind(a,651930));return t=>(0,r.jsx)(e,{...t,detected:{applicationId:"123456789",name:"Test Game"}})},AppealIngestionModal:async()=>{let{default:e}=await Promise.all([a.e("742978"),a.e("292030"),a.e("51471")]).then(a.bind(a,550560));return t=>(0,r.jsx)(e,{...t,classificationId:"123456789"})},CreateTagModal:async()=>{let{default:e}=await Promise.all([a.e("143172"),a.e("347326")]).then(a.bind(a,950989));return t=>(0,r.jsx)(e,{...t,channelId:"123456789",guildId:"987654321"})},CreateTagModalEdit:async()=>{let{default:e}=await Promise.all([a.e("143172"),a.e("347326")]).then(a.bind(a,950989)),t={id:"tag-123",name:"Bug Report",emojiId:"123456789",emojiName:"\uD83D\uDC1B",moderated:!0};return a=>(0,r.jsx)(e,{...a,channelId:"123456789",guildId:"987654321",tag:t})},ConfirmModal:async()=>{let{ConfirmModal:e}=await a.e("304823").then(a.bind(a,158954));return t=>(0,r.jsx)(e,{...t,title:"Confirm Action",subtitle:"Are you sure you want to perform this action? This action cannot be undone.",confirmText:"Confirm",onConfirm:()=>console.log("ConfirmModal: Confirmed"),onCancel:()=>console.log("ConfirmModal: Cancelled")})},AlertModal:async()=>{let{default:e}=await Promise.all([a.e("844331"),a.e("410919")]).then(a.bind(a,556506));return t=>(0,r.jsx)(e,{...t,title:"Alert",body:"This is an alert message with a single action.",confirmText:"OK",onConfirm:()=>console.log("AlertModal: Confirmed")})},AlertModalWithCancel:async()=>{let{default:e}=await Promise.all([a.e("844331"),a.e("410919")]).then(a.bind(a,556506));return t=>(0,r.jsx)(e,{...t,title:"Confirm Action",body:"Are you sure you want to proceed with this action?",confirmText:"Yes",cancelText:"No",onConfirm:()=>console.log("AlertModalWithCancel: Confirmed"),onCancel:()=>console.log("AlertModalWithCancel: Cancelled")})},AlertModalWithSecondary:async()=>{let{default:e}=await Promise.all([a.e("844331"),a.e("410919")]).then(a.bind(a,556506));return t=>(0,r.jsx)(e,{...t,title:"Settings Change",body:"This will change your account settings.",confirmText:"Apply",cancelText:"Cancel",secondaryConfirmText:"Don't show this again",onConfirm:()=>console.log("AlertModalWithSecondary: Confirmed"),onCancel:()=>console.log("AlertModalWithSecondary: Cancelled"),onConfirmSecondary:()=>console.log("AlertModalWithSecondary: Secondary action confirmed")})},GuildDisableCommunicationModal:async()=>{let{Button:e,Text:t,Heading:n,Checkbox:l,ButtonGroup:i}=await Promise.all([a.e("304823"),a.e("977260")]).then(a.bind(a,397927)),{DisableCommunicationDuration:s,getFriendlyDurationString:o}=await Promise.resolve().then(a.bind(a,200700)),d=await Promise.resolve().then(a.t.bind(a,582128,19)),c="TestUser";function u(a){let[u,m]=d.useState(s.DURATION_60_SEC),[h,x]=d.useState(""),[p,g]=d.useState(!1),[v,j]=d.useState(!1),f=[{value:s.DURATION_60_SEC,label:o(s.DURATION_60_SEC)},{value:s.DURATION_5_MIN,label:o(s.DURATION_5_MIN)},{value:s.DURATION_10_MIN,label:o(s.DURATION_10_MIN)},{value:s.DURATION_1_HOUR,label:o(s.DURATION_1_HOUR)},{value:s.DURATION_1_DAY,label:o(s.DURATION_1_DAY)},{value:s.DURATION_1_WEEK,label:o(s.DURATION_1_WEEK)}],b=d.useCallback(async()=>{g(!0),console.log("GuildDisableCommunicationModal: Timing out user",{user:c,duration:o(u),reason:null!=h?h:"No reason provided",resolveFlag:v}),await new Promise(e=>setTimeout(e,1e3)),g(!1),a.onClose()},[u,h,v,a]);return(0,r.jsxs)("div",{style:{padding:"20px",maxWidth:"500px"},children:[(0,r.jsxs)(n,{variant:"heading-lg/semibold",className:"mb-2",children:["Disable Communication for ",c,"#","0001"]}),(0,r.jsx)(t,{variant:"text-sm/normal",className:"mb-4",color:"text-subtle",children:"This will temporarily disable the user's ability to communicate in this server."}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)(n,{variant:"heading-sm/semibold",className:"mb-2",children:"Duration"}),(0,r.jsx)(i,{children:f.map(t=>(0,r.jsx)(e,{variant:u===t.value?"primary":"secondary",size:"sm",text:t.label,onClick:()=>m(t.value)},t.value))})]}),(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsx)(n,{variant:"heading-sm/semibold",className:"mb-2",children:"Reason (Optional)"}),(0,r.jsx)("textarea",{value:h,onChange:e=>x(e.target.value),placeholder:"Enter reason for timeout...",style:{width:"100%",minHeight:"80px",padding:"8px",border:"1px solid var(--border-subtle)",borderRadius:"4px",backgroundColor:"var(--background-base-low)",color:"var(--text-strong)",resize:"vertical"}})]}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(l,{checked:v,onChange:j,label:"Resolve associated mod report"})}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[(0,r.jsx)(e,{variant:"secondary",text:"Cancel",onClick:a.onClose}),(0,r.jsx)(e,{variant:"primary",text:"Timeout User",onClick:b,disabled:p})]})]})}return e=>(0,r.jsx)(u,{...e})},GuildPowerupDeactivateModal:async()=>{let{Button:e,Text:t,Heading:n,Checkbox:l}=await Promise.all([a.e("304823"),a.e("977260")]).then(a.bind(a,397927)),i=await Promise.resolve().then(a.t.bind(a,582128,19)),s="Level 3 Server Boost",o=200,d=60,c=8;function u(a){let[u,m]=i.useState(!1),[h,x]=i.useState(!1),p=i.useCallback(async()=>{x(!0),console.log("GuildPowerupDeactivateModal: Deactivating powerup",{powerup:s,guildId:"123456789"}),await new Promise(e=>setTimeout(e,2e3)),x(!1),a.onClose()},[a]);return(0,r.jsxs)("div",{style:{padding:"20px",maxWidth:"500px"},children:[(0,r.jsxs)(n,{variant:"heading-lg/semibold",className:"mb-2",children:["Deactivate ",s]}),(0,r.jsxs)(t,{variant:"text-sm/normal",className:"mb-4",color:"text-subtle",children:["This will remove the ",s," from your server and disable all associated features."]}),(0,r.jsxs)("div",{className:"mb-4",style:{backgroundColor:"var(--background-base-lower)",padding:"16px",borderRadius:"8px",border:"1px solid var(--border-subtle)"},children:[(0,r.jsx)(n,{variant:"heading-sm/semibold",className:"mb-2",children:"Current Features"}),(0,r.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},children:[(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",children:["\u2022 ",o," emoji slots"]}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",children:["\u2022 ",d," sticker slots"]}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",children:["\u2022 ",c," sound slots"]}),(0,r.jsx)(t,{variant:"text-sm/normal",color:"text-subtle",children:"\u2022 Custom server banner"})]})]}),(0,r.jsxs)("div",{className:"mb-4",style:{backgroundColor:"var(--background-danger)",padding:"16px",borderRadius:"8px",border:"1px solid var(--border-feedback-critical)"},children:[(0,r.jsxs)(t,{variant:"eyebrow",color:"text-feedback-critical",className:"mb-2",children:[(0,r.jsx)("span",{role:"img","aria-label":"Warning",children:"\u26A0\uFE0F"})," ","Warning"]}),(0,r.jsx)(t,{variant:"text-sm/medium",color:"text-feedback-critical",children:"Deactivating this powerup will immediately remove all Level 3 features from your server. Members will lose access to custom emojis, stickers, and other premium features. This action cannot be undone."})]}),(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(l,{checked:u,onChange:m,label:"I understand that deactivating this powerup will remove all Level 3 features from my server",labelType:"secondary"})}),(0,r.jsxs)("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[(0,r.jsx)(e,{variant:"secondary",text:"Cancel",onClick:a.onClose}),(0,r.jsx)(e,{variant:"critical-primary",text:"Deactivate Level",onClick:p,disabled:!u,loading:h})]})]})}return e=>(0,r.jsx)(u,{...e})},DataHarvestModal:async()=>{let{default:e}=await a.e("292063").then(a.bind(a,970018));return t=>(0,r.jsx)(e,{modalProps:t,onConfirm:e=>{console.log("DataHarvestModal: Requesting data export for:",e),setTimeout(()=>{console.log("DataHarvestModal: Data export request submitted successfully")},1e3)}})},EnableCommunityModal:async()=>{let{default:e}=await Promise.all([a.e("443159"),a.e("82721"),a.e("452823"),a.e("674832")]).then(a.bind(a,709779));return t=>(0,r.jsx)(e,{...t,onClose:async()=>{console.log("EnableCommunityModal: Closed"),await t.onClose()}})},DeprivateModal:async()=>{let e=(await Promise.all([a.e("315273"),a.e("254857")]).then(a.bind(a,147696))).default;return t=>(0,r.jsx)(e,{...t,guildId:"123456789012345678",startingChannelId:"987654321098765432"})},CameraPreviewModal:async()=>{let{default:e}=await Promise.all([a.e("650100"),a.e("410534")]).then(a.bind(a,308229));return t=>(0,r.jsx)(e,{...t,videoEnabled:!1,onEnable:()=>console.log("Camera enabled")})},CameraPreviewModalWithVideo:async()=>{let{default:e}=await Promise.all([a.e("650100"),a.e("410534")]).then(a.bind(a,308229));return t=>(0,r.jsx)(e,{...t,videoEnabled:!0,onEnable:()=>console.log("Camera enabled")})},ModeratorReportResolveConfirmModal:async()=>{let{default:e}=await Promise.resolve().then(a.bind(a,390897));return t=>(0,r.jsx)(e,{...t,handleResolveFlag:()=>console.log("ModeratorReportResolveConfirmModal: Flag resolved")})},SelectFriendsModal:async()=>{let{default:e,SelectFriendsModalScreens:t}=await Promise.resolve().then(a.bind(a,212737));return a=>{let{onClose:n,...l}=a;return(0,r.jsx)(e,{onClose:async()=>{console.log("SelectFriendsModal: Closed"),await n()},startingScreen:t.SELECT_FRIENDS,...l})}},SelectFriendsModalReminder:async()=>{let{default:e,SelectFriendsModalScreens:t}=await Promise.resolve().then(a.bind(a,212737));return a=>{let{onClose:n,...l}=a;return(0,r.jsx)(e,{onClose:async()=>{console.log("SelectFriendsModalReminder: Closed"),await n()},startingScreen:t.REMINDER,...l})}},FavoritesGuildAddChannelModal:async()=>{let{default:e}=await Promise.all([a.e("721642"),a.e("130891"),a.e("267732"),a.e("850979"),a.e("236946"),a.e("692639"),a.e("890480"),a.e("440963"),a.e("766031"),a.e("394317"),a.e("79362"),a.e("276340")]).then(a.bind(a,826271));return t=>(0,r.jsx)(e,{...t,parentId:null,source:"devtools"})},ActivityShareMomentModal:async()=>{let{default:e}=await Promise.all([a.e("721642"),a.e("130891"),a.e("267732"),a.e("58243"),a.e("236946"),a.e("692639"),a.e("890480"),a.e("440963"),a.e("766031"),a.e("394317"),a.e("521743")]).then(a.bind(a,190930));return t=>(0,r.jsx)(e,{...t,applicationId:"123456789",mediaUrl:"https://picsum.photos/400/300.jpg"})},CallUserConfirmationModal:async()=>{let{default:e}=await a.e("19106").then(a.bind(a,502054));return t=>(0,r.jsx)(e,{...t,onSubmit:()=>{console.log("CallUserConfirmationModal: Call confirmed"),t.onClose()}})},OptInReorderAttemptModal:async()=>{let{default:e}=await Promise.all([a.e("57729"),a.e("697585"),a.e("24848")]).then(a.bind(a,354643));return t=>(0,r.jsx)(e,{...t,onClose:()=>(console.log("OptInReorderAttemptModal: Modal closed"),t.onClose())})},GuildAntiRaidReportModal:async()=>{let{default:e}=await Promise.all([a.e("273669"),a.e("364499")]).then(a.bind(a,296222));return t=>(0,r.jsx)(e,{...t,guildId:"123456789",onClose:()=>(console.log("GuildAntiRaidReportModal: Modal closed"),t.onClose())})},ConsentCheckBoxModal:async()=>{let{ConfirmModal:e}=await a.e("304823").then(a.bind(a,158954)),{Text:t,Heading:n}=await Promise.all([a.e("304823"),a.e("977260")]).then(a.bind(a,397927)),l=await Promise.resolve().then(a.t.bind(a,582128,19));function i(a){let[i,s]=l.useState(!1),[o,d]=l.useState(!1);return(0,r.jsx)(e,{...a,title:"Consent CheckBox Examples",confirmText:"Close",cancelText:"",onConfirm:()=>(console.log("ConsentCheckBoxModal: Modal closed"),a.onClose()),onCancel:()=>{},children:(0,r.jsxs)("div",{style:{padding:"20px",display:"flex",flexDirection:"column",gap:"20px"},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(n,{variant:"heading-md/semibold",style:{marginBottom:"12px"},children:"Terms of Service Consent"}),(0,r.jsx)(r3.S,{label:"I agree to Discord's Terms of Service and Privacy Policy",checked:i,onChange:e=>s(e),labelType:"secondary"}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",style:{marginTop:"8px"},children:["Consent status: ",i?"Agreed":"Not agreed"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(n,{variant:"heading-md/semibold",style:{marginBottom:"12px"},children:"Promotional Email Consent"}),(0,r.jsx)(r3.S,{label:"I would like to receive promotional emails from Discord about new features, events, and other updates.",checked:o,onChange:e=>d(e),labelType:"secondary"}),(0,r.jsxs)(t,{variant:"text-sm/normal",color:"text-subtle",style:{marginTop:"8px"},children:["Promo consent status: ",o?"Opted in":"Not opted in"]})]})]})})}return i.displayName="ConsentCheckBoxModalContent",e=>(0,r.jsx)(i,{...e})},GuildRaidLockdownFeedbackModal:async()=>{let{default:e}=await Promise.all([a.e("660608"),a.e("346313")]).then(a.bind(a,336496));return t=>(0,r.jsx)(e,{...t,guildId:"123456789",onClose:()=>(console.log("GuildRaidLockdownFeedbackModal: Modal closed"),t.onClose())})},GuildVerificationLevelModal:async()=>{let{default:e}=await Promise.all([a.e("955424"),a.e("623386"),a.e("78618"),a.e("149409"),a.e("970232")]).then(a.bind(a,313003)),{dangerouslyConstructGuildRecordFromUntypedObject:t}=await Promise.resolve().then(a.bind(a,149790)),n=t({id:"123456789",name:"Test Server",description:"A test server for development",ownerId:"987654321",icon:null,splash:null,banner:null,homeHeader:null,features:[],preferredLocale:"en-US",afkChannelId:null,afkTimeout:300,systemChannelId:null,verificationLevel:2,joinedAt:new Date,defaultMessageNotifications:0,mfaLevel:0,application_id:null,explicitContentFilter:0,vanityURLCode:null,premiumTier:0,premiumSubscriberCount:0,premiumProgressBarEnabled:!1,systemChannelFlags:0,discoverySplash:null,rulesChannelId:null,safetyAlertsChannelId:null,publicUpdatesChannelId:null,maxStageVideoChannelUsers:10,maxVideoChannelUsers:25,maxMembers:5e5,nsfwLevel:0,ownerConfiguredContentLevel:null,hubType:null,latestOnboardingQuestionId:null,profile:null,premiumFeatures:null,moderatorReporting:null});return t=>(0,r.jsx)(e,{...t,guild:n})},GuildVerificationLevelModalCommunity:async()=>{let{default:e}=await Promise.all([a.e("955424"),a.e("623386"),a.e("78618"),a.e("149409"),a.e("970232")]).then(a.bind(a,313003)),{dangerouslyConstructGuildRecordFromUntypedObject:t}=await Promise.resolve().then(a.bind(a,149790)),{GuildFeatures:n}=await Promise.resolve().then(a.bind(a,652215)),l=t({id:"123456789",name:"Test Community Server",description:"A test community server for development",ownerId:"987654321",icon:null,splash:null,banner:null,homeHeader:null,features:[n.COMMUNITY],preferredLocale:"en-US",afkChannelId:null,afkTimeout:300,systemChannelId:null,verificationLevel:3,joinedAt:new Date,defaultMessageNotifications:0,mfaLevel:0,application_id:null,explicitContentFilter:0,vanityURLCode:null,premiumTier:0,premiumSubscriberCount:0,premiumProgressBarEnabled:!1,systemChannelFlags:0,discoverySplash:null,rulesChannelId:null,safetyAlertsChannelId:null,publicUpdatesChannelId:null,maxStageVideoChannelUsers:10,maxVideoChannelUsers:25,maxMembers:5e5,nsfwLevel:0,ownerConfiguredContentLevel:null,hubType:null,latestOnboardingQuestionId:null,profile:null,premiumFeatures:null,moderatorReporting:null});return t=>(0,r.jsx)(e,{...t,guild:l})},EmojiAddModal:async()=>{let{EmojiAddModal:e}=await Promise.all([a.e("225560"),a.e("990410")]).then(a.bind(a,126033));return t=>(0,r.jsx)(e,{...t,guildId:"123456789",initialTierEmojiIds:new Set(["emoji1"]),onSubmit:e=>{console.log("EmojiAddModal: Selected emojis:",Array.from(e))},transitionToManageEmoji:()=>{console.log("EmojiAddModal: Transition to manage emoji clicked")},onClose:()=>(console.log("EmojiAddModal: Modal closed"),t.onClose())})},StreamFullModal:async()=>{let{default:e}=await a.e("425894").then(a.bind(a,166789));return t=>(0,r.jsx)(e,{...t})},VoiceCallFeedback:async()=>{let{default:e}=await Promise.all([a.e("312513"),a.e("36395"),a.e("155925"),a.e("137381"),a.e("847004"),a.e("313937"),a.e("431389")]).then(a.bind(a,492)),t={channel_id:"123456789",channel_type:er.rbe.GUILD_VOICE,guild_id:"987654321",rtc_connection_id:"devtools-rtc-connection",duration:6e4,voice_state_count:2,video_stream_count:0,video_enabled:!1,media_session_id:"devtools-media-session",duration_muted_ms:0,output_audio_route_type:null};return a=>(0,r.jsx)(e,{...a,analyticsData:t})},StreamFeedback:async()=>{let{default:e}=await Promise.all([a.e("312513"),a.e("36395"),a.e("155925"),a.e("137381"),a.e("847004"),a.e("313937"),a.e("617171"),a.e("862767")]).then(a.bind(a,218738)),t={ownerId:"987654321",guildId:"123456789",channelId:"123456789",streamType:r9.U4.GUILD},n={id:"123456789",name:"Test Game"},l={rtc_connection_id:"devtools-rtc-connection",media_session_id:"devtools-media-session",duration:6e4,stream_region:"us-west",max_viewers:3,avg_bitrate:2500,avg_fps:60,avg_resolution:1080,inbound_bitrate_estimate_percentile99:3e3,parent_media_session_id:null};return a=>(0,r.jsx)(e,{...a,isStreamer:!1,stream:t,streamApplication:n,analyticsData:l})},FamilyCenterAcceptLinkModal:async()=>{let e=en.default.getUser("12345"),t=en.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("916131"),a.e("155738"),a.e("331385")]).then(a.bind(a,58144));return a=>(0,r.jsx)(n,{...a,currentUser:t,otherUser:e})},FamilyCenterDeclineLinkModal:async()=>{let e=en.default.getUser("12345"),t=en.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("916131"),a.e("155738"),a.e("384811")]).then(a.bind(a,389094));return a=>(0,r.jsx)(n,{...a,currentUser:t,otherUser:e})},FamilyCenterCancelLinkModal:async()=>{let e=en.default.getUser("12345"),t=en.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("916131"),a.e("155738"),a.e("817219")]).then(a.bind(a,187278));return a=>(0,r.jsx)(n,{...a,currentUser:e,otherUser:t})},FamilyCenterDisconnectLinkModal:async()=>{let e=en.default.getUser("12345"),t=en.default.getUser("67890");if(void 0===e||void 0===t)return()=>null;let{default:n}=await Promise.all([a.e("321855"),a.e("943139")]).then(a.bind(a,179950));return a=>(0,r.jsx)(n,{...a,currentUser:e,otherUser:t})},FamilyCenterQRCodeModal:async()=>{let{default:e}=await Promise.all([a.e("683023"),a.e("272875")]).then(a.bind(a,320742));return t=>(0,r.jsx)(e,{...t})},PremiumGroupFriendsSelectorModal:async()=>{let{default:e}=await Promise.all([a.e("634508"),a.e("485579")]).then(a.bind(a,785606)),t=r5.A.getPremiumGroupSubscription();return null==t?()=>null:a=>(0,r.jsx)(e,{...a,subscription:t})},PremiumGroupAcceptInviteModal:async()=>{let{default:e}=await Promise.all([a.e("56498"),a.e("399910")]).then(a.bind(a,826181));return t=>(0,r.jsx)(e,{...t,premiumGroupSubscriptionId:"1234567890",premiumGroupInviteId:"1234567890",isExistingSub:!1,premiumGroupPrimaryName:"Test User"})},QuarantineModeInfoModal:async()=>{let{default:e}=await a.e("474575").then(a.bind(a,218642));return t=>(0,r.jsx)(e,{...t})},CaptchaTestModal:async()=>{let{default:e}=await a.e("417724").then(a.bind(a,563255));return t=>(0,r.jsx)(e,{...t})},PasswordConfirm:async()=>{let{default:e}=await Promise.resolve().then(a.bind(a,662758));return t=>(0,r.jsx)(e,{...t,title:"Confirm Password",actionText:"Submit",handleSubmit:async e=>{console.log("PasswordConfirm: Password submitted:",e),await new Promise(e=>setTimeout(e,1e3))}})},BlockedDomainModal:async()=>{let{default:e}=await Promise.all([a.e("364956"),a.e("420577"),a.e("335681"),a.e("520723")]).then(a.bind(a,667934));return t=>(0,r.jsx)(e,{...t,url:"https://example-phishing-site.com/malicious-page"})},DmSettingsUpsellModal:async()=>{let{default:e}=await Promise.all([a.e("494150"),a.e("962684")]).then(a.bind(a,228855)),t=Object.keys(nn.A.getGuilds())[0];return a=>(0,r.jsx)(e,{...a,guildId:t})},UrgentMessageModal:async()=>{let{default:e}=await Promise.all([a.e("689913"),a.e("136724")]).then(a.bind(a,531519));return t=>(0,r.jsx)(e,{...t})},UserAgreementsModal:async()=>{let{default:e}=await Promise.all([a.e("50726"),a.e("482911"),a.e("922220")]).then(a.bind(a,639719));return t=>(0,r.jsx)(e,{...t})},DisableRiskyPermsModal:async()=>{let{default:e}=await Promise.all([a.e("796057"),a.e("452823"),a.e("971905")]).then(a.bind(a,868952)),t=Object.values(nn.A.getGuilds())[0];return null==t?()=>null:a=>(0,r.jsx)(e,{...a,guild:t})},OtherFriendRequestsModal:async()=>{let{default:e}=await Promise.all([a.e("827776"),a.e("979862"),a.e("791370"),a.e("548018"),a.e("773152"),a.e("625281")]).then(a.bind(a,516259));return t=>(0,r.jsx)(e,{...t})},AcceptInviteModal:async()=>{let{default:e}=await Promise.all([a.e("444038"),a.e("807432"),a.e("601495"),a.e("807265"),a.e("581079"),a.e("901352"),a.e("579023"),a.e("248672")]).then(a.bind(a,777307));return t=>(0,r.jsx)(e,{...t})},PremiumGroupSubscribeModal:async()=>{let{default:e}=await Promise.all([a.e("499709"),a.e("569595")]).then(a.bind(a,526710));return t=>(0,r.jsx)(e,{...t})},NewUserOnboarding:async()=>{let{default:e}=await Promise.all([a.e("140606"),a.e("122326"),a.e("533651"),a.e("260634"),a.e("194399"),a.e("419580"),a.e("82721"),a.e("197804"),a.e("756856"),a.e("319623"),a.e("999574"),a.e("457794"),a.e("578963")]).then(a.bind(a,427294));return t=>(0,r.jsx)(e,{...t})}};function oe(){let e=o.useMemo(()=>Object.keys(r7).map(e=>({label:e,value:e,id:e})).sort((e,t)=>e.label.localeCompare(t.label)),[]),[t,a]=o.useState(null);return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)("div",{className:iE.l$,children:[(0,r.jsx)("section",{className:iE.uW,children:(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"end",children:[(0,r.jsx)(as.Z,{label:"Open a Modal",placeholder:"Select a modal",options:e,value:t,onSelectionChange:a,selectionMode:"single"}),(0,r.jsx)(x.$,{variant:"primary",text:"Open",disabled:null==t,onClick:()=>null!=t&&(0,eV.openModalLazy)(r7[t])})]})}),(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Wow moment"}),(0,r.jsx)("div",{className:iE.bd,children:(0,r.jsx)(x.$,{variant:"primary",text:"Open",onClick:function(){(0,r6.o)(!0),r8._.dispatch(er.jej.PREMIUM_SUBSCRIPTION_CREATED)}})})]})]})})}var ot=a(933832),oa=a(472229),on=a(10392),ol=a(669316),oi=a(959165),os=a(354670),or=a(158045);async function oo(){try{let{body:e}=await lW.Bo.get({url:er.Rsh.USER_OFFER_IDS,rejectWithError:!0});return e}catch(e){return[]}}async function od(){try{let{body:e}=await lW.Bo.get({url:er.Rsh.USER_OFFERS,rejectWithError:!0});return{trial:e.trial.map(oi.A.createFromServer),discount:e.discount.map(ol.A.createFromServer)}}catch(e){return{trial:[],discount:[]}}}async function oc(e,t){try{await lW.Bo.post({url:er.Rsh.CREATE_USER_OFFER(e,t),rejectWithError:!0})}catch{}finally{await (0,on._D)()}}async function ou(e,t){try{await lW.Bo.del({url:er.Rsh.UPDATE_USER_OFFER(e,t),rejectWithError:!0})}catch{}finally{await (0,on._D)()}}async function om(){try{await lW.Bo.del({url:er.Rsh.USER_OFFERS,rejectWithError:!0})}catch{}finally{await os.A.forceReset(),await (0,on._D)()}}async function oh(e){await lW.Bo.post({url:er.Rsh.CREATE_REVERSE_TRIAL,body:{ends_at:e},rejectWithError:!0})}function ox(e){let{acked:t,expired:a,inStore:n,onClick:l,secondaryBadge:i}=e,s="Created";return a?s="Expired":t?s="Acked":n&&(s="Active"),(0,r.jsxs)("div",{className:iE.fC,children:[(0,r.jsx)($.D,{onClick:l,className:F()(iE.qS,iE.vk,{[iE.vu]:n,[iE.R1]:t,[iE._7]:a}),children:(0,r.jsxs)(p.E,{variant:"eyebrow",color:t?void 0:"text-overlay-light",children:[s,n?" *":""]})}),null!=i&&i.active&&(0,r.jsx)("div",{className:F()(iE.qS,iE.k3),children:(0,r.jsx)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:i.label})})]})}function op(e){let{offer:t,offerOptions:a,forceRefetch:n,inStore:l=!1}=e,[i,s]=o.useState(!1),[d,c]=o.useState(!1),[u,m]=o.useState(!1),[h,x]=o.useState(!1);o.useEffect(()=>{u&&x(!0);let e=setTimeout(()=>{x(!1)},500);return()=>{clearTimeout(e)}},[u]);let{id:g,expiresAt:v,trialId:j,subscriptionTrial:f,referrer:b}=t,y=a.find(e=>{let{value:t}=e;return t===j})?.label??"Unknown";null!=b&&(y=`${y} from @${b.username}`);let E=null!=v,_=t.hasExpired,C=t.isRedeemed,S=f?.skuId===tD.pe.TIER_0;async function N(){m(!0),E?await A({expiresAt:null}):await (0,on.u1)(t),n(),m(!1)}async function A(e){m(!0);try{await lW.Bo.patch({url:er.Rsh.UPDATE_USER_OFFER(g,"trial"),body:{..."expiresAt"in e&&{expires_at:e.expiresAt},..."referrerId"in e&&{referrer_id:e.referrerId}},rejectWithError:!0})}finally{n(),m(!1)}}return o.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!1)},3e3);return()=>{clearTimeout(e)}}if(d){let e=setTimeout(()=>{c(!1)},3e3);return()=>{clearTimeout(e)}}},[i,d]),(0,r.jsxs)("div",{className:F()(iE.Nr,S?iE.Qf:iE.C1),children:[(0,r.jsx)("div",{className:F()(iE.nM,iE.S7),children:(0,r.jsx)(H.D,{variant:"heading-lg/semibold",color:"text-overlay-light",children:y})}),(0,r.jsxs)($.D,{className:F()(iE.nM,iE.QB),onClick:()=>{(0,nI.C)(g,()=>s(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Offer: ",g]}),i?(0,r.jsx)(ot.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:iE.Kk}):(0,r.jsx)(ny.CopyIcon,{size:"xs",color:"currentColor",className:iE.Kk})]}),(0,r.jsxs)($.D,{className:F()(iE.nM,iE.QB),onClick:()=>{(0,nI.C)(j,()=>c(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Trial: ",j]}),d?(0,r.jsx)(ot.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:iE.Kk}):(0,r.jsx)(ny.CopyIcon,{size:"xs",color:"currentColor",className:iE.Kk})]}),(0,r.jsx)("div",{className:iE.nM,children:(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Trial Length:"," ",(0,or.re)({intervalType:f?.interval??tD.WT.MONTH,intervalCount:f?.intervalCount??1,capitalize:!1})]})}),(0,r.jsxs)("div",{className:iE.nM,children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Expires (",(0,oa.A)(),"):"]}),(0,r.jsx)("input",{type:"datetime-local",value:(0,nD.Xm)(v?.toISOString()),onChange:e=>{A({expiresAt:""!==e.target.value?new Date(e.target.value).toISOString():null})}})]}),(0,r.jsxs)("div",{className:iE.nM,children:[(0,r.jsx)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:"Referrer ID:"}),(0,r.jsx)("input",{type:"text",value:b?.id??"",onChange:e=>A({referrerId:e.target.value})})]}),(0,r.jsx)(ox,{acked:E,expired:_,inStore:l,onClick:N,secondaryBadge:{active:C,label:"Redeemed"}}),(0,r.jsx)($.D,{onClick:async()=>{m(!0),await ou(g,"trial"),n(),m(!1)},children:(0,r.jsx)(nC.TrashIcon,{size:"md",color:"currentColor",className:F()(iE.Kk,iE.IT)})}),(0,r.jsx)("div",{className:F()(iE.g4,{[iE.VP]:u||h}),children:(0,r.jsx)(tl.y,{})})]})}function og(e){let{offer:t,offerOptions:a,forceRefetch:n,inStore:l=!1}=e,[i,s]=o.useState(!1),[d,c]=o.useState(!1),[u,m]=o.useState(!1),[h,x]=o.useState(!1);o.useEffect(()=>{u&&x(!0);let e=setTimeout(()=>{x(!1)},500);return()=>{clearTimeout(e)}},[u]);let{id:g,expiresAt:v,discountId:j,discount:f}=t,b=a.find(e=>{let{value:t}=e;return t===j})?.label??"Unknown",y=null!=v,E=t.hasExpired(),_=t.isApplied();async function C(){m(!0),y?await S({expiresAt:null}):await (0,on.u1)(void 0,t),n(),m(!1)}async function S(e){let{expiresAt:t}=e;m(!0);try{await lW.Bo.patch({url:er.Rsh.UPDATE_USER_OFFER(g,"discount"),body:{expires_at:t},rejectWithError:!0})}finally{n(),m(!1)}}return o.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!1)},3e3);return()=>{clearTimeout(e)}}if(d){let e=setTimeout(()=>{c(!1)},3e3);return()=>{clearTimeout(e)}}},[i,d]),(0,r.jsxs)("div",{className:F()(iE.Nr,iE.id),children:[(0,r.jsx)("div",{className:F()(iE.nM,iE.S7),children:(0,r.jsx)(H.D,{variant:"heading-lg/semibold",color:"text-default",children:b})}),(0,r.jsxs)($.D,{className:F()(iE.nM,iE.QB),onClick:()=>{(0,nI.C)(g,()=>s(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-default",children:["Offer: ",g]}),i?(0,r.jsx)(ot.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:F()(iE.Kk,iE.mK)}):(0,r.jsx)(ny.CopyIcon,{size:"xs",color:"currentColor",className:iE.Kk})]}),(0,r.jsxs)($.D,{className:F()(iE.nM,iE.QB),onClick:()=>{(0,nI.C)(j,()=>c(!0))},children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-default",children:["Discount: ",j]}),d?(0,r.jsx)(ot.CheckmarkLargeIcon,{size:"md",color:"currentColor",className:F()(iE.Kk,iE.mK)}):(0,r.jsx)(ny.CopyIcon,{size:"xs",color:"currentColor",className:iE.Kk})]}),f?.amount!=null&&(0,r.jsx)("div",{children:(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-default",children:[f.amount,"% off"]})}),(0,r.jsxs)("div",{className:iE.nM,children:[(0,r.jsxs)(p.E,{variant:"eyebrow",color:"text-overlay-light",children:["Expires (",(0,oa.A)(),"):"]}),(0,r.jsx)("input",{type:"datetime-local",value:(0,nD.Xm)(v?.toISOString()),onChange:e=>S({expiresAt:""!==e.target.value?new Date(e.target.value).toISOString():null})})]}),(0,r.jsx)(ox,{acked:y,expired:E,inStore:l,onClick:C,secondaryBadge:{active:_,label:"Applied"}}),(0,r.jsx)($.D,{className:iE.aR,onClick:async()=>{m(!0),await ou(g,"discount"),n(),m(!1)},children:(0,r.jsx)(nC.TrashIcon,{size:"md",color:"currentColor",className:F()(iE.Kk,iE.fy)})}),(0,r.jsx)("div",{className:F()(iE.g4,{[iE.VP]:u||h}),children:(0,r.jsx)(tl.y,{})})]})}function ov(){let[e,t]=o.useState([]),[a,n]=o.useState([]),[l,i]=o.useState(),[s,c]=o.useState(),[u,m]=o.useState(!0),{discountOffers:h,trialOffers:v}=(0,d.cf)([os.A],()=>({discountOffers:Object.values(os.A.getState().userDiscountOffers).sort((e,t)=>e.id.localeCompare(t.id)),trialOffers:Object.values(os.A.getState().userTrialOffers).sort((e,t)=>e.id.localeCompare(t.id))})),[f,b]=o.useState([]),[y,E]=o.useState([]),[_,C]=o.useState(10080),[S,N]=o.useState([]),A=o.useMemo(()=>new Set([...v,...h].map(e=>e.id)),[v,h]),k=o.useMemo(()=>[...v,...f.filter(e=>!A.has(e.id))],[v,f,A]),I=o.useMemo(()=>[...h,...y.filter(e=>!A.has(e.id))],[h,y,A]),{entitlements:D,deleteFractionalPremium:T,refreshEntitlementList:O}=ib();async function R(){null!=l&&(await oc(l,"trial"),m(!0))}async function w(){null!=s&&(await oc(s,"discount"),m(!0))}async function M(){await om(),m(!0)}async function L(){let e=new Date(Date.now()+60*_*1e3).toISOString();await oh(e),O()}return o.useEffect(()=>{O()},[O]),o.useEffect(()=>{N(D.filter(e=>e.sourceType===er.GD.REVERSE_TRIAL&&null!=e.endsAt&&e.endsAt>new Date))},[D]),o.useEffect(()=>{(0===e.length||0===a.length||u)&&oo().then(e=>{let a=Object.keys(e.trial).map(t=>({label:t,value:e.trial[t]})),r=Object.keys(e.discount).map(t=>({label:t,value:e.discount[t]}));t(a),n(r),null==l&&i(a[0].value),null==s&&c(r[0].value)})},[e,a,l,s,u]),o.useEffect(()=>{u&&(m(!1),os.A.forceReset(),(0,on._D)(),od().then(e=>{b(e.trial.sort((e,t)=>e.id.localeCompare(t.id))),E(e.discount.sort((e,t)=>e.id.localeCompare(t.id)))}))},[u]),(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)("div",{className:iE.l$,children:[(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Utils"}),(0,r.jsxs)("div",{className:iE.Uo,children:[(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear all User Offers",onClick:M}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear Mobile Trials DismissibleContent",onClick:()=>(0,aj.xB)(av.M.PREMIUM_MOBILE_TRIAL_USER_SETTINGS_AVATAR_BADGE)}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Clear Offer Nagbar DismissibleContent",onClick:()=>(0,aj._N)(av.M.NAGBAR_NOTICE_OFFER_EXPIRING)}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Refresh DevTools",onClick:()=>m(!0)})]})]}),(0,r.jsx)("section",{className:iE.uW,children:(0,r.jsxs)("div",{className:iE.bd,children:[(0,r.jsx)(j.l,{label:"Create a Trial Offer",options:e,formatOption:e=>{let{label:t,value:a}=e;return{label:t,value:a,id:a}},value:l,placeholder:"Trial Type",onSelectionChange:i,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Create",onClick:R})]})}),(0,r.jsx)("section",{className:iE.uW,children:(0,r.jsxs)("div",{className:iE.bd,children:[(0,r.jsx)(j.l,{label:"Create a Discount Offer",options:a,formatOption:e=>{let{label:t,value:a}=e;return{label:t,value:a,id:a}},value:s,placeholder:"Discount Type",onSelectionChange:c,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Create",onClick:w})]})}),k.length>0&&(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Existing Trial Offers"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"* indicates the offer is currently in UserOfferStore."}),k.map(t=>(0,r.jsx)(op,{offer:t,offerOptions:e,forceRefetch:()=>m(!0),inStore:A.has(t.id)},t.id))]}),I.length>0&&(0,r.jsxs)("section",{className:iE.uW,children:[(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Existing Discount Offers"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"* indicates the offer is currently in UserOfferStore."}),I.map(e=>(0,r.jsx)(og,{offer:e,offerOptions:a,forceRefetch:()=>m(!0),inStore:A.has(e.id)},e.id))]}),(0,r.jsx)("section",{className:iE.uW,children:(0,r.jsxs)("div",{className:iE.bd,children:[(0,r.jsx)(j.l,{label:"Create a Reverse Trial Entitlement",options:[{id:"5min",label:"5 minutes",value:5},{id:"1hour",label:"1 hour",value:60},{id:"1day",label:"1 day",value:1440},{id:"1week",label:"1 week",value:10080}],value:_,placeholder:"Reverse Trial Length",onSelectionChange:C,selectionMode:"single",fullWidth:!0}),(0,r.jsx)(x.$,{variant:"primary",text:"Create",onClick:L})]})}),S.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)(p.E,{style:{marginTop:"15px"},variant:"text-md/bold",children:"Active reverse trial"}),(0,r.jsx)("div",{children:S.map(e=>(0,r.jsx)(iC,{entitlement:e,active:!0,onDelete:()=>T(e.id)},e.id))})]})]})})}var oj=a(866711),of=a(26279),ob=a(628577);let oy={[of.Re.UNSPECIFIED]:"Unspecified",[of.Re.DRAFT]:"Draft",[of.Re.SIGNED]:"Signed",[of.Re.DISCARDED]:"Discarded",[of.Re.SIGNING_IN_PROGRESS]:"Signing In Progress",[of.Re.SIGNING_FAILED]:"Signing Failed"},oE={[of.BM.UNSPECIFIED]:"Unspecified",[of.BM.ONE_TIME]:"One Time",[of.BM.SUBSCRIPTION]:"Subscription"};function o_(){let[e,t]=o.useState(null),[a,n]=o.useState(!0),[l,i]=o.useState(null),s=o.useCallback(async()=>{n(!0),i(null);try{let e=await lW.Bo.get({url:`${er.Rsh.ORDER_LIST}?limit=5`,rejectWithError:!0});t(e.body??[])}catch(e){i(e instanceof Error?e.message:"Failed to fetch orders")}finally{n(!1)}},[]);o.useEffect(()=>{s()},[s]);let[d,c]=o.useState(!1),[u,m]=o.useState(null),[h,v]=o.useState(()=>{let e=rH.Ay.getChannelId();return null!=e?e:""}),j=o.useCallback(async()=>{c(!0),m(null);try{let e=h.trim(),t=await lW.Bo.post({url:er.Rsh.DEBUG_TEMPORAL_INFRA_PROOF_OF_CONCEPT,body:""!==e?{channel_id:e}:{},rejectWithError:!0}),a=null!=t.body?t.body.run_id:"unknown";m(`Started workflow run ${a}`)}catch(e){m(e instanceof Error?e.message:"Failed to start workflow")}finally{c(!1)}},[h]);return(0,r.jsx)(g.Ip,{className:tH.nd,children:(0,r.jsxs)("div",{className:iE.l$,children:[(0,r.jsxs)("div",{className:iE.dL,style:{marginBottom:"16px"},children:[(0,r.jsxs)(p.E,{variant:"text-lg/bold",children:["Orders (last ",5,")"]}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Refresh",onClick:s,loading:a})]}),null!=l&&(0,r.jsx)(V.w,{type:"critical",children:l}),!a&&null!=e&&0===e.length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-muted",children:"No orders found."}),null!=e&&e.map(e=>(0,r.jsx)(oC,{order:e},e.id)),(0,r.jsxs)(W.B,{direction:"vertical",gap:8,style:{marginTop:"16px"},children:[(0,r.jsx)(f.k,{fullWidth:!0,value:h,onChange:v,placeholder:"Channel ID (blank to skip the message)"}),(0,r.jsx)(x.$,{variant:"primary",size:"sm",text:"Run Temporal Infra Proof of Concept",onClick:j,loading:d}),null!=u&&(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:u})]})]})})}function oC(e){let{order:t}=e,[a,n]=o.useState(!1),[l,i]=o.useState(!1),s=oy[t.status]??`Unknown (${t.status})`,d=[{id:"status",label:`Status: ${s}`,isDisabled:!1},{id:"revision",label:`Revision: ${t.revision}`,isDisabled:!1},{id:"created",label:`Created: ${new Date(t.created_at).toLocaleString()}`,isDisabled:!1}],c=o.useCallback(()=>{navigator.clipboard.writeText(t.id),i(!0),setTimeout(()=>i(!1),2e3)},[t.id]);return(0,r.jsxs)("div",{className:iE.Nr,children:[(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,align:"center",style:{marginBottom:"4px"},children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",children:t.id}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:l?"Copied!":"Copy ID",onClick:c})]}),(0,r.jsx)(oj.C,{items:d,label:"Order information",layout:"inline"}),(0,r.jsxs)(W.B,{direction:"vertical",gap:4,style:{marginTop:"8px"},children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Line Items"}),0===t.order_line_items.length?(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-muted",children:"No line items"}):t.order_line_items.map(e=>(0,r.jsxs)(W.B,{direction:"horizontal",gap:12,children:[(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["SKU: ",e.sku_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Qty: ",e.quantity]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Type: ",oE[e.purchase_type]??`Unknown (${e.purchase_type})`]}),null!=e.subscription_plan_id&&(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["Plan: ",e.subscription_plan_id]})]},e.id))]}),null!=t.billing_facet&&(0,r.jsxs)("div",{className:ob.VK,style:{marginTop:"8px"},children:[(0,r.jsxs)($.D,{onClick:()=>n(e=>!e),className:ob.Eh,children:[(0,r.jsx)(p.E,{variant:"text-sm/semibold",children:"Billing Facet"}),(0,r.jsx)(ih.A,{direction:a?ih.A.Directions.UP:ih.A.Directions.DOWN})]}),a&&(0,r.jsxs)("ul",{className:ob.j3,children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"payment_gateway"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:String(t.billing_facet.payment_gateway)})]}),null!=t.billing_facet.payment_source_id&&(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"payment_source_id"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.payment_source_id})]}),null!=t.billing_facet.currency&&(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"selected currency"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.currency})]}),null!=t.billing_facet.invoice_preview&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"currency"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.currency})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"subtotal"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.subtotal})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"tax"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.tax})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"total"}),(0,r.jsx)(p.E,{variant:"text-xs/normal",children:t.billing_facet.invoice_preview.total})]}),t.billing_facet.invoice_preview.line_items.length>0&&(0,r.jsxs)("li",{children:[(0,r.jsx)(p.E,{variant:"text-xs/semibold",children:"invoice line items"}),(0,r.jsx)(W.B,{direction:"vertical",gap:4,style:{marginTop:"4px"},children:t.billing_facet.invoice_preview.line_items.map(e=>(0,r.jsxs)(W.B,{direction:"horizontal",gap:12,children:[(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["ref: ",e.ref_order_line_item_id]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["unit: ",e.unit_price]}),(0,r.jsxs)(p.E,{variant:"text-xs/normal",children:["qty: ",e.quantity]})]},e.ref_order_line_item_id))})]})]})]})]})]})}var oS=a(935462),oN=a(103557),oA=a(93688),ok=a(717400),oI=a(676955),oD=a(31300),oT=a(500060),oO=a(391973),oR=a(684013),ow=a(765671),oM=a(235986),oL=a(742589),oP=a(41984),oU=a(181435),oG=a(435736),oB=a(296027),oF=a(515183),o$=a(489277),oV=a(127242),oW=a(869014),oz=a(528772),oH=a(38502),oK=a(532624),oY=a(773371),oq=a(927813),oJ=a(996439),oQ=a(350535),oX=a(9302),oZ=a(644434),o0=a(998798);let o1={[er.uss.CLICK_ZONE_DEBUG]:e=>({type:er.uss.CLICK_ZONE_DEBUG,id:(0,eI.A)(),layoutId:e,anchor:{top:.35,right:.35},size:{width:100,height:100},...oH.A.getWidgetDefaultSettings(er.uss.CLICK_ZONE_DEBUG),pinned:!0}),[er.uss.PERFORMANCE_DEBUG]:e=>({type:er.uss.PERFORMANCE_DEBUG,id:(0,eI.A)(),layoutId:e,anchor:{top:.1,right:.1},size:{fixed:!1,width:"auto",height:"auto"},...oH.A.getWidgetDefaultSettings(er.uss.PERFORMANCE_DEBUG),pinned:!0})},o2={};function o3(e){let{id:t}=e,[a,n]=o.useState(!1);return o.useEffect(()=>{let e;return a&&(e=setTimeout(()=>{n(!1)},1e3)),()=>{null!=e&&clearTimeout(e)}},[a]),(0,r.jsxs)(nb.$n,{look:nb.$n.Looks.LINK,color:nb.$n.Colors.LINK,size:nb.$n.Sizes.MIN,onClick:function(){(0,nI.C)(t,()=>n(!0))},className:o0.DT,children:["Game Id: ",t," ",a?ns.intl.string(ns.t.t5VZ88):null]})}let o6=o.memo(function(e){let{trackedGame:t}=e,a=(0,d.bG)([E.Ay],()=>E.Ay.getGameOrTransformedSubgameForPID(t.pid)),n=(0,d.bG)([S.A],()=>S.A.getGameForPID(t.pid)),{data:l}=(0,ad.I)(n?.id),i=(0,d.bG)([E.Ay],()=>null==a?null:E.Ay.getGameOverlayStatus(a));return(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-strong",children:t.gameName}),(0,r.jsx)(p.E,{variant:"text-sm/bold",color:"text-subtle",children:t.pid}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:a?.exeName}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["isLauncher: ",a?.isLauncher?"Yes":"No"]}),null!=t.gameId&&(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-strong",children:(0,r.jsx)(o3,{id:t.gameId})}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["fullscreenType: ",(0,oF.wR)(t.fullscreenType)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["state: ",t.state]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["successfullyShown: ",t.successfullyShown?"Yes":"No"]}),(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["source: ",t.source]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["legacyEnabled: ",t.legacyEnabled?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["oopEnabled: ",t.oopEnabled?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["overlayMethod: ",(0,oF.gK)(t.overlayMethod)]})]}),null!=i&&(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw source: ",i.source]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw enabledLegacy: ",i.enabledLegacy?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw enabledOOP: ",i.enabledOOP?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["raw overlayMethod: ",(0,oF.gK)(i.overlayMethod)]})]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["hidden: ",a?.hidden?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["hook: ",l?.hook?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["overlay: ",l?.overlay?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["overlayCompatibilityHook: ",l?.overlayCompatibilityHook?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-default",children:["supportsOutOfProcessOverlay: ",l?.supportsOutOfProcessOverlay?"Yes":"No"]})]})}),o5=o.memo(function(e){let{pid:t}=e,a=(0,d.cf)([oY.default],()=>oY.default.getOverlayPIDStatuses()),n=(0,d.cf)([oB.default],()=>oB.default.getTrackedGames()),l=(0,d.bG)([oY.default],()=>oY.default.isInputLocked(t),[t]),i=(0,d.bG)([oY.default],()=>oY.default.DEV_isInputLockedV3(t),[t]),s=(0,d.bG)([oY.default],()=>oY.default.DEV_isInputLocked(t),[t]),o=(0,d.bG)([oY.default],()=>oY.default.isReady(t),[t]);return(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsx)(p.E,{variant:"text-md/semibold",color:"text-strong",children:`${t}`}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["Screen Type Resolution: ",function(e){let t=n[e]?.timer;if(null==t||null==t.screenTypeResolutionTimestamp)return"...";let a=t.screenTypeResolutionTimestamp-t.startTrackingTimestamp;return`${a.toFixed(2)}ms`}(t)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["Window Creation: ",function(e){let t=n[e]?.timer;if(null==t||null==t.moduleTrackingTimestamp||null==t.screenTypeResolutionTimestamp)return"...";let a=t.moduleTrackingTimestamp-t.screenTypeResolutionTimestamp;return`${a.toFixed(2)}ms`}(t)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["Rendering: ",function(e){let t=n[e]?.timer;if(null==t||null==t.overlayRenderingTimestamp||null==t.moduleTrackingTimestamp)return"...";let a=t.overlayRenderingTimestamp-t.moduleTrackingTimestamp;return`${a.toFixed(2)}ms`}(t)]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["Bridge Status: ",a.get(Number(t))]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isInputLocked: ",l]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isInputLockedV3: ",i]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isInputLockedV2: ",s]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-strong",children:["isReady: ",o]})]})});function o8(e){var t;let a=(t=Object.values((0,d.yK)([oH.A],()=>oH.A.getWidgetsForLayout(oZ.G))),t.find(t=>t.type===e));return[a,function(){if(null!=a)(0,oO.uv)(a.id);else{let t=o1[e];if(null==t)return;let a=t(oZ.G);(0,oO.jn)(a)}}]}function o4(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?`${e.toFixed(2)}ms`:(0,nD.i$)(nf()(e),"h:mm:ss.SSS")}let o9=o.memo(function(e){let{pid:t,...a}=e,n=(0,d.bG)([oB.default],()=>{if(null==t)return"Unknown";let e=oB.default.getTrackedGameByPid(t)?.gameName;return null!=e?(o2[t]=e,e):o2[t]??"Unknown"},[t]);return(0,r.jsx)(p.E,{...a,variant:"text-md/semibold",color:"text-strong",children:n})});function o7(){let e=(0,d.bG)([oV.A],()=>oV.A.hasRenderDebugMode(oP.x7.TrackFocusPIDs)),t=(0,d.yK)([oB.default],()=>oB.default.getDevToolsFocusedPidsWithTimestamp());return(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsxs)("div",{className:o0.Iv,children:[(0,r.jsx)(m.d,{checked:e,onChange:()=>void oR.A.setRenderDebugMode(!oV.A.hasRenderDebugMode(oP.x7.TrackFocusPIDs),oP.x7.TrackFocusPIDs),label:"Track Focus Pids"}),(0,r.jsx)($.D,{className:o0.LL,onClick:()=>oR.A.clearTrackedPids(),children:(0,r.jsx)(nC.TrashIcon,{size:"md",color:"currentColor"})})]}),(0,r.jsxs)(g.Ip,{className:F()(o0.st,o0.XG),children:[0===t.length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No recent focused pids"}),[...t].reverse().map(e=>{let[t,a,n]=e;return(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(lX.m,{position:"left",text:n===oP.su.TRACK_FOCUS?"Tracked Focus Event":"Clear Focus Event",children:(0,r.jsx)("div",{children:(0,r.jsxs)(p.E,{variant:"text-sm/medium",color:n===oP.su.TRACK_FOCUS?"text-default":"text-feedback-critical",children:[(0,r.jsx)(o9,{pid:a,tag:"span"})," - ",a?.toString()??"null"," @ ",o4(t)]})})})},`${a}-${t}`)})]})]})}let de=o.memo(function(e){let{pid:t}=e,a=(0,d.bG)([oB.default,E.Ay],()=>{if(null==t)return null;let e=oB.default.getTrackedGameByPid(t)?.fullscreenType;if(null!=e)return e;let a=E.Ay.getGameOrTransformedSubgameForPID(t);return a?.fullscreenType??lB.aI.UNKNOWN},[t]);return(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",tag:"span",children:["Original Screen Type: ",null!=a?(0,oF.wR)(a):"Unknown"]})}),dt=o.memo(function(){let e=(0,d.cf)([oB.default],()=>oB.default.getTrackedGames()),[t,a]=o.useState({}),n=o.useRef(null);return o.useEffect(()=>(n.current=setInterval(async()=>{let e=E.Ay.getRunningGames(),t=[],n=Date.now();for(let a of e)t.push((0,oF.E1)(a.pid,0).then(e=>[a.pid,e,n]));let l=await Promise.all(t);a(e=>l.reduce((e,t)=>{let[a,n,l]=t;if(null==n||null==a)return e;let i=e[a]??[],s=i[i.length-1]?.screenType;return(0===i.length||s!==n)&&(e[a]=[...i,{pid:a,screenType:n,timestamp:l}]),e},{...e}))},+oq.A.Millis.SECOND),()=>clearInterval(n.current)),[]),(0,r.jsx)(lX.m,{position:"left",text:"The most recent screen types we've logged, indexed by pid",children:(0,r.jsx)("div",{children:(0,r.jsxs)(g.Ip,{className:F()(o0.st,o0.XG),children:[0===Object.keys(e).length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No recent screen types"}),Object.values(e).map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)(o9,{tag:"div",pid:e.pid}),(0,r.jsx)(de,{pid:e.pid}),null!=t[e.pid]&&[...t[e.pid]].reverse().map(t=>{let{screenType:a,timestamp:n}=t;return(0,r.jsx)(p.E,{variant:"text-xs/normal",color:"text-default",children:`${a}:${(0,oF.wR)(a)} @ ${o4(n)}`},`${e.pid}-${a}-${n}`)})]},e.pid))]})})})}),da=o.memo(function(){let e=(0,d.cf)([oB.default],()=>oB.default.getTrackedGames()),t=(0,oX.getPID)(),a=(0,d.bG)([oB.default],()=>oB.default.isOverlayOOPEnabledForPid(t),[t]),[n,l]=(0,d.yK)([oz.A],()=>[oz.A.enabled,oz.A.keepOpen]),i=(0,d.bG)([oY.default],()=>oY.default.getFocusedPID()),s=(0,d.bG)([oY.default],()=>oY.default.isFocusedPidOutOfProcess());return(0,r.jsxs)("div",{className:o0.st,children:[0===Object.keys(e).length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No tracked game times"}),Object.values(e).map(e=>(0,r.jsx)(o5,{pid:e.pid},e.pid)),(0,r.jsxs)("div",{children:[(0,r.jsxs)(p.E,{variant:"text-sm/medium",color:"text-strong",children:["focusedPID: ",i?.toString()??"null"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["isFocusedPidOutOfProcess: ",s?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/medium",color:"text-strong",children:["processPid: ",t?.toString()??"unknown"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["isOOPEnabledForPid: ",a?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["SoundboardOverlay.enabled: ",n?"Yes":"No"]}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["SoundboardOverlay.keepOpen: ",l?"Yes":"No"]})]})]})}),dn=[{mode:oP.x7.ClickZones,label:"Click Zone Debug Mode",tooltip:"Enables a red border around click zones to help with debugging."},{mode:oP.x7.WidgetAreas,label:"Render Debug Mode",tooltip:"Enables a border around any widgets that are rendered on screen that are pinned (even if they are hidden). Blue = pinned widgets, Gray = unpinned widgets"},{mode:oP.x7.WindowContainer,label:"Window Container Debug Mode",tooltip:"Enables a border the overlay window"},{mode:oP.x7.DisabledGPUBoost,label:"Disable GPU Boost",tooltip:"Disables GPU Boost, which can help with performance when games compete for GPU resources."},{mode:oP.x7.ForceGPUBoost,label:"Force GPU Boost",tooltip:"Forces GPU Boost, which can help with performance when games compete for GPU resources."},{mode:oP.x7.OverlayRafManagerForceEnabled,label:"Overlay SmartRAF",tooltip:"Creates a widget that has a clickzone inside of it, which will show/hide every few seconds."},{mode:oP.x7.LegacyOverlayLogging,label:"Legacy Overlay Logging",tooltip:"Enables legacy overlay logging, which will forward all legacy logging to the main apps console."}],dl=o.memo(function(){let[e,t]=o8(er.uss.CLICK_ZONE_DEBUG),[a,n]=o8(er.uss.PERFORMANCE_DEBUG),l=(0,d.bG)([oV.A],()=>oV.A.getRenderDebugModes()),[i,s]=o.useState({});return o.useEffect(()=>{let e=setInterval(()=>{s({})},200);return()=>clearInterval(e)},[]),(0,r.jsx)("div",{className:o0.st,children:dn.map(i=>{let s=i.mode===oP.x7.OverlayRafManagerForceEnabled?`${i.label} (${oW.A.getLastRAFCallbackReason()})`:i.label;function d(){return i.mode===oP.x7.ClickZones?null!=e:i.mode===oP.x7.WidgetAreas?null!=a:l.has(i.mode)}return(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(m.d,{checked:d(),onChange:function(){var e;let a=d();i.mode===oP.x7.ClickZones&&t(),i.mode===oP.x7.WidgetAreas&&n(),e=i.mode,oR.A.setRenderDebugMode(!a,e)},label:s,description:i.tooltip})},i.mode)})})}),di=o.memo(function(){let e=(0,d.cf)([oB.default],()=>oB.default.getTrackedGames()),t=(0,d.bG)([E.Ay],()=>E.Ay.getRunningGames()).filter(t=>null==e[t.pid]);return(0,r.jsxs)(r.Fragment,{children:[t.length>0&&(0,r.jsx)(lX.m,{position:"left",text:"Games that are running but not tracked by the overlay",children:(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-feedback-critical",children:"Untracked Running Games"}),t.map(e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-feedback-critical",children:`${e.pid} - ${e.name} (${e.exeName})`},e.pid),(0,r.jsx)(de,{pid:e.pid})]}))]})})}),(0,r.jsx)(lX.m,{position:"left",text:"The current running games process information",children:(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:o0.st,children:[0===Object.keys(e).length&&(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-default",children:"No running games"}),Object.values(e).map(e=>(0,r.jsx)(o6,{trackedGame:e},e.pid))]})})})]})}),ds=o.memo(function(){let e=(0,d.bG)([oB.default],()=>oB.default.getForcedRenderMode()),[t,a]=o.useState(e),n=[{label:oP.V6.UNSET,value:oP.V6.UNSET,id:oP.V6.UNSET},{label:oP.V6.IN_PROCESS_V2,value:oP.V6.IN_PROCESS_V2,id:oP.V6.IN_PROCESS_V2},{label:oP.V6.OUT_OF_PROCESS_V3,value:oP.V6.OUT_OF_PROCESS_V3,id:oP.V6.OUT_OF_PROCESS_V3},{label:oP.V6.OUT_OF_PROCESS_V3_LIMITED_INTERACTION,value:oP.V6.OUT_OF_PROCESS_V3_LIMITED_INTERACTION,id:oP.V6.OUT_OF_PROCESS_V3_LIMITED_INTERACTION}].map(t=>({...t,label:`${t.label} ${e===t.value?"(current)":""}`}));return(0,r.jsx)(j.l,{label:"Override the overlay render mode",value:t,options:n,onSelectionChange:function(e){a(e),oR.A.forceRenderMode(e)},selectionMode:"single",fullWidth:!0})});function dr(e){let{modalProps:t,onClose:a}=e,[n,l]=o.useState(null);function i(){a(null)}return(0,r.jsxs)(oS.EO,{size:oS.rI.LARGE,"aria-label":"Breadcrumb Import",...t,transitionState:t.transitionState,parentComponent:"BreadcrumbImportPanel",children:[(0,r.jsxs)(oS.rQ,{align:oM.A.Align.CENTER,justify:oM.A.Justify.BETWEEN,children:[(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-feedback-critical",children:"Breadcrumb Import"}),(0,r.jsx)(oS.s_,{onClick:i})]}),(0,r.jsx)(oS.$m,{children:(0,r.jsx)("div",{className:o0.st,children:(0,r.jsx)(oN.f,{label:"Paste JSON Here",onChange:l,value:n??"",rows:12})})}),(0,r.jsx)(oS.jl,{children:(0,r.jsxs)(a5.e,{direction:"horizontal-reverse",children:[(0,r.jsx)(x.$,{variant:"primary",text:"Import",onClick:function(){a(n)}}),(0,r.jsx)(x.$,{variant:"secondary",text:"Clear",onClick:i})]})})]})}let dd={native:{label:"Native",filter:e=>e.type===oU.ON.NativeLegacy||e.type===oU.ON.NativeOOP},render:{label:"Render",filter:e=>e.type===oU.ON.Renderer},flux:{label:"Flux",filter:e=>e.type===oU.ON.Flux},client:{label:"Client",filter:e=>e.type===oU.ON.OOPModule||e.type===oU.ON.LegacyModule}};function dc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oU.QJ.Info;if(t===oU.QJ.Error)return"var(--text-feedback-critical)";switch(e){case oU.ON.NativeLegacy:return"var(--yellow-500)";case oU.ON.NativeOOP:return"var(--green-500)";case oU.ON.Flux:return"var(--brand-400)";case oU.ON.Renderer:return"var(--brand-500)";case oU.ON.LegacyModule:return"var(--yellow-300)";case oU.ON.OOPModule:return"var(--green-300)";default:return"var(--gray-400)"}}let du=[{key:"type",cellClassName:o0.SZ,renderHeader:()=>null,render(e){let{type:t,logType:a}=e,n=dm(t);return(0,r.jsx)("div",{className:o0.g$,style:{color:dc(t,a)},children:(0,r.jsx)(n,{color:"currentColor",size:"sm"})})}},{key:"Name",cellClassName:o0.Cm,render(e){let{name:t,type:a,logType:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.E,{variant:"text-md/normal",color:function(e){switch(e){case oU.QJ.Info:return"text-strong";case oU.QJ.Warning:return"text-feedback-warning";case oU.QJ.Error:return"text-feedback-critical";default:return"text-subtle"}}(n),children:t}),(0,r.jsxs)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:["(",a,")"]})]})}},{key:"Timestamp",cellClassName:o0.DK,render(e){let{timestamp:t}=e;return(0,nD.i$)(nf()(t),"h:mm:ss.SSS")}}];function dm(e){switch(e){case oU.ON.NativeLegacy:return oA.W;case oU.ON.NativeOOP:return ok.q;case oU.ON.Renderer:case oU.ON.Flux:return oI.v;case oU.ON.LegacyModule:return oD.k;case oU.ON.OOPModule:return oT.o;default:return oD.k}}function dh(e){return JSON.stringify(e,(e,t)=>void 0===t?null:t,2)}let dx=["__webpack_require__","fn"],dp=["web.js","web.js.map"],dg=[{id:"details",name:"Details",group:a6.fu.NONE,render:e=>{let{breadcrumb:t,onClose:a}=e,{name:n,type:l,logType:i,nativeId:s,stack:o,data:d,timestamp:c,pid:u}=t,m=nf()(c),h=dm(l);return(0,r.jsxs)(g.Ar,{className:o0.bW,children:[(0,r.jsxs)(oL.A,{className:F()(tH.jr,o0.nZ),children:[(0,r.jsx)("div",{style:{color:dc(l,i)},className:o0.nr,children:(0,r.jsx)(h,{color:"currentColor",size:"sm"})}),(0,r.jsxs)(oL.A.Title,{wrapperClassName:o0.qd,children:[n," (",l,")",(0,r.jsx)($.D,{tag:"span",className:o0.KE,onClick:()=>(0,nI.C)(n),children:(0,r.jsx)(ny.CopyIcon,{color:"currentColor",size:"sm"})})]}),(0,r.jsx)(oL.A.Icon,{icon:ny.CopyIcon,tooltip:"Copy all properties",onClick:()=>{(0,nI.C)(dh(t))}}),(0,r.jsx)(oL.A.Icon,{icon:n_.a,tooltip:"Close",onClick:a})]}),(0,r.jsxs)(nF,{className:o0.ZK,children:[(0,r.jsx)(n$,{name:"Timestamp",copyValue:m.toISOString(),children:(0,r.jsx)("time",{dateTime:m.toISOString(),title:(0,nD.i$)(m,"LLLL"),children:(0,nD.i$)(m,"L h:mm:ss.SSS")})}),(0,r.jsx)(n$,{name:"Log Type",copyValue:i,children:(0,r.jsx)("code",{children:i})}),(0,r.jsx)(n$,{name:"PID",copyValue:u?.toString()??"null",children:(0,r.jsx)("code",{children:u?.toString()??"null"})}),(0,r.jsx)(n$,{name:"Native ID",copyValue:s?.toString()??"null",children:(0,r.jsx)("code",{children:s?.toString()??"null"})}),(0,r.jsx)(n$,{name:"Data",copyValue:dh(d),children:(0,r.jsx)("code",{children:dh(d)})}),null!=o&&(0,r.jsx)(n$,{name:"Stack Trace",copyValue:o,children:(0,r.jsx)("code",{children:o.split("\n").map((e,t)=>{let a=e.match(/at (.*) \((.*):(\d+):(\d+)\)/);if(null!=a){let[,e,n,l,i]=a,s=n.split(/[\\/]/).pop();return dx.includes(e.trim())?null:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:o0.e0,children:e.trim()}),!dp.includes(s??"")&&(0,r.jsxs)(r.Fragment,{children:[" (",(0,r.jsxs)("span",{className:o0.lz,title:n,children:[s,":",l,":",i]}),")"]})]},t)}return(0,r.jsx)("div",{children:e},t)})})})]})]})}}],dv={searchType:nA.n.REGEX,searchStringGenerator:e=>{let{name:t,type:a,stack:n,data:l}=e,i=[t,a,JSON.stringify(l)];return null!=n&&i.push(n),i},throttleMs:100};function dj(){let{ref:e,height:t}=(0,ow.Ay)(),a=(0,d.bG)([oV.A],()=>oV.A.isModuleLoggingEnabled()),[n,l]=o.useState(a),[i,s]=o.useState(!1),[c,u]=o.useState(null),[m,h]=o.useState(Object.keys(dd)),[x,g]=(0,d.bG)([oV.A],()=>oV.A.getOverlayLoggingBreadcrumbs(),[],oJ.D),[v,j]=o.useState(null),f=v??x,b=null!=v?-1:g;o.useEffect(()=>{0!==b&&(i?u(f.reduce((e,t)=>"game_tracking_starting"===t.name?Math.max(e,t.timestamp):e,0)):u(null))},[i,f,b]);let[y,E]=o.useState(""),_=o.useMemo(()=>0===b?[]:f.filter(e=>{if(i&&null!=c&&e.timestamp<c)return!1;for(let t of m){let{filter:a}=dd[t];if(a(e))return!0}return!1}),[f,m,c,i,b]),[C,S]=o.useState(_),[N,A]=o.useState(null),k=o.useMemo(()=>f.find(e=>e.key===N),[f,N]),I=o.useCallback(e=>{S(e)},[]),{renderSelectedTab:D}=(0,a6.Ay)({tabs:dg},[]);(0,nk.RT)(y,_,I,dv,[f]);let T=o.useCallback(e=>{l(e),oR.A.setModuleLogging(e)},[]),[O,R]=o.useState(!1),w=o.useRef(null),M=o.useCallback(()=>{(0,nI.C)(JSON.stringify(_)),R(!0)},[_]);o.useEffect(()=>{if(O)return w.current=setTimeout(()=>{R(!1)},4e3),()=>{null!=w.current&&clearTimeout(w.current)}},[O]);let L=o.useCallback(e=>{j(null!=e?JSON.parse(e):null)},[]),P=o.useCallback(e=>{if(e)return j(null);(0,eV.openModal)(e=>(0,r.jsx)(dr,{modalProps:e,onClose:t=>{L(t),e.onClose()}}),{modalKey:"breadcrumb-import-panel"},ez.SY)},[L]);return(0,r.jsxs)("div",{ref:e,className:o0.rh,children:[(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsxs)("div",{className:F()(o0._V,o0.XQ),children:[(0,r.jsx)("div",{title:"Toggles the Polling of Native",className:o0.iR,children:(0,r.jsx)(r3.S,{label:"Poll Native",checked:n,onChange:e=>T(e)})}),(0,r.jsx)("div",{title:"Only show breadcrumbs for active games",className:o0.iR,children:(0,r.jsx)(r3.S,{label:"Only Active Games",checked:i,onChange:e=>s(e)})}),(0,r.jsxs)($.D,{className:o0.ny,onClick:M,children:[(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:O?"Copied":"Copy All"}),O?(0,r.jsx)(ot.CheckmarkLargeIcon,{size:"sm",color:eW.A.unsafe_rawColors.GREEN_330.css}):(0,r.jsx)(ny.CopyIcon,{color:"currentColor",size:"sm"})]}),(0,r.jsx)($.D,{className:o0.ny,onClick:()=>P(null!=v),children:(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"currentColor",children:null!=v?"Clear":"Import"})})]}),(0,r.jsx)("div",{className:F()(o0._V,o0.XQ),children:Object.entries(dd).map(e=>{let[t,a]=e;return(0,r.jsx)($.D,{className:F()(o0.pb,m.includes(t)&&o0.bx),onClick:()=>{h(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},children:(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"currentColor",children:a.label})},t)})}),(0,r.jsx)("div",{className:o0._V,children:(0,r.jsx)(nS.I,{query:y,onChange:E,onClear:()=>E(""),placeholder:"Regex search by breadcrumb name and data"})})]}),(0,r.jsx)("div",{className:F()(o0.st,o0.CZ),children:(0,r.jsx)(tK,{columns:du,data:C,selectedRowKey:N??void 0,onClickRow:e=>A(e.key)})}),null!=k&&(0,r.jsx)(a3,{className:F()(o0.st,o0.rf),minHeight:100,initialHeight:null!=t?t/3:300,children:D({breadcrumb:k,onClose:()=>A(null)})})]})}let df=o.memo(function(){let e=(0,d.bG)([o$.A],()=>o$.A.getPopoutInitializationStages());return(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsx)("div",{className:o0.Iv,children:(0,r.jsx)(p.E,{variant:"text-md/bold",color:"text-strong",children:"Popout Initialization Stages"})}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:(0,r.jsx)("pre",{children:JSON.stringify(e,void 0,2)})})]})}),db=o.memo(function(){let e=(0,d.bG)([oV.A],()=>oV.A.isStateDebuggingEnabled()),t=(0,d.bG)([oV.A],()=>oV.A.getDebuggingState());return o.useEffect(()=>(oR.A.setStateDebugging(!0),()=>{oR.A.setStateDebugging(!1)}),[]),(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsx)("div",{className:o0.Iv,children:(0,r.jsx)(m.d,{checked:e,onChange:()=>oR.A.setStateDebugging(!e),label:"Poll Native Module State"})}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:(0,r.jsx)("pre",{children:JSON.stringify(t,void 0,2)})})]})});function dy(){return(0,r.jsx)(g.Ar,{children:(0,r.jsxs)("div",{className:F()(tH.nd,o0.rf),children:[(0,r.jsx)(dl,{}),(0,r.jsx)(ds,{}),(0,r.jsx)(di,{}),(0,r.jsx)(da,{}),(0,r.jsx)(o7,{}),(0,r.jsx)(dt,{}),(0,r.jsx)(df,{}),(0,r.jsx)(db,{})]})})}function dE(e){switch(e){case"Disabled":return;case"False":return!1;case"True":return!0}}function d_(e){return null==e?"Disabled":e?"True":"False"}let dC=o.memo(function(){let e=(0,oG.wW)(),t=(0,d.bG)([oK.Ay],()=>oK.Ay.getOverlayKeybind());return(0,r.jsxs)("div",{className:o0.st,children:[(0,r.jsx)(H.D,{variant:"heading-lg/semibold",children:"Overlay Default Keybind Experiment"}),(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Experiment State"}),(0,r.jsx)(p.E,{variant:"text-sm/normal",color:"text-subtle",children:(0,r.jsx)("pre",{children:JSON.stringify({...e,overlayKeybind:(0,oQ.dI)(t.shortcut)},void 0,2)})}),(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Overrides"}),(0,r.jsx)(j.l,{label:"Overlay User Status",description:"Override whether the current user was a new or existing user",value:d_(e.overrideIsNewOverlayUser),options:[{label:"Disabled (no override)",value:"Disabled",id:"Disabled"},{label:"Existing user",value:"False",id:"False"},{label:"New user",value:"True",id:"True"}],onSelectionChange:function(e){(0,oG.sw)(dE(e))},selectionMode:"single",fullWidth:!0}),(0,r.jsx)(j.l,{label:"Override Previous Keybind Status",description:"Override whether the user's pre-experiment keybind was the default keybind",value:d_(e.overrideIsUsingDefaultOverlayKeybind),options:[{label:"Disabled (no override)",value:"Disabled",id:"Disabled"},{label:"Using default keybind",value:"True",id:"True"},{label:"Not using default keybind",value:"False",id:"False"}],onSelectionChange:function(e){(0,oG.C3)(dE(e))},selectionMode:"single",fullWidth:!0}),(0,r.jsx)(H.D,{variant:"heading-md/semibold",children:"Actions"}),(0,r.jsx)(x.$,{size:"sm",text:"Reset isNewOverlayUser",onClick:()=>(0,oG.xc)()}),(0,r.jsx)(x.$,{size:"sm",text:"Reset isUsingDefaultOverlayKeybind",onClick:()=>(0,oG.tM)()})]})});function dS(){return(0,r.jsx)(g.Ar,{children:(0,r.jsx)("div",{className:F()(tH.nd,o0.rf),children:(0,r.jsx)(dC,{})})})}function dN(){let[e,t]=o.useState("state");return o.useEffect(()=>(tk.h.dispatch({type:"OVERLAY_SET_DETAILED_LOGGING",enabled:!0}),()=>{tk.h.dispatch({type:"OVERLAY_SET_DETAILED_LOGGING",enabled:!1})}),[]),(0,r.jsxs)("div",{className:F()(tH.nd,o0.nd),children:[(0,r.jsxs)("div",{className:o0._V,children:[(0,r.jsx)($.D,{className:F()(o0.k0,"state"===e&&o0.a),onClick:()=>t("state"),children:(0,r.jsx)(p.E,{variant:"text-md/medium",color:"currentColor",children:"Client State"})}),(0,r.jsx)($.D,{className:F()(o0.k0,"logging"===e&&o0.a),onClick:()=>t("logging"),children:(0,r.jsx)(p.E,{variant:"text-md/medium",color:"currentColor",children:"Logging"})}),(0,r.jsx)($.D,{className:F()(o0.k0,"experiments"===e&&o0.a),onClick:()=>t("experiments"),children:(0,r.jsx)(p.E,{variant:"text-md/medium",color:"currentColor",children:"Experiments"})})]}),"state"===e&&(0,r.jsx)(dy,{}),"logging"===e&&(0,r.jsx)(dj,{}),"experiments"===e&&(0,r.jsx)(dS,{})]})}var dA=a(25409);let dk={xbox_game_pass:"Xbox Game Pass"};function dI(e){return`/debug/partner-subs/${e}`}async function dD(){let{body:e}=await lW.Bo.get({url:"/debug/partner-subs",rejectWithError:!0});return e}async function dT(e,t){await lW.Bo.post({url:dI(e),body:t,rejectWithError:!0})}async function dO(e,t){await lW.Bo.del({url:dI(e),body:t,rejectWithError:!0})}function dR(e){let{active:t}=e;return(0,r.jsx)("span",{className:`${dA.Od} ${t?dA.xk:dA.kS}`,children:t?"Active":"Inactive"})}function dw(e){let{partner:t,connectedAccount:a,onChanged:n}=e,[l,i]=o.useState(!1),s={external_account_id:a.external_account_id},d=Object.keys(a.metadata).length>0;async function c(e){i(!0);try{await e()}finally{await n(),i(!1)}}return(0,r.jsxs)(W.B,{gap:8,className:dA.nM,children:[(0,r.jsxs)(W.B,{direction:"horizontal",align:"center",gap:12,children:[(0,r.jsx)("div",{className:dA.un,children:a.external_account_id}),(0,r.jsx)(dR,{active:a.is_active}),(0,r.jsxs)(W.B,{direction:"horizontal",gap:8,fullWidth:!1,className:dA.cm,children:[(0,r.jsx)(m.d,{label:"",checked:a.is_active,onChange:e=>c(()=>dT(t,{...s,is_active:e})),disabled:l}),(0,r.jsx)(x.$,{variant:"secondary",size:"sm",text:"Unlink",onClick:()=>c(()=>dO(t,s)),disabled:l})]})]}),d&&(0,r.jsx)("div",{className:dA.en,children:JSON.stringify(a.metadata)})]})}function dM(e){var t;let{listing:a,onChanged:n}=e,[l,i]=o.useState(""),[s,d]=o.useState(!0),[c,u]=o.useState(!1);async function h(){u(!0);try{let e={is_active:s},t=l.trim();""!==t&&(e.external_account_id=t),await dT(a.partner,e),i("")}finally{await n(),u(!1)}}return(0,r.jsxs)(W.B,{gap:12,className:dA.ns,children:[(0,r.jsxs)("div",{className:dA.CM,children:["Leave the id blank for a per-Discord-user default. Set the same id on multiple Discord accounts to test cross-account dedup of the ",dk[t=a.partner]??t," membership."]}),(0,r.jsx)(f.k,{label:"External account id",placeholder:a.default_external_account_id,value:l,onChange:i}),(0,r.jsx)(m.d,{label:"Active on link",checked:s,onChange:d}),(0,r.jsx)(W.B,{direction:"horizontal",justify:"start",children:(0,r.jsx)(x.$,{variant:"primary",s