PageSourceSearch

https://static.mtga.untapped.gg/_next/static/chunks/7970-7b642e797a18d955.js

js untapped.gg collected 2026-10-01 14:09:07 UTC 13,759 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="17e2890c-fe6e-4737-bd1a-791dfaa5c9a2",e._sentryDebugIdIdentifier="sentry-dbid-17e2890c-fe6e-4737-bd1a-791dfaa5c9a2")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7970],{4110:(e,t,n)=>{n.d(t,{Ay:()=>m,vw:()=>h,yC:()=>d});var r=n(37876),i=n(31735),a=n(14232),l=n(85254),o=n(37783),s=n(85541);let d=e=>["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"][e.metadata&&e.metadata.type||0],c=o.Ay.div.withConfig({componentId:"sc-9600441b-0"})([""]),u=o.Ay.label.withConfig({componentId:"sc-9600441b-1"})(["font-size:14px;font-weight:bold;margin:15px 0 2px 0;display:block;"]),p=o.Ay.div.withConfig({componentId:"sc-9600441b-2"})(["display:flex;flex-wrap:wrap;.button{height:30px;padding:0 15px;margin:0 5px 5px 0;}"]),f=o.Ay.span.withConfig({componentId:"sc-9600441b-3"})(["margin:0 5px 5px 0;padding:0 10px;height:30px;font-weight:bold;font-size:14px;color:#000;display:flex;justify-content:space-between;align-items:center;border-radius:3px;.fa-times{cursor:pointer;margin-left:10px;&:hover{color:",";}}"],l.ARj.Primary),g=e=>{switch(e){case"inherited":return"fal fa-code-merge";case"autotag":case"programmatic":return"fal fa-microchip";case"expert":return"fal fa-user";default:return null}},h=e=>{let{tag:t,background:n,onRemove:i,source:a=null}=e,o=g(a);return(0,r.jsxs)(f,{style:{background:n||"#8dd3c7"},children:[o?(0,r.jsx)(l.m_M,{data:(0,r.jsxs)(r.Fragment,{children:["Tag Source: ",(0,r.jsx)("b",{children:a})]}),position:"top",margin:10,variant:"borderless",children:(0,r.jsx)("i",{className:o})}):null,(0,r.jsx)("span",{style:{marginLeft:5*!!o},children:"string"==typeof t?t:t.name}),(0,r.jsx)("i",{className:"fal fa-times",onClick:()=>i()})]})},m=a.forwardRef((e,t)=>{let{primary:n,secondary:l,assignTag:o,availableTags:f,allTags:g,loading:m,removeTag:x,refreshTags:y,tagSources:b,hideLabel:w}=e,v=(0,a.useRef)(null);return(0,a.useImperativeHandle)(t,()=>({openPrimary:()=>v.current&&v.current.open()})),(0,r.jsxs)(c,{children:[w?null:(0,r.jsx)(u,{children:"Primary Tags"}),f?(0,r.jsxs)(p,{children:[(0,r.jsx)(s.A,{ref:v,availableTags:f,allTags:g,assignTag:e=>o(e,!0),onTagCreated:()=>y()}),n.map(e=>(0,r.jsx)(h,{tag:e,background:d(e),onRemove:()=>x(e,!0),source:b?b[e.id]:null},e.id))]}):m?(0,r.jsx)(i.A,{}):null]})})},75062:(e,t,n)=>{n.d(t,{A8:()=>y,Ab:()=>m,IN:()=>x,Mi:()=>j,NK:()=>u,Nx:()=>w,Ny:()=>v,TP:()=>f,Tl:()=>d,U6:()=>C,VZ:()=>s,d1:()=>c,gt:()=>b,pE:()=>h,qV:()=>g,qm:()=>p});var r=n(38625),i=n(36556),a=n(47182),l=n(69142),o=n(14232);async function s(e,t,n){return(0,r.SP)(n,(0,l.y0)("/tags"),JSON.stringify({name:e,metadata:t}))}async function d(e,t,n,i,a){return(0,r.SP)(a,(0,l.y0)("/classifiers/".concat(e,"/assign-tags")),JSON.stringify({cluster_id:t,primary_tag_ids:n,secondary_tag_ids:i}))}async function c(e,t,n,i){return(0,r.SP)(i,(0,l.y0)("/classifiers/".concat(e,"/split")),JSON.stringify({cluster_id:t,Z1_topics:n}))}let u=e=>(0,i.KS)("/classifiers/".concat(e)),p=e=>(0,i.KS)(null!==e?"/classifiers/".concat(e.id,"/manifest"):null),f=(e,t,n)=>(0,i.KS)(null!==e?"/classifiers/".concat(e.id,"/clusters?color=").concat(t,"&type=").concat(n):null,e=>e.length?e:null),g=(e,t)=>(0,i.KS)(e?"/classifiers/".concat(e,"/topics?color=").concat(t):null),h=()=>(0,i.KS)("/meta-periods"),m=(e,t)=>(0,i.KS)("/limited/draft_replay/".concat(e,"?ScoredCardStrategy=").concat(t)),x=()=>(0,i.KS)("/commentaries/draft",e=>e.map(e=>({set_code:""+(e.set_code||"XXX"),card_set:e.card_set||null,published:!!e.published,num_cards:e.num_cards||0})).reverse()),y=e=>(0,i.KS)(e?"/commentaries/draft/".concat(e,"/cards"):null,e=>e.map(e=>({id:+e.id,collector_number:e.collector_number?+e.collector_number:null,title:""+e.title,title_id:e.title_id?+e.title_id:null,commentary:""+e.commentary,tags:e.tags}))),b=()=>(0,i.KS)("/analytics/limited/query/future_pack_graph_events"),w=e=>(0,i.KS)(e?"/analytics/limited/query/future_pack_graph_grpids_by_event/".concat(e):null),v=e=>(0,i.KS)(e?"/rnd/game-info/".concat(e):null),C=e=>(0,i.KS)("/mulligan/cardtags/".concat(e));function j(e,t){let{unsafeHeaders:n}=(0,a.Yk)(),[i,s]=(0,o.useState)(!1),[d,c]=(0,o.useState)(null),u=(0,o.useRef)();return(0,o.useMemo)(()=>
1{if(!e||!t)return void c(null);let i={drafted_grpids:t.map(e=>{let{id:t,quantity:n}=e;return Array(n).fill(t)}).reduce((e,t)=>e.concat(t),[])};e.includes("Sealed")&&(i.deck_recommendation_strategy="SealedRecommendationAllDecksStrategy");let a=JSON.stringify(i);a!==u.current&&(u.current=a,c(null),s(!0),(0,r.SP)(n,(0,l.y0)("/limited/recommend_deck/".concat(e)),a).then(e=>c(e)).catch(()=>c(null)).finally(()=>s(!1)))},[e,t,n]),{data:d,loading:i}}},85541:(e,t,n)=>{n.d(t,{A:()=>J});var r=n(37876),i=n(63759),a=n(14232),l=n(85254),o=n(37783),s=n(82851),d=n.n(s),c=n(18156),u=n(36446),p=n(87334);let f=o.Ay.div.withConfig({componentId:"sc-c43921ba-0"})(["position:relative;flex:1;display:flex;.button{flex:1;}ul{width:100%;}input{outline:none;}"]),g=e=>{let{card:t,setCard:n,initialText:i}=e,[o,s]=(0,a.useState)(i),[g,h]=(0,a.useState)(!1),m=(0,a.useRef)(null),[x,y]=(0,a.useState)([]),b=(0,l.plY)();(0,a.useEffect)(()=>{b&&c.default.loadData(p.P).then(e=>{y(d().uniqBy(e.cardData,e=>e.titleId).map(e=>({titleId:e.titleId,name:b.getCardName(e)||""})))})},[b]);let w=(0,a.useMemo)(()=>{let e=o.toLowerCase();return x.filter(t=>t.name.toLowerCase().includes(e)).sort((e,t)=>e.name>t.name?1:-1)},[x,o]);return(0,r.jsxs)(f,{ref:m,children:[(0,r.jsx)(l.$nd,{onClick:()=>h(e=>!e),variant:"text",size:"sm",icon:g?"chevron-up":"chevron-down",children:t?t.name:"Select Card"}),(0,r.jsxs)(l.rId,{open:g,onClose:()=>h(!1),source:m.current,alignment:"left",width:250,inline:!1,children:[(0,r.jsx)(l.ksK,{type:"text",value:o,onChange:e=>s(e.target.value),variant:"light",autoFocus:!0,placeholder:"Find card…"}),(0,r.jsx)(u.t$,{disableHeight:!0,children:e=>{let{width:t}=e;return(0,r.jsx)(u.B8,{height:Math.min(220,40*w.length),rowCount:w.length,rowHeight:40,rowRenderer:e=>{let{index:t,key:i,style:a}=e,o=w[t];return(0,r.jsx)("div",{style:a,children:(0,r.jsx)(l.tJh,{onClick:()=>n(o),children:o.name},o.titleId)},i)},width:t})}})]})]})};var h=n(38625),m=n(47182),x=n(75062);let y=o.Ay.div.withConfig({componentId:"sc-7985424b-0"})(["display:inline-flex;position:relative;"]),b=e=>{switch(e){case h.PK.Invalid:return"Select Type";case h.PK.Lexical:return"Lexical";case h.PK.Buildaround:return"Buildaround";case h.PK.Mechanic:return"Mechanic";case h.PK.Tribal:return"Tribal";case h.PK.KnownAs:return"Known as";case h.PK.Author:return"Author";case h.PK.Strategy:return"Strategy";case h.PK.Color:return"Color";case h.PK.Commander:return"Commander";default:return"Unknown"}},w=e=>{let{type:t,setType:n}=e,i=(0,a.useRef)(null),[o,s]=(0,a.useState)(!1);return(0,r.jsxs)(y,{ref:i,children:[(0,r.jsx)(l.$nd,{onClick:()=>s(e=>!e),variant:"text",size:"sm",icon:o?"chevron-up":"chevron-down",children:b(t)}),(0,r.jsx)(l.rId,{open:o,onClose:()=>s(!1),source:i.current,alignment:"left",width:250,inline:!1,children:Object.values(h.PK).filter(e=>!isNaN(+e)&&+e>=0).map(e=>({tag:e,name:b(e)})).sort((e,t)=>e.name>t.name?1:-1).map(e=>{let{tag:i,name:a}=e;return(0,r.jsx)(l.tJh,{onClick:()=>n(i),active:t===i,children:a},i)})})]})},v=o.Ay.div.withConfig({componentId:"sc-cde5d059-0"})(["display:flex;margin-top:20px;> button{flex:1;&:not(:first-of-type){margin-left:10px;}}"]),C=o.Ay.div.withConfig({componentId:"sc-cde5d059-1"})(["background:rgba(31,33,28,1);width:600px;max-width:100%;padding:20px;border-radius:3px;border:1px solid ",";input{width:100%;margin-top:2px;border:none;border-radius:3px;padding-left:20px;padding-right:20px;height:42px;}"],l.ARj.Icon),j=o.Ay.div.withConfig({componentId:"sc-cde5d059-2"})(["display:flex;justify-content:center;align-items:center;height:100%;width:100%;background:rgba(31,33,28,0.7);position:fixed;left:0;top:0;pointer-events:all;z-index:1;"]),S=o.Ay.h1.withConfig({componentId:"sc-cde5d059-3"})(["margin-top:0;"]),k=o.Ay.div.withConfig({componentId:"sc-cde5d059-4"})(["margin-top:10px;i{margin-right:5px;}code{display:block;padding:5px;background:rgba(255,255,255,0.1);margin-top:5px;}"]),I=(0,o.Ay)(k).withConfig({componentId:"sc-cde5d059-5"})(["color:",";"],l.ARj.Error),_=o.Ay.div.withConfig({componentId:"sc-cde5d059-6"})(["display:flex;&:not(:first-of-type){margin-top:5px;}> *:not(:last-child){margin-right:5px;}"]),A=e=>{let{initialText:t,tags:n,onClose:i,onCreated:o}
1=e,[s,d]=(0,a.useState)(t),[c,u]=(0,a.useState)(null),[p,f]=(0,a.useState)(null),[y,b]=(0,a.useState)(!1),{unsafeHeaders:k}=(0,m.Yk)(),[A,K]=(0,a.useState)(h.PK.Invalid),P=n.find(e=>e.name.toLowerCase()===s.toLowerCase());return(0,r.jsx)(l.ZLI,{id:"archetype-creation-modal",children:(0,r.jsx)(j,{children:(0,r.jsxs)(C,{children:[(0,r.jsx)(S,{children:"Create New Tag"}),(0,r.jsxs)(_,{children:[(0,r.jsx)(w,{type:A,setType:K}),(0,r.jsx)(l.ksK,{type:"text",value:s,onChange:e=>d(e.target.value),invalid:void 0!==P,variant:"light",autoFocus:!0,placeholder:"Tag Name…"})]}),A===h.PK.Buildaround?(0,r.jsx)(_,{children:(0,r.jsx)(g,{initialText:s,card:c,setCard:u})}):null,P?(0,r.jsxs)(I,{children:[(0,r.jsx)("i",{className:"fal fa-exclamation-circle"}),"A tag with this name already exists:",(0,r.jsx)("code",{children:JSON.stringify(P)})]}):null,p?(0,r.jsx)(I,{children:p}):null,(0,r.jsxs)(v,{children:[(0,r.jsx)(l.$nd,{color:"premium",onClick:()=>{f(null),b(!0);let e={type:A};if(A===h.PK.Buildaround){if(!c)throw Error("Invalid grpId");e.title_id=c.titleId}(0,x.VZ)(s,e,k).then(e=>{o(e),i()}).catch(e=>f(e.toString())).finally(()=>b(!1))},disabled:!s||y||!!P||A===h.PK.Invalid||A===h.PK.Buildaround&&!c,children:y?"…":"Create & Assign Tag"}),(0,r.jsx)(l.$nd,{variant:"ghost",onClick:()=>i(),children:"Cancel"})]})]})})})};var K=n(4110);let P=[38,9,40],T=(e,t)=>(e%t+t)%t,N=o.Ay.div.withConfig({componentId:"sc-2d2a2bba-0"})(["position:relative;"]),R=o.Ay.input.withConfig({componentId:"sc-2d2a2bba-1"})(["width:100%;margin:0;border:none;outline:none;padding:5px 10px;font-size:14px;height:40px;background:white;color:black;border-radius:3px 3px 0 0;border-bottom:1px solid rgba(0,0,0,0.1);"]),L=o.Ay.div.withConfig({componentId:"sc-2d2a2bba-2"})(['padding:0 10px;font-size:14px;height:40px;display:flex;align-items:center;cursor:pointer;color:#000;position:relative;&:not(:first-of-type){border-top:1px solid rgba(0,0,0,0.1);}&::before{content:"";position:absolute;top:calc(50% - 6px);left:0;width:0;height:0;border-top:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:0 solid ',";transition:all 100ms linear;}&.active{background:#eff5f0;&::before{border-left-width:6px;}}"],l.ARj.Background),D=o.Ay.div.withConfig({componentId:"sc-2d2a2bba-3"})(["max-height:220px;overflow:auto;"]),M=(0,o.Ay)(L).withConfig({componentId:"sc-2d2a2bba-4"})(["font-weight:bold;display:flex;justify-content:space-between;span{border-radius:3px;padding:2px 4px;}"]),E=(0,o.Ay)(L).withConfig({componentId:"sc-2d2a2bba-5"})(["border-radius:0 0 3px 3px;color:#000;background:#d4e9d2;i{color:#46ab44;margin-right:7px;}&.active{background:#b8dcb4;color:#000;}&.disabled{background:#ccc;cursor:not-allowed;i{color:#444;}}"]),B=(e,t)=>{let n=t.offsetTop-e.offsetTop;i.Ltv(e).transition().ease(i.TD8).duration(500).tween("scrollTween",()=>{let t=i.DjB(e.scrollTop,n);return n=>e.scrollTop=t(n)})},z=e=>"string"==typeof e?e:e.name,F=e=>"string"==typeof e?e:e.id,J=a.forwardRef((e,t)=>{let{availableTags:n,allTags:i,assignTag:o,onTagCreated:s,createWithoutModal:d,disableCreate:c}=e,u=(0,a.useRef)(null),[p,f]=(0,a.useState)(!1),[g,h]=(0,a.useState)(""),[m,x]=(0,a.useState)(!1),[y,w]=(0,a.useState)(0),v=(0,a.useRef)(null),C=(0,a.useRef)(null),j=(0,a.useRef)([]),S=g.trim(),k=S.toLowerCase();(0,a.useImperativeHandle)(t,()=>({open:()=>f(!0)}));let I=(0,a.useMemo)(()=>S?n.filter(e=>z(e).toLowerCase().includes(k)):n,[n,S,k]);(0,a.useEffect)(()=>{j.current=I.map(()=>a.createRef()),w(0)},[I]);let _=e=>{h(""),o(e).then(e=>{})},L=i.some(e=>z(e).toLowerCase()===k)||d&&!S.length,J=()=>{f(!1),h(""),w(0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(N,{ref:u,onKeyDown:e=>{if(13===e.keyCode&&(y===I.length?L||(x(!0),f(!1)):I.length&&_(I[y])),!P.includes(e.keyCode))return;e.preventDefault();let t=T(y+(38===e.keyCode||9===e.keyCode&&e.shiftKey?-1:1),I.length+ +!L);v.current&&j.current&&j.current[t]&&j.current[t].current&&B(v.current,j.current[t].current),w(t)},onMouseUp:()=>{C.current&&C.current.focus()},children:[(0,r.jsx)(l.$nd,{color:"primary",icon:"plus",onClick:()=>f(!p),children:"Add"}),(0,r.jsxs)(l.rId,{open:p,onClose:J,source:u.current,alignment:"left",width:250,inline:!1,children:[(0,r.jsx)(R,{ref:C,type:"text",value:g,onChange:e=>h(e.target.value),autoFocus:!0,placeholder:"Find…",tabIndex:0}),(0,r.jsx)(D,{ref:v,children:I.sort((e,t)=>
1z(e)>z(t)?1:-1).map((e,t)=>(0,r.jsxs)(M,{onClick:()=>_(e),ref:j.current?j.current[t]:null,onMouseEnter:()=>w(t),className:y===t?"active":void 0,children:[z(e),"string"!=typeof e&&e.metadata?(0,r.jsx)("span",{style:{background:(0,K.yC)(e)},children:b(e.metadata.type)}):null]},F(e)))}),c?null:(0,r.jsxs)(E,{onMouseEnter:()=>{L||w(I.length)},onClick:()=>{!L&&(d?(_({id:0,name:S}),s&&s()):(x(!0),f(!1)))},className:"".concat(y===I.length?"active":""," ").concat(L?"disabled":""),children:[(0,r.jsx)("i",{className:"fal fa-plus"}),"Create\xa0",S.length?(0,r.jsxs)("strong",{children:['"',S,'"']}):"New"]})]})]}),m&&i.every(e=>"string"!=typeof e)?(0,r.jsx)(A,{onClose:()=>{x(!1),J()},onCreated:e=>{null!==e&&s&&(_(e),s())},tags:i,initialText:g}):null]})})}}]);

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.