PageSourceSearch

https://travelpal.ai/_next/static/chunks/013ccaoai2i_q.js?dpl=dpl_2XmuBcuLVsN7H7zxMC7MxroQPy8Q

js travelpal.ai collected 2026-10-02 13:16:08 UTC 30,307 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="7d121194-3e73-45aa-c0c0-fe32d01c84c7")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,869230,286491,673664,427001,381384,254440,469637,e=>{"use strict";let t;var r=e.i(175555),i=e.i(540143);e.i(247167);var s=e.i(619273),a=e.i(936553),n=e.i(88587),o=class extends n.Removable{#e;#t;#r;#i;#s;#a;#n;constructor(e){super(),this.#n=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=c(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=c(this.options);void 0!==e.data&&(this.setState(u(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#r.remove(this)}setData(e,t){let r=(0,s.replaceData)(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(s.noop).catch(s.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>!1!==(0,s.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===s.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,s.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,s.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#n?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){let r;if("idle"!==this.state.fetchStatus&&this.#s?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let i=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#n=!0,i.signal)})},o=()=>{let e,r=(0,s.ensureQueryFn)(this.options,t),i=(n(e={client:this.#i,queryKey:this.queryKey,meta:this.meta}),e);return(this.#n=!1,this.options.persister)?this.options.persister(r,i,this):r(i)},l=(n(r={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o}),r);this.options.behavior?.onFetch(l,this),this.#t=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#o({type:"fetch",meta:l.fetchOptions?.meta}),this.#s=(0,a.createRetryer)({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:e=>{e instanceof a.CancelledError&&e.revert&&this.setState({...this.#t,fetchStatus:"idle"}),i.abort()},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{let e=await this.#s.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof a.CancelledError){if(e.silent)return this.#s.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#o({type:"error",error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#o(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...l(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...u(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":let i=e.error;
2return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),i.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function l(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function u(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function c(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,i=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,o,"fetchState",0,l],286491);var d=e.i(915823),h=e.i(793803),p=e.i(180166),f=class extends d.Subscribable{constructor(e,t){super(),this.options=t,this.#i=e,this.#l=null,this.#u=(0,h.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#i;#c=void 0;#d=void 0;#h=void 0;#p;#f;#u;#l;#m;#y;#v;#g;#b;#R;#S=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#c.addObserver(this),m(this.#c,this.options)?this.#I():this.updateResult(),this.#P())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return y(this.#c,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return y(this.#c,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#C(),this.#D(),this.#c.removeObserver(this)}setOptions(e){let t=this.options,r=this.#c;if(this.options=this.#i.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,s.resolveEnabled)(this.options.enabled,this.#c))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#c.setOptions(this.options),t._defaulted&&!(0,s.shallowEqualObjects)(this.options,t)&&this.#i.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#c,observer:this});let i=this.hasListeners();i&&v(this.#c,r,this.options,t)&&this.#I(),this.updateResult(),i&&(this.#c!==r||(0,s.resolveEnabled)(this.options.enabled,this.#c)!==(0,s.resolveEnabled)(t.enabled,this.#c)||(0,s.resolveStaleTime)(this.options.staleTime,this.#c)!==(0,s.resolveStaleTime)(t.staleTime,this.#c))&&this.#T();let a=this.#E();i&&(this.#c!==r||(0,s.resolveEnabled)(this.options.enabled,this.#c)!==(0,s.resolveEnabled)(t.enabled,this.#c)||a!==this.#R)&&this.#Q(a)}getOptimisticResult(e){var t,r;let i=this.#i.getQueryCache().build(this.#i,e),a=this.createResult(i,e);return t=this,r=a,(0,s.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#h=a,this.#f=this.options,this.#p=this.#c.state),a}getCurrentResult(){return this.#h}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#u.status||this.#u.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#S.add(e)}getCurrentQuery(){return this.#c}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#i.defaultQueryOptions(e),r=this.#i.getQueryCache().build(this.#i,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#I({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#h))}#I(e){this.#O();let t=this.#c.fetch(this.options,e);return e?.throwOnError||(t=t.catch(s.noop)),t}#T(){this.#C();let e=(0,s.resolveStaleTime)(this.options.staleTime,this.#c);if(s.isServer||this.#h.isStale||!(0,s.isValidTimeout)(e))return;let t=(0,s.timeUntilStale)(this.#h.dataUpdatedAt,e);this.#g=p.timeoutManager.setTimeout(()=>{this.#h.isStale||this.updateResult()},t+1)}#E(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#c):this.options.refetchInterval)??!1}#Q(e){this.#D(),this.#R=e,!s.isServer&&!1!==(0,s.resolveEnabled)(this.options.enabled,this.#c)&&(0,s.isValidTimeout)(this.#R)&&0!==this.#R&&(this.#b=p.timeoutManager.setInterval(()=>
2{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#I()},this.#R))}#P(){this.#T(),this.#Q(this.#E())}#C(){this.#g&&(p.timeoutManager.clearTimeout(this.#g),this.#g=void 0)}#D(){this.#b&&(p.timeoutManager.clearInterval(this.#b),this.#b=void 0)}createResult(e,t){let r,i=this.#c,a=this.options,n=this.#h,o=this.#p,u=this.#f,c=e!==i?e.state:this.#d,{state:d}=e,p={...d},f=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&m(e,t),n=r&&v(e,i,t,a);(s||n)&&(p={...p,...l(d.data,e.options)}),"isRestoring"===t._optimisticResults&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:R}=p;r=p.data;let S=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===R){let e;n?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(e=n.data,S=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#v?.state.data,this.#v):t.placeholderData,void 0!==e&&(R="success",r=(0,s.replaceData)(n?.data,e,t),f=!0)}if(t.select&&void 0!==r&&!S)if(n&&r===o?.data&&t.select===this.#m)r=this.#y;else try{this.#m=t.select,r=t.select(r),r=(0,s.replaceData)(n?.data,r,t),this.#y=r,this.#l=null}catch(e){this.#l=e}this.#l&&(y=this.#l,r=this.#y,b=Date.now(),R="error");let I="fetching"===p.fetchStatus,P="pending"===R,C="error"===R,D=P&&I,O=void 0!==r,T={status:R,fetchStatus:p.fetchStatus,isPending:P,isSuccess:"success"===R,isError:C,isInitialLoading:D,isLoading:D,data:r,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>c.dataUpdateCount||p.errorUpdateCount>c.errorUpdateCount,isFetching:I,isRefetching:I&&!P,isLoadingError:C&&!O,isPaused:"paused"===p.fetchStatus,isPlaceholderData:f,isRefetchError:C&&O,isStale:g(e,t),refetch:this.refetch,promise:this.#u,isEnabled:!1!==(0,s.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==T.data,r="error"===T.status&&!t,s=e=>{r?e.reject(T.error):t&&e.resolve(T.data)},a=()=>{s(this.#u=T.promise=(0,h.pendingThenable)())},n=this.#u;switch(n.status){case"pending":e.queryHash===i.queryHash&&s(n);break;case"fulfilled":(r||T.data!==n.value)&&a();break;case"rejected":r&&T.error===n.reason||a()}}return T}updateResult(){let e=this.#h,t=this.createResult(this.#c,this.options);if(this.#p=this.#c.state,this.#f=this.options,void 0!==this.#p.data&&(this.#v=this.#c),(0,s.shallowEqualObjects)(t,e))return;this.#h=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#S.size)return!0;let i=new Set(r??this.#S);return this.options.throwOnError&&i.add("error"),Object.keys(this.#h).some(t=>this.#h[t]!==e[t]&&i.has(t))};this.#w({listeners:r()})}#O(){let e=this.#i.getQueryCache().build(this.#i,this.options);if(e===this.#c)return;let t=this.#c;this.#c=e,this.#d=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#P()}#w(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#h)}),this.#i.getQueryCache().notify({query:this.#c,type:"observerResultsUpdated"})})}};function m(e,t){return!1!==(0,s.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&y(e,t,t.refetchOnMount)}function y(e,t,r){if(!1!==(0,s.resolveEnabled)(t.enabled,e)&&"static"!==(0,s.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof r?r(e):r;return"always"===i||!1!==i&&g(e,t)}return!1}function v(e,t,r,i){return(e!==t||!1===(0,s.resolveEnabled)(i.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&g(e,r)}function g(e,t){return!1!==(0,s.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,s.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,f],869230);var b=e.i(271645),R=e.i(912598);e.i(843476);var S=b.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),I=()=>b.useContext(S);e.s(["useQueryErrorResetBoundary",0,I],673664);var P=(e,t,r)=>{let i=r?.state.error&&"function"==typeof e.throwOnError?(0,s.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&!t.isReset()&&(e.retryOn
2Mount=!1)},C=e=>{b.useEffect(()=>{e.clearReset()},[e])},D=({result:e,errorResetBoundary:t,throwOnError:r,query:i,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(a&&void 0===e.data||(0,s.shouldThrowError)(r,[e.error,i]));e.s(["ensurePreventErrorBoundaryRetry",0,P,"getHasError",0,D,"useClearResetErrorBoundary",0,C],427001);var O=b.createContext(!1),T=()=>b.useContext(O);O.Provider,e.s(["useIsRestoring",0,T],381384);var E=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},Q=(e,t)=>e.isLoading&&e.isFetching&&!t,w=(e,t)=>e?.suspense&&t.isPending,M=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});e.s(["ensureSuspenseTimers",0,E,"fetchOptimistic",0,M,"shouldSuspend",0,w,"willFetch",0,Q],254440),e.s(["useBaseQuery",0,function(e,t,r){let a=T(),n=I(),o=(0,R.useQueryClient)(r),l=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(l);let u=o.getQueryCache().get(l.queryHash);l._optimisticResults=a?"isRestoring":"optimistic",E(l),P(l,n,u),C(n);let c=!o.getQueryCache().get(l.queryHash),[d]=b.useState(()=>new t(o,l)),h=d.getOptimisticResult(l),p=!a&&!1!==e.subscribed;if(b.useSyncExternalStore(b.useCallback(e=>{let t=p?d.subscribe(i.notifyManager.batchCalls(e)):s.noop;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),b.useEffect(()=>{d.setOptions(l)},[l,d]),w(l,h))throw M(l,d,n);if(D({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw h.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(l,h),l.experimental_prefetchInRender&&!s.isServer&&Q(h,a)){let e=c?M(l,d,n):u?.promise;e?.catch(s.noop).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?h:d.trackResult(h)}],469637)},266027,e=>{"use strict";var t=e.i(869230),r=e.i(469637);e.s(["useQuery",0,function(e,i){return(0,r.useBaseQuery)(e,t.QueryObserver,i)}])},995663,e=>{"use strict";var t=e.i(806344);let r={viewport:"desktop",mobileActivePanel:"chat",rightPanels:["inspiration"],activeRightPanel:"inspiration",rightSplitRatio:.5,overlay:null,placeId:null,hasItineraryUpdate:!1,previousRightPanels:null};function i(e){let t=Array.from(new Set(e)),r=t.length>1?t.filter(e=>"inspiration"!==e):t;if(0===r.length)return["inspiration"];let i=r.slice(-2);return 1===i.length?[i[0]]:[i[0],i[1]]}function s(e,t){return t&&e.includes(t)?t:e[e.length-1]}function a(e,t,r){if("mobile"===e.viewport)return{...e,mobileActivePanel:t};let a="append"===r?i([...e.rightPanels,t]):i([t]);return{...e,rightPanels:a,activeRightPanel:s(a,t),placeId:"place"!==t&&"replace"===r?null:e.placeId}}let n=(0,t.create)()(e=>({...r,reset:()=>e(r),setViewport:t=>e(e=>e.viewport===t?e:"mobile"===t?{...e,viewport:t,mobileActivePanel:"chat"}:"chat"===e.mobileActivePanel?{...e,viewport:t}:e.rightPanels.includes(e.mobileActivePanel)?{...e,viewport:t,activeRightPanel:e.mobileActivePanel}:{...e,viewport:t,rightPanels:[e.mobileActivePanel],activeRightPanel:e.mobileActivePanel}),openChat:()=>e(e=>"desktop"===e.viewport?e:{...e,mobileActivePanel:"chat"}),openRightPanel:(t,r)=>e(e=>a(e,t,r?.mode??"replace")),openInspiration:()=>e(e=>a(e,"inspiration","replace")),openMap:t=>e(e=>a(e,"map",t?.mode??"replace")),openItinerary:t=>e(e=>({...a(e,"itinerary",t?.mode??"replace"),hasItineraryUpdate:!1})),openNotes:t=>e(e=>a(e,"notes",t?.mode??"replace")),openConcierge:t=>e(e=>a(e,"concierge",t?.mode??"replace")),openPlace:(t,r)=>e(e=>({...a(e,"place",r?.mode??"replace"),placeId:t,previousRightPanels:e.rightPanels.includes("place")?e.previousRightPanels:e.rightPanels})),closeRightPanel:t=>e(e=>{if("mobile"===e.viewport)return{...e,mobileActivePanel:e.mobileActivePanel===t?"chat":e.mobileActivePanel,placeId:"place"===t?null:e.placeId,previousRightPanels:"place"===t?null:e.previousRightPanels};let r="place"===t&&e.previousRightPanels?e.previousRightPanels:i(e.rightPanels.filter(e=>e!==t));return{...e,rightPanels:r,activeRightPanel:s(r),placeId:"place"===t?null:e.placeId,previousRightPanels:"place"===t?null:e.previousRightPanels}}),openMapItinerarySplit:(t="map")=>e(e=>"mobile"===e.viewport?{...e,mobileActivePanel:t}:{...e,rightPanels:["itinerary","map"],activeRightPanel:t}),setActiveRightPanel:t=>e(e=>e.rightPanels.includes(t)?{...e,activeRightPanel:t}:e),setRightSplitRatio:t=>e(e=>({...e,rightSplitRatio:Math.max(.15,Math.min(.85,t))})),setHasItineraryUpdate:t=>e({hasItineraryUpdate:t}),openTailoring:()=>e(e=>({...e,overlay:"tailoring"})),closeTailoring:()=>e(e=>({...e,overlay:null}))}));e.s(["usePanelsStore",0,n])},546249,e=>{"use strict";var t=e.i(271645);let r={value:"",lastOp:"init",version:0},i=new Set,s=new Set,a=-1,n=e=>(s.add(e),()=>{s.delete(e)}),o=(e,t)=>{queueMicrotask(()=>s.forEach(r=>r(e,t)))};function l(e,t){r={value:e,lastOp:t?.send?"send-set":"set",version:r.version+1,metadata:t?.metadata??null}
2,i.forEach(e=>e()),t?.send&&o(e,t?.metadata)}e.s(["useOnSharedTextSend",0,function(e){let i=(0,t.useRef)(e);(0,t.useEffect)(()=>{i.current=e},[e]),(0,t.useEffect)(()=>{let e=n((e,t)=>{r.version!==a&&(a=r.version,i.current(e,t))});if("send-set"===r.lastOp&&r.value&&r.version!==a){a=r.version;let{value:e,metadata:t}=r;queueMicrotask(()=>i.current(e,t))}return e},[])},"useSharedText",0,function(){let{value:e,lastOp:s}=(0,t.useSyncExternalStore)(e=>(i.add(e),()=>{i.delete(e)}),()=>r,()=>r);return{value:e,lastOp:s,shouldPopulate:!!e&&"send-set"!==s,set:l,clear:()=>{r={value:"",lastOp:"clear",version:r.version+1},i.forEach(e=>e())},send:()=>o(r.value,r.metadata),onSendSubscribe:n}}])},482999,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(806344),s=e.i(78333),a=e.i(579473),n=e.i(408155),o=e.i(491618);let l=(0,r.createContext)(null);e.s(["ChatPageStoreProvider",0,function({children:e,initialState:i}){let u=(0,r.useRef)(null);return u.current||(u.current=(0,n.createStore)()((0,a.devtools)((0,a.persist)((e,t)=>({title:i?.title??"New Chat",locations:i?.locations??[],dateRange:i?.dateRange??null,people:i?.people??null,isItineraryView:!1,activeDay:null,openedDays:[],activeItem:null,openedItem:null,placeStack:[],streamedActiveDestinations:[],streamedMentionedPlaces:[],hoveredMentionId:null,activeMentionId:null,loading:null,pendingDays:[],setTitle:t=>e(()=>({title:t})),appendLocation:t=>e(e=>({locations:[...e.locations.filter(e=>e.id!==t.id),t]})),removeLocation:t=>e(e=>({locations:e.locations.filter(e=>e.id!==t),dateRange:e.dateRange&&e.dateRange.location_id===t?null:e.dateRange})),findLocation:e=>t().locations.find(t=>t.id===e),setDateRange:t=>e(()=>({dateRange:t})),setPeople:t=>e(()=>({people:t})),setActiveDay:t=>e(()=>({activeDay:t})),setActiveItem:t=>e(()=>({activeItem:t})),setOpenedItem:t=>e(()=>({openedItem:t,placeStack:t?[t]:[]})),pushPlace:t=>e(e=>({openedItem:t,placeStack:[...e.placeStack,t]})),popPlace:()=>e(e=>{let t=e.placeStack.slice(0,-1);return{placeStack:t,openedItem:t[t.length-1]??null}}),setStreamedActiveDestinations:t=>e(()=>({streamedActiveDestinations:t})),setStreamedMentionedPlaces:t=>e(e=>{if(!t||0===t.length)return e;let r=new Set;for(let t of e.streamedMentionedPlaces)t?.id!=null&&r.add(Number(t.id));let i=[...e.streamedMentionedPlaces];for(let e of t){if(e?.id==null)continue;let t=Number(e.id);r.has(t)||(r.add(t),i.push(e))}return i.length===e.streamedMentionedPlaces.length?e:{streamedMentionedPlaces:i}}),appendStreamedMentionedPlace:t=>e(e=>e.streamedMentionedPlaces.find(e=>null!=e.id&&e.id===t.id)?e:{streamedMentionedPlaces:[...e.streamedMentionedPlaces,t]}),resetStreamedMentions:()=>e(()=>({streamedActiveDestinations:[],streamedMentionedPlaces:[]})),setHoveredMentionId:t=>e(e=>e.hoveredMentionId===t?e:{hoveredMentionId:t}),clearHoveredMentionId:()=>e(e=>null===e.hoveredMentionId?e:{hoveredMentionId:null}),setActiveMentionId:t=>e(e=>e.activeMentionId===t?e:{activeMentionId:t}),clearActiveMentionId:()=>e(e=>null===e.activeMentionId?e:{activeMentionId:null}),toggleOpenedDate:t=>e(e=>null==t?e:{openedDays:e.openedDays.includes(t)?e.openedDays.filter(e=>e!==t):[...e.openedDays,t]}),openAllDates:t=>e(()=>({openedDays:t})),resetOpenedDates:()=>e(()=>({openedDays:[]})),setIsItineraryView:t=>e(()=>({isItineraryView:t}
2)),setLoading:(t,r)=>e(()=>({loading:{status:t,date:r}})),setHoveredItem:(0,s.default)(t=>{e(()=>({activeItem:t}))},100),clearHoveredItem:()=>e(()=>({activeItem:null})),addPendingDay:t=>e(e=>({pendingDays:[...e.pendingDays,t]})),removePendingDay:t=>e(e=>({pendingDays:e.pendingDays.filter(e=>e!==t)})),reset:()=>e(()=>({title:i?.title??"New Chat",locations:[],dateRange:null,people:null,isItineraryView:!1,activeDay:null,openedDays:[],activeItem:null,loading:null,pendingDays:[],hoveredMentionId:null,activeMentionId:null,streamedActiveDestinations:[],streamedMentionedPlaces:[],placeStack:[]}))}),{name:"chat@page",storage:(0,a.createJSONStorage)(()=>(0,o.persistedStorage)("session")),version:1})))),(0,t.jsx)(l.Provider,{value:u.current,children:e})},"useChatPageStore",0,function(e){let t=(0,r.useContext)(l);if(!t)throw Error("useChatPageStore must be used within ChatPageStoreProvider");return(0,i.useStore)(t,e)},"useChatPageStoreApi",0,function(){let e=(0,r.useContext)(l);if(!e)throw Error("useChatPageStoreApi must be used within ChatPageStoreProvider");return e}],482999)},626611,e=>{"use strict";function t(e,t){return`${e}:${t}`}e.s(["indexSegmentsByPlacePair",0,function(e){let r=new Map;for(let i of e??[])r.set(t(i.originPlaceId,i.destinationPlaceId),i);return r},"isNoRouteError",0,function(e){return"object"==typeof e&&null!==e&&"status"in e&&422===e.status},"isRenderableSegment",0,function(e){return!!e&&"unavailable"!==e.status&&!!e.distanceM&&!!e.polyline},"segmentPairKey",0,t])},280884,e=>{"use strict";e.s(["getItemPlaceId",0,function(e){return null!=e.placeId?e.placeId:"number"==typeof e.place?e.place:e.place?.id??null}])},183815,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(806344),s=e.i(408155);let a={tripId:null,tripTitle:null,trip:null,days:[],ideas:[],places:{},isStreaming:!1,streamingDayNumber:null,isHydrated:!1},n=(0,r.createContext)(null);
2e.s(["TripStoreProvider",0,function({children:e,initialTripData:i}){let o=(0,r.useRef)(null);return!o.current&&(o.current=(0,s.createStore)()((e,t)=>({...a,hydrate:t=>{if(!t)return void e({...a,isHydrated:!0});let{days:r,ideas:i,...s}=t;e({tripId:t.id,trip:s,days:r??[],ideas:i??[],isHydrated:!0,isStreaming:!1,streamingDayNumber:null})},clear:()=>e({...a}),setTripId:t=>e({tripId:t}),setDays:t=>e({days:t}),removeDay:t=>e(e=>({days:e.days.filter(e=>e.id!==Number(t))})),removeItem:t=>e(e=>({days:e.days.map(e=>({...e,items:e.items.filter(e=>e.id!==Number(t))})),ideas:e.ideas.filter(e=>e.id!==Number(t))})),setItemBooked:(t,r)=>e(e=>{let i=Number(t);return{days:e.days.map(e=>({...e,items:e.items.map(e=>e.id===i?{...e,isBooked:r}:e)})),ideas:e.ideas.map(e=>e.id===i?{...e,isBooked:r}:e)}}),addIdea:t=>e(e=>e.ideas.some(e=>e.id===t.id)?e:{ideas:[t,...e.ideas]}),removeIdea:t=>e(e=>({ideas:e.ideas.filter(e=>e.id!==Number(t))})),hasIdeaForPlace:e=>{let r=Number(e);return t().ideas.some(e=>{if(e.placeId===r)return!0;let t=e.place;return"object"==typeof t&&null!==t&&t.id===r})},getIdeaForPlace:e=>{let r=Number(e);return t().ideas.find(e=>{if(e.placeId===r)return!0;let t=e.place;return"object"==typeof t&&null!==t&&t.id===r})},getIdeaForViator:e=>{if(e)return t().ideas.find(t=>t.viatorDetail?.viatorProductCode===e)},setTripListing:({isListed:t,slug:r,publishedAt:i})=>e(e=>e.trip?{trip:{...e.trip,isListed:t,...void 0!==r?{slug:r}:{},...void 0!==i?{publishedAt:i}:{}}}:e),reset:()=>e({...a}),startStreaming:()=>e({isStreaming:!0,streamingDayNumber:null}),endStreaming:()=>e({isStreaming:!1,streamingDayNumber:null}),onTripCreated:({trip_id:t,title:r})=>{e({tripId:t,tripTitle:r,trip:null,days:[],isStreaming:!0,streamingDayNumber:null})},onDayAdded:({day_id:t,day_number:r,title:i,trip_id:s})=>{e(e=>e.days.some(e=>e.id===t)?e:{days:[...e.days,{id:t,tripId:s,dayNumber:r,date:null,title:i,items:[]}].sort((e,t)=>e.dayNumber-t.dayNumber),streamingDayNumber:r})},onDayRemoved:({day_id:e})=>{t().removeDay(e)},onItemAdded:({item_id:t,day_id:r,day_number:i,trip_id:s,item_type:a,title:n,place_id:o,start_time:l,end_time:u})=>{e(e=>{let c={id:t,tripDayId:r,type:(e=>{if(!e)return"activity";let t=e.toLowerCase();return["place","activity","accommodation","transport","food","food_and_drink","attraction","entertainment","shopping"].includes(t)?t:"activity"})(a),title:n,placeId:o??void 0,place:o?{id:o,name:n,canonicalPath:"",type:a}:void 0,startTime:l??null,endTime:u??null},d=e.days.findIndex(e=>e.id===r);if(-1===d){let t={id:r,tripId:s,dayNumber:i,date:null,title:`Day ${i}`,items:[c]};return{days:[...e.days,t].sort((e,t)=>e.dayNumber-t.dayNumber)}}let h=[...e.days];return h[d]={...h[d],items:[...h[d].items,c]},{days:h}})},onItemRemoved:({item_id:e})=>{t().removeItem(e)},setPlace:(t,r)=>e(e=>({places:{...e.places,[t]:r}})),getPlace:e=>t().places[e],getDay:e=>t().days.find(t=>t.dayNumber===e),getItem:e=>{for(let r of t().days){let t=r.items.find(t=>t.id===e);if(t)return t}},getDayItems:e=>{let r=t().days.find(t=>t.dayNumber===e);return r?.items??[]}})),i&&o.current.getState().hydrate(i)),(0,t.jsx)(n.Provider,{value:o.current,children:e})},"useTripStore",0,function(e){let t=(0,r.useContext)(n);if(!t)throw Error("useTripStore must be used within a TripStoreProvider");return(0,i.useStore)(t,e)},"useTripStoreApi",0,function(){let e=(0,r.useContext)(n);if(!e)throw Error("useTripStoreApi must be used within a TripStoreProvider");return e}],183815)},74069,e=>{"use strict";var t=e.i(266027),r=e.i(626611),i=e.i(303071);e.s(["useDayRoute",0,function(e,s){let{trips:a}=(0,i.useApi)();return(0,t.useQuery)({queryKey:["day-route",e,s],queryFn:()=>a.getDayRoute(e,s),enabled:null!=e&&null!=s,staleTime:6e4,refetchInterval:e=>{let t=e.state.data?.status;return"partial"===t?1e3:"degraded"===t&&3e4},retry:(e,t)=>!(0,r.isNoRouteError)(t)&&e<2})}])},926831,527657,e=>{"use strict";var t=e.i(954616),r=e.i(271645),i=e.i(303071),s=e.i(975006),a=e.i(994336);let n=new a.default("item.remove");e.s(["useRemoveItem",0,function(e){let{trips:a}=(0,i.useApi)(),o=(0,r.useRef)(e);o.current=e;let l=(0,t.useMutation)({mutationFn:async e=>{if(!e)throw Error("Item ID is required");return a.removeItem(e)},onMutate:e=>{n.info("Optimistically removing item",{itemId:e}),o.current?.onOptimisticRemove?.(e)},onSuccess:()=>{n.info("Item removed successfully"),(0,s.default)({message:"Experience removed successfully",type:"success"}),o.current?.onSuccess?.()},onError:e=>{n.error("Failed to remove item",e),(0,s.default)({message:"Failed to remove experience. Please try again.",type:"error"}),o.current?.onError?.(e)}});return{removeItem:l.mutate,removeItemAsync:l.mutateAsync,isLoading:l.isPending,error:l.error}}],926831);var o=e.i(912598);let l=new a.default("item.setBooked");e.s(["useSetItemBooked",0,function(e){let{trips:r}=(0,i.useApi)(),a=(0,o.useQueryClient)(),n=(0,t.useMutation)({mutationFn:async({itemId:e,isBooked:t})=>{if(!e)throw Error("Item ID is required");return r.setItemBooked(e,t)},onSuccess:t=>{let r=t.isBooked?"Experience marked as booked":"Experience unmarked as booked";l.info(r,{itemId:t.id,isBooked:t.isBooked}),(0,s.default)({message:r,type:"success"});let i=e=>e.id===t.id?{...e,isBooked:t.isBooked}:e;a.setQueriesData({queryKey:["trip"]},e=>e?{...e,days:e.days?.map(e=>({...e,items:e.items.map(i)})),ideas:e.ideas?.map(i)}:e),e?.onSuccess?.(t)},onError:t=>{l.error("Failed to update booked status",t),(0,s.default)({message:"Failed to update booked status. Please try again.",type:"error"}),e?.onError?.(t)}});return{setItemBooked:n.mutate,setItemBookedAsync:n.mutateAsync,isLoading:n.isPending,error:n.error,data:n.data}}
2],527657)}]);
3
4//# debugId=7d121194-3e73-45aa-c0c0-fe32d01c84c7

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.