ByBilge Ebiri,
a film critic for New York and Vulture
Photo-Illustration: Vulture; Photos: Newmarket Films, Universal Pictures, Walt Disney Studios Motion Pictures, Warner Bros. Pictures
This article was originally published on June 18, 2018. It has been updated to include additional movies. At the 2024 Oscars, Christopher Nolan won the award for Best Director for Oppenheimer.
The long-awaited (and much-speculated-about) Oppenheimer is here, and the film seems like a major turning point for Christopher Nolan. Of course, given the ambitious and obsessive nature with which he tackles all his projects, every Nolan film feels in its moment like the biggest one of his career. So where does Oppenheimer actually fit in the director’s filmography?
Hold up! Before you go any further, know this: Christopher Nolan is an exceptional filmmaker who has made many great movies. As a result, any ranking of his films is bound to wind up with at least a couple of amazing titles near the bottom; that’s the kind of problem most directors wish they could have. So let’s take a look back over his career and figure out which of the director’s films were the masterpieces, and which ones were merely near-masterpieces. Yes, this is something of a dangerous endeavor, given the fervency with which Nolan’s work is debated — by both his obsessive fans and his quite vocal detractors. Anyway, here they are.
12. Following (1998)
Nolan’s ultra-low-budget 1998 directorial debut was cobbled together while he was working full-time, using available light and cheap film stock. It does feel very much like a student effort: ambitious, awkward, bursting with ideas but often downright amateurish. Still, you can see the talent, and there are lots of fascinating elements here that would reemerge later: a nonlinear narrative, manipulative characters, a twist ending, the human psyche represented in material form. And the irony at the movie’s center — about a man who robs people to make them better appreciate their lives — is pure Nolan. (Also, the lead thief’s name is Cobb, the same as the head thief in Inception). Anybody interested in the director’s films should check this one out. But its technical limitations, combined with Nolan’s own inexperience, make it one of his weaker works.
11. Insomnia (2002)
This adaptation of the 1997 Norwegian crime thriller — about a troubled cop with a past who, while investigating a murder in small-town Alaska, accidentally kills his partner and then tries to cover up his crime — showed that the director could go from making low-budget indies to successful studio projects. (He has said that in many ways this was the most important stepping-stone in his career, because it allowed him to ease into big-budget filmmaking.) Insomnia is impressive in many regards: Al Pacino is effectively haunted as the lead, and Robin Williams, at the time eagerly trying to shed his image as a cloying funnyman, is appropriately creepy and pathetic as the suspected murderer. Plus, there’s loads of atmosphere. But the movie is also, at times, dreadfully dull. The somnambulant mood may be partly intentional, but it’s also wearying.
Nolan followed up the runaway worldwide success of The Dark Knight with a look at Batman brought low, his back broken by Bane (Tom Hardy) and thrown in a pit-prison where he’s forced to watch Gotham destroyed from afar. And yes, it was a huge hit, but how could it have been anything other than a disappointment after something like The Dark Knight?
That said, this one doesn’t get enough credit for how effectively it captures the hero’s feeling of helplessness — as the city’s bridges and buildings are leveled, its people pitted against one another, the very fabric of society ripped asunder. For anyone who’s been following Bruce Wayne’s efforts to try and make Gotham a better place, this is all quite heartbreaking to watch. There’s plenty of great stuff here, from Anne Hathaway’s jaded, sassy Catwoman to some eye-popping action sequences. It might be the most epic of Nolan’s three Batman entries. Until Dunkirk, it was his one film that could be called a war movie. But at times it seems as if the director has bitten off more than he can chew, as he wrestles with effectively trying to convey the villains’ evil plan. Plus, in order to truly show the breakdown of society, and the existential threat this represents, Nolan needs to condemn the people of Gotham a bit … but he pulls back, settling instead on vagaries.
9. Batman Begins (2005)
It didn’t seem at all likely that Christopher Nolan would be the one to reinvent the modern superhero movie; his forte seemed to be mind-fuck thrillers, not action spectacles, and this was before young, newish directors were regularly handed billion-dollar franchises. But his take on Batman (immeasurably aided by Christian Bale, still the most talented actor ever to play the Caped Crusader) was both brilliant and deceptively simple: Batman had always been the “relatable” superhero — the one who didn’t have magic powers, just money, vengeance, and will — so why not give us a Batman grounded in something resembling reality? Some will point to this movie as the beginning of turning everything into a “dark, gritty reboot,” but Nolan’s model borrowed the DNA of Richard Donner’s original Superman, with its matter-of-fact, ground-level approach to capes-and-tights derring-do. Bruce Wayne’s transformation into the Dark Knight is presented with uncommon psychological realism, set in motion by a somewhat-plausible series of events that explain how he became such a determined, effective fighter. The film only really falters in its last act, with a somewhat underwhelming final action set piece. Oh, and Katie Holmes seems strangely miscast as Bruce Wayne’s love interest/moral North Star.
There are parts of Tenet that feel like they were crafted as a direct response to those who criticized Inception for being too exposition-heavy. You can almost hear Nolan yelling, “Okay, wise guy, how do you like it when I don’t explain things?” Nolan’s most oblique film to date — a sprawling, ornate action thriller in which the heroes can invert their passage through time so that they experience car chases and fights and all sorts of other things in reverse — is also one of his most ambitious, and, weirdly, one of his lightest. We’re told early on in the film that we shouldn’t try to understand it, but that we should feel it; that’s pretty solid advice. Not unlike The Big Sleep, or The Parallax View, Tenet is a movie built out of brilliant, often beautiful setpieces whose overall placement in the broader puzzle is not always clear. That’s not to suggest, however, that the film is frivolous or meaningless. The idea that our future selves can hold sway over our present-day selves is an adorably Nolan-esque notion that plays out across pictures like Memento, Interstellar, and Inception. And how wonderful it is to see a filmmaker tackle a big modern genre movie in such challenging fashion — and on such a massive scale. Maybe some will call it a flop, but if it is, it’s the kind of flop that only Christopher Nolan could have made. It would have been fun to go back to the theater for repeat viewings during Tenet’s initial run to pick apart the timeline and the story, but the COVID pandemic rendered that pretty much impossible for most of us. That said, Tenet might be the Nolan film I enjoy revisiting the most nowadays.
7. Memento (2000)
An absolutely ingenious thriller: The story, told in reverse, of a man who’s been trying to avenge his wife’s death; but his mind can’t form memories, and he forgets who, where, and what he is within minutes, so he has to tattoo his clues on his body in order not to forget them. It’s an ideal marriage of structure and subject matter, as the nature of the storytelling ensures that we in the audience never really know what has happened before any given scene, which mimics the protagonist’s existential haze. This put Nolan on the map with its release in 2000, and is still considered his masterpiece by many fans. Does it lose some luster once you’ve figured it out? Not quite, though nothing can match that electrifying first viewing.
Consider this for a second: Nolan made a movie about high-tech thieves who break into people’s dreams and steal hidden ideas from them, but this time they are asked to secretly plant an idea in a person’s head, so they go into that person’s dream, but in order to hide their actions they have to go several dreams down, so they have to create a dream inside the guy’s dream so they can go into the next dream, then do it again, but they can’t go too far down the dream levels because if they do they’ll be stuck in a dream forever and their brains will melt, and also each level of a dream happens at a different speed, so that five minutes in the real world is an hour in dream time, and things slow down even further the deeper you go within the dreams, but anything that happens in one dream can affect the dream in the next level. Now consider this: Inception was beloved by millions and made $825 million worldwide. Fact: Christopher Nolan knows how to tell a goddamn story.
One of the saddest, loneliest space epics ever made, Nolan’s expansive sci-fi film — about Matthew McConaughey and Anne Hathaway traveling through a wormhole to another part of the universe in an effort to find a new home for humanity — was divisive when it came out, but it’s slowly being acknowledged as one of his best works. It’s certainly his most earnest movie, and maybe the mixture of eye-popping special effects, gee-whiz scientific phenomena, environmental dystopia, and unabashed sentiment was too much for some to take, as if 2001: A Space Odyssey had been hijacked by someone’s therapy session. At heart, this is a story about parents and children, about the fear of letting go, about the need to reconcile your dreams with the needs of your loved ones. At the same time, it’s a movie about survival — how planetary survival and species survival and individual survival often conflict with one another. The way Nolan ties these concepts together in a narrative that mixes heavy-duty scientific theories with nutty sci-fi invention can be jarring. But open yourself up to it, and Interstellar becomes one of the most emotionally overwhelming things you’ll ever see.
4. The Prestige (2006)
Nolan’s sole literary adaptation — based on Christopher Priest’s 1995 novel — also features his most subtle, complex characters. As dueling magicians in turn of the century London, Hugh Jackman and Christian Bale are both charming and sinister in their obsessions with one another. Maybe that’s why, unlike so many other films that rely on “puzzle”-like structures and big twists, The Prestige continues to work so well on repeat viewings; if anything, it improves and gains depth the more you watch it. It’s also a dazzling magic trick in its own right, with an intricate plot that keeps doubling back on itself and throwing red herrings at us. As in so many Nolan pictures, the movie’s structure and its effect on the viewer echo the characters’ own psychological journeys. Nolan understands something about his audience: He lays out everything we need to figure out what’s happening, but it’s all just a bit too macabre for us to put two and two together. So we wait … until that incredibly disturbing, final image. (Aaand then a ridiculous Thom Yorke song plays over the end credits, but the less said about that, the better.)
3. The Dark Knight (2008)
If nothing else, this is one of the most influential movies of our time — the entire DC Universe of superhero tentpoles has basically been built around its success. But none of its imitators have come close to matching the sweep and power of Nolan’s second Batman entry, which is really a gangster epic masquerading as a superhero flick. And at the center of it all is one of the great performances of the decade, with the late Heath Ledger’s wild, disturbing, charismatic turn as the Joker making a perfect foil for Christian Bale’s stolid, wounded, tormented Batman. With a story that could easily have made for three separate movies (and maybe should have) and each insane set piece topped by the next one, this is the rare comic-book film that earns the obsessive quality of its fandom. That’s also because Nolan doesn’t shy away from tackling philosophical, moral, and political issues: When Batman turns all of Gotham’s cell phones into a citywide sonar system, is he essentially confirming Bush-era surveillance tactics? Or is he simply debasing himself and betraying his own ideals — essentially falling into the Joker’s trap? If so, what do we make of the fact that he succeeds? But wait, does he even succeed, or is it the people of Gotham who redeem him by refusing to blow each other up? Nearly a decade after its release, you can still go down any number of rabbit holes thinking about The Dark Knight. There are very few movies — in any genre — about which you can say that.
In J. Robert Oppenheimer, the brilliant (and tormented) physicist known as the father of the atomic bomb, Nolan has found a real-life avatar for so many of his key obsessions: the idea of hidden knowledge that could upend the world; of infernal machines that must never be used; of the way our greatest achievements sometimes become our greatest regrets; of the thin line between heroism and disgrace. In Oppenheimer, he weaves all these themes into a breakneck piece of history. Though technically not a genre movie, it’s faster than most action films and more terrifying than most horror flicks. Oppenheimer also turns out to be the perfect part for Cillian Murphy, who has given many great turns for this director but who gets the role of a lifetime as the scientist who channeled his anxieties and fascination with the quantum world into an earth-shattering achievement, then spent the rest of his life quietly tortured by what he had unleashed. Meanwhile, despite the fact that many of them occupy only a few minutes of screen time, Nolan somehow gets career-high performances from a massive cast of familiar faces. Seriously, I could watch these scientists arguing for hours and hours. The whole film builds and builds and builds majestically — until a shattering finale that might well be the most emotionally resonant moment in Nolan’s entire filmography.
An astonishing war movie, and perhaps the pinnacle of Nolan’s various experiments in editing and structure. In retelling the British evacuation of France in 1940 — the result of an early, disastrous defeat against the Nazis — the director intercuts three narrative timelines of differing lengths, which leads to some surprising twists and turns in the story. But perhaps more importantly, it’s a film that shows Nolan willing to let go a little bit — to trust his audience to get what he’s doing without his having to resort to lots of exposition and dialogue. In the process, it does away with many of the clichés of the war genre: no strategy meetings, no scenes of people explaining what we’re fighting for, etc. Instead, it’s tight, terse, and tense from its opening frame to its last. For what it’s worth — and somewhat ironically — it might also be the most hopeful picture Nolan has ever made.
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();
// ]]