Over the next 18 months, as two trade deadlines and one offseason pass, all 30 teams in baseball will have one eye trained squarely on Las Vegas. The city’s reputation as chaos agent certainly won’t abate on account of baseball holding its most anticipated Winter Meetings ever there. What happens in Vegas will reverberate for the next decade.

For those who have yet to hear about the free-agent class of 2018-19, here’s a sampling: Bryce Harper, Manny Machado, Clayton Kershaw, Josh Donaldson, Daniel Murphy, Dallas Keuchel, Charlie Blackmon, Andrew Miller, Zach Britton, Craig Kimbrel. There are dozens more. Teams will guarantee $3 billion to players that winter. The number could exceed $4 billion.

Question is, who’s going to do that spending?

With the help of Baseball Prospectus’ indispensible Cot’s Baseball Contracts, Yahoo! Sports analyzed the future payrolls of all 30 teams in hopes of offering some context to handicap that offseason. Over the next year and a half, of course, there will be trades, free-agent signings and contract extensions that change some teams’ calculus. A number of teams, though, are positioning themselves to take advantage not just of the frontline players of 2018-19 but ones that may slip through the cracks amid feverish bidding for the top-end talent.

Five best positioned

New York Yankees: More than $50 million come off the Yankees’ payroll this offseason, and by the time 2019 rolls around, they’ve got only $74.2 million guaranteed – less than the Royals or Marlins. Were Masahiro Tanaka to opt out of his current deal this offseason, the Yankees would rank 19th in committed money for ’19.

All of which is to say: Baseball should be scared. The upper reaches of Yankees management want Bryce Harper, and they can get him. If they really wanted to shoot the moon, they could target Harper and Machado. It’s a lot easier to spend on pricey free agents when they’re young – Harper and Machado will hit the market at 26 – and when there’s a core of stars like the one New York is building.

The Yankees’ patience in building the Aaron Judge-Gary Sanchez-Luis Severino core should be applauded. A few years ago, after they’d committed to going young, the Yankees received a whopper of a proposition from the Braves, who were about to start their rebuild: Jason Heyward, Andrelton Simmons, Melvin Upton Jr., Chris Johnson and David Carpenter for Judge, Sanchez, Severino and pitching prospects Ian Clarkin and Manny Banuelos. The Yankees said no. And because of it, nobody in baseball is in a better place to pounce in the 2019 offseason.

Philadelphia Phillies: The Phillies are a close second to the Yankees. Their current roster isn’t nearly as set. Philadelphia is near the nadir of its rebuild, and no surefire All-Star has revealed himself among their hoarding of young talent. So why the optimism? Nobody has more money to spend than the Phillies.

With only Odubel Herrera under contract, the Phillies’ $5.35 million committed to 2019 may be the lowest in the game. (If Oakland declines Sean Doolittle’s $6 million option, the A’s will be on the hook only for his $500,000 buyout and push the Phillies to second-lowest payroll.) Over a six-year stretch to start this decade, the Phillies’ payroll never dipped below $145 million. Between the savings from the last two seasons and the need for impact-type talent, the Phillies are prime candidates to raid the market aggressively.

Chicago White Sox: Speaking of good shape, the White Sox might have the best farm system in baseball right now – hello, Yoan Moncada, Michael Kopech, Luis Robert, Alec Hansen, Reynaldo Lopez, Lucas Giolito, Zack Collins, Dane Dunning and Zack Burdi – and have plenty of money to spend. If they hold on to Jose Quintana, their guaranteed money for 2019 is $16.55 million. Should they deal him and bolster their prospect hoard that much more, they’ve got $6.05 million on the books. Never have the White Sox been what one would call big spenders – their middle-of-the-pack $132 million payroll last year set a team record – but the opportunity to complement that array of young talent with free-agent production feels just about perfectly timed.

Los Angeles Dodgers: Gone after the 2018 season is $63 million worth of the aged, infirmed and unproductive. And should Kershaw opt out of the final two years of his deal, the Dodgers will be staring at a payroll of less than $75 million, which is somewhere between a third and a quarter of what it can be. And when you combine that with a Corey Seager, Cody Bellinger, Julio Urias, plus the pitching plethora that dots every level of their minor league system, the Dodgers are the West Coast version of the Yankees, a team with the right players at the major league level and in the minor leagues to support a free-agent bonanza. From 1977-1981, the Dodgers faced the Yankees three times in the World Series. Even in an era of more parity, the possibility of a repeat 40-something years later doesn’t seem altogether farfetched.

