A man talking into a mic, in front of a graphic background of a brick wall.
Photo illustration by Slate. Photo by jacquesdurocher/iStock/Getty Images Plus.

Danny is online weekly to chat live with readers. Here’s an edited transcript of this week’s chat.

Q. Not a laughing matter: My boyfriend of three years has been dabbling in comedy since we started dating. For years his friends told him to do something as a comedian, even as just a hobby. He lost his job and has been taking his comedy far more seriously.

I think he is the funniest man I’ve ever met except one thing: I don’t like his stand-up routines. I don’t know if it’s just my taste, but I think he’s trying too hard and it’s just not nearly as funny as his other stuff. He does a lot of other types of comedy that I think are hilarious. When he asks me about his stand-up, I don’t know what to say. He’s not very established and kind of anxious about his skills. Should I be honest about my opinions? Should I subtly try to push him toward his funnier projects? I think he could have a career in this and I know there’s a bit of a learning curve for anybody changing careers. Should I just come up with a neutral statement that isn’t quite a lie but isn’t quite the truth?

A: If someone asks you for your direct opinion, you should give it! He’s inviting your feedback, you’ve been together for three years and clearly care about each other very much, and you already seem pretty sensitive and thoughtful. I’m not worried you’re going to blurt out something blunt or unsolicited. Tell him what you like about his other work and what you think is missing from his stand-up, and if you find that he’s asking you “What do you think?” every time he tweaks a single word in his tight five, encourage him to ask for a little less feedback, a little less often. You can offer critique and support and still sometimes say “I can’t help you with this project anymore. You should go to talk to someone else who does similar work for more advice.”

How to Get Advice From Prudie:

• Send questions for publication to [email protected]. (Questions may be edited.)

• Join the live chat Mondays at noon. Submit your questions and comments here before or during the discussion.

• Call the voicemail of the Dear Prudence podcast at 401-371-DEAR (3327) to hear your question answered on a future episode of the show.

Q. Company credit card: I recently got promoted and one of the “perks” is that I get a company card to use instead of having to apply for reimbursement. Here’s the thing: I cannot be trusted with a credit card, especially one with such a high limit. A few years ago I destroyed my credit due to compulsive shopping. I’ve been able to pay off the debt and work with a therapist to try to control my spending, but it’s a struggle every day. I absolutely cannot have access to a credit card. I can’t even have it in the house or I will use it.

I can’t just cut it up because I do need it for work-related things, and I can’t exactly tell my boss I can’t be trusted with it because I would look like an irresponsible idiot; a lot of my job involves me making responsible spending decisions for the company, even though I’m unable to do that in my own life. I’ve thought about confiding in a co-worker, giving the card to them, and having them give it to me when I ask for it for work-related things. But I know my co-workers, even the ones I’m friends with, would use that against me to get ahead. I work in a very cutthroat industry. What do I do?

A: I agree that going to your co-workers for help doing your job is not the right move—sure, the fact that they’re hypercompetitive and waiting to steal your job is a factor, but more importantly because it’s an unreasonable imposition to ask a colleague to regularly monitor or control your company credit card use. Speaking to your boss isn’t ideal either, but surely having a preemptive conversation about your relevant experience with credit card debt (and the fact that you’re receiving therapeutic treatment) is better than having to admit you used your new company card for personal spending and now you’re thousands over your limit. I’m happy to print any other suggestions from readers who’ve had—or declined, or misused, or whatever else!—company credit cards in similar positions, so let me know if you have thoughts on the subject.

Q. Can’t move in: I share a house with three roommates: “Andy,” “Kia,” and “Lynn.” Kia and Lynn are lesbians, while I am a straight girl and Andy is a straight guy. Andy and I have the two upstairs bedrooms and share a bathroom. Lynn and Kia shared the master bedroom and there’s a half-bath downstairs. Kia and Lynn have broken up and basically can’t be around each other without breaking out into an argument. Lynn is on the lease, so Kia is the one who got kicked out of the bedroom. Kia is camped out in the living room, and we all hate it because her stuff is everywhere and we cannot use the space. She is also using our bathroom to shower in. Kia has nowhere else to go and got laid off because of the pandemic. She has a few side hustles but can’t afford to move out. None of us, even Lynn, want to kick her out, but the tension in the house is high.

