PageSourceSearch

https://onceupon.photo/_next/static/chunks/3690.a02b58432c930f68.js

js onceupon.photo collected 2026-09-25 02:53:59 UTC 9,400 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="98652191-91da-48e5-9a74-813285990a0c",e._sentryDebugIdIdentifier="sentry-dbid-98652191-91da-48e5-9a74-813285990a0c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3690],{13869:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(89099),o=a(14232),r=a(94085),i=a(13983);let l=()=>{let e=(0,n.useRouter)(),t=(0,i.L)(e.query),a="https://onceuponapp.onelink.me",[l,s]=(0,o.useState)(a),[c,u]=(0,o.useState)(a),[d,m]=(0,o.useState)(a);return(0,o.useEffect)(()=>{if(t){let e=Object.entries(t).map(e=>e.join("=")).join("&"),n=a+"/faM8?".concat(e),o=a+"/hTrF?".concat(e);s(n),u(o),r.m0?m(o):m(n)}else{let e=a+"/RLy8/bc075980",t=a+"/baCm/dbd68733";s(e),u(t),r.m0?m(t):m(e)}},[r.m0,r.un,e.query]),{appStoreUrl:l,googlePlayUrl:c,activeOsUrl:d}}},13983:(e,t,a)=>{"use strict";a.d(t,{L:()=>n});let n=e=>{let{c:t,af_c_id:a,af_channel:n,af_adset:o,af_adset_id:r,af_ad:i,af_ad_id:l,clickid:s,pid:c,af_sub1:u,af_sub2:d,af_sub3:m,af_sub4:p,af_sub5:h}=e;return t?{c:t,af_c_id:null!=a?a:"",af_channel:null!=n?n:"",af_adset:null!=o?o:"",af_adset_id:null!=r?r:"",af_ad:null!=i?i:"",af_ad_id:null!=l?l:"",clickid:null!=s?s:"",pid:null!=c?c:"",af_sub1:null!=u?u:"",af_sub2:null!=d?d:"",af_sub3:null!=m?m:"",af_sub4:null!=p?p:"",af_sub5:null!=h?h:""}:null}},33186:()=>{},63690:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>x});var n=a(37876),o=a(14232),r=a(31392),i=a(83595);a(60668),a(33186);var l="_1ctvlxp2",s=a(29329),c=a(88992),u=a(69826),d=a(79501),m=a(89099),p=a(52197),h=a(90905),f=a(78095),y=a(97722);let x=e=>{let{eventName:t,buttonId:a,competitionActive:x}=e,[b,g]=(0,o.useState)(!1),[_,j]=(0,o.useState)(""),[v,k]=(0,o.useState)(!1),[w,A]=(0,o.useState)(!1),{cookieCountry:S}=(0,s.I)(),{locale:z}=(0,m.useRouter)(),{reset:T,register:C,handleSubmit:N,formState:{errors:E}}=(0,c.mN)({mode:"onTouched"}),{executeRecaptcha:L}=(0,u.V)("6LdDNsQsAAAAAM6jfc4r9J0JSMZaEOzBZkghBCGF"),I=N(async e=>{try{if(!L)return;g(!0);let a=await L("newsletter_submit"),n=z.split("-")[0],o=S||z.split("-")[1].toUpperCase(),r=await fetch("/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e.email,motivation:e.motivation,country:o,language:n,eventName:t,recaptchaToken:a})});r.ok?(j("Thank you for your subscription! Welcome."),A(!1),k(!0),T()):(409===r.status?j("This email is already subscribed and can’t be used to enter the competition."):j("".concat("An unexpected error occurred during the subscription. Please try again later.")),A(!0),k(!1)),g(!1)}catch(e){d.A.error(e)}});return((0,o.useEffect)(()=>{T(),j(""),A(!1),g(!1)},[z,T]),x)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("form",{noValidate:!0,onSubmit:I,children:(0,n.jsx)("fieldset",{className:"_1ctvlxp0",children:(0,n.jsx)(r.az,{children:(0,n.jsxs)(r.mc,{children:[(0,n.jsx)(r.DZ,{as:"h1",textAlign:"center",marginBottom:"l",children:v?"You’re almost in!":"Win a photo book!"}),(0,n.jsx)(r.az,{className:l,paddingX:"m",children:(0,n.jsx)(r.EY,{as:"p",fontSize:"preamble_m",fontWeight:"normal",color:"almostBlack",textAlign:"center",style:{whiteSpace:"pre-line"},children:v?"Check your inbox and confirm your sign-up to complete your entry. Once confirmed, you’re officially part of the competition!\n\n                      We’ll be in touch by email on March 6th with the results.\n\n                      Manifesting a win? Start gathering the moments you’d like to turn into a photo book.":"Sign up for our newsletter before February 28th for a chance to win a Once Upon photo book."})}),!v&&(0,n.jsxs)(r.az,{className:"".concat("_1ctvlxp1"),marginTop:"l",children:[(0,n.jsxs)(r.az,{display:"flex",flexDirection:"column",gap:"xs",children:[(0,n.jsx)("label",{htmlFor:"email",children:"Email *"}),(0,n.jsx)("input",{type:"email",id:"email",name:"email",autoComplete:"email",placeholder:"Email",...C("email",{required:"Whoopsie daisy! You forgot to enter the most important thing – your email address!",pattern:{value:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,message:"Looks like a typo? Please try again."}}),required:!0,...(0,h.J)("email",E,!0),className:"_1ctvlxp3"}),(0,n.jsx)(p.K,{errors:E,name:"email",render:e=>{let{message:t}=e;return(0,n.jsx)(r.EY,{id:"email-error",fontSize:"caption_xs",paddingTop:"xxs",fontWeight:"normal",color:"tomato",children:t})}}),_&&w&&(0,n.jsx)(r.az,{display:"flex",alignItems:"center",justifyContent:{mobile:"center",tablet:"flex-start"},gap:"none",children:(0,n.jsx)(r.EY,{as:"span",color:w?"tomato":"almostBlack",fontSize:"caption_xs",fontWeight:"semibold",paddingTop:"none",children:_})})]}),(0,n.jsxs)(r.az,{display:"flex",flexDirection:"column",gap:"xs",marginTop:"m",children:[(0,n.jsx)("label",{htmlFor:"motivation",children:"What moments would you like to capture in your photo book? *"}),(0,n.jsx)("textarea",{id:"motivation",name:"motivation",autoComplete:"off",...C("motivation",{required:String("Oh no, you’ve missed a spot!")}),required:!0,...(0,h.J)("motivation",E,!0),className:"_1ctvlxp4"}),(0,n.jsx)(p.K,{errors:E,name:"motivation",render:e=>{let{message:t}=e;return(0,n.jsx)(r.EY,{id:"motivation-error",fontSize:"caption_xs",paddingTop:"xxs",fontWeight:"normal",color:"tomato",children:t})}})]}),(0,n.jsx)(r.az,{display:"flex",alignItems:"center",justifyContent:"center",marginTop:"xl",children:(0,n.jsx)(r.$n,{type:"submit",variant:"primary",style:{borderRadius:999},disabled:b,"aria-label":"Submit",id:a,children:b?(0,n.jsx)(i.A,{}):"Join competition"})})]})]})})})},z),v&&!w&&(0,n.jsx)(r.az,{display:"flex",alignItems:"center",justifyContent:"center",gap:"xs",marginTop:"xl",children:(0,n.jsx)(f.A,{productType:"book",buttonText:"Start your book",type:"primary",size:"l",defaultLocalKey:y.$,id:"newsletter-compet
1ition-feb2026-start-book-button"})})]}):(0,n.jsx)(r.az,{children:(0,n.jsxs)(r.mc,{children:[(0,n.jsx)(r.DZ,{as:"h1",textAlign:"center",marginBottom:"l",children:"Competition"}),(0,n.jsx)(r.az,{className:l,children:(0,n.jsxs)(r.EY,{as:"p",fontSize:"preamble_m",fontWeight:"normal",color:"almostBlack",textAlign:"center",children:["There’s currently no competition at the moment.",(0,n.jsx)("br",{}),(0,n.jsx)("a",{href:"#signup-newsletter-footer",children:"Sign up for our newsletter"})," to be the first to find out about our latest discounts or upcoming competitions!"]})}),(0,n.jsx)(r.az,{display:"flex",alignItems:"center",justifyContent:"center",gap:"xs",marginTop:"xl",children:(0,n.jsx)(f.A,{productType:"book",buttonText:"Create a photo book",type:"hero",size:"l",defaultLocalKey:y.$,id:"newsletter-competition-feb2026-join-newsletter-button"})})]})})}},65561:e=>{e.exports={loader:"Loader_loader__L3HZ0",spin:"Loader_spin__bosmt",primary:"Loader_primary__HOz_l",neutral:"Loader_neutral___Y8GN",light:"Loader_light__PUFQQ"}},69826:(e,t,a)=>{"use strict";a.d(t,{V:()=>o});var n=a(14232);let o=e=>({executeRecaptcha:(0,n.useCallback)(async t=>{if(!window.grecaptcha)return null;await new Promise(e=>{window.grecaptcha.ready(()=>e())});try{return await window.grecaptcha.execute(e,{action:t})}catch(e){return null}},[e])})},78095:(e,t,a)=>{"use strict";a.d(t,{A:()=>p});var n=a(37876),o=a(55507),r=a(88116),i=a(14232),l=a(94085),s=a(6609),c=a(89099),u=a(84715),d=a(13869),m=a(33197);let p=e=>{let{productType:t,buttonText:a,defaultLocalKey:p,type:h="primary",size:f="m",children:y,id:x,builderContentId:b,variationId:g}=e,_=(0,c.useRouter)(),{appStoreUrl:j,googlePlayUrl:v}=(0,d.A)(),{cmsOrLokalise:k}=(0,u.j)(),w=k(a,p),A=(0,i.useMemo)(()=>"https://app.onceupon.photo/authentication/signinAnonymously/?productType=".concat(t,"&lang=").concat(_.locale),[t,_.locale]),[S,z]=(0,i.useState)(A);return(0,i.useEffect)(()=>{l.m0?z(v):l.un&&z(j)},[v,j]),(0,n.jsx)(m.N,{href:S,onClick:()=>{(S===v||S===j)&&(0,s.u2)(S),b?o.Ay.track("conversion",{contentId:b,variationId:g}):o.Ay.trackConversion()},id:x,children:(0,n.jsx)(r.default,{as:"span",variant:h,size:f,marginBottom:"xl",children:y||w})})}},79501:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var n=a(18334);let o=()=>{let e=new Date;return"[".concat(e.toLocaleTimeString(),"]")},r=e=>e.map(e=>JSON.stringify(e)).join(", "),i={info:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];n.wd("".concat(o()," [INFO] ").concat(e," ").concat(r(a)))},warn:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];n.wd("".concat(o()," [WARNING] ").concat(e," ").concat(r(a)))},error:function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];n.Cp(e)}}},83595:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var n=a(37876),o=a(69241);a(14232);var r=a(65561),i=a.n(r);let l=e=>{let{className:t,theme:a="primary"}=e,r=(0,o.A)([t,i().loader,i()[a]]);return(0,n.jsx)("div",{className:r,"data-testid":"loader"})}},90905:(e,t,a)=>{"use strict";a.d(t,{J:()=>n,r:()=>o});let n=(e,t,a)=>{let n=!!t[e];return{"aria-required":a||void 0,"aria-invalid":n||void 0,"aria-describedby":n?"".concat(e,"-error"):void 0}},o=(e,t)=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())}},97722:(e,t,a)=>{"use strict";a.d(t,{$:()=>n});
1let n="productpage_photobooks_create_button"}}]);
2//# sourceMappingURL=3690.a02b58432c930f68.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.