PageSourceSearch

https://starcarhire.co.uk/_next/static/chunks/pages/review/[guid]-4a87b5be1b05de42fbd8.js

js starcarhire.co.uk collected 2026-09-26 18:47:58 UTC 17,552 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[144],{4184:function(e,t){var r;!function(){"use strict";var i={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var s=n.apply(null,r);s&&e.push(s)}else if("object"===a)for(var o in r)i.call(r,o)&&r[o]&&e.push(o)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(r=function(){return n}.apply(t,[]))||(e.exports=r)}()},4681:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return w},default:function(){return S}});var i=r(7294),n=r(1163),a=r(4047),s=r(2700),o=r(8127),l=r(4102),u=r(775),c=r(6265),d=r(9503),f=r(6869),v=r(1919),p=i.createElement;function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){(0,c.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=(0,u.Z)(e);if(t){var n=(0,u.Z)(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return(0,l.Z)(this,r)}}var y=function(e){(0,o.Z)(r,e);var t=m(r);function r(e){var i;return(0,a.Z)(this,r),(i=t.call(this,e)).state={loading:!1,error:!1,alreadySubmitted:!1,submitted:!1,reviewInfo:null,siteExp:0},i}return(0,s.Z)(r,[{key:"componentDidMount",value:function(){this.props.guid&&this.getReveiwItems(this.props.guid)}},{key:"getReveiwItems",value:function(e){var t=this,r=null!=this.props.jwtToken?this.props.jwtToken:localStorage.getItem("jwtToken");this.setState({loading:!0},(function(){(0,f.mJ)("Review","GetReviewItems",{guid:e},r).then((function(e){null!=e&&t.setState({loading:!1,reviewInfo:e.ownerDetails,siteExp:e.review,feedback:e.feedback,alreadySubmitted:e.review>0})}))}))}},{key:"setOwnerExp",value:function(e,t){var r=this,i=this.state.reviewInfo.map((function(r){return r.id===e?h(h({},r),{},{review:t}):r}));this.setState({reviewInfo:i},(function(){r.state.error&&r.setState({error:!r.validateReviews()})}))}},{key:"setVehicleExp",value:function(e,t,r,i){var n=this,a=this.state.reviewInfo;a.forEach((function(n){n.id==e&&n.vehicleDetailsList.forEach((function(e){e.id==t&&(i?e.reviewLinking=r:e.reviewRecommend=r)}))})),this.setState({reviewInfo:a},(function(){n.state.error&&n.setState({error:!n.validateReviews()})}))}},{key:"submitFeedback",value:function(){var e=this;if(this.validateReviews()){var t=null!=this.props.jwtToken?this.props.jwtToken:localStorage.getItem("jwtToken"),r=this.state,i=r.reviewInfo,n=r.siteExp,a=r.feedback,s=JSON.stringify({OrderId:this.props.guid,Review:n,Feedback:a,OwnerDetails:i});(0,f.mJ)("Review","SetReview",{data:s},t).then((function(t){null!=t&&e.setState({submitted:!0})}))}else this.setState({error:!0})}},{key:"validateReviews",value:function(){var e=this.state,t=e.reviewInfo,r=e.siteExp;return!(!t||0===t.length)&&(t.every((function(e){return e.review>0&&e.vehicleDetailsList&&e.vehicleDetailsList.length>0&&e.vehicleDetailsList.every((function(e){return e.reviewLinking>0}))}))&&r>0)}},{key:"getReviewErrorMessage",value:function(){var e=this.state,t=e.reviewInfo,r=e.siteExp;if(!t||0===t.length)return"Please provide your feedback before submitting.";var i=[];return t.forEach((function(e){0===e.review&&i.push("Please rate the owner ".concat(e.name,".")),e.vehicleDetailsList&&e.vehicleDetailsList.forEach((function(t){0===t.reviewLinking&&i.push("Please rate ".concat(e.name,"'s ").concat(t.title,"."))}))})),0===r&&i.push("Please rate your overall booking experience."),i}},{key:"render",value:function(){var e=this,t=this.state,r=t.loading,n=t.submitted,a=t.alreadySubmitted,s=t.error,o=t.reviewInfo,l=t.siteExp,u=t.feedback,c="#b18a51",f="#d4b370",g="#d7d7d7",h="24px",m="4px";return p("div",{className:"grid-container reviewContent"},r?p("div",{className:"grid-x"},p("div",{className:"searchLoading"},p(v.Z,{msg:"Gathering your chosen vehicles"}))):p("div",{className:"grid-x"},p("div",{className:"small-12 medium-12 large-12 cell reviewHeader"},p("h3",null,"Feedback"),p("p",null,"Thank you for hiring a vehicle through our platform. Your feedback helps us improve our service.")),n?p("div",{className:"small-12 medium-12 large-12 cell reviewOwnerVehicle reviewOwnerVehicle-submitted"},p("p",null,"Your feedback has been submitted!")):p(i.Fragment,null,null!=o&&o.length>0&&p("div",{className:"small-12 medium-12 large-12 cell reviewOwnerVehicle"},p("h4",null,"Vehicle & Owner Feedback"),o.map((function(t,r){return t.vehicleDetailsList.length>0?p("div",{key:"rov_"+r,className:"grid-x grid-margin-y"},p("div",{className:"small-12 medium-12 large-12 cell"},p("div",{className:"grid-x"},p("div",{className:"small-12 medium-12 large-12 cell reviewOwner"}
1,p("p",null,"How would you rate your overall experience with the vehicle owner/driver ",p("b",null,t.name),"?"),p("div",{className:"reviewRatings"},p(d.Z,{name:"ownerExp-".concat(t.id),rating:t.review||0,numberOfStars:5,starRatedColor:c,starHoverColor:f,starEmptyColor:g,starDimension:h,starSpacing:m,changeRating:a?function(){}:function(r){return e.setOwnerExp(t.id,r)}}),p("span",{style:{marginLeft:"8px"}},t.review||0)))),p("div",{className:"grid-x grid-margin-x"},t.vehicleDetailsList.map((function(r,i){var n="/VehicleDetail/"+r.id+"/"+r.title.replaceAll(" ","_");return p("div",{key:"rv_"+i,className:"small-12 medium-6 large-4 cell form-spacer-control reviewVehicle"},p("div",{className:"grid-x grid-margin-x"},p("div",{className:"small-12 medium-12 large-12 cell reviewVehicle-info"},p("p",null,r.title)),p("div",{className:"small-12 medium-6 large-5 cell reviewVehicle-info"},p("a",{href:n,title:r.title,target:"_blank",rel:"noopener noreferrer"},p("img",{src:r.image,alt:r.title,className:"imageAdviceImg"}))),p("div",{className:"small-12 medium-6 large-7 cell reviewVehicle-questions"},p("div",{className:"reviewQuestions reviewQuestionsLiking"},p("p",null,"Did the vehicle meet your expectations?"),p("div",{className:"reviewRatings"},p(d.Z,{name:"vehicleLiking-".concat(r.id),rating:r.reviewLinking||0,numberOfStars:5,starRatedColor:c,starHoverColor:f,starEmptyColor:g,starDimension:h,starSpacing:m,changeRating:a?function(){}:function(i){return e.setVehicleExp(t.id,r.id,i,!0)}}),p("span",{style:{marginLeft:"8px"}},r.reviewLinking||0))))))}))))):null}))),p("div",{className:"small-12 medium-12 large-12 cell reviewSiteContainer"},p("div",{className:"grid-x grid-margin-x"},p("div",{className:"small-12 medium-6 large-6 cell reviewSite"},p("h4",null,"Overall Experience"),p("p",null,"How would you rate your booking experience and communication with the Star Car Hire team?"),p("div",{className:"reviewRatings"},p(d.Z,{name:"siteExp",rating:l||0,numberOfStars:5,starRatedColor:c,starHoverColor:f,starEmptyColor:g,starDimension:h,starSpacing:m,changeRating:a?function(){}:function(t){return e.setState({siteExp:t})}}),p("span",{style:{marginLeft:"8px"}},l||0)),p("p",null,"Any comments or feedback?"),p("textarea",{disabled:a,className:"formElements",name:"feeback",placeholder:"Please share any additional thoughts about your experience...",defaultValue:null!=u?u:"",onChange:function(t){return e.setState({feedback:t.target.value})}}),s&&p("p",{className:"errorTextLine"},this.getReviewErrorMessage().map((function(e,t){return p(i.Fragment,{key:t},t>0&&p("br",null),e)}))),!a&&p("button",{type:"button",className:"enquiryBackButton submitFeedbackButton",onClick:function(){return e.submitFeedback()}},"Submit Feedback")))))))}}]),r}(i.Component);(0,c.Z)(y,"displayName",y.name);var b=i.createElement;var w=!0,S=function(e){e.metaData,e.windowInnerWidth;var t=(0,n.useRouter)();return b(y,{guid:t.query.guid})}},1919:function(e,t,r){"use strict";var i=r(7294).createElement;t.Z=function(e){return i("div",{className:null!=e.className?"loader "+e.className:"loader"},i("div",{className:"lds-ring"},i("div",null),i("div",null),i("div",null),i("div",null)),i("span",{className:"loaderText"},e.msg?e.msg:"Loading..."))}},6993:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/review/[guid]",function(){return r(4681)}])},9503:function(e,t,r){"use strict";var i,n=r(9038),a=(i=n)&&i.__esModule?i:{default:i};Number.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},t.Z=a.default},9038:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=o(r(7294)),a=o(r(5697)),s=o(r(7727));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var c=function(e){function t(){var e,r,i;l(this,t);for(var n=arguments.length,a=Array(n),s=0;s<n;s++)a[s]=arguments[s];return r=i=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),i.state={highestStarHovered:-1/0},i.fillId="starGrad"+Math.random().toFixed(15).slice(2),i.hoverOverStar=function(e){return function(){i.setState({highestStarHovered:e})}},i.unHoverOverStar=function(){i.setState({highestStarHovered:-1/0})},u(i,r)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"stopColorStyle",value:function(e){var t={stopColor:e,stopOpacity:"1"};return this.props.ignoreInlineStyles?{}:t}},{key:"render",value:function(){var e=this.props,t=e.starRatedColor,r=e.starEmptyColor;return n.default.createElement("div",{className:"star-ratings",title:this.titleText,style:this.starRatingsStyle},n.default.createElement("svg",{className:"star-grad",style:this.starGradientStyle},n.default.createElement("defs",null,n.default.createElement("linearGradient",{id:this.fillId,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},n.default.createElement("stop",{offset:"0%",className:"stop-color-first",style:this.stopColorStyle(t)}),n.default.createElement("stop",{offset:this.offsetValue,className:"stop-color-first",style:this.stopColorStyle(t)}),n.default.createElement("stop",{offset:this.offsetValue,className:"stop-color-final",style:this.stopColorStyle(r)}),n.default.createElement("stop",{offset:"100%",className:"stop-color-final",style:this.stopColorStyle(r)})))),this.renderStars)}},{key:"starRatingsStyle",get:function(){return this.props.ignoreInlineStyles?{}:{position:"relative",boxSizing:"border-box",display:"inline-block"}}},{key:"starGradientStyle",get:function(){return this.props.ignoreInlineStyles?{}:{position:"absolute",zIndex:"0",width:"0",height:"0",visibility:"hidden"}}},{key:"titleText",get:function(){var e=this.props,t=e.typeOfWidget,r=e.rating,i=this.state.highestStarHovered,n=i>0?i:r,a=parseFloat(n.toFixed(2)).toString();Number.isInteger(n)&&(a=String(n));var s=t+"s";return"1"===a&&(s=t),a+" "+s}},{key:"offsetValue",get:function(){var e=this.props.rating,t="0%";Number.isInteger(e)||(t=e.toFixed(2).split(".")[1].slice(0,2)+"%");return t}},{key:"renderStars",get:function(){var e=this,t=this.props,r=t.changeRating,i=t.rating,a=t.numberOfStars,o=t.starDimension,l=t.starSpacing,u=t.starRatedColor,c=t.starEmptyColor,d=t.starHoverColor,f=t.gradientPathName,v=t.ignoreInlineStyles,p=t.svgIconPath,g=t.svgIconViewBox,h=t.name,m=this.state.highestStarHovered;return Array.apply(null,Array(a)).map((function(t,y){var b=y+1,w=b<=i,S=m>0,R=b<=m,k=b===m,O=b>
1i&&b-1<i,x=1===b,E=b===a;return n.default.createElement(s.default,{key:b,fillId:e.fillId,changeRating:r?function(){return r(b,h)}:null,hoverOverStar:r?e.hoverOverStar(b):null,unHoverOverStar:r?e.unHoverOverStar:null,isStarred:w,isPartiallyFullStar:O,isHovered:R,hoverMode:S,isCurrentHoveredStar:k,isFirstStar:x,isLastStar:E,starDimension:o,starSpacing:l,starHoverColor:d,starRatedColor:u,starEmptyColor:c,gradientPathName:f,ignoreInlineStyles:v,svgIconPath:p,svgIconViewBox:g})}))}}]),t}(n.default.Component);c.propTypes={rating:a.default.number.isRequired,numberOfStars:a.default.number.isRequired,changeRating:a.default.func,starHoverColor:a.default.string.isRequired,starRatedColor:a.default.string.isRequired,starEmptyColor:a.default.string.isRequired,starDimension:a.default.string.isRequired,starSpacing:a.default.string.isRequired,gradientPathName:a.default.string.isRequired,ignoreInlineStyles:a.default.bool.isRequired,svgIconPath:a.default.string.isRequired,svgIconViewBox:a.default.string.isRequired,name:a.default.string},c.defaultProps={rating:0,typeOfWidget:"Star",numberOfStars:5,changeRating:null,starHoverColor:"rgb(230, 67, 47)",starRatedColor:"rgb(109, 122, 130)",starEmptyColor:"rgb(203, 211, 227)",starDimension:"50px",starSpacing:"7px",gradientPathName:"",ignoreInlineStyles:!1,svgIconPath:"m25,1 6,17h18l-14,11 5,17-15-10-15,10 5-17-14-11h18z",svgIconViewBox:"0 0 51 48"},t.default=c},7727:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=o(r(7294)),a=o(r(4184)),s=o(r(5697));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var c=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"render",value:function(){var e=this.props,t=e.changeRating,r=e.hoverOverStar,i=e.unHoverOverStar,a=e.svgIconViewBox,s=e.svgIconPath;return n.default.createElement("div",{className:"star-container",style:this.starContainerStyle,onMouseEnter:r,onMouseLeave:i,onClick:t},n.default.createElement("svg",{viewBox:a,className:this.starClasses,style:this.starSvgStyle},n.default.createElement("path",{className:"star",style:this.pathStyle,d:s})))}},{key:"starContainerStyle",get:function(){var e=this.props,t=e.changeRating,r=e.starSpacing,i=e.isFirstStar,n=e.isLastStar;return e.ignoreInlineStyles?{}:{position:"relative",display:"inline-block",verticalAlign:"middle",paddingLeft:i?void 0:r,paddingRight:n?void 0:r,cursor:t?"pointer":void 0}}},{key:"starSvgStyle",get:function(){var e=this.props,t=e.ignoreInlineStyles,r=e.isCurrentHoveredStar,i=e.starDimension;return t?{}:{width:i,height:i,transition:"transform .2s ease-in-out",transform:r?"scale(1.1)":void 0}}},{key:"pathStyle",get:function(){var e=this.props,t=e.isStarred,r=e.isPartiallyFullStar,i=e.isHovered,n=e.hoverMode,a=e.starEmptyColor,s=e.starRatedColor,o=e.starHoverColor,l=e.gradientPathName,u=e.fillId,c=void 0;return c=n?i?o:a:r?"url('"+l+"#"+u+"')":t?s:a,e.ignoreInlineStyles?{}:{fill:c,transition:"fill .2s ease-in-out"}}},{key:"starClasses",get:function(){var e=this.props,t=e.isSelected,r=e.isPartiallyFullStar,i=e.isHovered,n=e.isCurrentHoveredStar,s=e.ignoreInlineStyles,o=(0,a.default)({"widget-svg":!0,"widget-selected":t,"multi-widget-selected":r,hovered:i,"current-hovered":n});return s?{}:o}}]),t}(n.default.Component);c.propTypes={fillId:s.default.string.isRequired,changeRating:s.default.func,hoverOverStar:s.default.func,unHoverOverStar:s.default.func,isStarred:s.default.bool.isRequired,isPartiallyFullStar:s.default.bool.isRequired,isHovered:s.default.bool.isRequired,hoverMode:s.default.bool.isRequired,isCurrentHoveredStar:s.default.bool.isRequired,isFirstStar:s.default.bool.isRequired,isLastStar:s.default.bool.isRequired,starDimension:s.default.string.isRequired,starSpacing:s.default.string.isRequired,starHoverColor:s.default.string.isRequired,starRatedColor:s.default.string.isRequired,starEmptyColor:s.default.string.isRequired,gradientPathName:s.default.string.isRequired,ignoreInlineStyles:s.default.bool.isRequired,svgIconPath:s.default.string.isRequired,svgIconViewBox:s.default.string.isRequired},t.default=c}},function(e){e.O(0,[774,888,179],(function(){return t=6993,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.