Kia thinks the solution is to move into my bedroom with me, since I only have a twin bed and another one can fit in easily. I don’t want that—I had to share a room growing up and it was hell. I want my privacy. I think Kia can move into the dining room we rarely use and put up curtains to make it private and use the half-bath. She and Lynn can grow up and arrange a shower schedule. Kia doesn’t want that because the noise from the stairs and kitchen will keep her up (Andy and I work nights and cook when we get home). Lynn told me to be more accommodating, and I told her she doesn’t get to drag me into her drama. She broke up with Kia, not me. This is her fault and her responsibility.

Kia and Lynn are now fighting with me. Andy has declared himself Switzerland, and I can’t afford to break the lease. I can get out in February. How do I handle this until then?

A: Frankly, if you only have to get through December, January, and February before you can get out, I’d be inclined to suggest letting Kia move her bed into your room. I can understand why you’re frustrated—it’s a very frustrating situation—but surely you don’t think putting up curtains in the dining room is enough privacy for Kia, when you insist having a roommate would be insufficiently private for you. The living room is already unusable as it is, and Kia doesn’t seem inclined to want to move her setup from the living room to the dining room (which wouldn’t really be an improvement for her, I don’t think), so in some ways I think you’d discover you had more peace and quiet even with a short-term roommate. Especially since you work nights, which means you probably won’t see too much of Kia anyways. That’s an obviously imperfect solution, and of course the bigger problem is that Kia and Lynn have expanded their breakup to include every room of the house. But if all you want to do is keep your head down, minimize conflict where you can, and find a better living situation in February, then I think that’s the easiest compromise.

If you just can’t bring yourself to share your room, wear noise-canceling headphones around the house, avoid the living room, keep to yourself as much as you can, and get out in February anyway.

Q. Holiday’s end: My mother-in-law was the family matriarch, so holidays were always spent at her house. This continued when she moved in with my husband and me. Following her death four years ago, we continued to host everyone. I hate it. Someone always expects a separate meal (always a new diet), brings their dog or extra unannounced guests, or decided my home was the perfect place for their private drama. I listened to my niece come out as an atheist to her religious parents. One sister announced her divorce because her husband was “screwing around” and did it in front of all the kids. My nephew got caught having sex in the bathroom with his girlfriend. And everyone complains there is never enough hot water (more than 20 people in the house and everyone wants to follow the same shower schedule).

Due to the pandemic, we are not hosting at all this year. It is amazing and I am actually enjoying myself. My husband agrees but gets pushed back because his family are all lamenting about not coming over. I am done. My in-laws are lovely enough in twos or threes, but I want my holidays back. How do I convince my husband and not hurt his family? I am done with all the cooking, cleaning, and shopping it takes to do the “family” holiday.

A: The beauty about being the hostess responsible for all of the cooking, cleaning, and shopping that go into making a big family holiday possible is that you don’t actually have to convince your husband of anything. You just have to not cook, not clean, and not shop for 30 other people. Just don’t do it! If they are “hurt” because for a second year in a row they will have to make their own holiday arrangements, then I would warmly encourage them to get over their hurt, bake their own cookies, call their own caterers, or draft their own seating charts. If your husband says something like “But you always used to do it” or “But all of my relatives are complaining to me,” you can say something like “Sorry to hear that,” and then take yourself out to go see a movie. This is a made-up problem! This is invented hurt! The moment you stop treating it as the sacred wound of Family Feeling, you will enjoy a new kind of freedom and peace. They will be fine. Christmas happens every year. Anyone can learn how to tie a rib roast or string up lights if they’re really committed to a certain festive atmosphere; my suspicion is that they would rather put in the work of grousing until you give in and do all the work for them.

