PageSourceSearch

https://www.vouchercloud.ie/Content/dist/4994.v56e1b8f.js

js vouchercloud.ie collected 2026-10-07 05:53:24 UTC 4,360 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkvouchercloud_web=self.webpackChunkvouchercloud_web||[]).push([[4994],{1083:function(t,e,n){function r(){return a}function a(t,e){void 0===e&&(e=[]);var n=t.split(".").reduce(function(t,e){return null==t?void 0:t[e]},window.__routes);return e.reduce(function(t,e,n){return t.replace("{"+n+"}",e)},n)}n.d(e,{i:function(){return r}})},3205:function(t,e,n){function r(){return a}function a(t,e){void 0===e&&(e=[]);var n=t.split(".").reduce(function(t,e){return null==t?void 0:t[e]},window.__resource);return e.reduce(function(t,e,n){return t.replace("{"+n+"}",e)},n)}n.d(e,{C:function(){return r}})},4994:function(t,e,n){n.r(e),n.d(e,{SetAlert:function(){return m}});var r,a=n(5215),i=n(172),o=n(5994),u=n(3543),c=n(1083),s=n(7485),l=n(3205),d=n(2220),f=n(3796),v=n(9403);!function(t){t.Default="DEFAULT",t.Redemption="REDEMPTION",t.Favourite="FAVOURITE"}(r||(r={}));var h=function(){return Promise.all([n.e(4121),n.e(134)]).then(n.bind(n,134)).then(function(t){return t.ModalFollowed})};function m(t){var e=t.buttonClass,n=t.merchantId,d=t.nonInteraction,m=t.analyticsEvent,w=t.analyticsMeta,g=t.logoUrl,y=t.merchantName,I=t.stepUrl,b=(0,u.T_)("global.store").dispatch,C=(0,s.C6)(),M=C[0],k=M.isAuthenticated,S=M.favouriteMerchantIds,E=void 0===S?[]:S,_=C[1],D=(0,c.i)(),F=(0,l.C)(),A=(0,f.z$)()[0],H=(0,o.J0)(E.includes(n)),J=H[0],T=H[1],R=(0,o.J0)(!1),N=R[0],O=R[1],U=r.Default;g?U=r.Favourite:I&&(U=r.Redemption);var L=D("favourite."+(J?"remove":"save"),[n,U!==r.Default?!k:d]),P=J?"icon-tick":"icon-heart",Y=m?{"data-analytics-click":!0,"data-analytics-event":m,"data-analytics-meta":JSON.stringify(w)}:{};return(0,i.h)("button",(0,a.Cl)({class:e+" button form-alert-component"+(N?" loading":"")+(U===r.Favourite?" favourite":""),tabIndex:0,onClick:function(t){return(0,a.sH)(this,void 0,void 0,function(){var t,e,i,o;return(0,a.YH)(this,function(u){switch(u.label){case 0:return N?[2]:(O(!0),[4,p(L,J)]);case 1:return t=u.sent(),function(t){var e=t.merchantId,n=t.favouriteMerchantIds,r=t.setSession;t.isSaved?r({favouriteMerchantIds:n.filter(function(t){return t!==e})}):n.length?r({favouriteMerchantIds:(0,a.fX)((0,a.fX)([],n,!0),[e],!1)}):r({favouriteMerchantIds:[e]})}({isSaved:J,merchantId:n,favouriteMerchantIds:E,setSession:_}),!(null==t?void 0:t.success)||J?(O(!1),T(!J),[2]):(k||U!==r.Default||(e=t.merchantDetails,i=e.logo,o=e.name,A("@modal",{modal:h(),data:{logo:i,name:o}})),U===r.Redemption&&b(k?(0,v._)({active:{key:"followMerchants",parent:"redemption",url:I}}):(0,v._)({active:{key:"authenticate",url:L},queue:{key:"followMerchants",url:I}})),O(!1),T(!J),[2])}})})}},Y,{"data-setalert-deselect":!0,"data-setalert-tile-id":n}),U===r.Favourite&&(0,i.h)("img",{src:g,class:"form-alert-component-logo",alt:y}),(0,i.h)("i",{class:P+" form-alert-component-icon"}),F(J?"account.favourited":"account.favourite"))}function p(t,e){return(0,a.sH)(this,void 0,void 0,function(){var n;return(0,a.YH)(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,(0,d.c)(t,{method:e?"DELETE":"PUT",credentials:"include",headers:{"Content-Type":"application/json"}})];case 1:return n=r.sent(),[3,3];case 2:return r.sent(),[3,3];case 3:return[2,n]}})})}},7485:function(t,e,n){n.d(e,{C6:function(){return s},F8:function(){return d}});var r=n(5215),a=(n(172),n(5994)),i=n(3796),o=n(2220),u=n(921),c=function(){return(0,r.sH)(this,void 0,void 0,function(){var t;return(0,r.YH)(this,function(e){switch(e.label){case 0:if("undefined"==typeof window)return[2];t={},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,(0,o.c)("/client/user",{headers:{Accept:"application/json"},credentials:"include"})];case 2:return t=e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return function(t){var e,n=t.isAuthenticated,r=void 0!==n&&n,a=t.hashedEmail,i={event:"client.event","custom.gtm.data.userAuth":r,"custom.gtm.data.emailHash":void 0===a?"":a};null===(e=null===window||void 0===window?void 0:window.dataLayer)||void 0===e||e.push(i)}(t),[2,d(t)]}})})}();function s(){var t=(0,i.z$)(),e=t[0],n=t[1],r=(0,a.J0)(l()),o=r[0],u=r[1];return(0,a.vJ)(function(){c.then(u),n("@session",u)},[]),[o,function(t){e("@session",d(t))}]}function l(){var t=localStorage.getItem("@session");return JSON.parse(t)||{}}function d(t){var e=l(),n=(0,r.Cl)((0,r.Cl)({},e),(0,u.R)(t));return localStorage.setItem("@session",JSON.stringify(n)),n}}}]);

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.