PageSourceSearch

https://www.findmypast.com.au/titan/dist/gift-subscription-landing-page.98103f1f39d73d40.js

js findmypast.com.au collected 2026-10-01 12:12:30 UTC 150,814 bytes, 2 lines download raw bytes

1(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([["2714"],{95022(e,t,r){e.exports=r.p+"6bc5302e32531f95ff641918b4b99aab.svg"},796476(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(629901),i=r(775641),a=r(565099);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e){if(Array.isArray(e))return e}function s(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}}var u=i.forwardRef(function(e,t){var r,i,o,u=l(r=[e,t])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||c(r)||s(),d=u[0],f=u.slice(1),p=d.className,m=function(e,t){if(null==e)return{};var r,n,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,r=Reflect.ownKeys(Object(e));i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=function(e,t){if(null==e)return{};var r,n,i={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(d,["className"]),h=(l(f)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),1!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(f)||c(f,1)||s())[0];return(0,n.jsx)("textarea",(i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},m),o=o={ref:h,className:(0,a.Q)("radius-md w-full appearance-none rounded border border-grey-new-400 bg-white-new px-2 py-1 text-base text-indigo outline-0 placeholder:text-grey-new-500 focus:border-grey-new-900",p)},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(o)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))}),i))});u.displayName="TextArea"},819786(e,t,r){"use strict";r.d(t,{C:()=>a});var n=r(629901),i=r(565099),a=function(e){var t=e.className;return(0,n.jsxs)("svg",{viewBox:"0 0 869.5 43.3",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-label":"The British Newspaper Archive logo",className:(0,i.Q)("text-inherit h-4 w-auto stroke-none",t),children:[(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M0,12.3L3.7.4h36.4l-3,12.8h-1.5c.3-1.5.5-2.7.5-3.7s-.1-2-.3-2.8c-.2-.8-.5-1.5-.7-2-.3-.5-.7-1-1.4-1.4-.6-.4-1.2-.7-1.6-.9-.5-.2-1.2-.3-2.1-.4-1,0-1.7-.1-2.3-.1-.6,0-1.4,0-2.6,0l-11.4,39.3h6.7l-.4,1.5H.7l.4-1.5h5.7L18.3,1.8h-3.2c-2.1,0-4,.3-5.6,1-1.6.6-3,1.6-4,2.8-1,1.2-1.8,2.3-2.3,3.2-.5,1-1,2.1-1.5,3.5H0Z"}),(0,n.jsx)("path",{d:"M35.4,42.6L46.9,1.8h-5.6l.4-1.5h4.8c2.2,0,4.4-.1,6.6-.4l-6.2,20.5h.1c0,.1,0,0,0,0,1.2-1.9,2.9-3.6,5.2-5.2,2.2-1.6,4.4-2.4,6.6-2.4s3.1.4,4.3,1.3c1.2.9,1.8,2.1,1.8,3.7s-.2,1.5-.5,2.5l-4.3,13.8c-.7,2.4-1.1,4-1.1,4.8s.4,1.4,1.3,1.4c1.3,0,2.5-1,3.9-3,1.3-2,2.2-3.9,2.7-5.6l1.5.3c-2.8,7.4-6.4,11.2-11,11.2s-2.1-.4-2.9-1.1c-.8-.7-1.2-1.7-1.2-2.7s.3-2.5.8-4.2l4.6-14.7c.5-1.6.7-2.7.7-3.4,0-1.4-.8-2.1-2.5-2.1s-4.7,1.4-7.3,4.3c-2.6,2.9-4.3,5.9-5.2,9.2l-3.6,14.1h-5.6Z"}),(0,n.jsx)("path",{d:"M92.6,32.3l1.4.4c-1.5,3-3.4,5.5-5.8,7.5-2.4,2-5.2,3-8.5,3-5.6,0-8.3-3.1-8.3-9.4s.8-6.6,2.4-9.9c1.6-3.2,3.8-5.9,6.5-8,2.7-2.1,5.5-3.1,8.4-3.1s3.2.4,4.5,1.2c1.2.8,1.9,2.1,1.9,3.7s-.3,1.7-.8,2.5c-.5.8-1.1,1.6-1.8,2.2-.7.6-1.6,1.3-2.8,2-1.2.7-2.2,1.2-3,1.6-.8.4-2,.9-3.4,1.4-1.4.6-2.4.9-2.9,1.1-.5.2-1.3.4-2.5.8-.6,2.3-.9,4.4-.9,6.2,0,3.7,1.6,5.5,4.7,5.5s7.5-3,10.8-8.9ZM90.4,17.5c0-.9-.2-1.6-.7-2.2-.5-.6-1.2-.9-2-.9-1.9,0-3.5,1.1-4.8,3.3-1.4,2.2-2.8,5.5-4.3,9.9,8-2.7,11.9-6.1,11.9-10.2Z"})]}),(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M109.8,42.6v-1.7h5.5V3.6h-5.5v-1.7h21.5c4,0,7.2.6,9.4,1.8,2.2,1.2,3.4,3.4,3.4,6.6s-1,5.4-3.1,7c-2.1,1.6-4.7,2.5-7.8,2.8h0c2.4.2,4.6.6,6.6,1.4,2,.8,3.6,2,4.9,3.8,1.3,1.7,2,3.9,2,6.3s-1.2,6-3.6,8.1c-2.4,2-5.9,3.1-10.6,3.1h-22.7ZM124.2,3.6v15.9h3.6c2.5,0,4.4-.6,5.4-1.8,1.1-1.2,1.6-3.2,1.6-6.1s-.5-4.9-1.6-6.2c-1.1-1.2-3-1.8-5.8-1.8h-3.3ZM124.2,21.3v19.6h3.2c3.3,0,5.7-.8,7.3-2.3,1.6-1.6,2.4-4.2,2.4-8s-.6-5.7-1.9-7.2c-1.3-1.4-3.5-2.2-6.8-2.2h-4.2Z"}),(0,n.jsx)("path",{d:"M150,42.6v-1.7h4.1v-24.5h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v4.6h.1c.6-1.5,1.5-2.7,2.8-3.6,1.3-.9,2.8-1.4,4.4-1.4s3.1.5,4,1.6c.9,1.1,1.4,2.5,1.4,4.1,0,2.5-1.2,3.8-3.7,3.8s-2-.3-2.6-.8c-.6-.5-.9-1.3-.9-2.2s0-1.1,0-1.6c0-.5,0-.8,0-1.1,0-.8-.4-1.1-1.1-1.1-1.5,0-2.6,1.3-3.4,4-.8,2.7-1.2,5.4-1.2,8.1v12h4.1v1.7h-16.4Z"}),(0,n.jsx)("path",{d:"M176.7,42.6v-1.7h4.1v-24.5h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v26.5h4.1v1.7h-16.4ZM181.7,8.8
1c-.9-.9-1.3-1.9-1.3-3.1s.4-2.3,1.3-3.1c.9-.9,1.9-1.3,3.1-1.3s2.3.4,3.1,1.3c.9.9,1.3,1.9,1.3,3.1s-.4,2.3-1.3,3.1c-.9.9-1.9,1.3-3.1,1.3s-2.3-.4-3.1-1.3Z"}),(0,n.jsx)("path",{d:"M198.4,14.7v-7.9h8.2v7.9h5.7v1.7h-5.7v19.9c0,.9,0,1.6,0,2.1,0,.5.3,1,.8,1.6.5.6,1.1.9,2,.9,1.3,0,2.6-.6,3.9-1.8l1,1.1c-2,2.1-4.9,3.1-8.8,3.1s-1.5,0-2.1-.1c-.6,0-1.2-.3-1.9-.5-.7-.3-1.3-.7-1.7-1.2-.4-.5-.8-1.2-1.1-2.2-.3-1-.5-2.1-.5-3.4v-19.4h-4.1v-1.7h4.1Z"}),(0,n.jsx)("path",{d:"M215.9,42.6v-1.7h4.1v-24.5h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v26.5h4.1v1.7h-16.4ZM221,8.8c-.9-.9-1.3-1.9-1.3-3.1s.4-2.3,1.3-3.1c.9-.9,1.9-1.3,3.1-1.3s2.3.4,3.1,1.3c.9.9,1.3,1.9,1.3,3.1s-.4,2.3-1.3,3.1c-.9.9-1.9,1.3-3.1,1.3s-2.3-.4-3.1-1.3Z"}),(0,n.jsx)("path",{d:"M235.8,41.3v-9.2h1.7c.1,2.7,1,4.9,2.5,6.7,1.6,1.8,3.6,2.8,6,2.8s3-.3,4.1-1c1.1-.7,1.7-1.7,1.7-3.1s-.5-2.2-1.6-2.9c-1.1-.8-2.4-1.4-3.9-1.9-1.5-.5-3.1-1.1-4.6-1.7-1.5-.6-2.8-1.6-3.9-3-1.1-1.3-1.6-3-1.6-5.1s.9-5,2.8-6.5c1.9-1.5,4.3-2.3,7.2-2.3s5.7.6,8.8,1.8v7.3h-1.7c-.2-2-1-3.8-2.4-5.3-1.4-1.5-3.1-2.2-5.1-2.2s-2.2.3-3,.9c-.8.6-1.2,1.5-1.2,2.6s.5,1.9,1.6,2.6c1.1.7,2.4,1.3,3.9,1.8,1.5.5,3.1,1.1,4.6,1.7,1.5.6,2.8,1.7,3.9,3,1.1,1.4,1.6,3.1,1.6,5.2,0,3-1.1,5.4-3.4,7.1-2.3,1.7-5,2.6-8,2.6s-6.2-.7-10-2Z"}),(0,n.jsx)("path",{d:"M258.2,42.6v-1.7h4.1V3.6h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v17h.1c1.9-3,5-4.6,9-4.6s5.4.8,7.1,2.4c1.8,1.6,2.6,3.9,2.6,7v17.5h4.1v1.7h-16.4v-1.7h4.1v-18.6c0-3.7-1.5-5.5-4.4-5.5s-3.1.7-4.4,2.2c-1.3,1.5-1.9,3.3-1.9,5.7v16.3h4.1v1.7h-16.4Z"})]}),(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M308.4,42.4v-1.5h5V8.3h-5v-1.5h14.3l18.1,23.5h0V8.3h-5.5v-1.5h12v1.5h-5v34.7l-1.2.3-26.3-33.2h0v30.8h5.5v1.5h-12Z"}),(0,n.jsx)("path",{d:"M349.9,42.4v-1.5h4.8V8.3h-4.8v-1.5h30.8v11.3h-1.5c-.5-3.6-1.9-6.2-4.1-7.6-2.2-1.4-5.2-2.2-9-2.2h-3.6v15.2c5.5,0,8.2-2.4,8.2-7.2h1.5v16.2h-1.5c0-2.8-.7-4.7-2-5.9-1.4-1.1-3.4-1.7-6.2-1.7v15.9h5.2c1.5,0,3-.2,4.3-.5,1.3-.3,2.6-.9,3.9-1.6,1.3-.7,2.3-1.8,3.1-3.3.8-1.4,1.4-3.1,1.6-5.1h1.5v12h-32.2Z"}),(0,n.jsx)("path",{d:"M400,43l-11.8-34.7h-3.6v-1.5h16.8v1.5h-4.8l7.4,22.8h0l7.3-22.8h-4.8v-1.5h18.4v1.5h-4.8l7.4,22.8h0l7.3-22.8h-4.8v-1.5h9.8v1.5h-3.4l-11.3,34.7h-1.8l-11.1-33.5h0l-10.5,33.5h-1.8Z"}),(0,n.jsx)("path",{d:"M442.4,40.7l-.4-10.3h1.7c.1,2.8,1.2,5.2,3.2,7.5,2,2.2,4.5,3.3,7.5,3.3s4-.5,5.5-1.4c1.5-1,2.2-2.4,2.2-4.4s-.7-2.9-2-4c-1.3-1.1-3-2-4.9-2.7-1.9-.7-3.9-1.5-5.8-2.3-1.9-.8-3.6-2-4.9-3.6-1.3-1.6-2-3.5-2-5.8s.6-4.4,1.8-6.1c1.2-1.7,2.7-2.9,4.4-3.6,1.7-.7,3.5-1,5.5-1,2.8,0,6.1.7,10.1,2.2l.4,8.5h-1.7c-.5-2.6-1.6-4.7-3.3-6.4-1.7-1.7-3.8-2.5-6.3-2.5s-3,.5-4,1.5c-1.1,1-1.6,2.3-1.6,3.9s.7,2.6,2,3.6c1.3,1,2.9,1.8,4.8,2.5,1.9.7,3.8,1.5,5.6,2.3,1.9.9,3.5,2.2,4.8,3.9,1.3,1.7,2,3.9,2,6.5s-1.2,5.8-3.7,7.8c-2.5,2-5.5,3-9.2,3s-8-.8-11.6-2.3Z"}),(0,n.jsx)("path",{d:"M470.5,42.4v-1.5h4.8V8.3h-4.8v-1.5h19.6c.9,0,1.7,0,2.2,0,.5,0,1.3,0,2.4.2,1.1.1,1.9.3,2.6.5.7.2,1.5.6,2.3,1.1.9.5,1.6,1.1,2.1,1.7.5.7,1,1.5,1.3,2.6.4,1.1.5,2.3.5,3.6s-.3,3.1-.9,4.3c-.6,1.2-1.3,2.2-2.2,2.9-.9.7-2,1.2-3.4,1.6-1.3.4-2.6.7-3.8.8-1.2.1-2.6.2-4.1.2h-6v14.6h5.6v1.5h-18.2ZM483.1,8.3v16.5h4.3c2.8,0,4.7-.6,5.8-1.8,1-1.2,1.6-3.4,1.6-6.4s-.5-5.2-1.6-6.4c-1-1.2-3-1.8-5.8-1.8h-4.3Z"}),(0,n.jsx)("path",{d:"M500.2,42.4v-1.5h3.8l12.4-34.1h1.8l12.6,34.1h4.1v1.5h-17.8v-1.5h5l-3.5-10.3h-9.1l-3.5,10.3h4.9v1.5h-10.7ZM518,29.1l-4-11.5h0l-4,11.5h8.1Z"}),(0,n.jsx)("path",{d:"M537.6,42.4v-1.5h4.8V8.3h-4.8v-1.5h19.6c.9,0,1.7,0,2.2,0,.5,0,1.3,0,2.4.2,1.1.1,1.9.3,2.6.5.7.2,1.5.6,2.3,1.1.9.5,1.6,1.1,2.1,1.7.5.7,1,1.5,1.3,2.6.4,1.1.5,2.3.5,3.6s-.3,3.1-.9,4.3c-.6,1.2-1.3,2.2-2.2,2.9-.9.7-2,1.2-3.4,1.6-1.3.4-2.6.7-3.8.8-1.2.1-2.6.2-4.1.2h-6v14.6h5.6v1.5h-18.2ZM550.1,8.3v16.5h4.3c2.8,0,4.7-.6,5.8-1.8,1-1.2,1.6-3.4,1.6-6.4s-.5-5.2-1.6-6.4c-1-1.2-3-1.8-5.8-1.8h-4.3Z"}),(0,n.jsx)("path",{d:"M571.9,42.4v-1.5h4.8V8.3h-4.8v-1.5h30.8v11.3h-1.5c-.5-3.6-1.9-6.2-4.1-7.6-2.2-1.4-5.2-2.2-9-2.2h-3.6v15.2c5.5,0,8.2-2.4,8.2-7.2h1.5v16.2h-1.5c0-2.8-.7-4.7-2-5.9-1.4-1.1-3.4-1.7-6.2-1.7v15.9h5.2c1.5,0,3-.2,4.3-.5,1.3-.3,2.6-.9,3.9-1.6,1.3-.7,2.3-1.8,3.1-3.3.8-1.4,1.4-3.1,1.6-5.1h1.5v12h-32.2Z"}),(0,n.jsx)("path",{d:"M625.8,42.4h-18.2v-1.5h4.8V8.3h-4.8v-1.5h16.5c1,0,1.8,0,2.5,0,.6,0,1.5,0,2.5.2,1,.1,1.9.3,2.5.4.7.2,1.4.5,2.2.9.8.4,1.4.9,1.9,1.4.5.5.9,1.2,1.2,2.1.3.8.5,1.8.5,2.9,0,2.7-.8,4.7-2.5,6.1-1.7,1.4-3.9,2.5-6.8,3.1h0c3.7.4,6.4,1.2,8,2.6,1.6,1.4,2.5,3.8,2.5,7.4s0,1.6,0,2.1c0,.5,0,1.1.2,1.9.2.7.4,1.3.7,1.7.3.4.7.7,1.3,1,.6.3,1.3.4,2.2.4v1.4h-5.3c-1,0-1.9-.1-2.7-.3-.8-.2-1.4-.5-1.9-.8-.5-.3-.9-.8-1.3-1.4-.3-.6-.6-1.1-.8-1.6-.2-.5-.3-1.1-.4-1.9,0-.8-.1-1.5-.
11-1.9,0-.5,0-1.1,0-2,0-1.6-.2-2.9-.5-3.9-.3-1-.9-1.8-1.6-2.2-.7-.5-1.5-.8-2.3-1-.8-.2-1.8-.2-3-.2h-3.1v15.9h5.6v1.5ZM620.2,8.3v15.1h3.1c2.2,0,3.8-.5,4.7-1.5.9-1,1.4-3,1.4-6.1s-.5-5.1-1.5-6.1c-1-1-2.9-1.5-5.7-1.5h-2Z"})]}),(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M658,42.6v-1.7h4.4l14.1-39h2l14.4,39h4.7v1.7h-20.4v-1.7h5.7l-4-11.7h-10.4l-4,11.7h5.6v1.7h-12.2ZM678.4,27.5l-4.6-13.1h-.1l-4.6,13.1h9.2Z"}),(0,n.jsx)("path",{d:"M700.3,42.6v-1.7h4.1v-24.5h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v4.6h.1c.6-1.5,1.5-2.7,2.8-3.6,1.3-.9,2.8-1.4,4.4-1.4s3.1.5,4,1.6c.9,1.1,1.4,2.5,1.4,4.1,0,2.5-1.2,3.8-3.7,3.8s-2-.3-2.6-.8c-.6-.5-.9-1.3-.9-2.2s0-1.1,0-1.6c0-.5,0-.8,0-1.1,0-.8-.4-1.1-1.1-1.1-1.5,0-2.6,1.3-3.4,4-.8,2.7-1.2,5.4-1.2,8.1v12h4.1v1.7h-16.4Z"}),(0,n.jsx)("path",{d:"M752.6,33.5l1.5.7c-2,6.1-6,9.1-12,9.1s-8-1.3-10.7-4c-2.7-2.7-4.1-6.2-4.1-10.6s1.4-7.7,4.2-10.5c2.8-2.7,6.3-4.1,10.6-4.1s2.5,0,3.6.3c1.1.2,2.3.5,3.5,1,1.2.5,2.1,1.3,2.8,2.3.7,1,1.1,2.3,1.1,3.8,0,2.1-1.1,3.2-3.4,3.2s-2.6-.4-3.2-1.2c-.6-.8-.9-2-.9-3.6,0-2.7-1.2-4-3.5-4s-1.8.1-2.5.4c-.7.3-1.3.8-1.7,1.5-.4.7-.8,1.4-1,2-.3.6-.4,1.5-.5,2.8,0,1.2-.2,2.2-.2,2.9,0,.7,0,1.8,0,3.3s0,1.9,0,2.8c0,.8.2,1.7.3,2.7.2,1,.4,1.9.8,2.6.4.7.8,1.4,1.3,2.1.5.7,1.2,1.2,2.1,1.5.9.3,1.8.5,3,.5,4,0,6.9-2.5,8.8-7.4Z"}),(0,n.jsx)("path",{d:"M755.6,42.6v-1.7h4.1V3.6h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v17h.1c1.9-3,5-4.6,9-4.6s5.4.8,7.1,2.4c1.8,1.6,2.6,3.9,2.6,7v17.5h4.1v1.7h-16.4v-1.7h4.1v-18.6c0-3.7-1.5-5.5-4.4-5.5s-3.1.7-4.4,2.2c-1.3,1.5-1.9,3.3-1.9,5.7v16.3h4.1v1.7h-16.4Z"}),(0,n.jsx)("path",{d:"M793,42.6v-1.7h4.1v-24.5h-4.1v-1.7h3.5c2.9,0,5.8-.1,8.8-.3v26.5h4.1v1.7h-16.4ZM798.1,8.8c-.9-.9-1.3-1.9-1.3-3.1s.4-2.3,1.3-3.1c.9-.9,1.9-1.3,3.1-1.3s2.3.4,3.1,1.3c.9.9,1.3,1.9,1.3,3.1s-.4,2.3-1.3,3.1c-.9.9-1.9,1.3-3.1,1.3s-2.3-.4-3.1-1.3Z"}),(0,n.jsx)("path",{d:"M825.2,43.3l-12.1-26.9h-3.4v-1.7h16.6v1.7h-3.9l6.9,16.7,7.2-16.7h-3.9v-1.7h9.4v1.7h-3.4l-12.1,26.9h-1.5Z"}),(0,n.jsx)("path",{d:"M869.5,27.2h-19.1v2.4c0,7.5,2.5,11.2,7.4,11.2s7.6-2.3,9.7-6.8l1.5.7c-2.3,5.7-6.5,8.5-12.7,8.5s-8-1.3-10.7-4c-2.7-2.7-4.1-6.2-4.1-10.6s1.4-7.7,4.2-10.5c2.8-2.7,6.3-4.1,10.6-4.1s7,1.2,9.5,3.5c2.5,2.4,3.7,5.6,3.7,9.7ZM850.4,25.5h10.2v-2.6c0-4.8-1.6-7.2-4.7-7.2s-1.4.1-2,.4c-.6.3-1.1.6-1.4.9-.4.3-.7.8-1,1.5-.3.7-.5,1.2-.6,1.6-.1.4-.2,1-.3,1.9,0,.9-.2,1.5-.2,1.8,0,.3,0,.9,0,1.7Z"})]})]})}},794073(e,t,r){"use strict";r.d(t,{Is:()=>i,JR:()=>a,VM:()=>o,d9:()=>l});var n="RENEWAL",i=function(e){switch(e){case"NEW_NEW":return"New New";case n:return"Renewal";case"RECORD":return"Record";case"WINBACK":return"Winback";case"REACTIVATION":return"Reactivation";case"AUTORENEWAL":return"Autorenewal"}},a=function(e){return e===n},o=function(e){return"RECORD"===e};function l(e){return a(e)?"upgrade":o(e)?"ppv":"subscribe"}},272381(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(629901);r(775641);var i=r(565099);let a=function(e){var t=e.className,r=e.title,a=e.items;return(0,n.jsxs)("div",{className:(0,i.Q)("flex w-full flex-col items-center justify-center gap-12 px-4 py-10",t),children:[r?(0,n.jsx)("h2",{children:r}):null,(0,n.jsx)("div",{className:"flex w-full max-w-5xl flex-col items-center justify-between gap-10 md:flex-row md:items-start",children:a.map(function(e){return(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2",children:[(0,n.jsx)("div",{className:(0,i.Q)("mb-3 flex h-52 w-52 items-center justify-center rounded-full lg:h-64 lg:w-64",e.className),children:(0,n.jsx)("div",{className:(0,i.Q)("h-4/6 w-4/6 bg-contain bg-center bg-no-repeat",e.imageClassName),style:{backgroundImage:"url(".concat(e.image,")")}})}),(0,n.jsx)("h3",{className:"text-center text-base font-bold lg:text-lg",children:e.title}),(0,n.jsx)("div",{className:"w-full max-w-full text-center text-sm md:max-w-72 lg:text-base",children:e.content})]},e.title)})})]})}},31697(e,t,r){"use strict";r.d(t,{L:()=>l});var n=r(629901);r(775641);var i=r(90754),a=r(749854),o=r(844148);function l(e){var t=e.title,r=e.faqs,l=e.link;return(0,n.jsx)("div",{className:"flex bg-primary-inverted px-4 py-14 max-lg:py-12 max-sm:py-5",children:(0,n.jsxs)("div",{className:"mx-auto flex max-w-3xl flex-col items-center gap-12",children:[(0,n.jsx)("h2",{className:"text-center text-xl font-bold text-foreground",children:t}),(0,n.jsx)("div",{className:"box-border w-full max-w-3xl",children:null==r?void 0:r.map(function(e){var t=e.id,r=e.title,i=e.description,a=e.component;return(0,n.jsxs)(o.Xl,{value:"".concat(t,"-title"),children:[(0,n.jsx)(o.Xo,{as:"h4",children:r}),(0,n.jsx)(o.ub,{children:null!=i?i:a},"".concat(t,"-description"))]},"".concat(t,"-title"))})}),(0,n.jsx)("div",{children:(0,n.jsx)(a.$n,{as:i.A,to:l,target:"_blank",variant:"light-filled-dark-blue",className:"w-auto",children:"View all FAQs"})})]})})}},555006(e,t,r){"use strict";r.d(t,{A:()=>
1o});var n=r(629901);r(775641);var i=r(90754),a=r(749854);let o=function(e){var t=e.title,r=e.linkTitle,o=e.link,l=e.ariaLabel;return(0,n.jsx)("div",{className:"flex min-h-16 w-full items-center justify-center bg-complementary-3 px-4 py-3 text-foreground md:py-0",children:(0,n.jsxs)("div",{className:"grid w-full max-w-xl grid-rows-[auto,auto] items-center justify-center gap-2 text-sm md:grid-cols-[auto,160px] md:grid-rows-1 md:gap-4 md:text-base",children:[(0,n.jsx)("p",{children:t}),(0,n.jsx)(a.$n,{as:i.A,to:o,"aria-label":l,variant:"outlined",size:"small",children:r})]})})}},702660(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>r5});var n,i=r(629901),a=r(775641),o=r(771889),l=r(135704),s=r(839490),c=r(578046),u=r(707091),d=r(524620),f=r(797879),p=r(462957),m=r(275494),h=r(271221),b=r(969153),y=r(832200),g=r(600001),v=r.n(g);function x(){var e,t,r=(e=["\n  query availableGiftPlans($ids: [String!]) {\n    customer {\n      id\n      availableGiftPlans(ids: $ids) {\n        id\n        groupName\n      }\n\n      ... on RegisteredCustomer {\n        activeSubscription {\n          id\n          type\n        }\n        balance {\n          amount\n        }\n      }\n    }\n  }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return x=function(){return r},r}var j=v()(x());function w(){var e,t,r=(e=["\n  mutation previewGiftSubscriptionPlanPurchase(\n    $id: String!\n    $promoCode: String\n  ) {\n    previewGiftSubscriptionPlanPurchase(\n      subscriptionPlanId: $id\n      promoCode: $promoCode\n    ) {\n      __typename\n      ... on SubscriptionPurchasePreviewSuccessful {\n        couponError\n        preview {\n          nextBillAt\n          netPrice {\n            amount\n            currency\n          }\n          price {\n            amount\n            currency\n          }\n          proratedPrice {\n            amount\n            currency\n          }\n          discount {\n            amount\n            currency\n          }\n          renewalPrice {\n            amount\n            currency\n          }\n          existingCredit {\n            amount\n            currency\n          }\n          couponDetails {\n            code\n            type\n            amount\n            currency\n          }\n          plan {\n            id\n            description\n            durationInMonths\n            currency\n            groupName\n            groupSubtitle\n            strapline\n            straplineWithMessagingContent\n            bulletPoints\n            bulletPointsWithMessagingContent\n            trackingLabelPattern\n            displayName\n            upsellText\n            recommended\n            isNew\n            isGift\n            style {\n              bgPrimaryColor\n              bgAdditionalColor\n              ctaVariant\n              textColor\n            }\n          }\n          originalPricePerBillingPeriod\n          originalPricePerMonth\n          finalPricePerBillingPeriod\n          finalPricePerMonth\n          netPriceNoDiscount\n          calculatedDiscount {\n            finalPrice\n            amount\n            finalPrice\n            packageId\n            percentage\n            type\n          }\n        }\n      }\n      ... on PreviewFailure {\n        failureReason\n      }\n    }\n  }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return w=function(){return r},r}var P=v()(w());function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var A=function(){var e=(0,h.useApolloClient)(),t=(0,a.useContext)(b.A).memberId,r=N((0,a.useState)(null),2),n=r[0],i=r[1],l=N((0,a.useState)(null),2),c=l[0],u=l[1],d=(0,s.l)(),f=(0,o.useLocation)().pathname,p=(0,y.U)(d,f),m=d["plan-ids"];return(0,a.useEffect)(function(){var t;(t=function(){var t,r,n,a,o,l,s,c;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(d){switch(d.label){case 0:t={},m&&(t.ids=m.split(",")),d.label=1;case 1:return d.trys.push([1,5,,6]),[4,e.query({query:j,fetchPolicy:"network-only",variables:t})];case 2:if(n=(r=d.sent()).data,r.error)return u("Error loading gift subscriptions."),[2];if(!n)return[3,4];if((null==n||null==(o=n.customer)||null==(a=o.balance)?void 0:a.amount)<0)return u("Unfortunately you can't purchase a gift subscription because you have a negative balance on your account."),[2];return[4,Promise.all(((null==n||null==(l=n.customer)?void 0:l.availableGiftPlans)||[]).map(function(e){return e.id}).map(function(t){return e.mutate({mutation:P,variables:{id:t,promoCode:p}})}))];case 3:(s=d.sent()).find(function(e){var t,r=e.data;return(null==r||null==(t=r.previewGiftSubscriptionPlanPurchase)?void 0:t.__typename)==="PreviewFailure"})?u("Error loading gift subscriptions."):i(null==(c=s.map(function(e){var t,r=e.data;return null==r||null==(t=r.previewGiftSubscriptionPlanPurchase)?void 0:t.preview}))?void 0:c.sort(function(e,t){var r,n;return(null==(r=e.price)?void 0:r.amount)-(null==(n=t.price)?void 0:n.amount)})),d.label=4;case 4:return[3,6];case 5:return d.sent(),u("Error loading gift subscriptions."),[3,6];case 6:return[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){O(a,n,i,o,l,"next",e)}function l(e){O(a,n,i,o,l,"throw",e)}o(void 0)})})()},[e,t,p,m]),{isLoading:!n&&!c,error:c,previews:c?null:n}},k=r(387858),C=r(679145),I=r(367450),E=r(695821),T=r(619455),D=r(327370),L=r.n(D),R=r(459934),F=r.n(R),M=r(463988),_=r(370673);function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var U={1:{UK:"Pro",US:"Ultimate",AU:"Pro",IE:"Pro"},3:{UK:"Pro",US:"Ultimate",AU:"Pro",IE:"Pro"},12:{UK:"Premium",US:"Premium",AU:"Premium",IE:"Premium"}},G={1:{UK:"Pro",US:"Ultimate",AU:"Pro",IE:"Pro"},3:{UK:"Pro",US:"Ultimate",AU:"Pro",IE:"Pro"},12:{UK:"Pro",US:"Ultimate",AU:"Pro",IE:"Pro"}};B(n={},8,1),B(n,886,1),B(n,29,6),B(n,9,12),B(n,6,1),B(n,25,6),B(n,7,12),B(n,23,12),B(n,887,1),B(n,888,1),B(n,889,1),B(n,901,3),B(n,902,3),B(n,903,3),B(n,904,6),B(n,905,6),B(n,906,6),B(n,890,12),B(n,891,12),B(n,892,12);var q=r(98675),$=function(e){return e&&"Loyalty"===e.type},V=function(e,t,r){if($(e))return"".concat(e.percentage,"% loyalty discount applied");if((null==e?void 0:e.type)=="PromoCodeFixedAmount"){var n=(0,q.r)("".concat(t).concat(e.amount),r);return"".concat(n," discount applied")}return"".concat(e.percentage,"% discount applied")},W=r(766184);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}var H=function(e){return e&&e.some(function(e){return e.discount})},z=function(e){var t=e.finalPricePerBillingPeriod.toFixed(2),r=(0,q.r)("".concat(e.currencySymbol).concat(t),e.currency);return"Billed as a single payment of ".concat(r)},K=function(e,t,r,n,i){if((0,W.Nj)(i)||i===u.VB.earlyConversion||n)return"";var a,o,l=(0,W.JR)(i)?"Upgrade and save":"Save",s=r.length>1,c=!!e.discount&&e.discount.amount>0&&e.discount.amount!==e.netPriceNoDiscount,d=(null==(a=e.group)?void 0:a.groupName)==="Premium"&&3===e.duration;if(null==(o=e.couponDetails)?void 0:o.renewals){if(e.couponDetails.type===M.fU.fixed)return"".concat((0,_.lX)(e.couponDetails)," off your next ").concat(e.couponDetails.renewals," bill").concat(e.couponDetails.renewals?"s":"");if(e.couponDetails.type===M.fU.percent)return"".concat(e.couponDetails.amount,"% off your next ").concat(e.couponDetails.renewals," bill").concat(e.couponDetails.renewals?"s":"")}if(c)return V(e.discount,e.currencySymbol,e.currency);if(!t&&d&&!(0,W.By)(i))return"Access to everything";if(!t){if(e.saving&&s){var f=(0,q.r)("".concat(e.currencySymbol).concat(e.saving.toFixed(2)),e.currency);return"".concat(l," ").concat(f)}if((0,W.JR)(i))return"Upgrade now for more features"}return""},J=function(e,t,r,n){var i=(0,W.Nj)(n);return(!r||i||n===u.VB.earlyConversion)&&t.includes(e.packageId)},Q=function(e){var t;return function(e){if(Array.isArray(e))return Z(e)}(t=new Set(e.reduce(function(e,t){return e.push(t.duration),e},[]).sort(function(e,t){return e-t})))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return Z(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Z(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},X=function(e){var t,r=e.reduce(function(e,t){return t.discount&&e.push(t.discount),e},[]);return r.length<1?null:null==(t=r.sort(function(e,t){var r;return e[r="amount"]<t[r]?1:e[r]>t[r]?-1:0})[0])?void 0:t.packageId},ee=function(e){return e&&0!==e.length?Q(e.filter(function(e){return e.discount})).map(function(t){return e.filter(function(e){return e.duration===t})}).map(function(e){return X(e)}):[]},et=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e||0===e.length)return[];var i=n?U:G;return e.filter(function(e){var n;return e.group.groupName===(null==i||null==(n=i[e.duration])?void 0:n[r])&&e.packageId!==t}).map(function(e){return e.packageId})},er=function(e,t){var r=t.groupName;return e.filter(function(e){return e.group.groupName===r}).map(function(e){return e.packageId})},en=function(e,t,r,n){return(0,W.Nj)(n)||n===u.VB.earlyConversion?er(e,t):!H(e)||(null==e?void 0:e.find(function(e){return $(null==e?void 0:e.discount)}))?(0,W.JR)(n)?et(e,null==t?void 0:t.packageId,r):(0,W.By)(n)?e&&0!==e.length?e.filter(function(e){return"Everything"===e.group.groupName&&12===e.duration}).map(function(e){return e.packageId}):[]:e?e.filter(function(e){return e.group.recommended}).filter(function(e,t,r){return t===L()(r,function(t){return t.duration===e.duration})}).map(function(e){return e.packageId}):[]:ee(e)},ei=function(e){var t=e.recommendedPackages,r=e.hasDiscount,n=e.currentSub,i=e.durations,a=e.userJourney;return function(e){var o,l,s="giftSubscriptionPurchase"===a,c=Number(e.packageId)===Number(null==n?void 0:n.packageId),d=(0,W.Nj)(a)||a===u.VB.earlyConversion,f=s?e.group.trackingLabelPattern.replace("{duration}",e.duration.toString()):e.group.trackingLabelPattern,p=e.group.ctaVariant;return d&&(p="Premium"===e.group.groupName?"secondary-inverted":c?"primary":"secondary"),o=Y({},e),l=l={recommended:J(e,t,c,a),isNew:e.group.isNew||!1,chinLabel:K(e,r,i,c,a),ctaButtonLabel:c&&d?"Continue and save":(0,W.Bj)(a),footnote:z(e),isCurrentSub:c,trackingLabel:f,group:Y({},F()(e.group,"trackingLabelPattern"),p?{ctaVariant:p}:{}),discountBadge:d?"15% off":null}
1,Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(l)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(l)).forEach(function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(l,e))}),o}},ea=function(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=H(e),l=Q(e);return(a?e:e.filter(function(e){return e.duration===t})).map(ei({recommendedPackages:r,hasDiscount:o,currentSub:n,durations:l,userJourney:i}))},eo=r(163658),el=r.n(eo);function es(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function eu(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function ed(e,t){if(null==e)return{};var r,n,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,r=Reflect.ownKeys(Object(e));i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=function(e,t){if(null==e)return{};var r,n,i={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}var ef=function(e){var t=ec({},e);return["durationInMonths","description","currency","displayName","trackingLabelPattern"].forEach(function(e){return el()(t,e)}),t},ep=function(e){var t=e.map(ef),r=new Map;return t.forEach(function(e){var t,n=e.id,i=ed(e,["id"]),a=i.groupName,o=r.get(a);o?r.set(a,eu(ec({},o),{ids:[Number(n)].concat(function(e){if(Array.isArray(e))return es(e)}(t=o.ids)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return es(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return es(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})):r.set(a,ec({ids:[Number(n)]},i))}),Array.from(r.values())},em=function(e){var t,r,n,i,a,o,l,s,c,u,d,f,p,m,h=e.preview,b=e.showMessagingContent,y=h.plan,g=y.id,v=y.durationInMonths,x=ed(y,["id","durationInMonths"]),j=h.price,w=h.nextBillAt,P=h.originalPricePerBillingPeriod,S=h.originalPricePerMonth,O=h.finalPricePerBillingPeriod,N=h.finalPricePerMonth,A=h.netPrice,k=h.netPriceNoDiscount,C=h.renewalPrice,I=h.calculatedDiscount,E=h.couponDetails,T=b&&x.straplineWithMessagingContent?x.straplineWithMessagingContent:x.strapline,D=b&&x.bulletPointsWithMessagingContent?x.bulletPointsWithMessagingContent:x.bulletPoints;return{isAvailable:!0,packageId:g,duration:v,currency:j.currency,currencySymbol:(0,_.vS)(j.currency),nextBillAt:w,originalPricePerBillingPeriod:P,originalPricePerMonth:S,finalPricePerBillingPeriod:O,finalPricePerMonth:N,netPrice:A.amount/100,netPriceNoDiscount:k,renewalPrice:C.amount/100,discount:I,freeTrialDuration:null!=(t=null==(r=h.couponDetails)?void 0:r.amount)?t:h.freeTrialDuration,group:eu(ec({},x),{strapline:T,bulletPoints:D,bgPrimaryColor:null==x||null==(i=x.style)||null==(n=i.bgPrimaryColor)?void 0:n.toLowerCase(),bgAdditionalColor:null==x||null==(o=x.style)||null==(a=o.bgAdditionalColor)?void 0:a.toLowerCase(),bgPromoColor:null==x||null==(s=x.style)||null==(l=s.bgPromoColor)?void 0:l.toLowerCase(),textPromoColor:null==x||null==(u=x.style)||null==(c=u.bgTextColor)?void 0:c.toLowerCase(),textColor:null==x||null==(f=x.style)||null==(d=f.textColor)?void 0:d.toLowerCase(),ctaVariant:null==x||null==(m
1=x.style)||null==(p=m.ctaVariant)?void 0:p.toLowerCase()}),couponDetails:E}},eh=r(90754),eb=r(749854);let ey=r.p+"925f38b3a2a72d88.png",eg=r.p+"8dfbdde6b8b8ca4c.png";var ev=r(31697),ex=function(){return[{id:"purchaseGiftPageFaq-1",title:"How will the gift subscription be delivered?",description:"A code will be emailed to your recipient so they can redeem their\n              gift subscription online. You can personalise it with a greeting\n              before purchasing."},{id:"purchaseGiftPageFaq-2",title:"When will the gift subscription be delivered?",description:"You can choose – it can be immediately or up to 90 days after\n              purchase. The recipient then has up to 365 days to redeem their\n              gift subscription after they receive it."},{id:"purchaseGiftPageFaq-3",title:"How is a gift subscription redeemed?",description:null,component:(0,i.jsxs)(i.Fragment,{children:["Your recipient can visit our ",(0,i.jsx)("a",{target:"_blank",rel:"noreferrer",href:"/gift-subscriptions/redeem",children:"gift subscription redemption page"})," and enter their unique code – they'll find it in the email we send to\n        them. "]})}]};ex();let ej=function(e){var t=e.backgroundImageLeft,r=e.backgroundImageRight,n=e.children;return(0,i.jsx)("div",{className:"bg-[length:20%_auto] bg-[position:left_top,right_top] bg-no-repeat max-md:!bg-none",style:{backgroundImage:"url(".concat(t,"), url(").concat(r,")")},children:n})};var ew=r(555006),eP=r(951904),eS=r(723539),eO=r(375934),eN=r(524079),eA={pageTitle:"Gift a Family History Subscription from Findmypast",socialMediaTitle:"Gift a Family History Subscription from Findmypast",metaDescription:"Connecting a loved one to their family history is one of the most special gifts you can give, explore gift subscriptions from Findmypast.",topBannerTitle:"Have you received a gift subscription?",topBannerLinkTitle:"Redeem gift",heroTitle:"There’s no present like their past",heroSubtitle:"Treat someone to a Findmypast gift subscription.",packagesTitle:"Choose a subscription for someone special",regularSubscriptionsLinkText:"View regular subscriptions",faqsTitle:"Got a question about Findmypast gift subscriptions?",bulletPointPromoTitle:"What’s in a Findmypast gift subscription?",bulletPointPromoSubtitle:"Whichever gift subscription you choose, they’ll be able to:",bulletPointPromoBulletPoints:["Create a family tree with help from our smart hints","Find relatives in our billions of family records","Search other people’s family trees for more stories","Contact people with shared ancestors","Keep their family history research safe and secure"],stepsSendItBrandName:"Findmypast",showPromoSection:!0,showReviewsSection:!0,faqsLink:"/help/articles/5659526713501-how-do-i-redeem-a-findmypast-gift-subscription"},ek={bna:{pageTitle:"Gift a British Newspaper Archive Subscription",socialMediaTitle:"Gift a British Newspaper Archive Subscription",metaDescription:"Give someone special access to historical newspapers with a British Newspaper Archive gift subscription.",topBannerTitle:"Have you received a gift subscription?",topBannerLinkTitle:"Redeem gift",heroTitle:"Explore history through the pages of the past",heroSubtitle:"Treat someone to a British Newspaper Archive gift subscription.",packagesTitle:"Choose a newspaper subscription for someone special",regularSubscriptionsLinkText:"View regular subscriptions",faqsTitle:"Got a question about British Newspaper Archive gift subscriptions?",bulletPointPromoTitle:"What’s in a British Newspaper Archive gift subscription?",bulletPointPromoSubtitle:" Whichever gift subscription you choose, they’ll be able to:",bulletPointPromoBulletPoints:["Explore centuries of historical newspapers online","Uncover fascinating stories from the communities, places and periods that interest them","Search by name, location, date or keyword","Discover first-hand accounts of historical events as they were reported at the time","Save articles and build their own collection of discoveries"],stepsSendItBrandName:"British Newspaper Archive",showPromoSection:!1,showReviewsSection:!1,faqsLink:"/help/articles/36054251403549-how-do-i-buy-redeem-a-british-newspaper-archive-gift-subscription"},default:eA},eC=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return ek[e]||eA};let eI=function(e){var t=e.title,r=void 0===t?eA.heroTitle:t,n=e.subt
1itle,a=void 0===n?eA.heroSubtitle:n;return(0,i.jsx)("div",{className:"flex justify-center px-6 pb-7 pt-8",children:(0,i.jsxs)("div",{className:"flex w-full max-w-5xl flex-col items-center justify-center gap-4",children:[(0,i.jsx)("h1",{className:"text-center text-2xl text-foreground lg:text-3xl",children:r}),(0,i.jsx)("h2",{className:"text-center text-xl text-foreground md:text-lg lg:text-xl",children:a})]})})},eE=function(e){var t=e.bulletPointPromoTitle,r=e.bulletPointPromoSubtitle,n=e.bulletPointPromoBulletPoints;return(0,i.jsx)("section",{className:"flex justify-center px-6",children:(0,i.jsx)("div",{className:"flex justify-center px-6",children:(0,i.jsxs)("div",{className:"w-full max-w-2xl text-left",children:[(0,i.jsx)("h2",{className:"mb-2 text-xl font-bold leading-tight text-foreground",children:void 0===t?"What’s in a Findmypast gift subscription?":t}),(0,i.jsx)("p",{className:"mb-2 text-base leading-normal text-foreground",children:void 0===r?"Whichever gift subscription you choose, they’ll be able to:":r}),(0,i.jsx)("ul",{className:"list-disc pl-5 text-base leading-normal text-foreground",children:(void 0===n?[]:n).map(function(e){return(0,i.jsx)("li",{children:e},e)})})]})})})};var eT=r(565099),eD=r(366527),eL=r(885939),eR=r(405862);function eF(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var eM=function(e){return((function(e){if(Array.isArray(e))return eF(e)})(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return eF(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eF(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return e-t})},e_=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=eM(e);return r&&e.includes(r)?r:t?n[0]:n[n.length-1]},eB=function(e){var t=e.durations,r=e.isFreeTrial,n=e.isUpgradeJourney,i=void 0!==n&&n,a=e.lastSubscription,o=e.userJourney,l=void 0===o?void 0:o,s=e.isFromSearch,c=e.isMobile,d=e.locale,f=!a,p=(null==a?void 0:a.state)==="EXPIRED",m=(u.VB.subscribe,u.VB.drawerSubscribe,void 0!==s&&s),h=(0,eL.i2)()&&m,b=e_(t),y=e_(t,!0);if(h||("en_AU"===d||"en_US"===d)&&!i)return b;switch(l){case u.VB.search:return e_(t,void 0!==c&&c);case u.VB.earlybird:return b;case u.Ky.newspapers:if(f)return y}if(p){if((null==(g=a.plan)?void 0:g.durationInMonths)===12)return b;if((null==(v=a.plan)?void 0:v.durationInMonths)===3){var g,v,x,j=eM(t);return null!=(x=j.find(function(e){return 3===e}))?x:j[0]}}return(0,u.tZ)(l)&&"MAIN"===(0,eR.A)(l).origin?e_(t,!1,3):i||!(void 0!==r&&r)?y:b},eU=r(401395);function eG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eq(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){eq(e,t,r[t])})}return e}function eV(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function eW(e,t){if(e){if("string"==typeof e)return eG(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eG(e,t)}}let eZ=function(e){var t,r=e.durations,n=e.couldSaveMore,o=e.onSelect,l=e.displayedDuration,s=e.isFreeTrial,c=e.isDrawer,u=void 0!==c&&c,d=(0,eD.U)("lg"),f=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(null))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||eW(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=f[0],m=f[1],h=(0,eU.A)(),b=((function(e){if(Array.isArray(e))return eG(e)})(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||eW(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort(function(e,t){return e-t}),y=b.find(function(e){return 6===e})?b.reduce(function(e,t){return eV(e$({},e),eq({},t,"".concat(t," month").concat(t>1?"s":"")))},{}):b.reduce(function(e,t){var r;switch(t){case 1:r="Monthly";break;case 3:r="Quarterly";break;case 12:r="Annual"}return eV(e$({},e),eq({},t,r))},{}),g=n&&12!==l&&1!==r.length;(0,a.useEffect)(function(){!l&&r.length?o(eB({durations:r,isFreeTrial:s,lastSubscription:h})):r.length&&l&&(null===p||p!==r.indexOf(l))&&m(r.indexOf(l))},[l,r,o,s,h,p]);var v=r.length>2,x=(0,a.useMemo)(function(){return v?u?{tailwind:"w-24",px:96,lgPx:96}:{tailwind:"w-24 lg:w-40",px:96,lgPx:160}:{tailwind:"lg:w-40 w-36",px:144,lgPx:160}},[v,u]),j=(0,a.useMemo)(function(){var e=4*(p+1),t=p*x.px+e,r=p*x.lgPx+e;return"".concat(d?r:t,"px")},[x,p,d]),w=(0,a.useMemo)(function(){var e="absolute flex h-6 items-center justify-center";return u?v?"".concat(e," bottom-full right-4"):"".concat(e," bottom-full right-12"):v?"".concat(e," max-lg:bottom-full max-lg:right-4 lg:left-full lg:top-1/2 lg:-mt-3"):"".concat(e," max-lg:bottom-full max-lg:right-12 lg:left-full lg:top-1/2 lg:-mt-3")},[v,u]),P=!l||!r.length||p!==r.indexOf(l);return(0,i.jsxs)("div",{className:"relative flex w-fit justify-center",children:[(0,i.jsxs)("div",{className:"relative flex h-12 items-center gap-1 rounded-full bg-grey-new-100 p-1",children:[P?null:b.map(function(e,t){return(0,i.jsx)("button",{onClick:function(){o(e),m(t)},className:"z-20 border-0 bg-transparent p-2 text-center ".concat(x.tailwind," ").concat(e===l?"font-medium":"text-grey-new-600"),children:y[e]},e)}),(0,i.jsx)("div",{className:"".concat(x.tailwind," absolute bottom-1 top-1 z-10 rounded-full bg-white-new transition-all duration-300 ease-out"),style:{left:j}})]}),!P&&g?(0,i.jsxs)("div",{className:w,children:[u?null:(0,i.jsx)("div",{className:"hidden border-b-[8px] border-r-[8px] border-t-[8px] border-solid border-b-transparent border-l-transparent border-r-yellow border-t-transparent lg:block"}),(0,i.jsx)("div",{className:"flex h-6 items-center justify-center whitespace-nowrap rounded-none bg-yellow px-3 py-2 text-xs font-semibold lg:rounded lg:px-2 lg:py-1.5 lg:text-sm",children:(0,i.jsxs)("span",{children:["Save ",n]})})]}):null]})};var eY=r(959458),eH=r(822727),ez=r(755342);let eK=function(){return(0,i.jsx)("div",{className:"mx-auto my-16 min-h-screen max-w-8",children:(0,i.jsx)(ez.I,{})})};var eJ=r(103233),eQ=r(926927),eX=r(891876),e0=r(687580),e1=r(321827),e2=r(320166);let e3=function(e){var t=e.isLoggedIn,r=e.hasOriginalPrice,n=function(e,t){if(null==e)return{};var r,n,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,r=Reflect.ownKeys(Object(e));i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=function(e,t){if(null==e)return{};var r,n,i={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,["isLoggedIn","hasOriginalPrice"]),l=(0,eP.L)().giftTrackActionAndLabel,c=(0,a.useContext)(k.A),u=c.brand,d=c.locale,f=(0,s.l)(),p=(0,o.useLocation)().pathname,m=(0,y.U)(f,p),h=new URLSearchParams({planid:n.packageId});m&&h.set("promocode",m);var b=(0,eJ.Q)({isFmpUk:"FMP"===u&&"en_GB"===d})[n.group.groupName],g=(0,_.vS)(n.currency)||n.currencySymbol,v=n.originalPricePerBillingPeriod!==n.finalPricePerBillingPeriod;return(0,i.jsxs)(eQ.A,{groupName:n.group.groupName.toLowerCase().replace(" ",""),className:n.recommended?"mt-8":void 0,children:[n.recommended?(0,i.jsx)(eX.A,{label:"Recommended"}):null,(0,i.jsx)(e0.A,{groupName:n.group.groupName,description:b.description,isHighlighted:"BNA"===u||"Everything"===n.group.groupName}),(0,i.jsx)("div",{className:"px-6",children:(0,i.jsxs)("div",{className:r?"flex min-h-[72px] flex-col items-start justify-end gap-1":"flex flex-col items-start gap-1",children:[v?(0,i.jsx)("p",{className:"text-lg text-muted-foreground line-through",children:"".concat(g).concat(n.originalPricePerBillingPeriod)}):null,(0,i.jsx)("span",{className:"text-2xl font-semibold text-foreground sm:text-3xl",children:"".concat(g).concat(n.finalPricePerBillingPeriod)})]})}),(0,i.jsx)(e1.A,{label:"Buy gift",as:eh.A,to:"/gift-subscriptions/purchase?".concat(h.toString()),"aria-label":"Package selection button",onClick:l({action:t?eS.YT:eO.dV,label:n.trackingLabel}),className:"font-medium"}),(0,i.jsx)(e2.A,{items:b.perks})]})},e4=function(e){var t=e.onDurationChange,r=e.durations,n=e.displayedDuration,l=e.displayedPackages,s=e.isLoading,c=e.userJourney,u=e.isLoggedIn,d=e.packagesTitle,f=e.regularSubscriptionsLinkText,p=(0,a.useContext)(k.A).brand,m=(0,eH.g)(),h=(0,eP.L)().giftTrackUserOrigin,b=(0,o.useLocation)(),y=(null==l?void 0:l.length)===1&&1===r.length,g=null==l?void 0:l.some(function(e){return(null==e?void 0:e.originalPricePerBillingPeriod)!==(null==e?void 0:e.finalPricePerBillingPeriod)});if((0,a.useEffect)(function(){h({location:b,action:u?eS.ao:eO.XV})()},[h,u,b]),s)return(0,i.jsx)(eK,{});var v=l.length,x=(0,eY.Wy)("/subscribe",{event_location:"gift_subscription"});return(0,i.jsxs)("div",{className:"flex flex-col items-center gap-4 px-6",children:[!y&&(0,i.jsxs)("div",{className:"flex flex-col items-center gap-10",children:[(0,i.jsx)("h2",{className:"text-center text-lg font-bold text-foreground",children:void 0===d?"Choose a subscription for someone special":d}),(0,i.jsx)("div",{className:"flex",children:(0,i.jsx)(eZ,{displayedDuration:n,durations:r,onSelect:function(e){return t({target:{value:e}})}})})]}),(0,i.jsx)("div",{className:(0,eT.Q)("flex w-full flex-col-reverse justify-center gap-6 direction-reverse md:grid md:direction-normal",1===v&&"md:grid-cols-[minmax(300px,500px)]",2===v&&"md:grid-cols-[repeat(2,minmax(300px,500px))]",v>=3&&"md:grid-cols-[repeat(2,minmax(300px,500px))] xl:grid-cols-[repeat(3,minmax(300px,500px))]"),children:l.map(function(e,t){return(0,i.jsx)(e3,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({isLoggedIn:u,userJourney:c,showDuration:y,hasOriginalPrice:g},e),t)})},"plan-cards"),"BNA"===p?(0,i.jsx)("div",{className:"flex w-full justify-center p-2",children:(0,i.jsxs)("p",{className:"text-center text-sm",children:["Subject to our fair usage policy. See our"," ",(0,i.jsx)("a",{href:m.terms,className:"text-link",target:"_blank",rel:"noreferrer",children:"Terms & Conditions"})," ","for more information."]})}):null,(0,i.jsx)("a",{className:"cursor-pointer text-sm text-link sm:text-base",href:x,children:void 0===f?"View regular subscriptions":f})]})};var e5=[{image:r.p+"a49e6e0dc0ea0bbc.png",title:"Why give a Findmypast subscription?",text:"Connecting a loved one to their family history is one of the most\nspecial gifts you can give. To kick off their journey of self-discovery,\nthey’ll get access to billions of family records, and help along the way from\nour clever family tree hints and friendly online community."},{image:r.p+"b852f58036b6a2df.png",title:"They can start a family tree too",text:"Once they make those early discoveries, they’ll be able to add them to\na family tree. That way they can visualise their family history, share it with\nothers, and watch the tree grow."}];let e6=function(){return(0,i.jsx)("div",{className:"flex justify-center px-6",children:(0,i.jsx)("div",{className:"flex w-full max-w-5xl flex-col gap-16",children:e5.map(function(e,t){var r=e.image,n=e.title,a=e.text;return(0,i.jsxs)("div",{className:(0,eT.Q)("grid grid-rows-[auto,auto] items-center gap-12 md:grid-rows-1",t%2!=0?"md:grid-cols-[minmax(auto,420px),minmax(200px,auto)] md:[&>*:first-child]:order-2":"md:grid-cols-[minmax(200px,auto),minmax(auto,420px)]"),children:[(0,i.jsx)("div",{className:"w-full max-w-lg bg-contain bg-center bg-no-repeat",children:(0,i.jsx)("img",{src:r,alt:""})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"mb-2 text-xl font-bold text-foreground",children:n}),(0,i.jsx)("div",{className:"max-w-md text-base text-foreground",children:a})]})]},n)})})})};var e8=r(351229),e7=r(763650),e9=r(988775),te=r(479293),tt=r(69122);let tr=r.p+"7f62dfec66bc4dc0.png",tn=r.p+"d4373f214726b9d6.png",ti=r.p+"ce26a16fc792204c.png";var ta=r(95022),to=r.n(ta),tl=function(e){var t=e.quote,r=e.customerName,n=e.scheme,a=e.marginLeft,o=e.marginTop;return(0,i.jsxs)(e7._1,{flexDirection:"column",justifyContent:"space-between",scheme:n,maxWidth:["none","400px"],ml:void 0===a?[0,0]:a,mt:void 0===o?[0,0]:o,children:[(0,i.jsxs)(tt.E,{fontStyle:"italic",className:"text-xl",children:['"',t,'"']}),(0,i.jsxs)("div",{children:[(0,i.jsxs)(e7._1,{py:3,children:[(0,i.jsx)(te._,{src:to(),width:"112px"}),(0,i.jsx)(ts,{fontStyle:"italic",className:"font-bold",children:r})]}),(0,i.jsx)("p",{className:"text-sm",children:"Review collected independently by Trustpilot"})]})]})},ts=(0,e8.default)(tt.E).withConfig({displayName:"_StyledText",componentId:"sc-7cc72f12-0"})(["margin-left:1rem"]);function tc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let tu=function(e){var t,r=e.title,n=function(e){if(Array.isArray(e))return e}(t=e.reviews)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return tc(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tc(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=n[0],o=n[1],l=e.scheme,s=void 0===l?"indigo":l,c=e.titleH;return(0,i.jsxs)(e7._1,{backgroundColor:"neutral"===s?"background":"indigo",color:"neutral"===s?"indigo":"white",alignItems:"center",justifyContent:{_:"flex-start",desktop:"center"},borderRadius:"0",overflow:"hidden",as:"aside","aria-labelledby":"trustpilot-title",children:[(0,i.jsx)(e9.a,{display:["none","block"],marginLeft:"-160px",marginTop:"-30px",children:(0,i.jsx)(te._,{src:tr,srcSet:"".concat(tn," 2x, ").concat(ti," 3x")})}),(0,i.jsxs)(e9.a,{py:9,px:4,maxWidth:"844px",children:[(0,i.jsx)(td,{as:void 0===c?"h3":c,color:"neutral"===s?"indigo":"ochre",id:"trustpilot-title",children:r}),(0,i.jsxs)(e7._1,{flexDirection:["column","row"],children:[(0,i.jsx)(tl,{quote:a.quote,customerName:a.customerName,scheme:s}),(0,i.jsx)(tl,{quote:o.quote,customerName:o.customerName,scheme:s,marginLeft:[
10,9],marginTop:[5,0]})]})]})]})};var td=(0,e8.default)(tt.E).withConfig({displayName:"_StyledText",componentId:"sc-6878ce6f-0"})(["margin-bottom:1rem"]);let tf=function(){return(0,i.jsx)("div",{className:"-mb-20",children:(0,i.jsx)(tu,{title:"What our customers say about us",titleH:"h2",reviews:[{quote:"This is an amazing website to delve into your past. I first used the site last year as a trial and became hooked. I now have over 1200 people linked to my name.",customerName:"Christine"},{quote:"I love this site. I find it incredibly valuable and worth the membership hands down. If I can’t find it anywhere else, it will be here.",customerName:"Brenda Guthrie"}]})})};var tp=[r.p+"3e9b70726d9b9db9.png",r.p+"84937ea4ba067594.png",r.p+"b97d84d65b6bd7a9.png"];let tm=function(e){var t=e.steps;return(0,i.jsxs)("section",{className:"flex flex-col gap-8 bg-background px-4 pb-20 text-foreground",children:[(0,i.jsx)("h2",{className:"text-center text-3xl",children:"What to do next"}),(0,i.jsx)("div",{className:"mx-auto flex w-full max-w-5xl flex-col items-center gap-8 md:flex-row md:items-start md:justify-between md:gap-20",children:t.map(function(e,t){return(0,i.jsxs)("div",{className:"flex flex-1 flex-col items-center gap-2 text-center",children:[(0,i.jsx)("img",{src:tp[t],alt:"",className:"h-12 w-12 object-contain"}),(0,i.jsx)("h3",{className:"text-lg font-bold",children:e.title}),(0,i.jsx)("div",{className:"max-w-sm text-sm md:max-w-full",children:e.content})]},e.title)})})]})},th=r.p+"4eb282d6e0b7e8b2.png",tb=r.p+"e7c5f770846e25b3.png",ty=r.p+"65042b81c7895be0.png";var tg=r(272381),tv=[tb,th,ty];let tx=function(e){var t=e.steps.map(function(e,t){var r,n;return r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e),n=n={image:tv[t],className:"bg-muted"},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r});return(0,i.jsx)(tg.A,{title:"What to do next",items:t,className:"bg-primary-inverted text-foreground"})},tj=function(e){var t=e.stepsSendItBrandName,r=(0,a.useContext)(k.w).brand,n=[{title:"Choose it",content:"Select the best subscription plan for your loved one. Then sign into your account or create a new one if you’re not a member."},{title:"Personalise it",content:"Add the recipient’s details, your chosen delivery date and a personalised message. Then make the purchase."},{title:"Send it",content:(0,i.jsxs)(i.Fragment,{children:["The"," ",(0,i.jsx)(eh.A,{target:"_blank",to:"/titan/marshal/gift-code/preview",children:"gift certificate"})," ","will be emailed on the nominated date, along with an introduction to"," ",t," and instructions on how to use the subscription."]})}];return"BNA"===r?(0,i.jsx)(tm,{steps:n}):(0,i.jsx)(tx,{steps:n})};function tw(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tw(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}let tS=function(e){var t=e.isPreviewLoading,r=e.previews,n=e.previewError,l=e.userJourney,s=e.isLoggedIn,c=(0,a.useContext)(k.w),u=c.countryCode,d=c.locale,p=c.rootDomain,m=c.giftSubscriptionCopyVariant,h=c.brand,b=(0,f.eY)("enable-private-messaging"),y=(0,eP.L)().giftTrackActionAndLabel,g=eC(m),v=ex(),x=(0,o.useLocation)().pathname,j=tP((0,a.useState)([]),2),w=j[0],P=j[1],S=tP((0,a.useState)(null),2),O=S[0],N=S[1],A=tP((0,a.useState)(null),2),D=A[0],L=A[1],R=tP((0,a.useState)(null),2),F=R[0],M=R[1],_=tP((0,a.useState)(null),2),B=_[0],U=_[1],G=tP((0,a.useState)(null),2),q=(G[0],G[1]),$="BNA"===h;(0,a.useEffect)(function(){if(!t&&!n){var e=r.map(function(e){return em({preview:e,showMessagingContent:!1,hideReferencesToStarter:!1})}),i=ep(r.map(function(e){var t,r,n,i,a,o;return a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e.plan),o=o={bgPrimaryColor:null==(t=e.plan.style.bgPrimaryColor)?void 0:t.toLowerCase(),bgAdditionalColor:null==(r=e.plan.style.bgAdditionalColor)?void 0:r.toLowerCase(),textColor:null==(n=e.plan.style.textColor)?void 0:n.toLowerCase(),ctaVariant:null==(i=e.plan.style.ctaVariant)?void 0:i.toLowerCase()},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(o)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(o,e))}),a})),a=Q(e),o=en(e,void 0,u,"giftSubscriptionPurchase"),l=e.map(function(e){return e.duration}).sort(function(e,t){return e-t})[0]||3;L(e),N(l),P(a),q(i),M(o)}},[t,r,n,l,u,b,d]),(0,a.useEffect)(function(){D&&F&&O&&U(ea(D,O,F,null,l))},[l,D,O,F]);var V=(0,a.useCallback)(function(e){var t=parseInt(e.target.value);N(t),y({action:s?eS.oX:eO.Vs,label:"".concat(t,"_month_toggle")})()},[y,s]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(T.s,{socialMediaTitle:g.socialMediaTitle,children:g.pageTitle}),(0,i.jsx)(E.y,{description:g.metaDescription,socialMediaDescription:g.metaDescription}),(0,i.jsx)(C.$,{rootDomain:p,path:x}),(0,i.jsx)(I.A,{path:x,rootDomain:p}),(0,i.jsx)(ew.A,{title:g.topBannerTitle,linkTitle:g.topBannerLinkTitle,link:"/gift-subscriptions/redeem?".concat(eN.ez,"=").concat(eN.HX),ariaLabel:"Redirect to redeem gift card page"}),(0,i.jsxs)("div",{className:"flex flex-col gap-20 bg-dark-cream lg:pt-8",children:[(0,i.jsxs)(ej,{backgroundImageLeft:$?null:ey,backgroundImageRight:$?null:eg,children:[(0,i.jsx)(eI,{title:g.heroTitle,subtitle:g.heroSubtitle}),n?(0,i.jsx)("div",{className:"flex flex-col items-center p-9 text-center",children:(0,i.jsxs)("div",{className:"flex max-w-lg flex-col items-center text-lg",children:[n,(0,i.jsx)(eb.$n,{maxWidth:"250px",mt:"10px",as:eh.A,to:"/help/contact",target:"_blank",children:"Contact customer support"})]})}):(0,i.jsx)(e4,{onDurationChange:V,durations:w,displayedDuration:O,displayedPackages:B,isLoading:!B||!w,userJourney:l,isLoggedIn:s,packagesTitle:g.packagesTitle,regularSubscriptionsLinkText:g.regularSubscriptionsLinkText})]}),(0,i.jsx)(eE,{bulletPointPromoTitle:g.bulletPointPromoTitle,bulletPointPromoSubtitle:g.bulletPointPromoSubtitle,bulletPointPromoBulletPoints:g.bulletPointPromoBulletPoints}),g.showPromoSection?(0,i.jsx)(e6,{}):null,(0,i.jsxs)("div",{children:[(0,i.jsx)(tj,{stepsSendItBrandName:g.stepsSendItBrandName}),g.showReviewsSection?(0,i.jsx)(tf,{}):null]}),(0,i.jsx)(ev.L,{title:g.faqsTitle,faqs:v,link:g.faqsLink})]})]})};var tO=r(743658),tN=r(1833),tA=r(395686),tk=r(354313);let tC=function(){return(0,i.jsx)("div",{className:"mx-auto my-16 min-h-screen max-w-8",children:(0,i.jsx)(ez.I,{})})};function tI(e){var t,r,n,a=e.upsell,c=e.isLoading,u=(0,l.Z2)().isAuthenticated,d=null==a?void 0:a.plan,f=(0,_.lX)({currency:null==a||null==(t=a.costToUpgrade)?void 0:t.currency,amount:null==a||null==(r=a.costToUpgrade)?void 0:r.amount}),p=(0,eP.L)().giftTrackActionAndLabel,m=(0,s.l)(),h=(0,o.useLocation)().pathname,b=(0,y.U)(m,h),g=new URLSearchParams({planid:null==a||null==(n=a.plan)?void 0:n.id});return b&&g.set("promocode",b),(0,i.jsx)("section",{children:(0,i.jsx)("div",{className:"relative hidden rounded bg-card p-3 sm:block",children:c?(0,i.jsx)(tC,{}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h4",{className:"text-lg leading-snug",children:"Why not give ".concat(null==d?void 0:d.groupName," instead?")}),(0,i.jsx)("div",{className:"mt-3"}),(0,i.jsx)("p",{children:null==d?void 0:d.upsellText.replace("{price}",f)}),(0,i.jsx)("div",{className:"mt-1"}),(0,i.jsx)(eb.$n,{variant:"aqua",className:"mt-5",as:eh.A,"aria-label":"Buy the ".concat(null==d?void 0:d.groupName," package"),to:"".concat(h,"?").concat(g.toString()),onClick:p({action:u?eS.wj:eO.Ri}),children:"Upgrade"})]})})})}var tE=r(921173),tT=r(306141),tD=r(5917),tL=r(56801),tR=r(312872);function tF(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var tM=function(e,t){var r,n=function(e){if(Array.isArray(e))return e}(r=(0,a.useState)(null))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(r)||function(e){if(e){if("string"==typeof e)return tF(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tF(e,2)}}
1(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],o=n[1],l=(0,h.useQuery)(tR.c2,{fetchPolicy:"no-cache",skip:e,notifyOnNetworkStatusChange:!0}),s=l.data,c=l.loading,u=l.error,d=l.networkStatus,f=l.refetch;return(0,a.useEffect)(function(){o(u)},[u]),(0,a.useEffect)(function(){t||o(null)},[t]),{userPaymentDetailsData:s,loadingUserPaymentDetails:c,userPaymentDetailsError:i,refetchingUserPaymentDetails:d===h.NetworkStatus.refetch,refetchUserPaymentDetails:(0,a.useCallback)(function(){return f()},[f])}};function t_(){var e,t,r=(e=["\n  mutation buyGiftCardV2(\n    $currency: Currency!\n    $price: Int!\n    $recipientEmail: String!\n    $recipientFirstName: String!\n    $recipientLastName: String!\n    $sendersName: String!\n    $deliverAt: String\n    $message: String\n    $billingInfo: BillingInfo\n    $promoCode: String\n    $planId: String\n    $gifterFirstName: String\n    $gifterLastName: String\n    $gifterEmail: String\n  ) {\n    buyGiftCardV2(\n      currency: $currency\n      price: $price\n      recipientEmail: $recipientEmail\n      recipientFirstName: $recipientFirstName\n      recipientLastName: $recipientLastName\n      deliverAt: $deliverAt\n      message: $message\n      billingInfo: $billingInfo\n      sendersName: $sendersName\n      promoCode: $promoCode\n      planId: $planId\n      gifterFirstName: $gifterFirstName\n      gifterLastName: $gifterLastName\n      gifterEmail: $gifterEmail\n    ) {\n      ... on PurchaseSuccessfulResult {\n        invoice {\n          id\n          item {\n            ... on PurchasedGiftCard {\n              giftCard {\n                id\n                expiresAt\n                recipient {\n                  email\n                }\n              }\n            }\n          }\n        }\n      }\n      ... on BillingFailureResult {\n        __typename\n        failureReason\n      }\n      ... on ThreeDSecureVerificationRequestedResult {\n        __typename\n        threeDSecureActionToken\n        billingToken\n      }\n    }\n  }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return t_=function(){return r},r}var tB=v()(t_());function tU(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}var tG=function(e){var t=e.recipientDetails,r=e.purchaseDetails,n=e.gifterDetails,o=(0,h.useApolloClient)(),l=tM(),c=l.userPaymentDetailsData,u=l.loadingUserPaymentDetails,d=l.userPaymentDetailsError,f=l.refetchUserPaymentDetails,p=(0,tE.useGoogleReCaptcha)().executeRecaptcha,m=(0,s.l)(),b=(0,a.useCallback)(function(e){var t,r=e.recipientDetails,n=e.purchaseDetails,i=e.billingInfo,a=e.queryVariables,l=e.gifterDetails,s=e.executeRecaptcha;return(t=function(){var e,t,c,u,d,f,p,m,h,b;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(y){switch(y.label){case 0:if(e=r.datetime,t=r.email,c=r.firstName,u=r.lastName,d=r.message,f=r.sendersName,p=n.price,m=n.plan,h=(null==a?void 0:a.promocode)||null,!s)return[2];return[4,s()];case 1:return b=y.sent(),[4,o.mutate({mutation:tB,context:{headers:{"x-captcha-token":b}},variables:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({currency:p.currency,price:p.amount,recipientEmail:t,recipientFirstName:c,recipientLastName:u,billingInfo:i,deliverAt:null!=e?e:void 0,message:null!=d?d:void 0,sendersName:f,promoCode:h,planId:m.id},l)})];case 2:return[2,y.sent().data.buyGiftCardV2]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){tU(a,n,i,o,l,"next",e)}function l(e){tU(a,n,i,o,l,"throw",e)}o(void 0)})})()},[o]),y=(0,a.useMemo)(function(){if(r&&r.plan&&r.plan.description)return r.plan.description.split(" ").join("_")},[r]);return u?(0,i.jsx)("div",{className:"flex w-full items-center justify-center px-0 py-12",children:(0,i.jsx)(ez.I,{className:"max-w-20"})}):d?(0,i.jsx)(tL._,{onRetry:f}):(0,i.jsxs)(i.Fragment,{children:[c.customer.savedPaymentDetails?(0,i.jsx)(tD.a,{onPayment:function(e){return b({recipientDetails:t,purchaseDetails:r,billingInfo:e,queryVariables:m,gifterDetails:n,executeRecaptcha:p})},checkoutActionType:"gift_card",paymentConfirmationRedirectUrl:"/gift-subscriptions/purchase/payment-confirmation",planDescription:y,purchaseDetails:r}):(0,i.jsx)(tT.t,{onPayment:function(e){return b({recipientDetails:t,purchaseDetails:r,billingInfo:e,queryVariables:m,gifterDetails:n,executeRecaptcha:p})},purchaseDetails:r,checkoutActionType:"gift_card",paymentConfirmationRedirectUrl:"/gift-subscriptions/purchase/payment-confirmation",planDescription:y}),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("p",{className:"px-2 text-sm",children:["This site is protected by reCAPTCHA and the Google"," ",(0,i.jsx)("a",{href:"https://policies.google.com/privacy",children:"Privacy Policy"})," and"," ",(0,i.jsx)("a",{href:"https://policies.google.com/terms",children:"Terms of Service"})," ","apply."]})})]})};function tq(e){var t=e.subscriptionPurchasePreviews,r=e.recipientDetails,n=e.planId,o=e.upsell,l=e.upsellError,s=e.isUpsellLoading,d=e.preview,f=e.gifterDetails,m=(0,c.d$)().track,h=t?t.find(function(e){return e.plan.id===n}):null;return((0,a.useEffect)(function(){h&&r&&m({category:"checkout_flow",eventAction:c.vm.EVENT_ACTION.PAYMENT,journey:u.VB.giftSubscriptionPurchase,eventLabel:c.vm.EVENT_LABEL.PAGE})},[m,h,r]),h&&h.plan)?r&&d?(0,i.jsx)(tN.O,{item:d,purchaseDetailsWidget:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(tO.A,{}),(0,i.jsx)(tk.i,{previewSubscriptionPlanPurchase:h,showDiscountSection:!1,appliedPromoCode:null,applyPromoCode:null,cancelPromoCode:null,promoCodeError:null,isFreeTrial:null}),!l&&(0,i.jsx)(tI,{upsell:o,isLoading:s})]}),checkoutWidget:(0,i.jsx)(tA.d,{heading:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"text-xl/6",children:"There is no present like their past"}),(0,i.jsx)("p",{className:"mt-3",children:"Input your payment details"})]}),body:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(tG,{recipientDetails:r,purchaseDetails:h,gifterDetails:f})})})}):((0,p.SE)("/gift-subscriptions/purchase?planid=".concat(n)),null):((0,p.SE)("/gift-subscriptions?".concat(eN.ez,"=").concat(eN.X5)),null)}var t$=r(638365),tV=r.n(t$),tW=r(361423),tZ=r(378692),tY=r(783293),tH=r(886957);let tz=r.p+"28ee83dc28ebc801.png",tK=r.p+"a51dcc1bb83dbaed.png";var tJ=r(292197),tQ=r.n(tJ);function tX(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t0(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function t1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tX(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tX(e,t)}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var t2=function(){var e=t1((0,a.useState)(!1),2),t=e[0],r=e[1],n=t1((0,a.useState)(!1),2),i=n[0],o=n[1];return[{isLoading:t,error:i},(0,a.useCallback)(function(e){var t;return(t=function(){var t,n,i,a;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:return r(!0),o(!1),[4,tQ()("/titan/marshal/print-gift-code/".concat(e))];case 1:if((t=l.sent()).ok)return[3,2];return o(!0),[3,4];case 2:return i=Blob.bind,[4,t.blob()];case 3:n=new(i.apply(Blob,[void 0,[l.sent()],{type:"application/pdf"}])),(a=document.createElement("a")).href=window.URL.createObjectURL(n),a.download="gift-code.pdf",a.click(),a.remove(),l.label=4;case 4:return r(!1),[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){t0(a,n,i,o,l,"next",e)}function l(e){t0(a,n,i,o,l,"throw",e)}o(void 0)})})()},[])]};function t3(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function t4(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var t5=function(e,t){switch(t.type){case"fetch/started":return t4(t3({},e),{isLoading:!0});case"fetch/done":return t4(t3({},e),{isLoading:!1,data:t.payload,error:null});case"fetch/error":return t4(t3({},e),{isLoading:!1,data:null,error:t.payload});default:return e}};function t6(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t8(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}var t7=function(e){var t,r=e.invoiceId,n=(0,h.useApolloClient)(),i=function(e){if(Array.isArray(e))return e}(t=(0,a.useReducer)(t5,{data:null,error:null,isLoading:!0}))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return t6(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return t6(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],l=i[1];return(0,a.useEffect)(function(){var e;(e=function(){var e;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:if(!r)return[2,l({type:"fetch/error",payload:"Invoice id was not provided"})];return l({type:"fetch/started"}),[4,n.query({query:tR.Zp,variables:{id:r}})];case 1:return(e=t.sent()).data.invoice?l({type:"fetch/done",payload:e.data}):l({type:"fetch/error",payload:"Invoice was not found"}),[2]}})},function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){t8(a,n,i,o,l,"next",e)}function l(e){t8(a,n,i,o,l,"throw",e)}o(void 0)})})()},[n,r,l]),o};function t9(){var e,t,r=(e=["\n  mutation affiliateGiftPurchase($data: LoggedOutGiftPurchaseInput) {\n    affiliateGiftPurchase(data: $data)\n  }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return t9=function(){return r},r}var re=v()(t9());function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rr(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function rn(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(e){rr(a,n,i,o,l,"next",e)}function l(e){rr(a,n,i,o,l,"throw",e)}o(void 0)})}}function ri(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var ra=tY.V,ro=tY.u,rl=function(e){var t,r,n=e.isLoggedIn,o=(0,f.eY)("enable-affiliates"),l=(0,s.l)(),d=(0,h.useApolloClient)(),p=(0,eP.L)().giftTrackActionAndLabel,m=function(e){if(Array.isArray(e))return e}(t=t2())||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return rt(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rt(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),b=m[0],y=m[1],g=tV()(l,function(e,t){return t.toLowerCase()}),v=g.invoiceid,x=g.pkg,j=t7({invoiceId:"string"==typeof v?v:null==v?void 0:v[0]}),w=j.isLoading,P=j.data,S=j.error,O=(0,c.d$)().track,N=(0,tW.M)().cookies,A=N.get("affiliateId"),k=N.get("affiliateArrivalTime"),C=(0,c.Xy)(),I=(0,a.useCallback)(function(){if(window)return window.innerWidth>1280?"desktop":window.innerWidth>768?"tablet":"mobile"},[]),E=(0,a.useCallback)(function(e){return rn(function(){var t;return ri(this,function(r){switch(r.label){case 0:return t={userId:"GUEST_USER",clickId:A,deviceType:I(),arrivedAt:k,payment:{id:e.id,description:"Gift Subscription Bought",createdAt:new Date().toISOString(),email:e.email,item:e.item,paid:e.paid,paidNet:e.paidNet,couponCodes:e.couponCodes}},[4,d.mutate({mutation:re,variables:{data:t}})];case 1:return r.sent(),[2]}})})()},[A,I,k,d]);if((0,a.useEffect)(function(){if(P){var e,t;O((e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},ro({invoiceData:P,pkg:x,isGiftUserUpgrading:null,userJourney:u.VB.giftSubscriptionPurchase})),t=t={eventLabel:c.vm.EVENT_LABEL.PAGE},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e))}},[O,P,x]),(0,a.useEffect)(function(){if(P){var e,t=ra(P,void 0,void 0,(null==x||null==(e=x.split("_"))?void 0:e.join(" "))||"");o&&A&&E(P.invoice),C(t)}},[P,x,E,o,A,C]),w)return(0,i.jsx)("div",{className:"flex h-[100vh] items-center justify-center",children:(0,i.jsx)("span",{className:"w-20",children:(0,i.jsx)(ez.I,{})})});if(S)throw Error(S);var T=P.invoice,D=T.number,L=T.paymentMethod,R=T.item,F=R.giftCard.recipient.email,M=R.giftCard.expiresAt;return(0,i.jsxs)("section",{className:"mx-auto max-w-4xl p-2 pt-4 md:pt-8",children:[(0,i.jsx)(tO.A,{}),(0,i.jsxs)("div",{className:"grid grid-rows-[200px_auto] gap-4 rounded-lg bg-card p-6 md:grid-cols-2 md:grid-rows-1 md:p-8",children:[(0,i.jsxs)("div",{className:"grid h-48 w-64 grid-rows-[auto_42px_25px] self-center justify-self-center rounded-lg bg-card-foreground md:w-72",children:[(0,i.jsx)("div",{className:"flex items-center justify-center pt-6",children:(0,i.jsx)("img",{className:"h-auto w-24",src:tz,"aria-hidden":"true",alt:""})}),(0,i.jsxs)("div",{className:"text-foreground-inverted",children:[(0,i.jsx)("p",{className:"text-center text-lg font-bold",children:"Gift subscription"}),(0,i.jsx)("p",{className:"text-center text-xs",children:"There's no present like their past"})]}),(0,i.jsx)("img",{src:tK,alt:"","aria-hidden":"true",className:"self-end"})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,i.jsxs)("div",{className:"flex flex-col items-center gap-4 md:flex-row",children:[(0,i.jsx)(tH.I,{name:"check_circle",filled:!0,className:"text-5xl text-success"}),(0,i.jsx)("h1",{className:"text-center text-4xl font-normal",children:"Great, that's done!"})]}),(0,i.jsx)("p",{children:"Your gift is scheduled for sending."}),(0,i.jsxs)("p",{children:["We'll send it to ",(0,i.jsx)("b",{children:F})," on the date you selected, with your message and a unique gift code. This code must be redeemed by"," ",(r=new Date(M),"".concat(r.getDate(),"/").concat(r.getMonth()+1,"/").concat(r.getFullYear()))," "]}),(0,i.jsxs)("p",{className:"text-lg",children:[(0,i.jsx)("span",{className:"pr-1 text-lg",children:"Reference:"}),(0,i.jsx)("span",{className:"break-words text-base font-bold",children:D})]}),(0,i.jsx)("div",{className:"flex flex-row flex-wrap items-center",children:L&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"pr-1 text-lg",children:"Payment Method:"}),(0,i.jsx)("span",{className:"break-words text-base font-bold",children:(0,i.jsx)(tZ.jx,{details:L})})]})}),(0,i.jsxs)("div",{className:"flex w-full flex-col items-center gap-4 md:max-w-72",children:[(0,i.jsx)(eb.$n,{type:"button",onClick:function(){return rn(function(){var e;return ri(this,function(t){return e=P.invoice.item.giftCard.redemptionCode,p({action:n?eS.lT:eO.WS})(),y(e),[2]})})()},disabled:b.isLoading,className:"w-full",children:b.isLoading?"Downloading...":"Download gift certificate"}),b.error&&(0,i.jsx)("p",{className:"mt-1 text-center text-sm text-coral",children:"Failed to download a PDF. Something went wrong on our end."}),(0,i.jsx)(eb.$n,{variant:"light-outlined",as:eh.A,to:"/",onClick:p({action:n?eS.u6:eO.dH}),className:"w-full",children:"Continue"})]})]})]})]})},rs=r(732616);function rc(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}var ru=function(e){var t=(0,h.useApolloClient)(),r=(0,s.l)(),n=(0,o.useLocation)().pathname;return{fetchPreview:(0,a.useCallback)(function(i){var a;return(a=function(i){var a,o,l,s,c,u,d,f,p,m;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(h){switch(h.label){case 0:return a=i.recipientDetails,o=i.price,l=a.datetime,s=a.email,c=a.firstName,u=a.lastName,d=a.message,f=a.sendersName,p=(0,y.U)(r,n),[4,t.mutate({mutation:tR.iZ,variables:{currency:o.currency,price:o.amount,recipientEmail:s,recipientFirstName:c,recipientLastName:u,deliverAt:null!=l?l:void 0,message:null!=d?d:void 0,sendersName:f,planId:e,promoCode:p}})];case 1:if("PreviewGiftCardPurchaseSuccessful"===(m=h.sent().data.previewGiftCardPurchaseV2).__typename)return[2,{preview:m.preview,error:null}];return[2,{preview:null,error:m.failureReason}]}})},function(){var e=this,t=arguments;return new Promise(function(r,n){var i=a.apply(e,t);function o(e){rc(i,r,n,o,l,"next",e)}function l(e){rc(i,r,n,o,l,"throw",e)}o(void 0)})}).apply(this,arguments)},[t,n,e,r])}},rd=r(381864),rf=r.n(rd),rp=r(774521),rm=r.n(rp),rh=r(944248),rb=r.n(rh);function ry(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function rg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}rf().extend(rm()),rf().extend(rb());var rv=function(e){var t=e.setRecipientDetails,r=e.planId,n=e.fetchPreview,i=e.setValidationError,a=e.setGiftCardPreview,o=e.price;return function(e,l){var s;return(s=function(){var s,c,u,d,f;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(m){switch(m.label){case 0:if(s=rg({},e),e.datetime){var h,b,y;h=e.datetime,c=rf().tz(new Date(h),"UTC").format("YYYY-MM-DDTHH:mm"),b=rg({},s),y=y={datetime:c},Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(y)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(y)).forEach(function(e){Object.defineProperty(b,e,Object.getOwnPropertyDescriptor(y,e))}),s=b}return[4,n({recipientDetails:s,price:o})];case 1:return d=(u=m.sent()).preview,f=u.error,l(!1),f?i(f):(a(d),t(s),(0,p.VJ)("/gift-subscriptions/purchase/payment?planid=".concat(r))),[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,n){var i=s.apply(e,t);function a(e){ry(i,r,n,a,o,"next",e)}function o(e){ry(i,r,n,a,o,"throw",e)}a(void 0)})})()}};function rx(e){var t=e.children;return(0,i.jsxs)("section",{children:[(0,i.jsx)("div",{className:"rounded-t-card bg-primary p-6 text-primary-foreground",children:(0,i.jsx)("p",{className:"text-2xl font-bold",children:"Make it personal"})}),(0,i.jsx)("div",{className:"relative rounded-b-card bg-white p-4",children:t})]})}var rj=r(995089),rw=r(978785),rP=r(542396),rS=r(21150),rO=r(404302);function rN(e,t){if(null==e)return{};var r,n,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,r=Reflect.ownKeys(Object(e));i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=function(e,t){if(null==e)return{};var r,n,i={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}var rA=(0,r(668312).tv)({base:["peer","w-4","h-4","mr-2","border","border-solid","border-indigo","rounded-[100%]","relative","transition-all","duration-200","ease-in-out","outline-none","appearance-none","self-center","cursor-pointer","[&+label]:cursor-pointer","disabled:cursor-not-allowed","[&+label]:disabled:cursor-not-allowed","[&+label]:disabled:text-grey-50",'before:content-[""]',"before:block","before:absolute","before:w-0","before:h-0","before:top-[50%]","before:left-[50%]","before:translate-x-[-50%]","before:translate-y-[-50%]","before:bg-indigo","before:rounded-[100%]","before:transition-all","before:duration-200","before:ease-in-out","before:checked:w-2","before:checked:h-2","before:checked:flex","before:checked:align-middle"]}),rk=function(e){var t=e.label,r=e.id,n=rN(e,["label","id"]);n.className,n.style;var a=rN(n,["className","style"]);return(0,i.jsxs)("span",{className:"flex items-center",children:[(0,i.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({type:"radio",id:r,className:rA()},a)),t&&(0,i.jsx)("label",{htmlFor:r,className:"peer:disabled:text-grey-50",children:t})]})},rC=r(796476);function rI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rE(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function rT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rI(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var rD=function(){var e=rT((0,a.useState)(!1),2),t=e[0],r=e[1],n=rT((0,a.useState)(!1),2),i=n[0],o=n[1];return[{isLoading:t,error:i},(0,a.useCallback)(function(e){var t;return(t=function(){var t,n,i,a;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:return r(!0),o(!1),[4,tQ()("/titan/marshal/print-gift-code/preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:if((t=l.sent()).ok)return[3,2];return o(!0),[3,4];case 2:return i=Blob.bind,[4,t.blob()];case 3:n=new(i.apply(Blob,[void 0,[l.sent()],{type:"application/pdf"}])),(a=document.createElement("a")).href=window.URL.createObjectURL(n),a.download="gift-code.pdf",a.click(),a.remove(),l.label=4;case 4:return r(!1),[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){rE(a,n,i,o,l,"next",e)}function l(e){rE(a,n,i,o,l,"throw",e)}o(void 0)})})()},[])]},rL=r(803492),rR=r.n(rL),rF=function(){return rf()().add(2,"hour")},rM=function(){return rf()().add(3,"month")},r_=function(e){var t=rF().toDate();return rf()(e).isAfter(t)},rB=function(e){var t=rM().toDate();return rf()(e).isBefore(t,"minute")},rU=function(e){var t;return(t=e.selectedDate,rf()(t).isSame(rf()(),"date"))?{min:rF().toDate(),max:rR()(new Date,23)}:{max:void 0,min:void 0}},rG=r(95025),rq=r.n(rG);function r$(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var rV=function(e){var t,r=e.form,n=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(new Date))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return r$(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r$(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=n[0],l=n[1],s=(0,a.useMemo)(function(){return rU({selectedDate:o})},[o]),c=r.errors.datetime;return(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)(rq(),{dateFormat:"dd/MM/yyyy HH:mm",selected:r.values.datetime?new Date(r.values.datetime):null,onChange:function(e){l(e||new Date),r.setFieldValue("datetime",e?new Date(e):null)},showTimeSelect:!0,timeFormat:"HH:mm",timeIntervals:60,disabled:"now"===r.values.whenToSendEmail,minDate:rF().toDate(),maxDate:rM().toDate(),minTime:s.min,maxTime:s.max,className:"h-6 w-[170px] border-0 px-3 text-base text-foreground disabled:bg-background-disabled disabled:text-muted-foreground"}),(0,i.jsx)(tH.I,{name:"calendar_month",className:"h-8 w-6"})]}),c?(0,i.jsxs)("div",{className:"flex max-w-[260px] items-start gap-2 text-error",children:[(0,i.jsx)(tH.I,{name:"warning",className:"mt-0.5 h-4 w-4 shrink-0 text-error",filled:!0}),(0,i.jsx)("span",{className:"text-sm leading-4",children:c})]}):null]})};function rW(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rZ(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function rY(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rW(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rW(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}rP.addMethod(rP.date,"yupValidateDate",function(e){return this.test("test-when-to-send-date",e,function(t){var r=this.path,n=this.createError;return(0,rw.isNull)(t)||r_(t)&&rB(t)||n({path:r,message:e})})});var rH=rP.object().shape({firstName:rP.string().required("First name is required"),lastName:rP.string().required("Last name is required"),email:rP.string().email("Email is invalid").required("Email is required"),whenToSendEmail:rP.string().required("Please choose when to send the gift subscription"),message:rP.string().max(255),datetime:rP.date().yupValidateDate("Please pick a date with at least a 2 hour delay & within 3 months").nullable(),sendersName:rP.string().required("Sender name is required")}),rz=rP.object().shape({gifterFirstName:rP.string().required("First name is required"),gifterLastName:rP.string().required("Last name is required"),gifterEmail:rP.string().email("Email is invalid").required("Email is required")});function rK(e){var t=e.form;return(0,i.jsxs)("div",{className:"mb-3 flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xl leading-6",children:"Sender's Details"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"gifterFirstName",className:"text-base leading-6",children:"Your first name (max 30 characters)"}),(0,i.jsx)(rO.k,{type:"text",name:"gifterFirstName",maxLength:30,required:!0,value:t.values.gifterFirstName,onChange:t.handleChange,onBlur:t.handleBlur})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"gifterLastName",className:"text-base leading-6",children:"Your last name (max 30 characters)"}),(0,i.jsx)(rO.k,{type:"text",name:"gifterLastName",maxLength:30,required:!0,value:t.values.gifterLastName,onChange:t.handleChange,onBlur:t.handleBlur})]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,i.jsx)("label",{htmlFor:"gifterEmail",className:"text-base leading-6",children:"Your email"}),(0,i.jsx)(rO.k,{type:"email",name:"gifterEmail",required:!0,value:t.values.gifterEmail,onChange:t.handleChange,onBlur:t.handleBlur})]})]})]})}let rJ=function(e){var t=e.planId,r=e.handleSubmit,n=e.validationError,o=(0,l.Z2)().isAuthenticated,s=!o,c=s?rH.concat(rz):rH,u=(0,eP.L)(),d=u.giftTrackActionAndLabel,f=u.giftingTrackFormFill,p=rY((0,a.useState)(!1),2),m=p[0],h=p[1],b=rY((0,a.useState)(!1),2),y=b[0],g=b[1],v=rY(rD(),2),x=v[0],j=v[1],w=(0,a.useCallback)(function(e){return f({action:e.action,field:e.field,emailTracked:m,personalMsgTracked:y,setPersonalMsgTracked:g,setEmailTracked:h})},[m,f,y]),P=function(e){var r;return(r=function(){return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,j({giftPlanId:t,deliverAt:e.datetime,message:e.message||null,recipientEmail:e.email,recipientFirstName:e.firstName,recipientLastName:e.lastName,sendersName:e.sendersName})];case 1:return r.sent(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(e){rZ(a,n,i,o,l,"next",e)}function l(e){rZ(a,n,i,o,l,"throw",e)}o(void 0)})})()};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(rj.Formik,{onSubmit:function(e,t){var n=t.setSubmitting;d({action:o?eS.m2:eO.NK})(),r(e,n)},enableReinitialize:!0,initialValues:{firstName:"",lastName:"",email:"",whenToSendEmail:"now",datetime:null,message:"",sendersName:""},validationSchema:c,children:function(e){return(0,i.jsx)("form",{"aria-label":"recipient details form",onSubmit:e.handleSubmit,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[s&&(0,i.jsx)(rK,{form:e}),(0,i.jsx)("p",{className:"text-xl leading-6",children:"Recipient's Details"}),n?(0,i.jsx)(rS.F.Root,{variant:"error","aria-live":"assertive",children:"Sorry, something went wrong. Please contact support if the issue persists"}):null,(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("div",{children:(0,i.jsx)("p",{className:"text-sm",children:"We'll send them a code by email. Their gift subscription will start once they redeem their code"})}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("label",{htmlFor:"firstName",className:"text-base leading-6",children:"First name (max 30 characters)"}),(0,i.jsx)(rO.k,{id:"firstName",type:"text",name:"firstName",maxLength:30,required:!0,value:e.values.firstName,onChange:e.handleChange,onBlur:e.handleBlur})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("label",{htmlFor:"lastName",className:"text-base leading-6",children:"Last name (max 30 characters)"}),(0,i.jsx)(rO.k,{id:"lastName",type:"text",name:"lastName",maxLength:30,required:!0,value:e.values.lastName,onChange:e.handleChange,onBlur:e.handleBlur})]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-1",children:[(0,i.jsx)("div",{className:"flex flex-col gap-1",children:(0,i.jsx)("label",{htmlFor:"email",className:"text-base leading-6",children:"Recipient's email"})}),(0,i.jsx)(rO.k,{onInput:w({action:o?eS.Zl:eO.as,field:"email"}),id:"email",type:"email",name:"email",required:!0,value:e.values.email,onChange:e.handleChange,onBlur:e.handleBlur})]}),(0,i.jsx)("p",{className:"text-base leading-6",children:"When should we send it?"}),(0,i.jsx)("p",{className:"text-sm",children:"They can redeem their subscription any time within 365 days of receiving it."}),(0,i.jsxs)("div",{className:"grid grid-cols-1 items-center gap-3 md:grid-cols-2",children:[(0,i.jsxs)("div",{className:"grid grid-cols-1 items-center gap-3 sm:grid-cols-2",children:[(0,i.jsx)(rk,{label:"Today",value:"now",checked:"now"===e.values.whenToSendEmail,name:"whenToSendEmail",onChange:function(){w({action:o?eS.He:eO.c0})(),e.setFieldValue("whenToSendEmail","now"),e.setFieldValue("datetime",null),e.setFieldTouched("datetime",!1,!1),e.setFieldError("datetime",void 0)}}),(0,i.jsx)(rk,{label:"A later date",value:"later",name:"whenToSendEmail",onChange:function(){w({action:o?eS.U9:eO.hg})(),e.setFieldValue("whenToSendEmail","later")}})]}),(0,i.jsx)(rV,{form:e})]}),(0,i.jsx)("label",{htmlFor:"message",className:"text-base leading-6",children:"Personal message (max 220 characters)"}),(0,i.jsx)(rC.A,{id:"message",rows:5,onInput:w({action:o?eS.$n:eO.sj,field:"message"}),label:"Personal message (max 220 characters)",placeholder:"Write your optional message",name:"message",maxLength:220,value:e.values.message,onChange:e.handleChange,onBlur:e.handleBlur}),(0,i.jsxs)("div",{className:"flex w-full flex-col gap-1 md:w-[360px]",children:[(0,i.jsx)("label",{htmlFor:"sendersName",className:"text-base leading-6",children:"From (max 30 characters)"}),(0,i.jsx)(rO.k,{id:"sendersName",type:"text",placeholder:"Sender's name",name:"sendersName",maxLength:30,required:!0,className:"w-full md:w-60",value:e.values.sendersName,onChange:e.handleChange,onBlur:e.handleBlur})]})]}),(0,i.jsxs)("div",{className:"flex flex-col-reverse md:flex-row",children:[(0,i.jsx)(eb.$n,{className:"mt-4 w-full md:mr-8 md:mt-0 md:max-w-44",disabled:!e.isValid||!e.dirty||x.isLoading,onClick:function(){return P(e.values)},children:"View gift certificate"}),(0,i.jsxs)("div",{className:"flex w-full flex-col-reverse gap-6 md:flex-row md:justify-end",children:[(0,i.jsx)(eb.$n,{as:eh.A,variant:"secondary",className:"mt-4 w-full md:mt-0 md:max-w-44","aria-label":"back to package selection page",to:"/gift-subscriptions?".concat(eN.ez,"=").concat(eN.lp),children:"Back"}),(0,i.jsx)(eb.$n,{type:"submit","aria-label":"submit form",className:"w-full md:max-w-44",disabled:!e.isValid&&!e.dirty,children:"Next"})]})]})]})})}})})};function rQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let rX=function(e){var t,r=e.previews,n=e.setRecipientDetails,o=e.planId,l=e.upsell,s=e.isUpsellLoading,c=e.upsellError,u=e.setGiftCardPreview,d=e.isPreviewLoading,f
1=ru(o).fetchPreview,m=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)())||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return rQ(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return rQ(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=m[0],b=m[1],y=r?r.find(function(e){return e.plan.id===o}):null;if(!o||!y&&!d)return(0,p.SE)("/gift-subscriptions?".concat(eN.ez,"=").concat(eN.sf)),null;var g=rv({setRecipientDetails:n,planId:o,fetchPreview:f,setValidationError:b,setGiftCardPreview:u,price:null==y?void 0:y.price});return(0,i.jsxs)("div",{className:"p-4 md:p-8",children:[(0,i.jsx)(tO.A,{}),(0,i.jsx)("div",{className:"mx-auto max-w-5xl",children:(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[1fr_2fr]",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(tk.i,{previewSubscriptionPlanPurchase:y,showDiscountSection:!1,appliedPromoCode:null,applyPromoCode:null,cancelPromoCode:null,promoCodeError:null,isFreeTrial:null}),c?null:(0,i.jsx)(tI,{upsell:l,isLoading:s}),(0,i.jsx)(rs.gs,{})]}),(0,i.jsx)(rx,{children:(0,i.jsx)(rJ,{validationError:h,planId:o,handleSubmit:g})})]})})]})};function r0(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r0(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return r0(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var r2="purchase",r3="".concat(r2,"/").concat("payment"),r4="".concat(r2,"/").concat("payment-confirmation");let r5=function(){var e=(0,s.l)(),t=e.planid,r=e.promocode,n=(0,o.useLocation)(),h=n.pathname,b=n.search,y=(0,l.Z2)().isAuthenticated,g=(0,c.d$)().track,v=(0,f.eY)("enable-automatic-coupon-code-for-gift-subscribe-and-upgrade-pages"),x=null==v?void 0:v.promoCode;(0,a.useEffect)(function(){if(!r&&x){var e=b?"&":"?";(0,p.SE)("".concat(h).concat(b).concat(e,"promocode=").concat(x))}},[b,h,x,r]);var j=A(),w=j.previews,P=j.isLoading,S=j.error,O=r1((0,a.useState)(null),2),N=O[0],k=O[1],C=r1((0,a.useState)(null),2),I=C[0],E=C[1],T=(0,d.M)({planId:t,promoCode:x}),D=T.data,L=T.isLoading,R=T.error;(0,a.useEffect)(function(){"/gift-subscriptions"===h&&g({category:"checkout_flow",eventAction:c.vm.EVENT_ACTION.PAYWALL,journey:u.VB.giftSubscriptionPurchase,eventLabel:c.vm.EVENT_LABEL.PAGE})},[g,h]);var F=N||{},M=F.gifterEmail,_=F.gifterFirstName,B=F.gifterLastName;return(0,i.jsxs)(m.i,{children:[(0,i.jsx)(o.Route,{index:!0,element:(0,i.jsx)(tS,{isPreviewLoading:P,previews:w,previewError:S,userJourney:u.VB.giftSubscriptionPurchase,isLoggedIn:y})}),(0,i.jsx)(o.Route,{path:r2,element:(0,i.jsx)(rX,{previews:w,isPreviewLoading:P,setRecipientDetails:k,planId:t,upsell:D,isUpsellLoading:L,upsellError:R,setGiftCardPreview:E})}),(0,i.jsx)(o.Route,{path:r3,element:(0,i.jsx)(tq,{subscriptionPurchasePreviews:w,recipientDetails:N,planId:t,upsell:D,isUpsellLoading:L,upsellError:R,preview:I,gifterDetails:{gifterFirstName:_,gifterLastName:B,gifterEmail:M}})}),(0,i.jsx)(o.Route,{path:r4,element:(0,i.jsx)(rl,{isLoggedIn:y})})]})}},287834(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>eF}
1);var n=r(629901),i=r(775641),a=r(771889),o=r(135704),l=r(462957),s=r(275494),c=r(665053),u=r(951904);let d=r.p+"f237f84cc844e86a.png";var f=r(387858),p=r(69638),m=r(90754),h=r(886957);let b=function(){var e=(0,i.useContext)(f.w),t=e.supportEmailAddress,r=e.supportPhoneNumber;return(0,n.jsxs)("div",{className:"hidden flex-col items-start justify-start gap-3 text-left md:flex",children:[r?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h.I,{name:"phone_in_talk",filled:!0}),(0,n.jsxs)("div",{className:"inline-block text-left",children:[(0,n.jsx)("a",{href:"tel: ".concat(r.replace(/[()\s]/g,"")),className:"text-sm font-bold text-primary-foreground",children:r}),(0,n.jsxs)("p",{className:"text-sm",children:["(Open Mon-Fri, 9am-5pm ",(0,p.r)(),", local\xa0charges\xa0apply)"]})]})]}):null,t?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h.I,{name:"mail",filled:!0}),(0,n.jsx)("div",{className:"inline-block text-left",children:(0,n.jsx)("p",{className:"text-sm",children:(0,n.jsx)("a",{href:"mailto: ".concat(t),className:"font-bold text-primary-foreground",children:t})})})]}):null,(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(h.I,{name:"question_mark",filled:!0}),(0,n.jsx)("div",{className:"text-left",children:(0,n.jsxs)("p",{className:"text-sm",children:["Check out our"," ",(0,n.jsx)(m.A,{to:"/help",className:"font-bold text-primary-foreground",children:"FAQ page"})]})})]})]})};var y=r(749854),g=r(819786),v=r(118909);let x=function(){return"BNA"===(0,i.useContext)(f.A).brand?(0,n.jsx)(g.C,{className:"m-8 h-4 w-auto text-primary-foreground"}):(0,n.jsx)(v.r,{className:"m-8 h-7 w-auto text-primary-foreground",variant:"white-new"})};var j=function(){(0,i.useEffect)(function(){return document.body.style.overflow="hidden",function(){document.body.style.overflow="auto"}},[])};let w=function(e){var t=e.titleImage,r=e.title,i=e.upperSubtitle,a=e.lowerSubtitle,o=e.children;return j(),(0,n.jsxs)("div",{className:"fixed inset-0 z-[9999] flex flex-col gap-16 overflow-auto bg-primary p-4 md:py-8",children:[(0,n.jsx)("div",{className:"flex w-full",children:(0,n.jsx)(m.A,{to:"/",children:(0,n.jsx)(x,{})})}),(0,n.jsx)("div",{className:"w-full text-primary-foreground",children:(0,n.jsx)("div",{className:"flex flex-col items-center justify-center text-center",children:(0,n.jsxs)("div",{className:"flex w-full max-w-3xl flex-col items-center gap-4 px-4",children:[t&&(0,n.jsx)("img",{alt:"",src:t,className:"w-36 md:w-64"}),r&&(0,n.jsx)("h1",{className:"text-xl md:text-3xl",children:r}),i&&(0,n.jsx)("p",{className:"text-lg font-light md:text-2xl",children:i}),(0,n.jsxs)("div",{className:"mt-4 flex w-full flex-col items-center justify-stretch gap-4",children:[a&&(0,n.jsx)("p",{className:"text-md md:text-lg",children:a}),o]}),(0,n.jsx)("div",{className:"mt-4 w-full max-w-36",children:(0,n.jsx)(y.$n,{variant:"primary-inverted",as:m.A,to:"/gift-subscriptions/redeem/code",className:"w-full",children:"Back"})})]})})})]})},P=function(){return(0,n.jsx)(w,{titleImage:d,title:"This code has expired",upperSubtitle:"It looks like your code can't be used. Sorry\xa0about\xa0that.",lowerSubtitle:"Please contact Customer Support and they'll see what they can do for you.",children:(0,n.jsx)(b,{})})},S=function(){return(0,n.jsx)(w,{titleImage:d,title:"This code is invalid",upperSubtitle:"It looks like your code can't be used. Sorry\xa0about\xa0that.",lowerSubtitle:"Please contact Customer Support and they'll see what they can do for you.",children:(0,n.jsx)(b,{})})},O=r.p+"e01b9ec88d93aee9.png",N=function(){return(0,n.jsx)(w,{titleImage:O,title:"Sorry, this code has already been redeemed",upperSubtitle:"All codes can only be used once.",lowerSubtitle:"Please contact Customer Support and they'll see what they can do for you.",children:(0,n.jsx)(b,{})})},A=function(){return(0,n.jsx)(w,{titleImage:d,title:"There has been an error in redeeming your gift",upperSubtitle:"It looks like we have run into an issue. Sorry\xa0about\xa0that.",lowerSubtitle:"Please contact Customer Support and they'll see what they can do for you.",children:(0,n.jsx)(b,{})})};var k=r(381864),C=r.n(k),I=r(385001),E=r(867819);let T=function(){var e,t,r=(0,E.c)().data,i=null==r||null==(t=r.customer)||null==(e=t.lastSubscription)?void 0:e.expiresAt;return(0,n.jsx)(w,{titleImage:O,title:"It looks like you already have a subscription with us",lowerSubtitle:"To redeem your gift subscription, please cancel your current subscription and attempt to redeem your gift subscription on ".concat(C()(i).format("DD MMM YYYY")),children:(0,n.jsx)(y.$n,{className:"mb-6 w-full max-w-56",variant:"cta",as:m.A,to:"/account/subscription?cancelSubscription=true",onClick:function(){(0,I.UP)("my_subscription_cancel_subscription_click","my_subscription")},children:"Cancel subscription"})})},D=function(e){var t=e.error,r=(0,u.L)().giftingTrackError;switch((0,i.useEffect)(function(){r(t)()},[t,r]),t){case"code_is_expired":return(0,n.jsx)(P,{});case"code_is_not_valid":case"gift_card_was_not_found":return(0,n.jsx)(S,{});case"code_is_already_redeemed":return(0,n.jsx)(N,{});case"customer_has_active_subscription":return(0,n.jsx)(T,{});default:return(0,n.jsx)(A,{})}};var L=r(443114),R=r(679145),F=r(367450),M=r(695821),_=r(619455);let B=r.p+"a581cd6107f31f05.png",U=r.p+"13847936eb2f9ee6.png";var G=r(366527);
1let q=r.p+"78a083557980dd2c.png",$=function(e){var t=e.withTitle,r=e.children,a=e.backgroundImageLeft,o=e.backgroundImageRight,l=i.useContext(f.w).giftSubscriptionCopyVariant,s=(0,G.U)("lg"),c="bna"===l;return(0,n.jsx)("div",{className:"relative flex w-full items-end justify-center rounded-none bg-primary bg-contain bg-no-repeat pt-6 md:min-h-96 md:items-center md:px-2 md:pb-6",style:{backgroundImage:s&&a&&o?"url(".concat(a,"), url(").concat(o,")"):"none",backgroundPosition:"left center, right center"},children:(0,n.jsxs)("div",{className:"flex w-full flex-col items-center justify-center gap-4 md:gap-8",children:[t&&(0,n.jsx)("div",{className:"w-full max-w-[580px] px-3 md:max-w-2xl lg:max-h-10",children:c?(0,n.jsx)("h1",{className:"w-full text-center text-2xl text-foreground-inverted md:text-3xl lg:max-w-[635px]",children:"Explore history through the pages of the past"}):(0,n.jsx)("img",{src:q,alt:"There's no present like your past"})}),(0,n.jsx)("div",{className:c?"flex w-[90%] max-w-3xl flex-col items-center gap-8 rounded-xl bg-card px-4 py-8 lg:w-[754px] lg:justify-center":"flex w-full flex-col items-center justify-center rounded-none bg-primary-inverted px-4 py-9 md:max-w-fit md:rounded-lg md:px-14 lg:max-w-[980px]",children:r})]})})};var V=r(31697),W=r(555006),Z=r(723539),Y=r(524079),H=r(500838),z={pageTitle:"Redeem a Family History Gift Subscription from Findmypast",socialMediaTitle:"Redeem a Family History Gift Subscription from Findmypast",metaDescription:"Activate your family history gift subscription from Findmypast and get started today.",topBannerTitle:"Buying a gift subscription for someone else?",topBannerLinkTitle:"Purchase gift",topBannerRequiredFeatures:[H.A.GIFT_PURCHASE_ANY],features:[{title:"Build your family tree",content:"Add all your discoveries to a family tree, and watch it grow."},{title:"Search for records",content:"Find relatives and ancestors in family records."},{title:"Find historical photographs",content:"Find photos of your ancestors in other Findmypast members' trees."}],faqsTitle:"Got a question about Findmypast gift subscriptions?",faqsLink:"/help/articles/5659526713501-how-do-i-redeem-a-findmypast-gift-subscription",faqs:[{id:"redeemGiftPagefaq-1",title:"When can I redeem my gift subscription?",description:"You have up to 365 days to redeem your gift subscription after you receive it by email."},{id:"redeemGiftPagefaq-2",title:"When will my gift subscription end?",description:"It depends on the gift you received - check your email to see how long it will last. When your gift subscription is coming to an end, we’ll remind you that you can continue your family history journey by entering your billing details and becoming a paying subscriber."},{id:"redeemGiftPagefaq-3",title:"I’m already a Findmypast subscriber. Can I redeem a gift subscription?",description:"No, you’ll need to wait until your active Findmypast subscription ends."}]},K={bna:{pageTitle:"Redeem a British Newspaper Archive Gift Subscription",socialMediaTitle:"Redeem a British Newspaper Archive Gift Subscription",metaDescription:"Activate your British Newspaper Archive gift subscription and start exploring historical newspapers today.",topBannerTitle:"Buying a gift subscription for someone else?",topBannerLinkTitle:"Purchase gift",topBannerRequiredFeatures:[H.A.GIFT_PURCHASE_ANY],showFeaturesSection:!1,faqsTitle:"Got a question about British Newspaper Archive gift subscriptions?",faqsLink:"/help/articles/36054251403549-how-do-i-buy-redeem-a-british-newspaper-archive-gift-subscription",faqs:[{id:"redeemGiftPagefaq-1",title:"When can I redeem my gift subscription?",description:"You have up to 365 days to redeem your gift subscription after you receive it by email."},{id:"redeemGiftPagefaq-2",title:"When will my gift subscription end?",description:"It depends on the gift you received - check your email to see how long it will last. When your gift subscription is coming to an end, we’ll remind you that you can continue exploring the British Newspaper Archive by entering your billing details and becoming a paying subscriber."},{id:"redeemGiftPagefaq-3",title:"I’m already a British Newspaper Archive subscriber. Can I redeem a gift subscription?",description:"No, you’ll need to wait until your active British Newspaper Archive subscription ends."}]},default:z},J=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return K[e]||z};let Q=r.p+"5427ce0fad6fe42e.png",X=r.p+"f14fd8d243abc0fc.png";var ee=r(272381),et=[X,O,Q];let er=function(e){var t=e.possibilities.map(function(e,t){var r,n;return r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},e),n=n={image:et[t],className:"bg-primary-inverted"},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r});return(0,n.jsx)(ee.A,{className:"bg-muted text-foreground",items:t})};var en=r(839490),ei=r(755342),ea=r(404302),eo=r(271221),el=r(312872),es=r(600001);function ec(){var e,t,r=(e=["\n  mutation redeemGiftCard($code: String!) {\n    redeemGiftCard(code: $code) {\n      __typename\n\n      ... on RedeemGiftCardSuccessful {\n        invoice {\n          id\n          item {\n            ... on PurchasedPlan {\n              plan {\n                id\n                name\n              }\n            }\n          }\n        }\n      }\n\n      ... on RedeemGiftCardFailure {\n        failureReason\n      }\n    }\n  }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return ec=function(){return r},r}var eu=r.n(es)()(ec());function ed(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function ef(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}var ep=function(e){var t,r=e.onSuccessfulRedeem,n=e.onFailedRedeem,a=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(!1))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return ed(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ed(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=a[0],l=a[1],s=(0,eo.useApolloClient)(),c=(0,u.L)().giftTrackActionAndLabel;return{isLoading:o,redeemGiftCard:(0,i.useCallback)(function(e){var t;return(t=function(){var t,i,a,o,u;return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(d){switch(d.label){case 0:l(!0),d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,s.mutate({mutation:eu,variables:{code:e},refetchQueries:[{query:el.Rq}]})];case 2:return"RedeemGiftCardSuccessful"===(t=d.sent().data.redeemGiftCard).__typename?(a=(i=t.invoice.item.plan).name,o=i.id,u="".concat(a,"#").concat(o),c({action:Z.nb,label:u})(),r(t.invoice)):n(t.failureReason),[3,5];case 3:return d.sent(),n("upstream_error"),[3,5];case 4:return l(!1),[7];case 5:return[2]}})},function(){var e=this,r=arguments;
1return new Promise(function(n,i){var a=t.apply(e,r);function o(e){ef(a,n,i,o,l,"next",e)}function l(e){ef(a,n,i,o,l,"throw",e)}o(void 0)})})()},[s,c,r,n])}};function em(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}let eh=function(e){var t,r=e.onSuccessfulRedeem,a=e.onFailedRedeem,o=(0,u.L)().giftTrackActionAndLabel,l=function(e){if(Array.isArray(e))return e}(t=(0,i.useState)(""))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i=[],a=!0,o=!1;try{for(n=n.call(e);!(a=(t=n.next()).done)&&(i.push(t.value),2!==i.length);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(o)throw r}}return i}}(t)||function(e){if(e){if("string"==typeof e)return em(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return em(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=l[0],c=l[1],d=(0,en.l)()["redeem-code"];(0,i.useEffect)(function(){d&&c(d)},[d]);var f=ep({onSuccessfulRedeem:r,onFailedRedeem:a}),p=f.redeemGiftCard,m=f.isLoading;return(0,n.jsx)("div",{className:"flex flex-col items-center justify-center gap-8",children:m?(0,n.jsx)("div",{className:"w-16",children:(0,n.jsx)(ei.I,{})}):(0,n.jsx)(L.i8.Wrapper,{features:[H.A.GIFT_REDEEM_CLAIM],onGrantsError:"DENY_ACCESS",fallback:function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:"text-center text-2xl md:text-3xl",children:"Gift redemption is not available"}),(0,n.jsx)("p",{children:"Please contact our Customer Service team if you need support."})]})},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:"text-center text-2xl md:text-3xl",children:"Let’s redeem your gift subscription"}),(0,n.jsxs)("div",{className:"grid w-full grid-rows-2 gap-5 md:grid-cols-[auto,160px] md:grid-rows-1",children:[(0,n.jsx)(ea.k,{value:s,onChange:function(e){c(e.target.value)},placeholder:"Apply gift code",className:"w-full"}),(0,n.jsx)(y.$n,{onClick:function(){s&&(o({action:Z._w,label:s})(),p(s))},size:"regular",variant:"primary","aria-label":"gift-card-input-submit-button",children:"Redeem Gift"})]})]})})})},eb=function(){var e=(0,u.L)().giftTrackUserOrigin,t=(0,a.useLocation)();return"bna"===(0,i.useContext)(f.w).giftSubscriptionCopyVariant?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:"w-full text-center text-2xl text-foreground md:text-3xl",children:"Let’s redeem your gift subscription"}),(0,n.jsxs)("div",{className:"flex w-72 flex-col items-center gap-3",children:[(0,n.jsx)(y.$n,{as:m.A,to:"/gift-subscriptions/redeem/code",onClick:e({location:t,action:Z.AU}),className:"w-44 justify-center bg-cta text-foreground hover:opacity-90 active:opacity-80",children:"Sign up & redeem"}),(0,n.jsx)(m.A,{to:"/gift-subscriptions/redeem/code",className:"flex h-8 w-full items-center justify-center text-center text-base text-link-foreground no-underline hover:underline",children:"Already have an account? Log in"})]})]}):(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-8",children:[(0,n.jsx)("h1",{className:"text-center text-2xl md:text-3xl",children:"Let’s redeem your gift subscription"}),(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(y.$n,{as:m.A,to:"/gift-subscriptions/redeem/code",onClick:e({location:t,action:Z.AU}),size:"regular",variant:"primary",children:"Sign up & redeem gift"}),(0,n.jsxs)("p",{children:["Already have an account?"," ",(0,n.jsx)(m.A,{to:"/gift-subscriptions/redeem/code",children:"Log in"})]})]})]})},ey=function(e){var t=e.isLoggedIn,r=e.onSuccessfulRedeem,o=e.onFailedRedeem,l=(0,i.useContext)(f.w),s=l.rootDomain,c=l.giftSubscriptionCopyVariant,d=(0,u.L)().giftTrackUserOrigin,p=(0,a.useLocation)(),m=J(c),h="bna"===c;return(0,i.useEffect)(function(){d({location:p,action:Z.Zj})()},[d,p]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_.s,{socialMediaTitle:m.socialMediaTitle,children:m.pageTitle}),(0,n.jsx)(M.y,{description:m.metaDescription,socialMediaDescription:m.metaDescription}),(0,n.jsx)(R.$,{rootDomain:s,path:p.pathname}),(0,n.jsx)(F.A,{path:p.pathname,rootDomain:s}),(0,n.jsx)(L.i8.Wrapper,{features:m.topBannerRequiredFeatures,onGrantsError:"DENY_ACCESS",children:(0,n.jsx)(W.A,{title:m.topBannerTitle,linkTitle:m.topBannerLinkTitle,link:"/gift-subscriptions?".concat(Y.ez,"=").concat(Y.$7),ariaLabel:"Redirect to purchase gift card page"})}),(0,n.jsx)($,{withTitle:!0,backgroundImageLeft:h?null:B,backgroundImageRight:h?null:U,children:t?(0,n.jsx)(eh,{onSuccessfulRedeem:r,onFailedRedeem:o}):(0,n.jsx)(eb,{})}),m.showFeaturesSection?(0,n.jsx)(er,{possibilities:m.features}):null,(0,n.jsx)(V.L,{title:m.faqsTitle,faqs:m.faqs,link:m.faqsLink})]})},eg=r.p+"26817ad27709a915.png";var ev=r(565099);let ex=function(e){var t,r,i=e.className,a=function(e,t){if(null==e)return{};var r,n,i,a={};if("u">typeof Reflect&&Reflect.ownKeys){for(i=0,r=Reflect.ownKeys(Object(e));i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=function(e,t){if(null==e)return{};var r,n,i={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r]);return i}(e,t),Object.getOwnPropertySymbols)for(i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)n=r[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,["className"]);return(0,n.jsx)(m.A,(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({className:(0,ev.Q)("block w-fit",i)},a),r=r={to:"/",children:(0,n.jsx)(x,{})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t))};var ej=r(995089),ew=r(542396),eP=ew.object().shape({code:ew.string().required("Code is required")});let eS=function(e){var t=e.handleSubmit;return(0,n.jsx)(ej.Formik,{onSubmit:t,enableReinitialize:!0,initialValues:{code:""},validationSchema:eP,children:function(e){return(0,n.jsx)("form",{"aria-label":"redeem code form",onSubmit:e.handleSubmit,children:(0,n.jsxs)("div",{className:"w-[310px] md:w-[500px]",children:[(0,n.jsx)("h2",{className:"text-center text-2xl lg:text-left lg:text-3xl",children:"Use Your Gift Code"}),(0,n.jsxs)("div",{className:"m-0 flex flex-col items-center justify-center p-0 md:w-full lg:flex-row",children:[(0,n.jsx)("div",{className:"w-4/5",children:(0,n.jsx)(ea.k,{id:"code",type:"text",name:"code",required:!0,value:e.values.code,onChange:e.handleChange,onBlur:e.handleBlur})}),(0,n.jsx)(y.$n,{type:"submit","aria-label":"submit form",disabled:!e.isValid&&!e.dirty,className:"mx-2.5 my-5 w-28",children:"Use Code"})]})]})})}})},eO=function(e){var t=e.children;return(0,n.jsx)("section",{className:"relative flex w-full items-center justify-center rounded-none bg-primary p-4",children:(0,n.jsx)("div",{className:"flex h-auto min-h-[265px] w-full max-w-[980px] flex-col items-center justify-center rounded-lg bg-primary-inverted px-2 pb-6 pt-6 md:h-[193px] xl:h-[280px]",children:t})})},eN=function(e){var t=e.onSuccessfulRedeem,r=e.onFailedRedeem,a=(0,i.useContext)(f.w),o=a.giftSubscriptionCopyVariant,l=a.brand;j();var s=ep({onSuccessfulRedeem:t,onFailedRedeem:r}).redeemGiftCard;return(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex overflow-auto bg-dark-blue",children:[(0,n.jsx)(ex,{}),(0,n.jsxs)("div",{className:"absolute top-28 flex w-full flex-col items-center justify-center md:top-48 lg:top-40",children:[(0,n.jsxs)("div",{className:"flex w-full flex-col items-center",children:[(0,n.jsx)("img",{src:eg,alt:"",className:"w-32 lg:w-44"}),"bna"===o||"BNA"===l?(0,n.jsx)("h1",{className:"mb-5 mt-12 w-3/5 min-w-72 text-center text-2xl leading-tight text-white-new md:w-full md:max-w-xl",children:"Explore history through the pages of the past"}):(0,n.jsx)("img",{src:q,alt:"There's no present like your past",className:"mt-12 w-4/5 min-w-72 md:w-1/2"})]}),(0,n.jsx)(eO,{children:(0,n.jsx)(eS,{handleSubmit:function(e){var t=e.code;t&&s(t)}})})]})]})},eA=r.p+"62a0775b614cb9f4.png",ek=r.p+"31066a647e584cdb.png";var eC=r(296797),eI=function(e){var t="search-world-records";switch(e){case"findmypast.co.uk":t="search-united-kingdom-records";break;case"findmypast.com.au":case"findmypast.com":t="search-world-records";break;case"findmypast.ie":t="search-ireland-records";break;default:return"/search/historical-records"}return(0,eC.H)(t,e,"search")},eE=function(e){var t=e.backgroundImage;return(0,n.jsx)("div",{className:"mx-auto mb-4 h-[120px] w-[90%] bg-primary",style:{maskImage:"url(".concat(t,")"),WebkitMaskImage:"url(".concat(t,")"),maskPosition:"center",WebkitMaskPosition:"center",maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskSize:"contain",WebkitMaskSize:"contain"}})},eT=function(e){var t=e.title,r=e.content;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eE,{backgroundImage:t.backgroundImage}),(0,n.jsx)("p",{className:"mb-2 text-center text-base font-bold text-foreground",children:t.text}),(0,n.jsx)("p",{className:"text-center text-sm text-foreground",children:r})]})};let eD=function(e){var t,r,s=e.invoice,c=(0,o.Z2)().user,d=i.useContext(f.w),p=d.rootDomain,m=d.brand,h=(0,u.L)().giftTrackActionAndLabel,b=(0,i.useCallback)(function(e){return function(){h({action:e})()}}
1,[h]);if(j(),!s)return(0,l.SE)("/gift-subscriptions/redeem"),null;var y=null==c?void 0:c.given_name,g=null==s||null==(r=s.item)||null==(t=r.plan)?void 0:t.name;return(0,n.jsxs)("main",{className:"fixed inset-0 z-[9999] flex flex-col overflow-auto bg-primary px-6 py-3",children:[(0,n.jsx)(a.Link,{to:"/",children:(0,n.jsx)(x,{})}),(0,n.jsxs)("div",{className:"flex h-full flex-col items-center justify-start sm:justify-center",children:[(0,n.jsx)("h1",{className:"pb-1 text-center text-xl font-bold text-foreground-inverted sm:pb-2 sm:text-2xl md:text-3xl lg:text-4xl",children:"BNA"===m?y?"Welcome, ".concat(y,"!"):"Welcome to The British Newspaper Archive!":y?"Welcome to Findmypast, ".concat(y,"!"):"Welcome to Findmypast!"}),(0,n.jsxs)("p",{className:"pb-4 text-center text-base font-light text-foreground-inverted sm:pb-6 sm:text-xl md:text-2xl lg:pb-8 lg:text-3xl",children:[g," Subscription will start from today."]}),(0,n.jsx)("p",{className:"pb-3 text-center text-xl font-light text-foreground-inverted sm:pb-4 sm:text-2xl md:text-3xl",children:"What would you like to do?"}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row",children:[(0,n.jsx)(L.i8.Wrapper,{features:[H.A.TREE],onGrantsError:"DENY_ACCESS",children:(0,n.jsx)(a.Link,{to:"/family-tree/create",onClick:b(Z.Kd),className:"mb-3 h-auto w-[250px] rounded bg-cta p-[18px] !no-underline hover:bg-cta-hover sm:mb-0 sm:mr-6 sm:h-[260px] sm:w-[280px]",children:(0,n.jsx)(eT,{title:{text:"Start family tree",backgroundImage:eA},content:"Preserve and hand down your legacy on a family tree. We’ll help you as you go along."})})}),(0,n.jsxs)(L.i8.Switch,{onGrantsError:"DENY_ACCESS",children:[(0,n.jsx)(L.i8.Case,{features:[H.A.RECORD_SEARCH],children:(0,n.jsx)("a",{href:eI(p),onClick:b(Z.Mt),className:"h-auto w-[250px] rounded bg-cta p-[18px] !no-underline hover:bg-cta-hover sm:h-[260px] sm:w-[280px]",children:(0,n.jsx)(eT,{title:{text:"Search family records",backgroundImage:ek},content:"Your ancestors lived remarkable lives. Find their stories using civil records and newspapers."})})}),(0,n.jsx)(L.i8.Case,{features:[H.A.NEWSPAPERS_SEARCH_ANY],children:(0,n.jsx)("a",{href:"/search-newspapers/titles?sid=101",onClick:b(Z.Mt),className:"h-auto w-[250px] rounded bg-cta p-[18px] !no-underline hover:bg-cta-hover sm:h-[260px] sm:w-[280px]",children:(0,n.jsx)(eT,{title:{text:"Search newspapers",backgroundImage:ek},content:"Your ancestors lived remarkable lives. Find their stories using our newspapers and collections."})})})]})]})]})]})};function eL(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eL(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eL(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}let eF=function(){var e=(0,o.Z2)().isAuthenticated,t=eR((0,i.useState)(null),2),r=t[0],u=t[1],d=eR((0,i.useState)(null),2),f=d[0],p=d[1],m=function(e){u(e),(0,l.SE)("/gift-subscriptions/redeem/success")},h=function(e){p(e),(0,l.SE)("/gift-subscriptions/redeem/error")};return(0,n.jsxs)(s.i,{children:[(0,n.jsx)(a.Route,{index:!0,element:(0,n.jsx)(ey,{isLoggedIn:e,onSuccessfulRedeem:m,onFailedRedeem:h})}),(0,n.jsx)(a.Route,{path:"code",element:(0,n.jsx)(c._,{children:(0,n.jsx)(eN,{onSuccessfulRedeem:m,onFailedRedeem:h})})}),(0,n.jsx)(a.Route,{path:"success",element:(0,n.jsx)(c._,{children:(0,n.jsx)(eD,{invoice:r})})}),(0,n.jsx)(a.Route,{path:"error",element:(0,n.jsx)(c._,{children:(0,n.jsx)(D,{error:f})})})]})}},367450(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(629901);r(775641);
1var i=r(239469),a=r(512013),o=r.n(a),l=r(296797),s=r(462957),c=r(785281),u=r.n(c),d=["en_AU","en_GB","en_IE","en_US"];function f(e){var t,r=e.path,a=e.rootDomain,c=e.locales,f=void 0===c?d:c,p=e.xdefault,m=void 0===p?"en_GB":p;o().ok(a,"rootDomain must be defined.");var h=[];if(a===u().partnership.SHA.rootDomain)h=[u().partnership.SHA],t=a;else{if(h=(f.length?f:d).map(function(e){return(0,s.FE)(e)}),m&&!f.includes(m))throw Error('The list of locales does not include the one used as the "x-default"');t=(0,s.FE)(m).rootDomain}return(0,n.jsxs)(i.mg,{children:[h.map(function(e){var t=e.rootDomain,i=e.hrefLang,a=(0,l.H)(r,t,"www");return(0,n.jsx)("link",{rel:"alternate",href:a,hrefLang:i,"data-testid":"helmet-link"},i)}),(0,n.jsx)("link",{rel:"alternate",href:(0,l.H)(r,t,"www"),hrefLang:"x-default","data-testid":"helmet-link"})]})}},867819(e,t,r){"use strict";r.d(t,{c:()=>c});var n=r(775641),i=r(271221),a=r(610334);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t,r,n,i,a,o){try{var l=e[a](o),s=l.value}catch(e){r(e);return}l.done?t(s):Promise.resolve(s).then(n,i)}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(r=i.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,n=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var c=function(){var e=(0,i.useApolloClient)(),t=s((0,n.useState)(null),2),r=t[0],o=t[1],c=s((0,n.useState)(void 0),2),u=c[0],d=c[1];return(0,n.useEffect)(function(){var t;(t=function(){return function(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(o,"next",{value:s(0)}),l(o,"throw",{value:s(1)}),l(o,"return",{value:s(2)}),"function"==typeof Symbol&&l(o,Symbol.iterator,{value:function(){return this}}),o;function s(l){return function(s){var c=[l,s];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(6===c[0]&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.query({query:a.O1,fetchPolicy:"no-cache"})];case 1:return o(t.sent().data.customer),[3,3];case 2:return d(t.sent()),[3,3];case 3:return[2]}})},function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(e){l(a,n,i,o,s,"next",e)}function s(e){l(a,n,i,o,s,"throw",e)}o(void 0)})})()},[e]),{isLoading:!r&&!u,error:u,data:u?null:r}}},783293(e,t,r){"use strict";r.d(t,{V:()=>s,u:()=>c});var n=r(436190),i=r.n(n),a=r(578046),o=r(370673),l=r(794073);function s(e){var t,r,n,a,s,c,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=arguments.length>2&&void 0!==arguments[2]&&arguments[2],p=arguments.length>3?arguments[3]:void 0,m=e.invoice,h=m.transactionCategory,b=m.item,y=m.paid,g=m.paidNet,v=m.paidNormalizedInGbp,x=m.paymentMethod,j=m.couponCodes,w=(0,o.Sj)(y),P=(0,o.Sj)(g),S=(0,o.Sj)({amount:v}),O=function(e){return e.trim().replace(/^(AU |IE |US )*| /gm,"").replace("subscription","Subscription")};switch(b.__typename){case"PurchasedPlan":case"FreeTrialUpgradePlan":r="Subscription",n="Subscription",a=b.plan;break;case"PurchasedRecord":r="Micropayment",n="PPV",a=b.record;break;case"PurchasedGiftCard":n="Subscription",s=!0,c="".concat(O(p).replace(/&| /gm,"And"),"_GiftCard"),r="GiftCard",a={description:"Gift Card",id:""};break;default:throw Error("Failed to determine purchased item type for GA tracking")}u=x?(null==x?void 0:x.__typename)==="CreditCardDisplayDetails"?"WP":"PP":"FreeTrial";
1var N=x?"CardInput":"FreeTrial",A=(0,l.VM)(h)?"micro_".concat(b.record.type?b.record.type.toLowerCase():b.record.type,"_").concat(f?"1921":"non-1921"):O(a.description),k=null;if(j&&j[0])k=j[0];else if(d&&d.couponDetails){var C=d.couponDetails,I=C.amount,E=C.label;I&&E&&(k="".concat(I,"-").concat(i()(E)))}return{event:"transaction",eventCategory:n,eventAction:"Transaction",transactionId:m.number,transactionType:r,transactionTotal:w,transactionTotalNet:P,transactionTotalGBP:S,transactionCurrency:y.currency,transactionProductName:s?c:A,transactionProducts:[{sku:a.id,name:s?c:a.description,price:w,priceGBP:S,quantity:1}],transactionPaymentProvider:u,trans_cat:(0,l.Is)(h),transactionIsUpgrade:(0,l.JR)(h),transactionPaymentMethod:N,promotion_type:"0",transactionPromoCode:k,isfreetrial:!(0,l.VM)(h)&&(null==b||null==(t=b.subscriptionContract)?void 0:t.isFreeTrial)}}function c(e){var t,r=e.invoiceData,n=e.pkg,i=e.isGiftUserUpgrading,o=e.userJourney,s=r.invoice,c=s.transactionCategory,u=s.item;switch(u.__typename){case"PurchasedPlan":case"FreeTrialUpgradePlan":t=u.plan;break;case"PurchasedRecord":t=u.record;break;case"PurchasedGiftCard":t={description:n};break;default:throw Error("Failed to determine purchased item type for GA tracking")}var d=t.description.replace(/ /g,"_").toLowerCase();return((0,l.JR)(c)||i)&&(d=d.replace(/subscription/g,"upgrade")),"RECORD"===s.transactionCategory&&(d=null),{eventAction:a.vm.EVENT_ACTION.PAYMENT_CONFIRMATION,journey:o,packageType:d}}},69638(e,t,r){"use strict";r.d(t,{r:()=>n});var n=function(){return new Date().toLocaleString("en-GB",{timeZone:"Europe/London",timeZoneName:"short"}).slice(-3)}}}]);
2//# sourceMappingURL=gift-subscription-landing-page.98103f1f39d73d40.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.