Story continues

Houston Astros: As good as the Astros are today, their lack of long-term commitments gives them even more wiggle room. Only Josh Reddick and Yuli Gurriel are under contract for 2019 at a total of $23.9 million. Their arbitration class that year is no joke. George Springer in his third year, Lance McCullers and Ken Giles in their second, Carlos Correa, Chris Devenski and Michael Feliz in their first. And there is the matter of Jose Altuve, whose 2019 option for $6.5 million is his final year before free agency. These are first-world problems. If the Astros play this right, their window will stay open well into the 2020s.

View photos The Giants still hope to build around catcher Buster Posey. (AP) More

Five worst positioned

San Francisco Giants: Nobody owes more money to players in 2019 than the Giants, who have nearly $113.4 million guaranteed. That could dip back into eight figures if Johnny Cueto opts out of his deal this year, but that doesn’t lessen the burden on San Francisco. Perhaps this season is an anomaly and the core on which they’re spending – Cueto, Buster Posey, Brandon Belt, Brandon Crawford, Jeff Samardzija, Mark Melancon – is enough.

Barring a surprising turnaround in a farm system that scouts believe lacks impact players, the Giants will need to supplement that group through two difficult-to-stick-the-landing avenues: free agency or undervalued veterans. And no owner, not even one as munificent as the Giants’, who pushed their payroll past $200 million last season, is going to stand by as a team treads water with that sort of cash outlay. The closest facsimile to these Giants is the late 2000s Phillies. They were great, but when it ended, it ended fast. Every core player for the Giants will be on the wrong side of 30 in 2019. That’s a bad place for any team to be.

Detroit Tigers: Following the death of owner Mike Ilitch, the Tigers are widely expected to slash payroll. Here’s the thing: It’s not going to be easy. The Tigers owe more than $111 million in 2019 to Miguel Cabrera (36 that year), Justin Verlander (36), Justin Upton (31), Jordan Zimmermann (33) and Prince Fielder (35, retired). Cabrera’s contract, which extends another four years, plus two options on top of that, is untradeable. Zimmermann’s is, too, on account of his performance. Upton is striking out more than ever and isn’t even 30 yet. And while Verlander has value, he also has 10-and-5 rights to block any trade. The Tigers are going nowhere fast, and it’s only going to get worse before it gets better.

Kansas City Royals: For a small-market team, particularly one with a reputation for low payrolls, the Royals are treading in some big-money territory. Next year their guaranteed money is the seventh highest of any team. In 2019, they remain in the top 10, with more than $80 million committed. If the next few years entail a rebuild – and the Royals’ situation certainly warrants that – this may be more the five-year variety than three-year fixer-upper.

Miami Marlins: The Marlins are the NL version of the Royals, only without the recent World Series ring. They’ve got more than $84 million on the books in 2019, more than half of it going to Wei-Yin Chen, Martin Prado and Dee Gordon. The latter two may be gone via trade, as rival executives believe the Marlins are going to blow up their team this summer or, should the ownership change take more time, this offseason. Considering the poor financial situation they’ll inherit, the new owners aren’t likely to spend their way out of this hole, and even with a solid young core, the Marlins seem doomed to mediocrity.

Washington Nationals: Considering the big contracts they’ve handed out, the fact that the Nationals’ year-end payroll never has exceeded $171 million is rather surprising. It also looms large with Harper. If he gets the expected $40 million-plus per year, will the Nationals really tack that on to a payroll that already owes $102.1 million to Max Scherzer, Stephen Strasburg, Ryan Zimmerman and Adam Eaton? In the same year Anthony Rendon and Tanner Roark are in their final years of arbitration? One year is not going to dissuade the Nationals. They’re as good at shifting and deferring money as any team. But a $40 million-a-year player is pretty close to incompatible with a team that has a payroll starting with a 1, and unless the Nationals are ready to spend around him, Harper is likelier to wind up with one of the aforementioned teams.

Hamstrung

Boston Red Sox: Between the salaries they owe players currently under contract and those due to others hitting arbitration, the Red Sox either need to make a trade or they’ll just sit out the winter of 2019. Best-case scenario is David Price returns and pitches well enough to opt out after next season. If not – and if Hanley Ramirez’s option for 2019 vests – the Red Sox actually will exceed the Giants with nearly $120 million guaranteed. And that doesn’t include big arbitration salaries for Xander Bogaerts, Jackie Bradley Jr., Mookie Betts and Eduardo Rodriguez, among others. The Red Sox’s window is not nearly as large as it may seem for the abundance of talent they have, and they may be as WYSIWYG a product as there is in the game today.

