1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5847],{19796:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>x});var r=a(37876),n=a(14232),l=a(20727),s=a(77041),i=a(48971),o=a(68605),c=a(89285),d=a(83481),u=a(39511);let f=["foryou","article","comments","drama","game","immersive","launch","tab","articlebottom","articleinside","feed","inbox","start","radioplay","maplist"];var m=a(59688),p=a(37057),h=a(4501);function x(){let{hasFeature:e}=(0,d.Q)(),{showLoading:t,hideLoading:a}=(0,p.M)(),[x,v]=(0,n.useState)(f[0]),[b,j]=(0,n.useState)(""),[g,y]=(0,n.useState)(null),[w,N]=(0,n.useState)([]),[C,_]=(0,n.useState)(!1),[R,S]=(0,n.useState)(null),[A,k]=(0,n.useState)("all"),[E,F]=(0,n.useState)("all"),I=(0,n.useCallback)(async e=>{_(!0),t();try{let t=await (0,u.vv)(e);N(t),y(null)}catch(e){m.oR.error(e instanceof Error?e.message:"Failed to load placements"),N([])}finally{_(!1),a()}},[t,a]);(0,n.useEffect)(()=>{I(x)},[]);let D=(0,n.useCallback)(async()=>{let e=b.trim();if(!e){I(x),y(null);return}_(!0),t();try{let t=await (0,u.mo)(e);y(t),N([])}catch(e){m.oR.error(e instanceof Error?e.message:"Search failed"),y([])}finally{_(!1),a()}},[b,x,t,a,I]),T=(0,n.useCallback)(async(e,r)=>{t();try{if(await (0,u.BX)({placement_id:e,bidder_alpha:r}),m.oR.success("Alpha updated"),S(null),x)await I(x);else if(b.trim()){let e=await (0,u.mo)(b.trim());y(e)}}catch(e){throw m.oR.error((0,u.$m)(e)),e}finally{a()}},[x,b,I,t,a]),G=null!==g?g:w,{appOptions:L,osOptions:K}=(0,n.useMemo)(()=>{let e=new Set,t=new Set;for(let a of G){let r=a.matched_placement_key||a.placement_id;if(!r)continue;let n=r.split("-"),l=n[0]||"",s=n[1]||"";l&&e.add(l),s&&t.add(s)}return{appOptions:Array.from(e).sort(),osOptions:Array.from(t).sort()}},[G]),M=(0,n.useMemo)(()=>"all"===A&&"all"===E?G:G.filter(e=>{let t=e.matched_placement_key||e.placement_id;if(!t)return!1;let a=t.split("-"),r=a[0]||"",n=a[1]||"";return("all"===A||r===A)&&("all"===E||n===E)}),[G,A,E]);if(!e("alpha"))return null;let B=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(i.p,{className:"w-64",placeholder:"Search by placement_id...",value:b,onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&D()}),(0,r.jsx)(s.$,{onClick:D,variant:"secondary",children:"Search"}),(0,r.jsxs)(c.l6,{value:A,onValueChange:e=>k(e),children:[(0,r.jsx)(c.bq,{className:"w-40",children:(0,r.jsx)(c.yv,{placeholder:"App"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"all",children:"All apps"}),L.map(e=>(0,r.jsx)(c.eb,{value:e,children:e},e))]})]}),(0,r.jsxs)(c.l6,{value:E,onValueChange:e=>F(e),children:[(0,r.jsx)(c.bq,{className:"w-32",children:(0,r.jsx)(c.yv,{placeholder:"OS"})}),(0,r.jsxs)(c.gC,{children:[(0,r.jsx)(c.eb,{value:"all",children:"All OS"}),K.map(e=>(0,r.jsx)(c.eb,{value:e,children:e},e))]})]})]}),(0,r.jsx)("div",{className:"border rounded-md overflow-hidden",children:C?(0,r.jsx)("div",{className:"p-8 text-center text-muted-foreground",children:"Loadingâ¦"}):0===G.length?(0,r.jsx)("div",{className:"p-8 text-center text-muted-foreground",children:"Select a slot or search by placement_id."}):0===M.length?(0,r.jsx)("div",{className:"p-8 text-center text-muted-foreground",children:"No placements match the current filters."}):(0,r.jsxs)("table",{className:"w-full text-sm",children:[(0,r.jsx)("thead",{className:"bg-muted/50",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"text-left p-3 font-medium",children:"Placement ID"}),(0,r.jsx)("th",{className:"text-left p-3 font-medium",children:"Bidder Alpha"}),(0,r.jsx)("th",{className:"w-32 p-3"})]})}),(0,r.jsx)("tbody",{children:M.map(e=>(0,r.jsxs)("tr",{className:"border-t",children:[(0,r.jsx)("td",{className:"p-3 font-mono text-xs break-all",children:e.placement_id}),(0,r.jsx)("td",{className:"p-3",children:0===Object.keys(e.bidder_alpha||{}).length?(0,r.jsx)("span",{className:"text-muted-foreground",children:"â"}):(0,r.jsx)("span",{className:"font-mono text-xs",children:Object.entries(e.bidder_alpha||{}).map(e=>{let[t,a]=e;return"".concat(t,": ").concat(a)}).join(", ")})}),(0,r.jsx)("td",{className:"p-3",children:(0,r.jsx)(s.$,{variant:"outline",size:"sm",onClick:()=>S(e),children:"Change alpha"})})]},e.placement_id))})]})})]});return(0,r.jsxs)("main",{children:[(0,r.jsxs)("div",{className:"bg-white flex flex-col",children:[(0,r.jsx)("div",{className:"flex h-14 items-center px-6",children:(0,r.jsx)("h2",{className:"font-semibold text-xl",children:"Alpha Management"})}),(0,r.jsxs)(o.tU,{className:"mt-2",value:x,onValueChange:e=>{v(e),j(""),k("all"),F("all"),I(e)},children:[(0,r.jsx)(o.j7,{className:"px-6",children:f.map(e=>(0,r.jsx)(o.Xi,{value:e,className:"px-4 py-2",children:e},e))}),f.map(e=>(0,r.jsx)(o.av,{value:e,className:"bg-gray-1 p-6 space-y-6 mt-0",children:(0,r.jsx)(l.Zp,{className:"p-4 sm:p-6 bg-white space-y-6",children:B})},e))]})]}),(0,r.jsx)(h.default,{open:!!R,onClose:()=>S(null),item:R,onSave:T})]})}},64455:(e,t,a)=>{"use strict";a.d(t,{RG:()=>y,bL:()=>E,q7:()=>F});var r=a(14232),n=a(33716),l=a(88775),s=a(10714),i=a(91844),o=a(70294),c=a(66326),d=a(62146),u=a(58162),f=a(14966),m=a(37876),p="rovingFocusGroup.onEntryFocus",h={bubbles:!1,cancelable:!0},x="RovingFocusGroup",[v,b,j]=(0,l.N)(x),[g,y]=(0,i.A)(x,[j]),[w,N]=g(x),C=r.forwardRef((e,t)=>
1(0,m.jsx)(v.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(v.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(_,{...e,ref:t})})}));C.displayName=x;var _=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:a,orientation:l,loop:i=!1,dir:o,currentTabStopId:v,defaultCurrentTabStopId:j,onCurrentTabStopIdChange:g,onEntryFocus:y,preventScrollOnEntryFocus:N=!1,...C}=e,_=r.useRef(null),R=(0,s.s)(t,_),S=(0,f.jH)(o),[A,E]=(0,u.i)({prop:v,defaultProp:j??null,onChange:g,caller:x}),[F,I]=r.useState(!1),D=(0,d.c)(y),T=b(a),G=r.useRef(!1),[L,K]=r.useState(0);return r.useEffect(()=>{let e=_.current;if(e)return e.addEventListener(p,D),()=>e.removeEventListener(p,D)},[D]),(0,m.jsx)(w,{scope:a,orientation:l,dir:S,loop:i,currentTabStopId:A,onItemFocus:r.useCallback(e=>E(e),[E]),onItemShiftTab:r.useCallback(()=>I(!0),[]),onFocusableItemAdd:r.useCallback(()=>K(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>K(e=>e-1),[]),children:(0,m.jsx)(c.sG.div,{tabIndex:F||0===L?-1:0,"data-orientation":l,...C,ref:R,style:{outline:"none",...e.style},onMouseDown:(0,n.m)(e.onMouseDown,()=>{G.current=!0}),onFocus:(0,n.m)(e.onFocus,e=>{let t=!G.current;if(e.target===e.currentTarget&&t&&!F){let t=new CustomEvent(p,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=T().filter(e=>e.focusable);k([e.find(e=>e.active),e.find(e=>e.id===A),...e].filter(Boolean).map(e=>e.ref.current),N)}}G.current=!1}),onBlur:(0,n.m)(e.onBlur,()=>I(!1))})})}),R="RovingFocusGroupItem",S=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:a,focusable:l=!0,active:s=!1,tabStopId:i,children:d,...u}=e,f=(0,o.B)(),p=i||f,h=N(R,a),x=h.currentTabStopId===p,j=b(a),{onFocusableItemAdd:g,onFocusableItemRemove:y,currentTabStopId:w}=h;return r.useEffect(()=>{if(l)return g(),()=>y()},[l,g,y]),(0,m.jsx)(v.ItemSlot,{scope:a,id:p,focusable:l,active:s,children:(0,m.jsx)(c.sG.span,{tabIndex:x?0:-1,"data-orientation":h.orientation,...u,ref:t,onMouseDown:(0,n.m)(e.onMouseDown,e=>{l?h.onItemFocus(p):e.preventDefault()}),onFocus:(0,n.m)(e.onFocus,()=>h.onItemFocus(p)),onKeyDown:(0,n.m)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,a){var r;let n=(r=e.key,"rtl"!==a?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return A[n]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=j().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){"prev"===t&&a.reverse();let r=a.indexOf(e.currentTarget);a=h.loop?function(e,t){return e.map((a,r)=>e[(t+r)%e.length])}(a,r+1):a.slice(r+1)}setTimeout(()=>k(a))}}),children:"function"==typeof d?d({isCurrentTabStop:x,hasTabStop:null!=w}):d})})});S.displayName=R;var A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function k(e,t=!1){let a=document.activeElement;for(let r of e)if(r===a||(r.focus({preventScroll:t}),document.activeElement!==a))return}var E=C,F=S},68605:(e,t,a)=>{"use strict";a.d(t,{Xi:()=>c,av:()=>d,j7:()=>o,tU:()=>i});var r=a(37876),n=a(14232),l=a(90491),s=a(74317);let i=l.bL,o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(l.B8,{ref:t,className:(0,s.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",a),...n})});o.displayName=l.B8.displayName;let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,r.jsx)(l.l9,{ref:t,className:(0,s.cn)("inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50","data-[state=active]:text-blue-6 data-[state=active]:border-b-2 data-[state=active]:border-blue-6",a),...n})});c.displayName=l.l9.displayName;let d=n.forwardRef((e,t)=>
1{let{className:a,...n}=e;return(0,r.jsx)(l.UC,{ref:t,className:(0,s.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a),...n})});d.displayName=l.UC.displayName},90491:(e,t,a)=>{"use strict";a.d(t,{B8:()=>k,UC:()=>F,bL:()=>A,l9:()=>E});var r=a(14232),n=a(33716),l=a(91844),s=a(64455),i=a(96822),o=a(66326),c=a(14966),d=a(58162),u=a(70294),f=a(37876),m="Tabs",[p,h]=(0,l.A)(m,[s.RG]),x=(0,s.RG)(),[v,b]=p(m),j=r.forwardRef((e,t)=>{let{__scopeTabs:a,value:r,onValueChange:n,defaultValue:l,orientation:s="horizontal",dir:i,activationMode:p="automatic",...h}=e,x=(0,c.jH)(i),[b,j]=(0,d.i)({prop:r,onChange:n,defaultProp:l??"",caller:m});return(0,f.jsx)(v,{scope:a,baseId:(0,u.B)(),value:b,onValueChange:j,orientation:s,dir:x,activationMode:p,children:(0,f.jsx)(o.sG.div,{dir:x,"data-orientation":s,...h,ref:t})})});j.displayName=m;var g="TabsList",y=r.forwardRef((e,t)=>{let{__scopeTabs:a,loop:r=!0,...n}=e,l=b(g,a),i=x(a);return(0,f.jsx)(s.bL,{asChild:!0,...i,orientation:l.orientation,dir:l.dir,loop:r,children:(0,f.jsx)(o.sG.div,{role:"tablist","aria-orientation":l.orientation,...n,ref:t})})});y.displayName=g;var w="TabsTrigger",N=r.forwardRef((e,t)=>{let{__scopeTabs:a,value:r,disabled:l=!1,...i}=e,c=b(w,a),d=x(a),u=R(c.baseId,r),m=S(c.baseId,r),p=r===c.value;return(0,f.jsx)(s.q7,{asChild:!0,...d,focusable:!l,active:p,children:(0,f.jsx)(o.sG.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":m,"data-state":p?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:u,...i,ref:t,onMouseDown:(0,n.m)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(r)}),onKeyDown:(0,n.m)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(r)}),onFocus:(0,n.m)(e.onFocus,()=>{let e="manual"!==c.activationMode;p||l||!e||c.onValueChange(r)})})})});N.displayName=w;var C="TabsContent",_=r.forwardRef((e,t)=>{let{__scopeTabs:a,value:n,forceMount:l,children:s,...c}=e,d=b(C,a),u=R(d.baseId,n),m=S(d.baseId,n),p=n===d.value,h=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,f.jsx)(i.C,{present:l||p,children:({present:a})=>(0,f.jsx)(o.sG.div,{"data-state":p?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":u,hidden:!a,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:a&&s})})});function R(e,t){return`${e}-trigger-${t}`}function S(e,t){return`${e}-content-${t}`}_.displayName=C;var A=j,k=y,E=N,F=_},95533:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/portal/alpha",function(){return a(19796)}])}},e=>{e.O(0,[1519,4501,636,6593,8792],()=>e(e.s=95533)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.