With Deadpool 3, he’s the first director to write and produce a Marvel movie. Next, he’ll save Star Wars.
ByChris Lee,
a Vulture senior reporter who covers Hollywood
Shawn Levy on the set of Deadpool & Wolverine with Ryan Reynolds and Hugh Jackman.
Photo: Jay Maidment/20th Century Studios/MARVEL
Shawn Levy on the set of Deadpool & Wolverine with Ryan Reynolds and Hugh Jackman.
Photo: Jay Maidment/20th Century Studios/MARVEL
This article was published ahead of Deadpool & Wolverine’s release. Over its opening weekend, the movie grossed $205 million domestically and $438 million globally, officially making the Marvel Cinematic Universe the first franchise to pass the $30 billion dollar mark at the box office.
The call that changed the trajectory of the Marvel Cinematic Universe came out of the blue on a weekday in August two years ago. Shawn Levy, the Montreal-born director behind the billion-dollar-plus-grossing Night at the Museum franchise and producer of Netflix’s Stranger Things, had been toiling for months on a script for Deadpool 3 alongside franchise star Ryan Reynolds, two previous Deadpool screenwriters Rhett Reese and Paul Wernick, and the Marvel comic-book/screenwriter Zeb Wells. But after delivering successive treatments, outlines, and verbal pitches to Marvel Studios — all attempting to integrate the defiantly R-rated “merc with a mouth” into the F-bomb-averse MCU for the first time — the material still wasn’t in shape.
“There’s a very narrow overlap between a story that feels Deadpool-authentic, meaning grounded, raw, real-world based,” Levy says, “and what’s come to be expected of the MCU. Universal stakes. Just more epic-scale storytelling. Kevin Feige rightfully wanted a Deadpool movie that felt well-suited to the MCU. But that bull’s-eye is small.”
Feige, of course, is Marvel’s president and primary producer, the MCU’s chief architect and brand steward who exerts Hand of God–level control over all the studio’s films and series. He’d agreed to preserve the geysers of arterial splatter and winking homoeroticism that anointed Deadpool 2 the highest-grossing R-rated movie ever, so long as Levy could seamlessly merge franchise IP that had lived at 20th Century Fox into the Disney fold. (The House of Mouse acquired the Rupert Murdoch–owned studio for $71.3 billion in 2018.) The breakthrough came courtesy of Reynolds and Levy’s mutual friend, who had by then prominently featured in nine X-Men movies — another Fox property now owned by Disney — but who’d been killed off in 2017’s Oscar-nominated Logan.
“Hugh Jackman calls and says, ‘Guys, I don’t know where you’re at. I don’t know if you have a script. I don’t know when you start shooting. I want in. I’m gut checking. I want a Wolverine-Deadpool movie and if you have a seat at the table, I’d love to join,’’’ Levy recalls. That conversation changed the tenor of a scheduled Zoom meeting with Marvel the next day. “We anticipated that being about the pause button on this movie because we hadn’t cracked it,” Levy continues. “Instead, it became Ryan and I saying, ‘Hey Kevin, we got an interesting phone call.’ And suddenly, we’re off to the races.”
With Deadpool & Wolverine, Levy stands beneath a brighter-than-ever marquee as the first filmmaker to receive a writer-director-producer credit in Marvel cinematic history — a degree of autonomy not even Anthony and Joe Russo (behind an extraordinary run of most of the studio’s biggest blockbusters including Avengers: Endgame, Avengers: Infinity War, Captain America: The Winter Soldier, and Captain America: Civil War) were extended. “I never expected my Marvel directorial debut to be the most empowering creative experience of my career,” Levy says, seated in a suite in the Hotel Bel-Air just hours removed from finishing a final sound mix on Deadpool & Wolverine.While it’s hardly shocking to hear a director gush about his studio partners during a gigantic summer movie’s promotional cycle, such remarks ring more significant considering the studio in focus is Marvel — whose abandon-all-hope-ye-who-enter-here reputation for creatively curtailing the filmmakers it hires has become the stuff of Hollywood legend.
“It is a Kevin Feige production, it’s his movie,” said Nia DaCosta, director of last year’s critical and commercial disaster The Marvels. “So I think you have to live in that reality, but I tried to go in with the knowledge that some of you is going to take a back seat.” Future Wonder Woman director Patty Jenkins departed Thor: The Dark World in large part because of an entrenched studio strategy that she said would have trampled her decision-making. “I really like the people who work there, but they want full control over their movies,” she said in the French edition of Premiere. “The director is under control.” Speaking with Vulture, Avengers: Age of Ultron director Joss Whedon acknowledged an unspoken truth of the MCU: The maintenance of Marvel’s blockbuster pipeline always takes priority over playing nice with individual filmmakers. “With so much at stake, there is going to be friction,” Whedon said. “It’s the Marvel way to sort of question everything. Sometimes that’s amazing and sometimes” — here, he growled his compliment through gritted teeth to make a secondary meaning clear — “that’s amazing.”
With D&W, Levy has not just delivered Marvel’s lone cinematic offering for 2024. The two-hander threequel is widely expected to rank alongside the $1.46-billion-grossing Inside Out 2 among the year’s biggest blockbusters. To take a more macro view, though, the director’s warm reception within Marvel can also be seen as evidence that Disney considers him as something of a fixer to address larger systemic problems. On the strength of Levy’s work on the $250 million Deadpool & Wolverine, he was reportedly offered to direct the fifth Avengers installment due out in 2026 (he passed due to prior obligations and now the Russo brothers are reportedly being offered the job). One of those obligations: Levy is in “very active development” on a Star Wars movie for Lucasfilm (another Disney studio division). And the director’s 21 Laps — the prolific production company behind Netflix’s cultural juggernaut Stranger Things and the Denis Villeneuve–directed Best Picture nominee Arrival — is developing a Disney movie based on Club 33, the exclusive dining club inside Disneyland located next door to the park’s Pirates of the Caribbean ride.
At a time when recent bombs including The Marvels (the lowest-grossing title in MCU cannon) and 2021’s Eternals prompted Disney CEO Bob Iger to announce during a May earnings call that Marvel will shift from quantity to quality — drastically reducing the number of movies and streaming series it releases each year — and Lucasfilm hasn’t theatrically distributed a Star Wars movie in five years, it is clear Disney views Levy as a steadying force. Someone with a long track record of box-office success and producerial excellence developing original IP who knows how to get powerful executives excited in the C-suite. An easygoing yet driven Canadian who knows how to create mass entertainment with global mainstream appeal who happens not to be a gigantic prima donna with delusions of Kubrickian greatness. A guy whose resting bitch face is, by most accounts, a smile.
His reputation is seemingly so nice that his future work isn’t exclusive to Disney. In 2020, Netflix signed Levy and 21 Laps to a rich “nine figure” first-look deal that has resulted in the high-viewership series Unsolved Mysteries and hit lit adaptations like The Perfect Couple and All the Light We Cannot See. “I’ve worked closely with Shawn over many years now and he really always brings that spirit of respectful partnership,” says Netflix’s chief content officer, Bela Bajaria. “He has an intense work ethic and he brings this culture of kindness around him. He fosters that in his company and on his sets, and that’s important” — just as important as his demonstrated ability to reach the increasingly elusive four quadrants.
“He wants to connect with a broad audience,” adds Bajaria, “and has an eye and a passion for a story that can be widely loved around the world.”
Shawn Levy's movies The Adam Project (Netflix) and Free Guy (20th Century Studios), both starring Ryan Reynolds. From left: Photo: Doane Gregory/NetflixPhoto: 20th Century Studios
Shawn Levy's movies The Adam Project (Netflix) and Free Guy (20th Century Studios), both starring Ryan Reynolds. From top: Photo: Doane Gregory/Netfli...Shawn Levy's movies The Adam Project (Netflix) and Free Guy (20th Century Studios), both starring Ryan Reynolds. From top: Photo: Doane Gregory/NetflixPhoto: 20th Century Studios
The baroquely plotted Deadpool & Wolverine picks up with Reynolds’s Deadpool/Wade Wilson feeling existentially adrift after being rejected by both the Avengers and X-Men; he hangs up the blood-red tactical suit and picks up a job selling minivans. But Wade is unwillingly recruited by the Time Variance Authority (immediately familiar to viewers of Disney+’s Loki) to save the world from imminent annihilation by restoring its “anchor being”: a person whose death has basically triggered a cosmic self-destruct button. That being is, of course, the now 55-year-old Jackman’s Wolverine/Logan. Jumping multiverses, Deadpool finds an alternate, not-dead Wolverine — the “worst Wolverine,” according to Matthew Macfadyen’s TVA bureaucrat, Paradox — an even more reluctant antihero who also happens to be a depressive alcoholic. The two ultraviolence-prone, indestructible frenemies embark on a Midnight Run–like buddy time-cop odyssey, something of an art-imitating-life parallel considering how much Marvel has riding on Deadpool & Wolverine saving the MCU from sagging Tomatometer scores and declining audience shares.
Levy and fellow Canadian Reynolds met before there was any discussion of Levy directing a third Deadpool — before the character could proclaim himself “Marvel Jesus” with eerie prophecy. They both knew Jackman, who had worked with Levy on the 2011 sci-fi sports thriller Real Steel and was chummy with Reynolds through their connection in the X-Men films. He promised the director, “If you two start working together, you’re never going to stop.” They eventually paired up on the 2021 video-game action-comedy Free Guy (which earned a surprisingly robust $331 million worldwide on a $120 million budget) and Netflix’s sci-fi dramedy The Adam Project. It was during the final shooting days on that project when Reynolds floated the idea of returning for a third installment behind the cowl — but only if Levy directed. “’I know you’re going to say no, but I’m going to work on you until I turn that into a yes,’” Levy recalls Reynolds saying. “I made a false assumption he had a sense of how life-swallowing and relentless these films are,” Reynolds explains in confirmation.
In Levy, Reynolds had found a kindred spirit — a former bit-part TV actor and USC film-school grad with an extensive filmography of big if middlebrow studio comedies that also feature recurring stars, including The Pink Panther and Cheaper by the Dozen (both with Steve Martin), three Night at the Museum movies (all with Ben Stiller), and a duo of Tina Fey films, Date Night and This Is Where I Leave You — yet someone with precisely zero superhero bona fides. Maybe even more notably, there was nothing in Levy’s largely family-friendly filmography to suggest he could come up with fanboy-baiting dick jokes like Deadpool’s fourth-wall-breaking preamble to fighting with Wolverine: “Get your special sock out nerds, this is going to get good.”
Within weeks of Levy starting work, D&W’s major plot points, emotional arcs, and many comic beats had been written. Then came the meta-narrative jokes lampooning the shotgun studio marriage behind the film (in voiceover, Deadpool muses: “I wasn’t sure I’d ever be back. Disney bought Fox. There were a bunch of rights issues”), Feige’s role in it all (“Hey, wanna do some cocaine?” Leslie Uggams’s Blind Al character asks Reynolds in a sequence included in the movie’s red-band trailer. “Cocaine is the one thing Feige said is off limits!” Deadpool hisses in response), and Marvel’s overarching box-office cold streak (“Welcome to the MCU. You’re joining at a bit of a low point,” Wade tells Logan in a moment of crisis. The bit was written before The Marvels tanked). “No one is safe,” Levy says, grinning. “The fun part is the self-referential awareness. It is a writer-director’s dream because you’re able to comment on the thing you’re making while you’re making it.”
Notably, Deadpool & Wolverine does not function as a chapter-like installment in the studio’s greater franchise. “Ryan and I told Kevin, ‘It’s not going to be a setup for another movie. It’s not going to stress itself about how it feeds into and connects to nine other movies. It’s going to be these characters. We’re going to respect canon but this movie is going to be its own thing,’” says Levy. “There was no arm wrestling. And we never felt pressure to have this movie service a greater vision. The MCU pressure was eliminated almost instantly by Kevin.”
Reynolds is also quick to dismiss the idea they had to fight anyone at Marvel for creative control over the decision. “I don’t think either of us ever look at the studio or executives as something to be managed,” he says. “Going to work with Kevin Feige or Marvel co-president Lou D’Esposito and presuming it’s ‘us versus them’ is an idiot’s game and suggests to me inexperience.”
Shawn Levy produced both Arrival and Stranger Things.From left: Photo: Jan ThijsPhoto: Jackson Davis/Netflix
Shawn Levy produced both Arrival and Stranger Things.From top: Photo: Jan ThijsPhoto: Jackson Davis/Netflix
Like Bajaria and Reynolds, Levy’s other collaborators — including 21 Laps partners Dan Levine and Dan Cohen — tend to hyperventilate when describing what they like about working with him: his Energizer Bunny worth ethic, bountiful creativity, ability to play well in the Hollywood sandbox and bring things in on time and under budget. (Principal photography for Deadpool & Wolverine was completed in a brisk 69 days, one of the shortest shoots in Marvel history, with no reshoots.)
“It’s very common on a lot of projects but especially movies at a very high level, that things can go on tangents and take forever,” says Cohen. “A lot of calls can go to a sideways place. And whether it’s a three-minute or an hour-long call, it’s rare where we get off the call and the ball hasn’t been moved further downfield. So, yes, the energy’s infectious and he’s able to bring everyone into their A-game in terms of excitement and focus on the project. But there is also an inherent forward progress to each interaction with Shawn — trying to help a project find its vision, its start date.”
Feige did not consent to an interview, but issued an appreciative statement that praised Levy’s “energy and enthusiasm,” his “incredibly rigorous approach to his craft,” and a “perfectionism that never lets down.” Reynolds also notes a “desperate fear of failure” he and Levy share. But the director’s superpower is most likely his ability to please crowds with broadly popular fare. “People are like, ‘Well, what’s your brand?’I’ve very willfully avoided being one thing,” Levy says. “You wouldn’t look at Night at the Museum, Free Guy, Adam Project, and This is Where I Leave You and connect those dots,” adding, “I’m not looking to make movies and shows for an audience of seven cool kids in the corner. I build stories for populist entertainment.”
Nonetheless, according to Levy, Lucasfilm president Kathleen Kennedy personally reached out to him and praised a certain connective trait in the shows and films he’s been behind: “joy and fun and delight. I think — not I think — I know Kathy wants me to develop a movie that takes Star Wars and steeps it in those values.” In an interview last year, Levy described the September 2022 meeting with Kennedy in which she laid out certain terms of his potential employment. “Her central mandate was, ‘I want a Shawn Levy movie,’” the director recalled. “‘I want a story and a tone that reflects you and your taste and what you bring to movies — to a Star Wars story.’” (A Disney spokesman said Kennedy was unavailable to comment.)
The last Star Wars trilogy enraged fans and progressively lost steam at the box office, with Episode IX — The Rise of Skywalker taking in $515 million, or just under half of what Episode VII — The Force Awakens earned worldwide ($936.6 million). Like Feige, Kennedy is notorious around Hollywood for offering precisely the opposite of creative autonomy to filmmakers. In 2017, reportedly unhappy with co-directors Phil Lord and Chris Miller’s progress on Solo: A Star Wars Story, she fired the successful duo (behind 21 Jump Street and The Lego Movie franchise) mid-shoot and replaced them with Ron Howard. Similarly displeased with Gareth Edwards’s director’s cut of Rogue One, Kennedy sidelined the British filmmaker and brought in rewrite ace Tony Gilroy to oversee millions of dollars in reshoots. She also hired and fired Josh Trank (2015’s Fantastic Four), Colin Trevorrow (Jurassic World), and Game of Thrones showrunners D.B. Weiss and David Benioff over “creative differences” before any of them could get a Star Wars at-bat.
Still, Levy remains positive. “I’ve built my career on original movies and original shows, and it’s interesting that 20 years plus of making original stories has led to this moment where I’m being trusted with the crown jewels of IP,” he says. “It’s a little surreal.”
So is an Avengers installment in his future? “I intend to make more Marvel movies in my life,” the director tells me, politely refusing to be pinned down on when or what those will be. And while he describes putting the claws back into the Marvel Cinematic Universe as the “most obsessive infatuation I’ve ever had in my creative life,” he understands developing a Star Wars movie for himself to direct will have its challenges, too. With Deadpool & Wolverine finally reaching theaters, the director says he isn’t sure which movie franchise he’ll tackle next, only that next week, he will return to production on season five of Stranger Things, where he plans to direct two episodes.
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"1":1,"6":6,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(12),signInButton=dom.find(".user-signin"),signOutButton=dom.find(".user-signout"),globalNav=dom.find('[class^="global-nav"]'),body=dom.find("body"),dropdownItems=dom.findAll(".dropdown-wrap"),gtm=require(1),appendLandingPageParams=require(135),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let o=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove("open")})}function gtmSendReport(e,n,t){let o={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),auth.isSubscriber()&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}dropdownItems.forEach(function(e){e.addEventListener("click",function(){e.querySelector(".dropdown").classList.toggle("open")})}),body.addEventListener("click",closeDropdowns),document.addEventListener("keydown",closeDropdowns),globalNav.addEventListener("click",function(e){let n=e.target;n.classList.contains("global-nav-track")&>mSendReport(n.text,n,"global-nav-link")}),module.exports=init;
}, {"1":1,"4":4,"12":12,"124":124,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(406),Fingerprint2=require(408),DS=require(407),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(406),_debounce=require(182),_sortBy=require(205),page=require(124),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');document.querySelector('script[data-name="concert-ads"]')||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log("MESSAGE: Timeout for A9 load exceeded, aborting"))},500)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.pubads().refresh([t],{changeCorrelator:!1})}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute("data-name"),r=e.getAttribute("data-sizes"),d=e.getAttribute("data-label"),c=e.getAttribute("data-site");n=e.id,r&&r.length?(r=r.split(","),a=[],_map(r,function(e){e=e.split("x"),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add("oop"),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.cmd.push(function(){var e,t,o,n=page.getMeta("article:tag"),s=page.getMeta("author"),r=i.location.href,d=(e=a.head.querySelector(".head-gtm"),t=a.body.querySelector(".gtm"),e&&"top"===e.getAttribute("data-gtm")?"gtmtop":t&&"bottom"===t.getAttribute("data-gtm")?"gtmbottom":"");o=[],_forEach([n,s,d],function(e){_forEach(e.split(","),function(e){(e=e.trim().toLowerCase().replace(/\s/g,"-").replace(/\'|\’/g,"")).length&&o.push(e)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=""},this.getAdCount=function(e){var t,a=0,i=Object.keys(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"124":124,"182":182,"205":205,"268":268,"274":274,"406":406,"409":409}];
window.modules["cid.legacy"] = [function(require,module,exports){"use strict";DS.service("$cid",function(){var r=Math.floor(100*Math.random());return function(){return"cid-"+ ++r}});
}, {}];
window.modules["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"cid.legacy":"cid.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy"}];
window.modules["facebook.legacy"] = [function(require,module,exports){"use strict";DS.service("facebook",[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === 'string' && key.match(/\.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = '';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]