PageSourceSearch

https://cdn.archidekt.com/_next/static/chunks/pages/decks/image/[id]-d17abac6bf22d86b.js

js archidekt.com collected 2026-09-25 18:52:10 UTC 22,422 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9146],{7931:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(75038),o=r(76430),a=r(61849),i=r(90920),s=r(89808),l=r(65533),c=r.n(l),u=r(47472),d=r(32071),h=r(64727);let m=({colors:e,className:t="",includeManaSymbols:r=!1,clickingBarFocuses:l})=>{let m=(0,o.useMemo)(()=>{let t=(0,i.pe)(e),r=0,n=[];for(let e of t)r+=e.quantity;for(let e of t)e.quantity>0&&n.push({name:e.color,percent:e.quantity/r*100,quantity:e.quantity});return 0===r?[{name:"C",percent:100,quantity:0}]:n},[e]),p=(e,t)=>(d.Ay.getOnMac()?e.metaKey:e.ctrlKey)?(0,h.u)(t):(0,h.F)(t);return(0,n.jsx)("div",{className:`${c().bar} ${t}`,children:m.map((e,t)=>{let o=c().middle,{percent:i,name:d}=e,h=s.wY[d],f={backgroundColor:h,width:`${i}%`},g="w";return("W"===d&&(g="w"),"U"===d&&(g="u"),"B"===d&&(g="b"),"R"===d&&(g="r"),"G"===d&&(g="g"),"C"===d&&(g="c"),1===m.length?o=c().solid:0===t?o=c().left:t===m.length-1&&(o=c().right),l)?(0,n.jsx)("button",{style:f,className:`${c().barIsButtons} ${o}`,title:`${e.quantity} pips`,onClick:e=>{"cost"===l?p(e,u.z.cost(d)):"production"===l&&p(e,u.z.producers(d))},children:r&&(0,n.jsx)(a.A,{style:{color:h,filter:"brightness(.2)"},icon:g})},t):(0,n.jsx)("div",{style:f,className:o,children:r&&(0,n.jsx)(a.A,{style:{color:h,filter:"brightness(.2)"},icon:g})},t)})})}},12442:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/decks/image/[id]",function(){return r(97019)}])},41706:e=>{e.exports={container:"image_container__YY9aG",content:"image_content__evx0D",controls:"image_controls__T22s0",header:"image_header__BpAv_",downloads:"image_downloads__kKDzX",loader:"image_loader__qiLWP",types:"image_types__YnbvA",colorBar:"image_colorBar__fapJb",imageContainer:"image_imageContainer__WzMG3",upperThird:"image_upperThird__jH0lP",info:"image_info__W4goj",topInfoAndChart:"image_topInfoAndChart__qzo1K",topLeft:"image_topLeft__7a1EH",grid:"image_grid__vwNrd",commanderImages:"image_commanderImages__pWGC_",commander:"image_commander__jJXWe",secondCommander:"image_secondCommander__PMEJl",name:"image_name__Vserp",subInfo:"image_subInfo__V9N1x",lowerThird:"image_lowerThird__HVsq5",user:"image_user__82pf0",lowerInfo:"image_lowerInfo__m1XDy",dropdown:"image_dropdown__DZZPe",dropdownButton:"image_dropdownButton__OdEep",dropdownMenu:"image_dropdownMenu__StDw9",featuredListItem:"image_featuredListItem__8jdjZ",options:"image_options__M4EJJ",logo:"image_logo__RYyLP"}},47049:e=>{e.exports={container:"helpers_container__ieIVG",content:"helpers_content__jgl8e",controls:"helpers_controls__xXx__",header:"helpers_header__glliP",downloads:"helpers_downloads__fjayH",loader:"helpers_loader__GDYTh",types:"helpers_types__Rw6fV",colorBar:"helpers_colorBar__TXY4n",imageContainer:"helpers_imageContainer__ZucB_",upperThird:"helpers_upperThird__6H9Hj",info:"helpers_info__12u8P",topInfoAndChart:"helpers_topInfoAndChart___O4yh",topLeft:"helpers_topLeft__pOnEM",grid:"helpers_grid__G67R8",commanderImages:"helpers_commanderImages__CmHll",commander:"helpers_commander__6sdcC",secondCommander:"helpers_secondCommander__z6fJq",name:"helpers_name__1p7ie",subInfo:"helpers_subInfo__O_Uhh",lowerThird:"helpers_lowerThird___uJpX",user:"helpers_user__8HQGM",lowerInfo:"helpers_lowerInfo__gFcuu",dropdown:"helpers_dropdown__x7BfK",dropdownButton:"helpers_dropdownButton__WJ_4X",dropdownMenu:"helpers_dropdownMenu__whTwd",featuredListItem:"helpers_featuredListItem__T7IYM",options:"helpers_options__QJ7Ij",logo:"helpers_logo__niLo7",type:"helpers_type__fevVK",zoneHeader:"helpers_zoneHeader__MXeoe",cards:"helpers_cards__OcpIr",card:"helpers_card__juQlA",manaCurve:"helpers_manaCurve__pzO6x",barGroup:"helpers_barGroup__X8l0T",bar:"helpers_bar__4Wyis"}},47472:(e,t,r)=>{"use strict";r.d(t,{z:()=>c});var n=r(89532),o=r(89808),a=r(85785);let i=()=>{let{cardMap:e,format:t,categories:r}=n.M.getState().deck;return{cards:Object.values(e),format:t,categories:r}},s=e=>{let{cards:t}=i(),r=o.hs[e];return t.filter(e=>"Colorless"===r?e.colorIdentity?.length===0:e.colorIdentity?.includes(r))},l=e=>{let{cards:t}=i(),r=o.hs[e];return t.filter(e=>{let t=e.front&&e.back?[...e.front.colors,...e.back.colors]:e.colors;return"Colorless"===r&&0===t.length||t.includes(r)})},c={identity:s,color:l,smartColor:e=>{let{format:t}=i();return a.D4.includes(t)?s(e):l(e)},cost:e=>{let{cards:t}=i();return t.filter(t=>{let r=[...t.castingCost.flat()];return t.front&&t.back&&(r.push(...t.front.castingCost.flat()),r.push(...t.back.castingCost.flat())),r.includes(e)})},producers:e=>{let{cards:t}=i();return t.filter(t=>t.manaProduction[e]>0)}}},65533:e=>
1{e.exports={center:"colorBar_center__nqOBJ",solid:"colorBar_solid__xSyXO",middle:"colorBar_middle__SBTBH",right:"colorBar_right__gS25y",left:"colorBar_left__rBWl8",bar:"colorBar_bar__TFi4d",fragments:"colorBar_fragments__XvM2n",barIsButtons:"colorBar_barIsButtons__fA3iP"}},90060:function(e){!function(){"use strict";var t=function(){var e;return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){return({woff:"application/font-woff",woff2:"application/font-woff",ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[t(e).toLowerCase()]||""},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return -1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise(function(t){e.toBlob(t)}):new Promise(function(t){for(var r=window.atob(e.toDataURL().split(",")[1]),n=r.length,o=new Uint8Array(n),a=0;a<n;a++)o[a]=r.charCodeAt(a);t(new Blob([o],{type:"image/png"}))})},resolveUrl:function(e,t){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var o=r.createElement("a");return r.body.appendChild(o),n.href=t,o.href=e,o.href},getAndEncode:function(e){return i.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime()),new Promise(function(t){var r,n=new XMLHttpRequest;if(n.onreadystatechange=function(){if(4===n.readyState){if(200!==n.status)return void(r?t(r):a("cannot fetch resource: "+e+", status: "+n.status));var o=new FileReader;o.onloadend=function(){t(o.result.split(/,/)[1])},o.readAsDataURL(n.response)}},n.ontimeout=function(){r?t(r):a("timeout of 30000ms occured while fetching resource: "+e)},n.responseType="blob",n.timeout=3e4,n.open("GET",e,!0),n.send(),i.impl.options.imagePlaceholder){var o=i.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(r=o[1])}function a(e){console.error(e),t("")}})},uid:(e=0,function(){return"u"+("0000"+(1679616*Math.random()|0).toString(36)).slice(-4)+e++}),delay:function(e){return function(t){return new Promise(function(r){setTimeout(function(){r(t)},e)})}},asArray:function(e){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise(function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src=e})},width:function(e){var t=r(e,"border-left-width"),n=r(e,"border-right-width");return e.scrollWidth+t+n},height:function(e){var t=r(e,"border-top-width"),n=r(e,"border-bottom-width");return e.scrollHeight+t+n}};function t(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function r(e,t){return parseFloat(window.getComputedStyle(e).getPropertyValue(t).replace("px",""))}}(),r=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,t,a){return r(e)?Promise.resolve(e).then(n).then(function(r){var n=Promise.resolve(e);return r.forEach(function(e){n=n.then(function(r){return o(r,e,t,a)})}),n}):Promise.resolve(e)},shouldProcess:r,impl:{readUrls:n,inline:o}};function r(t){return -1!==t.search(e)}function n(r){for(var n,o=[];null!==(n=e.exec(r));)o.push(n[1]);return o.filter(function(e){return!t.isDataUrl(e)})}function o(e,r,n,o){return Promise.resolve(r).then(function(e){return n?t.resolveUrl(e,n):e}).then(o||t.getAndEncode).then(function(e){return t.dataAsUrl(e,t.mimeType(r))}).then(function(n){var o;return e.replace((o=r,RegExp("(url\\(['\"]?)("+t.escape(o)+")(['\"]?\\))","g")),"$1"+n+"$3")})}}(),n=function(){return{resolveAll:function(){return e(document).then(function(e){return Promise.all(e.map(function(e){return e.resolve()}))}).then(function(e){return e.join("\n")})},impl:{readAll:e}};function e(){return Promise.resolve(t.asArray(document.styleSheets)).then(function(e){var r=[];return e.forEach(function(e){try{t.asArray(e.cssRules||[]).forEach(r.push.bind(r))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}}),r}).then(function(e){return e.filter(function(e){return e.type===CSSRule.FONT_FACE_RULE}).filter(function(e){return r.shouldProcess(e.style.getPropertyValue("src"))})}).then(function(t){return t.map(e)});function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return r.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function n(o){var a,i;return o instanceof Element?((i=(a=o).style.getPropertyValue("background"))?r.inlineAll(i).then(function(e){a.style.setProperty("background",e,a.style.getPropertyPriority("background"))}).then(function(){return a}):Promise.resolve(a)).then(function(){return o instanceof HTMLImageElement?e(o).inline():Promise.all(t.asArray(o.childNodes).map(function(e){return n(e)}))}):Promise.resolve(o)},impl:{newImage:e}};function e(e){return{inline:function(r){return t.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(r||t.getAndEncode).then(function(r){return t.dataAsUrl(r,t.mimeType(e.src))}).then(function(t){return new Promise(function(r,n){e.onload=r,e.onerror=n,e.src=t})})}}}}(),a=void 0,i={toSvg:s,toPng:function(e,t){return l(e,t||{}).then(function(e){return e.toDataURL()})},toJpeg:function(e,t){return l(e,t=t||{}).then(function(e){return e.toDataURL("image/jpeg",t.quality||1)})},toBlob:function(e,r){return l(e,r||{}).then(t.canvasToBlob)},toPixelData:function(e,r){return l(e,r||{}).then(function(r){return r.getContext("2d").getImageData(0,0,t.width(e),t.height(e)).data})},impl:{fontFaces:n,images:o,util:t,inliner:r,options:{}}};function s(e,r){var n;return void 0===(n=r=r||{}).imagePlaceholder?i.impl.options.imagePlaceholder=a:i.impl.options.imagePlaceholder=n.imagePlaceholder,void 0===n.cacheBust?i.impl.options.cacheBust=!1:i.impl.options.cacheBust=n.cacheBust,Promise.resolve(e).then(function(e){return function e(r,n,o){return o||!n||n(r)?Promise.resolve(r).then(function(e){return e instanceof HTMLCanvasElement?t.makeImage(e.toDataURL()):e.cloneNode(!1)}).then(function(o){var a,i,s,l,c,u,d,h;return a=r,i=o,s=n,0===(l=a.childNodes).length?Promise.resolve(i):(c=i,u=t.asArray(l),d=s,h=Promise.resolve(),u.forEach(function(t){h=h.then(function(){return e(t,d)}).then(function(e){e&&c.appendChild(e)})}),h).then(function(){return i})}).then(function(e){var n,o;return n=r,(o=e)instanceof Element?Promise.resolve().then(function(){var e,r,a,i;e=window.getComputedStyle(n),r=o.style,e.cssText?r.cssText=e.cssText:(a=e,i=r,t.asArray(a).forEac
1h(function(e){i.setProperty(e,a.getPropertyValue(e),a.getPropertyPriority(e))}))}).then(function(){[":before",":after"].forEach(function(e){!function(e){var r=window.getComputedStyle(n,e),a=r.getPropertyValue("content");if(""!==a&&"none"!==a){var i,s,l,c,u,d,h,m=t.uid();o.className=o.className+" "+m;var p=document.createElement("style");p.appendChild((i=m,s=e,h=(l=r).cssText?(u=(c=l).getPropertyValue("content"),c.cssText+" content: "+u+";"):(d=l,t.asArray(d).map(function(e){return e+": "+d.getPropertyValue(e)+(d.getPropertyPriority(e)?" !important":"")}).join("; ")+";"),document.createTextNode("."+i+":"+s+"{"+h+"}"))),o.appendChild(p)}}(e)})}).then(function(){n instanceof HTMLTextAreaElement&&(o.innerHTML=n.value),n instanceof HTMLInputElement&&o.setAttribute("value",n.value)}).then(function(){!(o instanceof SVGElement)||(o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o instanceof SVGRectElement&&["width","height"].forEach(function(e){var t=o.getAttribute(e);t&&o.style.setProperty(e,t)}))}).then(function(){return o}):o}):Promise.resolve()}(e,r.filter,!0)}).then(c).then(u).then(function(e){return r.bgcolor&&(e.style.backgroundColor=r.bgcolor),r.width&&(e.style.width=r.width+"px"),r.height&&(e.style.height=r.height+"px"),r.style&&Object.keys(r.style).forEach(function(t){e.style[t]=r.style[t]}),e}).then(function(n){var o,a,i;return o=n,a=r.width||t.width(e),i=r.height||t.height(e),Promise.resolve(o).then(function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(e)}).then(t.escapeXhtml).then(function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"}).then(function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+a+'" height="'+i+'">'+e+"</svg>"}).then(function(e){return"data:image/svg+xml;charset=utf-8,"+e})})}function l(e,r){return s(e,r).then(t.makeImage).then(t.delay(100)).then(function(n){var o=function(e){var n=document.createElement("canvas");if(n.width=r.width||t.width(e),n.height=r.height||t.height(e),r.bgcolor){var o=n.getContext("2d");o.fillStyle=r.bgcolor,o.fillRect(0,0,n.width,n.height)}return n}(e);return o.getContext("2d").drawImage(n,0,0),o})}function c(e){return n.resolveAll().then(function(t){var r=document.createElement("style");return e.appendChild(r),r.appendChild(document.createTextNode(t)),e})}function u(e){return o.inlineAll(e).then(function(){return e})}e.exports=i}()},97019:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>H,default:()=>V});var n=r(75038),o=r(76430),a=r(90060),i=r.n(a),s=r(34783),l=r.n(s),c=r(32071),u=r(85785),d=r(46118),h=r(21159),m=r(79761),p=r(69133),f=r(7931),g=r(73461),_=r(62982),v=r(49435),y=r(92910),w=r(40120),b=r(26975),x=r(68835),j=r(7648),A=r(61849),P=r(47049),C=r.n(P);let I=({count:e,icon:t})=>e?(0,n.jsxs)("div",{className:C().type,children:[(0,n.jsx)(A.A,{icon:t})," ",e]}):null,N=({cards:e,header:t,images:r})=>e.length?(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)("div",{className:C().zoneHeader,children:t}),(0,n.jsx)("div",{className:C().cards,style:{gridTemplateRows:`repeat(${Math.ceil(e.length/6)}, 40px)`},children:e.map((e,t)=>{let o=r[e.id];return o?(0,n.jsx)(y.A,{href:`/card?uid=${e.uid}`,className:C().card,children:(0,n.jsx)(v.A,{src:URL.createObjectURL(o),alt:`${e.name}-${t}`,crossOrigin:"use-credentials"})},t):null})})]}):null,T=({cards:e})=>{let t=0,r={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,"8+":0};return e.forEach(e=>{let n=e.cmc<8?e.cmc:"8+";e.types.includes("Land")&&!n||void 0!==r[n]&&(r[n]+=1,r[n]>t&&(t=r[n]))}),(0,n.jsx)("div",{className:C().manaCurve,children:Object.keys(r).map((e,o)=>{let a=r[e],i=`${a/t*60}px`;return(0,n.jsxs)("div",{className:C().barGroup,children:[(0,n.jsx)("div",{children:e}),(0,n.jsx)("div",{className:C().bar,style:{height:i}}),!!a&&(0,n.jsx)("div",{children:a})]},o)})})};var S=r(83480),k=r(57146),B=r(48942),E=r(35635),L=r(21129),U=r(78393),R=r(65718),M=r(41706),O=r.n(M);let D="cardType",$=e=>"alphabetical"===e?E.X4:"color"===e?E.yW:"manaValue"===e?E.Oj:E.Li;var H=!0;let V=({deck:e})=>{let[t,r]=(0,o.useState)(!1),[a,s]=(0,o.useState)(!1),[A,P]=(0,o.useState)({}),[C,M]=(0,o.useState)([]),[H,V]=(0,o.useState)([]),[X,G]=(0,o.useState)([]),[F,q]=(0,o.useState)([]),[z,W]=(0,o.useState)({}),[J,Y]=(0,o.useState)({}),[Z,K]=(0,o.useState)(),[Q,ee]=(0,o.useState)(),[et,er]=(0,o.useState)(!1),[en,eo]=(0,o.useState)(!1),[ea,ei]=(0,o.useState)(!1),[es,el]=(0,o.useState)([]),[ec,eu]=(0,o.useState)(D),ed=(0,d.YU)(),eh=(0,o.useRef)(null);(0,o.useEffect)(()=>(document.body.classList.add("deck-overscroll-view"),em(),()=>document.body.classList.remove("deck-overscroll-view")),[]);let em=async()=>{let t=Object.assign(...e.categories.map(e=>
1({[e.name]:e}))),r=Object.values((0,S.Bw)(e.cards)).reduce((e,r)=>{let n=Array(r.qty).fill(r).map(e=>({...e,id:l().generate(),qty:1})),o=t[r.categories[0]]?.isPremier??!1,a=t[r.categories[0]]?.includedInDeck??!0;return o?e.commandZone?.push(...n):"Sideboard"===r.categories[0]?e.sideboard?.push(...n):a?e.library?.push(...n):r.categories[0].toLowerCase().includes("attraction")&&!a&&e.attractions?.push(...n),e},{sideboard:[],commandZone:[],library:[],attractions:[]}),n=$(D),o=r.library.sort(n),a=r.commandZone.sort(n),i=r.sideboard.sort(n),s=r.attractions.sort(n),u=[...r.commandZone,...r.sideboard,...r.attractions,...r.library],d=c.Ay.getIsSafari()||c.Ay.getIsFirefox()?"small":"normal",h=u.map(e=>({id:e.id,url:(0,k.X)(e.uid,!1,d)})),m=r.commandZone.map(e=>({id:e.id,url:(0,k.X)(e.uid,!1,"art_crop")})),p=await Promise.all(h.map(e=>fetch(e.url).then(e=>e.blob()))),f=await Promise.all(m.map(e=>fetch(e.url).then(e=>e.blob()))),g=await fetch(e.featured).then(e=>e.blob()),_=e.customFeatured?await fetch(e.customFeatured).then(e=>e.blob()):null,v={},y={};for(let e=0;e<h.length;e++){let t=h[e],r=p[e];v[t.id]=r}for(let e=0;e<m.length;e++){let t=h[e],r=f[e];y[t.id]=r}P(t),M(i),V(a),G(o),q(s),W(v),Y(y),K(g),ee(_)},ep=async()=>{if(!navigator||!navigator?.share)return h.A.create("Your browser does not support sharing","Deck Image Page");s(!0),i().toBlob(eh.current).then(t=>{let r={files:[new File([t],"image.png",{type:t.type})],title:`${e?.name||e}.png`,text:`${e?.name||e}`};return navigator.share(r)}).catch(e=>console.error(e)).finally(()=>s(!1))},ef=e=>{eu(e);let t=$(e);G(X.sort(t)),V(H.sort(t)),M(C.sort(t)),q(F.sort(t))},eg=[...H,...C,...X].sort(E.X4),{estDeckCost:e_,costWithoutBasics:ev}=(0,B.U)(eg,A,ed),ey=(0,L.Vc)(ea?ev:e_,ed[0]),ew=[...new Map(eg.map(e=>[e.deckRelationId,e])).values()].map(e=>({label:e.name,value:e.id,searchString:e.name})),[eb,ex]=eg.reduce((e,t)=>{let[r,n]=e;for(let e of t.colors)n[e]?n[e]++:n[e]=1;for(let e of t.types)r[e]?r[e]++:r[e]=1;return[r,n]},[{},{}]),ej="";return Z&&(ej=URL.createObjectURL(Z)),Q&&(ej=URL.createObjectURL(Q)),(0,n.jsx)(m.A,{children:(0,n.jsx)("div",{className:O().container,children:(0,n.jsxs)("div",{className:O().content,children:[(0,n.jsxs)("div",{className:O().controls,children:[(0,n.jsxs)("div",{className:O().header,children:[(0,n.jsx)("h1",{children:"Generate deck image"}),(0,n.jsxs)("div",{className:O().downloads,children:[!!navigator?.share&&(0,n.jsx)(n.Fragment,{children:a?(0,n.jsxs)("div",{className:O().loader,children:[(0,n.jsx)(p.A,{size:"tiny"}),"Generating image"]}):(0,n.jsxs)("button",{onClick:ep,children:[(0,n.jsx)(w.A,{name:"share alternate"}),"Share Image"]})}),t?(0,n.jsxs)("div",{className:O().loader,children:[(0,n.jsx)(p.A,{size:"tiny"}),"Generating image"]}):(0,n.jsx)(x.A,{color:"blue",icon:"download",onClick:()=>{if(!eh.current)return h.A.create("Unable to find image div","Deck Image Page");r(!0),i().toPng(eh.current).then(t=>{let r=document.createElement("a");r.download=`${e?.name||e}.png`,r.href=t,r.click()}).catch(e=>{console.error(e),h.A.create("Unable to generate image. Usually when this happens it's because an image isn't loading correctly. If this presists you can either switch the edition of that card to an image is loading, or report the missing image on our discord or via email.","Image Generator")}).finally(()=>r(!1))},children:"Download Image"})]})]}),(0,n.jsxs)("div",{className:O().options,children:[(0,n.jsx)("h3",{children:"Options"}),(0,n.jsx)(b.A,{label:"Hide username",onChange:()=>er(!et)}),(0,n.jsx)(b.A,{label:"Hide price",onChange:()=>eo(!en)}),(0,n.jsx)(b.A,{label:"Use price of deck without basic lands",onChange:()=>ei(!ea)}),(0,n.jsx)("label",{children:"Order by"}),(0,n.jsx)(j.A,{value:ec,options:[{label:"Card type",id:"cardType",onClick:()=>ef("cardType")},{label:"Color",id:"color",onClick:()=>ef("color")},{label:"Mana Value",id:"manaValue",onClick:()=>ef("manaValue")},{label:"Alphabetically",id:"alphabetical",onClick:()=>ef("alphabetical")}]}),(0,n.jsx)("label",{children:'Choose up to six cards to display above the deck as "featured" cards of the deck. This option provides you a way to make certain cards in the deck stand out.'}),(0,n.jsx)(_.A,{placeholder:"Choose featured cards",value:es.map(e=>e.id),className:O().dropdown,onChange:e=>{if(e.length>=6)return h.A.create("You may only add up to six featured cards","Deck Image Page");el(e.map(e=>eg.find(t=>
1t.id===e)||u.o5))},options:ew})]})]}),(0,n.jsxs)("div",{ref:eh,className:O().imageContainer,children:[(0,n.jsxs)("div",{className:O().upperThird,children:[(0,n.jsxs)("div",{className:O().info,children:[(0,n.jsxs)("div",{className:O().topInfoAndChart,children:[(0,n.jsxs)("div",{className:O().topLeft,children:[(0,n.jsx)(y.A,{href:(0,R.cR)(e.id,e.name),className:O().name,children:e.name}),(0,n.jsx)("div",{className:O().subInfo,children:u.hZ[e.deckFormat]}),(0,n.jsxs)("div",{className:O().types,children:[(0,n.jsx)(I,{count:eb.Creature,icon:"creature"}),(0,n.jsx)(I,{count:eb.Artifact,icon:"artifact"}),(0,n.jsx)(I,{count:eb.Enchantment,icon:"enchantment"}),(0,n.jsx)(I,{count:eb.Instant,icon:"instant"}),(0,n.jsx)(I,{count:eb.Sorcery,icon:"sorcery"}),(0,n.jsx)(I,{count:eb.Planeswalker,icon:"planeswalker"}),(0,n.jsx)(I,{count:eb.Land,icon:"land"})]})]}),(0,n.jsx)(T,{cards:X})]}),(0,n.jsx)(f.A,{includeManaSymbols:!0,className:O().colorBar,colors:{W:ex.White,U:ex.Blue,B:ex.Black,R:ex.Red,G:ex.Green}}),(0,n.jsx)("div",{className:O().grid})]}),(0,n.jsx)("div",{className:O().commanderImages,children:Q||!H.length?(0,n.jsx)(v.A,{className:O().commander,src:ej,alt:"featured","cross-origin":"use-credentials"}):H.map((e,t)=>{let r=J[e.id];return t>1||!r?null:(0,n.jsx)(v.A,{className:`${O().commander} ${1===t?O().secondCommander:""}`,src:URL.createObjectURL(r),alt:`Commander ${t}`,"cross-origin":"use-credentials"},t)})})]}),(0,n.jsx)(N,{cards:es,images:z,header:"Featured"}),(0,n.jsx)(N,{cards:[...X,...H],header:es.length?"Mainboard":void 0,images:z}),(0,n.jsx)(N,{cards:C,header:"Sideboard",images:z}),(0,n.jsx)(N,{cards:F,header:"Attractions",images:z}),(0,n.jsxs)("div",{className:O().lowerThird,children:[(0,n.jsxs)("div",{className:O().lowerInfo,children:[!et&&(0,n.jsxs)(y.A,{href:`/u/${(0,U.O)(e.owner.username)}`,className:O().user,children:[(0,n.jsx)(w.A,{name:"user circle"}),(0,n.jsx)("span",{children:e.owner.username})]}),!en&&(0,n.jsx)("span",{children:ey})]}),(0,n.jsx)(g.A,{className:O().logo,forceFullSize:!0}),(0,n.jsx)("div",{className:O().grid})]})]})]})})})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=12442)),_N_E=e.O()}]);
2//# sourceMappingURL=[id]-d17abac6bf22d86b.js.map

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.