PageSourceSearch

https://www.curveonline.co.uk/content/themes/curve/dist/js/newsletter.js?ver=1790919882

js curveonline.co.uk collected 2026-10-02 05:45:31 UTC 15,948 bytes, 2 lines download raw bytes

1/*! For license information please see newsletter.js.LICENSE.txt */
2"use strict";(self.webpackChunkeffect=self.webpackChunkeffect||[]).push([[59],{3225:(t,e,r)=>{var n=r(821),o=["disabled","placeholder"];const i={__name:"InputBox",props:{modelValue:{type:[String,Number],required:!0,default:""},placeholder:{type:String,required:!1,default:""},disabled:{type:Boolean,required:!1,default:!1},error:{type:Boolean,required:!1,default:!1},valid:{type:Boolean,required:!1,default:!1}},emits:["input","update:modelValue"],setup:function(t,e){var r=e.emit,i=t,u=(0,n.Fl)({get:function(){return i.modelValue},set:function(t){r("update:modelValue",t)}});return function(e,i){return(0,n.wy)(((0,n.wg)(),(0,n.iD)("input",{"onUpdate:modelValue":i[0]||(i[0]=function(t){return u.value=t}),type:"text",class:(0,n.C_)([{"--error":t.error},{"--valid":t.valid}]),disabled:t.disabled,placeholder:t.placeholder,onChange:i[1]||(i[1]=function(t){return r("input",t.target.value)})},null,42,o)),[[n.nr,u.value]])}}};var u=r(6204),a=r(3697),c=r(6089),l=r(7066);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==s(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===s(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var y=(0,c.Q_)("customer",{state:function(){return{}},getters:{},actions:{addCustomer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(e,r){l.Z.post("".concat("https://bookings.curveonline.co.uk","/").concat("leicestercurve","/api/v3/customer"),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t),{withCredentials:!0}).then((function(t){return e(null==t?void 0:t.status)})).catch((function(t){var n,o;if(401===(null===(n=t.response)||void 0===n?void 0:n.status)||3===(null===(o=t.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.errorCode))return console.warn("Newsletter Signup - Customer is already added: ".concat(t.message)),e(202);r(t)}))}))}}});function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==d(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===d(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(){g=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,u=Object.create(i.prototype),a=new q(n||[]);return o(u,"_invoke",{value:E(t,r,a)}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",b={};function m(){}function w(){}function O(){}var _={};l(_,u,(function(){return this}));var S=Object.getPrototypeOf,j=S&&S(S(N([])));j&&j!==r&&n.call(j,u)&&(_=j);var P=O.prototype=m.prototype=Object.create(_);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,u,a){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,u,a)}),(function(t){r("throw",t,u,a)})):e.resolve(s).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,a)}))}a(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,u){if(o===h)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw u;return{value:t,done:!0}}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var c=k(a,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&
2(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var u=i.arg;return u?u.done?(r[e.resultName]=u.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(d(e)+" is not iterable")}return w.prototype=O,o(P,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:w,configurable:!0}),w.displayName=l(O,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},x(L.prototype),l(L.prototype,a,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var u=new L(s(t,r,n,o),i);return e.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},x(P),l(P,c,"Generator"),l(P,u,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),l=n.call(u,"finallyLoc");if(c&&l){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),b},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},e}function m(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}var w={class:"container newsletter-signup__inner"},O={key:0,class:"newsletter-signup__content"},_={class:"newsletter-signup__header"},S={class:"newsletter-signup__title"},j=["innerHTML"],P={key:0,class:"newsletter-signup__required"},x={type:"submit",class:"newsletter-signup__button"},L={key:1,class:"newsletter-signup__content newsletter-signup__content--centre"},E={class:"newsletter-signup__title h1"},k=["innerHTML"];const D={__name:"Newsletter",props:{title:{type:String,required:!0},text:{type:String,required:!0},successTitle:{type:String,required:!0},successText:{type:String,required:!0},subscribedTitle:{type:String,required:!0},subscribedText:{type:String,required:!0},failedTitle:{type:String,required:!0},failedText:{type:String,required:!0}},setup:function(t){var e=y(),r="201AGBHDRLQHNHPHKKMPKLGPMDRDTDMVL",o=t,c=(0,n.qj)({fields:{firstName:"",lastName:"",email:""},valid:null,busy:!1,status:null}),l=(0,n.Fl)((function(){return{fields:{firstName:{required:a.C1},lastName:{required:a.C1},email:{required:a.C1,email:a.Do}}}})),s=(0,u.ZP)(l,c),f=(0,n.Fl)((function(){return c.busy?"Please wait...":"Sign up"})),p=(0,n.Fl)((function(){var t="".concat(c.status,"Title");return o[t]||o.failedTitle})),d=(0,n.Fl)((function(){var t="".concat(c.status,"Text");return o[t]||o.failedText})),h=(0,n.Fl)((function(){return["success","subscribed"].includes(c.status)})),b=(0,n.Fl)((function(){return r.split(",")||[]})),D=function(){var t,e=(t=g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,n.SU)(s).$validate();case 2:if(c.valid=t.sent,c.valid&&!c.busy){t.next=5;break}return t.abrupt("return");case 5:c.busy=!0,T();case 7:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){m(i,n,o,u,a,"next",t)}function a(t){m(i,n,o,u,a,"throw",t)}u(void 0)}))});return function(){return e.apply(this,arguments)}}(),T=function(){e.addCustomer(v(v({},c.fields),{},{AgreedStatements:b.value})).then((function(t){c.busy=!1,c.status=202===t?"subscribed":"success",(0,n.SU)(s).$reset()})).catch((function(){c.status="failed"}))};return function(e,r){return(0,n.wg)(),(0,n.iD)("div",{class:(0,n.C_)(["newsletter-signup",{"newsletter-signup--success":h.value}])},[(0,n._)("div",w,[c.status?((0,n.wg)(),(0,n.iD)("div",L,[(0,n._)("h2",E,(0,n.zw)(p.value),1),(0,n._)("div",{class:"newsletter-signup__desc",innerHTML:d.value},null,8,k)])):((0,n.wg)(),(0,n.iD)("section",O,[(0,n._)("header",_,[(0,n._)("h2",S,(0,n.zw)(t.title),
21),(0,n._)("div",{class:"newsletter-signup__desc",innerHTML:t.text},null,8,j)]),(0,n._)("form",{class:"newsletter-signup__form",onSubmit:r[0]||(r[0]=(0,n.iM)((function(t){return D()}),["prevent"]))},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(Object.keys(c.fields),(function(t){return(0,n.wg)(),(0,n.iD)("label",{key:"newsletter-signup-".concat(t),class:"newsletter-signup__group"},[(0,n._)("span",{class:(0,n.C_)(["newsletter-signup__label",{"--error":(0,n.SU)(s).fields[t].$error}])},(0,n.zw)((e=t,r=("email"===e?"emailAddress":e).replace(/([A-Z])/g," $1"),o=r.charAt(0).toUpperCase()+r.slice(1).toLowerCase(),"".concat(o,":"))),3),(0,n.Wm)((0,n.SU)(i),{modelValue:c.fields[t],"onUpdate:modelValue":function(e){return c.fields[t]=e},error:(0,n.SU)(s).fields[t].$error,class:"newsletter-signup__input"},null,8,["modelValue","onUpdate:modelValue","error"]),(0,n.SU)(s).fields[t].$error?((0,n.wg)(),(0,n.iD)("span",P,(0,n.zw)((0,n.SU)(s).fields[t].$errors[0].$message),1)):(0,n.kq)("",!0)]);var e,r,o})),128)),(0,n._)("button",x,(0,n.zw)(f.value),1)],32)]))])],2)}}};function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function N(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==T(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===T(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var C=document.querySelector("#newsletter-signup");if(C){var F=(0,c.WB)(),U=(0,n.ri)({render:function(){return(0,n.h)(D)}},function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){N(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},C.dataset));U.use(F),U.mount("#newsletter-signup")}}},t=>{t.O(0,[898],(()=>{return e=3225,t(t.s=e);var e}));t.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.