PageSourceSearch

https://souvenaid.es/_next/static/chunks/pages/newsletter-preferences-56c720f330a39cee.js

js souvenaid.es collected 2026-09-29 06:57:43 UTC 8,357 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[620],{52337:function(e,t,n){"use strict";n.d(t,{h:function(){return o}});var r=n(2962),s=n(9008),c=n.n(s),a=n(85893),i=n(34155);function o(e){var t=e.slug,n=e.pageTitle,s=e.pageDescription,o=e.pageCanonical,l=e.pageRobots,u=e.pageImage,p=e.pageType,d=e.site,f=e.locale,m=n||(null==d?void 0:d.seoTitle)||"",h=s||(null==d?void 0:d.seoDescription)||"",g=null!=u&&u.url?u:null==d?void 0:d.seoImage,x=[];return null!=g&&g.url&&x.push({url:"".concat(g.url,"?w=1200&h=630&fm=jpg&q=80&fit=pad"),alt:g.title||"",width:1200,height:630}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(c(),{children:[(0,a.jsx)("meta",{charSet:"UTF-8"},"charset"),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width,initial-scale=1"},"viewport"),(0,a.jsx)("link",{rel:"apple-touch-icon",href:"/apple-touch-icon.png"},"apple"),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon-32x32.png"},"icon32"),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon-16x16.png"},"icon16"),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"},"favicon")]}),(0,a.jsx)(r.PB,{title:m,titleTemplate:"".concat(null==d?void 0:d.seoSiteName," | %s"),description:h,openGraph:{url:o||"".concat(i.env.NEXT_PUBLIC_SITE_URL,"/").concat(t),title:n||(null==d?void 0:d.seoTitle)||"",type:p||"website",description:h,locale:f||"en",site_name:(null==d?void 0:d.seoSiteName)||"",images:x},noindex:null==l?void 0:l.includes("noindex"),nofollow:null==l?void 0:l.includes("nofollow")})]})}},92583:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return k},default:function(){return P}});var r=n(59499),s=n(50029),c=n(16835),a=n(87794),i=n.n(a),o=n(67294),l=n(11163),u=n(86896);function p(){return(p=(0,s.Z)(i().mark(function e(t,n){var r;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/api/envio/newsletter-preferences",{method:"POST",body:JSON.stringify({cod:t,update:n?"1":"0"}),headers:{"Content-Type":"application/json;charset=utf-8"}}).then(function(e){return e.ok?e.json():(console.error("N.Preferences . Status: ".concat(e.status)),!1)}).then(function(e){return!!e&&"failed!"!==e&&!!e&&e}).catch(function(e){return console.error("N.Preferences : ".concat(e)),!1});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}var d=function(e,t){return p.apply(this,arguments)},f=n(52337),m=n(89755),h=n.n(m),g=n(87536),x=n(88917),j=n(31059),w=n(86947),v=n(85893);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var O=function(e){var t=e.firstStepSuccess,n=e.secondStepSuccess,r=e.responseMarketing,s=e.newsletterPref,c=e.hasError,a=e.onload,i=(0,u.Z)(),o=(0,g.cI)(),l={cta:{id:"acc-o-1",label:i.formatMessage({id:"newsletterpreferences.page.back"}),href:"/"}};return(0,v.jsx)("section",{className:"max-w-max md:max-w-[50rem] flex flex-col gap-10 mx-auto md:mx-0 md:grid md:grid-cols-2 md:gap-8 md:mt-14 md:mb-14",children:!a&&(0,v.jsxs)(v.Fragment,{children:[t?(0,v.jsx)(v.Fragment,{children:n?(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{className:"md:px-6 md:pt-2 md:pb-8 md:pr-10 md:flex-grow",children:[(0,v.jsx)("p",{className:"mb-4 text-center",children:i.formatMessage({id:"newsletterpreferences.page.update.success"})}),(0,v.jsx)(x.Z,y({},l))]})}):(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{className:"md:px-6 md:pt-2 md:pb-8 md:pr-10 md:flex-grow text-center",children:[(0,v.jsx)("p",{className:"mb-4",children:i.formatMessage({id:r?"newsletterpreferences.page.message.optin":"newsletterpreferences.page.message.optout"})}),(0,v.jsxs)("form",{onSubmit:o.handleSubmit(function(){var e;null===(e=s.onClick)||void 0===e||e.call(s)}),children:[c&&(0,v.jsx)("div",{className:"mt-4 -mb-4",children:(0,v.jsx)(j.Z,{message:i.formatMessage({id:"newsletterpreferences.page.error"})})}),(0,v.jsx)(x.Z,y({},l)),(0,v.jsx)("button",{type:"submit",className:"hover:text-secondary italic text-xs text-gray-500 w-full my-4",children:i.formatMessage({id:r?"newsletterpreferences.page.message.optin.back":"newsletterpreferences.page.message.optout.back"})})]})]})})}):(0,v.jsxs)("div",{className:"md:px-6 md:pt-2 md:pb-8 md:pr-10 md:flex-grow",children:[(0,v.jsx)("p",{className:"mb-4",children:i.formatMessage({id:"newsletterpreferences.page.error"})}),(0,v.jsx)(x.Z,y({},l))]}),(0,v.jsx)("div",{className:"relative hidden md:block place-self-ce
1nter",children:(0,v.jsx)(h(),{src:w.Z,layout:"fixed",width:180,height:180,alt:i.formatMessage({id:"newsletterpreferences.page.image.alt"}),priority:!0})})]})})},N=n(93804);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var k=!0,P=function(e){var t,n,a=e.site,p=(0,u.Z)(),m=(0,l.useRouter)(),h=m.query.cod?m.query.cod.toString():"",g=o.useState(!1),x=(0,c.Z)(g,2),j=x[0],w=x[1],b=o.useState(!0),y=(0,c.Z)(b,2),k=y[0],P=y[1],Z=o.useState(!1),_=(0,c.Z)(Z,2),E=_[0],T=_[1],M=o.useState(!1),D=(0,c.Z)(M,2),C=D[0],I=D[1],F=o.useState(!1),R=(0,c.Z)(F,2),q=R[0],U=R[1],X=(t=(0,s.Z)(i().mark(function e(t){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(t,!1).then(function(e){"ok"===e.status?(U(1===e.newsletter),T(!0),w(!1),P(!1)):(w(!0),T(!1),P(!1))});case 2:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)});(0,o.useEffect)(function(){h&&""!==h&&X(h)},[h]);var z={firstStepSuccess:E,secondStepSuccess:C,responseMarketing:q,onload:k,hasError:j,newsletterPref:{onClick:(n=(0,s.Z)(i().mark(function e(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!h){e.next=6;break}return w(!1),e.next=4,d(h,!0).then(function(e){"ok"===e.status?(I(!0),w(!1)):(I(!1),w(!0))});case 4:e.next=7;break;case 6:w(!0);case 7:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})}};return(0,v.jsx)(N.Z,{meta:(0,v.jsx)(f.h,{slug:"",pageTitle:p.formatMessage({id:"newsletterpreferences.page.title"}),pageRobots:["nofollow","noindex"],site:a}),children:(0,v.jsx)("div",{className:"container mt-8 md:my-0 container:px-0 md:min-
1h-[10rem] container:min-h-[13rem]",children:(0,v.jsxs)("div",{className:"mx-auto md:mx-0 md:place-self-center container:self-center container:place-self-auto",children:[(0,v.jsx)("h1",{className:"leading-tight my-4",children:p.formatMessage({id:"newsletterpreferences.page.title"})}),(0,v.jsx)(O,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},z))]})})})}},31059:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(82618),s=n(85893),c=function(e){var t=e.message,n=e.showIcon,c=e.id;return(0,s.jsxs)("span",{id:c,className:"flex mt-2 items-center leading-none text-error",children:[(void 0===n||n)&&(0,s.jsx)(r.Z,{className:"mr-2 min-h-[21px] min-w-[21px]",name:"roundederror",width:21,height:21,"aria-hidden":"true"}),t]})}},93804:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(85893),s=function(e){var t=e.children,n=e.meta,s=e.className;return(0,r.jsxs)("div",{className:"w-full antialiased",children:[n,(0,r.jsx)("main",{className:"content".concat(s||""),id:"skip",tabIndex:-1,children:t})]})},c=function(e){var t=e.children,n=e.meta,c=e.className;return(0,r.jsx)(s,{meta:n,className:c,children:t})}},45668:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/newsletter-preferences",function(){return n(92583)}])}},function(e){e.O(0,[962,536,774,888,179],function(){return e(e.s=45668)}),_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.