All recommendations are made independently of our editors. Services that you subscribe to through our links can earn us a commission.

When Christopher Meloni left the Law & Order: Special Victims Unit in 2011, it was unclear how the show would develop without him. For 12 years, Detectives Elliot Stabler (Meloni) and Olivia Benson (Mariska Hargitay) relationship has been the backbone of some of the most troubling crimes on prime-time television. Their chemistry and camaraderie were legendary and – although they never really got together – one of the most compelling wills – they won’t – they stories in crime.

Hargitay proved to be the beating heart of the show, getting into its 22nd season is still strong, but the what-if and if only Stabler’s sudden departure continues to haunt the fans. It is not difficult to understand. The two – known as Bensler – had the attraction of Mulder and Scully, Castle and Beckett, and Hayes and Addison, but exist in a franchise that is not based on romantic relationships. It’s a sex crime show, after all.

Stabler’s complicated but enduring marriage to his wife, Kathy (Isabel Gillies), threw a wrench into things, leaving him and Benson in personal stasis for the duration of their partnership. Their worlds revolved around one another, leaving little room for much else, especially Benson. This was lovely for some seasons, but got confusing as their years together turned into a life of no real commitment. It’s worth noting that since Stabler’s retirement, Benson has had several serious relationships, becoming a mother, and rising to become SVU captain. As magical as they were, the best thing about Benson and Stabler might be that it never happened.

A decade later, the reunion finally takes place. Meloni will return as stabler tonight in a two hour event. He is slated to appear in an episode of Law & Order: SVU, which in the second hour runs into the series premiere of Law & Order: Organized Crime. Hargitay will also be in both episodes. Information is kept top secret, but Stabler’s return to the NYPD is being pushed “after a devastating personal loss,” according to a series description on NBC. In honor of the upcoming reunion, here are the key episodes of the partnership between Benson and Stabler.

Every major television ship has an “Oh, hello” episode, an episode at the beginning of the series, in which the chemistry between the two characters so indisputable that you can’t help but see them together. The relationship suddenly becomes the core of the show, whether it’s written that way or not. This episode is “Stalked”.

When one of the perpetrators fixates on Benson, the entire gang is nervous. But Stabler is most concerned and becomes her de facto bodyguard. His best moment comes when he comes by in the morning to take her to the station because he was “in the neighborhood”. While drinking orange juice, Benson points out that they live in different counties and says that she wouldn’t do the same for him. Stabler argues that she would take a sip from the same glass. “Well, maybe, but that’s just because you have a wife and kids,” says Benson, before taking another long drink. Oh hello.

With “Closure,” one of the most notable early episodes of SVU, viewers got a glimpse into the hourly breakdown of the judicial process immediately following a sexual assault, including a detailed account of the rape trial. For the first time, the show also contrasts the case with Benson’s sex life. She sleeps with Detective Brian Cassidy (Dean Winters), another young and single member of the team. Benson doesn’t want the one-night stand to become anything else, but Cassidy grows on her and the tension is palpable. “Can you blame him?” Stabler speaks gently from heart to heart about the situation. He reminds them that they are partners “for better or worse” and admits that sometimes things just happen between employees.

On the Bensler front, not much happened in seasons two to five. Stabler was happily married for four years and completely loyal to his wife. During that time, the show also had its first – and arguably best – ADA, Alex Cabot (Stephanie March). Cabot and Benson had a ridiculous amount of chemistry, which translated into a kind of sexual tension that could spawn an entirely new faction of the SVU fandom (to this day, Hargitay and March still play lovingly on the ship when the latter are guest stars).

The respective “couplings” for Benson and Stabler enabled several years of formative partnership without any real threat from romance, especially in “futility” when Benson and Cabot deal with a particularly stressful case that threatens the legal sanctity of rape counselors. When the case is closed, Benson waits for Stabler on the steps of his house. It is the first of many moments when the two seek out each other because no one else can understand what they are doing on a daily basis. Benson shares her fear that what they do isn’t worth the cost, that there will always be another sex offender. “And it’s like having to sell a little piece of yourself to get the job done.” Stabler understands. How could he not? It’s exactly what has slowly ruined his marriage.

In one case he said, she said, Benson and Stabler had each other by their necks throughout the episode. Finally, Stabler admits, “Kathy left me.” She took the children with her and lives with her mother. Benson is speechless and only later in the episode, after they are back on relatively level ground, does she ask what happened. Stabler cites the job as difficult to live with, and Benson jokes, “She should try to work with you.” Nothing is resolved, but the partners reach an agreement.

The romantic tension between Benson and Stabler only increases with the collapse of his marriage. In a trilogy of episodes that begins with “Fault”, this comes to a head when the troupe chases a sadist who has kidnapped two children. The unit’s plan to catch him and save the two children goes awry when the perpetrator stabs Benson in the neck and Stabler rushes to see her instead of recovering one of the children. Benson is fine, but the boy ends up dead. Stabler accuses both of them and fighting ensues.

Later the man holds Stabler at gunpoint. Benson takes the shot but doesn’t take it, too concerned about Stabler suffering collateral damage. Stabler asks Benson to shoot so as not to make the same mistake he made before, but she can’t. Fortunately, a sniper can take out the man and the child is recovered physically unharmed. “We both preferred each other,” says Stabler, adding that it can never happen again or that they can’t be partners. “You and this job are the only things I have left. I don’t want to ruin that.” Benson is destroyed and officially asks for a new partner in the final moments of the episode.

After Stabler confessed his concern to his priest he meets his new partner, another heated man. Benson was assigned to Computer Crimes, though we won’t see her until later when she shows up in the team’s locker room. She watches as Stabler assesses his shirt while they make small talk. Finally, he asks why she didn’t tell him she was switching units. “We needed a change,” she says. “I’m sorry. I should have talked to you. It’s easy – just too complicated.”

SVU detectives are forced to turn to Computer Crimes for help in one case. Benson becomes more involved in the case than intended, and even admits to Stabler that she had no intention of coming back. He jokes that it runs in her blood and she says that “that’s the problem”. In the end, Benson leaves the captain’s office. Stabler accuses her of handing in one of her tech colleagues who beat up a pedophile, and she’s angry that he would even think of her. Finally, Stabler asks what she’s doing in the squad room. Benson replies, “I work here.”

Like skin cells and credit reports, long-term series of procedures tend to change after seven years. In season eight of SVU, Benson was under cover for several episodes with the FBI. Hargitay should go on maternity leave, and the series deserves credit for finding a practical reason for Benson’s absence. Stabler kisses his new partner, but nothing ever comes out, and she leaves shortly after a particularly terrible case.

In “Choreographed,” the episode after the new partner left, Stabler suspects that he will be better off alone could. Benson comes back, of course, and is thrown straight into the case of a deadly love triangle. The partners are tense and only when the case ends in a conversation about organ donation do they begin to go back to normal. After Stabler found out it was the same blood type, he said he would give Benson a kidney and she replied, “Not if I had given you mine first.”

As a case between a couple who are divorced enters near home, Stabler and Benson toast. They throw inconvenience to and fro when it comes to their employees. When Kathy meets with Benson to urge her to speak to Stabler about signing the divorce papers, she admits she used to worry that he would rather spend time with Benson than with her and her family. “The truth is, you know things about him that I will never understand,” says Kathy, adding, “You are his partner. You give him stability. Elliot can’t go on until he feels like he’s on solid ground be. “

At the end of the episode, Stabler signs the papers. Neither he nor Benson can sleep, so they meet outside on the stairs of Stabler’s new apartment late at night. Benson brings coffee for him and tea for himself. Stabler is surprised she’s now drinking tea at night, and it’s confirmation that both are changing. Still feeling the gap between them, both last season and the time between them, Benson asks if they are okay. Stabler shares that he needs space to disagree with her without feeling that this will be the end of their partnership. They come to an agreement and eat late into the night.

When Benson investigates her DNA and finds a half-brother through her raping father, she begins investigating him. The entire investigation is ethically ambiguous at best, but Stabler supports and covers Benson all the way as she deals with the situation. For much of the episode, Benson struggles to be alone. She tells Stabler how much she wants to be part of a family, and he offers her a soothing shoulder massage, acknowledging that family is everything.

Although Benson and Stabler seem to have solved some of their problems with each other, at least superficially, does her captain is still worried about her and orders an independent psychological examination of the partners. The rating is riddled throughout the episode, and Benson and Stabler are faced with the question that plagued them the previous season: Would you save your partner from a member of the public? The appraiser later informed the captain that the two “have a certain level of mutual trust and emotional dependency that affects their effectiveness as police officers”. She concludes that “they’re too close,” but says he should only split them up “if you want to lose your two best detectives”.

Stabler moves home after that in the season eight finale Kathy became pregnant, the result of a one-off reunion between the two of them. Nine months later, Stabler is moved away on a case, and Benson offers to take Kathy to her appointment. On the way there, they get into a car accident. Kathy goes to work while stuck in the car, and Benson works with the rescue workers to stabilize her. When Kathy gives birth in the ambulance, Benson is there to hold her and the baby. When Stabler meets her in the hospital, both the mother and child are fine, but he and Benson are still hugging for a long time.

Around the time Stabler reunites with his family, Benson is making a serious attempt to have their own. Emotions bubble to the surface when SVU is brought to the case of a “kidnapped” batch of embryos from a fertility clinic. Stabler tells Benson that she would be a great mom and however she wants to do it, he will be supportive. She tells him to shut up. Finally, she shares that she started looking into adoption a few months ago. Stabler is upset, but Benson tells him they have been turned down because of their work schedule and lack of an extended family support system. “You’re wrong,” says Stabler. The assurance with which he says it is breathtaking but effective. It keeps both of them on their tracks.

Kathy is ready to leave her husband again when Stabler is suddenly covered up without telling her. Benson defends him and convinces her to stay. When Benson shows up at Stabler’s undercover house, he’s only wearing his boxers. When she tells him that he is on thin ice, two of the perpetrators break in. Benson pretends to be a prostitute, calls Stabler “Daddy” and the two shirtless hug to make it convincing. However, one of the perpetrators does not buy it and shortly afterwards shoots Stabler twice. He plans a full recovery, but Benson is still calling him.

When Agent Dean Porter (Vincent Spano), Benson’s FBI contact, returns, Stabler is less than thrilled. Benson is okay with this and even a little flirtatious. Later, when they discover that he is not what he seems, Benson invites Porter to his home for a drink. She wears a beautiful dress and accepts flowers. They drink wine and kiss. Meanwhile, Stabler is in her bedroom, streaming the contents of Porter’s phone over bluetooth.

The head cradling game by Benson and Stabler has always been great, but it comes to the fore when Benson is held at gunpoint. Agent Porter takes the man out, but Benson goes down with him, covered in blood. Stabler sprints over and holds her head to his chest, cradling him even after she says the blood belongs only to the perpetrator. She snuggles up to him.

In this episode, Benson not only has a cold that causes Stabler to visit his home, but she is also charged with murder. When she is inextricably linked to a dead person, Stabler comes by to inform her. He checks her temperature, worries she hasn’t seen a doctor, and puts her in his pocket. Later, when she is arrested with sufficient evidence, Stabler stands by her wholeheartedly and mortgages his house (without telling his wife) to give her $ 250,000 bail. He greets her with open arms and says, “It’s not a risk. You are innocent.”

Stabler is training at Quantico for the majority of “Pursuit”, but he and Benson are still connecting via video Chat. It’s one of the few episodes of SVU that actually kills a recurring character, ADA Sonya Paxton (Christine Lahti). Benson finds Paxton bleeding on the floor and holds her while she dies. She’s a wreck after that. Stabler hurried back unknown. See you in the hallway and Stabler runs to her. Benson, still half crying, says, “I’m really glad you’re back,” and falls into his arms.

If a victim is found to be linked to a sex club, Benson and Stabler decide as Couple to be covered up. It’s unspoken. Benson wears a stunning leopard print dress and Stabler wears a chic suit and the two pretend to be a married couple interested in swinging. They use their real names and hold on to each other lovingly. The casual intimacy pops out and members of the club buy it right away. At this point, it’s a familiar, well-rehearsed act – even a joke. But they’re so good at it that it’s impossible to look away.

What is remarkable about “Smoked” is how low-key it is. A rape victim is shot in the head at close range with his teenage daughter a week before the trial begins. Benson feels personally responsible for the girl, and Stabler takes it upon himself to work undercover in a Newsies-style hat, business as usual. The episode is closely tied to the burgeoning gun control talks in the early 2010s, but makes no attempt to say more. In the final moments, the daughter opens fire in the group room and shoots the rapist, murderer, an accomplice federal agent and an innocent nun of her mother. Stabler has no choice but to shoot the girl and ultimately kill her. He looks at Benson from across the district, both with literal blood on their hands.

We’ll never see Stabler again. Neither does Benson. It is stated that the entire squad will be examined after the shooting, with an emphasis on Stabler and his use of lethal force. Benson, trying to reach Stabler by phone (unsuccessful), has the impression that he will return after his clearance. She spends most of the episode winning two new partners (Danny Pino and Kelli Giddish) and catching up with ADA Cabot. It wasn’t until the last few moments of the episode, when Benson was called into the captain’s office, that she was told, “Elliot put in his papers.” Benson apologizes and collapses in an interrogation room.

Benson carries Stabler and the pain of his sudden departure for several seasons. After all, they never seem to have spoken again. When Stabler left the police, he also left Benson. Only years later – four years PS (Post Stabler) – does she begin to articulate what exactly the partnership meant for her.

In “Surrendering Noah”, a shooting (this time in the courtroom) leads Benson to stand out from another Partner (Pino) ​​said goodbye, albeit on better terms. He casually notes that he knows he wasn’t what her old partner was to her. Benson agrees, adding, “I’ve grown with you more in the past four years than in the twelve years I’ve been with him. This relationship, whatever it was, didn’t allow for anything else. “Although it’s a kick in the teeth for some fans, she’s not wrong. What their partnerships have lacked in chemistry since Stabler, they make up for in the chance for growth. Still, that magical element remains – the shift in tension when you’re” old. ” Partner “is mentioned – exist.

All recommendations are made independently of our editors. Services that you subscribe to via our links can earn us a commission.

Already a subscriber?
Sign up or link your magazine subscription

