SUBSCRIPTION ONLY
AI is set to change TV in 2026.ADWEEK, Getty
By Bill Bradley Is the ad industry headed for ChatGP-TV?
AI was all the rage in presentations at 2025’s TV upfront week, and throughout the year, publishers have worked to deliver on lofty promises—bringing more targeted virtual product placement, AI-generated creative to get advertisers closer to content, and contextual targeting to reach consumers in real-time.
So where does the industry go from here?
As ADWEEK’s end-of-year wrap-up continues, we spoke with ad sales chiefs and senior buy-side and sell-side media executives to hear how they think AI will change the TV and media landscape in 2026.
Here’s what they had to say:
Jay Askinasi, chief revenue officer, Paramount Skydance: AI will be the engine behind smarter monetization—especially unlocking commerce-driven capabilities for small and medium-sized marketers.
* Valid email addresses that are supported: *
* - niceandsimple@example.com
* - very.common@example.com
* - a.little.lengthy.but.fine@dept.example.com
* - disposable.style.email.with+symbol@example.com
* - other.email-with-dash@example.com
* - "much.more unusual"@example.com
* - "very.unusual.@.unusual.com"@example.com
* - #!$%&\'*+-/=?^_\`{}|~@example.org
* - " "@example.org
* - üñîçøðé@üñîçøðé.com
* - admin@mailserver1
* - user@tt
* - "hi"@example.com
* - jsmith@[192.168.2.1]
* - jsmith@[IPv6:2001:db8::1]
* - email@123.123.123.123
* - "()[]:,;@\\\"!#$%&\'*+-/=?^_\`{}| ~.a"@example.org
* - abc."defghi".xyz@example.com
* - _______@example.com
* - very.unusual."@".unusual.com@example.com
* - john.smith(comment)@example.com
* - (comment)john.smith@example.com
* - "()[]:,;@\\\"!#$%&\'*+-/=?^_\`{}| ~.a"(comment)@example.org
*
* * Valid (but rare) email addresses that are not supported: * * - "very.(),:;[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
* - "()[]:,;@\"!#$%&\'*+-/=?^_\`{}| ~.a"@example.org
* - abc."d\"efghi".xyz@example.com
* - much."more\ unusual"@example.com
*
* re(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e{a[c]=null})),ee(),r=a[t],r?r.p(e,o):(r=a[t]=i[t](e),r.c()),te(r,1),r.m(n.parentNode,n))},i(e){o||(te(r),o=!0)},o(e){re(r),o=!1},d(e){e&&g(n),a[t].d(e)}}}function ba(e){let t;return{c(){t=P("div"),t.textC,_(t,"class","zephr-form-input-error-text svelte-1f2hwm0"),$(t,"zephr-payment-form-input-error-text",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&$(t,"zephr-payment-form-input-error-text",e[3])},d(e){e&&g(t)}}}function Pa(e){let t,r,n,o;t=new Lo({props:{forInput:e[10],sublabel:e[1]["public-description"],label:/(hidden|checkbox)/.test(e[1]?.["input-type"]||"")?"":`${e[0].label}${e[0].required||e[1]?.required?"*":""}`,isPaymentForm:e[3],$$slots:{default:[ga]},$$scope:{ctx:e}}});let i=e[8]&&ba(e);return{c(){ae(t.$$.fragment),r=S(),i&&i.c(),n=C()},m(e,a){se(t,e,a),y(e,r,a),i&&i.m(e,a),y(e,n,a),o=!0},p(e,[r]){const o={};2&r&&(o.sublabel=e[1]["public-description"]),3&r&&(o.label=/(hidden|checkbox)/.test(e[1]?.["input-type"]||"")?"":`${e[0].label}${e[0].required||e[1]?.required?"*":""}`),8&r&&(o.isPaymentForm=e[3]),16777727&r&&(o.$$scope={dirty:r,ctx:e}),t.$set(o),e[8]?i?i.p(e,r):(i=ba(e),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i(e){o||(te(t.$$.fragment,e),o=!0)},o(e){re(t.$$.fragment,e),o=!1},d(e){e&&(g(r),g(n)),ce(t,e),i&&i.d(e)}}}function Ea(e,t,r){let n,{formKey:o}=t,{config:i}=t,{attributeSchema:a}=t,{value:s}=t,{error:c}=t,{isPaymentForm:l=!1}=t,{onChange:u}=t,{onFocus:d}=t,{onBlur:p}=t,m=s;const f=e=>e,h=`zephr-form-${i.slug}-${o}`;return e.$$set=e=>{"formKey"in e&&r(11,o=e.formKey),"config"in e&&r(0,i=e.config),"attributeSchema"in e&&r(1,a=e.attributeSchema),"value"in e&&r(2,s=e.value),"error"in e&&r(12,c=e.error),"isPaymentForm"in e&&r(3,l=e.isPaymentForm),"onChange"in e&&r(4,u=e.onChange),"onFocus"in e&&r(5,d=e.onFocus),"onBlur"in e&&r(6,p=e.onBlur)},e.$$.update=()=>{4096&e.$$.dirty&&r(8,n=!!c),150&e.$$.dirty&&"textarea"===a?.["input-type"]&&m!==s&&u(m)},[i,a,s,l,u,d,p,m,n,f,h,o,c,({detail:e})=>u(e),({detail:e})=>u(e),e=>u(e.target.value),function(){m=this.value,r(7,m)},({detail:e})=>u(e),({detail:e})=>u(e)]}class Aa extends de{constructor(e){super(),ue(this,e,Ea,Pa,a,{formKey:11,config:0,attributeSchema:1,value:2,error:12,isPaymentForm:3,onChange:4,onFocus:5,onBlur:6})}}const Sa=e=>null==e||""===e,Ca={matches:e=>e.type===Oe,create:(e,t,r,n)=>{const o=e.organisationConfiguration.schemaFields.find((e=>e.slug===n.slug)),i=t.hideIfSetAttributes?.includes(n.slug);if(null==o||i)return;const a=o.required||n.required,s=t.userAttributes[n.slug]??(t.readOnlyAttributeValues??{})[n.slug];return{component:Aa,props:{formKey:e.uniqueKey,config:n,value:s,attributeSchema:o,isPaymentForm:e.formType===wt.PAYMENT,onChange:o=>{r.updateFormState({userAttributes:{...t.userAttributes,[n.slug]:o}}),dt(e,"zephr_form_input_change",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug})},onFocus:()=>dt(e,"zephr_form_input_focus",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug}),onBlur:()=>dt(e,"zephr_form_input_blur",{inputName:`zephr-form-${n.slug}-${e.uniqueKey}`,sectionId:t.currentSection.type,field:n.slug})},isValid:!(a&&Sa(s)||a&&"checkbox"===o["input-type"]&&!s||"email"===o["input-type"]&&!Sa(s)&&!mi(s))}}};function va(t){let r,n,o,i;return{c(){r=P("button"),n=A(t[0]),_(r,"type","button"),_(r,"class","zephr-form-link svelte-1mdtotm"),$(r,"zephr-form-link-disabled",t[1]),$(r,"zephr-form-link-no-underline",t[3])},m(e,a){y(e,r,a),h(r,n),o||(i=v(r,"click",t[5]),o=!0)},p(e,[t]){1&t&&w(n,e[0]),2&t&&$(r,"zephr-form-link-disabled",e[1]),8&t&&$(r,"zephr-form-link-no-underline",e[3])},i:e,o:e,d(e){e&&g(r),o=!1,i()}}}function Ta(e,t,r){let{text:n}=t,{disabled:o=!1}=t,{onClick:i=(()=>{})}=t,{noUnderline:a=!1}=t;const s=D();return e.$$set=e=>{"text"in e&&r(0,n=e.text),"disabled"in e&&r(1,o=e.disabled),"onClick"in e&&r(2,i=e.onClick),"noUnderline"in e&&r(3,a=e.noUnderline)},[n,o,i,a,s,()=>{i(),s("linkClick",null)}]}class _a extends de{constructor(e){super(),ue(this,e,Ta,va,a,{text:0,disabled:1,onClick:2,noUnderline:3})}}function Oa(e){let t,r;return t=new _a({props:{text:e[0],onClick:e[2]}}),t.$on("linkClick",e[7]),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),4&r&&(n. Ia(t){let r,n;return{c(){r=P("div"),n=A(t[1]),_(r,"class","zephr-form-link-message svelte-11qigta")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2&t&&w(n,e[1])},i:e,o:e,d(e){e&&g(r)}}}function wa(e){let t,r;return t=new zt({props:{error:e[3],isPaymentForm:e[5]}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.error=e[3]),32&r&&(n.isPaymentForm=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ra(e){let t,r,n,o,i;const a=[Ia,Oa],s=[];function c(e,t){return e[6]&&!e[3]?0:1}r=c(e),n=s[r]=a[r](e);let l=e[3]&&wa(e);return{c(){t=P("div"),n.c(),o=S(),l&&l.c(),_(t,"class","zephr-form-flex-container zephr-form-reset-link-container svelte-11qigta"),$(t,"zephr-payment-form-flex-container",e[5])},m(e,n){y(e,t,n),s[r].m(t,null),h(t,o),l&&l.m(t,null),i=!0},p(e,[u]){let d=r;r=c(e),r===d?s[r].p(e,u):(X(),re(s[d],1,1,(()=>{s[d]=null})),ee(),n=s[r],n?n.p(e,u):(n=s[r]=a[r](e),n.c()),te(n,1),n.m(t,o)),e[3]?l?(l.p(e,u),8&u&&te(l,1)):(l=wa(e),l.c(),te(l,1),l.m(t,null)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),(!i||32&u)&&$(t,"zephr-payment-form-flex-container",e[5])},i(e){i||(te(n),te(l),i=!0)},o(e){re(n),re(l),i=!1},d(e){e&&g(t),s[r].d(),l&&l.d()}}}function Ma(e,t,r){let{text:n}=t,{message:o}=t,{onClick:i}=t,{error:a=null}=t,{delayMs:s}=t,{isPaymentForm:c=!1}=t,l=!1;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"message"in e&&r(1,o=e.message),"onClick"in e&&r(2,i=e.onClick),"error"in e&&r(3,a=e.error),"delayMs"in e&&r(4,s=e.delayMs),"isPaymentForm"in e&&r(5,c=e.isPaymentForm)},[n,o,i,a,s,c,l,()=>{o&&(r(6,l=!0),setTimeout((()=>r(6,l=!1)),s))}]}class Na extends de{constructor(e){super(),ue(this,e,Ma,Ra,a,{text:0,message:1,onClick:2,error:3,delayMs:4,isPaymentForm:5})}}const $a={matches:e=>e.type===Ie,create:(e,t,r,n)=>({component:Na,props:{text:n.text,message:n.message,delayMs:e.environment.reduceDelays?1:3e3,isPaymentForm:e.formType===wt.PAYMENT,onClick:()=>zi(e,t,r)}})};function La(e){let t,r;return t=new _a({props:{text:e[0],onClick:e[2]}}),t.$on("linkClick",e[7]),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),4&r&&(n. xa(t){let r,n;return{c(){r=P("div"),n=A(t[1]),_(r,"class","zephr-form-link-message svelte-11qigta")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2&t&&w(n,e[1])},i:e,o:e,d(e){e&&g(r)}}}function Fa(e){let t,r;return t=new zt({props:{error:e[3],isPaymentForm:e[5]}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.error=e[3]),32&r&&(n.isPaymentForm=e[5]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function za(e){let t,r,n,o,i;const a=[xa,La],s=[];function c(e,t){return e[6]&&!e[3]?0:1}r=c(e),n=s[r]=a[r](e);let l=e[3]&&Fa(e);return{c(){t=P("div"),n.c(),o=S(),l&&l.c(),_(t,"class","zephr-form-flex-container zephr-form-reset-link-container svelte-11qigta"),$(t,"zephr-payment-form-flex-container",e[5])},m(e,n){y(e,t,n),s[r].m(t,null),h(t,o),l&&l.m(t,null),i=!0},p(e,[u]){let d=r;r=c(e),r===d?s[r].p(e,u):(X(),re(s[d],1,1,(()=>{s[d]=null})),ee(),n=s[r],n?n.p(e,u):(n=s[r]=a[r](e),n.c()),te(n,1),n.m(t,o)),e[3]?l?(l.p(e,u),8&u&&te(l,1)):(l=Fa(e),l.c(),te(l,1),l.m(t,null)):l&&(X(),re(l,1,1,(()=>{l=null})),ee()),(!i||32&u)&&$(t,"zephr-payment-form-flex-container",e[5])},i(e){i||(te(n),te(l),i=!0)},o(e){re(n),re(l),i=!1},d(e){e&&g(t),s[r].d(),l&&l.d()}}}function ka(e,t,r){let{text:n}=t,{message:o}=t,{onClick:i}=t,{error:a=null}=t,{delayMs:s}=t,{isPaymentForm:c=!1}=t,l=!1;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"message"in e&&r(1,o=e.message),"onClick"in e&&r(2,i=e.onClick),"error"in e&&r(3,a=e.error),"delayMs"in e&&r(4,s=e.delayMs),"isPaymentForm"in e&&r(5,c=e.isPaymentForm)},[n,o,i,a,s,c,l,()=>{o&&(r(6,l=!0),setTimeout((()=>r(6,l=!1)),s))}]}class Da extends de{constructor(e){super(),ue(this,e,ka,za,a,{text:0,message:1,onClick:2,error:3,delayMs:4,isPaymentForm:5})}}const Ba={matches:e=>e.type===we,create:(e,t,r,n)=>({component:Da,props:{text:n.text,message:n.message,delayMs:e.environment.reduceDelays?1:3e3,isPaymentForm:e.formType===wt.PAYMENT,onClick:async()=>{await wi(e,"login",t.emailAddress,r)}}})},Ua=(e,t)=>r=>{if(r?.data?.fromZephr)if(window.removeEventListener("message",window.zephrOAuthListener),e.environment.debugLogging&&console.log("Social signin message:",r),"register"===r.data.action){const n=t.updateFormState({emailAddress:r.data.identifier,socialSigninToken:r.data.stateKey,userAttributes:r.data.userAttributes??{},socialSignin:!0,userExists:!1,emailIsContact:void 0});Nt(e).useVerificationCodes&&$i(e,n,t),bt(e,n,t)}else"otp"==r.data.action?(t.updateFormState({emailAddress:r.data.identifier,socialSigninToken:r.data.stateKey,userAttributes:r.data.userAttributes??{},socialSignin:!0,userExists:!0,emailIsContact:!1}),t.jumpToSection(lt.VERIFICATION_CODE_LOGIN.type)):"login"===r.data.action?(document.cookie=r.data.cookie,t.updateFormState({socialSignin:!0,userExists:!0,loginRegistrationComplete:!0,emailIsContact:!1}),t.onEvent(nt.LOGIN_REGISTRATION_COMPLETE)):t.updateFormState({socialSigninError:r.data.message??"Something went wrong. Please try again later!"})};var Ga={prefix:"fab",iconName:"microsoft",icon:[448,512,[],"f3ca","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"]},Va={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},qa={prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]},ja={prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"]},Ha={prefix:"fab",iconName:"twitter",icon:[512,512,[],"f099","M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"]};function Ka(t){let r,n,o,i,a;return{c(){r=E("svg"),n=E("path"),o=E("path"),i=E("path"),a=E("path"),_(n,"d","M533.5 278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1 33.8-25.7 63.7-54.4 82.7v68h87.7c51.5-47.4 81.1-117.4 81.1-200.2z"),_(n,"fill","#4285f4"),_(o,"d","M272.1 544.3c73.4 0 135.3-24.1 180.4-65.7l-87.7-68c-24.4 16.6-55.9 26-92.6 26-71 0-131.2-47.9-152.8-112.3H28.9v70.1c46.2 91.9 140.3 149.9 243.2 149.9z"),_(o,"fill","#34a853"),_(i,"d","M119.3 324.3c-11.4-33.8-11.4-70.4 0-104.2V150H28.9c-38.6 76.9-38.6 167.5 0 244.4l90.4-70.1z"),_(i,"fill","#fbbc04"),_(a,"d","M272.1 107.7c38.8-.6 76.3 14 104.4 40.8l77.7-77.7C405 24.6 339.7-.8 272.1 0 169.2 0 75.1 58 28.9 150l90.4 70.1c21.5-64.5 81.8-112.4 152.8-112.4z"),_(a,"fill","#ea4335"),_(r,"class","zephr-form-social-sign-in-icon zephr-form-google-icon svelte-155mfls"),_(r,"viewBox","0 0 533.5 544.3"),_(r,"xmlns","http://www.w3.org/2000/svg")},m(e,t){y(e,r,t),h(r,n),h(r,o),h(r,i),h(r,a)},p:e,i:e,o:e,d(e){e&&g(r)}}}class Ya extends de{constructor(e){super(),ue(this,e,null,Ka,a,{})}}function Wa(e,t,r){const n=e.slice();return n[8]=t[r],n}function Ja(e){let t,r,n,o,i,a,s,c,l,u,d,p,m=e[8]+"";const f=[Za,Qa],b=[];function E(e,t){return"Google"===e[8]?0:1}function C(){return e[6](e[8])}return o=E(e),i=b[o]=f[o](e),{c(){t=P("button"),r=P("span"),n=P("span"),i.c(),a=S(),s=A(e[4]),c=S(),l=A(m),_(n,"class","zephr-form-social-sign-in-icon svelte-18a7qws"),$(n,"zephr-payment-form-social-sign-in-icon",e[3]),_(r,"class","zephr-form-flex-container zephr-form-social-sign-in svelte-18a7qws"),$(r,"zephr-payment-form-flex-container",e[3]),$(r,"zephr-payment-form-social-sign-in",e[3]),_(t,"type","button"),_(t,"class","zephr-form-button zephr-form-social-sign-in-button svelte-18a7qws"),$(t,"zephr-payment-form-button",e[3]),$(t,"zephr-payment-form-social-sign-in-button",e[3])},m(e,i){y(e,t,i),h(t,r),h(r,n),b[o].m(n,null),h(r,a),h(r,s),h(r,c),h(r,l),u=!0,d||(p=v(t,"click",T(C)),d=!0)},p(a,s){let c=o;o=E(e=a),o===c?b[o].p(e,s):(X(),re(b[c],1,1,(()=>{b[c]=null})),ee(),i=b[o],i?i.p(e,s):(i=b[o]=f[o](e),i.c()),te(i,1),i.m(n,null)),(!u||8&s)&&$(n,"zephr-payment-form-social-sign-in-icon",e[3]),(!u||1&s)&&m!==(m=e[8]+"")&&w(l,m),(!u||8&s)&&$(r,"zephr-payment-form-flex-container",e[3]),(!u||8&s)&&$(r,"zephr-payment-form-social-sign-in",e[3]),(!u||8&s)&&$(t,"zephr-payment-form-button",e[3]),(!u||8&s)&&$(t,"zephr-payment-form-social-sign-in-button",e[3])},i(e){u||(te(i),u=!0)},o(e){re(i),u=!1},d(e){e&&g(t),b[o].d(),d=!1,p()}}}function Qa(e){let r,n;const o=[e[5](e[8])];let i={};for(let e=0;e{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function es(e){let t,r;return t=new zt({props:{error:e[2],isPaymentForm:e[3]}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};4&r&&(n.error=e[2]),8&r&&(n.isPaymentForm=e[3]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function ts(e){let t,r,n,o=ne(Object.keys(e[0])),i=[];for(let t=0;tre(i[e],1,1,(()=>{i[e]=null}));let s=e[2]&&es(e);return{c(){for(let e=0;e{s=null})),ee())},i(e){if(!n){for(let e=0;e{"config"in e&&r(0,n=e.config),"onSelectProvider"in e&&r(1,o=e.onSelectProvider),"error"in e&&r(2,i=e.error),"isPaymentForm"in e&&r(3,a=e.isPaymentForm)},[n,o,i,a,c,e=>{switch(e){case"Facebook":default:return{icon:ja,color:"#1877f2",size:"lg"};case"LinkedIn":return{icon:qa,color:"#0a66c2",size:"lg"};case"Apple":return{icon:Va,color:"#000",size:"lg"};case"Microsoft":return{icon:Ga,color:"#00a4ef",size:"lg"};case"Twitter":return{icon:Ha,color:"#08a0e9",size:"lg"}}},e=>o(e.toLowerCase())]}class ns extends de{constructor(e){super(),ue(this,e,rs,ts,a,{config:0,onSelectProvider:1,error:2,isPaymentForm:3})}}const os={matches:e=>e.type===Re,create:(e,t,r,n)=>{const{enabled:o,hide:i,show:a,...s}=n??{};return{component:ns,props:{config:s,isPaymentForm:e.formType===wt.PAYMENT,onSelectProvider:t=>((e,t,r)=>{r.updateFormState({socialSigninError:void 0}),window.open(`${t.environment.apiUrlBase??""}/blaize/oauth/${e}`,e+" sign-in","menubar=no,location=yes,resizable=no,scrollbars=no,status=no,width=500,height=600");const n=Ua(t,r);window.zephrOAuthListener=n,window.addEventListener("message",n)})(t,e,r)}}}},is="promo-code",as=async(e,t,r)=>{const n=await hn(e,t,r,!0),o=await lo(e,n,r);if(t.currentSection.elements.some((e=>e.type===xe&&!1!==e.config?.enabled))){r.incrementRequestCount();try{await co(e.organisationConfiguration.paymentProvider).loader(e,o,r)}finally{r.decrementRequestCount()}}},ss=async(e,t,r)=>{const n=so(e.organisationConfiguration.paymentProvider);return n.hasPromoCodes(e)?n?.promoCodeServiceOverride?n.promoCodeServiceOverride(e,t,r):(async(e,t,r)=>{r.updateFormState({promoCodeValid:void 0,serverErrors:[],discountedPlanPrices:[]});const n=so(e.organisationConfiguration.paymentProvider),o=await fr(n.promoCodeCheckPath,{method:"POST",bodyObject:{promoCode:t.promoCode,paymentOptions:Nt(e).paymentOptions}},r,is);if(!o.ok){let t;if(403===o.status){const e=await o.json();t=2===e?.code||3===e?.code?at.PROMO_CODE_EXPIRED_ERROR:at.PROMO_CODE_INVALID_ERROR}else t=at.PROMO_CODE_INVALID_ERROR,console.error("Unknown error evaluating promo code",o);return dt(e,"zephr_form_error",{error:at[t]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[t],discountedPlanPrices:[]}))}const i=(await o.json()).paymentOptions.map((e=>({planSlug:e.slug,productId:e.productId,discountPrice:e.discountPrice})));return i.find((e=>e.planSlug===t.paymentOption.slug&&e.productId===t.paymentOption.productId))?Promise.resolve(r.updateFormState({promoCodeValid:!0,serverErrors:[],discountedPlanPrices:i})):(dt(e,"zephr_form_error",{error:at[at.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR]}),Promise.resolve(r.updateFormState({promoCodeValid:!1,serverErrors:[at.PROMO_CODE_NOT_VALID_FOR_PLAN_ERROR],discountedPlanPrices:i})))})(e,t,r).then((t=>as(e,t,r))):t};function cs(e,t,r){const n=e.slice();return n[36]=t[r],n}function ls(e,t,r){const n=e.slice();return n[39]=t[r],n}function us(e,t,r){const n=e.slice();return n[42]=t[r],n}function ds(e){let t,r,n,o,i,a,s,c=e[42].label+"",l=e[42].priceFormattedString+"";return{c(){t=P("div"),r=P("span"),n=A(c),o=S(),i=P("div"),a=P("span"),s=A(l),_(r,"class","zephr-form-summary-charge-description zephr-payment-form-summary-charge-description svelte-3s0tux"),_(i,"class","zephr-form-summary-line-right zephr-payment-form-summary-line-right svelte-3s0tux"),_(t,"class","zephr-form-charge-line zephr-payment-form-charge-line svelte-3s0tux")},m(e,c){y(e,t,c),h(t,r),h(r,n),h(t,o),h(t,i),h(i,a),h(a,s)},p(e,t){524288&t[0]&&c!==(c=e[42].label+"")&&w(n,c),524288&t[0]&&l!==(l=e[42].priceFormattedString+"")&&w(s,l)},d(e){e&&g(t)}}}function ps(e){let t,r=ne(e[23]),n=[];for(let t=0;t{i=null})),ee())},i(e){n||(te(i),n=!0)},o(e){re(i),n=!1},d(e){e&&(g(t),g(r)),o&&o.d(e),i&&i.d(e)}}}function gs(e){let t,r,n,o,i;return{c(){t=P("button"),r=P("span"),n=A(e[4]),_(t,"type","button"),_(t,"class","zephr-form-promo-activate-line zephr-payment-form-promo-activate-line svelte-3s0tux")},m(a,s){y(a,t,s),h(t,r),h(r,n),o||(i=v(t,"click",e[34]),o=!0)},p(e,t){16&t[0]&&w(n,e[4])},d(e){e&&g(t),o=!1,i()}}}function bs(e){let t,r,n,o,i,a,s,c,l,u,d,p;const m=[Es,Ps],b=[];function E(e,t){return e[17]&&e[11]?0:e[17]?-1:1}~(n=E(e))&&(o=b[n]=m[n](e));const A=[Ts,vs],v=[];function T(e,t){return e[12]?0:e[17]?-1:1}~(s=T(e))&&(c=v[s]=A[s](e));let O=e[14]&&Os(e);return{c(){t=P("div"),r=P("div"),o&&o.c(),i=S(),a=P("div"),c&&c.c(),u=S(),O&&O.c(),d=C(),_(r,"class","zephr-form-promo-input-container zephr-payment-form-promo-input-container svelte-3s0tux"),_(a,"class",l=f(e[12]?"zephr-form-summary-line-right zephr-payment-form-summary-line-right":"zephr-form-summary-line-left zephr-payment-form-summary-line-left")+" svelte-3s0tux"),_(t,"class","zephr-form-promo-line zephr-payment-form-promo-line svelte-3s0tux")},m(e,o){y(e,t,o),h(t,r),~n&&b[n].m(r,null),h(t,i),h(t,a),~s&&v[s].m(a,null),y(e,u,o),O&&O.m(e,o),y(e,d,o),p=!0},p(e,t){let i=n;n=E(e),n===i?~n&&b[n].p(e,t):(o&&(X(),re(b[i],1,1,(()=>{b[i]=null})),ee()),~n?(o=b[n],o?o.p(e,t):(o=b[n]=m[n](e),o.c()),te(o,1),o.m(r,null)):o=null);let u=s;s=T(e),s===u?~s&&v[s].p(e,t):(c&&(X(),re(v[u],1,1,(()=>{v[u]=null})),ee()),~s?(c=v[s],c?c.p(e,t):(c=v[s]=A[s](e),c.c()),te(c,1),c.m(a,null)):c=null),(!p||4096&t[0]&&l!==(l=f(e[12]?"zephr-form-summary-line-right zephr-payment-form-summary-line-right":"zephr-form-summary-line-left zephr-payment-form-summary-line-left")+" svelte-3s0tux"))&&_(a,"class",l),e[14]?O?(O.p(e,t),16384&t[0]&&te(O,1)):(O=Os(e),O.c(),te(O,1),O.m(d.parentNode,d)):O&&(X(),re(O,1,1,(()=>{O=null})),ee())},i(e){p||(te(o),te(c),te(O),p=!0)},o(e){re(o),re(c),re(O),p=!1},d(e){e&&(g(t),g(u),g(d)),~n&&b[n].d(),~s&&v[s].d(),O&&O.d(e)}}}function Ps(e){let t,r,n;return r=new Ro({props:{id:"zephr-form-promo-code",value:e[11],placeholder:e[5],maxlength:50,hasError:null!=e[14],fill:!0,isPaymentForm:!0,onFocus:e[27],onBlur:e[28],$$slots:{default:[Cs]},$$scope:{ctx:e}}}),r.$on("change",e[35]),{c(){t=P("div"),ae(r.$$.fragment),_(t,"class","zephr-form-relative-container zephr-form-promo-input zephr-form-relative-container zephr-payment-form-promo-input")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};2048&t[0]&&(n.value=e[11]),32&t[0]&&(n.placeholder=e[5]),16384&t[0]&&(n.hasError=null!=e[14]),134217728&t[0]&&(n. Es(t){let r,n;return{c(){r=P("span"),n=A(t[11]),_(r,"class","zephr-form-summary-promo-middle zephr-payment-form-summary-promo-middle svelte-3s0tux")},m(e,t){y(e,r,t),h(r,n)},p(e,t){2048&t[0]&&w(n,e[11])},i:e,o:e,d(e){e&&g(r)}}}function As(e){let t,r;return t=new er({props:{icon:Ht,spin:!0}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Ss(e){let t,r;return t=new er({props:{icon:Kt}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Cs(e){let t,r,n,o;const i=[Ss,As],a=[];function s(e,t){return e[12]?0:e[15]&&!e[14]?1:-1}return~(r=s(e))&&(n=a[r]=i[r](e)),{c(){t=P("div"),n&&n.c(),_(t,"class","zephr-form-input-inner-text zephr-payment-form-input-inner-text zephr-form-input-inner-button")},m(e,n){y(e,t,n),~r&&a[r].m(t,null),o=!0},p(e,o){let c=r;r=s(e),r!==c&&(n&&(X(),re(a[c],1,1,(()=>{a[c]=null})),ee()),~r?(n=a[r],n||(n=a[r]=i[r](e),n.c()),te(n,1),n.m(t,null)):n=null)},i(e){o||(te(n),o=!0)},o(e){re(n),o=!1},d(e){e&&g(t),~r&&a[r].d()}}}function vs(e){let t,r;return t=new mo({props:{disabled:e[16],text:e[6],onClick:e[26],noMargin:!0,inputHeight:!0,isPaymentForm:!0}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};65536&r[0]&&(n.disabled=e[16]),64&r[0]&&(n.text=e[6]),67108864&r[0]&&(n. Ts(t){let r,n=t[0]&&_s(t);return{c(){r=P("span"),n&&n.c(),_(r,"class","zephr-form-summary-promo-middle zephr-payment-form-summary-promo-middle svelte-3s0tux")},m(e,t){y(e,r,t),n&&n.m(r,null)},p(e,t){e[0]?n?n.p(e,t):(n=_s(e),n.c(),n.m(r,null)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d()}}}function _s(e){let t,r;return{c(){t=A("- "),r=A(e[13])},m(e,n){y(e,t,n),y(e,r,n)},p(e,t){8192&t[0]&&w(r,e[13])},d(e){e&&(g(t),g(r))}}}function Os(e){let t,r;return t=new zt({props:{error:e[14],isPaymentForm:!0}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};16384&r[0]&&(n.error=e[14]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Is(e){let t,r;return{c(){t=P("div"),r=A(e[10]),_(t,"class","zephr-form-summary-prorate-disclaimer zephr-payment-form-summary-prorate-disclaimer svelte-3s0tux")},m(e,n){y(e,t,n),h(t,r)},p(e,t){1024&t[0]&&w(r,e[10])},d(e){e&&g(t)}}}function ws(e){let t,r,n,o,i,a,s=(e[9]??"DUE TODAY")+"",c=e[20].totalPriceFormattedString+"";return{c(){t=P("div"),r=P("div"),n=A(s),o=S(),i=P("div"),a=A(c),_(r,"class","zephr-form-summary-line-total-title zephr-payment-form-summary-line-total-title"),_(i,"class","zephr-form-summary-line-price zephr-payment-form-summary-line-price svelte-3s0tux"),_(t,"class","zephr-form-summary-line zephr-form-summary-price-line zephr-payment-form-summary-line zephr-payment-form-summary-price-line svelte-3s0tux")},m(e,s){y(e,t,s),h(t,r),h(r,n),h(t,o),h(t,i),h(i,a)},p(e,t){512&t[0]&&s!==(s=(e[9]??"DUE TODAY")+"")&&w(n,s),1048576&t[0]&&c!==(c=e[20].totalPriceFormattedString+"")&&w(a,c)},d(e){e&&g(t)}}}function Rs(e){let t,r,n,o,i,a,s,c,l,u,d,p,m,f,E,C,v,T,O,I,R,M,N,$,L,x=ne(e[19]),F=[];for(let t=0;t0&&ps(e),k=e[21]&&fs(e),D=ne(e[18]),B=[];for(let t=0;t0?z?z.p(e,r):(z=ps(e),z.c(),z.m(t,m)):z&&(z.d(1),z=null),e[21]?k?k.p(e,r):(k=fs(e),k.c(),k.m(t,f)):k&&(k.d(1),k=null),262144&r[0]){let n;for(D=ne(e[18]),n=0;n{U=null})),ee()),(!L||256&r[0])&&w(O,e[8]),(!L||4&r[0])&&w(M,e[2]),e[10]?G?G.p(e,r):(G=Is(e),G.c(),G.m(t,$)):G&&(G.d(1),G=null),e[20]?V?V.p(e,r):(V=ws(e),V.c(),V.m(t,null)):V&&(V.d(1),V=null)},i(e){L||(te(U),L=!0)},o(e){re(U),L=!1},d(e){e&&g(t),b(F,e),z&&z.d(),k&&k.d(),b(B,e),U&&U.d(),G&&G.d(),V&&V.d()}}}function Ms(e,t,r){let n,{showPromoCodeDiscountAmount:o=!0}=t,{planTitle:i}=t,{price:a}=t,{totalPrice:s}=t,{allowPromoCodes:c}=t,{promoCodeLinkText:l}=t,{promoCodePlaceholder:u}=t,{promoCodeButtonText:d}=t,{title:p}=t,{totalLabel:m}=t,{prorateLabel:f}=t,{prorateDisclaimer:h}=t,{promoCode:y}=t,{promoCodeValid:g}=t,{discountAmount:b}=t,{error:P=null}=t,{busy:E}=t,{promoCodeDisabled:A}=t,{paymentProcessed:S}=t,{addons:C}=t,{chargeItems:v}=t,{changeSubscriptionProrate:T}=t,{tax:_}=t,{taxLabel:O}=t,{subTotal:I}=t,{discounts:w=[]}=t,{paymentProvider:R=""}=t,{onChangePromoCode:M}=t,{verifyPromoCode:N}=t,{onFocus:$}=t,{onBlur:L}=t,{logBeginCheckout:x}=t,F=!1;x();return e.$$set=e=>{"showPromoCodeDiscountAmount"in e&&r(0,o=e.showPromoCodeDiscountAmount),"planTitle"in e&&r(1,i=e.planTitle),"price"in e&&r(31,a=e.price),"totalPrice"in e&&r(2,s=e.totalPrice),"allowPromoCodes"in e&&r(3,c=e.allowPromoCodes),"promoCodeLinkText"in e&&r(4,l=e.promoCodeLinkText),"promoCodePlaceholder"in e&&r(5,u=e.promoCodePlaceholder),"promoCodeButtonText"in e&&r(6,d=e.promoCodeButtonText),"title"in e&&r(7,p=e.title),"totalLabel"in e&&r(8,m=e.totalLabel),"prorateLabel"in e&&r(9,f=e.prorateLabel),"prorateDisclaimer"in e&&r(10,h=e.prorateDisclaimer),"promoCode"in e&&r(11,y=e.promoCode),"promoCodeValid"in e&&r(12,g=e.promoCodeValid),"discountAmount"in e&&r(13,b=e.discountAmount),"error"in e&&r(14,P=e.error),"busy"in e&&r(15,E=e.busy),"promoCodeDisabled"in e&&r(16,A=e.promoCodeDisabled),"paymentProcessed"in e&&r(17,S=e.paymentProcessed),"addons"in e&&r(18,C=e.addons),"chargeItems"in e&&r(19,v=e.chargeItems),"changeSubscriptionProrate"in e&&r(20,T=e.changeSubscriptionProrate),"tax"in e&&r(21,_=e.tax),"taxLabel"in e&&r(22,O=e.taxLabel),"subTotal"in e&&r(32,I=e.subTotal),"discounts"in e&&r(23,w=e.discounts),"paymentProvider"in e&&r(24,R=e.paymentProvider),"onChangePromoCode"in e&&r(25,M=e.onChangePromoCode),"verifyPromoCode"in e&&r(26,N=e.verifyPromoCode),"onFocus"in e&&r(27,$=e.onFocus),"onBlur"in e&&r(28,L=e.onBlur),"logBeginCheckout"in e&&r(33,x=e.logBeginCheckout)},e.$$.update=()=>{524288&e.$$.dirty[0]|3&e.$$.dirty[1]&&r(30,n=v.length?"":I||a)},[o,i,s,c,l,u,d,p,m,f,h,y,g,b,P,E,A,S,C,v,T,_,O,w,R,M,N,$,L,F,n,a,I,x,()=>r(29,F=!0),({detail:e})=>M(e)]}class Ns extends de{constructor(e){super(),ue(this,e,Ms,Rs,a,{showPromoCodeDiscountAmount:0,planTitle:1,price:31,totalPrice:2,allowPromoCodes:3,promoCodeLinkText:4,promoCodePlaceholder:5,promoCodeButtonText:6,title:7,totalLabel:8,prorateLabel:9,prorateDisclaimer:10,promoCode:11,promoCodeValid:12,discountAmount:13,error:14,busy:15,promoCodeDisabled:16,paymentProcessed:17,addons:18,chargeItems:19,changeSubscriptionProrate:20,tax:21,taxLabel:22,subTotal:32,discounts:23,paymentProvider:24,onChangePromoCode:25,verifyPromoCode:26,onFocus:27,onBlur:28,logBeginCheckout:33},null,[-1,-1])}}const $s={matches:e=>e.type===Me,create:(e,t,r,n)=>{const o=so(e.organisationConfiguration.paymentProvider);return{component:Ns,props:{showPromoCodeDiscountAmount:!Nt(e).dynamicOffer,price:t.paymentOptionPrices?.netPriceFormattedString??"-",totalPrice:t.paymentOptionPrices?.totalPriceFormattedString??"-",tax:t.paymentOptionPrices?.taxPriceFormattedString,taxLabel:n.taxLabel??"Tax",subTotal:t.paymentOptionPrices?.netPriceFormattedString,planTitle:t.paymentOption.label,paymentProvider:e.organisationConfiguration.paymentProvider,discounts:"braintree"===e.organisationConfiguration.paymentProvider?(Nt(e).paymentOptions.find((e=>e.productId===t.paymentOption.productId&&e.slug===t.paymentOption.slug))?.discounts||[]).map((e=>({description:e.description||e.name,formattedAmount:`- ${fn(e.amount||0,t.paymentOption.currencyCode)}`}))):[],allowPromoCodes:(Nt(e).promoCodeConfig?.promoCodeAllowed||Nt(e).dynamicOffer)&&o.hasPromoCodes(e),promoCodeLinkText:Nt(e).promoCodeConfig?.promoCodeText,promoCodePlaceholder:Nt(e).promoCodeConfig?.promoCodePlaceholder,promoCodeButtonText:Nt(e).promoCodeConfig?.promoCodeButtonText,totalLabel:n.total,prorateLabel:n.prorateLabel,prorateDisclaimer:!Nt(e).changeSubscriptionMode||o.changeSubscriptionProrateCalculator?null:n.prorateDisclaimer,title:n.title,promoCode:t.promoCode,busy:t.isBusyByKey[is],promoCodeDisabled:t.isBusy||0===t.promoCode?.length,paymentProcessed:t.paymentProcessed,discountAmount:t.paymentOptionPrices?.discountPriceFormattedPrice??"-",addons:gn(t).map((e=>({label:e.label,addonPrice:fn(e.addonPrice,t.paymentOption.currencyCode)}))),chargeItems:t.paymentOptionPrices?.chargeItems??[],promoCodeValid:t.promoCodeValid,changeSubscriptionProrate:t.changeSubscriptionProrate,onChangePromoCode:n=>{let o=r.updateFormState({promoCode:n,promoCodeValid:void 0,discountedPlanPrices:[]});t.promoCodeValid&&(t.originalDynamicOfferResult&&(o=r.updateFormState({dynamicOfferResult:t.originalDynamicOfferResult})),as(e,o,r)),dt(e,"zephr_form_input_change",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"})},onFocus:()=>dt(e,"zephr_form_input_focus",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"}),onBlur:()=>dt(e,"zephr_form_input_blur",{inputName:"zephr-form-promo-code",sectionId:t.currentSection.type,field:"promo-code"}),verifyPromoCode:()=>{ss(e,t,r)},logBeginCheckout:async()=>{t.currentPart.type===ot.PAYMENT.type&&(e.organisationConfiguration.trackFormDataLayerEvents&&await lo(e,t,r),dt(e,"begin_checkout",{ecommerce:{currency:Pn(e,t),value:r.getFormState().paymentOptionPrices?.totalPrice,items:[{item_id:t.paymentOption.slug,item_name:t.paymentOption.productId,price:r.getFormState().paymentOptionPrices?.totalPrice,quantity:1}]}}))}}}}};function Ls(e){let t,r,n,o=e[1]&&xs(e),i=e[0]&&ks(e),a=e[1]&&e[0]&&Ds(e);return{c(){t=P("div"),o&&o.c(),r=S(),i&&i.c(),n=S(),a&&a.c(),_(t,"class","zephr-form-divider-container svelte-svq2r5"),$(t,"zephr-payment-form-divider-container",e[3])},m(e,s){y(e,t,s),o&&o.m(t,null),h(t,r),i&&i.m(t,null),h(t,n),a&&a.m(t,null)},p(e,s){e[1]?o?o.p(e,s):(o=xs(e),o.c(),o.m(t,r)):o&&(o.d(1),o=null),e[0]?i?i.p(e,s):(i=ks(e),i.c(),i.m(t,n)):i&&(i.d(1),i=null),e[1]&&e[0]?a?a.p(e,s):(a=Ds(e),a.c(),a.m(t,null)):a&&(a.d(1),a=null),8&s&&$(t,"zephr-payment-form-divider-container",e[3])},d(e){e&&g(t),o&&o.d(),i&&i.d(),a&&a.d()}}}function xs(e){let t;function r(e,t){return e[0]?zs:Fs}let n=r(e),o=n(e);return{c(){o.c(),t=C()},m(e,r){o.m(e,r),y(e,t,r)},p(e,i){n===(n=r(e))&&o?o.p(e,i):(o.d(1),o=n(e),o&&(o.c(),o.m(t.parentNode,t)))},d(e){e&&g(t),o.d(e)}}}function Fs(t){let r;return{c(){r=P("div"),_(r,"class","zephr-form-divider-line-complete svelte-svq2r5")},m(e,t){y(e,r,t)},p:e,d(e){e&&g(r)}}}function zs(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-divider-line svelte-svq2r5"),$(t,"zephr-payment-form-divider-line",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&$(t,"zephr-payment-form-divider-line",e[3])},d(e){e&&g(t)}}}function ks(e){let t,r;return{c(){t=P("span"),r=A(e[0]),_(t,"class","zephr-form-divider-text svelte-svq2r5"),$(t,"zephr-payment-form-divider-text",e[3])},m(e,n){y(e,t,n),h(t,r)},p(e,n){1&n&&w(r,e[0]),8&n&&$(t,"zephr-payment-form-divider-text",e[3])},d(e){e&&g(t)}}}function Ds(e){let t;return{c(){t=P("div"),_(t,"class","zephr-form-divider-line svelte-svq2r5"),$(t,"zephr-payment-form-divider-line",e[3])},m(e,r){y(e,t,r)},p(e,r){8&r&&$(t,"zephr-payment-form-divider-line",e[3])},d(e){e&&g(t)}}}function Bs(t){let r,n=t[2]&&Ls(t);return{c(){n&&n.c(),r=C()},m(e,t){n&&n.m(e,t),y(e,r,t)},p(e,[t]){e[2]?n?n.p(e,t):(n=Ls(e),n.c(),n.m(r.parentNode,r)):n&&(n.d(1),n=null)},i:e,o:e,d(e){e&&g(r),n&&n.d(e)}}}function Us(e,t,r){let{text:n}=t,{showLine:o}=t,{show:i}=t,{isPaymentForm:a=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"showLine"in e&&r(1,o=e.showLine),"show"in e&&r(2,i=e.show),"isPaymentForm"in e&&r(3,a=e.isPaymentForm)},[n,o,i,a]}class Gs extends de{constructor(e){super(),ue(this,e,Us,Bs,a,{text:0,showLine:1,show:2,isPaymentForm:3})}}const Vs={matches:e=>e.type===Ne,create:(e,t,r,n)=>({component:Gs,props:{text:n.text,showLine:n.showLine,show:n.show,isPaymentForm:e.formType===wt.PAYMENT}})};function qs(t){let r,n,o,i,a;return{c(){r=P("div"),n=A(t[0]),o=S(),i=P("a"),a=A(t[1]),_(i,"href",t[2]),_(i,"class","svelte-1bpa3mq"),_(r,"class","zephr-form-login-link svelte-1bpa3mq"),$(r,"zephr-payment-login-link",t[3])},m(e,t){y(e,r,t),h(r,n),h(r,o),h(r,i),h(i,a)},p(e,[t]){1&t&&w(n,e[0]),2&t&&w(a,e[1]),4&t&&_(i,"href",e[2]),8&t&&$(r,"zephr-payment-login-link",e[3])},i:e,o:e,d(e){e&&g(r)}}}function js(e,t,r){let{text:n}=t,{linkText:o}=t,{url:i}=t,{isPaymentForm:a=!1}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"linkText"in e&&r(1,o=e.linkText),"url"in e&&r(2,i=e.url),"isPaymentForm"in e&&r(3,a=e.isPaymentForm)},[n,o,i,a]}class Hs extends de{constructor(e){super(),ue(this,e,js,qs,a,{text:0,linkText:1,url:2,isPaymentForm:3})}}const Ks={matches:e=>e.type===$e,create:(e,t,r,n)=>({component:Hs,props:{text:n.alreadyRegText,linkText:n.loginText,url:n.url,isPaymentForm:e.formType===wt.PAYMENT}})},Ys={matches:e=>e.type===Ae&&e.config.isLogin,create:(e,t,r,n)=>({component:mo,props:{disabled:t.isBusy,text:n.text,onClick:()=>{dt(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.updateFormState({forgotPassword:!1}),r.jumpToPartStart(ot.ACCOUNT_VERIFICATION.type)},isPaymentForm:e.formType===wt.PAYMENT}})},Ws={matches:e=>e.type===Ae&&e.config.isCancel,create:(e,t,r,n)=>({component:mo,props:{text:n.text,onClick:()=>{dt(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.updateFormState({confirmCancel:!0}),r.completeSection()}}})};function Js(e){let t,r;return t=new _a({props:{text:e[0]}}),t.$on("linkClick",e[10]),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.text=e[0]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Qs(e){let t,r,n,o;return t=new Lo({props:{forInput:e[8],label:e[0]}}),n=new Ro({props:{id:e[8],value:e[2],errorMessage:e[3],placeholder:e[1],onFocus:e[5],onBlur:e[6]}}),n.$on("change",e[11]),{c(){ae(t.$$.fragment),r=S(),ae(n.$$.fragment)},m(e,i){se(t,e,i),y(e,r,i),se(n,e,i),o=!0},p(e,r){const o={};1&r&&(o.label=e[0]),t.$set(o);const i={};4&r&&(i.value=e[2]),8&r&&(i.errorMessage=e[3]),2&r&&(i.placeholder=e[1]),32&r&&(i. Zs(e){let t,r,n,o=!e[7]&&Js(e),i=(e[2]||e[7])&&Qs(e);return{c(){t=P("div"),o&&o.c(),r=S(),i&&i.c(),_(t,"class","zephr-form-account-code-container svelte-ctt9he")},m(e,a){y(e,t,a),o&&o.m(t,null),h(t,r),i&&i.m(t,null),n=!0},p(e,[n]){e[7]?o&&(X(),re(o,1,1,(()=>{o=null})),ee()):o?(o.p(e,n),128&n&&te(o,1)):(o=Js(e),o.c(),te(o,1),o.m(t,r)),e[2]||e[7]?i?(i.p(e,n),132&n&&te(i,1)):(i=Qs(e),i.c(),te(i,1),i.m(t,null)):i&&(X(),re(i,1,1,(()=>{i=null})),ee())},i(e){n||(te(o),te(i),n=!0)},o(e){re(o),re(i),n=!1},d(e){e&&g(t),o&&o.d(),i&&i.d()}}}function Xs(e,t,r){let{formKey:n}=t,{label:o}=t,{placeholder:i}=t,{accountMembershipCode:a}=t,{error:s=null}=t,{onChange:c}=t,{onFocus:l}=t,{onBlur:u}=t,d=!1;const p=`zephr-form-account-code-${n}`;return e.$$set=e=>{"formKey"in e&&r(9,n=e.formKey),"label"in e&&r(0,o=e.label),"placeholder"in e&&r(1,i=e.placeholder),"accountMembershipCode"in e&&r(2,a=e.accountMembershipCode),"error"in e&&r(3,s=e.error),"onChange"in e&&r(4,c=e.onChange),"onFocus"in e&&r(5,l=e.onFocus),"onBlur"in e&&r(6,u=e.onBlur)},[o,i,a,s,c,l,u,d,p,n,()=>r(7,d=!0),e=>c(e.detail)]}class ec extends de{constructor(e){super(),ue(this,e,Xs,Zs,a,{formKey:9,label:0,placeholder:1,accountMembershipCode:2,error:3,onChange:4,onFocus:5,onBlur:6})}}const tc={matches:e=>e.type===Le,create:(e,t,r,n)=>({component:ec,props:{formKey:e.uniqueKey,label:n.label,placeholder:n.placeholder,accountMembershipCode:t.accountMembershipCode,onChange:n=>{r.updateFormState({accountMembershipCode:n,serverErrors:[]}),dt(e,"zephr_form_input_change",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"})},onFocus:()=>dt(e,"zephr_form_input_focus",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"}),onBlur:()=>dt(e,"zephr_form_input_blur",{inputName:`zephr-form-account-code-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"account-code"})}})};function rc(e){let t,r,n;return r=new _i({props:{text:e[4]}}),{c(){t=P("div"),ae(r.$$.fragment),_(t,"class","zephr-form-invitation-success-message svelte-yy7ok3")},m(e,o){y(e,t,o),se(r,t,null),n=!0},p(e,t){const n={};16&t&&(n.text=e[4]),r.$set(n)},i(e){n||(te(r.$$.fragment,e),n=!0)},o(e){re(r.$$.fragment,e),n=!1},d(e){e&&g(t),ce(r)}}}function nc(e){let t,r,n,o,i,a,s,c,l,u,d,p,m,f,b,E;c=new Lo({props:{forInput:e[14],label:e[2],isPaymentForm:e[11]}}),p=new Ro({props:{disabled:e[10],required:!0,id:e[14],value:e[7]??"",errorMessage:e[9],isPaymentForm:e[11],onFocus:e[12],onBlur:e[13]}}),p.$on("change",e[16]),f=new mo({props:{disabled:!mi(e[7])||e[10],text:e[3],onClick:e[5],noMargin:!0,inputHeight:!0,aside:!0,isPaymentForm:e[11]}});let C=e[8]&&rc(e);return{c(){t=P("div"),r=P("div"),n=A(e[0]),o=S(),i=P("div"),a=A(e[1]),s=S(),ae(c.$$.fragment),l=S(),u=P("div"),d=P("div"),ae(p.$$.fragment),m=S(),ae(f.$$.fragment),b=S(),C&&C.c(),_(r,"class","zephr-form-invitation-title svelte-yy7ok3"),_(i,"class","zephr-form-invitation-description"),_(d,"class","zephr-form-invitation-input-container svelte-yy7ok3"),_(u,"class","zephr-form-relative-container zephr-form-invitation-email svelte-yy7ok3"),$(u,"zephr-payment-form-relative-container",e[11]),_(t,"class","zephr-form-invitation-container svelte-yy7ok3")},m(e,g){y(e,t,g),h(t,r),h(r,n),h(t,o),h(t,i),h(i,a),h(t,s),se(c,t,null),h(t,l),h(t,u),h(u,d),se(p,d,null),h(u,m),se(f,u,null),h(t,b),C&&C.m(t,null),E=!0},p(e,[r]){(!E||1&r)&&w(n,e[0]),(!E||2&r)&&w(a,e[1]);const o={};4&r&&(o.label=e[2]),2048&r&&(o.isPaymentForm=e[11]),c.$set(o);const i={};1024&r&&(i.disabled=e[10]),128&r&&(i.value=e[7]??""),512&r&&(i.errorMessage=e[9]),2048&r&&(i.isPaymentForm=e[11]),4096&r&&(i. s={};1152&r&&(s.disabled=!mi(e[7])||e[10]),8&r&&(s.text=e[3]),32&r&&(s. oc(e,t,r){let{formKey:n}=t,{title:o}=t,{description:i}=t,{label:a}=t,{btnText:s}=t,{linkSentText:c}=t,{onSendInviteClick:l}=t,{onChange:u}=t,{invitationEmail:d}=t,{invitationSent:p}=t,{error:m=null}=t,{isBusy:f}=t,{isPaymentForm:h=!1}=t,{onFocus:y}=t,{onBlur:g}=t;const b=`zephr-form-invitation-email-${n}`;return e.$$set=e=>{"formKey"in e&&r(15,n=e.formKey),"title"in e&&r(0,o=e.title),"description"in e&&r(1,i=e.description),"label"in e&&r(2,a=e.label),"btnText"in e&&r(3,s=e.btnText),"linkSentText"in e&&r(4,c=e.linkSentText),"onSendInviteClick"in e&&r(5,l=e.onSendInviteClick),"onChange"in e&&r(6,u=e.onChange),"invitationEmail"in e&&r(7,d=e.invitationEmail),"invitationSent"in e&&r(8,p=e.invitationSent),"error"in e&&r(9,m=e.error),"isBusy"in e&&r(10,f=e.isBusy),"isPaymentForm"in e&&r(11,h=e.isPaymentForm),"onFocus"in e&&r(12,y=e.onFocus),"onBlur"in e&&r(13,g=e.onBlur)},[o,i,a,s,c,l,u,d,p,m,f,h,y,g,b,n,({detail:e})=>u(e)]}class ic extends de{constructor(e){super(),ue(this,e,oc,nc,a,{formKey:15,title:0,description:1,label:2,btnText:3,linkSentText:4,onSendInviteClick:5,onChange:6,invitationEmail:7,invitationSent:8,error:9,isBusy:10,isPaymentForm:11,onFocus:12,onBlur:13})}}const ac=async(e,t,r)=>{let n;n=t.userExists?await(e=>fr("blaize/profile",{method:"GET"},e).then((e=>e.json())))(r):t.userAttributes;const o=((e,t)=>(e??[]).reduce(((e,r)=>{const n=t[r.attrSlug];return{...e,[r.fieldName]:n}}),{}))(Nt(e).invitationMetadata.mapping,n),i=await fr("zephr/public/products/v1/shares/invitations/emails",{method:"POST",bodyObject:{product_id:t.paymentOption.productId,email_address:t.invitationEmail,base_url:Nt(e).invitationMetadata.url,meta_data:o}},r),a=await i.json();if(i.ok)r.updateFormState({invitationSent:!0,invitationEmail:""}),setTimeout((()=>{r.updateFormState({invitationSent:!1})}),3e3);else{const t=(s=a,403===s?.status&&s?.message?.includes("you do not have access to")?at.INVITATION_FAILED_NO_PRODUCT_ACCESS:400===s?.status&&s?.message?.includes("Invalid recipient email")?at.INVITATION_FAILED_INVALID_EMAIL:400===s?.status&&s?.message?.includes("reached the configured limit")?at.INVITATION_FAILED_LIMIT_REACHED:409===s?.status?at.INVITATION_FAILED_DUPLICATE_EMAIL:at.INVITATION_FAILED_UNKNOWN);dt(e,"zephr_form_error",{error:at[t]}),r.updateFormState({invitationSent:!1,serverErrors:[t]})}var s},sc={matches:e=>e.type===Fe,create:(e,t,r,n)=>t.paymentOption?.product_sharing_limit>0?{component:ic,props:{formKey:e.uniqueKey,title:n.title,description:n.description,label:n.label,btnText:n.btnText,linkSentText:n.linkSentText,onSendInviteClick:()=>{dt(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),ac(e,t,r)},onChange:n=>{r.updateFormState({invitationEmail:n,serverErrors:[]}),dt(e,"zephr_form_input_change",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"})},onFocus:()=>dt(e,"zephr_form_input_focus",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"}),onBlur:()=>dt(e,"zephr_form_input_blur",{inputName:`zephr-form-invitation-email-${e.uniqueKey}`,sectionId:t.currentSection.type,field:"invitation-email"}),invitationEmail:t.invitationEmail,invitationSent:t.invitationSent,isBusy:t.isBusy,isPaymentForm:e.formType===wt.PAYMENT}}:{component:null,props:{}}};class cc extends de{constructor(e){super(),ue(this,e,null,null,a,{})}}const lc={matches:e=>e.type===Ce,create:(e,t,r)=>{const n=so(e.organisationConfiguration.paymentProvider);if(null==n.preLoaderComponent)return{component:cc,props:{}};return{component:n.preLoaderComponent(Nt(e).paymentProviderFormConfig),props:{onMountCallback:()=>n.preLoader()}}}};function uc(t){let r;return{c(){r=P("div")},m(e,n){y(e,r,n),r.innerHTML=t[0]},p(e,[t]){1&t&&(r.innerHTML=e[0])},i:e,o:e,d(e){e&&g(r)}}}function dc(e,t,r){let{html:n}=t;return e.$$set=e=>{"html"in e&&r(0,n=e.html)},[n]}class pc extends de{constructor(e){super(),ue(this,e,dc,uc,a,{html:0})}}const mc=()=>(Math.random()+1).toString(36).substring(7),fc=mc(),hc=e=>e.dynamicOfferResult?Object.entries({tagline:e.dynamicOfferResult.tagline,...e.dynamicOfferResult.custom??{}}).reduce(((e,[t,r])=>(t&&null!=r&&(e[t]=r),e)),{}):{},yc=(e,t)=>(e.templateVariables??[]).reduce(((e,r)=>null==r.defaultValue||r.paymentOptionLevel!=t?e:{...e,[r.key]:r.defaultValue}),{}),gc=e=>{window.Zephr||(window.Zephr={}),window.Zephr.forms||(window.Zephr.forms={}),window.Zephr.forms[e.formInstanceId]=e},bc=(e,t,r,n,o,i)=>{if(!o)return{scope:{},actions:{}};try{const a=new Function("state","form","scope",o),s=(t.customComponentState??{})[r.id??"_"];return a(t.dynamicOfferResult?{...s??{},dynamicOfferResult:_n(t.dynamicOfferResult,e,t)}:s,n,i)}catch(e){return console.error("Error evaluating pre-render script",e),{scope:{error:e},actions:{}}}},Pc=(e,t,r)=>n=>{t.updateFormState({customComponentState:{...e.customComponentState??{},[r]:{...(e.customComponentState??{})[r]??{},...n??{}}}})},Ec=(e,t,r,n)=>async(o,i)=>{let a;if(n){const e=r.dynamicOfferResult.products.find((e=>e.id===o)),t=e?.paymentPlans.find((e=>e.planId===i));a={slug:t.planId,productId:e.id,label:e.label,currencyCode:t.charges[0].prices[0].currency}}else a=Nt(e).paymentOptions?.find((e=>e.productId===o&&e.slug===i));if(a){if(t.updateFormState({paymentOption:a,serverErrors:[],billingAddress:{country:null,postalCode:null}}),e.organisationConfiguration.trackFormDataLayerEvents){await lo(e,t.getFormState(),t);const n=t.getFormState().paymentOptionPrices?.totalPrice;dt(e,"zephr_form_payment_option_selected",{productId:a.productId,planId:a.slug,price:n}),dt(e,"select_item",{ecommerce:{items:[{item_id:a.slug,item_name:a.productId,price:n,quantity:1}]}}),dt(e,"add_to_cart",{ecommerce:{currency:Nt(e).formCurrency??a?.currencyCode,value:n,items:[{item_id:a.slug,item_name:a.productId,price:n,quantity:1}]}}),dt(e,"zephr_form_button_press",{sectionId:r.currentSection.type,buttonType:"SUBMIT"})}t.completeSection()}else console.warn(`No payment option exists for ${o} ${i}.`)},Ac=(e,t,r,n,o)=>{const i=!!Nt(e).dynamicOffer?.id,a=(Nt(e).paymentOptions??[]).map(((e,t)=>({slug:e.slug,productId:e.productId,label:e.label,price:e.price,currencyCode:e.currencyCode,formattedPrice:fn(e.price,e.currencyCode),index:t,...yc(o,!0),...e.templateValues??{}})));return{formId:e.id,formInstanceId:fc,paymentOptions:a,ref:`window.Zephr.forms['${fc}']`,setState:Pc(t,r,n.id??"_"),getState:()=>r.getFormState(),selectPaymentOption:Ec(e,r,t,i)}},Sc={matches:e=>e.type===ze,create:(e,t,r,n)=>{const o=((e,t,r,n)=>{const o=(e.resolvedComponentTemplates??[]).find((e=>e.id===n.templateId));if(!o)return console.warn(`No component template found for id '${n.templateId}'`),"";const i=Ac(e,t,r,n,o),a={...yc(o,!1),...n.templateValues??{},...hc(t),zephrForm:i,zephrOutcomeId:e.outcomeId,zephrRuleId:e.ruleId},s=bc(e,t,n,i,o.preRenderScript,a),c={...a,...s.scope??{}};i.acti Jr.render(`\n ${o.css?``:""}\n ${o.html??""}\n `,c)}catch(e){return console.error("Error rendering mustache template",e),""}})(e,t,r,n);return{component:pc,props:{html:o}}}};function Cc(e){let t,r,n,o=e[0].planLabel+"";return{c(){t=P("div"),r=P("h3"),n=A(o),_(t,"class","plan-label")},m(e,o){y(e,t,o),h(t,r),h(r,n)},p(e,t){1&t&&o!==(o=e[0].planLabel+"")&&w(n,o)},d(e){e&&g(t)}}}function vc(e){let t,r,n,o,i,a,s,c,l=e[0].amount+"";return{c(){t=P("hr"),r=S(),n=P("div"),o=P("div"),i=A(e[2]),a=S(),s=P("div"),c=A(l),_(t,"class","svelte-1ecrab7"),_(o,"class","info-label svelte-1ecrab7"),_(s,"class","info svelte-1ecrab7"),_(n,"class","info-row svelte-1ecrab7")},m(e,l){y(e,t,l),y(e,r,l),y(e,n,l),h(n,o),h(o,i),h(n,a),h(n,s),h(s,c)},p(e,t){4&t&&w(i,e[2]),1&t&&l!==(l=e[0].amount+"")&&w(c,l)},d(e){e&&(g(t),g(r),g(n))}}}function Tc(e){let t,r,n,o,i,a,s,c,l=e[0].nextBillingTime+"";return{c(){t=P("hr"),r=S(),n=P("div"),o=P("div"),i=A(e[3]),a=S(),s=P("div"),c=A(l),_(t,"class","svelte-1ecrab7"),_(o,"class","info-label svelte-1ecrab7"),_(s,"class","info svelte-1ecrab7"),_(n,"class","info-row svelte-1ecrab7")},m(e,l){y(e,t,l),y(e,r,l),y(e,n,l),h(n,o),h(o,i),h(n,a),h(n,s),h(s,c)},p(e,t){8&t&&w(i,e[3]),1&t&&l!==(l=e[0].nextBillingTime+"")&&w(c,l)},d(e){e&&(g(t),g(r),g(n))}}}function _c(e){let t;return{c(){t=P("div"),_(t,"class","change-disabled-label svelte-1ecrab7")},m(r,n){y(r,t,n),t.innerHTML=e[4]},p(e,r){16&r&&(t.innerHTML=e[4])},d(e){e&&g(t)}}}function Oc(e){let t,r,n,o,a,s,c,l,u,d,p,m,f,b,E,C,O=e[0].productLabel+"",I=e[0].planLabel&&Cc(e),R=e[0].amount&&e[2]&&vc(e),M=e[0].nextBillingTime&&e[3]&&Tc(e);p=new mo({props:{disabled:e[0].cannotBeChanged,text:e[1]??"Select",onClick:e[5]}});let N=e[0].cannotBeChanged&&_c(e);return{c(){t=P("div"),r=P("div"),n=P("div"),o=P("div"),a=P("h2"),s=A(O),c=S(),I&&I.c(),l=S(),R&&R.c(),u=S(),M&&M.c(),d=S(),ae(p.$$.fragment),m=S(),N&&N.c(),_(o,"class","subscription-option-product-label"),_(n,"class","inner-box svelte-1ecrab7"),_(r,"class","subscription-option-box"),_(r,"aria-hidden","true"),_(r,"style",f=e[0].cannotBeChanged?"":"cursor: pointer;"),_(t,"class","subscription-option-wrapper svelte-1ecrab7")},m(f,g){var P;y(f,t,g),h(t,r),h(r,n),h(n,o),h(o,a),h(a,s),h(n,c),I&&I.m(n,null),h(n,l),R&&R.m(n,null),h(n,u),M&&M.m(n,null),h(n,d),se(p,n,null),h(n,m),N&&N.m(n,null),b=!0,E||(C=v(r,"click",(P=T((function(){i(e[5])&&e[5].apply(this,arguments)})),function(e){e.target===this&&P.call(this,e)})),E=!0)},p(t,[o]){e=t,(!b||1&o)&&O!==(O=e[0].productLabel+"")&&w(s,O),e[0].planLabel?I?I.p(e,o):(I=Cc(e),I.c(),I.m(n,l)):I&&(I.d(1),I=null),e[0].amount&&e[2]?R?R.p(e,o):(R=vc(e),R.c(),R.m(n,u)):R&&(R.d(1),R=null),e[0].nextBillingTime&&e[3]?M?M.p(e,o):(M=Tc(e),M.c(),M.m(n,d)):M&&(M.d(1),M=null);const i={};1&o&&(i.disabled=e[0].cannotBeChanged),2&o&&(i.text=e[1]??"Select"),32&o&&(i. pointer;"))&&_(r,"style",f)},i(e){b||(te(p.$$.fragment,e),b=!0)},o(e){re(p.$$.fragment,e),b=!1},d(e){e&&g(t),I&&I.d(),R&&R.d(),M&&M.d(),ce(p),N&&N.d(),E=!1,C()}}}function Ic(e,t,r){let{subscription:n}=t,{selectButtonText:o}=t,{amountLabel:i}=t,{nextBillingDateLabel:a}=t,{noChangePlanMappingMessage:s}=t,{onSelect:c}=t;return e.$$set=e=>{"subscription"in e&&r(0,n=e.subscription),"selectButtonText"in e&&r(1,o=e.selectButtonText),"amountLabel"in e&&r(2,i=e.amountLabel),"nextBillingDateLabel"in e&&r(3,a=e.nextBillingDateLabel),"noChangePlanMappingMessage"in e&&r(4,s=e.noChangePlanMappingMessage),"onSelect"in e&&r(5,c=e.onSelect)},[n,o,i,a,s,c]}class wc extends de{constructor(e){super(),ue(this,e,Ic,Oc,a,{subscription:0,selectButtonText:1,amountLabel:2,nextBillingDateLabel:3,noChangePlanMappingMessage:4,onSelect:5})}}function Rc(e,t,r){const n=e.slice();return n[8]=t[r],n}function Mc(e){let t,r;return t=new rr({}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Nc(e){let t;return{c(){t=P("div")},m(r,n){y(r,t,n),t.innerHTML=e[0]},p(e,r){1&r&&(t.innerHTML=e[0])},d(e){e&&g(t)}}}function $c(e){let t,r;function n(){return e[7](e[8])}return t=new wc({props:{subscription:e[8],selectButtonText:e[5],noChangePlanMappingMessage:e[1],amountLabel:e[3],nextBillingDateLabel:e[4],onSelect:n}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(r,o){e=r;const i={};4&o&&(i.subscription=e[8]),32&o&&(i.selectButt Lc(e){let t,r,n,o,i=null==e[2]&&Mc(),a=null!=e[2]&&!e[2].length&&Nc(e),s=ne(e[2]??[]),c=[];for(let t=0;tre(c[e],1,1,(()=>{c[e]=null}));return{c(){t=P("div"),i&&i.c(),r=S(),a&&a.c(),n=S();for(let e=0;e{i=null})),ee()),null==e[2]||e[2].length?a&&(a.d(1),a=null):a?a.p(e,o):(a=Nc(e),a.c(),a.m(t,n)),126&o){let r;for(s=ne(e[2]??[]),r=0;r{"noSubscriptionsMessage"in e&&r(0,n=e.noSubscriptionsMessage),"noChangePlanMappingMessage"in e&&r(1,o=e.noChangePlanMappingMessage),"subscriptions"in e&&r(2,i=e.subscriptions),"amountLabel"in e&&r(3,a=e.amountLabel),"nextBillingDateLabel"in e&&r(4,s=e.nextBillingDateLabel),"selectButtonText"in e&&r(5,c=e.selectButtonText),"onSelect"in e&&r(6,l=e.onSelect)},[n,o,i,a,s,c,l,e=>l(e)]}class Fc extends de{constructor(e){super(),ue(this,e,xc,Lc,a,{noSubscriptionsMessage:0,noChangePlanMappingMessage:1,subscriptions:2,amountLabel:3,nextBillingDateLabel:4,selectButtonText:5,onSelect:6})}}const zc={matches:e=>e.type===ke,create:(e,t,r,n)=>({component:Fc,props:{noSubscriptionsMessage:n.noSubscriptionsMessage,selectButtonText:n.selectButtonText,noChangePlanMappingMessage:n.noChangePlanMappingMessage,amountLabel:n.amountLabel,nextBillingDateLabel:n.nextBillingDateLabel,subscriptions:t.existingSubscriptions?t.existingSubscriptions.filter((e=>"inactive"!==e.status)):null,onSelect:n=>{r.updateFormState({selectedSubscription:n}),dt(e,"zephr_form_button_press",{sectionId:t.currentSection.type,buttonType:"SUBMIT"}),r.completeSection()}}})};function kc(e){let t,r,n,o,i,a,s,c=e[4]&&Dc(e);return{c(){t=P("div"),r=P("div"),n=A(e[3]),o=S(),c&&c.c(),i=S(),a=P("hr"),_(r,"class","information"),_(t,"class","section"),_(a,"class","svelte-1wg9q7")},m(e,l){y(e,t,l),h(t,r),h(r,n),h(r,o),c&&c.m(r,null),y(e,i,l),y(e,a,l),s=!0},p(e,t){(!s||8&t)&&w(n,e[3]),e[4]?c?(c.p(e,t),16&t&&te(c,1)):(c=Dc(e),c.c(),te(c,1),c.m(r,null)):c&&(X(),re(c,1,1,(()=>{c=null})),ee())},i(e){s||(te(c),s=!0)},o(e){re(c),s=!1},d(e){e&&(g(t),g(i),g(a)),c&&c.d()}}}function Dc(e){let t,r;return t=new _a({props:{text:e[4]}}),t.$on("linkClick",e[7]),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};16&r&&(n.text=e[4]),t.$set(n)},i(e){r||(te(t.$$.fragment,e),r=!0)},o(e){re(t.$$.fragment,e),r=!1},d(e){ce(t,e)}}}function Bc(e){let t,r,n,o,i,a,s,c,l=e[0].nextBillingTime+"";return{c(){t=P("div"),r=P("h3"),n=A(e[1]),o=S(),i=P("div"),a=A(l),s=S(),c=P("hr"),_(r,"class","svelte-1wg9q7"),_(i,"class","information"),_(t,"class","section"),_(c,"class","svelte-1wg9q7")},m(e,l){y(e,t,l),h(t,r),h(r,n),h(t,o),h(t,i),h(i,a),y(e,s,l),y(e,c,l)},p(e,t){2&t&&w(n,e[1]),1&t&&l!==(l=e[0].nextBillingTime+"")&&w(a,l)},d(e){e&&(g(t),g(s),g(c))}}}function Uc(e){let t,r,n,o,i,a,s,c,l=e[0].amount+"";return{c(){t=P("div"),r=P("h3"),n=A(e[2]),o=S(),i=P("div"),a=A(l),s=S(),c=P("hr"),_(r,"class","svelte-1wg9q7"),_(i,"class","information"),_(t,"class","section"),_(c,"class","svelte-1wg9q7")},m(e,l){y(e,t,l),h(t,r),h(r,n),h(t,o),h(t,i),h(i,a),y(e,s,l),y(e,c,l)},p(e,t){4&t&&w(n,e[2]),1&t&&l!==(l=e[0].amount+"")&&w(a,l)},d(e){e&&(g(t),g(s),g(c))}}}function Gc(e){let t,r,n,o,i,a,s,c,l,u,d,p,m=e[0].productLabel+"",b=e[6]&&kc(e),E="active"===e[0].status&&e[0].nextBillingTime&&Bc(e),C=e[0].amount&&Uc(e);return{c(){t=P("div"),r=P("div"),n=P("div"),o=P("h2"),i=A(m),s=S(),c=P("hr"),l=S(),b&&b.c(),u=S(),E&&E.c(),d=S(),C&&C.c(),_(o,"class",a=f("inactive"===e[0].status?"inactive":"")+" svelte-1wg9q7"),_(n,"class","section"),_(c,"class","svelte-1wg9q7"),_(r,"class","inner-box svelte-1wg9q7"),_(t,"class","subscription-list-item svelte-1wg9q7")},m(e,a){y(e,t,a),h(t,r),h(r,n),h(n,o),h(o,i),h(r,s),h(r,c),h(r,l),b&&b.m(r,null),h(r,u),E&&E.m(r,null),h(r,d),C&&C.m(r,null),p=!0},p(e,[t]){(!p||1&t)&&m!==(m=e[0].productLabel+"")&&w(i,m),(!p||1&t&&a!==(a=f("inactive"===e[0].status?"inactive":"")+" svelte-1wg9q7"))&&_(o,"class",a),e[6]?b?(b.p(e,t),64&t&&te(b,1)):(b=kc(e),b.c(),te(b,1),b.m(r,u)):b&&(X(),re(b,1,1,(()=>{b=null})),ee()),"active"===e[0].status&&e[0].nextBillingTime?E?E.p(e,t):(E=Bc(e),E.c(),E.m(r,d)):E&&(E.d(1),E=null),e[0].amount?C?C.p(e,t):(C=Uc(e),C.c(),C.m(r,null)):C&&(C.d(1),C=null)},i(e){p||(te(b),p=!0)},o(e){re(b),p=!1},d(e){e&&g(t),b&&b.d(),E&&E.d(),C&&C.d()}}}function Vc(e,t,r){let{subscription:n}=t,{nextPaymentDateText:o}=t,{subscriptionRateText:i}=t,{billingHistoryText:a}=t,{billingHistoryLink:s}=t,{onViewHistory:c}=t,{showBillingHistory:l}=t;return e.$$set=e=>{"subscription"in e&&r(0,n=e.subscription),"nextPaymentDateText"in e&&r(1,o=e.nextPaymentDateText),"subscriptionRateText"in e&&r(2,i=e.subscriptionRateText),"billingHistoryText"in e&&r(3,a=e.billingHistoryText),"billingHistoryLink"in e&&r(4,s=e.billingHistoryLink),"onViewHistory"in e&&r(5,c=e.onViewHistory),"showBillingHistory"in e&&r(6,l=e.showBillingHistory)},[n,o,i,a,s,c,l,()=>c(n)]}class qc extends de{constructor(e){super(),ue(this,e,Vc,Gc,a,{subscription:0,nextPaymentDateText:1,subscriptionRateText:2,billingHistoryText:3,billingHistoryLink:4,onViewHistory:5,showBillingHistory:6})}}function jc(t){let r,n,o,i,a,s,c,l,u;return{c(){r=P("a"),n=P("span"),o=A(t[0]),i=S(),a=E("svg"),s=E("path"),_(s,"fill","currentColor"),_(s,"d","M305 239c9.4 9.4 9.4 24.6 0 33.9L113 465c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l175-175L79 81c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L305 239z"),_(a,"aria-hidden","true"),_(a,"focusable","false"),_(a,"data-prefix","far"),_(a,"data-icon","chevron-right"),_(a,"class","svg-inline--fa fa-chevron-right sc-egTsrv kzAurc"),_(a,"role","img"),_(a,"xmlns","http://www.w3.org/2000/svg"),_(a,"viewBox","0 0 320 512"),_(a,"width","16"),_(a,"height","16"),_(r,"class","zephr-form-tablink svelte-ky9lgg"),_(r,"href",c=!t[1]||window.Zephr&&window.Zephr.isCustomPage&&t[1].startsWith(window.Zephr.customPagePath)?" void(0)":t[1])},m(e,c){y(e,r,c),h(r,n),h(n,o),h(r,i),h(r,a),h(a,s),l||(u=v(r,"click",t[4]),l=!0)},p(e,[t]){1&t&&w(o,e[0]),2&t&&c!==(c=!e[1]||window.Zephr&&window.Zephr.isCustomPage&&e[1].startsWith(window.Zephr.customPagePath)?" void(0)":e[1])&&_(r,"href",c)},i:e,o:e,d(e){e&&g(r),l=!1,u()}}}function Hc(e,t,r){let{text:n}=t,{path:o=""}=t,{onClick:i=(()=>{})}=t,{logDlEvent:a=(()=>{})}=t;return e.$$set=e=>{"text"in e&&r(0,n=e.text),"path"in e&&r(1,o=e.path),"onClick"in e&&r(2,i=e.onClick),"logDlEvent"in e&&r(3,a=e.logDlEvent)},[n,o,i,a,()=>{a?.(),window.Zephr&&window.Zephr.isCustomPage&&o.startsWith(window.Zephr.customPagePath)?window.history.pushState({},"",o):i()}]}class Kc extends de{constructor(e){super(),ue(this,e,Hc,jc,a,{text:0,path:1,onClick:2,logDlEvent:3})}}function Yc(e,t,r){const n=e.slice();return n[20]=t[r],n[22]=r,n}function Wc(e){let t,r,n=ne(e[13]),o=[];for(let t=0;tre(o[e],1,1,(()=>{o[e]=null}));return{c(){for(let e=0;e{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function tl(e){let t,r;return t=new Kc({props:{text:e[3],onClick:e[16]}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.text=e[3]),17&r&&(n. rl(e){let t,r,n=e[8]&&nl(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){e[8]?n?(n.p(e,r),256&r&&te(n,1)):(n=nl(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function nl(e){let t,r;return t=new Kc({props:{text:e[8],onClick:e[17]}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};256&r&&(n.text=e[8]),33&r&&(n. ol(e){let t,r,n=e[9]&&il(e);return{c(){n&&n.c(),t=C()},m(e,o){n&&n.m(e,o),y(e,t,o),r=!0},p(e,r){e[9]?n?(n.p(e,r),512&r&&te(n,1)):(n=il(e),n.c(),te(n,1),n.m(t.parentNode,t)):n&&(X(),re(n,1,1,(()=>{n=null})),ee())},i(e){r||(te(n),r=!0)},o(e){re(n),r=!1},d(e){e&&g(t),n&&n.d(e)}}}function il(e){let t,r;return t=new Kc({props:{text:e[9],path:`${e[11]}?subscription=${e[0].externalId}`,logDlEvent:e[18]}}),{c(){ae(t.$$.fragment)},m(e,n){se(t,e,n),r=!0},p(e,r){const n={};512&r&&(n.text=e[9]),2049&r&&(n.path=`${e[11]}?subscription=${e[0].externalId}`),65&r&&(n.logDlEvent=e[18]),t.$set(n)},i(e
Comments
0 comment