1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="49c4aa66-b912-4851-ad3a-5e470cbd0ace",e._sentryDebugIdIdentifier="sentry-dbid-49c4aa66-b912-4851-ad3a-5e470cbd0ace")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[491],{10491:(e,t,l)=>{l.r(t),l.d(t,{default:()=>N});var a=l(37876),i=l(56557),n=l.n(i),d=l(35527),s=l.n(d),c=l(14232),o=l(6155),r=l(39853),u=l(48815),g=l.n(u),m=l(18847),p=l.n(m),h=l(91040),v=l(18190),y=l(94229),S=l(17464),_=l(86144),b=l(75423),f=l(14e3);let x=p()(()=>Promise.resolve().then(l.bind(l,92679)),{loadableGenerated:{webpack:()=>[92679]},ssr:!1});n().extend(s());let N=e=>{var t,l,i,d,s;let{companyGuid:u,guideDetails:m}=e,[p,N]=(0,c.useState)(null),[w,C]=(0,c.useState)(null),[j,k]=(0,c.useState)(!1),[D,M]=(0,c.useState)(!1),B=(0,c.useContext)(o.A),[T,Y]=(0,c.useState)({}),G=(0,c.useContext)(r.A),q=(0,f.useRouter)(),{postCart:H}=(0,b.A)(m),A=null==(t=window)?void 0:t.navigator.userAgent.toLowerCase(),I=null==(l=window)?void 0:l.navigator.platform.toLowerCase(),P=A&&(null==A?void 0:A.match(/ip(?:ad|od|hone)/))?"ios":((null==A?void 0:A.match(/(?:webos|android)/))||(null==I?void 0:I.match(/mac|win|linux/))||["other"])[0],E=/ios/.test(P),{guestCount:R,selectedDay:z,selectedRateCard:L,selectedHour:O,selectionType:U,setSelectionType:F,setDepositAmt:J,bsAvailability:W,setSelection:K}=B;(0,c.useEffect)(()=>{window.scrollTo({top:0})},[]),(0,c.useEffect)(()=>{{let e=document.querySelector("#PageNavbarHeader");e&&(e.style.display="none");let t=document.querySelector("#PageNavbarBtn");t&&(t.style.display="none");
1let l=document.querySelector("#territoryList");l&&(l.style.display="none");let a=document.querySelector("#PageFooter");a&&(a.style.display="none");let i=document.querySelector("#checkoutHeading");if(i&&(i.style.display="none"),E){let e=document.querySelector("#removeMarginTop");e&&(e.style.marginTop="70px")}}return()=>{{let e=document.querySelector("#PageNavbarHeader");e&&(e.style.display="flex");let t=document.querySelector("#PageNavbarBtn");t&&(t.style.display="flex");let l=document.querySelector("#territoryList");l&&(l.style.display="block");let a=document.querySelector("#PageFooter");a&&(a.style.display="unset");let i=document.querySelector("#checkoutHeading");if(i&&(i.style.display="block"),E){let e=document.querySelector("#removeMarginTop");e&&(e.style.marginTop="110px")}}}},[]),(0,c.useEffect)(()=>{V()},[O]),(0,c.useEffect)(()=>{N(W.guides),C(W.vehicles),M(null==W?void 0:W.is_shared_trip),J(W.deposit_percentage||20),k(!0)},[W]);let V=()=>{let e=z&&n()(z).format("YYYY-MM-DD");h.A.get("".concat(g().apiHost,"guide-group/").concat(u,"/availability?date=").concat(e,"&ratecard_id=").concat(O.guide_ratecard_id,"&rateid=").concat(O.id)).then(e=>{var t,l;console.log(null==(t=e.data)?void 0:t.settings,"response.data"),Y(null==(l=e.data)?void 0:l.settings),N(e.data.guides),C(e.data.vehicles),J(e.data.deposit_percentage||20),k(!0)}).catch(e=>console.log(e))},Q=async()=>{p&&p.length>0?(F({type:"Guide",guid:p[0].guideguid,name:p[0].guidename,data:p[0]}),await Z("Guide",p[0].guideguid),q.push("/checkout"),B.setSelectedDay(""),G.setTripDate(""),B.setStep("trip-details")):w&&w.length>0&&(F({type:"Boat",guid:w[0].guid,name:w[0].name,data:w[0]}),await Z("Boat",w[0].guid),q.push("/checkout"),B.setSelectedDay(""),G.setTripDate(""),B.setStep("trip-details")),K(!1)},X=async(e,t,l,a)=>{F({type:e,guid:a,name:l,data:t}),K(!0),await Z(e,a),q.push("/checkout"),B.setSelectedDay(""),G.setTripDate(""),B.setStep("trip-details")},Z=(e,t)=>{let l=JSON.parse(JSON.stringify((0,_.je)())),a=l.findIndex(e=>e.selectedDay===n()(z).format("YYYY-MM-DD")&&Number(e.selectedHour)===Number(O.id)&&Number(e.selectedRateCard)===Number(O.guide_ratecard_id));-1!==a&&("Guide"===e?l[a].guideguid=t:"Boat"===e&&(l[a].boatguid=t)),(0,S.qw)(l),H(l),(0,_.Bo)(l)},$=z&&n()(z).format("MMMM DD, YYYY"),ee=O&&n()(null==O?void 0:O.start_time,["HH:mm:ss"]).format("h:mm a"),et=()=>{let e=JSON.parse(JSON.stringify((0,_.je)()));return console.log(e,"cart"),(null==e?void 0:e.reduce((e,t)=>(t.selectedDay===n()(z).format("YYYY-MM-DD")&&Number(t.selectedHour)===Number(O.id)&&Number(t.selectedRateCard)===Number(O.guide_ratecard_id)&&(e+=t.totalGuests),console.log(e,"total"),e||R),0))||0};return(0,a.jsxs)("div",{style:{minHeight:"420px"},children:[(0,a.jsx)("div",{className:"Selectionheader",children:(0,a.jsxs)("p",{className:"SelectionheadText",children:[(0,a.jsx)("span",{style:{fontWeight:600},children:"You have selected:"})," ".concat(null==(i=L.title)?void 0:i.normalize("NFKD")," on ").concat($," at ").concat(ee," for ").concat(et()," ").concat(1===et()?"Guest":"Guests"," ")]})}),j&&!D&&(null==p?void 0:p.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"SelectionTitle",children:" Choose A Guide"}),(0,a.jsxs)("div",{className:"SelectionhorizontalScroll",children:[p.length>1&&(0,a.jsxs)("div",{className:"SelectionCard MTUnSelected",children:[(0,a.jsx)("div",{className:"SelectioninnerCont",children:(0,a.jsx)("img",{src:"".concat(g().cloudfront).concat((0,y.kb)("/web/static/images/1d6a47ebd6437d82c4c9ca83da0af711.png")),alt:"defalt",className:"SelectionPic Selectionpicdefault MTUnSelected"})}),(0,a.jsx)("button",{className:"SelectionguideBtn MTUnSelected",onClick:()=>Q(),style:{background:null==m||null==(d=m.page_attributes)?void 0:d.selected_button_color,color:null==m||null==(s=m.page_attributes)?void 0:s.selected_font_color},children:"Select First Available"})]}),p.map((e,t)=>{var l,i;let n=(null==e?void 0:e.title)?null==e?void 0:e.title:"Guide";return(0,a.jsxs)("div",{className:(null==U?void 0:U.guid)===e.guideguid?"SelectionCard MTSelected":"SelectionCard MTUnSelected",children:[(0,a.jsxs)("div",{className:"SelectioninnerCont",children:[(0,a.jsx)("img",{src:e.guidepic?"".concat(g().cloudfront).concat((0,y.kb)(e.guidepic)):"https://guidesly-assets.s3.us-east-2.amazonaws.com/images/marlin/RC-small.webp",alt:e.guidename,className:"SelectionPic"}),(0,a.jsxs)("div",{className:"SelectiontextCont",children:[(0,a.jsx)("p",{className:"Selectiontitle",children:e.guidename}),e.experience_date&&(0,a.jsxs)("p",{className:"Selectiontext",children:[(0,S.Gw)(e.experience_date)," Experience"]}),e.avg_rating&&Number(e.avg_rating)>0?(0,a.jsxs)("p",{className:"Selectiontext",children:[Number(e.avg_rating)%1>=.6?Math.ceil(Number(e.avg_rating)):Math.floor(Number(e.avg_rating)),(0,a.jsx)(x,{className:"SelectionIcon",url:v.A,size:11,alt:""})]}):null]})]}),(0,a.jsx)("button",{className:(null==U?void 0:U.guid)===e.guideguid?"SelectionguideBtn MtCBg":"SelectionguideBtn",onClick:()=>X("Guide",e,e.guidename,e.guideguid),style:{background:null==m||null==(l=m.page_attributes)?void 0:l.selected_button_color,color:null==m||null==(i=m.page_attributes)?void 0:i.selected_font_color},children:U.guid===e.guideguid?"Selected ".concat(n):"Select ".concat(n)})]},t)})]})]}),j&&(null==w?void 0:w.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"SelectionTitle",children:[" ",j&&p.length>0&&"Or"," Choose A Vehicle"]}),(0,a.jsx)("div",{className:"SelectionhorizontalScroll",children:w.map((e,t)=>{var l,i;return(0,a.jsxs)("div",{className:(null==U?void 0:U.guid)===e.guid?"SelectionCard MTSelected":"SelectionCard MTUnSelected",children:[(0,a.jsxs)("div",{className:"SelectioninnerCont",children:[(0,a.jsx)("img",{src:(null==e?void 0:e.coverpicture)?"".concat(g().cloudfront).concat((0,y.kb)(null==e?void 0:e.coverpicture)):"https://guidesly-assets.s3.us-east-2.amazonaws.com/images/marlin/RC-small.webp",alt:e.name?e.name:e.manufacturer_name,className:"SelectionPic"}),(0,a.jsxs)("div",{className:"SelectiontextCont",children:[(0,a.jsx)("p",{className:"Selectiontitle",children:e.name?e.name:e.manufacturer_name}),(0,a.jsxs)("p",{className:"Selectiontext",children:["Guests Capacity ",e.guest_capacity," "]}),(0,a.jsxs)("p",{className:"Selectiontext",children:["Length ",e.length,"ft"]})]})]}),(0,a.jsx)("button",{className:(null==U?void 0:U.guid)===e.guid?"SelectionguideBtn MtCBg":"SelectionguideBtn",onClick:()=>X("Boat",e,e.name,e.guid),style:{background:null==m||null==(l=m.page_attributes)?void 0:l.selected_button_color,color:null==m||null==(i=m.page_attributes)?void 0:i.selected_font_color},children:(null==U?void 0:U.guid)===e.guid?"Selected Boat":"Select Boat"})]},t)})})]})]})}},18190:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/star.f3ccd3f1.svg",height:11,width:11,blurWidth:0,blurHeight:0}},75423:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(14232),i=l(52804),n=l(86144),d=l(18435);let s=e=>{let[t,l]=(0,a.useState)(!1),[s,c]=(0,a.useState)(null);return{postCart:(0,a.useCallback)(async(t,a)=>{l(!0),c(null);let s=((t,l)=>{var a,d,s,c;return{cart_items:l&&"update"===l?t.cart_items:{new:[{ratecard_id:t.selectedRateCard,ratecard_rate_id:t.selectedHour,trip_date:t.selectedDay,is_group:(null==e||null==(a=e.page_attributes)?void 0:a.is_mt)||!1,guid:(null==e||null==(d=e.page_attributes)?void 0:d.is_mt)?null==e||null==(s=e.group_details)?void 0:s.group_guid:null==e?void 0:e.guideguid}]},expiry_mins:5,mac_address:(0,n.mG)(),heap_id:i.Bd&&(null==(c=window.heap)?void 0:c.userId),domain:(null==e?void 0:e.website)||window.location.origin}})(t,a);try{await (0,d.post)("cart",s),console.log("Item added to cart")}catch(e){console.error(e,"issue while adding to cart"),c(e)}finally{l(!1)}}
1,[e]),deleteCart:(0,a.useCallback)(async t=>{var a,s,o;l(!0),c(null);let r={ratecard_id:null==(a=t.selectedRateCard)?void 0:a.id,ratecard_rate_id:null==(s=t.selectedHour)?void 0:s.id,trip_date:t.selectedDay,mac_address:(0,n.mG)(),heap_id:i.Bd&&(null==(o=window.heap)?void 0:o.userId),domain:(null==e?void 0:e.website)||window.location.origin};try{await (0,d.del)("cart/item",r),console.log("Item deleted from cart")}catch(e){console.error(e,"issue while deleting from cart"),c(e)}finally{l(!1)}},[e]),isLoading:t,error:s}}}}]); 2//# sourceMappingURL=491.8e52f0a30db0c971.js.map
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.