PageSourceSearch

https://sa0-sp.roadtrippers.com/packs/95.a341a83a5859f42c6e81.js

js roadtrippers.com collected 2026-10-01 08:41:26 UTC 10,059 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[95],{14300:(t,e,i)=>{i.d(e,{Z:()=>r});class r{constructor(t){({el:this.el,id:this.id,props:this.props}=t),this.viewEl=this.el.querySelector(`#${this.id}`)}getTitle(){return this.viewEl.dataset.title}}},5646:(t,e,i)=>{function r(t){const e=new URL(t),{pathname:i,search:r,searchParams:n}=e,s=[parseFloat(n.get("lng")),parseFloat(n.get("lat"))],o=parseFloat(n.get("z"));s.every(Number.isFinite)&&Number.isFinite(o)&&window.map.jumpTo({center:s,zoom:o}),rt.core.actionCreators.history.navigate({url:i+r})}i.d(e,{a:()=>r})},95:(t,e,i)=>{i.r(e),i.d(e,{default:()=>k});class r{constructor(t){this.isHover=window.matchMedia("(hover: hover)").matches,this.nearbyListEl=t.querySelector(".reg-nearby-list"),this.nearbyListElPadding=this.getNearbyListElPadding(),this.nearbyListScrollEl=t.querySelector(".reg-nearby-list-scroll"),this.placeCardElList=t.querySelectorAll(".rt-place-card"),this.leftButtonEl=t.querySelector(".reg-nearby-list-button.left"),this.leftButtonEl.addEventListener("click",this.handleLeftButtonClick.bind(this)),this.rightButtonEl=t.querySelector(".reg-nearby-list-button.right"),this.rightButtonEl.addEventListener("click",this.handleRightButtonClick.bind(this)),this.initializeResizeObserver()}remove(){var t;this.resizeObserver.disconnect(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect()}handleLeftButtonClick(){const t=this.nearbyListScrollEl.getBoundingClientRect().left;for(let e=this.placeCardElList.length-1;e>=0;--e){const i=this.placeCardElList[e].getBoundingClientRect().left;if(i<t){this.setScrollLeft(i-t+this.nearbyListScrollEl.scrollLeft-this.nearbyListElPadding);break}}}handleRightButtonClick(){const t=this.nearbyListScrollEl.getBoundingClientRect().right;for(let e=0;e<this.placeCardElList.length;++e){const i=this.placeCardElList[e].getBoundingClientRect().right;if(i>t){this.setScrollLeft(i-t+this.nearbyListScrollEl.scrollLeft+this.nearbyListElPadding);break}}}getNearbyListElPadding(){return parseFloat(getComputedStyle(this.nearbyListEl).paddingLeft)}initializeIntersectionObserver(){const t=this.placeCardElList[0],e=this.placeCardElList[this.placeCardElList.length-1];this.intersectionObserver=new IntersectionObserver((i=>{i.forEach((i=>{this.isHover&&(i.target===t&&(this.leftButtonEl.disabled=i.isIntersecting),i.target===e&&(this.rightButtonEl.disabled=i.isIntersecting))}))}),{root:this.nearbyListScrollEl,rootMargin:`0px -${this.nearbyListElPadding}px 0px -${this.nearbyListElPadding}px`,threshold:1}),this.intersectionObserver.observe(t),this.intersectionObserver.observe(e)}initializeResizeObserver(){this.resizeObserver=new ResizeObserver((()=>{var t;this.nearbyListElPadding=this.getNearbyListElPadding(),null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),this.initializeIntersectionObserver()})),this.resizeObserver.observe(this.nearbyListScrollEl)}setScrollLeft(t){this.nearbyListScrollEl.scrollTo({behavior:"smooth",left:t})}}var n=i(14300),s=i(88991),o=i(40873),a=i(24049),l=i(67294),c=i(85893);const h=980,d=320,u=768;function p(){return(0,o.rU)(h)?"desktop":(0,o.rU)(u)?"tablet":(0,o.rU)(d)?"large-phone":"phone"}function g(){const[t,e]=(0,l.useState)(p);return(0,l.useEffect)((()=>{function t(){e(p())}return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}),[]),(0,c.jsx)(s.Z,{slotDivId:`region-inline-${t}`,slotId:`/79780199/${a.sG}/Web_Region_Inline`,slotSizeMap:[[[h,0],[[970,250],[970,90],[728,90]]],[[u,0],[[728,90]]],[[d,0],[[320,50],[300,250]]],[[0,0],[[300,250]]]]},t)}var y=i(85233),v=i(45469),b=i(94184),f=i.n(b),E=i(45697),L=i.n(E),C=i(67480),w=i(45007);function x({context:t,region:e}){const i=(0,w.v9)(C.Wt),r=(0,w.v9)((t=>(0,C.uW)(t,e.id))),[n,s]=(0,l.useState)(!1),o=!!r;return(0,c.jsx)(v.Z,{className:f()("reg-trip-button",o?"danger-filled":"primary-filled"),isLoading:n,onClick:async function(){try{s(!0),o?await async function(){await rt.core.actionCreators.activeTrip.deleteWaypoint({context:t,waypointId:r.id})}():await async function(){const{display_title:i,id:r,location:n}=e;await rt.core.actionCreators.activeTrip.createWaypoint({analytics:{city:null,context:t,state:null,type:"geo"},waypoint:{end_location:n,name:i,region_id:r,start_location:n,type:"geo"}})}()}finally{s(!1)}},children:i?o?"Remove":"Add to trip":"New trip"})}x.propTypes={context:L().string.isRequired,region:L().object.isRequired};var m=i(47774),S=i(20745),R=i(5646),B=i(90811);class k extends n.Z{constructor(t){super(t),this.viewEl.querySelector(".reg-map a").addEventListener("click",this.handleMapLinkClick.bind(this)),this.context="region",this.fetchAbortController=new AbortController,this.nearbySectionList=[],this.state={regi
1on:null},this.shareButtonEl=this.viewEl.querySelector(".reg-share-button"),this.shareButtonEl.addEventListener("click",this.handleShareButtonClick.bind(this)),this.regionInlineAdRoot=(0,S.s)(this.viewEl.querySelector(".rt-ad-container")),this.tripButtonRoot=(0,S.s)(this.viewEl.querySelector(".reg-trip-button-container")),this.fetchRegion()}setState(t){this.state={...this.state,...t},this.render()}afterDomInsertion(){this.viewEl.querySelectorAll(".reg-nearby-section").forEach((t=>{this.nearbySectionList.push(new r(t))})),(0,m.U)(this.viewEl)}remove(){this.fetchAbortController.abort(),this.nearbySectionList.forEach((t=>t.remove())),this.regionInlineAdRoot.unmount(),this.tripButtonRoot.unmount(),(0,m.K)()}async handleMapLinkClick(t){const{href:e}=t.currentTarget;t.stopPropagation(),t.preventDefault(),await y.Z.ensureMap(),(0,R.a)(e)}handleShareButtonClick(){this.state.region&&(0,B.LZ)({context:this.context,region:this.state.region,shareType:"region"})}async fetchRegion(){try{const t=await fetch(`/api/v1/regions/${this.props.regionSlug}`,{signal:this.fetchAbortController.signal});if(t.ok){const e=await t.json();this.setState({region:e})}}catch(t){"AbortError"!==t.name&&console.error(t)}}render(){this.regionInlineAdRoot.render((0,c.jsx)(w.zt,{store:redux,children:(0,c.jsx)(g,{})})),this.state.region&&(this.shareButtonEl.disabled=!1,this.shareButtonEl.classList.remove("disabled"),this.tripButtonRoot.render((0,c.jsx)(w.zt,{store:redux,children:(0,c.jsx)(x,{context:this.context,region:this.state.region})})))}}},31627:(t,e,i)=>{i.d(e,{Z:()=>u});var r=i(45469),n=i(37787),s=i(96444),o=i(45697),a=i.n(o),l=i(67480),c=i(45007),h=i(67294),d=i(85893);function u({className:t="rt-place-card-add-waypoint-button",context:e,place:i,poiId:o}){var a;const u=(0,c.v9)(l.Wt),[p,g]=(0,h.useState)(!1),y=null==u||null===(a=u.waypoints.find((t=>t.poi_id===o)))||void 0===a?void 0:a.id;return(0,d.jsx)(r.Z,{className:`${t} tertiary-filled`,isDisabled:p,onClick:async function(){y?await async function(){g(!0);try{await rt.core.actionCreators.activeTrip.deleteWaypoint({context:e,waypointId:y})}finally{g(!1)}}():await async function(){g(!0);try{const t=await async function(){if(!i){const t=await fetch(`/api/v1/pois/${o}`);if(!t.ok)throw new Error(`Failed to fetch POI ${o}`);return t.json()}return i}();await rt.core.actionCreators.activeTrip.createWaypointFromPoi({context:e,insertionIndex:null,poi:{...t,city:null,state_name:null}})}finally{g(!1)}}()},size:"small",variant:"icon",children:y?(0,d.jsx)(n.Z,{}):(0,d.jsx)(s.Z,{})})}u.propTypes={className:a().string,context:a().string.isRequired,place:a().object,poiId:a().number.isRequired}},97690:(t,e,i)=>{i.d(e,{Z:()=>p});var r=i(45469),n=i(59537),s=i(38166),o=i(45697),a=i.n(o),l=i(92207),c=i(89797),h=i(45007),d=i(67294),u=i(85893);function p({className:t="rt-place-card-save-button",context:e,poiId:i}){const o=(0,h.I0)(),a=(0,h.v9)((t=>(0,c.$l)(t,i))),[p,g]=(0,d.useState)(!1);return(0,u.jsx)(r.Z,{className:`${t} tertiary-filled`,isDisabled:p,onClick:async function(){g(!0);try{a?await o((0,l.Ye)({savableId:i})):await o((0,l.zM)({savableId:i,trackAuthenticationPromptedContext:e,trackPoiSavedContext:e}))}finally{g(!1)}},size:"small",variant:"icon",children:a?(0,u.jsx)(n.Z,{}):(0,u.jsx)(s.Z,{})})}p.propTypes={className:a().string,context:a().string.isRequired,poiId:a().number.isRequired}},47774:(t,e,i)=>{i.d(e,{U:()=>h,K:()=>d});var r=i(31627),n=i(97690),s=i(20745),o=i(45007),a=i(85893);class l{constructor(t){({el:this.el}=t),this.addWaypointButtonRoot=(0,s.s)(this.el.querySelector(".rt-place-card-add-waypoint-button-container")),this.saveButtonRoot=(0,s.s)(this.el.querySelector(".rt-place-card-save-button-container")),this.render()}remove(){this.addWaypointButtonRoot.unmount(),this.saveButtonRoot.unmount()}render(){const{context:t,poiId:e}=this.el.querySelector(".rt-place-card-link").dataset,i={context:t,poiId:parseInt(e)};this.addWaypointButtonRoot.render((0,a.jsx)(o.zt,{store:redux,children:(0,a.jsx)(r.Z,{...i})})),this.saveButtonRoot.render((0,a.jsx)(o.zt,{store:redux,children:(0,a.jsx)(n.Z,{...i})}))}}let c=[];function h(t){t.querySelectorAll(".rt-place-card").forEach((t=>{c.push(new l({el:t}))}))}function d(){var t;null!==(t=c)&&void 0!==t&&t.length&&(c.forEach((t=>{t.remove()})),c=[])}},38166:(t,e,i)=>{i.d(e,{Z:()=>n});var r=i(85893);function n(){return(0,r.jsx)("svg",{className:"icon-heart-outline",height:"24",viewBox:"0 0 24 24",width:"24",children:(0,r.jsx)("path",{d:"M11.5882 4.31595L12.0698 4.83667L12.5906 4.31681C14.0443 2.9 16.0577 2.25516 18.0365 2.58452C21.0264 3.08269 23.2178 5.66984 23.2178 8.70309V8.95477C23.2178 10.7556 22.4714 12.4784 21.1522 13.7064L13.3109 21.027C12.9854 21.3308 12.5558 21.5 12.1089 21.5C11.6619 21.5 11.2323 21.3308 10.9069 21.027L3.06512 13.7064C1.74768 12.4784 1 10.7556 1 8.95477V8.70309C1 5.66984 3.19227 3.08269 6.18125 2.58452C8.12097 2.25516 10.1735 2.9 11.5882 4.31595C11.5882 4.31595 11.5491 4.31595 11.5882 4.31595ZM12.0698 7.78313L10.1171 5.75229C9.17544 4.84882 7.83891 4.42009 6.52407 4.6388C4.53879 4.96989 3.08292 6.6896 3.08292 8.70309V8.95477C3.08292 10.1785 3.59106 11.3501 4.48628 12.1833L12.1089 19.2999L19.7332 12.1833C20.6271 11.3501 21.1349 10.1785 21.1349 8.95477V8.70309C21.1349 6.6896 19.6768 4.96989 17.6937 4.6388C16.3789 4.42009 15.0423 4.84882 14.1007 5.75229L12.0698 7.78313Z"})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.