1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[842],{295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=r(2687)._(r(4232)),a=r(6581),l=[],o=[],s=!1;function i(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function u(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),l=null;function i(){if(!l){let t=new d(e,r);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()}if(!s){let e=r.webpack&&1?r.webpack():r.modules;e&&o.push(t=>{for(let r of e)if(t.includes(r))return i()})}function u(e,t){i();let o=n.default.useContext(a.LoadableContext);o&&Array.isArray(r.modules)&&r.modules.forEach(e=>{o(e)});let s=n.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:l.retry}),[]),n.default.useMemo(()=>{var t;return s.loading||s.error?n.default.createElement(r.loading,{isLoading:s.loading,pastDelay:s.pastDelay,timedOut:s.timedOut,error:s.error,retry:l.retry}):s.loaded?n.default.createElement((t=s.loaded)&&t.default?t.default:t,e):null},[e,s])}return u.preload=()=>i(),u.displayName="LoadableComponent",n.default.forwardRef(u)}(i,e)}function c(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return c(e,t)})}u.preloadAll=()=>new Promise((e,t)=>{c(l).then(e,t)}),u.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let r=()=>(s=!0,t());c(o,e).then(r,r)})),window.__NEXT_PRELOADREADY=u.preloadReady;let f=u},1765:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(7876),a=r(8847),l=r.n(a),o=r(4943),s=r(9099),i=r(7231),d=r(7501);r(4232);var u=r(9423);let c=()=>(0,n.jsxs)("svg",{className:"animate-spin h-12 w-12 text-primary",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});function f(){let e=(0,s.useRouter)(),{id:t}=e.query,a="ES"===(0,u.UK)(e.query).code,f=l()(()=>Promise.all([r.e(213),r.e(395)]).then(r.bind(r,5395)),{loadableGenerated:{webpack:()=>[5395]},loading:()=>(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-screen bg-background text-foreground",children:[(0,n.jsx)(c,{}),(0,n.jsx)("h2",{className:"text-2xl font-bold mt-6",children:a?"Preparando el visor...":"Preparing the viewer..."}),(0,n.jsx)("p",{className:"text-foreground/80 mt-2",children:a?"Cargando la interfaz del PDF.":"Loading the PDF interface."})]}),ssr:!1}),{data:h,isLoading:m,isFetching:p,isError:x,error:b}=(0,o.af)(t,{skip:!t});if(!t&&!m)return(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-screen bg-background text-center p-4",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold text-red-500",children:a?"Itinerario no encontrado":"Itinerary not found"}
1),(0,n.jsx)("p",{className:"text-foreground/80 mt-2",children:a?"El enlace parece estar incompleto. Por favor, verifica la URL.":"The link seems to be incomplete. Please check the URL."})]});if(m||p)return(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-screen bg-background",children:[(0,n.jsx)(c,{}),(0,n.jsx)("h2",{className:"text-2xl font-bold text-foreground mt-6",children:a?"Preparando tu itinerario...":"Preparing your itinerary..."}),(0,n.jsx)("p",{className:"text-foreground/80 mt-2 text-center",children:a?"Recopilando tus selecciones. \xa1Un momento, por favor!":"Gathering your selections. Just a moment, please!"})]});if(x)return console.error("Error fetching itinerary:",b),(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-screen bg-background text-center p-4",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold text-red-500",children:a?"\xa1Ups! Algo sali\xf3 mal":"Oops! Something went wrong"}),(0,n.jsx)("p",{className:"text-foreground/80 mt-2",children:a?"No pudimos cargar tu itinerario. Intenta refrescar la p\xe1gina.":"We couldn't load your itinerary. Please try refreshing the page."})]});try{let e=JSON.parse(h.result[0].ItinerarioJSON),r=(0,n.jsx)(i.A,{data:e});if(Object.values(e).every(e=>Array.isArray(e)&&0===e.length))return(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-screen bg-background text-center p-4",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold text-secondary",children:a?"Tu itinerario est\xe1 vac\xedo":"Your itinerary is empty"}),(0,n.jsx)("p",{className:"text-foreground/80 mt-2",children:a?"A\xfan no has agregado favoritos. \xa1Comienza a explorar y planificar tu viaje!":"You haven't added any favorites yet. Start exploring and planning your trip!"})]});return(0,n.jsx)("div",{className:"h-screen w-full bg-background",children:window.innerWidth<1024?(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-full text-center p-8",children:[(0,n.jsx)("svg",{className:"w-24 h-24 text-secondary mb-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,n.jsx)("h2",{className:"text-3xl font-bold text-foreground",children:a?"Tu Itinerario Est\xe1 Listo":"Your Itinerary is Ready"}),(0,n.jsx)("p",{className:"text-foreground/80 mt-2 mb-8",children:a?"Haz clic en el bot\xf3n para ver o descargar tu PDF.":"Click the button to view or download your PDF."}),(0,n.jsx)(d.XP,{document:r,fileName:"Itinerario-Tucuman-".concat(t,".pdf"),children:e=>{let{blob:t,url:r,loading:l,error:o}=e;return(0,n.jsx)("button",{onClick:()=>{r&&window.open(r,"_blank")},disabled:l||o,className:"px-8 py-3 bg-primary text-white font-bold rounded-lg shadow-lg hover:bg-primary/90 transition-transform transform hover:scale-105 disabled:bg-gray-400",children:l?a?"Generando...":"Generating...":o?a?"Error, intente de nuevo":"Error, please try again":a?"Abrir Itinerario":"Open Itinerary"})}})]}):(0,n.jsx)(f,{data:e})})}catch(e){return console.error("Error processing itinerary data:",e),(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center h-screen bg-background text-center p-4",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold text-red-500",children:a?"Error en los datos":"Data error"}),(0,n.jsx)("p",{className:"text-foreground/80 mt-2",children:a?"Recibimos la informaci\xf3n de tu itinerario, pero tiene un formato incorrecto.":"We received your itinerary information, but it is in an incorrect format."})]})}}f.getLayout=function(e){return e}},2496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return s},noSSR:function(){return o}});let n=r(2687);r(7876),r(4232);let a=n._(r(295));function l(e){return{default:(null==e?void 0:e.default)||e}}function o(e,t){return delete t.webpack,delete t.modules,e(t)}function s(e,t){let r=a.default,n={loading:e=>{let{error:t,isLoading:r,pastDelay:n}=e;return null}};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let s=(n={...n,...t}).loader;return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:()=>null!=s?s().then(l):Promise.resolve(l(()=>null))}):(delete n.webpack,delete n.modules,o(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6581:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=r(2687)._(r(4232)).default.createContext(null)},7106:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/itinerario",function(){return r(1765)}])},8847:(e,t,r)=>{e.exports=r(2496)}},e=>{e.O(0,[155,591,5,214,341,176,231,636,593,792],()=>e(e.s=7106)),_N_E=e.O()}]);
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.