Q. Sisterly relations: My husband left me for another woman a few years ago. He and I are now divorced and he’s remarried to this other woman. Since the divorce, my sister has become very good friends with my ex-husband and his new wife. To give a bit of context, my ex-husband and my sister’s husband are good friends and were friends before my sister and I ever met them. The two men remain good friends. My sister, therefore, has occasion to spend time with my ex and his new wife. After the divorce, when I could see that my sister was starting to develop a friendship with this other woman, I was honest with her and told her that it would be hurtful to me if she started to spend time with this woman in light of the harm my husband’s affair with this woman has caused me. I left it at that and respected my sister’s right to be friends with whomever she wants. Now the two of them are close friends, they socialize together separately from their husbands, they go on vacations together, they talk about me, and so on.

I have never said anything to my sister about how this bothers me and hurts me; I’ve simply withdrawn from her and now avoid spending time with her. I maintain a very superficial relationship with her because anything I tell her she will then tell my ex’s new wife and I find that very unsettling. Should I say something to my sister, or just leave it as it is and not rock the boat?

A: I hate to say it, but you already have said something to your sister—you told her that you’d be very hurt if she got close with your ex’s new wife, and then she decided to become very close with your ex’s new wife. She made a fully informed decision, and I think your choice to withdraw as a result was a good one. You can, of course, reiterate that this has hurt you, and that your relationship is likely to stay superficial as a result, but I think the most you can expect from such a conversation is the relief that comes from stating the obvious—it’s very unlikely your sister will change. But there is something to be said for stating the obvious, as long as you don’t belabor the point or get drawn into trying to change someone else’s mind.

Q. Can’t leave her stranded: How can I divorce my perpetually unemployed wife? I don’t think she’s lazy or incapable of landing a job—she just never had to work, with me providing the income. However, 10 years into a marriage we started way too young, I’ve learned that we’re just not in love. We are too different, and butt heads on too many issues. I’m OK paying alimony and child support, sharing custody of our kids, and wishing her nothing but the happiest, but she has no way of getting started on her own if I just drop a divorce on her. How can I split us up so that we both have a better chance of true happiness without leaving her behind and in need?

A: I mean … pay her alimony and child support, and share custody of the kids! You’ll still be providing her (at least a partial) income; you’re not contemplating turning her out into the street or fighting her for every single shared possession in court. If you don’t want to “drop” the divorce on her, give her advance notice before you move, serve her with papers, or whatever other steps in the process you want to navigate amicably. But you can’t try to nudge her into thinking “Hey, maybe a divorce would be a great idea” on her own, and you shouldn’t try to convince her to get a part-time job before you admit “I’m not in love with you.” Just get an honest divorce, make it clear you’re not going to pull any sudden moves that will put her in a financial crisis, and try to treat her respectfully. You can’t prepare her to get started on her own when you’re also the one divorcing her. She’s going to have to find that kind of support from other people (and hopefully, eventually, herself).

Q. Bunny grandparenting: I’m a woman in my 20s who has a 2-year-old rabbit. She’s very sociable, and we often go together to my parents’ house, or they come to mine. My parents, but mostly my mom, refuse to respect my wishes when it comes to my bunny (I’m aware this sounds ridiculous), from minor stuff such as “Please don’t give her another piece of banana—she’s had enough today” to serious stuff like “Please don’t hold her like that because it scares her and can cause her to have a heart attack.” Making this worse, my mom had a few rabbits as pets when she was younger, so she thinks she’s some sort of expert and that I’m being too overprotective. I don’t want to limit their time spent together because my parents really love being “grandparents.” I’ve tried talking to her, but she doesn’t listen. I can’t even imagine how bad they’re going to be when I have human children. How do I get her to stop?