St. Louis Cardinals: The Cardinals have cast their lot with players they drafted and developed, and their nine players under long-term deals will cost $110.5 million in 2019. This isn’t necessarily a bad thing. Among that group, the contracts of Matt Carpenter and Carlos Martinez look particularly good. Mike Leake’s gets better seemingly by the start, and Stephen Piscotty should be a net plus. Kolten Wong and Jedd Gyorko provide nice infield depth. They paid a hefty price for Dexter Fowler, a heftier one for Brett Cecil, and $60 million for three years of a well-past-his-prime Yadier Molina was an overpay in dollars and years. Still, it’s a stable enough foundation that the Cardinals need not worry. They just may not be at the forefront of any big-ticket items.

New York Mets: Forget the $24 million in dead money due David Wright and Juan Lagares and focus instead on the Mets’ arbitration class: Jacob deGrom, Travis d’Arnaud, Zack Wheeler, Wilmer Flores and Josh Edgin in their third years, Noah Syndergaard and Hansel Robles in their second and Michael Conforto, Steven Matz, Rafael Montero and Kevin Plawecki in their first. Considering they’re already paying Yoenis Cespedes $29 million that season, do they really have room on that roster for another $30 million-a-year type? This question isn’t rhetorical; of course they do, because they’re a baseball team in New York. And yet when it comes to finances with the Mets, one never can be certain.

Little commitment, lots of potential

Minnesota Twins: With $24.2 million guaranteed to Phil Hughes, Jason Castro and Byung-ho Park in 2019, the Twins are staring at some dead money. By 2020, everything but a $500,000 buyout for Park is off the books, leaving Minnesota with a completely clean slate. Certainly they’ll hope to have Miguel Sano extended by then, but otherwise, Derek Falvey and Thad Levine have the opportunity to put their stamp on the Twins’ turnaround even more than they already will have.

Colorado Rockies: The good: They’ve got only $23.5 million committed. The not-as-good: It’s to Ian Desmond and Mike Dunn. The good: Nolan Arenado will still be around, in his final year before free agency. The not-as-good: In addition to Blackmon, D.J. LeMahieu is a free agent that year. The good: They may be onto something with their pitching. The not-as-good: It’s still Colorado.

Milwaukee Brewers: The only players under contract for the Brewers are Eric Thames and Ryan Braun, which isn’t a bad duo to owe $25 million. There’s a lot of money in arbitration, but owner Mark Attanasio showed a willingness to raise payroll in 2014, and the prospect of these Brewers becoming the new Royals – a small-market team with a rabid fan base that rallies around a young core – with a payroll to match is very possible.

Cincinnati Reds: One deal lords over the Reds: Joey Votto is getting $25 million a year through 2023, and while his production makes it worth every penny, complementing it with a representative payroll is something the Reds need to do like they did in 2013 and 2014. The Homer Bailey disaster expires after 2019, and Raisel Iglesias’ cheap deal is the only other commitment. So long as they don’t let a slew of arbitration raises jack with their long-term thinking, they’ve got a shot to make noise in the NL Central sooner than later.

View photos Kris Bryant and the rest of the Cubs’ young core gives the team some flexibility to spend. (AP) More

Have money, will spend

Chicago Cubs: In terms of pure talent, of course the Cubs are among the five best-positioned teams. When it comes to free agents in 2019, though, they aren’t in the right place to go after more than one big name and another mid-tier. While only $71.8M is guaranteed for 2019 (Jon Lester, Anthony Rizzo, Ben Zobrist and Jason Heyward), the arbitration raises of Kris Bryant, Addison Russell, Kyle Hendricks, Javier Baez and Kyle Schwarber, among others, will suck up tens of millions of dollars and limit what the Cubs are capable of doing that season. This won’t be stinginess; it’ll be prudence.

Toronto Blue Jays: The financial outlook for 2019 looks sunny, with only $54 million committed. A year later, it’s even better: $16.9 million, which is the sixth lowest in baseball. Never has Blue Jays president Mark Shapiro been a big spender, and the idea of him giving Donaldson the eight years-plus and $200 million-plus he’ll demand simply doesn’t compute. The Blue Jays are more the team that will go on a shopping spree in the second tier, mining it for those who will look good alongside Marcus Stroman, Aaron Sanchez, Roberto Osuna and company.

