(window.webpackJsonp=window.webpackJsonp||[]).push([[181,69],{2345:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(769),c=r(8),l=r(793),d=r(830),h=new c.b("ShortcodeCommerceLink"),v=class extends(Object(n.mixins)(d.a)){get buttonLink(){var e,t=null;try{t=null===(e=JSON.parse(this.api))||void 0===e?void 0:e.url}catch(e){h.log("Unable to parse monetized url.")}return t||this.rawUrl}created(){this.$store.dispatch("tracking/setPageComponents",{cm02:!0})}};Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],v.prototype,"api",void 0),Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],v.prototype,"linkShortcodeText",void 0),Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],v.prototype,"useMonetization",void 0),Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],v.prototype,"rawUrl",void 0),Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],v.prototype,"id",void 0),Object(o.c)([Object(n.Prop)({default:null}),Object(o.f)("design:type",String)],v.prototype,"section",void 0),Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],v.prototype,"contentId",void 0);var f=v=Object(o.c)([Object(n.Component)({components:{CommerceBuyButton:l.default}})],v),m=r(117),component=Object(m.a)(f,(function(){var e=this,t=e._self._c;e._self._setupProxy;return t("span",{staticClass:"c-shortcodeCommerceLink"},[t("CommerceBuyButton",{attrs:{"button-text":e.linkShortcodeText,"button-url":e.buttonLink,"lead-click-data":e.winningOfferTrackingData,"is-link":!0,"content-id":e.contentId,section:e.section,"track-product-viewed":!0}})],1)}),[],!1,null,null,null);t.default=component.exports},772:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));r(3),r(5),r(10);var o=r(325);function n(e){return{bind:e.bind?function(){return e.bind(...arguments)}:()=>{},componentUpdated:e.componentUpdated?function(){return e.componentUpdated(...arguments)}:()=>{},inserted:e.inserted?function(){return e.inserted(...arguments)}:()=>{},unbind:e.unbind?function(){return e.unbind(...arguments)}:()=>{},update:e.update?function(){return e.update(...arguments)}:()=>{}}}function c(e,t){var r=new t;return Object(o.createDecorator)((t=>{t.directives=(null==t?void 0:t.directives)||{},t.directives[e]=n(r)}))}},774:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r(31);var o=new(r(8).a)("observer");class n{constructor(e,t){if(!window.IntersectionObserver)return o.warn("This browser does not support IntersectionObserver"),this;e.rootMargin=e.rootMargin||"0px",e.singleIntersection=!!e.singleIntersection&&e.singleIntersection,e.triggerOn=e.triggerOn?e.triggerOn:"top";try{return this.create(e,t)}catch(t){return o.error("Failed to construct IntersectionObserver: ".concat(t.toString()),e),this}}create(e,t){if(o.log("create options",e),this.el=e.el,t)return Array.isArray(this.el)&&(this.lastTriggerPosition=[]),this.observer=new IntersectionObserver(((r,n)=>{r.forEach((r=>{var n,c,l=!0,data=(null==e?void 0:e.data)||{};if(Array.isArray(this.el)){var d=this.el.findIndex((e=>e===(null==r?void 0:r.target))),h=null===(n=this.lastTriggerPosition)||void 0===n?void 0:n[d];l=void 0===h||h>r.boundingClientRect.y,this.lastTriggerPosition[d]=r.boundingClientRect.y,data=(null===(c=null==e?void 0:e.data)||void 0===c?void 0:c[d])||{}}else l=void 0===this.lastTriggerPosition||this.lastTriggerPosition>r.boundingClientRect.y,this.lastTriggerPosition=r.boundingClientRect.y;var v=l?"down":"up",f=!1;if(o.log(v,r),e.singleIntersection?"top"===e.triggerOn?"down"===v&&r.isIntersecting?f=!0:"up"!==v||r.isIntersecting||(f=!0):"bottom"===e.triggerOn&&("down"!==v||r.isIntersecting?"up"===v&&r.isIntersecting&&(f=!0):f=!0):r.isIntersecting&&(f=!0),f){var m={direction:v,data:data,observer:this,entry:r};o.log(v,r,this),t(m)}}))}),e),this.enable(),this;o.warn("No handler specified on Intersection Observer")}enable(){this.observer&&this.el&&(Array.isArray(this.el)?this.el.forEach((e=>{this.observer.observe(e)})):this.observer.observe(this.el))}disable(){this.observer&&this.el&&(Array.isArray(this.el)?this.el.forEach((e=>{this.observer.unobserve(e)})):this.observer.unobserve(this.el))}destroy(){this.observer&&this.el&&(this.disable(),this.observer.disconnect(),this.observer=null,this.el=null)}refresh(){this.observer&&this.el&&(this.disable(),this.enable())}}},776:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(326);class n{bind(e,t,r){var{arg:n,value:c}=t,{context:l}=r;this.action=()=>{var t,r=l.$track(this.eventType);(t="function"==typeof c?r.create(c):r.with(c).create()).trackingData=o.a.replaceAttributeReferences(e,t.trackingData),t.fire()},e.addEventListener(n||"mousedown",this.action)}unbind(e,t){var{arg:r,value:o}=t;e.removeEventListener(r||"mousedown",this.action)}}function c(e){return class extends n{get eventType(){return e}}}},782:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var o=r(6),n=r(0),c=r(33),l=r(38),d=r(25),h=r(58),v=r(29);function f(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}var m=class extends h.a{constructor(e){super(e),this.services=["tagular"]}get defaults(){return{"@type":"redventures.ecommerce.v1.ProductClicked"}}transform(data){var base=super.transform(data);if(this.additionalData.tagular=base,data.outboundUrl){var e=data.actionOutcome||this.getLinkActionOutcome(data.outboundUrl);"INTERNALLINK"===e&&data.outboundUrl===v.a.getPath(data.outboundUrl)&&(data.outboundUrl=v.a.liveUrl(data.outboundUrl)),data.actionOutcome=e}return data.customDimensions&&(data.customDimensions=data.customDimensions.filter((e=>e.value))),this.additionalData.tagular=function(e){for(var i=1;i2&&void 0!==arguments[2]?arguments[2]:l,o=e;if(e.includes(t)){e=e.replace(/(dtp|mwb)-oo/,"$1");var n=new RegExp(t,"g");return e.replace(n,r[0])}return o},m=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,o=e;if(e.includes(r[0])||e.includes(r[1])){var n=new RegExp("(".concat(r.join("|"),")"),"g");return e.replace(n,t)}return o},O=(e,t)=>{var r=e;try{c.log("Original commerce URL: ",r);var o=e.includes("amazon.com"),f=e.startsWith("https://amazon")||e.startsWith("https://www.amazon"),m=(e=>{var t="dtp";return e.device===n.b.Mobile&&(t="mwb"),t})(t),O=(e=>{var t,r,o,n;return(null===(t=e.topicPaths)||void 0===t?void 0:t.includes("home-internet"))?"cb":(null===(r=e.topicPaths)||void 0===r?void 0:r.includes("home-energy-and-utilities"))?"ce":(null===(o=e.topicPaths)||void 0===o?void 0:o.includes("personal-finance"))?"cm":(null===(n=e.topicPaths)||void 0===n?void 0:n.includes("sleep"))?"cs":"cn"})(t),y=O+"-"+l[0]+"-"+m,w=!1;if((e=f?"https://assoc-redirect.amazon.com/g/r/"+e:e).includes("[subid_value]")?(e=e.replace("[subid_value]",y),w=!0):e.includes("subid_value")&&(e=e.replace("subid_value",y),w=!0),e.includes(d)){var j=encodeURIComponent("https://www.cnet.com"+t.canonicalPath);e=e.replace(d,j)}if(e.includes(h)){var P=encodeURIComponent(t.articleName);e=e.replace(h,P)}var k=new URL(e),C=k.searchParams;if(o){var _=l[0]+"|"+t.guid+"|"+m+"|"+O;C.delete("tag"),C.append("tag","cnet-buy-button-20"),C.delete("ascsubtag"),C.append("ascsubtag",_),w=!0}var D=v[k.host];!w&&D&&C.append(D,y);var U=k.toString();return c.log("Modified Commerce URL: ",U),U}catch(t){return c.error("could not construct URL: '".concat(e,"' "),t),r}}},793:function(e,t,r){"use strict";r.r(t),r.d(t,"CommerceBuyButton",(function(){return C}));r(31),r(22),r(27);var o=r(0),n=r(769),c=r(772),l=r(782),d=r(796),h=r(326),v=r(776),f=r(774),m=(r(3),r(5),r(24),r(40),r(794),r(93),r(144)),O=r(8),y=r(792),w=new O.b("commerceUrlModifier"),j=class extends n.Vue{constructor(){super(...arguments),this.modifiedCommerceUrl="",this.performanceConsentGranted=!1,this._uuid="",this.stateMappings={articleName:this.$store.getters["tracking/data"].articleTitle,canonicalPath:this.$store.getters["routeHistory/getCurrentPath"],device:this.$store.getters.device,guid:this.$store.getters["tracking/viewGuid"]||"-",topicPaths:this.$store.getters["tracking/dataByKey"]("primaryTopics")}}get originalUrl(){return""}checkCohesionConsent(){var e,t;"function"==typeof(null===(e=null===window||void 0===window?void 0:window.cohesion)||void 0===e?void 0:e.consent)?this.performanceConsentGranted=null===(t=window.cohesion.consent("list"))||void 0===t?void 0:t.includes("C0002"):this.performanceConsentGranted=!1}injectCorrelationId(e){if(this._uuid=this.performanceConsentGranted?Object(m.v4)().replaceAll("-",""):this.$store.getters["tracking/data"].contentId.replaceAll("-",""),this.modifiedCommerceUrl=Object(y.c)(e,this._uuid),!this.performanceConsentGranted){var t=new RegExp(this._uuid+"-(dtp|mwb)","g");this.modifiedCommerceUrl=this.modifiedCommerceUrl.replace(t,"$&-oo")}w.log("Button click, consent status: ".concat(this.performanceConsentGranted)),setTimeout((()=>this.resetCommerceUrl(this.modifiedCommerceUrl)),500)}resetCommerceUrl(e){this.modifiedCommerceUrl=Object(y.d)(e,this._uuid)}created(){this.modifiedCommerceUrl=this.originalUrl}beforeMount(){this.updateModifiedCommerceUrl()}mounted(){window.cohesion&&window.cohesion("ready",(()=>{window.cohesion("consent:ready",(()=>{this.checkCohesionConsent(),w.log("Initial consent: ".concat(this.performanceConsentGranted))})),window.cohesion("consent:changed",(()=>{this.checkCohesionConsent(),w.log("Consent changed: ".concat(this.performanceConsentGranted))}))}))}updateModifiedCommerceUrl(){this.originalUrl&&(this.modifiedCommerceUrl=Object(y.b)(this.originalUrl,this.stateMappings))}};Object(o.c)([Object(n.Watch)("originalUrl"),Object(o.f)("design:type",Function),Object(o.f)("design:paramtypes",[]),Object(o.f)("design:returntype",void 0)],j.prototype,"updateModifiedCommerceUrl",null);var P=j=Object(o.c)([n.Component],j),k=r(806),C=class extends n.Vue{get linkHref(){return this.buttonHref}get buttonHref(){return this.shouldMonetize?this.modifiedCommerceUrl:this.buttonUrl}get buttonColor(){return this.$abtest.isUserInActiveTestAndBucket("btncolor_test","test")?"t-ctaAbcolorTest-lime":"o-button-".concat(this.buttonTheme)}get buttonClasses(){return"c-commerceBuyButton o-button ".concat(this.buttonColor," o-button-").concat(this.buttonSize," o-button-smallRound")}get correlationId(){return this._uuid}get formatSubType(){var e=this.isLink?"in-text link":"in-text button";return this.isImage&&(e=null),this.subtype||e}get originalUrl(){return this.buttonUrl}get leadType(){return this.hasOffer?"manual":"mlst"}get formatType(){var e=this.isLink?"LINK":"BUTTON";return this.isImage&&(e="IMAGE"),e}get productData(){var e,t,r,o,n,c,l,d;return{brand:(null===(t=null===(e=this.leadClickData)||void 0===e?void 0:e.productManufacturer)||void 0===t?void 0:t.toString())||(null===(r=this.leadClickData)||void 0===r?void 0:r.brand)||null,category:this.leadType,coupon:(null===(o=this.leadClickData)||void 0===o?void 0:o.coupon)||null,formatSubtype:this.formatSubType,formatType:this.formatType,location:this.$attributeRef.location,name:(null===(n=this.leadClickData)||void 0===n?void 0:n.productName)||null,pageId:this.contentId||null,position:this.$attributeRef.position,price:Number(this.buttonPrice)||0,productId:(null===(c=this.leadClickData)||void 0===c?void 0:c.productId)||null,quantity:1,sku:(null===(l=this.leadClickData)||void 0===l?void 0:l.productSku)||"",text:this.buttonText,upc:(null===(d=this.leadClickData)||void 0===d?void 0:d.productSku)||"",variant:this.variant||this.$attributeRef.section}}get customDimensionsData(){var e,t,r,o,n=[{key:"shortcodeId",value:null===(e=this.leadClickData)||void 0===e?void 0:e.shortcodeId},{key:"shortcodeType",value:null===(t=this.leadClickData)||void 0===t?void 0:t.shortcodeType}];if(this.trackProductViewed&&this.allLeadsData){var c=[],l=[];this.allLeadsData.forEach(((e,t)=>{c=c.concat({key:"rawUrl_".concat(t),value:null==e?void 0:e.rawUrl}),l=l.concat({key:"vendor_".concat(t),value:null==e?void 0:e.resellerName})})),n=n.concat(c,l)}else n=n.concat([{key:"rawUrl",value:(null===(r=this.leadClickData)||void 0===r?void 0:r.rawUrl)||this.buttonUrl},{key:"vendor",value:null===(o=this.leadClickData)||void 0===o?void 0:o.resellerName}]);return n}get productClickedData(){return{actionOutcome:"EXTERNALLINK",correlationId:this._uuid,outboundUrl:this.buttonHref,product:this.productData,customDimensions:this.customDimensionsData}}get productViewedData(){return{product:this.productData,customDimensions:this.customDimensionsData}}get isEnabled(){var e;return!(this.$abtest.isUserInActiveTestAndBucket("bb_super","test")&&!this.isLink&&(null===(e=this.preferredResellers)||void 0===e?void 0:e.some((e=>"Best Buy"===e.name)))&&!this.buttonText.includes("Best Buy"))}commerceButtonClicked(){this.$nuxt.$emit("show_mattress_exit_modal")}fireProductViewed(){if(this.trackProductViewed){var e=h.a.replaceAttributeReferences(this.$el,this.productViewedData);this.$track(d.a).with(e).fire()}}created(){var e;this.buttonUrl&&Object(k.c)(this.buttonUrl)?e={cm07:!0}:this.buttonPrice&&!this.isLink&&(e={cm01:!0}),this.$store.dispatch("tracking/setPageComponents",e)}mounted(){this.trackProductViewed&&(this.inViewportObserver=new f.a({rootMargin:"0px",el:this.$el,threshold:.5},(()=>{this.inViewportObserver.destroy(),this.fireProductViewed()})))}beforeDestroy(){this.inViewportObserver&&this.inViewportObserver.destroy()}};Object(o.c)([Object(n.Getter)("tracking/data"),Object(o.f)("design:type",Object)],C.prototype,"data",void 0),Object(o.c)([Object(n.Prop)({default:"",type:String}),Object(o.f)("design:type",String)],C.prototype,"buttonText",void 0),Object(o.c)([Object(n.Prop)({default:"",type:String}),Object(o.f)("design:type",String)],C.prototype,"buttonUrl",void 0),Object(o.c)([Object(n.Prop)({default:"",type:[Number,String]}),Object(o.f)("design:type",Object)],C.prototype,"buttonPrice",void 0),Object(o.c)([Object(n.Prop)({default:"primary",type:String}),Object(o.f)("design:type",String)],C.prototype,"buttonTheme",void 0),Object(o.c)([Object(n.Prop)({default:"medium",type:String}),Object(o.f)("design:type",String)],C.prototype,"buttonSize",void 0),Object(o.c)([Object(n.Prop)({default:!1}),Object(o.f)("design:type",Boolean)],C.prototype,"trackProductViewed",void 0),Object(o.c)([Object(n.Prop)({default:null,type:Boolean}),Object(o.f)("design:type",Boolean)],C.prototype,"isImage",void 0),Object(o.c)([Object(n.Prop)({default:null,type:Boolean}),Object(o.f)("design:type",Boolean)],C.prototype,"isLink",void 0),Object(o.c)([Object(n.Prop)({default:!1,type:Boolean}),Object(o.f)("design:type",Boolean)],C.prototype,"hasOffer",void 0),Object(o.c)([Object(n.Prop)({default:!0}),Object(o.f)("design:type",Boolean)],C.prototype,"shouldMonetize",void 0),Object(o.c)([Object(n.Prop)({default:null}),Object(o.f)("design:type",String)],C.prototype,"subtype",void 0),Object(o.c)([Object(n.Prop)({default:null}),Object(o.f)("design:type",Object)],C.prototype,"leadClickData",void 0),Object(o.c)([Object(n.Prop)({default:null}),Object(o.f)("design:type",Array)],C.prototype,"allLeadsData",void 0),Object(o.c)([Object(n.Prop)({default:""}),Object(o.f)("design:type",String)],C.prototype,"contentId",void 0),Object(o.c)([Object(n.Prop)({default:null}),Object(o.f)("design:type",String)],C.prototype,"variant",void 0),Object(o.c)([Object(n.Prop)({default:null,type:Array}),Object(o.f)("design:type",Array)],C.prototype,"preferredResellers",void 0);var _=C=Object(o.c)([Object(n.Component)({mixins:[P]}),Object(c.a)("track-click",Object(v.a)(l.a))],C),D=(r(815),r(117)),component=Object(D.a)(_,(function(){var e=this,t=e._self._c;e._self._setupProxy;return e.isEnabled?t("a",{directives:[{name:"track-click",rawName:"v-track-click",value:t=>(t.trackingData=e.productClickedData,t),expression:"(event) => {\n event.trackingData = productClickedData;\n return event;\n }"}],class:{[e.buttonClasses]:!e.isLink},attrs:{href:e.linkHref,rel:"noopener nofollow",target:"_blank"},on:{mousedown:function(t){return e.injectCorrelationId(e.modifiedCommerceUrl)},click:e.commerceButtonClicked}},[e._t("default",(function(){return[e._v(e._s(e.buttonText))]}))],2):e._e()}),[],!1,null,null,null);t.default=component.exports},794:function(e,t,r){r(799)},796:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var o=r(6),n=r(0),c=r(33),l=r(38),d=r(25),h=r(58);function v(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}var f=class extends h.a{constructor(e){super(e),this.services=["tagular"]}get defaults(){return{"@type":"redventures.ecommerce.v1.ProductViewed"}}transform(data){var base=super.transform(data);return this.additionalData.tagular=base,data.customDimensions&&(data.customDimensions=data.customDimensions.filter((e=>e.value))),this.additionalData.tagular=function(e){for(var i=1;ie.length?-1:""===t?r:C(e,t,r)};o({target:"String",proto:!0},{replaceAll:function(e,t){var r,o,c,w,T,x,S,R,L,M=l(this),A=0,N=0,B="";if(!h(e)){if((r=v(e))&&(o=f(l(O(e))),!~C(o,"g")))throw k("`.replaceAll` does not allow non-global regexes");if(c=m(e,P))return n(c,e,M,t);if(j&&r)return _(f(M),e,t)}for(w=f(M),T=f(e),(x=d(t))||(t=f(t)),S=T.length,R=U(1,S),A=I(w,T,0);-1!==A;)L=x?f(t(T,A,w)):y(T,w,A,[],void 0,t),B+=D(w,N,A)+L,N=A+S,A=I(w,T,A+R);return N1&&void 0!==arguments[1]?arguments[1]:{},d={utm_campaign:null!==(t=l.utm_campaign)&&void 0!==t?t:"",utm_content:null!==(r=l.utm_content)&&void 0!==r?r:"",utm_medium:"referral",utm_source:"roadshow",u1:l.correlation_id,ref_url:l.ref_url,referrer_id:null!==(c=l.referrer_id)&&void 0!==c?c:""},h="/roadshow/roadshow-auto-buying-program/";if(e){var v,f=n(e);f&&null!==(v=f.model)&&void 0!==v&&v.cdId?h="https://roadshow.truecar.com/redirect-link.html?linkto=prices-new&chromeMake=".concat(f.make.slug,"&chromeTrimId=").concat(f.model.cdId,"&").concat(o.a.stringifyObject(d)):f&&(h="https://roadshow.truecar.com/prices-new/".concat(f.make.slug,"/").concat(f.model.slug,"-summary/?").concat(o.a.stringifyObject(d)))}return h}function l(){var e,t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c={utm_campaign:null!==(e=n.utm_campaign)&&void 0!==e?e:"",utm_content:null!==(t=n.utm_content)&&void 0!==t?t:"",utm_medium:"referral",utm_source:"roadshow",u1:n.correlation_id,ref_url:n.ref_url,referrer_id:null!==(r=n.referrer_id)&&void 0!==r?r:""};return"https://roadshow.truecar.com/used-cars-for-sale/?".concat(o.a.stringifyObject(c))}function d(e){return e.includes("roadshow.truecar.com")}},815:function(e,t,r){"use strict";r(787)},816:function(e,t,r){var o=r(242)((function(i){return i[1]}));o.push([e.i,".c-commerceBuyButton{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}",""]),o.locals={},e.exports=o},830:function(e,t,r){"use strict";var o=r(6),n=(r(31),r(3),r(5),r(169),r(107),r(173),r(509),r(0)),c=r(769),l=r(792);function d(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}function h(e){for(var i=1;i0)}get hasCreditCardOffer(){var e,t,r;return!!(null===(r=null===(t=null===(e=this.extraData)||void 0===e?void 0:e.creditCardData)||void 0===t?void 0:t.attributes)||void 0===r?void 0:r.link)}get monetizedUrl(){var e;return(null===(e=this.extraData)||void 0===e?void 0:e.monetizedUrl)||null}get offerUrl(){var e;return(null===(e=this.extraData)||void 0===e?void 0:e.offerUrl)||null}get productPrice(){var e,t;return this.useReseller?(null===(e=this.preferredReseller)||void 0===e?void 0:e.price)/100:Number(null===(t=this.merchantOffer)||void 0===t?void 0:t.offerPrice)}get resellerName(){var e,t;return(this.useReseller?null===(e=this.preferredReseller)||void 0===e?void 0:e.name:null===(t=this.merchantOffer)||void 0===t?void 0:t.offerMerchant)||null}get techProdOfferText(){var e,t,r;return(null===(r=null===(t=null===(e=this.techProd)||void 0===e?void 0:e.attributes)||void 0===t?void 0:t.find((e=>"offer-link-text"===e.slug)))||void 0===r?void 0:r.val.toString())||null}get techProdOfferUrl(){var e,t,r;return(null===(r=null===(t=null===(e=this.techProd)||void 0===e?void 0:e.attributes)||void 0===t?void 0:t.find((e=>"offer-link-url"===e.slug)))||void 0===r?void 0:r.val.toString())||null}get productFamily(){var e,t;return(null===(t=null===(e=this.techProd)||void 0===e?void 0:e.family)||void 0===t?void 0:t[0])||{uuid:"",name:""}}get promoText(){var e,t,r=null===(t=null===(e=this.techProd)||void 0===e?void 0:e.attributes)||void 0===t?void 0:t.find((e=>"promo-text"===e.slug));return null==r?void 0:r.val[0]}get techProd(){var e;return(null===(e=this.extraData)||void 0===e?void 0:e.techProd)||null}get usePricing(){var e;return(null===(e=this.extraData)||void 0===e?void 0:e.usePricing)||!1}get useReseller(){return!(!this.hasReseller||!this.techProd||!this.usePricing&&(this.hasMerchantOffer||this.hasOfferLink))}get allLeadsTrackingData(){var e=this.useReseller?this.preferredResellers:this.merchantOffers,t=[];for(var r of e)t.push({rawUrl:this.useReseller?null==r?void 0:r.url:null==r?void 0:r.rawUrl,resellerName:this.useReseller?null==r?void 0:r.name:null==r?void 0:r.offerMerchant});return t}get creditCardOffer(){var e,t,r,o,n,c,d;try{c=new URL(null===(e=this.merchantOffer)||void 0===e?void 0:e.url)}catch(e){}if(null===(t=null==c?void 0:c.hostname)||void 0===t?void 0:t.endsWith("amazon.com"))return c.href;try{d=new URL(null===(n=null===(o=null===(r=this.extraData)||void 0===r?void 0:r.creditCardData)||void 0===o?void 0:o.attributes)||void 0===n?void 0:n.link)}catch(e){}return d&&"undefined"!=typeof window&&window.cohesion&&window.cohesion("ready",(()=>{var e=window._Cohesion,t=d.searchParams;t.append("c_correlation_id",l.a[0]),t.append("c_tenant_id",e.tenantId),t.append("c_anonymous_id",e.anonymousId),t.append("c_session_id",e.sessionId),t.append("c_instance_id",e.instanceId)})),null==d?void 0:d.href}get winningOfferUrl(){var e,t;return this.hasCreditCardOffer?this.creditCardOffer:this.techProdOfferUrl?this.techProdOfferUrl:this.useReseller?(null===(e=this.preferredReseller)||void 0===e?void 0:e.url)||null:this.monetizedUrl?this.monetizedUrl:this.hasMerchantOffer?(null===(t=this.merchantOffer)||void 0===t?void 0:t.url)||null:this.offerUrl?this.offerUrl:null}get winningOfferTrackingData(){var e=this.useReseller?this.preferredReseller:this.merchantOffer;return this.getLeadTrackingData(e,this.useReseller)}shortcodeType(e){var t={commercelink:"link",commercelinkshortcode:"link",cnetlisticle:"listicle",cross_content_listicle:"x-listicle",commercepromo:"promo",buybutton:"button",reviewcard:"reviewcard"};return t[e]?t[e]:e}getLeadTrackingData(e){var t,r,o,n,c,l,d,v,f,m,O,y,w,j,P,k,C,_,D,U,I,T,x,S,R,L=arguments.length>1&&void 0!==arguments[1]&&arguments[1],data={brand:null==e?void 0:e.offerMerchant,coupon:this.promoText,productCpc:"",productId:(null===(t=this.techProd)||void 0===t?void 0:t.id)||"",productManufacturer:(null===(o=null===(r=this.techProd)||void 0===r?void 0:r.manufacturer)||void 0===o?void 0:o.name)||"",productSeriesId:(null===(n=this.productFamily)||void 0===n?void 0:n.uuid)||"",productSeriesName:(null===(c=this.productFamily)||void 0===c?void 0:c.name)||"",productSku:Array.isArray(null===(d=null===(l=this.techProd)||void 0===l?void 0:l.product)||void 0===d?void 0:d.sku)&&(null===(m=null===(f=null===(v=this.techProd)||void 0===v?void 0:v.product)||void 0===f?void 0:f.sku)||void 0===m?void 0:m.length)>0?null===(w=null===(y=null===(O=this.techProd)||void 0===O?void 0:O.product)||void 0===y?void 0:y.sku)||void 0===w?void 0:w[0]:(null===(P=null===(j=this.techProd)||void 0===j?void 0:j.product)||void 0===P?void 0:P.sku)||"",productSlug:(null===(C=null===(k=this.techProd)||void 0===k?void 0:k.product)||void 0===C?void 0:C.slug)||"",resellerId:"",resellerTtag:"",shortcodeId:(null===(_=this.extraData)||void 0===_?void 0:_.uuid)||"",shortcodeType:this.shortcodeType(null!==(U=null===(D=this.extraData)||void 0===D?void 0:D.shortcodeType)&&void 0!==U?U:"")};return h(h({},data),{},L?{productCpc:e.cpc,productName:null===(T=null===(I=this.techProd)||void 0===I?void 0:I.product)||void 0===T?void 0:T.name,productPrice:Number(e.totalPrice/100)||Number(e.price/100),rawUrl:null==e?void 0:e.url,resellerId:e.id,resellerName:e.name,resellerTtag:e.tTag}:{productName:(null===(S=null===(x=this.techProd)||void 0===x?void 0:x.product)||void 0===S?void 0:S.name)||(null===(R=this.extraData)||void 0===R?void 0:R.hed)||this.hed,productPrice:(null==e?void 0:e.offerPrice)||0,rawUrl:null==e?void 0:e.rawUrl,resellerName:null==e?void 0:e.offerMerchant})}getLowestOfferPrice(e){var t,r,o;if(!Array.isArray(e)||0===e.length)return null;var n=(null===(t=e[0])||void 0===t?void 0:t.totalPrice)||(null===(r=e[0])||void 0===r?void 0:r.price)||(null===(o=e[0])||void 0===o?void 0:o.offerPrice);return e.forEach((e=>{var t=(null==e?void 0:e.totalPrice)||(null==e?void 0:e.price)||(null==e?void 0:e.offerPrice);t