A: One of the great joys of adulthood is that one is free to be as overprotective of one’s pet rabbits as one wishes. It’s your damn rabbit! (Substitute “dating life,” “clothes,” or whatever else for “rabbit,” and the point still stands.) It’s a shame that you don’t want to limit your mother’s time with your pet, but I’m afraid that’s the only available next step once you’ve tried talking to her to no avail. So: Limit your mother’s time with your pet, and make it explicitly clear that this is because she can’t follow your basic rules about rabbit safety! Don’t bring the rabbit with you when you visit, and don’t invite her over to your house until (unless?) she can agree to follow house rules. If being around your rabbit is really important to her, she is free to stop feeding her superfluous banana chunks and holding her when she’s twitching and terrified. Then her problem will be solved!

I realize this may sound a bit chirpy and condescending—it’s meant to be. Your mother ought to be embarrassed to behave so rudely while she’s a guest in your home. It’s very easy not to feed a rabbit banana, especially when the rabbit’s owner says, “Please don’t give my rabbit any more banana, or she’ll collapse into hyperkalemia.”

Q. Re: Company credit card: Along with this promotion, do you have access to an assistant? Even one whose schedule you share with others? This person could easily be put in charge of booking your travel, etc., and, oh, well, guess that means it makes sense for them to hold on to the card for you.

A: That might be ideal—if the letter writer is getting access to a high-limit company card, it’s likely they work with an administrative assistant at least some of the time, too. I wonder if it would also help to have external accountability, like with a therapist or a partner or a friend or someone in Debtors Anonymous, so you’re not risking backstabbing by a competitive colleague or sadistic boss but you also know someone besides you is aware of how you’re using the card. Obviously one can always lie to that person, but given the letter writer’s sincerity and distress in their letter, it seems like they really want someone else to know what’s worrying them.

Q. Re: Company credit card: The letter writer can tell her boss that buying things on credit is against her personal belief system and she would rather just continue to be reimbursed for company purchases.

A: I worry that might be too tricky a lie to have to maintain! What if the letter writer’s boss has seen them use a personal card before? And I’m not sure “my beliefs prohibit me from using a credit card” would fall under the category of something protected, so the boss’s response might very well be “Sorry to hear that, but it’s part of this job.” It might be possible, and there are certainly reasons to be wary about telling your boss you’ve had trouble with debt/compulsive spending in the past, but I don’t think this is quite it yet.

Q. Re: Can’t move in: Make Lynn move to your room, and then you and Kia take the master. You’ll have to reconfigure beds and rent, maybe, but two people sharing a room should have the biggest room to share.

A: I think this would be great, if the letter writer could sell Lynn on the idea! But since Lynn and Kia are both being a little volatile, and the other roommate seems determined to do nothing, my vote here is still for expediency.

Danny M. Lavery: Thanks for the help, everyone. And may all of your roommates currently breaking up with one another have their own bedrooms. See you next week.

If you missed Part 1 of this week’s chat, click here to read it.

Discuss this column on our Facebook page!

From Care and Feeding

Q. Misspelled: My son is 2 months old, and I just discovered my husband spelled our son’s middle name as “Finlay” instead of “Finley” on all of his legal documentation. I, of course, am furious, because I told him I was fine with the middle name but it had to be spelled Finley—and he agreed before our son was ever born. His mother even sent a Christmas gift to middle name “Finlay,” and when I made a comment to my husband he didn’t even have the decency to tell me! He just let me keep believing for two months that our son’s middle name was spelled Finley when it legally isn’t! I discovered this all when I went looking for his Social Security card and birth certificate to file them away properly. He says he regretted it as soon as the card came and has been afraid to tell me.

Now here is where it gets tricky. Apparently his mother guilt-tripped him into doing this while I was asleep after my emergency C-section. Read what Carvell Wallace had to say.

Get the audiobook edition of Danny M. Lavery’s latest book. Save $5 when you buy it from Slate—and listen in your preferred podcast app!

')}function tryGetCriteoFastBid(){try{var fastBidStorageKey="criteo_fast_bid",hashPrefix="// Hash: ",fastBidFromStorage=storage.getDataFromLocalStorage(fastBidStorageKey),firstLineEndPosition,firstLine,publisherTagHash,publisherTag;null!==fastBidFromStorage&&(firstLineEndPosition=fastBidFromStorage.indexOf("n"),firstLine=fastBidFromStorage.substr(0,firstLineEndPosition).trim(),firstLine.substr(0,hashPrefix.length)!==hashPrefix?(__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logWarn("No hash found in FastBid"),storage.removeDataFromLocalStorage(fastBidStorageKey)):(publisherTagHash=firstLine.substr(hashPrefix.length),publisherTag=fastBidFromStorage.substr(firstLineEndPosition+1),Object(__WEBPACK_IMPORTED_MODULE_6_criteo_direct_rsa_validate_build_verify_js__.verify)(publisherTag,publisherTagHash,FAST_BID_PUBKEY_N,FAST_BID_PUBKEY_E)?(__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logInfo("Using Criteo FastBid"),eval(publisherTag)):(__WEBPACK_IMPORTED_MODULE_4__src_utils_js__.logWarn("Invalid Criteo FastBid found"),storage.removeDataFromLocalStorage(fastBidStorageKey))))}catch(e){}}Object(__WEBPACK_IMPORTED_MODULE_1__src_adapters_bidderFactory_js__.registerBidder)(spec)},377:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r(378),i=r(379);t.verify=function(e,t,r,o){var a=new n.BigInteger(n.b64toHex(t)),s=new n.BigInteger(n.b64toHex(r)),c=a.modPowInt(o,s);return n.removeExtraSymbols(c.toHexString())===i.Sha256.hash(e)}},378:function(e,t,r){var n;Object.defineProperty(t,"__esModule",{value:!0});var i=(o.prototype.toHexString=function(){if(this.s<0)return"-"+this.negate().toHexString();var e,t=!1,r="",n=this.t,i=this.DB-n*this.DB%4;if(0>i)&&(t=!0,r=l(e));0<=n;)i<4?(e=(this[n]&(1<>(i+=this.DB-4)):(e=this[n]>>(i-=4)&15,i<=0&&(i+=this.DB,--n)),0this.DB?(this[this.t-1]|=(i&(1<>this.DB-n):this[this.t-1]|=i<=this.DB&&(n-=this.DB))}this.clamp(),r&&o.ZERO.subTo(this,this)}},o.prototype.negate=function(){var e=a();return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.mod=function(e){var t=a();return this.abs().divRemTo(e,null,t),this.s<0&&0>n|a,a=(this[s]&i)<=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}0>this.F2:0),m=this.FV/g,b=(1<=this.t)t.t=0;else{var n=e%this.DB,i=this.DB-n,o=(1<>n;for(var a=r+1;a>n;0>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:0>15;0<=--o;){var c=32767&this[e],d=this[e++]>>15,u=s*c+d*a;i=((c=a*c+((32767&u)<<15)+r[n]+(1073741823&i))>>>30)+(u>>>15)+s*d+(i>>>30),r[n++]=1073741823&c}return i},o.prototype.am3=function(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;0<=--o;){var c=16383&this[e],d=this[e++]>>14,u=s*c+d*a;i=((c=a*c+((16383&u)<<14)+r[n]+i)>>28)+(u>>14)+s*d,r[n++]=268435455&c}return i},o);function o(e){null!==e&&this.fromHexString(e)}function a(){return new i(null)}function s(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}t.BigInteger=i,t.nbi=a,t.nbits=s;for(var c=[],d="0".charCodeAt(0),u=0;u<=9;++u)c[d++]=u;for(d="a".charCodeAt(0),u=10;u<36;++u)c[d++]=u;for(d="A".charCodeAt(0),u=10;u<36;++u)c[d++]=u;function p(e,t){var r=c[e.charCodeAt(t)];return null==r?-1:r}t.intAt=p;var f="0123456789abcdefghijklmnopqrstuvwxyz";function l(e){return f.charAt(e)}t.int2char=l,t.b64toHex=function(e){for(var t="",r=0,n=0,i=0;i>2),n=3&o,1):1==r?(t+=l(n<<2|o>>4),n=15&o,2):2==r?(t+=l(n),t+=l(o>>2),n=3&o,3):(t+=l(n<<2|o>>4),t+=l(15&o),0))}return 1==r&&(t+=l(n<<2)),t},t.removeExtraSymbols=function(e){return e.replace(/^1f+00/,"").replace("3031300d060960864801650304020105000420"https://r.search.yahoo.com/,"")};var g=(m.prototype.convert=function(e){return e.s<0||0<=e.compareTo(this.m)?e.mod(this.m):e},m.prototype.revert=function(e){return e},m.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},m);function m(e){this.m=e}var b=(v.prototype.convert=function(e){var t=a();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&0>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},v.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},v.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},v);function v(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>>0;for(a[o-1][14]=Math.floor(d),a[o-1][15]=u,s=0;s>>0;var l=r[0],g=r[1],m=r[2],b=r[3],v=r[4],y=r[5],h=r[6],_=r[7];for(f=0;f<64;f++){var S=_+i.z1(v)+i.Ch(v,y,h)+t[f]+p[f],I=i.z0(l)+i.Maj(l,g,m);_=h,h=y,y=v,v=b+S>>>0,b=m,m=g,g=l,l=S+I>>>0}r[0]=r[0]+l>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+b>>>0,r[4]=r[4]+v>>>0,r[5]=r[5]+y>>>0,r[6]=r[6]+h>>>0,r[7]=r[7]+_>>>0}var A=new Array(r.length);for(_=0;_>>e|t<<32-e},i.z0=function(e){return i.ROTR(2,e)^i.ROTR(13,e)^i.ROTR(22,e)},i.z1=function(e){return i.ROTR(6,e)^i.ROTR(11,e)^i.ROTR(25,e)},i.q0=function(e){return i.ROTR(7,e)^i.ROTR(18,e)^e>>>3},i.q1=function(e){return i.ROTR(17,e)^i.ROTR(19,e)^e>>>10},i.Ch=function(e,t,r){return e&t^~e&r},i.Maj=function(e,t,r){return e&t^e&r^t&r},i);function i(){}t.Sha256=n}},[375]),pbjsChunk([218],{501:function(e,t,r){e.exports=r(502)},502:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"spec",function(){return A});var n=r(0),i=r(2),o=r(3),a=r(10),s=r.n(a),c=r(503),d=r.n(c),u=r(1);function p(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);rnnnx3c!-- Rubicon Project Ad Tag --x3en


nn")),c=d(m[i.size_id].split("x").map(function(e){return Number(e)}),2),s.width=c[0],s.height=c[1]),s.rubiconTargeting=(Array.isArray(i.targeting)?i.targeting:[]).reduce(function(e,t){return e[t.key]=t.values[0],e},{rpfl_elemid:f.adUnitCode}),t.push(s)):n.logError("Rubicon: bidRequest undefined at index position:".concat(o),r,e),t},[]).sort(function(e,t){return(t.cpm||0)-(e.cpm||0)})},getUserSyncs:function(e,t,r,n){if(!x&&e.iframeEnabled){var i="";return r&&"string"==typeof r.consentString&&("boolean"==typeof r.gdprApplies?i+="?gdpr=".concat(Number(r.gdprApplies),"&gdpr_consent=").concat(r.consentString):i+="?gdpr_consent=".concat(r.consentString)),n&&(i+="".concat(i?"&":"?"https://r.search.yahoo.com/,"us_privacy=").concat(encodeURIComponent(n))),x=!0,{type:"iframe",url:"https://".concat(g.syncHost||"eus"https://r.search.yahoo.com/,".rubiconproject.com/usync.html")+i}}},transformBidParams:function(e){return n.convertTypes({accountId:"number",siteId:"number",zoneId:"number"},e)}};function v(e,t){var r=o.b.getConfig("pageUrl");r=e.params.referrer?e.params.referrer:r||t.refererInfo.referer;return e.params.secure?r.replace(/^http:/i,"https:"):r}function y(e,t){var r=e.params;if("video"===t){var i=[];return r.video&&r.video.playerWidth&&r.video.playerHeight?i=[r.video.playerWidth,r.video.playerHeight]:Array.isArray(n.deepAccess(e,"mediaTypes.video.playerSize"))&&1===e.mediaTypes.video.playerSize.length?i=e.mediaTypes.video.playerSize[0]:Array.isArray(e.sizes)&&0e.length)&&(t=e.length);for(var r=0,n=new Array(t);r‘;var i,o}},h=function(e){var t=0=e&&t.innerWidth‘+v.vast_url+”“:v.vast_string&&(y=v.vast_string),g.pre_market_bids.push({id:v.deal_id,seatbid:[{bid:[{impid:Date.now(),dealid:v.deal_id,price:v.price,adm:y}]}],cur:v.currency,ext:{event_log:[{}]}})}}var h=n.getBidIdParameter(“mimes”,e.params)||[“application/javascript”https://r.search.yahoo.com/,”video/mp4″https://r.search.yahoo.com/,”video/webm”],_={id:e.bidId,secure:l,video:{w:p,h:f,ext:g,mimes:h}};””!=n.getBidIdParameter(“price_floor”,e.params)&&(_.bidfloor=n.getBidIdParameter(“price_floor”,e.params)),””!=n.getBidIdParameter(“start_delay”,e.params)&&(_.video.startdelay=0+Boolean(n.getBidIdParameter(“start_delay”,e.params))),””!=n.getBidIdParameter(“min_duration”,e.params)&&(_.video.minduration=n.getBidIdParameter(“min_duration”,e.params)),””!=n.getBidIdParameter(“max_duration”,e.params)&&(_.video.maxduration=n.getBidIdParameter(“max_duration”,e.params)),””!=n.getBidIdParameter(“placement_type”,e.params)&&(_.video.ext.placement=n.getBidIdParameter(“placement_type”,e.params)),””!=n.getBidIdParameter(“position”,e.params)&&(_.video.ext.pos=n.getBidIdParameter(“position”,e.params)),e.crumbs&&e.crumbs.pubcid&&(c=e.crumbs.pubcid);var S=navigator.language?”language”:”userLanguage”,I={id:s,imp:_,site:{id:””,page:a,content:”content”},device:{h:screen.height,w:screen.width,dnt:n.getDNT()?1:0,language:navigator[S].split(“-“)[0],make:navigator.vendor?navigator.vendor:””,ua:navigator.userAgent},ext:{wrap_response:1}};n.getBidIdParameter(“number_of_ads”,e.params)&&(I.ext.number_of_ads=n.getBidIdParameter(“number_of_ads”,e.params));var A={};return 1==n.getBidIdParameter(“spotx_all_google_consent”,e.params)&&(A.consented_providers_settings=u),t&&t.gdprConsent&&(A.consent=t.gdprConsent.consentString,void 0!==t.gdprConsent.gdprApplies&&n.deepSetValue(I,”regs.ext.gdpr”,t.gdprConsent.gdprApplies?1:0)),t&&t.uspConsent&&n.deepSetValue(I,”regs.ext.us_privacy”,t.uspConsent),n.deepAccess(e,”userId.id5id.uid”)&&(A.eids=A.eids||[],A.eids.push({source:”id5-sync.com”,uids:[{id:e.userId.id5id.uid}],ext:e.userId.id5id.ext||{}})),c&&(A.fpc=c),e&&e.schain&&(I.source={ext:{schain:e.schain}}),e&&e.userId&&e.userId.tdid&&(A.eids=A.eids||[],A.eids.push({source:”adserver.org”,uids:[{id:e.userId.tdid,ext:{rtiPartner:”TDID”}}]})),n.isEmpty(A)||(I.user={ext:A}),{method:”POST”,url:”https://search.spotxchange.com/openrtb/2.3/dados/”+s,data:I,bidRequest:t}})},interpretResponse:function(e,t){var r=[],i=e.body;return i&&n.isArray(i.seatbid)&&n._each(i.seatbid,function(e){n._each(e.bid,function(e){var a={};for(var c in t.bidRequest.bids)e.impid==t.bidRequest.bids[c].bidId&&(a=t.bidRequest.bids[c]);n._each(a.params.pre_market_bids,function(t){t.deal_id==e.id&&(e.price=t.price,i.cur=t.currency)});var d={requestId:a.bidId,currency:i.cur||”USD”,cpm:e.price,creativeId:e.crid||””,dealId:e.dealid||””,ttl:360,netRevenue:!0,channel_id:i.id,cache_key:e.ext.cache_key,vastUrl:”https://search.spotxchange.com/ad/vast.html?key=”+e.ext.cache_key,videoCacheKey:e.ext.cache_key,mediaType:s.d,width:e.w,height:e.h};d.meta=d.meta||{},e&&e.adomain&&0e.length)&&(t=e.length);for(var r=0,n=new Array(t);rt?e:t}function d(e,t,n){!e.preload&&e.preloadThreshhold&&function(e,t,n,i){return t.top<=i+n&&u(e)}(t.target,t.rect,e.preloadThreshhold,n)&&(e.preload=!0,setTimeout(function(){e.trigger("preload",new r("preload",t))},15))}function c(n){var i=n.el.getBoundingClientRect(),o=t.innerHeight||e.documentElement.clientHeight,h=f(i,o),s=h/(i.height||o),l={target:n.el,rect:i,visiblePx:h,visiblePercent:s};!function(e,t){var n=t.visiblePx,i=t.visiblePercent;n&&i>=e.shownThreshold&&!e.seen?(e.seen=!0,setTimeout(function(){e.trigger(“shown”,new r(“shown”,t))},15)):(!n||i1&&(h+=e(r,Math.floor(n/o),i-1,o)),h},this.getVerticallyVisiblePixels=f,this.getViewportHeight=function(){return t.innerHeight||e.documentElement.clientHeight||e.body.clientHeight},this.getViewportWidth=function(){return t.innerWidth||e.documentElement.clientWidth||e.body.clientWidth},this.isElementNotHidden=u,this.isElementInViewport=function(n){var i=n.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.bottom<=(t.innerHeight||e.documentElement.clientHeight)&&i.right<=(t.innerWidth||e.documentElement.clientWidth)},this.Visible=o}]); }, {}]; require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(“Invalid attempt to iterate non-iterable instance.nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.”); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === “string”) return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === “Object” && o.constructor) n = o.constructor.name; if (n === “Map” || n === “Set”) return Array.from(o); if (n === “Arguments” || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function mountLegacyServices() { Object.keys(window.modules).filter(function (key) { return typeof key === 'string' && key.match(/.legacy$/); }).forEach(function (key) { return window.require(key); }); } function tryToMount(fn, el, name) { try { fn(el); // init the controller } catch (e) { var elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML)); console.error("Error initializing controller for "".concat(name, "" on "").concat(elementTag, """), e); } } /** * mount client.js component controllers */ function mountComponentModules() { Object.keys(window.modules).filter(function (key) { return typeof key === 'string' && key.match(/.client$/); }).forEach(function (key) { var controllerFn = window.require(key); if (typeof controllerFn === 'function') { var name = key.replace('.client"https://r.search.yahoo.com/,"'), instancesSelector = "[data-uri*="_components/".concat(name, "/"]"), defaultSelector = "[data-uri$="_components".concat(name, ""]"), instances = document.querySelectorAll(instancesSelector), defaults = document.querySelectorAll(defaultSelector); var _iterator = _createForOfIteratorHelper(instances), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var el = _step.value; tryToMount(controllerFn, el, name); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } var _iterator2 = _createForOfIteratorHelper(defaults), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var _el = _step2.value; tryToMount(controllerFn, _el, name); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } }); } // Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies, // services, or components that could require it // note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js window.process = window.process || {}; window.process.env = window.process.env || {}; if (!window.process.env.NODE_ENV) { window.process.env.NODE_ENV = ''; } // note: legacy controllers that require legacy services (e.g. dollar-slice) must // wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first mountLegacyServices(); mountComponentModules(); // ]]

Source Article