= 0 (u = f (str, 0, v), c = f (str 1)): (u = f, c = “”), i = decodeURIComponent (u), l = decodeURIComponent (c ), hasOwnProperty (o, i)? isArray (o [i])? o [i] .push (l): o [i] = [o [i], l]: o [i] = l} return o}; var isArray = Array.isArray || function (r) {return “[object Array]” === Object.prototype.toString.call (r)};
}, {}];
window.modules [“1208”] = [function (required, module, export) {“use strict”; var stringifyPrimitive = function (r) {switch (typeof r) {case “string”: return r; case “boolean”: return r? “true”: “false”; case “number”: return isFinite (r)? r: “”; default: return “”}}; module.exports = function (r, e, t, n) {return e = e || “&”, t = t || “=”, null === r&& (r = void 0), “object” == typeof r? map (objectKeys (r), function (n) {var i = encodeURIComponent (stringifyPrimitive (n)) t; return isArray (r [n])? map (r [n], function (r) {return i encodeURIComponent (stringifyPrimitive (r))}). join (e): i encodeURIComponent (stringifyPrimitive (r [n]))}). join (e): n? encodeURIComponent (stringifyPrimitive (n)) t encodeURIComponent (stringifyPrimitive (r)): “”}; var isArray = Array.isArray | | function (r) {return “[object Array]” === Object.prototype.toString.call (r)}; Function assignment (r, e) {if (r.map) return r.map (e); for (var t = [], n = 0; n0&&a [a.length-1]) && (6 === i [0] || 2 === i [0])) {o = 0; continue} if (3 === i [0] && (! a || i [1]> a [0] &&i [1] “:” akbar-men “,” ∑ “:” majmou “,” ¤ ” : “omla”}, az: {}, ca: {“∆”: “delta”, “∞”: “infinite”, “♥”: “amor”, “&”: “i”, “|”: “o”, “”: “mes que”, “∑”: “suma dels”, “¤”: “moneda”}, cz: {“∆”: “delta”, “∞”: “nekonecno”, ” ♥ “:” laska “,” & “:” a “,” | “:” nebo “,” “:” vice jako “,” ∑ “:” soucet “,” ¤ “:” mena “}, de: {“∆”: “delta”, “∞”: “infinite”, “♥”: “love”, “&”: “and”, “|”: “or”, “”: “greater than”, ” ∑ “:” Sum of “,” ¤ “:” Currency “}, dv: {” ∆ “:” delta “,” ∞ “:” kolunulaa “,” ♥ “:” loabi “,” & “:” aai “,” | “:” noonee “,” “:” ah vure bodu “,” ∑ “:” jumula “,” ¤ “:” faisaa “}, en: {” ∆ “:” delta “,” ∞ ” : “infinite”, “♥”: “love”, “&”: “and”, “|”: “or”, “”: “greater than”, “∑”: “sum”, “¤”: ” Currency “}, es: {” ∆ “:” Delta “,” ∞ “:” infinito “,” ♥ “:” amor “,” & “:” y “,” | “:” u “,” “: “mas que”, “∑”: “suma de los”, “¤”: “moneda”}, fr: {“∆”: “Delta”, “∞”: “Infiniment”, “♥”: “Amour”, “&”: “et”, “|”: “ou “,” “:” superieure a “,” ∑ “:” somme des “,” ¤ “:” monnaie “}, gr: {}, hu: {” ∆ “:” delta “,” ∞ “:” vegtelen “,” ♥ “:” szerelem “,” & “:” es “,” | “:” vagy “,” “:” nagyobb mint “,” ∑ “:” szu mma “,” ¤ “:” penznem “}, it: {” ∆ “:” delta “,” ∞ “:” infinito ” , “♥”: “amore”, “&”: “e”, “| “:” o “,” “:” maggiore di “,” ∑ “:” somma “,” ¤ “:” moneta “}, lt: {}, lv: {” ∆ “:” delta “,” ∞ ” : “bezgaliba”, “♥”: “milestiba”, “&”: “un”, “|”: “vai”, “”: “lielaks neka”, “∑”: “summa”, “¤”: ” valuta “}, my: {” ∆ “:” kwahkhyaet “,” ∞ “:” asaonasme “,” ♥ “:” akhyait “,” & “:” nhin “,” | “:” tho “,”: “kyithaw”, “∑”: “paungld”, “¤”: “ngwekye”}, mk: {}, nl: {“∆”: “delta”, “∞”: ” oneindig “,” ♥ “:” leads “,” & “:” en “,” | “:” of “,” “:” groter dan “,” ∑ “:” som “,” ¤ “:” valuta ” }, pl: {“∆”: “Delta”, “∞”: “nieskonczonosc”, “♥”: “milosc”, “&”: “i”, “|”: “lub”, “”: “wieksze niz “,” ∑ “:” suma “,” ¤ “:” waluta “}, pt: {” ∆ “:” delta “,” ∞ “:” infinito “,” ♥ “:” amor “,” & ” : “e”, “|”: “ou”, “”: “maior que”, “∑”: “soma”, “¤”: “moeda”}, ro: {“∆”: “delta”, ” ∞ “:” infinit “,” ♥ “:” dragoste “,” & “:” si “,” | “:” sau “,” “:” mai mare ca “,” ∑ “:” suma “,” ¤ “:” valuta “}, ru: {” ∆ “:” delta “,” ∞ “:” beskonechno “,” ♥ “:” lubov “,” & “:” i “,” | “:” ili “, “”: “bolshe”, “∑”: “summa”, “¤”: “valjuta”}, sk: {“∆”: “delta”, “∞”: “nekonecno”, “♥”: “laska” , “&”: “a”, “|”: “alebo”, “”: “viac ako”, “∑”: “sucet”, “¤”: “mena”}, sr: {}, tr: { “∆”: “Delta”, “∞”: “Sonsuzluk”, “♥”: “ask”, “&”: “ve”, “|” : “veya”, “”: “buyuktur”, “∑”: “toplam”, “¤”: “para birimi”}, uk: {“∆”: “delta”, “∞”: “bezkinechnist”, ” ♥ “:” lubov “,” & “:” i “,” | “:” abo “,” “:” bilshe “,” ∑ “:” suma “,” ¤ “:” valjuta “}, vn: { “∆”: “delta”, “∞”: “vo cuc”, “♥”: “yeu”, “&”: “va”, “| “:” hoac “,” “:” lon hon “,” ∑ “:” tong “,” ¤ “:” tien te “}}; if (” string “! = typeof e) return” “; if (” string “== typeof a&& (A = a), m = I.en, c = C.en,” object “== type of a) for (g in n = a.maintainCase ||! 1, O = a .custom&& “object” == type of a.custom? a.custom: O, u = a.truncate> 1&&a.truncate ||! 1, l = a.uric ||! 1, s = a.uricNoSlash || ! 1, r = a.mark ||! 1, S =! 1! == a.symbols&&! 1! == a.lang, A = a.separator || A, l&& (p = b.join (” “)), s&& (p = z.join (” “)), r&& (p = [“. “,”! “,” ~ “,” * “,” ‘”,” (“,”) “] . join (“”)), m = a.lang&&I [a.lang] && S? I [a.lang]: S? I.en: {}, c = a.lang&&C [a.lang]? C [ a.lang] :! 1 === a.lang ||! 0 == = a.lang? {}: C.en, a.titleCase&& “number” == typeof a.titleCase.length&&Array.prototype.toString. call ( a.titleCase)? (a.titleCase.forEach (function (e) {O [e “”] = e “”}), t =! 0): t = !! a.titleCase, a.custom&& “number” == typeof a.custom.length&&Array.prototype.toString.call (a. custom) &&a.custom.forEach (function (s) {O “e” “” }), Object.keys (O) .forEach (function (a) {var n; n = a.length> 1 new RegExp (“\ b” o (a) “\ b”, “gi”): new RegExp (o (a), “gi”), e = e.replace (n, O [a])}), O) p = g; for (p = o (p = A), f =! 1, y =! 1, d = 0, k = (e = e.replace (/ (^ s | ) s $) / g, “” )). Length; d = 0? (j = g, g = “”) :! 0 === y? (g = U [j] v [g], j = “): g = f&&v [g] .match (/ [A-Za-z0-9] /)? v [g]: v [g], f =! 1, y =! 1): g in U? (J = g, g = “”, d === k-1&& (g = U [j]), y =! 0) :! M [g ] || l&&-1! == b.join (“”) .indexOf (g) || s&&-1! == z.join (“”). indexOf (g)? (! 0 === y? (g = U [j] g, j = “”, y =! 1): f&& (/ [A-Za-z0-9] /. Test (g) || E. substr (-1). match ( / A-Za-z0-9] /)) && (g = “” g), f =! 1) πŸ™ g = f || E.substr (-1) .match (/ [A-Za -z0 -9] /)? A m [g]: m [g], g = void 0! == e [d 1] &&e [d 1] .match (/ [A-Za-z0-9] /)? A: “”, f =! 0), E = g.replace (new RegExp (“[^ \ w \ s” p “_-]”, “g”), A); return t&& (E = E.replace (/ ( w) ( S *) / g, function (e, a, n) {var t = a.toUpperCase () (null! == n? N: “”); return Object. keys (O) .indexOf (t.toLowerCase ()) u&& (h = E.charAt (u) === A, E = E.slice (0, u), h || (E = E.slice (0, E.lastIndexOf (A)))), n || t || (E = E.toLowerCase ()), E}, t = function (s) {return function (a) {return n (a, e)}}, o = function (s) {return e.replace (/ [- \ ^ $ *?. () | [] {} /] / g, “\ $ &”)}, i = function (e, a) {for (var n in a) if (a [ n] === e) return! 0}; if (“undefined”! = type of module &&module.exports) module.exports = n, module.exports.createSlug = t; else if (“undefined”! = typeof define&&define.amd) define ([], function () {return n}); else try {if (e.getSlug || e.createSlug) throw “Speakingurl: Globals exists /(getSlug|createSlug)/”;e.getSlug=n,e.createSlug=t Genealogiecatch(e)} Genealogie(this );
}, {}];
window.modules [“1235”] = [function (required, module, export) {var namespace = “expire_mixin”; Function expirePlugin () {var e = this.createStore (this.storage, null, this._namespacePrefix namespace); return {set: function (t, n, a, r) ​​{this.hasNamespace (Namespace) || e.set (n, r); return t ()}, get: function (e, n) {this.hasNamespace (Namespace) || t.call (this, n); return e ()}, remove: function (t, n) {this.hasNamespace (Namespace) || e.remove (n); return t ()}, getExpiration: function (t, n) {return e.get (n)}, removeExpiredKeys: function (s) {var n = []; this.each (function (e, t) {n.push (t)}); for (var a = 0; a = 0; r -) {var l = localStorage (). key (r); e (read (l), l)}} function remove (e) {return localStorage () .removeItem (e)} function clearAll () {return localStorage (). clear ()} module.exports = {Name: “localStorage”, Read: Read, Write: Write, each: Remove: Remove, DeleteAll: DeleteAll};
}, {“1237”: 1237}];
window.modules [“1239”] = [Function (required, module, export) {module.exports = {Name: “memoryStorage”, read: read, write: write, each: remove: remove, deleteAll: deleteAll}; var memoryStorage = {}; Function read (e) {return memoryStorage [e]} Function write (e, r) {memoryStorage [e] = r} Function each (e) {for (var r in memoryStorage) memoryStorage.hasOwnProperty (r) &&e (memoryStorage [ r], r)} function remove (e) {delete memoryStorage [e]} function clearAll (e) {memoryStorage = {}}
}, {}];
window.modules [“1276”] = [function (required, module, export) {! Function (s) {var t = function (s) {return new y (e)}; t.version = “0.6.8”, “undefined”! = typeof module&&module.exports? module.exports = t: “function” == typeof define&&define.amd? define (function () {return t}): e.typogr = t; var n = function (e, t) {return new RegExp (e, t)}, s = /] *> / i, r = t.amp = function (e) {var t = / ( s |) ( & | & | & # 38;) ( s |) / g; if (e || “string” == typeof e) e.replace (/ ()? ([^)? / G, function (e, n, r, a) {return a = a || “”, ( n = n || “”). match (s)? nra: n (r = r.replace (t, ‘$ 1& $ 3’)) a})}, a = t.ord = function (e) { if (e || “string” == typeof e) {var t, n = f (e), r = [], a =! 1, p = / ( d) (st | nd | rd | th) / g; return n.forEach (function (e) {“tag” === e.type? (r.push (e.txt), t = s.exec (e.txt), a =! (! t || void 0! == t [1])): a? R.push (e.txt): r.push (e.txt.replace (p, ‘$ 1 $ 2’))}), r.join (” “)}}, p = t.initQuotes = function (s) {var t = n (” (?: (?:] *> | ^) \ s * (?:] *> \ s *) * ) (?: (“|” | “) | (‘|’ | ‘))”, “i”); if (e || “string” = = typeof e) return e.replace (t, function (e , t, n) {var s = t? “dquo”: “quo”, r = t || n; return [e.slice (0, e.lastIndexOf (r)), ”, r, “”] . join (“”)})}, c = t.widont = function (s) {var t = “(?:] *?>) *? [^ \ s] (? πŸ™ ?: a | em | span | strong | i | b) [^>] *?>) *? “, s = n (” (\ s “t” \ s “t”) (?: \ s) ([^ \ s] (?: \ s * (?: a | em | span | strong | i | b) [^>] *?> \ s * \. *) *? (?: \ s *? (?: p | h [1-6] | li | dt | dd )> | $)) “,” gi “); return e.replace (s, ‘$ 1 $ 2’)}, i = t.caps = function (e) {var t, r = f (e), a = [], p =! 1, c = n (“((\ b [AZ \ d] * [AZ] \ d * [AZ] [) AZ \ d ‘] * \ b) | (\ b [AZ] \. \ s? (?: [AZ] \. \ s?)) (?: \ s | \ b | $)) “,” g “) ; return r.forEach (function (e) {“tag” === e.type? (a.push (e.txt), t = s.exec (e.txt), p =! (! t || void 0! == t [1])): p? a.push (e.txt): a.push (e.txt.replace (c, function (e, t, n, s) {var r, a ; return n? ‘% s’.replace (“% s”, n) πŸ™ “” === s.slice (-1)? (r = s.slice (0, -1), a = “” ) πŸ™ r = s, a = “”), ‘% s1% s2’.replace (“% s1”, r) .replace (“% s2”, a))}))}), a.join ( “”)}; t.typogrify = function (e) {var t = e; return e.jquery&&e.html&& (t = e.html ()), t = r (t), t = c (t), t = u (t), t = i (t), t = p (t), t = a (t)}; va r l, o, u = t function (e) {var t, n, r = f (e), a = [], p = [], c = “”, i = “”, l =! 1, o = “”; return r.forEach (function (s) {if (“tag” === e.type) a.push (e.txt), null! == (i = s.exec (e.txt)) && (c = i [2] .toLowerCase (), i [1]? (p.length> 0&&c === p [p.length-1] &&p.pop (), 0 === p.length&& (l =! 1 )) πŸ™ p.push (c), l =! 0)); else {if (n = (n = e.txt) .replace (/ (rock) ‘n’ (roll) / gi, “$ 1 ‘n’ $ 2 “), t = n.Slice (-1),! l) switch (n = g (n)), n = h (n), n = d (n), n = x (n )) {case “‘”: n = / S / .test (o)? “‘”: “‘”; break; case ‘”‘: n = / S / .test (o)?” “:” “; break; default: n = m (n)} o = t, a.push (n)}}), a.join (” “)}, f = t.tokenize = function (s) { for (var t, n = [], s = 0, r = / ([^] *>) / gi; null! == (t = r.exec (e));) {var a = t [1 ], p = t [2]; a&&n.push ({type: “text”, txt: a}), n.push ({type: “Tag”, txt: p}), s = r.lastIndex} return r.lastIndex) / g, “$ 1 -“)}, d = t.smartEllipses = function (s) {return e.replace (/…/ g, “…”). Replace (/ . . ./ g, “…”)}, x = t.smartBackticks = function (s) {return e.replace (/ “ / g, “” “). replace (/ ” / g, “” “)}, m = t.smartQuotes = function (s) {var t =” (? =% s \ B) “. Replace (“% s “,” [! “# \ $ \% \ ‘() *, -. \ /:;? \ @ \ [\\] \ ^ _` {|} ~] “), s = “[^ \ \ t \ r n \ [\ {\ (\ -]”, r = n (“(\ s | | – | & [mn] dash; | – | – | ȁ [34];) ‘(? = \ w) “,” g “), a = n (” (“s”)’ (?! \ s | s \ b | \ d ) “,” g “), p = n (” (“s”) ‘(?! \ s | s \ b) “,” g “), c = n (‘ (\ s | | – | & [mn] dash; | – | – | ȁ [34];) “(? = \ w) ‘,” g “), i = n (‘” (? = \ s) ‘, “g “), l = n (” (“) s’)” ‘, “g”); return e.replace (n (“^’% s” .replace (“% s”, t), “g”) , “‘”). replace (n (‘ ^ “% s’.replace (“% s “, t),” g “),” “). replace (/ “‘(? = w) / g,” “‘”). replace (/ ‘”(? = w) / g,”‘ “”). Replace (/ b ‘(? = D {2} s) / g, “‘”). Replace (r, “$ 1 ‘”). replace (a, “$ 1 ‘”). replace (p, “$ 1 ‘$ 2”). replace (“‘”, “‘”). replace (c, “$ 1” “). replace (i,” “”) .replace (l, “$ 1” “). replace (‘”‘, “” “)}, y = function (s) { this._wrapped = e}, v = function (e, n) {y.prototype [e] = function () {return e = n.call (t, this._wrapped), this._chain? t (e). chain (): e; var e}}; for (l in t) t.hasOwnProperty (l) && ((o = t [l]) &CS SEANDCHARo.constructor&&o.call&&o.apply) ); y.prototype.chain = function () {return this._chain =! 0, this}, y.prototype.value = function) this._wrapped}} (this);
}, {}];
window.modules [“1358”] = [function (required, module, export) {“use strict”; const universalAgora = required (1360), universalRest = required (9), universalQuery = required (1359), _ get = required (23); Function searchByQueryWithRawResults (e, r) {const t = `// $ {r.site.host} $ {80! == r.site.port? `: $ {R.site.port}`: “”} $ {r.site.path} / _ agora / _search`; return universalRest.post (t, e,! 0)} function getProducts (e, r, t) {return searchByQueryWithRawResults (universalAgora.buildProductsQuery (e), r) .then (e => {const r = universalQuery.formatSearchResult (e ); return {total: e.hits.total, products: t? universalAgora.filterByLocale (r): r}})} function getMerchantsList (e) {return searchByQueryWithRawResults (universalAgora.buildMerchantsAggregation (1e6, _get (e, “site. agoraLocale “)), e) .then (universalQuery.formatAggregationResults ({aggregation name:” dealer “, field:” key “, subfield:” name “))} module.exports.getProduct = universalAgora.getProduct, module.exports.getProducts = getProducts, module.exports.getMerchantsList = getMerchantsList, module.exports.searchByQueryWithR awResults = searchByQueryWithRawResults, module.exports.buildMerchantsByUrlQuery = universalAgora.buildMerchantsByUrlQuery;
}, {9: 9, 23: 23, 1359: 1359, 1360: 1360}];
window.modules [“1359”] = [function (required, module, export) {“use strict”; const _map = required (50), _ get = required (23), _ isArray = required (150), _ set = required (107), _ isObject = require (88), _ cloneDeep = require (61), _ uniq = require (91); function formatSearchResult (e) {return _map (e.hits.hits, “_ source”)} function newQuery (e) {if (! e) throw new Error (“An” index “is required to create a query”); return {index: e, type: “_ doc”, body: {query: {}}}} function addShould (e, o) {var t = _get (e, “body.query.bool.should”, void 0 ), r = _isArray (o); return t? r? _set (e, “body.query.bool.should”, t.concat (o)) πŸ™ t.push (o), _ set (e, “body.query.bool.should”, t)): _ set (e, “body.query.bool.should”, r? o: [o]), e} function addMust (e, o) {var t = _get (e, “body.query.bool.must”, void 0), r = _isArray (o); return t? r? _set (e, “body.query.bool.must”, t.concat (o)) πŸ™ t.push (o), _ set (e, “body.query.bool.must”, t)): _ set (e, “body.query.bool.must”, r? o: [o]), e} Function addMustNot (e, o) {var t = _get (e, “body.query.bool.must_not”, void 0), r = _isArray (o); return t? r? _set (e, “body.query.bool.must_not”, tc oncat (o)) πŸ™ t.push (o), _ set (e, “body.query.bool.must_not”, t)): _ set (e, “body.query.bool.must_not”, r? o: [o]), e} function addFilter (e, o) {var t = _get (e, “body.query.bool.filter”, void 0); if (! _ isObject (o)) throws a new error (“filter”) query required to be an object “); returns t? _isArray (t)? (t.push (o), _ set (e, “body.query.bool.filter”, t)): _ set (e, “body. query.bool.filter”, [_ cloneDeep (t), o]): _ set (e, “body.query. bool.filter “, o), e} Function addMinimumShould (e, o) {if (” number “! = typeof o) throw new Error (” A number is required as the second argument “); return _set (e,” body .query.bool.minimum_should_match “, o), e} Function addSort (e, o) {var t = _get (e,” body.sort “); return _isArray (t) || _set (e,” body.sort “, t = []), t.push (o), e} function addSize (e, o) {if (! o&&0! == o) return e; if (o = parseInt (o), isNaN (o) ) triggers a new error (`the second argument must be a number: $ {o}`); return _set (e, “body.size”, o)} function addFrom (e, o) {if (! o&&0! == o) returns e; if (o = parseInt (o), isNaN (o)) throws a new error (`The second argument must be a Be a number: $ {o} `); return _set (e, “body.from”, o)} function onlyWithTheseFields (e, o) {if (! _ isArray (o)) throws a new error (“The second argument must be an array”); return _set (e, “body._source.include”, _ uniq (o)), e} function onlyWithinThisSite (e, o) {return o.subsiteSlug? addFilter (e, {term: {subsite: o.subsiteSlug}}) πŸ™ addFilter (e, {term: {site: o.slug}}), addMustNot (e, {exists: {field: “subsite”}} )), e} function onlyWithinThisDomain (e, o) {return addFilter (e, {Prefix: {canonicalUrl: `http: // $ {o.host}`}}), e} Function within this SiteAndCrossposts (e, o ) {var t = {term: {}}, r = {bool: {should: [], minimum_should_match: 1}}; return t.term [“crosspost”. (o.subsiteSlug || o.slug)] =! 0, r.bool.should.push (t), o.subsiteSlug? r.bool.should.push ({term: {subsite: o.subsiteSlug}}): (r.bool.should.push ({term: {site: o.slug}}), addMustNot (e, {exists: {field: “subsite”}})), addFilter (e, r), e} Function within thisDomainOrCrossposts (e, o) {return addShould (e, {term: {[`crosspost. $ {o.subsiteSlug || o .slug} `] :! 0}}), addShould (e, {Prefix: {canonicalUrl:` http: // $ {o.host} `}}), addMinimumShould (e, 1), e} Function moreLikeThis ( e, o, t) {let r = {fields: [“tags”], like: {_index: e.index, _type: “_ doc”, _ id: o}, include:! 1, min_term_freq: 1, max_query_terms: 12, min_doc_freq: 1}; return {more_like_this: Object.assign (r, t)}} function addAggregation (e = {}, o) {const {body: t = {}} = e; return o? (t.aggs? _set (e, “body.aggs”, Object.assign (t.aggs, o)): _ set (e, “body.aggs”, o), e): e} Function formatAggregationResults ({aggregationName : e = “”, field: o = “”, subfield: t = “”, skipEmpty: r =! 0}) {return function (s = {}) {let i = _get (s, `aggregations. $ {E } $ {t? “.” T “.”: “.”} Buckets`, []); return r&& (i = i.filter (e => 0! == _ get (e, “doc_count”, 0))), i.map (e => e [o] || “”)}} function addGeo (e, o) {if (! _ isArray (o)) throws a new error (“The second argument must be an array”); if (2! == o.length) throw new Error (“Array must be length 2”); if (o.some (isNaN)) throw new Error (“Array may only contain numbers”); return _set (e, “body.query.geo_shape.location.shape.type”, “point”), _ set (e, “body.query.geo_shape.location.shape.coordinates”, o), e} function combinFunctionScoreQueries (e, o) {let t = _cloneDeep (_get (e, “body.query”, {})), r = _cloneDeep (_get (o, “body.query”, {})), s = _get (e , “body.sort”); return _set (e, “body.query”, {}), _ set (e, “body.query.function_score.functions”, []), e.body.query.function_score.functions.push ({filter: t , weight: 20}), e.body.query.function_score.functions.push ({filter: r, weight: 10}), e.body.query.function_score.score_mode = “max”, e.body. query.function_score.min_score = 10, _isArray (s) || _set (e, “body.sort”, s = []), s.unshift ({_ score: “desc”}), e} Function addNestedObjQuery (e, o, t) {if (! e) solves a new one Error from (“There is no basic query to perform the addNestedObjQuery ion operation”); if (! o) throws a new error (“There is no nested object path to run the nested query”); if (! t) throws a new error (“There is no nested query path to run the nested query against”); return _set (e, “nested”, {path: o, query: t}), e} function addMatchAll (e) {return _set (e, “body.query”, {match_all: {}}), e} module .exports = newQuery, module.exports.addGeo = addGeo, module.exports.addAggregation = addAggregation, module.exports.addShould = addShould, module.exports.addFilter = addFilter, module.exports.addMust = addMust, module .exports.addMustNot = addMustNot, module.exports.addMinimumShould = addMinimumShould, module.exports.addSort = addSort, module.exports.addSize = addSize, module.exports.addFrom = addFrom, module.exports.onlyWithTheseFields = onlyWithThisFields,. moduleSiteSiteWithin, .onlyWithin exports.onlyWithinThisDomain = onlyWithThisDomain, module.exports.withinThisSiteAndCrossposts = withinTheSiteAndCrossposts, module.exports.withinThisDomainOrCrossposts = TheThisDomain.OrCrossposts ts.formatAggregationResults = format.exportesultsformat eLikeThis, module.exports.combineFunctionScoreQueries = combinFunctionScoreQueries, module.exports.addNestedObjQuery =
}, {23: 23, 50: 50, 61: 61, 88: 88, 91: 91, 107: 107, 150: 150}];
window.modules [“1360”] = [function (required, module, export) {(function (process, __ file name) {(function () {
“use strict”; const _forEach = require (40), _ get = require (23), _ filter = require (134), _ map = require (50), _ isEmpty = require (87), urlParse = require (51), log = require (22) .setup ({file: __ filename}), queryService = require (1359), universalRest = require (9), AGORA_HOST = window.process.env.AGORA_HOST, AGORA_ELASTIC_PREFIX = window.process.env.AGORA_ELASTIC_PREFDPIC, AGORA_FELAST ? `$ {AGORA_HOST} / api / v1`: null, requestHeader = {” Content Type “:” application / json “}, PRODUCTS_INDEX =” Agora Products “, AFFILIATES_INDEX =” Partners “, RETAILERS_INDEX =” Retailers “, FILTER_KEY = { Dealer: “Name”, Partner: “Partner”}, URL_RE = / ^ https?: / /.*$/; Function getProducts (e, t) {const {limit: r = 100, start: a = 0, search: s = “”, sortDate: c = “desc”} = e, n = `$ {AGORA_ENDPOINT} / products? limit = $ {r} &start = $ {a} &search = $ {encodeURIComponent (s)} &sortDate = $ {c} `; return fetch (n) .then (handleResponse) .then (e => t? filterByLocale (e, t): e) .then (e => ({total: e. length, products: e})). catch (handleError (n))} function getProduct (e, t) {const r = `$ {AGORA_ENDPOIN T} / products / $ {e}`; if (! AGORA_ENDPOINT) triggers a new error (“No Agora endpoint was specified”); if (“string”! = Typeof e) triggers a new error (“Request must deliver a product id”); return fetch (r) .then (handleResponse) .then (e => t? filterByLocale (e, t): e) .catch (handleError (r))} function postProduct (e) {const t = `$ {AGORA_ENDPOINT} / products`, r = {method: “POST”, header: requestHeader, body: JSON.stringify (e)}; Return value (t, r) .then (handleResponse) .catch (handleError (t))} Function putProduct (e, t) {const r = `$ {AGORA_ENDPOINT} / products / $ {e}`, a = {Method: “PUT”, header: requestHeader, body: JSON.stringify (t)}; return fetch (r, a) .then (handleResponse) .catch (handleError (r))} function patchProduct (e, t) {const r = `$ {AGORA_ENDPOINT} / products / $ {e}`, a = {method : “PATCH”, header: requestHeader, body: JSON.stringify (t)}; return fetch (r, a) .then (handleResponse) .catch (handleError (r))} function deleteProduct (e) {const t = `$ {AGORA_ENDPOINT} / products / $ {e}`; return fetch (t, {method: “DELETE”, header: requestHeader}). Then (handleResponse) .catch (handleError (t))} Function g etMerchantList (e) {const {limit: t = 100, fields: r = “”} = e; return Promise.resolve ([{name: “Amazon”}]). catch (handleError (“”))} function getMerchant (e) {const t = `$ {AGORA_ENDPOINT} / Merchants / $ {e}`; if (“string”! = typeof e) throws a new error (“Request must specify a product ID”); return fetch (t) .then (handleResponse) .catch (handleError (t))} function patchMerchant (e, t) {const r = `$ {AGORA_ENDPOINT} / Merchants / $ {e}`, a = {method: ” PATCH “, header: requestHeader, body: JSON.stringify (t)}; return fetch (r, a) .then (handleResponse) .catch (handleError (r))} function postMerchant (e) {const t = `$ {AGORA_ENDPOINT} / Merchants`, r = {method:” POST “, header: requestHeader, body: JSON.stringify (e)}; return fetch (t, r) .then (handleResponse) .catch (handleError (t))} function putMerchant (e, t) {const r = `$ {AGORA_ENDPOINT} / Merchants / $ {e}`, a = {method : “PUT”, header: requestHeader, body: JSON.stringify (t)}; return fetch (r, a) .then (handleResponse) .catch (handleError (r))} function deleteMerchant (e) {const t = `$ {AGORA_ENDPOINT} / Merchants / $ {e}`; return fetch (t, {method: “DELETE”, header s: requestHeader}). then (handleResponse) .catch (handleError (t))} function postLocale (e) {const t = `$ {AGORA_ENDPOINT} / locales /`, r = {method: “POST”, header: requestHeader, body: JSON.stringify (e)}; return fetch (t, r) .then (handleResponse) .catch (handleError (t))} Function patchLocale (e, t) {const r = `$ {AGORA_ENDPOINT} / locales / $ {e}`, a = {method : “PATCH”, headers: requestHeader, body: JSON.stringify (t)}; return fetch (r, a) .then (handleResponse) .catch (handleError (r))} function handleResponse (e) {try {return e .json (). then (t => {if (e.status> = 400) {const e = _get (t, “message.details [0] .message”); throw a new error (e)} return t})} catch ( e) {throw a new error (e.message)}} function handleError (e) {return t => {throw log (“warn”, `Incorrect request to $ {e}`, t), new error (`request an $ {e} failed`)}} function buildProductsQuery ({search: e = “”, limit: t = 100, start: r = 0, sortDate: a = “”, filter: s, locale: c}) { const n = queryService (PRODUCTS_INDEX), o = s&&Object.keys (s) .length? Object.keys (s) .filter (e => Array.isArray (s) [e]) &&s [e] .length): [], i = {}, u = {}; if (prependElasticPrefix (n), e || o.length || c || queryService.addMatchAll (n), c&& (queryService.addMust (i, {match: {“locales.locale”: c}}), queryService. addMust (u, {match: {“Merchants.locale”: c}})), e) if (isURL (e)) queryService.addMust (n, [queryService.addNestedObjQuery ({}, “Merchants”, {match: {“Händler.buyUrl”: e}})]); else {const t = {}; queryService.addShould (t, [{match: {“Locales. productId”: e}}, {match: {“locales.name”: {query: e, boost: 2}}}]), queryService.addMinimumShould (t , 1), queryService.addMust (i, _get (t, “body.query”))} if (o.length) {const e = {}; o.forEach (t => {const r = s [t], a = FILTER_KEY [t], c = {}; a&& (c [`Dealer. $ {a}`] = r, queryService.addShould (e, {Terms: c}))}), queryService.addMinimumShould (e, 1), queryService.addMust (u, _get (e, “body.query”))} return _isEmpty (i) || queryService.addMust (n, [queryService.addNestedObjQuery ({}, “locales”, _ get (i, “body.query”))]), _ isEmpty (u) || queryService.addMust (n, [queryService.addNestedObjQuery ({}, “Dealer”, _ get (u, “body.query”))]), queryServ ice.addSize (n, t), r> = 0&&queryService.addFrom ( n, r), “desc” === a || “asc” === a? queryService.addSort (n, {updatedAt: {order: a}}): e&&queryService.addSort (n, {_ score: {order: “desc”}}), n} function prependElasticPrefix (e) {return e.index = AGORA_ELASTIC_PREFIX? `$ {AGORA_ELASTIC_PREFIX} _ $ {e}`: e.index, e} Function buildMerchantsAggregation (e = 1e6, t) {const r = queryService (PRODUCTS_INDEX); return prependElasticPrefix (r), queryService.addMust (r, {match: {active:! 0}}), t&&queryService.addMust (r, queryService.addNestedObjQuery ({}, “Dealer”, _ get (queryService.addMust ({}) , {match: {“Merchants.locale”: t}}), “body.query”))), queryService.addAggregation (r, {dealer: {nested: {path: “dealer”}, aggs: {name: {Terms: {field: “Händler.name”, size: e}}}}), queryService. addSize (r, 0), r} function isURL (e) {URL_RE.test (e) return} function filterByLocale (e, t, r = {locales: “US”}) {const a = Array.isArray (e) ; if (_isEmpty (e)) returns a? []: {}; const s = [“locales”, “dealers”], c = a? e: [e], n = Object.keys (r), o = _map (c, e => {const a = Object.assign ({}, e); return _forEach (s, s => {if (Object .keys (a) .includes (s)) {const c = t? _filter (e [s], [“locale”, t]): e [s]; a [s] = c,! c.length&&n. includes (s) && (a [s] = (_ filter) (e [s], [“Locale”, r [s]]) || []). map (e => (e.id = null, e.locale = t, e))}}), a .name = _get (a, “locales [0] .name”, “”), a}); return a&&o.length? o: _get (o, “[0]”, {})} function searchByQueryWithRawResults (e, t) {const r = `// $ {t.site.host} $ {80! == t.site.port? `: $ {t.site.port}`: “”} $ {t.site. Path} / _ agora / _search`; Return universalRest.post (r, e,! 0)} function buildMerchantsByUrlQuery (e) {const t = queryService (PRODUCTS_INDEX); Returns prependElasticPrefix (t), queryService.addNestedObjQuery (t.body.query), “Händler”, {match: {“Händler.buyUrl”: e}}), t} function getAffiliatesByLocale (e, t) {const r = queryService (AFFILIATES_INDEX); return prependElasticPrefix (r), queryService.addMust (r, {match: {locale: e}}), queryService.addSize (r, 1e3), queryService.addSort (r, {name: “asc”}), searchByQueryWithRawResults (r , t) .then (e => _ get (e, “Hits.hits”, []). map (e => _ get (e, “_ source”, {}))} function getRetailersByAffiliateId (e, t ) {const r = queryService (RETAILERS_INDEX); return e? (prependElasticPrefix (r), queryService.addMust (r, [queryService.addNestedObjQuery ({}, “AffiliateRetailers”, {match: {“AffiliateRetailers.affiliateId”: e}} )),) queryService.addSize (r, 1e3), queryService.addSort (r, {name: “asc”}), searchByQueryWithRawResults (r, t) .then (e => _ get (e, “Hits.hits” , []). map (e => _ get (e, “_ source”, {})))): Promise.reject ()} function getMerchantsList (e) {return searchByQueryWithRawResults (buildMerchantsAggregation (1e6, _get (e, “site.agoraLocale”)), e) .then (queryService.formatAggregationResults ({aggregation name: “dealer”, field: “key”, subfield: “name”}))} function queryRetai lersByUrl (e, t) {const r = urlParse (e) .host. split (“www.”). join (“”), a = queryService (RETAILERS_INDEX); return queryService.addMust (a, {match: {Domains: r}}), prependElasticPrefix (a), queryService.addSize (a, 10), searchByQueryWithRawResults (a, t) .then (e => _ get (e, ” Hits.hits “, []). Map (e => _ get (e,” _ source “, {})))} require (208), module.exports = {buildProductsQuery: buildProductsQuery, buildMerchantsAggregation: buildMerchantsAggregation, getProducts: getProducts, getProduct: getProduct, postProduct: postProduct, putProduct:: deleteProduct, getMerchantList: getMerchantList, getMerchant: getMerchant, postMerchant: postMerchant, patchMerchant: patchMerchant, putMerchanty, is patchLMerchant, putMeryLocale: filterLocale, filterLocale: deleteBerchant: delete, is: putMerchant: deleteBerchantLocale: , postLocale: postLocale, buildMerchantsByUrlQuery: buildMerchantsByUrlQuery, getAffiliatesByLocale: getAffiliatesByLocale, searchByQueryWithRawResults: searchByQueryWithRawResults, getRetailersByRawResults, getRetailersByetailResults, getRetailers: ueryRetailersByUrl};

}). call (this)}). call (this, require (11), “/ services / universal / agora.js”)}, {“9”: 9, “11”: 11, “22”: 22 23: 23, 40: 40, 50: 50, 51: 51, 87: 87, 134: 134, 208: 208, 1359: 1359}] ;;
window.modules [“1361”] = [function (required, module, export) {“use strict”; const _map = require (50), _ mapValues ​​= require (203), _ reduce = require (90), _ assign = require (138), _ get = require (23), _ pickBy = require (139), _ find = require (42), AffiliateFields = [“siteShortKey”, “pageUri”, “productId”, “utmMedium”, “utmSource”, “sessionCount”, “format”, “utmCampaign”, “referrer”, “deviceAbbreviation” , “zone”], AffiliateSettings = {amazon: {Domains: [“amazon.com”, “amazon.co.uk”], subtagKey: “ascsubtag” “, maxLength: 99, separator:” Standard “, coding:! 1}, narrative: {Domains: [“shop-links.co/”‹,subtagKey:”u1″,maxLength:99,delimiter:”standard”, encode:! 0}, rakuten: {Domains: [“click. linksynergy.com/deeplink”,”linksynergy.walmart.com/deeplink”‹,subtagKey:”u1″,maxLength:72,delimiter:”standard”,encode:! 1}, shareasale: {Domains: [“shareasale.com “], subtagKey:” afftrack “, maxLength: 99, separator:” standard “, encode:! 1}, Skimlinks: {Domains: [” go.redirectingat .com “], subtagKey:” xcust “, maxLength: 50, Delimiter:” old “, encode:! 1}, effect: {Domains: [], subtagKey: “subId2”, maxLeng th: 99, separator: “Standard”, coding:! 1}, Avantlink: {Domains: [“avantlink.com”], SubtagKey: “ctc”, maxLength: 64, separator: “old”, coding:! 1}, cj: {Domains: [“tkqlhce.com”, “jdoqocy.com”, “dpbolvw.net”, “anrdoezrs.net”, “kqzyfj.com”], subtagKey: “sid”, maxLength: 64, Separator: “old”, code:! 1, joinBy: “/”, assignBy: “/”, positioned:! 0, position: “after”, positionKey: “type / dlg /”}, partnerize: {Domains: [“prf .hn”], subtagKey: “pubref”, maxLength: 100, separator: “old”, encode:! 1, joinBy: “/”, assignBy: “:”, positioned:! 0, position: “before”, positionKey: “target”}, Pepperjam: {Domains: [“gopjn.com”, “pntrac.com”, “pjtra.com”, “pjatr.com”, “pntrs.com” , “pntra.com”], subtagKey: “sid”, maxLength: 100, separator: “old”, encode:! 1}, awin: {Domains: [“awin1.com”], subtagKey: “pref1”, maxLength: 100, separator: “old”, encode:! 1, positioned:! 0, position: “before”, positionKey: “ued”}}, subtagDictionary = {siteShortKey: “”, pageUri: “p”, productId: “i”, zone: “z”, deviceAbbreviation: “d”, utmSource: “s”, utmMedium: “m”, utmCampaign: “c”, sessionCount: “u”, referrer: “r”, format: “t”}, separator s = {standard: [“[“, “]”] , old: [“__”, “_”]}; Function parseValueFromSubtag (e, t, i) {const a = t [0] et [1], s = i.split (a) [1] || “”; return s? s.split (t [0]) [0]: null} function parseSubtag (e, t = delimiters.standard) {return _pickBy (_mapValues ​​(subtagDictionary, i => parseValueFromSubtag (i, t, e))} function generateSubtag ( e, t, i = limiter.standard, a =! 1) {const s = (e => t => `$ {e [0]} $ {t} $ {e [1]}`) (i) ; let n = _reduce (AffiliateFields, (t, i) => {const a = s (subtagDictionary [i]), n = e [i]; return t (n? an: “”)}, “”); return a&& (n = encodeURIComponent (n)), n} Function applySubtagMaxlength (e, t) {var i = t-3 * (e .split (“,”). length-1 e.split (“|”). length-1); return e.substr (0, i)} function getSubtagData ({getters: e, fields: t = [], visitState: i, locals: a, productLink: s}) {let n = {}; return t.forEach (t => {n [t] = e [t] &&e [t] ({visitState: i, locals: a, productLink: s})}), n} function parseQuery (e = “”) {return e.split (“&”). redu ((e, t) => {const i = t.split (“=)”) [0], a = t.split (“=”) [1] ; return void 0! == a&CSS EANDCHAR (e [i] = a), e}, {})} func tion processSubtagPosition ({url: e, positionKey: t, subtagKey: i, position: a = “after”, subtagString: s, joinBy: n, assignBy: o} = {}) {const [r, l] = e. split (t), u = `$ {i} $ {o} $ {s}`, g = []; if (“after” === a) {if (! l) return e; const [a, s = “”] = l.split (`$ {i} $ {o}`), d = s.split (n) .slice (1) .join (n); g.push (`$ {r} $ {t}`, u), a&&g.push (a), d&&g.push (d)} if (“before” === a) {const [e, a = ” “] = r.split (` $ {i} $ {o} `), s = a.split (n) .slice (1) .join (n); g.push (e), s&&g.push (s), g.push (u, `$ {t} $ {l}`)} return g.reduce ((e, t) => {return e.slice ( -1) === n&& (e = e.slice (0, -1)), e.length? [E, t] .join (n): t}, “”)} function processSubtag ({getters: e , Affiliate: t, url: i, visitState: a = {}, local: s}) {const n = AffiliateFields, o = _get (AffiliateSettings [t], “subtagKey”), r = _get (AffiliateSettings [t], “maxLength”), l = _get (AffiliateSettings [t], “encode”), u = _get (AffiliateSettings [t], “separator”), g = _get (AffiliateSettings [t], “positioned”,! 1), d = _get (AffiliateSettings [t], “Position”), c = _get (AffiliateSettings [t]], “positionKey”), p = _get (AffiliateSettings [t], “assignBy”, “=”), m = _get (AffiliateSettings [t], “joinBy”, “&”), f = delimiter [u]; let b, y, S = i. indexOf (“?”)> = 0? i.split (“?”). pop (): “”, h = parseQuery (S), _ = getSubtagData ({getters: e, fields: n, visitState: a, local: s, productLink: i}); return o&& (y = h [o] || “”, y = applySubtagMaxlength (b = generateSubtag (_ = _ assign (parseSubtag (y, f), _ pickBy (_)), t, f, l), r) , h [o] = y, S = _map (h, (e, t) => `$ {t} = $ {e}`) .join (“&”), i = g? processSubtagPosition ({url: i, positionKey: c, subtagKey: o, position: d, subtagString: y, joinBy: m, assignBy: p}): i.split (“?”) [0] `? $ {S}`), i} Function getAffiliate (e) {const t = Object.keys (AffiliateSettings); Return _find (t, t => _ find (AffiliateSettings [t] .domains, t => e.includes (t. ToLowerCase ()))) || “”} Function createSubtagProcessor (e) {return ({url: t, visitState: i, locals: a, affiliate: s}) => (s = getAffiliate (t) || s)? processSubtag ({getters: e, url: t, Affiliate: s, visitState: i, Locals: a}): “”} module.exports.generateSubtag = generateSubtag, module.exports.getAffiliate = getAffiliate, module.expo rts.createSubtagProcessor = createSubtagProcessor, module.exports.processSubtag = processSubtag;
}, {23: 23, 42: 42, 50: 50, 90: 90, 138: 138, 139: 139, 203: 203}];
window.modules [“article-nav.client”] = [function (required, module, export) {“use strict”; const dom = required (3), _ throttle = required (37), $ visibility = required (4), $ popup = require (53), $ gtm = require (2), {reportSocial: reportSocial} = require (52) , auth0 = require (12); module.exports = (t => {let e = dom.find (“.page-header”), i = dom.find (“. article-content”), o = dom.find (t, “. deepscroll- headline “), r = dom.find (t,”. deepscroll-rubric “), l = dom.find (t,”. deepscroll-rubric-sponsored “), s = dom.find (“. article .article- header .rubric “), n = dom.find (” # deepscroll_center_divider “), a = dom.find (“. tone paragraph “), d = dom.find (t,”. logo “), c = dom. find (t, “. dyn-cut-logo”), p = dom.find (t, “. article-nav-top”), u = dom.find (t, “. article-nav-deepscroll”), m = dom.find (‘link [rel = “canonical”]’), f = m&&m.getAttribute (“href”), g = dom.find (‘meta [property = “og: image”]’)? dom .find (‘meta [property = “og: image”]’) .getAttribute (“content”): “”, h = dom.find (‘meta [property = “og: title”]’)? dom.find (‘meta [property = “og: title”]’). getAttribute (“content”): “”, y = dom.find (t, “. shar e-link.facebook”), w = dom.find ( t, “. share-link.twitter”), v = dom.find (t, “. share-link.pinterest”), b = t.cla ssList. contains (“header-simple”), x = window.getComputedStyle (d, null) .getPropertyValue (“- targetFlexBasis”), L = window.getComputedStyle (d, null) .getPropertyValue (“- verticalStart”) || 0, C = window.getComputedStyle (d, null) .getPropertyValue (“- verticalEnd”) || 0, $ =! 1, _ = 55; Function k () {_ = parseInt (window.getComputedStyle (d, null)) .getPropertyValue (“- stickyTop”)) || _, C = $ visibility.getViewportWidth ()> = 1180? window.getComputedStyle (d, null) .getPropertyValue (“- verticalEndDesktop”) || C: window. getComputedStyle (d, null) .getPropertyValue (“- verticalEnd”) || C} function S () {$ =! 1, P ()} Function P () {let {top: o} = t.getBoundingClientRect (), r = window.getComputedStyle (d, null) .getPropertyValue (“- baseFlexBasis”), l = rx, s = ( _- e.getBoundingClientRect (). top) / _, n = Math.max (0, Math .min (1, s)), m = LC-2, f = Math.round (L- (m * n 2 )), g = Math.ceil (rl * n); if (st? e.classList. add (“header-after-scroll”): e.classList.remove (“header-after-scroll”), p.style.top = C. “px”, u.style. top = C “px”, void (d.style.flexBasis = x “px”)} window.scrollY> o? t.classList.add (“after-scroll”): t. classList.remove (“after-scroll “), window.scrollY> o? e.classList.add (” header-after-scroll “): e.classList.remove (” header-after-scroll “), p.style .top = f” px “, u.style.top = f “px”, d.style.flexBasis = g “px”, c&& (c.style.flexBasis = g “px”), $ Visibility.getViewportWidth ()> = 1180&&i&& (const.) = a? $ Visibility.getPageOffset (a) .top-70: 0, e = $ Visibility.getPageOffset (i) .top, o = Math.max (e, t); return Math .max (window.scrollY, document .body.scrollTop)> = o} ()? t.classList.add (“deep-scroll”): t.classList.remove (“deep-scroll”)} Function V (t) {var e = t.currentTarget , i = e.getAttribute (“href”), o = e.getAttribute (“data handle”), r = $ popup.getPopupClass (e.classList ), l = $ visibility. isBelowPrimaryContent (e)? “bottom”: “top”; $ gtm.reportNow ({Event: “Social-Share-Widget”, clickLocation: l, socialNetwork: r}), reportSocial (r), $ Visibility.getViewportWidth ()> = 768&CSSEANDCH ARr&& (t.preventDefault (), $ popup .popWindow (r, o, i))}! Function () {const e = _throttle (P, 30); if (k (), dom.findAll (t, “). share-link”) .forEach (t => t.addEventListener (“click”, V)), y&& (y.href = “http: // www .facebook.com / sharer / sharer.php? u = “f”? utm_source = fb&utm_medium = s3&utm_campaign = sharebutton-t “), w&& (w.href =” https://twitter.com/share?text= “encodeUR (h) “= sharebutton-t&via =” w.getAttribute (“data handle”)), v&& (v.href = “http://pinterest.com/pin/create/button/?url=” f “? utm_source = pin&utm_medium = s3&utm_campaign = sharebutton-t&description = “encodeURIComponent (h)” &media = “g), b) return; auth0.on (“init”, () => {auth0.isSubscriber () &&t.classList. “}), window.addEventListener (” scroll “, e), window.addEventListener (” resize “, S), window. addEventListener (“resize”, k), s? s.classList.contains (“rubric sponsor story”) &&l? (r.classList.remove (“visible”), l.classList.add (“visible”), l .textContent = s.text || s.textContent) πŸ™ r.textContent = s.text || s.textContent, r.href = s.href || “#”) πŸ™ n.style.display = ” none “, r.style.display =” none “); S (), o.textContent = h} ()});
}, {“2”: 2, “3”: 3, “4”: 4, “12”: 12, “37”: 37, “52”: 52, “53”: 53}];
window.modules [“nav-search-button.client”] = [function (required, module, export) {“use strict”; const dom = required (3), $ gtm = required (2), {reportSearch: reportSearch} = require (52), openClass = “open”, closeClass = “closed”; module.exports = (e => {const s = e, t = dom.find (e, “. nav-search-button-trigger”), n = dom.find (e, “. nav-search-form” ), o = dom.find (e, “. search-input”); function i () {const e = dom.find (“body”); s.classList.toggle (closeClass), s.classList.toggle ( openClass), e.classList.toggle (“disabled”), e.classList.toggle (“search-active”)} function c () {i (), s.classList.contains (openClass) &&o.focus ()} Function a (e) {! S.contains (e.target) &&s.classList.contains (openClass) &&i ()} function) {27 === e.keyCode&&s.classList.contains (openClass) &i (e) {e.preventDefault (), $ gtm.reportCustomEvent ({category: “search”, label: “on =” window.location.href, action: o.value}), reportSearch ((o.value || “”). split (“”), () => n.submit ())}! function (e, s, t) {s&&s.addEventListener (“click”, c); t&&t.addEventListener (“submit”, d); e.addEventListener (“click”, a), document.addEventListener (“keydown”, r), e) .addEventListener (“touchend”, a), n.addEventListener (“submit”, d)} (dom.find ( “body”), t, dom.find (e, “. nav-search-form submit”))});
}, {“2”: 2, “3”: 3, “52”: 52}];
window.modules [“nav-dropdown-button.client”] = [function (required, module, export) {“use strict”; const dom = required (3), visibility = required (4), {reportSearch: reportSearch} = require (52); function getNextSchildren (e) {const t = []; let i = e; for (; i = i.nextElementSibling;) t.push (i); return t} function getMainChildren (e, t) {let i = [], n = e.firstChild; for (; n = n.nextElementSibling;) n.contains (t)? n.isSameNode (t) || (i = i.concat (getMainChildren (n, t)))): i.push (n); return i} function isMobile () {return visibility.getViewportWidth () {let t; const i = e.querySelector (“. nav-dropdown-button-trigger”), n = dom.find (“body”), o = dom.find (“. top”), l = dom.find (“. confetti-list “), s = dom.find (“. nav-dropdown-button_nymag-homepage “”), r = dom.find (“header.page-header”) || o, c = dom.find (‘ [data-editable = “main”] ‘), a = dom.closest (e, “. Page header”), d = a? a.querySelectorAll (“. confetti-image.blue”): “”, g = a ? a.querySelectorAll (“. confetti-image.green”): “”, u = a? a.querySelectorAll (“. confetti-image.orange”): “”, f = a? a.querySelectorAll (“. confetti -image.orange2 “):” “, m = a? a.querySe lectorAll (“. confetti-image.pink “):” “, p = a? a.querySelectorAll (“. confetti-image.purple “): “”, h = a? a.querySelectorAll (“. confetti-image. yellow”): “”, y = e.querySelectorAll (“. dropdown-nav-search-form”); function b (e) {let t = e.currentTarget, i = t.querySelector (“. nav-search- input”), n = i? i.value.split (“”): []; e.preventDefault (), reportSearch (n, () => t.submit ())} i.addEventListener (“click” , () => {initializeHeight (e), v ()}); for (let e = 0, t = y.length; e (function (e) {e.classList.remove (“c-right”, “c -rightdown”, “c-left”, “c-leftdown”) }) (e))}, 500)} ()) πŸ™ i.setAttribute (“aria-expanded”, “true”), t = window .scrollY), e.classList.toggle (“closed”), e .classList.toggle (“open”), n.classList.toggle (“deactivated”), a&&e.isSameNode (s)? function () {if (o.contains (e)) {const e = getMainChildren (o, s); S (e), w (o)} if (c.contains (e)) {const e = getMainChildren (c, s); o. classList.toggle (“hidden component”), w (c), S (e)} e.classList.toggle (“open-mobile”)} (): a&&! y&&r&& (w (r), function () {const i = e .classList.contains (“open”)? 0: t; window.scrollTo ({top: i})} ())} function w (e) { S (getNextSchildren (e))} Function S (e) {e .forEach (e => {e.classList.toggle (“hidden component”)})} n.addEventListener (“click”, t => {! E .contains (t.target) &&e.classList.contains (“open”) &&v ()}), document.addEventListener (“keydown”, t => {27 === t.keyCode&&e.contains (“open” list “). ) &&v ()})});
}, {“3”: 3, “4”: 4, “52”: 52}];
window.modules [“follow.client”] = [function (required, module, export) {“use strict”; const _find = require (42), $ popup = require (53); DS.controller (“follow”, [function () {function e (e) {this.el = e, this.handle = e.getAttribute (“data handle”)} return e.prototype = {events: {click: ” openFollow “}, openFollow: Function (s) {var t, n, a = $ popup.position, o = $ popup.params, l = {}, r = {w: 780, h: 500}, s = new a (rw, rh), c = this.el.classList; l.handle = this.handle, r.left = s.left, r.top = s.top, n = _find ([{className: “facebook” , url: “https: //facebook.com/ Genealogiehandle Genealogie “,network:”Facebook” Genealogie {{className:”pinterest”,url:”http://www.pinterest.com/ regis-handle} “,network : “Pinterest”}, {className: “instagram”, URL: “https://www.instagram.com/ Zonenhandle}”, network: “Instagram”}, {className: “rss”, URL: “http: //feeds.feedburner. com / {handle} “, network:” RSS “}, {className:” twitter “, URL:” https://twitter.com/intent/follow?screen_name=phiahandle Genealogie&tw_p=followbutton&variant = 2.0 “, network:” Twitter “}, {className:” snapchat “, URL:” https://www.snapchat.com/discover/ Genealogiehandle} “, netw ork:” Snapchat “}], functi on (e) {return c.contains (e.className)}), l.url = n.url.replace (“{handle}”, l.handle), l.network = n.network, l.name = “Follow” l.handle “on” l.network, t = new o (l, r), window.open (t.address, t.name, t.features), e. PreventDefault ()}}, e}]);
}, {“42”: 42, “53”: 53}];
window.modules [“comment-link.client”] = [function (required, module, export) {“use strict”; const dom = requires (3), _ get = requires (23), _ isFinite = requires (110), ajax = require (109); DS.controller (“comments link”, [function () {var t, e = “http: //” document.documentElement.getAttribute (“data-uri”) “.html”; function n (n) {var o; (this.el = n, this.coral_talk_root = n.getAttribute (“data coral talk”), this.commentsCount = dom.find (n, “. comments link number”), this.commentsText = dom.find (n, “. Comments-Link-Text”), this.isNavVariation = n.classList.contains (“Comments-Link-Article-Nav”), this.cutoffCnt = n.getAttribute (“data-cutoffCnt” ) || 1e3, t = `$ {this.coral_talk_root} /api/v1/graph/ql`,this.shouldRenderCommentStream ()) && (o = this.onCommentCountFetched.bind (this), ajax. SendReceiveJson ({method: “GET”, URL: t ‘? Query = {Asset (URL: “‘ e ‘”) {totalCommentCount}}’, data type: “json”}, function (t, e) {var n = _get (e, ” data.asset.totalCommentCount “, 0); return t? o (t): _ isFinite (n)? void o (null, n): o (” Unexpected Coral Talk response “)})}) Return n. prototype.onCommentCountFetched = function (t, e) {if (t) ret urn console.warn (t); e> 0&& (this.isNavVariation&&e1? “s”: “”), this.el.classList.remove (“no-classList.remove comments”))}, n.prototype.shouldRenderCommentStream = function () {return-1! == e.indexOf (“@ shared”)}, n}]);
}, {3: 3, 23: 23, 109: 109, 110: 110}];
window.modules [“head-gtm.client”] = [function (required, module, export) {“use strict”; const {getCLS: getCLS, getFID: getFID, getLCP: getLCP} = require (142), isProduction = require (10) (); function reportWebVitals (e) {isProduction || console.log (“reportWebVitals:% O”, e); const t = “string” == typeof e.name?e.name.toUpperCase (): e.name; window.dataLayer = window.dataLayer || [], window.dataLayer.push ({event: “analysisEvent”, event_action: t, event_category: “Web Vitals”, event_label: e.id, event_value: e .delta, eventAction: t, eventCategory: “Web Vitals”, eventLabel: e.id, eventNonInt:! 0, eventValue: e.delta, nonInteraction:! 0, transport: “beacon”})} getCLS (e => {e.delta = Math.round (1e3 * e.delta) , reportWebVitals (e)}), getFID (e => {e.delta = Math.round (e.delta), reportWebVitals (e)}), getLCP (e => {e.delta = Math.round (e. delta), reportWebVitals (e)});
}, {“10”: 10, “142”: 142}];
window.modules [“concert-ads.client”] = [function (required, module, export) {“use strict”; const customMappings = {“Crime-Assault”: “Power”, “Career-Money-Productivity”: “Power”, “Feminism-Politics-Identity”: “Power”, “Culture-Media”: “Culture”, Celebrity: “Culture”, life: “style”, fashion: “style”, shopping: “style”, weddings: “style”, beauty: “style”, animals: “self”, “learning creativity”: “self”, ” Relationship-friends family “:” self “,” mental health personality social behavior “:” self “,” learning “creativity”: “self”, “health-wellness”: “self”, parenting: “self”, “relationship -Sex dating marriage “:” self “}, striptags = require (54); function installConcertAds () {const e = new URLSearchParams (window.location.search) .get (” konzert_config_url “), t = e || window.concertConfigUrl; window._nymPermutive || console.warn (“ConcertAds will be initialized without Permutive”), window.concertAds = createConcertAds (), window.concertAds.loadRemoteConfig (t) .then (function () {window.concertAds.install ()})} function createConcertAds () {co nst e = getAuthStatus (); let t = getD ata (“title”), n = window.location.href, i = getData (“section”), o = “”, a = getData (“type”), r = getData (“vertical”) ; t&& (t = striptags (htmlDecode (t)). split (“”)), n = n.slice (n.lastIndexOf (“/”) 1); const l = {kw: getKeywords (), network: r, page_type: a, entry_group: i, keywords: t, pn: n}; return “Homepage” === a? o = “homepage”: “Section Page” === a&& (o = (o = window.location.pathname). Replace (/ // g, “”)), i&&-1 === i.index ( “”) && (o = i), customMappings [i] && (o = customMappings [i]), window.location .hostname.match (/ . Aws ./ i) ​​&& (l.clay_sandbox_env = r ), new window.ConcertAds ({cmd: [], Slots: [], dfpVariables: l, slugPath: “/” or replace (/ – | – / g, “-“), registered: “not authenticated”! == e, paywallActive: getPaywallStatus (e)})} function getKeywords () {try {const e = window._nymPermutive.article.keywords; return e&&e.length> 0&&e.some (Boolean)? e: (document.querySelector (‘meta [name = “keywords”]’) || document.querySelector (‘meta [property = “article: tag”]’)). getAttribute (“content”). split (“,”). map (function (e) {return e.trim ()})} catch (e) {return}} function getData (e) {if (window._nymPermutive) {if (e in window._nymPermutive) return window._nymPermutive [ e]; if (window._nymPermutive.article&&e in window._nymPermutive.article) return window. _nymPermutive.article [e]; if (window._nymPermutive.user&&e in window._nymPermutive.user) return window._nymPermutive.user [e]}} function htmlDecode (e) {var t = document.createElement (“div”); return t.innerHTML = e, 0 === t.childNodes.length? “”: t.childNodes [0] .nodeValue} function getAuthStatus () {const e = JSON.parse (localStorage.getItem (“auth0: profile”))), t = e? e [“http://nymag.com/app_metadata”]: null; return t? t.has_subscription? “with the title”: “unentitled”: “not authenticated”} function getPaywallStatus (e) {const t = getData (“totalCount”) || 0; return Boolean (t> = 3&& “with the title”! == e)} window.ConcertAds? installConcertAds (): window.addEventListener (“konzertAdsReady”, in StallConcertAds);
}, {“54”: 54}];
window.modules [“latest-news.client”] = [function (required, module, export) {“use strict”; const dom = required (3), lazyLoad = required (96); Function lazyLoadImage (a) {const o = dom.find (a, “img [data-src]”), d = dom.findAll (a, “source [data-srcset]”), e = dom.closest (a , “. result”); if (o&&e) {new lazyLoad.LazyLoader (e, o, d) .init ()}} function handleLazyLoad (a) {(dom.findAll (a, “. result”) || []). forEach (lazyLoadImage)} module.exports = (a => {handleLazyLoad (a)});
}, {“3”: 3, “96”: 96}];
window.modules [“choreographer.client”] = [function (required, module, export) {“use strict”; const cookie = required (41), _ get = require (23), _ omit = require (80), {insertSpeedBumpComponents: insertSpeedBumpComponents} = require (78), {insertNewsletterSpeedBumpComponents: insertNewsletterSpeedBumpComponents} = require (77), {generateGrowl: generateGrowl } = require (76), gtm = require (2), {getLocalStorage: getLocalStorage, setLocalStorage: setLocalStorage: setLocalStorage: setLocalStorage: setLocalStorage: setLocalStorage: setLocalStorage: setLocalStorage 14), {reportPaywall} = required (52) = reportPaywall} = report required (24), {getClientHistory: getClientHistory, updateClientHistoryWithPageData: updateClientHistoryWithPageData} = required (79), auth0 = required (12), {scenario: scenario} = required (73), cidReadyEvent = “nymcid-set”, cidKey = “nymcid “, isProduction = require (10) (), logger = require (74) .Logger (() => getLocalStorage (” show_choreographer_logs “)), {Verdon: Verdon} = require (75), TEST_COHORT_FLAG =” optimizeCohort “; Function displayDebug (e = “”) {if (“Permission”! == e.split (“#”). Pop ()) return; const t = _get (window, “dataLayer [0] .userDetails”, {}), o = _get (windo w, “dataLayer [0] .pageDetails.featureTypes”, “”), n = o.includes (“magazine “)? “magazine”: “”, r = o.includes (“feature”)? “Featured”: “”, i = “Value of the article:” (n || r || “Article”), a = _get (JSON.parse (localStorage.getItem (“auth0: profile”)), “http: // nymag. com / app_metadata “), l =” Authentication status: “(a?” authenticated “:” not authenticated “), s =” authorization status: “(!! a&&a.has_subscription?” Object.keys (_omit (t , “newYorkMediaUserID”)). Map (e => `$ {e}: $ {t [e]}`), d = document.body, g = document.createElement (“div”), u = document.createElement (“ul”); [i, l, s, … c] .map (e => {const t = document.createElement (“li”); return t.classList.add (“debug-item”) , t.appendChild (document.createTextNode (e)), t}). forEach (e => {u.appendChild (e)}), u.classList.add (“data-bullets”)), g.classList. add (“Debug Choreographer”), g.classList.add (“Display Debug Data”), g.appendChild (u), d.appendChild (g)} Function initializeChoreographer (e) {const t = e.getAttribute (“data-site-slug”), o = pageShouldCountAsView (t), n = auth0.isSubscrib er (); return t? getC lientId (cidKey, 8e3) .then (e => (logger.h1 (“Choreographer initialized”)), logger.log (`clientId: $ {e}`), logger.log (`page counts as view: $ { o} `), window.nymViewsResponse || (o? updateClientHistoryWithPageData (e, t): getClientHistory (e)))). then (r => {if (logger.group (), logger .h2 (“Client history”), logger.table (r), logger.groupEnd (), isNCR ()) return; const {scenarios: i, touts: a, testCohort: l = “”} = readJSONFromScript (e. querySelector (“script”)); if (! (l === (document.body.dataset [TEST_COHORT_FLAG] || “”))) return; const s = i.map (e => scenario (Object.assign ({}, e, {history: r, siteSlug: t, isSubscriber: n}))). filter (e => (logger.group (), logger.h2 (“Evaluate scenarios”), logger.log (e), logger.groupEnd (), e.shouldShow)). redu ((e, {action: t, min: o, number: n}) => {const r = a.find (({value: e}) => e === t); return r? (e [r.type] = r, e [r.type] .viewCount = no, e) : e}, {}); logger.group (), logger. h2 (“Active Touts”), logger.log (s), logger.groupEnd (), executeTouts (e, o, s, r)}). catch (console.error): console.error (“siteSlug not found.”)} Function documentInclu desComponent (e) {return document.querySelector (`[data-uri * =” / $ {e} / “]`)} Function pageShouldCountAsView (e) {const t = “strategist” === e, o = [“product”, “product-grid”]. find (e => documentIncludesComponent (e)); return t ||! o} Function executeTouts (e, t, o = {}, n) {const {global: r} = n, i = {featureArticleCount: r.Feature || 0, magazineArticleCount: r.Magazine || 0, standardArticleCount: r.Article || 0, totalArticleCount: r.total || 0}, a = window.concertAds, l = window.ConcertAds; if (o [“Speed-Bump”] && (_get (a, “adsBlocked”,! 0)? insertSpeedBumpComponents (findTemplate (e, “Speed-Bump”), o [“Speed-Bump”], i): a .lifecycle.listenAndPlayback (l.events.slotsInserted, () => {insertSpeedBumpComponents (findTemplate (e, “Speed-Bump”), o [“Speed-Bump”], i)}), o [“Newsletter-Speed- Bump “] && (_get (a,” adsBlocked “,! 0)? InsertNewsletterSpeedBumpComponents (findTemplate (e,” Newsletter-Speed-Bump “), o [” Newsletter-Speed-Bump “], i): a.lifecycle. listenAndPlayback (l.events.slotsInserted, () => {insertNewsletterSpeedBumpComponents (findTemplate (e, “n Ewsletter-Speed-Bump”), o [“Newsletter-Speed-Bump”], i)})), o [“Branded -Growl “] &&brandedTakeoverTime (o [” Branded-Growl “]) &&t) return logger.log (” should show brand growl “), void growlManager (findTemplate (e,” brand growl “), {baseTrackingData: body: o [“brand growl”]. brandedGrowlBody, contentClass: “brand content”, cta : o [“Branded-Growl”]. BrandedGrowlCTA, imageUrl: o [“Branded-Growl”]. ImageUrl, Link: o [“Branded-Growl”]. BrandedGrowlLink, Name: o [“Branded-Growl”]. Name, scrollDepth: o [“Branded-Growl”]. BrandedGrowlScrollDepth, title: o [“Branded-Growl”]. BrandedGrowlTitle, toutType: “Branded Growl”}, “# Branded-Growl”); if (t&&o [“content-cliff”]) contentCliff (findTemplate (e, “content-cliff”), o [“content-cliff”], o [“content-cliff”]. viewsLeft, n); else {if (t&&o [“cliff-takeover”]) return / coronavirus news | pivot | paywall exclude / i.test (window._nymGtmPage.tags)? void (isProduction&&logger.log (“Content cliff no-op due to excluded tag matte ch:”, window._nymGtmPage.tags)): void cliffTakeover (findTemplate (e, “Paywall reader interface”), i, o [” Cliff takeover “]); if (o [“Growl-Newletter”] ||! o [“Promo-Growl”]) if (o [“Baby-Growl”]) babyGrowl (findTemplate (e, “Paywall Reader Interface”), i, o [“baby growls”]); else {if (! o [“Warning-Growling-2”]) return o [“Warning-Growling”] &&shouldWarn ()? (setContentCliffWarningDisplayed (), logger.log (“should show warning”), void growlManager (findTemplate () e, “warning-growl”), {contentClass: “warning-content”, title: o [“warning-growl”] . warningGrowlTitle, Name: o [“Warning-growl”]. Name, scrollDepth: o [“Warning-growl”]. warningGrowlScrollDepth, cta: o [“Warning-growl”]. warningGrowlCTA, body: o [“Warning-growl “]. warningGrowlBody, Link: o [” Warning-growl “]. warningGrowlLink, baseTrackingData: i, toutType:” Warning growl “},” # Warning-growl “)): void 0; WarningGrowl (findTemplate (e, “Paywall-Reader-Interface”), i, o [“Warning-Growl-2”])} else growlManager (findTemplate (e, “Growl-Message”), {contentClass: “promo-content “, Title: void 0, Name: o [” promo-gr owl “]. Name, scrollDepth: o [” Promo-Growl “]. PromoGrowlScrollDepth, cta: o [” Promo-Growl “]. PromoGrowlCTA, body: o [“Promo-Growl”]. PromoGrowlMessage, Link: o [“promo-growl”]. PromoGrowlLink, baseTrackingData: i, toutType: “promo growl”}, “# growl-message”)}} Function shouldWarn () {return ! contentCliffWarningDisplayed ()} function getContentCliffWarningDisplayedKey () {const e = new Date, t = e.getMonth (); return`content-cliff-warning-displayed – $ {e.getFullYear ()} – $ {t} `} Function contentCliffWarningDisplayed () {const e = getContentCliffWarningDisplayedKey (); return “true” === getLocalStorage (e)} function setContentCliffWarningDisplayed () {const e = getContentCliffWarningDisplayedKey (); Returns setLocalStorage (e, “true”)} Function growlManager (e, {contentClass: t, scrollDepth: o, Name: n, Title: r, body: i, cta: a, link: l, baseTrackingData: s, toutType: c, imageUrl: d = null}, g = “”) {const u = function () {const e = ` n n n n $ {r} n $ {d? ”: “”} n $ {i} n $ {d? “: “”} n $ {a} n n n n `; return document.createRange (). createContextualFragment (e)} (), p = {creative: i, id: c, name: n, position: “growl”}; u.querySelector (“a”)) .addEventListener (“click”, () => PromotionReport (“Click”, s, p)), generateGrowl (e.g. {content: u, scrollDepth: o, onShow: ( ) => promotionReport (“View”), s, p)})} Function contentCliff (e, t, o, n) {const {first_visit: r, global: i} = n, a = {totalArticleCount: i.total || 0, standardArticleCount: i.Article || 0, featureArticleCount: i.Feature || 0, magazineArticleCount: i.Magazine || 0}, {contentCliffBody: l} = t, s = document.importNode (e,! 0) .querySelector (“. Content-cliff”), c = document.querySelector (“. Article-content> .clay -agraph” ), d = {creative: l, id: “content cliff”, name: “Content Cliff”, position: “in-article”}; s&& (c.insertAdjacentHTML (“afterend”, s.outerHTML), require (“content-cliff.client”) (document.querySelector (“. content-cliff”), {contentCliffOptions: t, viewsLeft: o, firstVisit: number (r), onShow: () => PromotionReport (“view”, a, d), onClickCliff: () => PromotionReport (“click”, a, d)})}} func tion verdonFosseToutSetter (e, t, o , n, r) {const i = new Verdon ({Container: “.paywall-reader-interface”, URL: “https://fosse.nymag.com/fosse/v1.5.3 /index.html”}), a = e.type, l = {email: auth0.getEmail (), isAuthenticated: auth0.isAuthenticated (), isSubscriber: auth0.isSubscriber ()}; n.classList.add (a), i.once (“frame: ready “, () => {i.sendMessage (” tout: show “, {readerState: l, toutType: a, toutData: e}), r&&i.sendMessage (” frame: height “))}), i.on (“tout: visible”, () => {PromotionReport (“View”, t, o)}), i.on (“tout: sign-in”, () => {auth0 .showLogin (window.location. href)}), i.on (“tout: log-out”, () => {auth0.logout ()}), i.on (“tout: dismissed”, () => {n.classList.add (“dismissed”), i.sendMessage (“tout: hide”, {toutType: a, toutData: e})}), i.on (“tout: subscribe”, ( ) => {e.ctaLink = replaceQueryParams (e.ctaLink), PromotionReport (“Click”, t, o), window.open (e.ctaLink, “_ ​​blank”)}), i.on (“frame : height “, e => {n.style.height =` $ {e.payload.currentHeight 10} px`}), i.on (“tout: view-account”, () => {window.location. href = “https: / /subs.nymag.com/account”♀))Function promotion ionReport (e, t, o) {const {creative: n, id: r, name: i, position: a} = o; t.event = `eec.promotion $ {e}`, t.ecommerce = {promoView: {Promotions: [{Creative: n.trim (), ID: r, Name: i, Position: a}]}}, gtm.reportNow (t), reportPaywall ({Creative: n.trim (), eventType: e, id: r, name: i, position: a})} function babyGrowl (e, t, o) {const n = document .importNode (e,! 0) .querySelector (“. paywall-reader-interface”), r = {creative: o.babygrowlDescription, id: “baby growl”, name: “baby growl”, position: “growl”}; document.body.appendChild (n), o.ctaLink = o.babygrowlCtaLink, o. ctaText = o.babygrowlMessage, o.headline = o.babygrowlDescription, verdonFosseToutSetter (o, t, r, n)} Function cliffTakeover (e, t , o): a, cliffTakeoverPromo: l, cliffTakeoverStatus: s, type: c} = o, d = document.importNode (e,! 0) .querySelector (“. paywall-reader-interface”), g = document.querySelectorAll (“. Sound paragraph”), u = {Creative: l, ID: “Content Cliff”, Name: “Content Cliff”, Position: “Growl”}, p = {cta: n, ctaLink: r, Description: i, image: a, promo: l, status: s, type: c}; document.body.appendChild (d), g.forEach ((e, t) => {0! == t&&e.remove ()}), verdonFosseToutSetter (p, t, u, d,! 0), document.querySelector (“html”). style.overflowY = “hidden”, document.body.style.position = “fixed”} function warningGrowl (e, t, o) {const {type: n, warningGrowl2CTA: r, warningGrowl2CtaLink: i, warningGrowl2Description: a, warningGrowl2Image: l, warningGrowl2Promo: s, warningGrowl2Status: c} = o, d = document.importNode (e,! 0) .querySel (“.paywall-reader-interface”), g = {creative: s, id: “warning growl” , Name: “warning growl”, position: “growl”}, u = {cta: r, ctaLink: i, description: a, picture: l, promo: s, status: c, type: n}; document.body.appendChild (d), verdonFosseToutSetter (u, t, g, d,! 0)} function getClientId (e = “”, t = 8e3) {let o = cookie.get (e); return o? Promise.resolve (o): new promise ((o, n) => {const r = setTimeout (() => {n (`Key could not be found: $ {e} on cookie after $ {t} ms` )}, t); window.addEventListener (cidReadyEvent, () => {clearTimeout (r), o (cookie.get (e))})})} Function readJSONFromScript (e) {try {retur n JSON.parse ( e.innerHTML)} catch (e) {return {touts: [], scenarios: []}}} function findTemplate (e, t = “”) {const o = e&&e.querySelector (`[data -template-id = “$ {t}”] `); return o&&o.content} function isNCR () {return / [? &] source = ncr / .test (location.search)} function brandedTakeoverTime (e) {const {startTime: t, endTime: o, startDate: n, endDate: r} = e, i = n.concat (“”, t), a = r.concat (“”, o), l = moment (i), s = moment (a); return moment (). isBetween (l, s)} function optimizeDebugger () {return new promise (e => {const t = window.location.search || “”; if (t) {const o = new URLSearchParams (t), n = o .get (“Optimize attribute name”) || “”, r = o.get (“Optimize attribute value”) || “”, i = o.get (“Optimize-Delay”) || 0, a = o.get (“Optimize-Cookie”) ||! 1; setTimeout (() => {a&& (document.cookie = randomNymcid ()), document .body.setAttribute (`data – $ {n}`, r), e ( )}, i)} else e ()})} Function randomNymcid () {return`nymcid = $ {(() => ([1e7] -1e3 -4e3 -8e3 -1e11) .replace (/ [018] / g, e => (e ^ 16 * crypto.getRandomValues ​​(new Uint8Array (1)) [0]>> e / 4) .toString (16) [0])) ()} `} function replaceQueryParams (e ) {const t = window.location.search || “”; if (t) {const o = new URLSearchParams (t); if (e.includes (“?”)) {const t = e.split (“?”), n = new URLSearchParams (t [1]); for (let e from o.entries ()) n .set (e [0], e [1]); e = `$ {t [0]}? $ {n.toString ()} `} else e =` $ {e}? $ {o.toString ()} `} return e} module.exports = (e => new promise (e => {auth0.on (” init “, () => {e ()})}). then (() => optimizeDebugger ()). then (() => {displayDebug (window.location.href), initializeChoreographer (e)}));
}, {2: 2, 10: 10, 12: 12, 14: 14, 23: 23, 24: 24, 41: 41, 52: 52, 73: 73, 74: 74, 75: 75, 76: 76, 77: 77, 78: 78, 79: 79, 80: 80 content-cliff.client “:” content-cliff.client “}];
window.modules [“growl.client”] = [function (required, module, export) {“use strict”; require (140); const _some = require (60), dom = require (3), localStorageKeyRoot = “slideout -“, {getLocalStorage: getLocalStorage, setLocalStorage: setLocalStorage} = require (14); module.exports = ((e, t) => {const {content: o, onShow: s, scrollDepth: r = 50, rejectable: i =! 1} = t, n = number (r || e.getAttribute ( “Data display-on-page scroll percentage”)), a = dom.find (e, “. Modal”), l = “slideout-” (t.id || e.getAttribute (“id”)), c = getLocalStorage (l); function d () {a.classList.add (“hidden”)} function g () {setLocalStorage (l,! 0), d ()} i&&c? e.remove () πŸ™ o&&e .querySelector (“[data content]”). appendChild (o), n&&function (e = 50) {const t = new Inters e => {_ some (e, “isIntersecting”) && (a.style.top = “inherit “, a.classList.remove (” hidden “,” initial “),” function “== typeof s&&s (), t .unobserve (a))}); a.style.top =` $ {document.querySelector ( “body”). scrollHeight / (100 / e)} px`, t.observe (a)} (n), e.querySelector (“. dismissed-modal”). addEventListener (“click”, () => i ? g (): d ()), e.addEventListener (“growl: hide”), d), e.addEventLi stener (“growl: dismiss”, g))});
}, {3: 3, 14: 14, 60: 60, 140: 140}];
window.modules [“newsletter-speed-batch.client”] = [function (required, module, export) {“use strict”; const {loadRecaptcha: loadRecaptcha} = require (108), _ isEmpty = require (87), _ set = require (107), _ kebabCase = require (81), gtm = require (2), auth0 = require (12), Visibility = require (4), COMPONENT_NAME = “Newsletter-Speed-Bump”, EMAIL_VALID_REGEX = / ^ (?: (?: [^ () [] \.,;: S @ “] (?: . [^ () [] \.,;: s @ “]) *) | (“. “)) @ (?: (?: [[0-9] {1,3} . [0-9] {1,3} . [0-9] {1,3} . [0-9] {1,3}]) | (?: (?: [A-zA-Z -0-9] .) [A-zA-Z] {2,})) $ /, LOCAL_STORAGE_KEY_NAME = “newsletterSpeedBumpSignUpStatus _”, MAX_EMAIL_LENGTH = 50; Function setClass (e, t) {e.classList.add (t)} Function getRequestUrl (e) {return e.getAttribute (“action”) {const t = e? e.getAttribute (“content”): “”; return _kebabCase (t)} function getPayloadObject (e, t, r, s) {const n = {}; return _set (n, `vars. source _ $ {t}`, `$ {COMPONENT_NAME} _ $ {s}`), n.email = r, n.lists = {}, n.lists [t] =! 0, n.recaptcha = e, n .signuppage = `$ {document.location.href} _ $ {t}`, n [`source _ $ {t}`] = “newsleter_speedbump”, n} module.exports = ((e, t) => {if (! t ||! e) return; if (“success” === window.localStorage.getItem (`$ {LOCAL_STORAGE_KEY_NAME} $ {t.newsletterSpeedBumpNewsletterId}`)) return void e .remove (); const {baseTrackingData: r, name: s, newsletterSpeedBumpCtaCopy: n, newsletterSpeedBumpDescription: i, newsletterSpeedBumpHeadline: a, newsletterSpeedBumpNewsletterId: o, newsletterSpeedBumpThankYouMessage: cE “), =” description e.querySelector (“. input.email”), m = e.querySelector (“. error-message”), h = e.querySelector (“. form”)), E = e.querySelector (“. Form-container “), y = e.querySelector (“. Form-recaptcha-container “), g = e.querySelector (“. Headline “), v = e.querySelector ()” .container “), S = e.querySelector ( “. input.newsletterId”), _ = e.querySelector (“. recaptcha-wrapper”), L = e.querySelector (“. input.submit”), w = e.querySelector (“. text-container “), q = new visibility. Visible (e, {threshold value shown: .5}); u&& (p.removeAttribute (” required “), e.classList.add (” logged on “”)), d. innerHTML = i, g.innerHTML = a, S.value = o, Lv alue = n, q.on (“shown”, function () {if (visibility.isElementNotHidden (e)) {const e = r; e. event = “eec.promotionView”, e.ecommerce = {promoView: {advertising campaigns: [{creative: `$ {a} | $ {i}`, id: “Newsletter Speed ​​Bump”, name: s, position: “In-Article”}]}}, gtm.reportNow (e), q.destroy ()}}), p.addEventListener (“focus”, () => {_. ClassList.remove (“hidden”)} ), h.addEventListener (“submit”, t => {t.preventDefault (); const s = new XMLHttpRequest, n = u | | e.querySelector (“. input.email”). value, i = getPageType (document .querySelector (‘meta [name = “type”]’)); u ||! (n.length> = 50) &&EMAIL_VALID_REGEX. test (n)? loadRecaptcha (l, “newsletterSubmit”,! 0) .then (a => {s.open (“POST”, getRequestUrl (h),! 0), s.setRequestHea der (“Content-Type”, “application / json; charset = UTF-8 “), s.addEventListener (” load “, s => {const a = s.currentTarget || s.target; if (a.status> = 200&&a.statussetClass (e,” Success “)) , [d, E, m, _]. forEach (e => setClass (e, “hidden”)), g.innerHTML = c.replace (“{{email}}”, n), m.innerHTML = ” “; const s = JSON.parse (a.response), l = _isEmpty (s.sailthruIds)?” “: Object.values ​​(s.sailthruIds) [0], u = r; u.event =” eec .purchase “, u.ecommerce = {Purchase: {actionField: {id: l, Sales:” 0.00 “}, Products: [{Category:” Newsletter Registration “, Name: S.Value, Quantity: 1, Variant: `$ {COMPONENT_NAME} – $ {i}`}]}}, gtm.reportNow (u), setTimeout (() => {e.classList.add (“hidden”)}, 5e3), t.preventDefault ()} else m.innerHTML = “* An error has occurred. Please try again.”}), S.addEventListener (“error”, () => {m.classList.remove (“hidden”), m .innerHTML = “* An error occurred. Please try again.”}), s.send (JSON.stringify (getPayloadObject (a, o, n, i))), t.preventDefau lt ()}): m.innerHTML = “* Please enter a valid email address”})});
}, {2: 2, 4: 4, 12: 12, 81: 81, 87: 87, 107: 107, 108: 108}];
window.modules [“speed-batch.client”] = [function (required, module, export) {“use strict”; const gtm = required (2), visibility = required (4); module.exports = ((e, i) => {if (! i ||! e) return; const {name: o, speedbumpDescription: r, speedbumpMessage: t, speedbumpLink: n, baseTrackingData: s} = i, c = new visibility.Visible (e, {shownThreshold: .5}); e.querySelector (“. description”). innerHTML = r, e.querySelector (“. promo-link”). innerHTML = t, e.querySelector ( “. promo-link”) .href = n, e.classList.remove (“reduced”), c.on (“shown”, function () {if (visibility.isElementNotHidden (e)) {let e = s; e.event = “eec. PromotionView”, e.ecommerce = {PromoView: {Promotions: [{Name: o, Creative: r, ID: “Speed ​​Bump”, Position: “In-Article”}]}} , gtm.reportNow (e), c .destroy ()}}), e.querySelector (“. promo-link”). addEventListener (“click”, function () {let e = s; e.event = “eec .promotionClick “, e.ecommerce = {promoClick: {Promotions: [{Name: o, Creative: r, ID:” Speed ​​Bump “, Position:” In-Article “}]}}, gtm.reportNow (e )})});
}, {“2”: 2, “4”: 4}];
window.modules [“content-cliff.client”] = [function (required, module, export) {“use strict”; const auth0 = required (12), isProduction = required (10) (), logger = required (74)) .Logger (() =>! IsProduction); module.exports = ((t, e) => {if (! E) return; logger.group (), logger.h2 (“Content Cliff”); const {contentCliffOptions: o, firstVisit: n, onShow: r, onClickCliff: i} = e, c = 300, l = Number (document.querySelector (“[number of data components]”). getAttribute (“number of data components)”)), u = 3, s = [“taboola”] , a = “# content-cliff”, f = t, d = function () {let t = 0; return document.querySelectorAll (“[data word” -count] “). forEach (function (s) {t = Number (e.getAttribute (” data word count “) || 0.10) || 0}), t} () , g = function (t, e) {function o (t) {return Math.round (t.getTime () / 1e3 / 60)} const n = o (t), r = o (e); return no} (new date, new date (s)) {}, show: () => {r (), function () {(p = function (t = “”) {return document.querySelectorAll (`$ {t} ~ * `)} (a)). forEach (t => t.remove ()), function () {const {contentCliffStatus: e, contentCliffPromo: n, contentCliffCTA: r, contentCliffURL: c} = o, l = t. querySelector (“[data-content t-cliff-status]”), u = t.querySelector (“[data-content-cliff-promo]”), s = t.querySelector (“[data-content-cliff-cta ] “); s&&s.setAttribute (” href “, c), s&&s.insertAdjacentHTML (” afterbegin “, r), l&&l.insertAdjacentHTML (” afterbeginSSEAND “, e), uCove. reduced “), e = s, e.forEach (t => {const e = document.querySelector (`[data-uri * =” / $ {t} / “]`); e&&e.remove ()}), m.addEventListener (“click”, () => auth0.showLogin ()); var e} ()}} [function () {if (dl) return logger. log (`Number of article words $ {d} was too short for the cliff`), logger.log (` Number of article components is less than $ {u} and not suitable for the cliff`), “noop”; if (g&&isProduction) return “noop”; g&&logger.log (`First session check was $ {g}! The cliff is still displayed: isProduction => $ {isProduction}`); if (/ coronavirus news | pivot | paywall exclude / i.test (window._nymGtmPage.tags)) returns isProduction&&logger.log (“Content cliff no-op due to excluded tag match:”, window._nymGtmPage.tags), ” noop “; return “show”} ()], m = t.querySelector (“. content-cliff-login”); let p = []; return logger .log (`should not work due to the 30-minute window of the first session in production: $ {g}`), logger.groupEnd (), auth0.on (“login”, () => {f. classList.add (“collapsed”), (p = Array.prototype.slice.call (p, 0) .reverse ()). forEach (t => f.insertAdjacentElement (“afterend”, t)), p = [ ]}), “function” == typeof h? h (): void 0});
}, {“10”: 10, “12”: 12, “74”: 74}];
window.modules [“coral-talk.client”] = [function (required, module, export) {“use strict”; const dom = required (3), store = required (116), visibility = required (4), auth0 = require (12), TALK_AUTH = “talk: auth_token”; let coralEmbed, hasEmbedScriptLoaded =! 1, hasCoralTalkRendered =! 1; function renderComments (e) {if (hasEmbedScriptLoaded&&! hasCoralTalkRendered {const) e.CORAL_TALK_HOST} `, auth_token: getAuthToken (), asset_url: e.TALK_ASSET_URL}; hasCoralTalkRendered =! 0, coralEmbed = window.Coral.Talk.render (e.commentStreamContainer, t)}} function getAuthToken (e) {) = e&&e [“http://nymag.com/coral_talk”] || auth0.getTalkJwt (), i = store.get (TALK_AUTH); return t? i&&t == i? i: (store.set (TALK_AUTH, t), t) πŸ™ i&&store.remove (TALK_AUTH), null)} function coralLogin () {coralEmbed.login (getAuthToken ())} function embeddedScript (e, t) {let i = document.createElement (“script”); i.type = “text / javascript”, i.async =! 0, i.src = e, i.addEventListener (“load”, () => {hasEmbedScriptLoaded =! 0, renderComments (t)}), document.getElementsByTagName (“head”) [0] .appendChild (i)} Function initVerificationMessage () {auth0.isAuthenticated () &&auth0.refresh (); let e = document.querySelector (“. coral -talk-container”); auth0.isAuthenticated () &&! auth0.isEmailVerified () && (e.insertAdjacentHTML (“beforebegin”, ‘ n n Please check your account to enable commenting. You haven’t received a confirmation email? Send the email again now . N ‘), document.querySelector (“. Activation-link”). AddEventListener (“click”, sendVerificationEmail))} function sendVerificationEmail () {let e = document.querySelector (“. Coral-talk -verify-address” ); return fetch (`https: // $ {window.location.host} / _user / verification-email? user_id = $ {auth0.getUserID ()}`, {method: “GET”, headers: {“Content-Type” : “application / json”}}). Then (e => e) .then (t => {t&&200 == t.status? E.innerHTML = “Confirmation email was sent successfully”: e.innerHTML = `$ {t.statusText}`}) . catch (e => console.log (e))} Function tryScriptEmbedding (e, t) {initVerificationMessage (), hasEmbedScriptLoaded? renderComments (t): embeddedScript (t .EMBED_URL, t)} function addVisibilityListener (e, t) {new Visibility.Visible (e, {PreloadThreshold: 750}). On (“Preload”, () => tryScriptEmbedding (e, t))} Function removeSignInButton (e) {e&&e.parentNode&&dom.removeElement (e)} Function (e) {const t = e.getAttribute (“data coral-talk -Host “), i =` $ {t} / static / embedded.js`, n = `http: // $ {document.documentElement.getAttribute (” data-uri “)}. html`, a = “true” === e.getAttribute (“data-care”), o = -1! == n.indexOf (“@ published”), r = e.querySelector (“. coral-talk-container”), s = e.querySelector (“. coral-talk-btn-signin”), c = {CORAL_TALK_HOST : t, EMBED_URL: i, commentStreamContainer: r, signInButton: s, TALK_ASSET_URL: n} ;! “, () => auth0.showLogin ()), auth0.isAuthenticated () &&removeSignInButton (s)}), auth0.on (” login “, t => {removeSignInButton (s), getAuthToken (t), visibility.isElementInViewport (e) &&attemptScriptEmbedding (c), hasCoralTalkRendered&&coralLogin ()}), auth0.on (“logout”, () => {store.remove (TALK_AUTH)})} module.exports = init;
}, {3: 3, 4: 4, 12: 12, 116: 116}];
window.modules [“ad.client”] = [function (required, module, export) {“use strict”; const _forEach = require (40), _ max = require (43), _ find = require (42), _ contains = require (44), $ visibility = require (4), dom = require (3), MAX_MOBILE_RE = / [[0-9] {1,3} – (768 | 600) /, MAX_TABLET_RE = / [0-9] {3} – (1024 | 1180) /, DESKTOP_RE = / (1024 | 1180) -plus /, AD_NAME_SELECTOR = ‘[data name ^ = “/ 4088 /”], [data name ^ = “/ 172968584 /”]’; var flaggedComponentsOnPage = function () {var e, t = document.querySelector (“. article-content”), n = []; return t&&_forEach ([‘. article-sidebar [data-width = “large”]’], function (a) {e = t.querySelectorAll (a), _ forEach (e, function (e) {n.push (e )})}), n} (); Function getElementsVerticalOverlap (e, t) {var n = e.getBoundingClientRect (), a = t.getBoundingClientRect (); return! (n.top> a.bottom || n.righta.right)? a.bottom-n.top: 0} function getElementsOverlapAmount (e, t) {var n, a = []; return _forEach (t, function (t) {n = getElementsVerticalOverlap (e, t), a.push (n)}), _ max (a)} function getNYMagAdChannel (e) {var t = “”; switch (e) {case “company information”: t = “comp any”; break; case “New York Guides & things to do”: t = “to do”; break; case “other”: t = e; break; case “sponsored guides”: t = “s-guides”; break; case “urbanist”: t = “urbanist”; break; default: t = “”} return t} Function appendSectionToDfpAds () {var e, t, n, a = document.querySelector (“meta [property = ‘og: site_name’]”), o = document.querySelector (“article [data-content-channel] “), i = document.querySelectorAll (AD_NAME_SELECTOR); a&& (e = a.content), o&& (t = o. getAttribute (“data content channel”). toLowerCase ()), t&& “New York Magazine” === e&CSSEANDCANDHannel,. querySelector (“. body> div”) || {}, t = document.querySelector (“body”) || {}, n = e&&e.classList, a = n&&n.length? [… n]: [], o = _find (a, e => e.includes (“feature”)), i = document.querySelectorAll (AD_NAME_SELECTOR); n&& (o? appendPageNumberPositionToDfpAds (i, “Feature)”): n.contains (“lede-gallery-content”)? appendPageNumberPositionToDfpAds (i, “Image_Gallery”): t.classList.contains (“single-column layout”)? appendPageNumberPositionToDfpAds (i, “One_Column_Article”): n .contains (“article-content”) &&appendPageNumberPositionToDfpAds (i, “Standard_Article”))} Function appendPageNumberPosition “”, “1100x200DfpAds (e379) 1×1 “; [], o = dom.find (“. ad-splash”), i = dom.find (“section.wrapper”), r = dom.find (“. secondary”), d = dom.find (“. below “), s = dom.find (“. primary “), c = {IA: {xsMobile: {normal: 1, grid: 1}, mobile: {normal: 1, grid: 1}, tray: {normal : 1, grid: 1}, desktop: {normal: 1, grid: 1}}, BA: {xsMobile: {normal: 1, grid: 1}, mobile: {normal: 1, grid: 1}, tablet: {normal: 1, grid: 1}, desktop: {normal: 1, grid: 1}}}; a.forEach (e => {let a, l = “”, u = e.dataset.sizes, m = e.classList.value, p = _find (n, e => u.includes (e)), g = e.parentElement.classList.contains (“image-gallery-mobile-grid-ad”); if (u&&! p || e.setAttribute (“Datenname”, e.getAttribute (“Datenname”) “/” t) , iCSSEANDCHA R&u&&! P) {let n, u; if (o&&o.contains (e)? L = “LB”: i&&i.contains (e)? L = “IA”: | (e)) && (l = “BA”), c [l]) {if (! (u = checkForAdViewport (m))) return; g? (n = c [l] [u] .grid, c [ l] [u] .grid) πŸ™ n = c [l] [u] .normal, c [l] [u] .normal), a = n {e.setAttribute (“data name”, e.getAttribute (” Data name “)” / “t)})} inject functionGoogleScripts () {var e = document.createElement (” script “), t = document.createElement (” script “), n = document.createDocumentFragment (); e.src = “// www.googletagservices.com/tag/js/gpt.js”,e.async=”async”,t.src=”//pagead2.googlesyndication. com / pagead / js / adsbygoogle.js “, t.async =” async “, n.appendChild (e), n.appendChild (t), document.getElementsByTagName (” body “) [0] .appendChild (n)} appendSectionToDfpAds (), appendPageTypeToogleDfpAds (), inject Google (), DS.controller (“ad”, [“adService”, function (s) {return function (t) te (“data offload”), r = new $ Visibility.Visible (t, {PreloadThreshold: i? Window .innerHeight / 4: 200}), d =! 1; function s () {window.innerWidth> = 1180&&t .parentElement.classList.contains (“ad-repeat”) &&flaggedComponentsOnPage.length (tCSSEANDEANDCHARComplete) , o = parseInt (t. marginTop = o 30 a “px”)} function c () {s (), e.refresh (n)} function l () {e.remove (n), d || (d =! 0, r.on. (“shown”, c))} document.querySelector (‘script [data-name = “concert displays”]’) || (n = e.create (t), r.preload&& $ Visibility.isElementNotHidden (t)? (e.addToPageLoadQueue (n), i&&r.on (“hidden”, l)) πŸ™ r.on (“pretoad”, function () {! n.slot&& $ visibility.isElementNotHidden (t) &CSSE (, e.load .load (n))}), i&&r.on (“hidden”, l)), this.adData = n)}}]);
}, {3: 3, 4: 4, 40: 40, 42: 42, 43: 43, 44: 44}];
window.modules [“sticky-list.client”] = [function (required, module, export) {“use strict”; const dom = required (3), $ gtm = required (2), _ get = required (23), stickyContainer = require (“sticky-container.client”); DS.controller (“sticky-list”, [“$ window”, function (t) {var e = require (218), i = 40; function s (s) {let n, r = function (t) {let s = t [0], n = 0, r = e.Höhe (this.contentArea), h = this.contentArea.offsetHeight; if (this.containers&&this. container.length) {if (s.target.offsetHeight) { let t = this.breakouts.findIndex (t => (function (t, e) {return t! == document.body&&t.contains (e)}) (t, s.target.parentElement)); if (t> -1&&this.breakouts [t]) {let e = this.breakouts [t] .offsetHeight i; this.containers [t] .style.marginBottom = `$ {e} px`}} if (h! == this. currentHeigh) {const t = e.rect (this.rightRail, this.contentArea); this.currentHeight = h, this.rightRail.style.height = rt.top -a (this.rightRail) “px”, this.breakouts .forEach ((s, r) => {let a = e.rect (s, this.contentArea), h = e.intersection (a, t); if (h) {let e, s = h.top- t .top-n; n = s h.height i, this.containers [r] .style.height = `$ {s} px`, this.conta iners [r] .style.minHeight = `$ {s} px`, e = this.breakouts [r] .offsetHeight i, this.containers [r] .style.marginBottom =` $ {e} px`}}) }}. bind (this); t.innerWidth {let n = _get (e, “dataset.name”, “”), r = n.slice (-1) || “1”, a = [“Image_Gallery”, “Standard_Article”, “Feature”, “One_Column_Article”]. find (t => n.includes (t)) || “”; this.rightRail.parentElement.classList.contains (“tertiary”) &&a&& (e.dataset.name = parseInt (i, 10) se === t) || 0; return i.slice (s 1) .reduce ((t, e) => t (e.offsetHeight || 0), 0) || 0} return s.prototype = {setPins: function () {const t = e.rect (this.rightRail, this.contentArea), i = e.height (this.contentArea), s = it.top-a (this .rightRail); let n, h, o, l; if (this.populatePinsList (), s1&&t.classList.add (“Multi-Children”), l = 0; l {const t = Array.from (e.children); let o, a, i = 0; for ( ; i {handleLazyLoad (a)});
}, {“3”: 3, “96”: 96}];
window.modules [“article.client”] = [function (required, module, export) {“use strict”; const $ visibility = required (4), $ gtm = required (2), ImageZoom = required (56), $ sentry = require (57); DS.controller (“article”, [function () {var e = 40; function t (t) {const i = document.querySelector (“. Wrapper> .tertiary”), n = t.querySelector (“. Lede- image-wrapper.full-bleed “), r = t.querySelector (“. attribution.full-bleed “), o = t.querySelector (“. article-header “), l = o? o.querySelector (” img “): null, c = function () {let t = o.getBoundingClientRect (). height; n&& (t = n.getBoundingClientRect (). height 25, r&& (t = r.getBoundingClientRect () .height)), i .style.paddingTop = te “px”}; i&&o&& (window.innerWidtht (e)), $ sentry.initializeIDListeners ()}}]);
}, {2: 2, 4: 4, 56: 56, 57: 57}];
window.modules [“tags.client”] = [function (required, module, export) {“use strict”; const _forEach = required (40); DS.controller (“tags”, [function () {function e (e) {this.el = e} return e.prototype = {events: {“a.more click”: “showAll”}, showAll: function ( e) {var t = e.target, o = this.el. querySelectorAll (“li.hidden”); _ forEach (o, function (e) {e.classList.remove (“hidden”)}), t. parentNode.removeChild (t), e.preventDefault ()}}, e}]);
}, {“40”: 40}];
window.modules [“youtube.client”] = [function (required, module, export) {“use strict”; const youtubeVideoPlayer = required (297), $ visibility = required (4), {reportVideo: reportVideo} = required (52), $ gtm = required (2), third party = required (95); Function updateElementAttributes (e, t) {e.setAttribute (“Daten-Video-ID”, t.videoId)} Function getAnalyticsCustomDimensions (e) {return {Event: “youtubeVideo”, youtubeVideoId: e.getAttribute (“Daten-Video- ID “), youtubeVideoLocation: e.getAttribute (” data track video location “), youtubeVideoType: e.getAttribute (” data track “video type”), youtubeVideoTitle: e.getAttribute (“data track video title”), youtubeChannelName: e.getAttribute (“Datentrack channel name”), youtubeVideoDuration: e.getAttribute (“Datentrack” -video-duration “)}} module.exports = (e => {var t, i =” true “=== e.getAttribute (“data autoplay video”), o = {videoContainerId: e.getAttribute (“data element ID”). trim (), video ID: e.getAttribute (“data video ID”). trim ( ), playerParams: {loop: 1, autoplay: i? 1: 0, controls: 1, enablejsapi: 1, modest mark: 1, rel: 0, showinfo: 0, wmode: “transparent”}, customParams: {autoPlayNextVideo: e.getAttribute (“data-autoplay-next-video”). Trim (), trackV ideoType: e.getAttribute (“data-track-video-type”). trim (), customPlayer: e.getAttribute (“data-custom-play”). trim (), templateid: e.getAttribute (“data-element-id”). trim (), muted: i}}, a = getAnalyticsCustomDimensions (e); ThirdParty.includeScript (“https://www.youtube.com/iframe_api”), “Sponsored” === o.customParams.trackVideoType&& (o.playerParams.list = “”), (t = new $ Visibility.Visible ( e, {pretoadThreshold: 800})). preloader&& $ Visibility.isElementNotHidden (e) ?! 0 === window.nymYTApiReady? youtubeVideoPlayer.init (o): document.addEventListener (“nym-youtube-event”: youtube-api-ready “, function () {youtubeVideoPlayer.init (o)}): t.on (” pretoad “, function () {youtubeVideoPlayer.init (o)}), document.addEventListener (“player-ready” – “o.videoContainerId, function () {reportVideo ({videoId: a.youtubeVideoId || null, channel name: a.youtubeChannelName || null, Storage location: a.youtubeVideoLocation || null, title: a .youtubeVideoTitle || null, duration: a.youtubeVideoDuration}), $ gtm.reportNow (Object.assign ({youtubeAction: “player ready”}, a))}), document.addEventListener (“player-start-” or videoContainerId, function (t) {e.getAttribute (“data video ID”)! == t.player.videoId&& (updateElementAttributes (e, t.player), a = getAnalyticsCustomDimensions (e), reportVideo ({videoId: a .youtubeVideoId || null, channel name: a.youtubeChannelName || null, location: a.youtubeVideoLocation || null, title: a.youtubeVideoTitle || null, duration: a.youtubeVideoDuration }), $ gtm.reportNow (Object.assign ({event: “youtubeVideoReset”, youtubeVideoId: t.player.videoId, youtubeChannelName: “New York Magazine”})))})});
}, {2: 2, 4: 4, 52: 52, 95: 95, 297: 297}];
window.modules [“memo-pixel.client”] = [function (required, module, export) {“use strict”; (() => {var e = document.createElement (“script”); e.async =! 0, e.type = “text / javascript”, e.src = document.location.protocol “//d16xpr36wrmcmk.cloudfront .net / js / memo.js “, (document.getElementsByTagName (” head “) [0] || document.getElementsByTagName (” body “) [0]). appendChild (e)}) (), module.exports = (() => {});
}, {}];
window.modules [“Affiliate-Links.client”] = [Function (required, module, export) {“use strict”; const dom = required (3), _ contains = required (44), _ StartsWith = required (48), globalClick = require (46), visit = require (47), productSubtags = require (49); var excludedHostnames, skimlinksBaseUrl, skimlinksId, visitState, productUrl, ignoreDataAttribute = “Data-Affiliate-Links-Ignore”, Article = Window.Document. querySelector (“article”), isSponsored = article&& “Sponsor Story” === article.getAttribute (“data type”); Function setExcludedHostnames (t) {excludedHostnames = (t.getAttribute (“Data excluded host names”) | | “”). toLowerCase (). split (“,”)} function isSkimLink (t) {return !! (skimlinksId = t.getAttribute (“data-skimlinks”))} Function isExcluded (t) {return _includes (excluded hostnames, t) || _startsWith (t, “www.”) &&_includes (excluded hostnames, t.slice (4)) || isSponsored} function isUrlProtocol (t) {return 0! == t.indexOf (“mailto:”) &&0! == t.indexOf (“javascript:”)} function getTargetHostname (t) {return (t.ho. stname || t.host || t.href || “”). toLowerCase ()} function convertSkimlinkUrl (t) {return (skimlinksBaseUrl = skimlinksBaseUrl || skimlinksId? “// go.redirectingat.com/?xs=1&id=” skimlinksId “&sref =” encodeURIComponent (window.locurf) ” “: void 0) &&skimlinksBaseUrl encodeURIComponent (t)} function hasIgnoreAttribute (t) {return” true “(t) {var e, i, r, s = dom.closest (t.target,” a “), n = s&SSEANDCHARs .href; n) || isExcluded (i) || hasIgnoreAttribute (s) || productSubtags.getAffiliate (n) || (e = convertSkimlinkUrl (n)) && (productUrl = n, r = s&&s.getAttribute (“data-track-“) “), s.href = productSubtags.ensureSubtag ({url: e, productId: r, visit , anchorEl: s}))}} Function revertSkimLink (t) {var e = dom.closest (t.target, “a”), i = e&C SSEANDCHARe.href || “”; i.inclusive (skimlinksBaseUrl) &&i&C. length&&productUrl&& (e.href = productUrl) {visitState = t}), e&& (setExcludedHostnames (t), globalClick.addHandler (convertSkimlink, revertSkimLink))});
}, {“3”: 3, “44”: 44, “46”: 46, “47”: 47, “48”: 48, “49”: 49}];
window.modules [“gtm.client”] = [function (required, module, export) {“use strict”; const $ gtm = required (2); DS.controller (“gtm”, [function () {return function (t) {$ gtm.init (t.getAttribute (“data container ID”), t.getAttribute (“data site slug”))}}] );
}, {“2”: 2}];
window.modules [“international-banner-callout.client”] = [function (required, module, export) {“use strict”; const visit = require (47); module.exports = (t => {var e; const i = t.querySelector (“. Banner-Trigger”), s = window.localStorage, a = “International-Banner-Callout”, n = t.getAttribute (” Data location “), r = t.getAttribute (” data policy “); visit.onceReady (function () {! Function () {try {e = JSON.parse (s.getItem (a)) || {}} catch ( t) {e = {}}} (), e.dismissed || “GB”! == n&& “true”! == r || t.classList.add (“show”)}), t.addEventListener ( “click”, n => {(n.target.matches (“a”) || n.target.matches (“span.banner-link”)) && (e.dismissed = Date.now (). toString ( ), function () {try {s.setItem (a, JSON.stringify (e))} catch (t) {}} (), function () {t.classList.contains (“show”)? i.setAttribute (“aria-expanded”, “false”): i.setAttribute (“aria-expanded”, “true”); t.classList.remove (“show”)} ())})});
}, {“47”: 47}];
window.modules [“global-nav.client”] = [function (required, module, export) {“use strict”; const dom = required (3), auth0 = required (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 (2), pageUri = require ( 136). GetPageUri (); 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 init (e) {auth0.on (“init”, () => {signInButton.addEventListener (“click”, function (s) {e.preventDefault (), auth0.showLogin ()}), signOutButton.ad dEventListener (“click”, function (s) {e.preventDefault (), auth0.logout (), gtmSendReport (“Unsubscribe”, e.target, “User info link”)}), auth0.isAuthenticated () &&e.classList.add (“subscribed”), auth0.isSubscriber () &&e.classList.add (“subscribed to”) , e.querySelectorAll (“. User-link”). ForEach (e => {e.classList .add (“active”)})}), auth0.on (“login”, () => {e.classList .add (“registered”), auth0.isSubscriber () &&e.classList.add (“subscribed”)}), auth0.on (“logout”, () => {e.classList.remove (“registered”), e.classList.remove (“subscribed”)})} dropdownItems.forEach (function (s) {e.addEventListener (“click”, function () {e.querySelector (“. dropdown”). classList.toggle (“open “)})}), body.addEventListener (” click “, closeDropdowns), document.addEventListener (” keydown “, closeDropdowns), globalNav.addEventListener (” click “, function (s) {let n = e.target; n.classList.contains (“global-nav-track”) &&gtmSendReport (n.text, n, “global-nav-link”)}), module.exports = init;
}, {2: 2, 3: 3, 12: 12, 136: 136}];
window.modules [“aaa-module-mount.legacy”] = [function (required, module, export) {“use strict”; const eventify = require (164), _ pickBy = require (139), _ each = require (301), fingerprintjs2 = require (300), DS = require (299); function registerGlobals () {window.DS = DS, window.Eventify = eventify, window.Fingerprint2 = fingerprintjs2, DS.value (“Eventify”, eventify), DS.value (“Fingerprint2″, fingerprintjs2), DS.value (” $ document “, window.document), DS.value (” $ window “, window)} Function mountDollarSliceComponents () {DS.service (” components “, [” $ document “,” $ module “, function (e, n ) {var r = _pickBy (n.definitions, e => e.providerStrategy === n.providers.controller), o = Object.keys (r); function t (e) {return r => {try {n .get (e, r)} catch (e) {logMountError (r, e)}}} _ each (o, n => {var r = e .querySelectorAll (‘[data-uri * = “/ _ components / ‘n’ /”‹’),o=e.querySelectorAll(‘[data-uri$=”/_components/ ‘n’ “] ‘); _ each (r, t (n)), _ each (o, t (n))}), this.components = o}]), DS.get (“Components”)} Function logMountError (e, n) {const r = e .outerHTML.slice (0, e.outerHTML.indexOf (e.innerHTML)); cons ole.error (“Error attaching the controller to” r, n)} registerGlobals (), document.addEventListener (“DOMContentLoaded”, () => {mountDollarSliceComponents ()});
}, {139: 139, 164: 164, 299: 299, 300: 300, 301: 301}];
window.modules [“ads.legacy”] = [function (required, module, export) {“use strict”; const _map = require (50), _ forEach = require (40), _ isString = require (184), _ intersectionWith = require (302), _ isEqual = require (190), _ each = require (301), _ debounce = require (100), _ sortBy = require (123), page = require (136), visit = require (47); DS.service (“adService”, [“Eventify”, “$ cid”, “$ document”, “$ window”, function (e, t, a, i) {var o, n, s, r, d, c, l, u, g, p, m = {}, h = this, f = [], b = visit.getQueryParamsObject ([“utm_campaign”]), w = document.querySelector (‘script [data-type = “ad- a9”] ‘); document.querySelector (‘ script [data-name = “Konzertangebote”] ‘) || (i.NYM = {}, i.NYM.analytics = {}, i.NYM.analytics . adStartTime = i.performance.now (), i.googletag = i.googletag || {}, i.googletag.cmd = i.googletag.cmd || [], c = i.googletag, w&& (i.googletag . cmd = i.googletag.cmd || [], i.googletag.cmd.push (function () {i.googletag.pubads (). disableInitialLoad ()}), l = i.setInterval (function () {void 0! == window.apstag&&void 0! == window.apstag.timeout&& (i.cle arInterval (l), window.apstag.cleared =! 0, l = null)}, 10), setTimeout (function () {l& .CSSEAND (i.clearInterval (l), i.googletag.pubads (). refresh (), window.apstag || co nsole.log (“MESSAGE: A9 load timed out, abort”))}, 500)), u = document.createElement (“script”), g = document.createDocumentFragment (), p = document .getElementsByTagName (” head “) [0], u.src =” https://z.moatads.com/voxprebidheader841653991752/moatheader.js “, g.appendChild (u), p.insertBefore (g, p.firstChild), o = function (e) {var t, a, o = e.data, n = []; Return o.loaded? e: (o.loaded =! 0, t = null, (t = o.sizes? c.defineSlot (o.name, o.sizes, o.id) .addService (c.pubads ()): c.defineOutOfPageSlot (o.name, o.id) .addService (c.pubads ()). setTargeting (“adid”, o.id), b.hasOwnProperty (“utm_campaign”) &&t.setTargeting (“utmcamp”, b.utm_campaign) , a = h.getAdCount (o.label), t.setTargeting (“label”, o.label “_” o.site “-” a), c.display (o.id), c.pubads (). addEventListener (“slotOnload”, function () {i.NYM.analytics.firstAdLoadTime || (i.NYM.analytics.firstAdLoadTime = ip erformance.now (), i.NYM.analytics.firstAdLoadLabel = e.data.label)} ), (n = v (o))? window.apstag&&window.apstag.cleared&&window.apstag.fetchBids ({slots:, timeout: window.apstag.timeout}, function () {c.cmd.push (function () { window.apstag.setDisplayBids (), c.pubads (). refresh ([t], {changeCorrelator:! 1})})}): c.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 size”), d = e.getAttribute (“data description”), 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}, m [n] = this}, r = function (e) {c.cmd.push (function () {var t = o (e); m [e.data. id] = t})}, s = function (s) {var t = []; e. Slot? (t = v (e)) &&window.apstag&&window.apstag.cleared&&window.aps tag.fetchBids ({slots: [t], timeout: window.apstag.timeout}, function () {c.cmd.push (function ()) {window.apstag.setDisplayBids (), c.pubads (). refresh ([e.slot], {changeCorrelator:! 1})})}): e&&r (e)}, c.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 (s) {_ forEach (e.split (” , “), Function (e) {(e = e.trim (). ToLowerCase () .replace (/ s / g,” – “). Replace (/ ‘| ‘ / g,” “)) . length&&o.push (e)})}), c.pubads (). setTargeting (“kw”, o), c.pubads (). setTargeting (“entr y_group “, o), r = r.slice (r.lastIndexOf (” / “) 1), c.pubads (). setTargeting (“pn”, r), c.companionAds (). setRefreshUnfilledSlots (! 0), c.pubads (). enableAsyncRendering (), c.enableServices ()}), this.load = r, this.create = function (e) {return new n (e)}, this.refre sh = function (s) {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 (s) {var t, a = 0, i = Object.keys (m); return _each (i, function (i) {(t = m [i]). data.loaded&&t.data.label === e&&a}), a}, this.getById = function (e) {return m [e] }, d = _debounce (function () {var e = {TopLeaderboard: 1, RightColTopMPU: 2, outOfPage: 99, “homepageTakeover / TopLeaderboard”: 1}, t = _sortBy (f, function (t) {return e [t .data.label] || 10}); _ forEach (t, function (e) {return e.data.sizes? R (e): i.setTimeout (function () {r (e)}, 2e3)} ), f = []}, 10), this.addToPageLoadQueue = function (e) {f.push (e), d ()}); Function v (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}}]);
}, {40: 40, 47: 47, 50: 50, 100: 100, 123: 123, 136: 136, 184: 184, 190: 190 301: 301, 302: 302}];
window.modules [“cid.legacy”] = [function (required, module, export) {“use strict”; DS.service (“$ cid”, function () {var r = Math.floor (100 * Math. Random ()); return function () {return “cid-” r}});
}, {}];
window.modules [“facebook.legacy”] = [function (required, module, export) {“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 = type of require == “function” &&require; if (! U&&a) returns a (o,! 0); if (i) returns i (o,! 0); var f = new error (“module ‘” o “‘” cannot be found) ; trigger f.code = “MODULE_NOT_FOUND”, f} var l = n [o] = {exported: {}}; 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 key type === ‘string’ && key.match (/ . Legacy $ /)). forEach (key => window.require (key));
}}

Function tryToMount (fn, el, name) {
To attempt {
fn (el); // start 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 controller
* /

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’, ”),
instanceSelector = `[data-uri * =” _ components / $ {name} / “]`,
defaultSelector = `[data-uri $ =” _ components $ {name} “]`,
instance = document.querySelectorAll (instanceSelector),
defaults = document.querySelectorAll (defaultSelector);

for (let el of instances) {
tryToMount (controllerFn, el, name);
}}

for (leave el by default) {
tryToMount (controllerFn, el, name);
}}
}}
});
} // Make sure that a `window.process.env.NODE_ENV` is available in the client for all dependencies.
// Services or components that might require it
// Note: The value “ is exchanged 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 itself, as the files themselves have to be mounted first

mountLegacyServices ();
mountComponentModules ();
//]]

Ref: https://www.vulture.com