Perhaps Russell Crowe shouldn’t have compared himself to his The Nice Guys co-star Ryan Gosling in his Saturday Night Live monologue, considering how flawless the Gos’s episode was in comparison to his. This weekend’s SNL with musical guest Margo Price had some genuinely funny moments, but Crowe didn’t have much to do with them (save for his portrayal of a “student of genitals,” and really, what person could go wrong with writing like that?).
It’s true that this episode was a mixed bag, relying heavily on pre-taped sketches for its biggest laughs. After a season of particularly solid first-time hosts, such as last week’s Peter Dinklage, Adam Driver, Ronda Rousey and the aforementioned Gosling, Crowe didn’t particularly wow. He did put his abundance of experience playing dramatic and aggressive characters to good use, plus had great support from the cast. Beck Bennett was especially on his game this episode.
As for the rest of the show, Weekend Update had a stronger first half than second, and we saw two out-of-nowhere cameos from Al Sharpton and Jason Sudeikis. The pre-recorded sketches were all winners, and the writers made good use of the upcoming New York primary election to drive the show’s political material forward, thankfully in a non-Donald Trump direction (I fear even the sight of Darrell Hammond’s impression is starting to weigh on us psychologically).
Now let’s take a closer look at this weekend’s wide range of sketches. Next week, Julia Louis-Dreyfus returns to host for the third time, her first since 2007. I don’t know about you, but I can practically already see the Veep parody with Kate McKinnon as Hillary Clinton.
Hillary Clinton Cold Open
Taking their focus briefly away from the GOP race, SNL caught up on a week’s worth of Hillary Clinton headlines by having Kate McKinnon address her recent string of losses to Bernie Sanders. Hillary declares herself “this election’s Rudy” before recapping her recent trip to New York City, a.k.a “The Fat Apple.” Of course SNL should thoroughly mock Clinton’s Metrocard snafu, which they did here as well as on Update. The subway footage was a nice addition to the usual cold open, as well as Clinton’s props like the three-eyed raven from Game Of Thrones. Now I just wonder if Susan Sarandon will respond to that diss on Twitter?
Russell Crowe Monologue
Russell Crowe didn’t host SNL back in 2000 or 2001 when Gladiator and A Beautiful Mind were massive hits, perhaps in part because his reputation as an intense actor was quickly being replaced by his real-life anger management problems (and one iconic South Park episode). That was a long time ago, but SNL still thought it would be best if Crowe opened the show by being self-deprecating about the lack of humor in his work. Cutting away to clips of his best known movies helped remind us why he was there, but little else. This one could have benefitted from a cast member assist (or two). Too bad they just used the audience Q&A format on Jonah Hill.
Preparation H Ad
Kicking off a night of solid non-live sketches (as well as Beck Bennett performances), this did a great job building from a totally believable Preparation H commercial to one hilarious confrontation after another. If you’ve ever watched a commercial where a coy stranger offers someone a “hot tip” and acts like it’s their little secret, you’ll appreciate how Bennett somehow senses that Taran Killam’s butt hurts and comes to his rescue, only to later repeatedly blow up his spot in front of his date and friends (Kate McKinnon, Sasheer Zamata, and Michael Che). Bennett commits to being ridiculously sincere about hemorrhoid treatment while saying things like, “Your butt was on fire when we met!” It almost sounds romantic when he says it.
Politics Nation: Voter I.D. Disaster
It’s hard to believe that Kenan Thompson has been doing his impression of Rev. Al Sharpton for over 10 years – that is, until you see them side-by-side and realize how much the real Sharpton has changed. Thompson might even need to pass the torch to Jay Pharoah if the MSNBC host (and one-time SNL host back in 2003) loses any more weight. The disparity between Kenan’s impression and the real-life Sharpton playing a statistical analyst was the bulk of the humor in sketch about the voter I.D. laws and the presidential candidates’ popularity with black voters. That, and Thompson-as-Sharpton’s malapropisms like “Disen-french fries.” Having the real-life Sharpton assist on jokes about Bill Clinton crashing the BET Awards after-party and Ted Cruz being a sneaky little mouse was interesting, but kind of random. And we still hadn’t seen Crowe.
Interactive Museum Exhibit
Finally, Crowe joins the cast. Well, sort of. A hologram of Crowe as King Henry VIII does, as the cast parades past and takes abuse from the 3-D image. This sketch eased Crowe into the comedy by having him portray something familiar: an aggressive man from another period. The first time he yells “Bear me a son!” at Vanessa Bayer is genuinely shocking, and Crowe does a great job making everyone uncomfortable with lines like, “Open your legs and take my seed,” calling Kenan Thompson a “blackamore,” and saying Cecily Strong has an odor (but that he still wants her to bear his child). It ends on an even stronger (a.k.a more uncomfortable) note when he falls in love with Aidy Bryant’s “ample jugs,” and makes her the first SNL woman in history to be felt up by a hologram (that we know of).
Match Finders
At this point, I don’t even want to see a game show sketch unless Kenan Thompson is playing the host. He has a knack for driving things along while undercutting the eccentric guests, no matter what the subject of the game. In this case, eligible and slightly drowsy bachelorette Lisa (Cecily Strong) has to choose between three men: an Instagram model with a glass eye (Beck Bennett), a Best Buy employee with bad pick-up lines (Pete Davidson), or a German professor and self-proclaimed “Student of genitals” (Russell Crowe) who promises to lead a “subtle yet focused campaign” on her clitoris. This is definitely Crowe’s funniest performance of the night, if only for his commitment to not cracking up when saying the line, “My doctor says if I munch one more box…” in reference to Michael Douglas’s throat cancer. Wow. As a bonus, this sketch also reminds us why you should be wary of guys who suggest dinner at Dorsia.
Weekend Update
The upcoming New York primary gave this Weekend Update a refreshingly Trump-free theme, with the focus being on Sander’s win in Wyoming, Hillary Clinton’s multiple Metrocard swipes, and Sanders’ own problem with tokens (both on the subway and at his predominantly white rallies). Michael Che drove the point home that treating a subway commute like a novelty is annoying to New Yorkers with a slew of crazy things it sounds like he’s actually seen underground. “The world’s largest penis on the world’s poorest man” is way too specific.
On the GOP front, Ted Cruz got a personal message from Colin Jost: “On behalf of all New Yorkers, please don’t come here,” which got a huge applause. Jost dug into Cruz for his previous disapproval of New York “values” by confirming what the candidate should have already known (“We don’t have values in New York – that’s why we all came to New York”).
Next, Kate McKinnon brought back her character Deenie, a.k.a “Somebody’s mom” to talk about The People v. O.J. Simpson and also to eat the leftover brussels sprouts and imitation crab that she brought from home. After accurately reminding us that the vegetables “Smell like a fart but taste like a burp,” she caught us up on her soap starring “Mustache” and a porno she accidentally watched because of the “Friggin’ clicker.” Oh, and she eventually did talk about American Crime Story, starring “Black Mr. Clean” and “Skunk Hair From Friends.” Of all the Kate McKinnon desk characters, Deenie might be my new favorite.
As has been the case during this election season, the second half of Update dealt with wackier news stories about license plates, a Speedy Gonzales movie and even a stabbing on the subway, which is maybe more sad than wacky. Bill Clinton got another mention, which makes me wonder if there’s any chance that the possible future first gentleman would make a cameo on the show this season (although I guess that would be opening up a Monica Lewinsky-sized can of worms).
Also returning to the desk this week was Kyle Mooney’s Bruce Chandling to talk about sports, but with less success than McKinnon’s reprisal of Deenie. I’m a big fan of this hacky standup comic character with a lot more going on underneath the surface, and when Mooney brought him on last November, he brought a lot more energy that built and then gradually cracked. This time, the pacing was off, and his bad-on-purpose jokes didn’t have time to build before he broke down, so the audience wasn’t as on board with the awkward low points. Furthermore, the last audience even joined in to finish his (impossibly dumb) catchphrase. This time not so much, and Che seemed so eager to talk to Mooney about how it went that he almost forgot to say his “From Weekend Update…” sign-off. I’d love to see Chandling in a sketch one of these days.
100 Days In The Jungle
After last week’s amazing parody of Naked & Afraid, this week we saw another survival-based reality show parody, only with less nudity and more eating of duck vagina. Taran Killam, Cecily Strong, and Pete Davidson play contestants on the Survivor-like series (Beck Bennett really nails the Jeff Probst look) who are surprised with visits from their loved ones, except for Davidson, who is surprised with his uncle’s creepy friend Terry (Russell Crowe). Davidson’s beleaguered young man is a funny as a counterpart to Crowe’s crazy energy, even if this one didn’t really go anywhere. Plus, everyone has that one family acquaintance who would take a five-year old to see Basic Instinct, right?
Pogie Pepperoni’s
The second pre-taped sketch of the night was a classic Good Neighbor style video in which Kyle Mooney and Beck Bennett play new “Pogie Pepperoni’s” employees enthusiastically learning the ropes from a totally over-it Leslie Jones. As ridiculously sarcastic super fans, the guys can’t believe their luck landing a job at the Chuck E Cheese-style establishment, even going so far as to be star-struck by Pogie, a.k.a. Pete Davidson in a raccoon suit. It heightens as all good sketches do (to the point where someone’s head explodes) and finishes off with a black and white “In memoriam” reel of the guys’ best moments on the job. May they rest in peace.
Shanice Goodwin
The first half of this episode was particularly light on Leslie Jones, but she finally got her leading role in this 10-to-1 sketch as Shanice Goodwin—Ninja. You can’t really overthink this one, and I think the writers were also working within the parameters of what Crowe could most feasibly play (Russian mobster, check). As soon as Goodwin tells her Mr. Miyagi-type (Bobby Moynihan), “I’m gon’ do some ninja stuff,” you know where this one is going. Apparently “ninja stuff” mostly involves doing cartwheels, hiding behind a newspaper, and saying “I am the wind” before busting wrestling moves on unsuspecting villains mid-monologue. You know, ninja stuff.
Oprah
Rounding out the night was a third pre-taped sketch, and a totally surreal one at that. SNL writer and former featured player Mike O’Brien returns to the screen as none other than Oprah Winfrey, portraying the queen of all media in a biopic trailer that, on paper, seems totally feasible (except for the part where Oprah is played by a tall, skinny white comedy writer who says things like “You get a car, she gets a car, all you knuckleheads are gettin’ cars!”). Having O’Brien speak as he would normally while saying things he thinks Oprah would say is funny on its own, especially when he’s explaining why he’ll be on every single cover of “Oprah” magazine. Then there’s the deeper satire of whitewashing in Hollywood, coming from a show has often been accused of such racial disparities itself. And then you have the added layers that are Kyle Mooney’s nightmarish Michael Jackson impression and Jason Sudeikis making a cameo in The Color Purple. I’m still not sure exactly what to make of this sketch, but I think it might be brilliant.
So Shoot, What Else?
“See, New Yorkers, I’m just like all of you: I never sleep. I’m in a hurry to get to work and when I’m running, I really hate it when a slow, old Jew gets in my way” - Hillary Clinton.
In case you missed it, there was a title card remembering Merle Haggard after Margo Price’s first set.
I wonder if it’s too soon to hope for a Ghostbusters sketch before the end of the season (with a Kristen Wiig/Melissa McCarthy cameo, of course)?
Dear whomever had to make that graphic of a rat masturbating on Update: congratulations on making it surprisingly adorable.
“He doesn’t deserve to eat at our Bubba Gump Shrimp Company” might be my new favorite insult.
Between that yorkie dog freaking out on Bobby Moynihan’s lap in the jungle sketch, and him seeming to choke on water during the ninja one, I’m just happy he made it to the end of the show alive.
It’s too bad Jon Rudnitsky’s Tom Cruise impression wasn’t around 10 years ago.
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(3),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(136),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,"3":3,"12":12,"124":124,"136":136}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(408),Fingerprint2=require(407),DS=require(406),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(408),_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,"408":408,"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","aaa-module-mounting.legacy":"aaa-module-mounting.legacy","ads.legacy":"ads.legacy","facebook.legacy":"facebook.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();
// ]]