Baltimore Orioles: Like the Blue Jays, the Orioles never have spent just to spend. In this case, they’re going to need to. The only current Oriole signed past 2019 is Chris Davis. And with one of the five worst farm systems in baseball, the Orioles’ prospects of filling their roster internally doesn’t seem altogether wise.

Could spend but ain’t their style

Cleveland Indians: Already with more than $72 million guaranteed to Edwin Encarnacion, Corey Kluber, Jason Kipnis, Jose Ramirez, Yan Gomes and Roberto Perez, plus a Carlos Carrasco option, the Indians aren’t going to splurge unless a player’s price drops so precipitously they’d be foolish not to (i.e. Encarnacion 2.0).

Tampa Bay Rays: Since 2005, when Stu Sternberg bought the Rays, the most they have spent on a free agent was $21 million in 2014. This isn’t their jam.

Oakland A’s: The A’s flexibility is admirable, especially if some of their young players pan out and give the A’s some momentum in their rebuild. Never are they going to be in the Harper or Machado derby, but their signing of Cespedes and their interest in Luis Robert shows they’re willing to get creative where and when they can. All of this changes, too, if the A’s get a new stadium deal. They’d jump to the Twins/Brewers/Rockies pile.

San Diego Padres: On one hand, the Padres have only Wil Myers under contract. On the other, the last time they spent in free agency did not work out well. With so much of their current money going toward Latin American teenagers, the Padres’ rebuild is at minimum a five-year project. They’ll save their money.

Pittsburgh Pirates: With $38.85 million guaranteed to Gregory Polanco, Starling Marte, Francisco Cervelli and Ivan Nova, the Pirates’ core is solid and cheap. They still barely spend. Last year was the first time they’d gone over $100 million in payroll, and should they trade Andrew McCutchen at any point this year, they’ll dip back beneath it. Which is a shame. With the type of talent they produce, the Pirates deserve a larger payroll and an even greater chance to win.

In limbo

Atlanta Braves: All of this depends on whether the prospects on which the Braves are banking their fortunes pan out. Certainly some are promising, and if the Braves are given flexibility to build around them via free agency, they have a chance to be something. They owe Freddie Freeman, Matt Kemp, Julio Teheran and Ender Inciarte a little more than $57 million in 2019. The owners need to at least double that to give the front office a fair shot.

Texas Rangers: If they pick up Cole Hamels’ option, the Rangers will have $73.2 million committed in 2019. Ownership hasn’t been shy to spend. At the same time, the long-term deals of Shin-Soo Choo, Elvis Andrus and Fielder didn’t exactly work out well, and the Rangers’ hesitation to go back down that path combined with a farm system that looks tapped out for the next year or two puts them in as much of an in-between state as any team in baseball.

Arizona Diamondbacks: Everything, really, depends on what happens with Zack Greinke. At $35 million a year, his salary is practically incompatible with any payroll under $150 million. If he keeps pitching like he has, there will be plenty of opportunity to trade him, and Arizona will have a clean slate to continue the rebuild job that’s off to a much better start – at least at the major league level – than expected.

Seattle Mariners: To blow up or not to blow up. The question all realistic baseball teams ask themselves is a hard one to answer, and in the case of the Mariners, it’s complicated by Robinson Cano’s unmovable contract. Still, just because the injury gods spat all over the Mariners’ attempted overhaul this offseason doesn’t lessen the reality that they’re in the midst of what looks like yet another lost season. Hitting the reset button never is easy, but it’s what smart organizations do when they’re brutally honest with themselves, and between now and then, the Mariners are the likeliest fringe contender to realize it’s better to start over than try to make chicken salad.

Los Angeles Angels: Mike Trout is a free agent after the 2020 season, so the Angels have two years after this free-agent carnival to convince him he’s better off spending his career in Anaheim than New York or Los Angeles or Chicago or Philadelphia, near his beloved Millville, New Jersey. The next time a team hands out a 10-year deal to someone who will be in his 40s by the time the final year expires and one wonders what the potential harm could be, remember this: Albert Pujols is owed $30 million through 2021, and the idea of Arte Moreno spending money for Trout and Pujols and another star to complement Trout – well, it’s not exactly his style. And that’s a shame. Instead of comparing Trout and Harper, imagine them playing next to one another.

More MLB coverage from Yahoo Sports: