(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1191:function(t,e,o){"use strict";o.d(e,"a",(function(){return d})),o.d(e,"b",(function(){return l})),o.d(e,"c",(function(){return c}));o(21),o(24);var r=o(32),n=function(t){var e,o,r,n,d,l,c,h=(null==t||null===(e=t.reviews)||void 0===e||null===(e=e.firsttake)||void 0===e?void 0:e.style)&&(null==t||null===(o=t.reviews)||void 0===o||null===(o=o.indepth)||void 0===o?void 0:o.style);return!!(null!=t&&null!==(r=t.manufacturer)&&void 0!==r&&r.slug&&null!=t&&null!==(n=t.manufacturer)&&void 0!==n&&n.name&&null!=t&&null!==(d=t.product)&&void 0!==d&&d.cdModel&&null!=t&&null!==(l=t.product)&&void 0!==l&&l.cdModelSlug)&&{make:{name:t.manufacturer.name,slug:t.manufacturer.slug},model:{name:t.product.cdModel,slug:t.product.cdModelSlug,cdId:null!==(c=t.product)&&void 0!==c&&c.cdId&&h?t.product.cdId:""}}};function d(t){var e,o,d,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c={utm_campaign:null!==(e=l.utm_campaign)&&void 0!==e?e:"",utm_content:null!==(o=l.utm_content)&&void 0!==o?o:"",utm_medium:"referral",utm_source:"roadshow",u1:l.correlation_id,ref_url:l.ref_url,referrer_id:null!==(d=l.referrer_id)&&void 0!==d?d:""},h="/roadshow/roadshow-auto-buying-program/";if(t){var v,m=n(t);m&&null!==(v=m.model)&&void 0!==v&&v.cdId?h="https://roadshow.truecar.com/redirect-link.html?linkto=prices-new&chromeMake=".concat(m.make.slug,"&chromeTrimId=").concat(m.model.cdId,"&").concat(r.a.stringifyObject(c)):m&&(h="https://roadshow.truecar.com/prices-new/".concat(m.make.slug,"/").concat(m.model.slug,"-summary/?").concat(r.a.stringifyObject(c)))}return h}function l(){var t,e,o,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d={utm_campaign:null!==(t=n.utm_campaign)&&void 0!==t?t:"",utm_content:null!==(e=n.utm_content)&&void 0!==e?e:"",utm_medium:"referral",utm_source:"roadshow",u1:n.correlation_id,ref_url:n.ref_url,referrer_id:null!==(o=n.referrer_id)&&void 0!==o?o:""};return"https://roadshow.truecar.com/used-cars-for-sale/?".concat(r.a.stringifyObject(d))}function c(t){return t.includes("roadshow.truecar.com")}},1467:function(t,e,o){var content=o(1925);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(217).default)("b0466510",content,!0,{sourceMap:!1})},1924:function(t,e,o){"use strict";o(1467)},1925:function(t,e,o){var r=o(216)((function(i){return i[1]}));r.push([t.i,".c-commerceBuyButton{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}",""]),r.locals={},t.exports=r},879:function(t,e,o){"use strict";o.r(e),o.d(e,"CommerceBuyButton",(function(){return E}));var r=o(6),n=(o(21),o(4),o(26),o(35),o(24),o(74),o(39),o(859),o(5),o(0)),d=o(829),l=o(67),c=o(835),h=o(869),v=o(895),m=o(344),O=o(836),f=o(834),y=o(32),article=o(346),j={expressvpn:"expressvpn_leads",surfshark:"surfshark_leads",nordvpn:"nordvpn_leads","private-internet-access":"pia_leads",ipvanish:"ipvanish_leads"},_=(o(92),o(10)),k=o(351);function w(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function P(t){for(var e=1;ethis.resetCommerceUrl(this.modifiedCommerceUrl)),500)}resetCommerceUrl(t){this.modifiedCommerceUrl=Object(k.i)(t,this._uuid)}created(){this.modifiedCommerceUrl=this.originalUrl}beforeMount(){this.updateModifiedCommerceUrl()}updateModifiedCommerceUrl(){var t;if(this.originalUrl){var e=P(P({},this.stateMappingsExtended),{},{guid:this.viewGuid,versionId:null===(t=this.$store.getters["tracking/data"])||void 0===t?void 0:t.versionId});this.modifiedCommerceUrl=Object(k.c)(this.originalUrl,e,this.$services.isFeatureEnabled("oneTrueClick"))}}};Object(n.a)([Object(d.Watch)("stateMappingsExtended"),Object(d.Watch)("viewGuid"),Object(d.Watch)("originalUrl"),Object(n.b)("design:type",Function),Object(n.b)("design:paramtypes",[]),Object(n.b)("design:returntype",void 0)],C.prototype,"updateModifiedCommerceUrl",null);var D=C=Object(n.a)([d.Component],C),I=o(890),U=o(343),S=o(1191);function T(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function M(t){for(var e=1;e"Best Buy"===t.name))&&!this.buttonText.includes("Best Buy"))}get isBroadbandVersus(){return this.$services.isFeatureEnabled("isBroadBandVersus")}get stateMappingsExtended(){var t,e,o,r,n,d,l;return M(M({},this.stateMappings),{},{position:null===(t=this.productEventBaseData)||void 0===t||null===(t=t.items)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.index,productElementLabel:null===(e=this.productEventBaseData)||void 0===e||null===(e=e.items)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.element_label,productLocationId:null===(o=this.productEventBaseData)||void 0===o||null===(o=o.items)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.location_id,productModule:null===(r=this.productEventBaseData)||void 0===r?void 0:r.module,productObjectType:null===(n=this.productEventBaseData)||void 0===n?void 0:n.object_type,shortcodeId:null===(d=this.productEventBaseData)||void 0===d?void 0:d.short_code,techProdId:null===(l=this.productEventBaseData)||void 0===l||null===(l=l.items)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.item_id})}getModifiedHref(){var t=this.$refs["cb"+this.correlationId],e=t.getAttribute("data-nca-url");if(this.isAmazonNca&&Object(k.h)(this.buttonUrl)&&e){var o=Object(k.c)(e,this.stateMappings);null==t||t.setAttribute("href",o),this.modifiedCommerceUrl=o}return this.$services.isFeatureEnabled("affilimate")?null==t?void 0:t.getAttribute("href"):this.modifiedCommerceUrl}commerceButtonClicked(){if(this.$nuxt.$emit("show_mattress_exit_modal"),this.taboolaTrack){var t,e=null==j?void 0:j[null===(t=this.leadClickData)||void 0===t||null===(t=t.resellerName)||void 0===t||null===(t=t.toLowerCase())||void 0===t?void 0:t.replaceAll(" ","-")];e&&window._tfa.push({notify:"event",name:e,id:1641503})}}handleMouseDown(){this.isBroadbandVersus?this.buyButtonBroadbandVersus():this.injectCorrelationId(this.getModifiedHref()),this.$track(h.a).with(this.productSelectData).fire()}buyButtonBroadbandVersus(){var t,e,o,r,n,{deviceType:d,pageViewGuid:l,primaryTopicSlug:c,testGroup:h,topicPaths:v,versionId:m}=null!==(t=null===(e=this.$store)||void 0===e||null===(e=e.getters)||void 0===e?void 0:e["tracking/data"])&&void 0!==t?t:{},O=null===(o=this.$store)||void 0===o||null===(o=o.getters)||void 0===o?void 0:o["tracking/sessionId"],f=(null===(r=this.$route)||void 0===r||null===(r=r.params)||void 0===r?void 0:r.slug)||"",y=null===(n=this.$store)||void 0===n||null===(n=n.getters)||void 0===n?void 0:n["broadbandGeo/getZipcode"];this.versusModifyUrl=Object(I.a)({url:this.buttonHref,zipCode:y,pageViewGuid:l,articleSlug:f,sessionId:O,correlationId:this.correlationId,versionId:m,primaryTopicSlug:c,deviceType:d,testGroup:h,topicPaths:v})}fireProductViewed(){this.trackProductViewGa&&this.$track(v.a).with(this.productEventBaseData).fire()}updateAttributeRefVars(){var t=m.a.replaceAttributeReferences(this.$el,{locationId:this.$attributeRef.location,position:this.$attributeRef.position,section:this.$attributeRef.section});this._locationId=t.locationId,this.position=null!==t.position?Number(t.position):null,this.section=t.section}created(){var t;this.buttonUrl&&Object(S.c)(this.buttonUrl)?t={cm07:!0}:this.buttonPrice&&!this.isLink&&(t={cm01:!0}),this.$store.dispatch("tracking/setPageComponents",t)}mounted(){this.updateAttributeRefVars(),(this.trackProductViewed||this.trackProductViewGa)&&(this.inViewportObserver=new f.a({rootMargin:"0px",el:this.$el,threshold:.5},(()=>{this.inViewportObserver.destroy(),this.fireProductViewed()})))}beforeDestroy(){this.inViewportObserver&&this.inViewportObserver.destroy()}};Object(n.a)([Object(d.Getter)("tracking/data"),Object(n.b)("design:type",Object)],E.prototype,"data",void 0),Object(n.a)([Object(d.Getter)("isDesktop"),Object(n.b)("design:type",Boolean)],E.prototype,"isDesktop",void 0),Object(n.a)([Object(d.Prop)({default:"",type:String}),Object(n.b)("design:type",String)],E.prototype,"buttonText",void 0),Object(n.a)([Object(d.Prop)({default:"",type:String}),Object(n.b)("design:type",String)],E.prototype,"buttonUrl",void 0),Object(n.a)([Object(d.Prop)({default:"",type:[Number,String]}),Object(n.b)("design:type",Object)],E.prototype,"buttonPrice",void 0),Object(n.a)([Object(d.Prop)({default:"primary",type:String}),Object(n.b)("design:type",String)],E.prototype,"buttonTheme",void 0),Object(n.a)([Object(d.Prop)({default:"medium",type:String}),Object(n.b)("design:type",String)],E.prototype,"buttonSize",void 0),Object(n.a)([Object(d.Prop)({default:!1}),Object(n.b)("design:type",Boolean)],E.prototype,"trackProductViewed",void 0),Object(n.a)([Object(d.Prop)({default:!0,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"trackProductViewGa",void 0),Object(n.a)([Object(d.Prop)({default:null,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"isImage",void 0),Object(n.a)([Object(d.Prop)({default:!1,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"isLeftRailTemplate",void 0),Object(n.a)([Object(d.Prop)({default:null,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"isLink",void 0),Object(n.a)([Object(d.Prop)({default:!1,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"hasOffer",void 0),Object(n.a)([Object(d.Prop)({default:!0}),Object(n.b)("design:type",Boolean)],E.prototype,"shouldMonetize",void 0),Object(n.a)([Object(d.Prop)({default:null}),Object(n.b)("design:type",String)],E.prototype,"subtype",void 0),Object(n.a)([Object(d.Prop)({default:null}),Object(n.b)("design:type",Object)],E.prototype,"leadClickData",void 0),Object(n.a)([Object(d.Prop)({default:null}),Object(n.b)("design:type",Array)],E.prototype,"allLeadsData",void 0),Object(n.a)([Object(d.Prop)({default:""}),Object(n.b)("design:type",String)],E.prototype,"contentId",void 0),Object(n.a)([Object(d.Prop)({default:null}),Object(n.b)("design:type",String)],E.prototype,"variant",void 0),Object(n.a)([Object(d.Prop)({default:null,type:Array}),Object(n.b)("design:type",Array)],E.prototype,"preferredResellers",void 0),Object(n.a)([Object(d.Prop)({default:!1}),Object(n.b)("design:type",Boolean)],E.prototype,"taboolaTrack",void 0),Object(n.a)([Object(d.Prop)({default:null}),Object(n.b)("design:type",Object)],E.prototype,"techProd",void 0),Object(n.a)([Object(d.Prop)({default:null,type:String}),Object(n.b)("design:type",Object)],E.prototype,"formatTypeOverride",void 0),Object(n.a)([Object(d.Prop)({default:null}),Object(n.b)("design:type",String)],E.prototype,"hed",void 0),Object(n.a)([Object(d.Prop)({default:!1,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"defaultOverride",void 0),Object(n.a)([Object(d.Prop)({default:null,type:String}),Object(n.b)("design:type",Object)],E.prototype,"itemCategory",void 0),Object(n.a)([Object(d.Prop)({default:null,type:Boolean}),Object(n.b)("design:type",Boolean)],E.prototype,"isExpanded",void 0),Object(n.a)([Object(d.Prop)({default:null,type:String}),Object(n.b)("design:type",String)],E.prototype,"locationId",void 0),Object(n.a)([Object(d.Prop)({default:null,type:String}),Object(n.b)("design:type",String)],E.prototype,"elementLabel",void 0),Object(n.a)([Object(d.Prop)({default:null,type:String}),Object(n.b)("design:type",String)],E.prototype,"objectType",void 0);var $=E=Object(n.a)([Object(d.Component)({mixins:[D]}),Object(c.a)("track-click-ga",Object(O.a)(h.a))],E),x=(o(1924),o(127)),component=Object(x.a)($,(function(){var t=this,e=t._self._c;t._self._setupProxy;return t.isEnabled?e("a",{ref:"cb"+t.correlationId,class:{[t.buttonClasses]:!t.isLink},attrs:{href:t.isBroadbandVersus?t.versusModifyUrl:t.buttonHref,rel:t.rel,target:t.target,title:t.linkTitle,"data-aps-asin":t.asin,"data-aps-asc-tag":t.ascTag,"data-aps-asc-subtag":t.ascSubTag},on:{mousedown:t.handleMouseDown,click:t.commerceButtonClicked}},[t.defaultOverride?t._t("default"):t._t("default",(function(){return[t._v(t._s(t.buttonText))]}))],2):t._e()}),[],!1,null,null,null);e.default=component.exports}}]);