From db56fa6d1f49aa580f3da94842ffb9e73516ee18 Mon Sep 17 00:00:00 2001 From: Axel Cureno Basurto Date: Mon, 8 Jul 2024 14:06:27 -0700 Subject: [PATCH 1/3] feat(MWPW-142267): Merch What's Included and Merch Mnemonic List (TwP) --- mas.js | 6 +- web-components/build.mjs | 30 ++++++ web-components/src/merch-mnemonic-list.js | 47 ++++++++ web-components/src/merch-twp-d2p.css.js | 15 +++ web-components/src/merch-twp-d2p.js | 20 ++++ web-components/src/merch-whats-included.js | 100 ++++++++++++++++++ web-components/test/merch-twp-d2p.test.html | 94 +++++++++++++++- .../test/merch-twp-d2p.test.html.js | 2 + .../test/merch-whats-included.html.js | 36 +++++++ .../test/merch-whats-included.test.html | 93 ++++++++++++++++ 10 files changed, 438 insertions(+), 5 deletions(-) create mode 100644 web-components/src/merch-mnemonic-list.js create mode 100644 web-components/src/merch-whats-included.js create mode 100644 web-components/test/merch-whats-included.html.js create mode 100644 web-components/test/merch-whats-included.test.html diff --git a/mas.js b/mas.js index e6f66baf..b37746f4 100644 --- a/mas.js +++ b/mas.js @@ -1,4 +1,4 @@ -// branch: MWPW-153599 commit: 50cd43553d2734d8efefef59e7c57e6a1603cac5 Thu, 04 Jul 2024 12:29:04 GMT -var Rr=Object.defineProperty;var Ur=e=>{throw TypeError(e)};var ci=(e,t,r)=>t in e?Rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var li=(e,t)=>{for(var r in t)Rr(e,r,{get:t[r],enumerable:!0})};var te=(e,t,r)=>ci(e,typeof t!="symbol"?t+"":t,r),Dr=(e,t,r)=>t.has(e)||Ur("Cannot "+r);var Pt=(e,t,r)=>(Dr(e,t,"read from private field"),r?r.call(e):t.get(e)),Mr=(e,t,r)=>t.has(e)?Ur("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),wt=(e,t,r,n)=>(Dr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Ce;(function(e){e.ServerError="ServerError",e.ClientError="ClientError",e.UnexpectedError="UnexpectedError"})(Ce||(Ce={}));var kr=(e,t,r)=>({type:(i=>i>=500?Ce.ServerError:i<400?Ce.UnexpectedError:Ce.ClientError)(e),message:t,originatingRequest:r,status:e});var ui=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{u(n.next(l))}catch(p){s(p)}}function c(l){try{u(n.throw(l))}catch(p){s(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Be;(function(e){e.AUTHORIZATION="Authorization",e.X_API_KEY="X-Api-Key"})(Be||(Be={}));var Ot=class{constructor(t){this.fetchOptions=t}commonHeaders(){let t={};return this.fetchOptions.apiKey&&(t[Be.X_API_KEY]=this.fetchOptions.apiKey),this.fetchOptions.accessToken&&(t[Be.AUTHORIZATION]=`Bearer ${this.fetchOptions.accessToken}`),t}transformData(t,r){return r?t.map(n=>r(n)):t.map(n=>this.identifyTransform(n))}transformDatum(t,r){return r?r(t):this.identifyTransform(t)}identifyTransform(t){return t}failOnBadStatusOrParseBody(t,r){return ui(this,void 0,void 0,function*(){if(t.ok)return t.json().then(i=>({headers:t.headers,status:t.status,statusText:t.statusText,data:i}));let n=yield t.text();return Promise.reject(kr(t.status,n,r))})}buildUrl(t,r,n,i,o){var s;let a=(s=this.fetchOptions.baseUrl)!==null&&s!==void 0?s:i(this.fetchOptions.env),c=o(r,n);return this.generateUrl(a,t,c)}generateUrl(t,r,n){let i=new URL(r,t);return n&&(i.search=this.convertToSearchParams(n).toString()),i.toString()}convertToSearchParams(t){return new URLSearchParams(t)}setParams(t,r,n){n!=null&&typeof n=="boolean"?t[r]=String(n):n&&(t[r]=n)}},Lt=Ot;var H;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(H||(H={}));var Ie;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Ie||(Ie={}));var V;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(V||(V={}));var fe;(function(e){e.V2="UCv2",e.V3="UCv3"})(fe||(fe={}));var X;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})(X||(X={}));var Nt=function(e){var t;return(t=fi.get(e))!==null&&t!==void 0?t:e},fi=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var Gr=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fr=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o};function ve(e,t,r){var n,i;try{for(var o=Gr(Object.entries(e)),s=o.next();!s.done;s=o.next()){var a=Fr(s.value,2),c=a[0],u=a[1],l=Nt(c);u!=null&&r.has(l)&&t.set(l,u)}}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Ye(e){switch(e){case H.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function $e(e,t){var r,n;for(var i in e){var o=e[i];try{for(var s=(r=void 0,Gr(Object.entries(o))),a=s.next();!a.done;a=s.next()){var c=Fr(a.value,2),u=c[0],l=c[1];if(l!=null){var p=Nt(u);t.set("items["+i+"]["+p+"]",l)}}}catch(f){r={error:f}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}}var pi=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Vr(e){Ei(e);var t=e.env,r=e.items,n=e.workflowStep,i=pi(e,["env","items","workflowStep"]),o=new URL(Ye(t));return o.pathname=n+"/",$e(r,o.searchParams),ve(i,o.searchParams,hi),o.toString()}var hi=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),di=["env","workflowStep","clientId","country","items"];function Ei(e){var t,r;try{for(var n=mi(di),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var gi=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yi="p_draft_landscape",_i="/store/";function It(e){Ti(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,s=e.ot,a=e.offerType,c=e.pa,u=e.productArrangementCode,l=e.landscape,p=gi(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),f={marketSegment:o??i,offerType:a??s,productArrangementCode:u??c},h=new URL(Ye(t));return h.pathname=""+_i+n,n!==X.SEGMENTATION&&n!==X.CHANGE_PLAN_TEAM_PLANS&&$e(r,h.searchParams),n===X.SEGMENTATION&&ve(f,h.searchParams,Ct),ve(p,h.searchParams,Ct),l===V.DRAFT&&ve({af:yi},h.searchParams,Ct),h.toString()}var Ct=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),vi=["env","workflowStep","clientId","country"];function Ti(e){var t,r;try{for(var n=xi(vi),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==X.SEGMENTATION&&e.workflowStep!==X.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function Rt(e,t){switch(e){case fe.V2:return Vr(t);case fe.V3:return It(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),It(t)}}var Ut;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Ut||(Ut={}));var I;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(I||(I={}));var O;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(O||(O={}));var Dt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Dt||(Dt={}));var Mt;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Mt||(Mt={}));var kt;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(kt||(kt={}));var Gt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Gt||(Gt={}));var Ft=()=>{};Ft.createContext=Ft;var bi=V.PUBLISHED,jr=e=>{switch(e){case H.PRODUCTION:return"https://wcs.adobe.io";case H.STAGE:return"https://wcs-stage.adobe.io";case H.LOCAL:return"http://localhost:3002";default:return"https://wcs-stage.adobe.io"}},Wr=(e,t)=>{var r;return e.api_key=t.apiKey,e.landscape=(r=t.landscape)!==null&&r!==void 0?r:bi,e};var Si=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{u(n.next(l))}catch(p){s(p)}}function c(l){try{u(n.throw(l))}catch(p){s(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Vt=class extends Lt{constructor(t){super(t),this.apiPaths={getWebCommerceArtifact:"web_commerce_artifact"},this.getWebCommerceArtifact=(r,n,i,o)=>Si(this,void 0,void 0,function*(){let s=this.buildUrl(this.apiPaths.getWebCommerceArtifact,n,r,a=>jr(a),(a,c)=>this.evaluateGetWebCommerceArtifactParams(a,c));return this.fetchOptions.fetch(s,{signal:o,headers:Object.assign({},this.commonHeaders()),mode:"cors"}).then(a=>this.failOnBadStatusOrParseBody(a,`GET ${s}`)).then(a=>{let u=a.data;return{data:this.transformDatum(u,i)}})})}evaluateGetWebCommerceArtifactParams(t,r){let n={};return this.setParams(n,"offer_selector_ids",r.offerSelectorIds.join(",")),this.setParams(n,"country",r.country),this.setParams(n,"language",r.language),this.setParams(n,"currency",r.currency),this.setParams(n,"locale",r.locale),this.setParams(n,"promotion_code",r.promotionCode),Wr(n,t)}},Hr=Vt;var qe=e=>new Hr(e).getWebCommerceArtifact;var Xr="tacocat.js";var ze=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Br=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function w(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let s=new URLSearchParams(window.location.search),a=Te(n)?n:e;o=s.get(a)}if(i&&o==null){let s=Te(i)?i:e;o=window.sessionStorage.getItem(s)??window.localStorage.getItem(s)}if(r&&o==null){let s=qr(Te(r)?r:e);o=document.documentElement.querySelector(`meta[name="${s}"]`)?.content}return o??t[e]}var be=()=>{};var Yr=e=>typeof e=="boolean",se=e=>typeof e=="function",Ze=e=>typeof e=="number",$r=e=>e!=null&&typeof e=="object";var Te=e=>typeof e=="string",jt=e=>Te(e)&&e,Se=e=>Ze(e)&&Number.isFinite(e)&&e>0;function Ae(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function b(e,t){if(Yr(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function re(e,t,r){let n=Object.values(t);return n.find(i=>ze(i,e))??r??n[0]}function qr(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function Pe(e,t=1){return Ze(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Ai=Date.now(),Wt=()=>`(+${Date.now()-Ai}ms)`,Qe=new Set,Pi=b(w("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function zr(e){let t=`[${Xr}/${e}]`,r=(s,a,...c)=>s?!0:(i(a,...c),!1),n=Pi?(s,...a)=>{console.debug(`${t} ${s}`,...a,Wt())}:()=>{},i=(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([u])=>u(c,...a))};return{assert:r,debug:n,error:i,warn:(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([,u])=>u(c,...a))}}}function wi(e,t){let r=[e,t];return Qe.add(r),()=>{Qe.delete(r)}}wi((e,...t)=>{console.error(e,...t,Wt())},(e,...t)=>{console.warn(e,...t,Wt())});var Oi="no promo",Zr="promo-tag",Li="yellow",Ni="neutral",Ci=(e,t,r)=>{let n=o=>o||Oi,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Ii="cancel-context",Re=(e,t)=>{let r=e===Ii,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,s=o?e||t:void 0;return{effectivePromoCode:s,overridenPromoCode:e,className:o?Zr:`${Zr} no-promo`,text:Ci(s,t,i),variant:o?Li:Ni,isOverriden:i}};var Ht=function(e,t){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ht(e,t)};function Ue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ht(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var v=function(){return v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Di,function(a,c,u,l,p,f){if(c)t.minimumIntegerDigits=u.length;else{if(l&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(an.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(tn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(tn,function(a,c,u,l,p,f){return u==="*"?t.minimumFractionDigits=c.length:l&&l[0]==="#"?t.maximumFractionDigits=l.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""}),i.options.length&&(t=v(v({},t),rn(i.options[0])));continue}if(sn.test(i.stem)){t=v(v({},t),rn(i.stem));continue}var o=cn(i.stem);o&&(t=v(v({},t),o));var s=Mi(i.stem);s&&(t=v(v({},t),s))}return t}var Yt,ki=new RegExp("^"+Bt.source+"*"),Gi=new RegExp(Bt.source+"*$");function g(e,t){return{start:e,end:t}}var Fi=!!String.prototype.startsWith,Vi=!!String.fromCodePoint,ji=!!Object.fromEntries,Wi=!!String.prototype.codePointAt,Hi=!!String.prototype.trimStart,Xi=!!String.prototype.trimEnd,Bi=!!Number.isSafeInteger,Yi=Bi?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{un=hn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),qt=((Yt=un.exec("a"))===null||Yt===void 0?void 0:Yt[0])==="a"}catch{qt=!1}var un,fn=Fi?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},zt=Vi?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},pn=ji?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},$i=Hi?function(t){return t.trimStart()}:function(t){return t.replace(ki,"")},qi=Xi?function(t){return t.trimEnd()}:function(t){return t.replace(Gi,"")};function hn(e,t){return new RegExp(e,t)}var Zt;qt?($t=hn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Zt=function(t,r){var n;$t.lastIndex=r;var i=$t.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):Zt=function(t,r){for(var n=[];;){var i=mn(t,r);if(i===void 0||En(i)||Qi(i))break;n.push(i),r+=i>=65536?2:1}return zt.apply(void 0,n)};var $t,dn=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:P.pound,location:g(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(E.UNMATCHED_CLOSING_TAG,g(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Qt(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<"+i+"/>",location:g(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:s,location:g(n,this.clonePosition())},err:null}:this.error(E.INVALID_TAG,g(a,this.clonePosition())))}else return this.error(E.UNCLOSED_TAG,g(n,this.clonePosition()))}else return this.error(E.INVALID_TAG,g(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Zi(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=g(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!zi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return zt.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),zt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(E.EXPECT_ARGUMENT_CLOSING_BRACE,g(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(E.EMPTY_ARGUMENT,g(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(E.MALFORMED_ARGUMENT,g(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(E.EXPECT_ARGUMENT_CLOSING_BRACE,g(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:g(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(E.EXPECT_ARGUMENT_CLOSING_BRACE,g(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(E.MALFORMED_ARGUMENT,g(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Zt(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=g(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(E.EXPECT_ARGUMENT_TYPE,g(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=qi(p.val);if(f.length===0)return this.error(E.EXPECT_ARGUMENT_STYLE,g(this.clonePosition(),this.clonePosition()));var h=g(l,this.clonePosition());u={style:f,styleLocation:h}}var d=this.tryParseArgumentClose(i);if(d.err)return d;var x=g(i,this.clonePosition());if(u&&fn(u?.style,"::",0)){var y=$i(u.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(y,u.styleLocation);return p.err?p:{val:{type:P.number,value:n,location:x,style:p.val},err:null}}else{if(y.length===0)return this.error(E.EXPECT_DATE_TIME_SKELETON,x);var f={type:pe.dateTime,pattern:y,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Kr(y):{}},N=a==="date"?P.date:P.time;return{val:{type:N,value:n,location:x,style:f},err:null}}}return{val:{type:a==="number"?P.number:a==="date"?P.date:P.time,value:n,location:x,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(E.EXPECT_SELECT_ARGUMENT_OPTIONS,g(S,v({},S)));this.bumpSpace();var _=this.parseIdentifierIfPossible(),L=0;if(a!=="select"&&_.value==="offset"){if(!this.bumpIf(":"))return this.error(E.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(E.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,E.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),_=this.parseIdentifierIfPossible(),L=p.val}var A=this.tryParsePluralOrSelectOptions(t,a,r,_);if(A.err)return A;var d=this.tryParseArgumentClose(i);if(d.err)return d;var U=g(i,this.clonePosition());return a==="select"?{val:{type:P.select,value:n,options:pn(A.val),location:U},err:null}:{val:{type:P.plural,value:n,options:pn(A.val),offset:L,pluralType:a==="plural"?"cardinal":"ordinal",location:U},err:null}}default:return this.error(E.INVALID_ARGUMENT_TYPE,g(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(E.EXPECT_ARGUMENT_CLOSING_BRACE,g(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(E.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,g(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=on(t)}catch{return this.error(E.INVALID_NUMBER_SKELETON,r)}return{val:{type:pe.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?ln(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],c=new Set,u=i.value,l=i.location;;){if(u.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(E.EXPECT_PLURAL_ARGUMENT_SELECTOR,E.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;l=g(p,this.clonePosition()),u=this.message.slice(p.offset,this.offset())}else break}if(c.has(u))return this.error(r==="select"?E.DUPLICATE_SELECT_ARGUMENT_SELECTOR:E.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);u==="other"&&(s=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?E.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:E.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,g(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(t+1,r,n);if(d.err)return d;var x=this.tryParseArgumentClose(h);if(x.err)return x;a.push([u,{value:d.val,location:g(h,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,l=o.location}return a.length===0?this.error(r==="select"?E.EXPECT_SELECT_ARGUMENT_SELECTOR:E.EXPECT_PLURAL_ARGUMENT_SELECTOR,g(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(E.MISSING_OTHER_CLAUSE,g(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=g(i,this.clonePosition());return o?(s*=n,Yi(s)?{val:s,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=mn(this.message,t);if(r===void 0)throw Error("Offset "+t+" is at invalid UTF-16 code unit boundary");return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(fn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset "+t+" must be greater than or equal to the current offset "+this.offset());for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset "+t+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&En(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Qt(e){return e>=97&&e<=122||e>=65&&e<=90}function zi(e){return Qt(e)||e===47}function Zi(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function En(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Qi(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Jt(e){e.forEach(function(t){if(delete t.location,rt(t)||nt(t))for(var r in t.options)delete t.options[r].location,Jt(t.options[r].value);else Ke(t)&&ot(t.style)||(et(t)||tt(t))&&De(t.style)?delete t.style.location:it(t)&&Jt(t.children)})}function gn(e,t){t===void 0&&(t={}),t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new dn(e,t).parse();if(r.err){var n=SyntaxError(E[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Jt(r.val),r.val}function Me(e,t){var r=t&&t.cache?t.cache:no,n=t&&t.serializer?t.serializer:ro,i=t&&t.strategy?t.strategy:Ki;return i(e,{cache:r,serializer:n})}function Ji(e){return e==null||typeof e=="number"||typeof e=="boolean"}function xn(e,t,r,n){var i=Ji(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function yn(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function Kt(e,t,r,n,i){return r.bind(t,e,n,i)}function Ki(e,t){var r=e.length===1?xn:yn;return Kt(e,this,r,t.cache.create(),t.serializer)}function eo(e,t){return Kt(e,this,yn,t.cache.create(),t.serializer)}function to(e,t){return Kt(e,this,xn,t.cache.create(),t.serializer)}var ro=function(){return JSON.stringify(arguments)};function er(){this.cache=Object.create(null)}er.prototype.get=function(e){return this.cache[e]};er.prototype.set=function(e,t){this.cache[e]=t};var no={create:function(){return new er}},st={variadic:eo,monadic:to};var me;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(me||(me={}));var ke=function(e){Ue(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error);var tr=function(e){Ue(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'+r+'": "'+n+'". Options are "'+Object.keys(i).join('", "')+'"',me.INVALID_VALUE,o)||this}return t}(ke);var _n=function(e){Ue(t,e);function t(r,n,i){return e.call(this,'Value for "'+r+'" must be of type '+n,me.INVALID_VALUE,i)||this}return t}(ke);var vn=function(e){Ue(t,e);function t(r,n){return e.call(this,'The intl string context variable "'+r+'" was not provided to the string "'+n+'"',me.MISSING_VALUE,n)||this}return t}(ke);var R;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(R||(R={}));function io(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==R.literal||r.type!==R.literal?t.push(r):n.value+=r.value,t},[])}function oo(e){return typeof e=="function"}function Ge(e,t,r,n,i,o,s){if(e.length===1&&Xt(e[0]))return[{type:R.literal,value:e[0].value}];for(var a=[],c=0,u=e;c{throw TypeError(e)};var ui=(e,t,r)=>t in e?Ur(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fi=(e,t)=>{for(var r in t)Ur(e,r,{get:t[r],enumerable:!0})};var te=(e,t,r)=>ui(e,typeof t!="symbol"?t+"":t,r),Mr=(e,t,r)=>t.has(e)||Dr("Cannot "+r);var Pt=(e,t,r)=>(Mr(e,t,"read from private field"),r?r.call(e):t.get(e)),kr=(e,t,r)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),wt=(e,t,r,n)=>(Mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Ce;(function(e){e.ServerError="ServerError",e.ClientError="ClientError",e.UnexpectedError="UnexpectedError"})(Ce||(Ce={}));var Gr=(e,t,r)=>({type:(i=>i>=500?Ce.ServerError:i<400?Ce.UnexpectedError:Ce.ClientError)(e),message:t,originatingRequest:r,status:e});var pi=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{u(n.next(l))}catch(p){s(p)}}function c(l){try{u(n.throw(l))}catch(p){s(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Be;(function(e){e.AUTHORIZATION="Authorization",e.X_API_KEY="X-Api-Key"})(Be||(Be={}));var Ot=class{constructor(t){this.fetchOptions=t}commonHeaders(){let t={};return this.fetchOptions.apiKey&&(t[Be.X_API_KEY]=this.fetchOptions.apiKey),this.fetchOptions.accessToken&&(t[Be.AUTHORIZATION]=`Bearer ${this.fetchOptions.accessToken}`),t}transformData(t,r){return r?t.map(n=>r(n)):t.map(n=>this.identifyTransform(n))}transformDatum(t,r){return r?r(t):this.identifyTransform(t)}identifyTransform(t){return t}failOnBadStatusOrParseBody(t,r){return pi(this,void 0,void 0,function*(){if(t.ok)return t.json().then(i=>({headers:t.headers,status:t.status,statusText:t.statusText,data:i}));let n=yield t.text();return Promise.reject(Gr(t.status,n,r))})}buildUrl(t,r,n,i,o){var s;let a=(s=this.fetchOptions.baseUrl)!==null&&s!==void 0?s:i(this.fetchOptions.env),c=o(r,n);return this.generateUrl(a,t,c)}generateUrl(t,r,n){let i=new URL(r,t);return n&&(i.search=this.convertToSearchParams(n).toString()),i.toString()}convertToSearchParams(t){return new URLSearchParams(t)}setParams(t,r,n){n!=null&&typeof n=="boolean"?t[r]=String(n):n&&(t[r]=n)}},Lt=Ot;var Y;(function(e){e.STAGE="STAGE",e.PRODUCTION="PRODUCTION",e.LOCAL="LOCAL"})(Y||(Y={}));var Ie;(function(e){e.STAGE="STAGE",e.PRODUCTION="PROD",e.LOCAL="LOCAL"})(Ie||(Ie={}));var j;(function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"})(j||(j={}));var fe;(function(e){e.V2="UCv2",e.V3="UCv3"})(fe||(fe={}));var $;(function(e){e.CHECKOUT="checkout",e.CHECKOUT_EMAIL="checkout/email",e.SEGMENTATION="segmentation",e.BUNDLE="bundle",e.COMMITMENT="commitment",e.RECOMMENDATION="recommendation",e.EMAIL="email",e.PAYMENT="payment",e.CHANGE_PLAN_TEAM_PLANS="change-plan/team-upgrade/plans",e.CHANGE_PLAN_TEAM_PAYMENT="change-plan/team-upgrade/payment"})($||($={}));var Nt=function(e){var t;return(t=mi.get(e))!==null&&t!==void 0?t:e},mi=new Map([["countrySpecific","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["offerType","ot"],["marketSegment","ms"]]);var Fr=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Vr=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o};function ve(e,t,r){var n,i;try{for(var o=Fr(Object.entries(e)),s=o.next();!s.done;s=o.next()){var a=Vr(s.value,2),c=a[0],u=a[1],l=Nt(c);u!=null&&r.has(l)&&t.set(l,u)}}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function Ye(e){switch(e){case Y.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function $e(e,t){var r,n;for(var i in e){var o=e[i];try{for(var s=(r=void 0,Fr(Object.entries(o))),a=s.next();!a.done;a=s.next()){var c=Vr(a.value,2),u=c[0],l=c[1];if(l!=null){var p=Nt(u);t.set("items["+i+"]["+p+"]",l)}}}catch(f){r={error:f}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}}var hi=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function jr(e){xi(e);var t=e.env,r=e.items,n=e.workflowStep,i=hi(e,["env","items","workflowStep"]),o=new URL(Ye(t));return o.pathname=n+"/",$e(r,o.searchParams),ve(i,o.searchParams,Ei),o.toString()}var Ei=new Set(["cli","co","lang","ctx","cUrl","mv","nglwfdata","otac","promoid","rUrl","sdid","spint","trackingid","code","campaignid","appctxid"]),gi=["env","workflowStep","clientId","country","items"];function xi(e){var t,r;try{for(var n=di(gi),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!0}var yi=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vi="p_draft_landscape",Ti="/store/";function It(e){bi(e);var t=e.env,r=e.items,n=e.workflowStep,i=e.ms,o=e.marketSegment,s=e.ot,a=e.offerType,c=e.pa,u=e.productArrangementCode,l=e.landscape,p=yi(e,["env","items","workflowStep","ms","marketSegment","ot","offerType","pa","productArrangementCode","landscape"]),f={marketSegment:o??i,offerType:a??s,productArrangementCode:u??c},d=new URL(Ye(t));return d.pathname=""+Ti+n,n!==$.SEGMENTATION&&n!==$.CHANGE_PLAN_TEAM_PLANS&&$e(r,d.searchParams),n===$.SEGMENTATION&&ve(f,d.searchParams,Ct),ve(p,d.searchParams,Ct),l===j.DRAFT&&ve({af:vi},d.searchParams,Ct),d.toString()}var Ct=new Set(["af","ai","apc","appctxid","cli","co","csm","ctx","ctxRtUrl","DCWATC","dp","fr","gsp","ijt","lang","lo","mal","ms","mv","mv2","nglwfdata","ot","otac","pa","pcid","promoid","q","rf","sc","scl","sdid","sid","spint","svar","th","thm","trackingid","usid","workflowid","context.guid","so.ca","so.su","so.tr","so.va"]),Si=["env","workflowStep","clientId","country"];function bi(e){var t,r;try{for(var n=_i(Si),i=n.next();!i.done;i=n.next()){var o=i.value;if(!e[o])throw new Error('Argument "checkoutData" is not valid, missing: '+o)}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}if(e.workflowStep!==$.SEGMENTATION&&e.workflowStep!==$.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}function Rt(e,t){switch(e){case fe.V2:return jr(t);case fe.V3:return It(t);default:return console.warn("Unsupported CheckoutType, will use UCv3 as default. Given type: "+e),It(t)}}var Ut;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Ut||(Ut={}));var I;(function(e){e.MONTH="MONTH",e.YEAR="YEAR",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.PERPETUAL="PERPETUAL",e.TERM_LICENSE="TERM_LICENSE",e.ACCESS_PASS="ACCESS_PASS",e.THREE_MONTHS="THREE_MONTHS",e.SIX_MONTHS="SIX_MONTHS"})(I||(I={}));var L;(function(e){e.ANNUAL="ANNUAL",e.MONTHLY="MONTHLY",e.TWO_YEARS="TWO_YEARS",e.THREE_YEARS="THREE_YEARS",e.P1D="P1D",e.P1Y="P1Y",e.P3Y="P3Y",e.P10Y="P10Y",e.P15Y="P15Y",e.P3D="P3D",e.P7D="P7D",e.P30D="P30D",e.HALF_YEARLY="HALF_YEARLY",e.QUARTERLY="QUARTERLY"})(L||(L={}));var Dt;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Dt||(Dt={}));var Mt;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(Mt||(Mt={}));var kt;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(kt||(kt={}));var Gt;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Gt||(Gt={}));var Ft=()=>{};Ft.createContext=Ft;var Ai=j.PUBLISHED,Wr=e=>{switch(e){case Y.PRODUCTION:return"https://wcs.adobe.io";case Y.STAGE:return"https://wcs-stage.adobe.io";case Y.LOCAL:return"http://localhost:3002";default:return"https://wcs-stage.adobe.io"}},Hr=(e,t)=>{var r;return e.api_key=t.apiKey,e.landscape=(r=t.landscape)!==null&&r!==void 0?r:Ai,e};var Pi=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(l){try{u(n.next(l))}catch(p){s(p)}}function c(l){try{u(n.throw(l))}catch(p){s(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((n=n.apply(e,t||[])).next())})},Vt=class extends Lt{constructor(t){super(t),this.apiPaths={getWebCommerceArtifact:"web_commerce_artifact"},this.getWebCommerceArtifact=(r,n,i,o)=>Pi(this,void 0,void 0,function*(){let s=this.buildUrl(this.apiPaths.getWebCommerceArtifact,n,r,a=>Wr(a),(a,c)=>this.evaluateGetWebCommerceArtifactParams(a,c));return this.fetchOptions.fetch(s,{signal:o,headers:Object.assign({},this.commonHeaders()),mode:"cors"}).then(a=>this.failOnBadStatusOrParseBody(a,`GET ${s}`)).then(a=>{let u=a.data;return{data:this.transformDatum(u,i)}})})}evaluateGetWebCommerceArtifactParams(t,r){let n={};return this.setParams(n,"offer_selector_ids",r.offerSelectorIds.join(",")),this.setParams(n,"country",r.country),this.setParams(n,"language",r.language),this.setParams(n,"currency",r.currency),this.setParams(n,"locale",r.locale),this.setParams(n,"promotion_code",r.promotionCode),Hr(n,t)}},Xr=Vt;var qe=e=>new Xr(e).getWebCommerceArtifact;var Br="tacocat.js";var ze=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),Yr=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function w(e,t={},{metadata:r=!0,search:n=!0,storage:i=!0}={}){let o;if(n&&o==null){let s=new URLSearchParams(window.location.search),a=Te(n)?n:e;o=s.get(a)}if(i&&o==null){let s=Te(i)?i:e;o=window.sessionStorage.getItem(s)??window.localStorage.getItem(s)}if(r&&o==null){let s=zr(Te(r)?r:e);o=document.documentElement.querySelector(`meta[name="${s}"]`)?.content}return o??t[e]}var Se=()=>{};var $r=e=>typeof e=="boolean",ae=e=>typeof e=="function",Ze=e=>typeof e=="number",qr=e=>e!=null&&typeof e=="object";var Te=e=>typeof e=="string",jt=e=>Te(e)&&e,be=e=>Ze(e)&&Number.isFinite(e)&&e>0;function Ae(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,n])=>{t(n)&&delete e[r]}),e}function _(e,t){if($r(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function re(e,t,r){let n=Object.values(t);return n.find(i=>ze(i,e))??r??n[0]}function zr(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,n)=>`${r}-${n}`).replace(/\W+/gu,"-").toLowerCase()}function Pe(e,t=1){return Ze(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var wi=Date.now(),Wt=()=>`(+${Date.now()-wi}ms)`,Qe=new Set,Oi=_(w("tacocat.debug",{},{metadata:!1}),typeof process<"u"&&process.env?.DEBUG);function Zr(e){let t=`[${Br}/${e}]`,r=(s,a,...c)=>s?!0:(i(a,...c),!1),n=Oi?(s,...a)=>{console.debug(`${t} ${s}`,...a,Wt())}:()=>{},i=(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([u])=>u(c,...a))};return{assert:r,debug:n,error:i,warn:(s,...a)=>{let c=`${t} ${s}`;Qe.forEach(([,u])=>u(c,...a))}}}function Li(e,t){let r=[e,t];return Qe.add(r),()=>{Qe.delete(r)}}Li((e,...t)=>{console.error(e,...t,Wt())},(e,...t)=>{console.warn(e,...t,Wt())});var Ni="no promo",Qr="promo-tag",Ci="yellow",Ii="neutral",Ri=(e,t,r)=>{let n=o=>o||Ni,i=r?` (was "${n(t)}")`:"";return`${n(e)}${i}`},Ui="cancel-context",Re=(e,t)=>{let r=e===Ui,n=!r&&e?.length>0,i=(n||r)&&(t&&t!=e||!t&&!r),o=i&&n||!i&&!!t,s=o?e||t:void 0;return{effectivePromoCode:s,overridenPromoCode:e,className:o?Qr:`${Qr} no-promo`,text:Ri(s,t,i),variant:o?Ci:Ii,isOverriden:i}};var Ht=function(e,t){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ht(e,t)};function Ue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ht(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var v=function(){return v=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0}),r=[],n=0,i=t;n1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ki,function(a,c,u,l,p,f){if(c)t.minimumIntegerDigits=u.length;else{if(l&&p)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(cn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(rn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(rn,function(a,c,u,l,p,f){return u==="*"?t.minimumFractionDigits=c.length:l&&l[0]==="#"?t.maximumFractionDigits=l.length:p&&f?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""}),i.options.length&&(t=v(v({},t),nn(i.options[0])));continue}if(an.test(i.stem)){t=v(v({},t),nn(i.stem));continue}var o=ln(i.stem);o&&(t=v(v({},t),o));var s=Gi(i.stem);s&&(t=v(v({},t),s))}return t}var Yt,Fi=new RegExp("^"+Bt.source+"*"),Vi=new RegExp(Bt.source+"*$");function x(e,t){return{start:e,end:t}}var ji=!!String.prototype.startsWith,Wi=!!String.fromCodePoint,Hi=!!Object.fromEntries,Xi=!!String.prototype.codePointAt,Bi=!!String.prototype.trimStart,Yi=!!String.prototype.trimEnd,$i=!!Number.isSafeInteger,qi=$i?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},qt=!0;try{fn=dn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),qt=((Yt=fn.exec("a"))===null||Yt===void 0?void 0:Yt[0])==="a"}catch{qt=!1}var fn,pn=ji?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},zt=Wi?String.fromCodePoint:function(){for(var t=[],r=0;ro;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},mn=Hi?Object.fromEntries:function(t){for(var r={},n=0,i=t;n=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},zi=Bi?function(t){return t.trimStart()}:function(t){return t.replace(Fi,"")},Zi=Yi?function(t){return t.trimEnd()}:function(t){return t.replace(Vi,"")};function dn(e,t){return new RegExp(e,t)}var Zt;qt?($t=dn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Zt=function(t,r){var n;$t.lastIndex=r;var i=$t.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}):Zt=function(t,r){for(var n=[];;){var i=hn(t,r);if(i===void 0||gn(i)||Ki(i))break;n.push(i),r+=i>=65536?2:1}return zt.apply(void 0,n)};var $t,En=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:P.pound,location:x(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(g.UNMATCHED_CLOSING_TAG,x(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Qt(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:P.literal,value:"<"+i+"/>",location:x(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("")?{val:{type:P.tag,value:i,children:s,location:x(n,this.clonePosition())},err:null}:this.error(g.INVALID_TAG,x(a,this.clonePosition())))}else return this.error(g.UNCLOSED_TAG,x(n,this.clonePosition()))}else return this.error(g.INVALID_TAG,x(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Ji(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var c=x(n,this.clonePosition());return{val:{type:P.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Qi(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return zt.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),zt(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(g.EMPTY_ARGUMENT,x(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(g.MALFORMED_ARGUMENT,x(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:x(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(g.MALFORMED_ARGUMENT,x(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Zt(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=x(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(a){case"":return this.error(g.EXPECT_ARGUMENT_TYPE,x(s,c));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var l=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var f=Zi(p.val);if(f.length===0)return this.error(g.EXPECT_ARGUMENT_STYLE,x(this.clonePosition(),this.clonePosition()));var d=x(l,this.clonePosition());u={style:f,styleLocation:d}}var h=this.tryParseArgumentClose(i);if(h.err)return h;var E=x(i,this.clonePosition());if(u&&pn(u?.style,"::",0)){var b=zi(u.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(b,u.styleLocation);return p.err?p:{val:{type:P.number,value:n,location:E,style:p.val},err:null}}else{if(b.length===0)return this.error(g.EXPECT_DATE_TIME_SKELETON,E);var f={type:pe.dateTime,pattern:b,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?en(b):{}},N=a==="date"?P.date:P.time;return{val:{type:N,value:n,location:E,style:f},err:null}}}return{val:{type:a==="number"?P.number:a==="date"?P.date:P.time,value:n,location:E,style:(o=u?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var A=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS,x(A,v({},A)));this.bumpSpace();var S=this.parseIdentifierIfPossible(),O=0;if(a!=="select"&&S.value==="offset"){if(!this.bumpIf(":"))return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),S=this.parseIdentifierIfPossible(),O=p.val}var y=this.tryParsePluralOrSelectOptions(t,a,r,S);if(y.err)return y;var h=this.tryParseArgumentClose(i);if(h.err)return h;var C=x(i,this.clonePosition());return a==="select"?{val:{type:P.select,value:n,options:mn(y.val),location:C},err:null}:{val:{type:P.plural,value:n,options:mn(y.val),offset:O,pluralType:a==="plural"?"cardinal":"ordinal",location:C},err:null}}default:return this.error(g.INVALID_ARGUMENT_TYPE,x(s,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,x(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=sn(t)}catch{return this.error(g.INVALID_NUMBER_SKELETON,r)}return{val:{type:pe.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?un(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],c=new Set,u=i.value,l=i.location;;){if(u.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var f=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR,g.INVALID_PLURAL_ARGUMENT_SELECTOR);if(f.err)return f;l=x(p,this.clonePosition()),u=this.message.slice(p.offset,this.offset())}else break}if(c.has(u))return this.error(r==="select"?g.DUPLICATE_SELECT_ARGUMENT_SELECTOR:g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);u==="other"&&(s=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,x(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(t+1,r,n);if(h.err)return h;var E=this.tryParseArgumentClose(d);if(E.err)return E;a.push([u,{value:h.val,location:x(d,this.clonePosition())}]),c.add(u),this.bumpSpace(),o=this.parseIdentifierIfPossible(),u=o.value,l=o.location}return a.length===0?this.error(r==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR:g.EXPECT_PLURAL_ARGUMENT_SELECTOR,x(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(g.MISSING_OTHER_CLAUSE,x(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var c=x(i,this.clonePosition());return o?(s*=n,qi(s)?{val:s,err:null}:this.error(r,c)):this.error(t,c)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=hn(this.message,t);if(r===void 0)throw Error("Offset "+t+" is at invalid UTF-16 code unit boundary");return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(pn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset "+t+" must be greater than or equal to the current offset "+this.offset());for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset "+t+" is at invalid UTF-16 code unit boundary");if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&gn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Qt(e){return e>=97&&e<=122||e>=65&&e<=90}function Qi(e){return Qt(e)||e===47}function Ji(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function gn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ki(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Jt(e){e.forEach(function(t){if(delete t.location,rt(t)||nt(t))for(var r in t.options)delete t.options[r].location,Jt(t.options[r].value);else Ke(t)&&ot(t.style)||(et(t)||tt(t))&&De(t.style)?delete t.style.location:it(t)&&Jt(t.children)})}function xn(e,t){t===void 0&&(t={}),t=v({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new En(e,t).parse();if(r.err){var n=SyntaxError(g[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Jt(r.val),r.val}function Me(e,t){var r=t&&t.cache?t.cache:oo,n=t&&t.serializer?t.serializer:io,i=t&&t.strategy?t.strategy:to;return i(e,{cache:r,serializer:n})}function eo(e){return e==null||typeof e=="number"||typeof e=="boolean"}function yn(e,t,r,n){var i=eo(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function _n(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function Kt(e,t,r,n,i){return r.bind(t,e,n,i)}function to(e,t){var r=e.length===1?yn:_n;return Kt(e,this,r,t.cache.create(),t.serializer)}function ro(e,t){return Kt(e,this,_n,t.cache.create(),t.serializer)}function no(e,t){return Kt(e,this,yn,t.cache.create(),t.serializer)}var io=function(){return JSON.stringify(arguments)};function er(){this.cache=Object.create(null)}er.prototype.get=function(e){return this.cache[e]};er.prototype.set=function(e,t){this.cache[e]=t};var oo={create:function(){return new er}},st={variadic:ro,monadic:no};var me;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(me||(me={}));var ke=function(e){Ue(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: "+this.code+"] "+this.message},t}(Error);var tr=function(e){Ue(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'+r+'": "'+n+'". Options are "'+Object.keys(i).join('", "')+'"',me.INVALID_VALUE,o)||this}return t}(ke);var vn=function(e){Ue(t,e);function t(r,n,i){return e.call(this,'Value for "'+r+'" must be of type '+n,me.INVALID_VALUE,i)||this}return t}(ke);var Tn=function(e){Ue(t,e);function t(r,n){return e.call(this,'The intl string context variable "'+r+'" was not provided to the string "'+n+'"',me.MISSING_VALUE,n)||this}return t}(ke);var U;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(U||(U={}));function so(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==U.literal||r.type!==U.literal?t.push(r):n.value+=r.value,t},[])}function ao(e){return typeof e=="function"}function Ge(e,t,r,n,i,o,s){if(e.length===1&&Xt(e[0]))return[{type:U.literal,value:e[0].value}];for(var a=[],c=0,u=e;c0?e.substring(0,n):"";let i=Sn(e.split("").reverse().join("")),o=r-i,s=e.substring(o,o+1),a=o+(s==="."||s===","?1:0);t.suffix=i>0?e.substring(a,r):"",t.mask=e.substring(n,a),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(uo);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function po(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[s="0",a=""]=i.value.split(".");return(!a||a&&a.length<=o)&&(a=o<0?"":(+("0."+a)).toFixed(o+1).replace("0.","")),i.integer=s,i.fraction=a,mo(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function mo(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.lengthMath.round(e*20)/20},nr=(e,t)=>({accept:e,round:t}),yo=[nr(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),nr(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.ceil(Math.floor(t*1e4/e)/100)/100),nr(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],ir={[I.YEAR]:{[O.MONTHLY]:Fe.MONTH,[O.ANNUAL]:Fe.YEAR},[I.MONTH]:{[O.MONTHLY]:Fe.MONTH}},_o=(e,t)=>e.indexOf(`'${t}'`)===0,vo=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=Cn(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+bo(e)),r},To=e=>{let t=So(e),r=_o(e,t),n=e.replace(/'.*?'/,""),i=On.test(n)||Ln.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Nn=e=>e.replace(On,wn).replace(Ln,wn),bo=e=>e.match(/#(.?)#/)?.[1]===Pn?Eo:Pn,So=e=>e.match(/'(.*?)'/)?.[1]??"",Cn=e=>e.match(/0(.?)0/)?.[1]??"";function at({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=s=>s){let{currencySymbol:s,isCurrencyFirst:a,hasCurrencySpace:c}=To(e),u=r?Cn(e):"",l=vo(e,r),p=r?2:0,f=o(t,{currencySymbol:s}),h=n?f.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):An(l,f),d=r?h.lastIndexOf(u):h.length,x=h.substring(0,d),y=h.substring(d+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,h).replace(/SYMBOL/,s),currencySymbol:s,decimals:y,decimalsDelimiter:u,hasCurrencySpace:c,integer:x,isCurrencyFirst:a,recurrenceTerm:i}}var In=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=go[r]??1;return at(e,i>1?Fe.MONTH:ir[t]?.[r],(o,{currencySymbol:s})=>{let a={divisor:i,price:o,usePrecision:n},{round:c}=yo.find(({accept:l})=>l(a));if(!c)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return(xo[s]??(l=>l))(c(a))})},Rn=({commitment:e,term:t,...r})=>at(r,ir[e]?.[t]),Un=e=>{let{commitment:t,term:r}=e;return t===I.YEAR&&r===O.MONTHLY?at(e,Fe.YEAR,n=>n*12):at(e,ir[t]?.[r])};var Ao={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Po=zr("ConsonantTemplates/price"),wo=/<.+?>/g,j={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},he={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},Oo="TAX_EXCLUSIVE",Lo=e=>$r(e)?Object.entries(e).filter(([,t])=>Te(t)||Ze(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Br(n)+'"'}`,""):"",$=(e,t,r,n=!1)=>`${n?Nn(t):t??""}`;function No(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:s,isCurrencyFirst:a,recurrenceLabel:c,perUnitLabel:u,taxInclusivityLabel:l},p={}){let f=$(j.currencySymbol,r),h=$(j.currencySpace,o?" ":""),d="";return a&&(d+=f+h),d+=$(j.integer,s),d+=$(j.decimalsDelimiter,i),d+=$(j.decimals,n),a||(d+=h+f),d+=$(j.recurrence,c,null,!0),d+=$(j.unitType,u,null,!0),d+=$(j.taxInclusivity,l,!0),$(e,d,{...p,"aria-label":t})}var de=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:i=!0,displayRecurrence:o=!0,displayPerUnit:s=!1,displayTax:a=!1,language:c,literals:u={}}={},{commitment:l,formatString:p,price:f,priceWithoutDiscount:h,taxDisplay:d,taxTerm:x,term:y,usePrecision:N}={},S={})=>{Object.entries({country:n,formatString:p,language:c,price:f}).forEach(([ee,St])=>{if(St==null)throw new Error(`Argument "${ee}" is missing`)});let _={...Ao,...u},L=`${c.toLowerCase()}-${n.toUpperCase()}`;function A(ee,St){let At=_[ee];if(At==null)return"";try{return new bn(At.replace(wo,""),L).format(St)}catch{return Po.error("Failed to format literal:",At),""}}let U=t&&h?h:f,F=e?In:Rn;r&&(F=Un);let{accessiblePrice:C,recurrenceTerm:W,...J}=F({commitment:l,formatString:p,term:y,price:e?f:U,usePrecision:N,isIndianPrice:n==="IN"}),B=C,le="";if(b(o)&&W){let ee=A(he.recurrenceAriaLabel,{recurrenceTerm:W});ee&&(B+=" "+ee),le=A(he.recurrenceLabel,{recurrenceTerm:W})}let ue="";if(b(s)){ue=A(he.perUnitLabel,{perUnit:"LICENSE"});let ee=A(he.perUnitAriaLabel,{perUnit:"LICENSE"});ee&&(B+=" "+ee)}let K="";b(a)&&x&&(K=A(d===Oo?he.taxExclusiveLabel:he.taxInclusiveLabel,{taxTerm:x}),K&&(B+=" "+K)),t&&(B=A(he.strikethroughAriaLabel,{strikethroughPrice:B}));let Y=j.container;if(e&&(Y+=" "+j.containerOptical),t&&(Y+=" "+j.containerStrikethrough),r&&(Y+=" "+j.containerAnnual),b(i))return No(Y,{...J,accessibleLabel:B,recurrenceLabel:le,perUnitLabel:ue,taxInclusivityLabel:K},S);let{currencySymbol:ye,decimals:He,decimalsDelimiter:Xe,hasCurrencySpace:Ne,integer:bt,isCurrencyFirst:si}=J,_e=[bt,Xe,He];si?(_e.unshift(Ne?"\xA0":""),_e.unshift(ye)):(_e.push(Ne?"\xA0":""),_e.push(ye)),_e.push(le,ue,K);let ai=_e.join("");return $(Y,ai,S)},Dn=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||b(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${de()(e,t,r)}${i?" "+de({displayStrikethrough:!0})(e,t,r):""}`};var or=de(),sr=Dn(),ar=de({displayOptical:!0}),cr=de({displayStrikethrough:!0}),lr=de({displayAnnual:!0});var Co=(e,t)=>{if(!(!Se(e)||!Se(t)))return Math.floor((t-e)/t*100)},Mn=()=>(e,t,r)=>{let{price:n,priceWithoutDiscount:i}=t,o=Co(n,i);return o===void 0?'':`${o}%`};var ur=Mn();var fr="ABM",pr="PUF",mr="M2M",hr="PERPETUAL",kn="P3Y",Io="TAX_INCLUSIVE_DETAILS",Ro="TAX_EXCLUSIVE",Gn={ABM:fr,PUF:pr,M2M:mr,PERPETUAL:hr,P3Y:kn},ic={[fr]:{commitment:I.YEAR,term:O.MONTHLY},[pr]:{commitment:I.YEAR,term:O.ANNUAL},[mr]:{commitment:I.MONTH,term:O.MONTHLY},[hr]:{commitment:I.PERPETUAL,term:void 0},[kn]:{commitment:I.THREE_MONTHS,term:O.P3Y}},Fn="Value is not an offer",dr=e=>{if(typeof e!="object")return Fn;let{commitment:t,term:r}=e,n=Uo(t,r);return{...e,planType:n}};var Uo=(e,t)=>{if(e===void 0)return Fn;if(e===""&&t==="")return"";let r="";return e===I.YEAR?t===O.MONTHLY?r=fr:t===O.ANNUAL&&(r=pr):e===I.MONTH?t===O.MONTHLY&&(r=mr):e===I.PERPETUAL&&(r=hr),r};function Er(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:s}=t;if(s!==Io)return e;let a={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:Ro}};return a.offerType==="TRIAL"&&a.priceDetails.price===0&&(a.priceDetails.price=a.priceDetails.priceWithoutDiscount),a}var{freeze:Ee}=Object,ne=Ee({...fe}),ie=Ee({...X}),q=Ee({...H}),Vn=Ee({...I}),Ve=Ee({...Ie}),jn=Ee({...Gn}),Wn=Ee({...O});var br={};li(br,{CLASS_NAME_FAILED:()=>ct,CLASS_NAME_PENDING:()=>lt,CLASS_NAME_RESOLVED:()=>ut,ERROR_MESSAGE_BAD_REQUEST:()=>gr,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>yr,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>xr,EVENT_TYPE_ERROR:()=>Do,EVENT_TYPE_FAILED:()=>ft,EVENT_TYPE_PENDING:()=>pt,EVENT_TYPE_READY:()=>ge,EVENT_TYPE_RESOLVED:()=>mt,LOG_NAMESPACE:()=>_r,PARAM_AOS_API_KEY:()=>Mo,PARAM_ENV:()=>vr,PARAM_LANDSCAPE:()=>Tr,PARAM_WCS_API_KEY:()=>ko,STATE_FAILED:()=>z,STATE_PENDING:()=>Z,STATE_RESOLVED:()=>Q,TAG_NAME_SERVICE:()=>ae});var ct="placeholder-failed",lt="placeholder-pending",ut="placeholder-resolved",gr="Bad WCS request",xr="Commerce offer not found",yr="Literals URL not provided",Do="wcms:commerce:error",ft="wcms:placeholder:failed",pt="wcms:placeholder:pending",ge="wcms:commerce:ready",mt="wcms:placeholder:resolved",_r="wcms/commerce",vr="commerce.env",Tr="commerce.landscape",Mo="commerce.aosKey",ko="commerce.wcsKey",z="failed",Z="pending",Q="resolved",ae="wcms-commerce";var Sr={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:30,tags:"consumer=milo/commerce"},Hn=new Set,Go=e=>e instanceof Error||typeof e.originatingRequest=="string";function Xn(e){if(e==null)return;let t=typeof e;if(t==="function"){let{name:r}=e;return r?`${t} ${r}`:t}if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(s=>s).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Sr.serializableTypes.includes(r))return r}return e}function Fo(e,t){if(!Sr.ignoredProperties.includes(e))return Xn(t)}var Ar={append(e){let{delimiter:t,sampleRate:r,tags:n,clientId:i}=Sr,{message:o,params:s}=e,a=[],c=o,u=[];s.forEach(f=>{f!=null&&(Go(f)?a:u).push(f)}),a.length&&(c+=" ",c+=a.map(Xn).join(" "));let{pathname:l,search:p}=window.location;c+=`${t}page=`,c+=l+p,u.length&&(c+=`${t}facts=`,c+=JSON.stringify(u,Fo)),Hn.has(c)||(Hn.add(c),window.lana?.log(c,{sampleRate:r,tags:n,clientId:i}))}};var T=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:ne.V3,checkoutWorkflowStep:ie.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,env:q.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsEnv:Ve.PRODUCTION,landscape:V.PUBLISHED,wcsBufferLimit:1});function Bn(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(ae);i!==r&&(r=i,i&&e(i))}return document.addEventListener(ge,n,{once:t}),ce(n),()=>document.removeEventListener(ge,n)}function je(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[s,a]=e;i=[s.language===o?s:a]}return r&&(i=i.map(Er)),i}var ce=e=>window.setTimeout(e);function we(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Pe).filter(Se);return r.length||(r=[t]),r}function ht(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(jt)}function k(){return window.customElements.get(ae)?.instance}var Vo="en_US",m={ar:"AR_es",be_en:"BE_en",be_fr:"BE_fr",be_nl:"BE_nl",br:"BR_pt",ca:"CA_en",ch_de:"CH_de",ch_fr:"CH_fr",ch_it:"CH_it",cl:"CL_es",co:"CO_es",la:"DO_es",mx:"MX_es",pe:"PE_es",africa:"ZA_en",dk:"DK_da",de:"DE_de",ee:"EE_et",eg_ar:"EG_ar",eg_en:"EG_en",es:"ES_es",fr:"FR_fr",gr_el:"GR_el",gr_en:"GR_en",ie:"IE_en",il_he:"IL_iw",it:"IT_it",lv:"LV_lv",lt:"LT_lt",lu_de:"LU_de",lu_en:"LU_en",lu_fr:"LU_fr",my_en:"MY_en",my_ms:"MY_ms",hu:"HU_hu",mt:"MT_en",mena_en:"DZ_en",mena_ar:"DZ_ar",nl:"NL_nl",no:"NO_nb",pl:"PL_pl",pt:"PT_pt",ro:"RO_ro",si:"SI_sl",sk:"SK_sk",fi:"FI_fi",se:"SE_sv",tr:"TR_tr",uk:"GB_en",at:"AT_de",cz:"CZ_cs",bg:"BG_bg",ru:"RU_ru",ua:"UA_uk",au:"AU_en",in_en:"IN_en",in_hi:"IN_hi",id_en:"ID_en",id_id:"ID_in",nz:"NZ_en",sa_ar:"SA_ar",sa_en:"SA_en",sg:"SG_en",cn:"CN_zh-Hans",tw:"TW_zh-Hant",hk_zh:"HK_zh-hant",jp:"JP_ja",kr:"KR_ko",za:"ZA_en",ng:"NG_en",cr:"CR_es",ec:"EC_es",pr:"US_es",gt:"GT_es",cis_en:"AZ_en",cis_ru:"AZ_ru",sea:"SG_en",th_en:"TH_en",th_th:"TH_th"},oe=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function jo({locale:e={}}={}){if(!e.prefix)return{country:T.country,language:T.language,locale:Vo};let t=e.prefix.replace("/","")??"",[r=T.country,n=T.language]=(m[t]??t).split("_",2);return r=r.toUpperCase(),n=n.toLowerCase(),{country:r,language:n,locale:`${n}_${r}`}}function Yn(e={}){let{commerce:t={},locale:r=void 0}=e,i=(e.env?.name===oe.PROD?oe.PROD:re(w(vr,t,{metadata:!1}),oe,oe.PROD))===oe.STAGE?q.STAGE:q.PRODUCTION,o=w("checkoutClientId",t)??T.checkoutClientId,s=re(w("checkoutWorkflow",t),ne,T.checkoutWorkflow),a=ie.CHECKOUT;s===ne.V3&&(a=re(w("checkoutWorkflowStep",t),ie,T.checkoutWorkflowStep));let c=b(w("displayOldPrice",t),T.displayOldPrice),u=b(w("displayPerUnit",t),T.displayPerUnit),l=b(w("displayRecurrence",t),T.displayRecurrence),p=b(w("displayTax",t),T.displayTax),f=b(w("entitlement",t),T.entitlement),h=b(w("modal",t),T.modal),d=b(w("forceTaxExclusive",t),T.forceTaxExclusive),x=w("promotionCode",t)??T.promotionCode,y=we(w("quantity",t)),N=w("wcsApiKey",t)??T.wcsApiKey,S=e.env?.name===oe.PROD?V.PUBLISHED:re(w(Tr,t),V,T.landscape),_=Pe(w("wcsBufferDelay",t),T.wcsBufferDelay),L=Pe(w("wcsBufferLimit",t),T.wcsBufferLimit);return{...jo({locale:r}),displayOldPrice:c,checkoutClientId:o,checkoutWorkflow:s,checkoutWorkflowStep:a,displayPerUnit:u,displayRecurrence:l,displayTax:p,entitlement:f,extraOptions:T.extraOptions,modal:h,env:i,forceTaxExclusive:d,priceLiteralsURL:t.priceLiteralsURL,priceLiteralsPromise:t.priceLiteralsPromise,promotionCode:x,quantity:y,wcsApiKey:N,wcsBufferDelay:_,wcsBufferLimit:L,wcsEnv:i===q.STAGE?Ve.STAGE:Ve.PRODUCTION,landscape:S}}var qn="debug",Wo="error",Ho="info",Xo="warn",Bo=Date.now(),Pr=new Set,wr=new Set,$n=new Map,We=Object.freeze({DEBUG:qn,ERROR:Wo,INFO:Ho,WARN:Xo}),zn={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},Zn={filter:({level:e})=>e!==qn},Yo={filter:()=>!1};function $o(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){if(n.length===1){let[o]=n;se(o)&&(n=o(),Array.isArray(n)||(n=[n]))}return n},source:i,timestamp:Date.now()-Bo}}function qo(e){[...wr].every(t=>t(e))&&Pr.forEach(t=>t(e))}function Qn(e){let t=($n.get(e)??0)+1;$n.set(e,t);let r=`${e} #${t}`,n=o=>(s,...a)=>qo($o(o,s,e,a,r)),i=Object.seal({id:r,namespace:e,module(o){return Qn(`${i.namespace}/${o}`)},debug:n(We.DEBUG),error:n(We.ERROR),info:n(We.INFO),warn:n(We.WARN)});return i}function dt(...e){e.forEach(t=>{let{append:r,filter:n}=t;se(n)?wr.add(n):se(r)&&Pr.add(r)})}function zo(e={}){let{name:t}=e,r=b(w("commerce.debug",{search:!0,storage:!0}),t===oe.LOCAL);return dt(r?zn:Zn),t===oe.PROD&&dt(Ar),D}function Zo(){Pr.clear(),wr.clear()}var D={...Qn(_r),Level:We,Plugins:{consoleAppender:zn,debugFilter:Zn,quietFilter:Yo,lanaAppender:Ar},init:zo,reset:Zo,use:dt};var Qo={CLASS_NAME_FAILED:ct,CLASS_NAME_PENDING:lt,CLASS_NAME_RESOLVED:ut,EVENT_TYPE_FAILED:ft,EVENT_TYPE_PENDING:pt,EVENT_TYPE_RESOLVED:mt,STATE_FAILED:z,STATE_PENDING:Z,STATE_RESOLVED:Q},Jo={[z]:ct,[Z]:lt,[Q]:ut},Ko={[z]:ft,[Z]:pt,[Q]:mt},xt=new WeakMap;function G(e){if(!xt.has(e)){let t=D.module(e.constructor.is);xt.set(e,{changes:new Map,connected:!1,dispose:be,error:void 0,log:t,options:void 0,promises:[],state:Z,timer:null,value:void 0,version:0})}return xt.get(e)}function Et(e){let t=G(e),{error:r,promises:n,state:i}=t;(i===Q||i===z)&&(t.promises=[],i===Q?n.forEach(({resolve:o})=>o(e)):i===z&&n.forEach(({reject:o})=>o(r))),e.dispatchEvent(new CustomEvent(Ko[i],{bubbles:!0}))}function gt(e){let t=xt.get(e);[z,Z,Q].forEach(r=>{e.classList.toggle(Jo[r],r===t.state)})}var es={get error(){return G(this).error},get log(){return G(this).log},get options(){return G(this).options},get state(){return G(this).state},get value(){return G(this).value},attributeChangedCallback(e,t,r){G(this).changes.set(e,r),this.requestUpdate()},connectedCallback(){G(this).dispose=Bn(()=>this.requestUpdate(!0))},disconnectedCallback(){let e=G(this);e.connected&&(e.connected=!1,e.log.debug("Disconnected:",{element:this})),e.dispose(),e.dispose=be},onceSettled(){let{error:e,promises:t,state:r}=G(this);return Q===r?Promise.resolve(this):z===r?Promise.reject(e):new Promise((n,i)=>{t.push({resolve:n,reject:i})})},toggleResolved(e,t,r){let n=G(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.state=Q,n.value=t,gt(this),this.log.debug("Resolved:",{element:this,value:t}),ce(()=>Et(this)),!0)},toggleFailed(e,t,r){let n=G(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.error=t,n.state=z,gt(this),n.log.error("Failed:",{element:this,error:t}),ce(()=>Et(this)),!0)},togglePending(e){let t=G(this);return t.version++,e&&(t.options=e),t.state=Z,gt(this),ce(()=>Et(this)),t.version},requestUpdate(e=!1){if(!this.isConnected||!k())return;let t=G(this);if(t.timer)return;let{error:r,options:n,state:i,value:o,version:s}=t;t.state=Z,t.timer=ce(async()=>{t.timer=null;let a=null;if(t.changes.size&&(a=Object.fromEntries(t.changes.entries()),t.changes.clear()),t.connected?t.log.debug("Updated:",{element:this,changes:a}):(t.connected=!0,t.log.debug("Connected:",{element:this,changes:a})),a||e)try{await this.render?.()===!1&&t.state===Z&&t.version===s&&(t.state=i,t.error=r,t.value=o,gt(this),Et(this))}catch(c){this.toggleFailed(t.version,c,n)}})}};function Jn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function yt(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,Jn(t)),i}function _t(e){let{tag:t,is:r,prototype:n}=e,i=window.customElements.get(r);return i||(Object.defineProperties(n,Object.getOwnPropertyDescriptors(es)),i=Object.defineProperties(e,Object.getOwnPropertyDescriptors(Qo)),window.customElements.define(r,i,{extends:t})),i}function vt(e,t=document.body){return Array.from(t?.querySelectorAll(`${e.tag}[is="${e.is}"]`)??[])}function Tt(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Jn(t)),e):null}var ts="download",rs="upgrade",xe,Oe=class Oe extends HTMLAnchorElement{constructor(){super();Mr(this,xe);this.addEventListener("click",this.clickHandler)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}static createCheckoutLink(r={},n=""){let i=k();if(!i)return null;let{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:u,modal:l,perpetual:p,promotionCode:f,quantity:h,wcsOsi:d,extraOptions:x}=i.collectCheckoutOptions(r),y=yt(Oe,{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:u,modal:l,perpetual:p,promotionCode:f,quantity:h,wcsOsi:d,extraOptions:x});return n&&(y.innerHTML=`${n}`),y}static getCheckoutLinks(r){return vt(Oe,r)}get isCheckoutLink(){return!0}get placeholder(){return this}clickHandler(r){var n;(n=Pt(this,xe))==null||n.call(this,r)}async render(r={}){if(!this.isConnected)return!1;let n=k();if(!n)return!1;this.dataset.imsCountry||n.imsCountryPromise.then(l=>{l&&(this.dataset.imsCountry=l)},be);let i=n.collectCheckoutOptions(r,this.placeholder);if(!i.wcsOsi.length)return!1;let o;try{o=JSON.parse(i.extraOptions??"{}")}catch(l){this.placeholder.log.error("cannot parse exta checkout options",l)}let s=this.placeholder.togglePending(i);this.href="";let a=n.resolveOfferSelectors(i),c=await Promise.all(a);c=c.map(l=>je(l,i));let u=await n.buildCheckoutAction(c.flat(),{...o,...i});return this.renderOffers(c.flat(),i,{},u,s)}renderOffers(r,n,i={},o=void 0,s=void 0){if(!this.isConnected)return!1;let a=k();if(!a)return!1;if(n={...JSON.parse(this.placeholder.dataset.extraOptions??"null"),...n,...i},s??(s=this.placeholder.togglePending(n)),Pt(this,xe)&&wt(this,xe,void 0),o){this.classList.remove(ts,rs),this.placeholder.toggleResolved(s,r,n);let{url:u,text:l,className:p,handler:f}=o;return u&&(this.href=u),l&&(this.firstElementChild.innerHTML=l),p&&this.classList.add(...p.split(" ")),f&&(this.setAttribute("href","#"),wt(this,xe,f.bind(this))),!0}else if(r.length){if(this.placeholder.toggleResolved(s,r,n)){let u=a.buildCheckoutURL(r,n);return this.setAttribute("href",u),!0}}else{let u=new Error(`Not provided: ${n?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(s,u,n))return this.setAttribute("href","#"),!0}return!1}updateOptions(r={}){let n=k();if(!n)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:u,perpetual:l,promotionCode:p,quantity:f,wcsOsi:h}=n.collectCheckoutOptions(r);return Tt(this,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:u,perpetual:l,promotionCode:p,quantity:f,wcsOsi:h}),!0}};xe=new WeakMap,te(Oe,"is","checkout-link"),te(Oe,"tag","a");var Or=Oe,Lr=_t(Or);var Kn=[m.uk,m.au,m.fr,m.at,m.be_en,m.be_fr,m.be_nl,m.bg,m.ch_de,m.ch_fr,m.ch_it,m.cz,m.de,m.dk,m.ee,m.eg_ar,m.eg_en,m.es,m.fi,m.fr,m.gr_el,m.gr_en,m.hu,m.ie,m.it,m.lu_de,m.lu_en,m.lu_fr,m.nl,m.no,m.pl,m.pt,m.ro,m.se,m.si,m.sk,m.tr,m.ua,m.id_en,m.id_id,m.in_en,m.in_hi,m.jp,m.my_en,m.my_ms,m.nz,m.th_en,m.th_th],ns={INDIVIDUAL_COM:[m.za,m.lt,m.lv,m.ng,m.sa_ar,m.sa_en,m.za,m.sg,m.kr],TEAM_COM:[m.za,m.lt,m.lv,m.ng,m.za,m.co,m.kr],INDIVIDUAL_EDU:[m.lt,m.lv,m.sa_en,m.sea],TEAM_EDU:[m.sea,m.kr]},Le=class Le extends HTMLSpanElement{static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-perpetual","data-promotion-code","data-tax-exclusive","data-template","data-wcs-osi"]}static createInlinePrice(t){let r=k();if(!r)return null;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f}=r.collectPriceOptions(t);return yt(Le,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f})}static getInlinePrices(t){return vt(Le,t)}get isInlinePrice(){return!0}get placeholder(){return this}resolveDisplayTaxForGeoAndSegment(t,r,n,i){let o=`${t}_${r}`;if(Kn.includes(t)||Kn.includes(o))return!0;let s=ns[`${n}_${i}`];return s?!!(s.includes(t)||s.includes(o)):!1}async resolveDisplayTax(t,r){let[n]=await t.resolveOfferSelectors(r),i=je(await n,r);if(i?.length){let{country:o,language:s}=r,a=i[0],[c=""]=a.marketSegments;return this.resolveDisplayTaxForGeoAndSegment(o,s,a.customerSegment,c)}}async render(t={}){if(!this.isConnected)return!1;let r=k();if(!r)return!1;let n=r.collectPriceOptions(t,this.placeholder);if(!n.wcsOsi.length)return!1;this.placeholder.dataset.displayTax||(n.displayTax=await this.resolveDisplayTax(r,n)||!1);let i=this.placeholder.togglePending(n);this.innerHTML="";let[o]=r.resolveOfferSelectors(n);return this.renderOffers(je(await o,n),n,i)}renderOffers(t,r={},n=void 0){if(!this.isConnected)return;let i=k();if(!i)return!1;let o=i.collectPriceOptions({...this.dataset,...r});if(n??(n=this.placeholder.togglePending(o)),t.length){if(this.placeholder.toggleResolved(n,t,o))return this.innerHTML=i.buildPriceHTML(t,o),!0}else{let s=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(n,s,o))return this.innerHTML="",!0}return!1}updateOptions(t){let r=k();if(!r)return!1;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f}=r.collectPriceOptions(t);return Tt(this,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f}),!0}};te(Le,"is","inline-price"),te(Le,"tag","span");var Nr=Le,Cr=_t(Nr);function ei({providers:e,settings:t},r){let n=D.module("checkout");function i(u,l){let{checkoutClientId:p,checkoutWorkflow:f,checkoutWorkflowStep:h,country:d,language:x,promotionCode:y,quantity:N}=t,{checkoutMarketSegment:S,checkoutWorkflow:_=f,checkoutWorkflowStep:L=h,imsCountry:A,country:U=A??d,language:F=x,quantity:C=N,entitlement:W,upgrade:J,modal:B,perpetual:le,promotionCode:ue=y,wcsOsi:K,extraOptions:Y,...ye}=Object.assign({},l?.dataset??{},u??{}),He=re(_,ne,T.checkoutWorkflow),Xe=ie.CHECKOUT;He===ne.V3&&(Xe=re(L,ie,T.checkoutWorkflowStep));let Ne=Ae({...ye,extraOptions:Y,checkoutClientId:p,checkoutMarketSegment:S,country:U,quantity:we(C,T.quantity),checkoutWorkflow:He,checkoutWorkflowStep:Xe,language:F,entitlement:b(W),upgrade:b(J),modal:b(B),perpetual:b(le),promotionCode:Re(ue).effectivePromoCode,wcsOsi:ht(K)});if(l)for(let bt of e.checkout)bt(l,Ne);return Ne}async function o(u,l){let p=k(),f=await r.getCheckoutAction?.(u,l,p.imsSignedInPromise);return f||null}function s(u,l){if(!Array.isArray(u)||!u.length||!l)return"";let{env:p,landscape:f}=t,{checkoutClientId:h,checkoutMarketSegment:d,checkoutWorkflow:x,checkoutWorkflowStep:y,country:N,promotionCode:S,quantity:_,...L}=i(l),A=window.frameElement?"if":"fp",U={checkoutPromoCode:S,clientId:h,context:A,country:N,env:p,items:[],marketSegment:d,workflowStep:y,landscape:f,...L};if(u.length===1){let[{offerId:F,offerType:C,productArrangementCode:W}]=u,{marketSegments:[J]}=u[0];Object.assign(U,{marketSegment:J,offerType:C,productArrangementCode:W}),U.items.push(_[0]===1?{id:F}:{id:F,quantity:_[0]})}else U.items.push(...u.map(({offerId:F},C)=>({id:F,quantity:_[C]??T.quantity})));return Rt(x,U)}let{createCheckoutLink:a,getCheckoutLinks:c}=Lr;return{CheckoutLink:Lr,CheckoutWorkflow:ne,CheckoutWorkflowStep:ie,buildCheckoutAction:o,buildCheckoutURL:s,collectCheckoutOptions:i,createCheckoutLink:a,getCheckoutLinks:c}}function is({interval:e=200,maxAttempts:t=25}={}){let r=D.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function os(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function ss(e){let t=D.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function ti({}){let e=is(),t=os(e),r=ss(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}function as(e){if(!e.priceLiteralsURL)throw new Error(yr);return new Promise(t=>{window.fetch(e.priceLiteralsURL).then(r=>{r.json().then(({data:n})=>{t(n)})})})}async function ri(e){let r=await(e.priceLiteralsPromise||as(e));if(Array.isArray(r)){let n=o=>r.find(s=>ze(s.lang,o)),i=n(e.language)??n(T.language);if(i)return Object.freeze(i)}return{}}function ni({literals:e,providers:t,settings:r}){function n(a,c){let{country:u,displayOldPrice:l,displayPerUnit:p,displayRecurrence:f,displayTax:h,forceTaxExclusive:d,language:x,promotionCode:y,quantity:N}=r,{displayOldPrice:S=l,displayPerUnit:_=p,displayRecurrence:L=f,displayTax:A=h,forceTaxExclusive:U=d,country:F=u,language:C=x,perpetual:W,promotionCode:J=y,quantity:B=N,template:le,wcsOsi:ue,...K}=Object.assign({},c?.dataset??{},a??{}),Y=Ae({...K,country:F,displayOldPrice:b(S),displayPerUnit:b(_),displayRecurrence:b(L),displayTax:b(A),forceTaxExclusive:b(U),language:C,perpetual:b(W),promotionCode:Re(J).effectivePromoCode,quantity:we(B,T.quantity),template:le,wcsOsi:ht(ue)});if(c)for(let ye of t.price)ye(c,Y);return Y}function i(a,c){if(!Array.isArray(a)||!a.length||!c)return"";let{template:u}=c,l;switch(u){case"discount":l=ur;break;case"strikethrough":l=cr;break;case"optical":l=ar;break;case"annual":l=lr;break;default:l=c.promotionCode?sr:or}let p=n(c);p.literals=Object.assign({},e.price,Ae(c.literals??{}));let[f]=a;return f={...f,...f.priceDetails},l(p,f)}let{createInlinePrice:o,getInlinePrices:s}=Cr;return{InlinePrice:Cr,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o,getInlinePrices:s}}var cs={[q.PRODUCTION]:"https://wcs.adobe.com",[q.STAGE]:"https://wcs.stage.adobe.com"};function ii({settings:e}){let t=D.module("wcs"),{env:r,wcsApiKey:n}=e,i={apiKey:n,baseUrl:cs[r],fetch:window.fetch.bind(window)},o=qe(i),s=new Map,a=new Map,c;async function u(f,h,d=!0){let x=xr;try{t.debug("Fetching:",f),f.offerSelectorIds=f.offerSelectorIds.sort();let{data:y}=await o(f,{apiKey:n,environment:e.wcsEnv,landscape:r===q.STAGE?"ALL":e.landscape},({resolvedOffers:S})=>({offers:S.map(dr)}));t.debug("Fetched:",f,y);let{offers:N}=y??{};h.forEach(({resolve:S},_)=>{let L=N.filter(({offerSelectorIds:A})=>A.includes(_)).flat();L.length&&(h.delete(_),S(L))})}catch(y){y.status===404&&f.offerSelectorIds.length>1?(t.debug("Multi-osi 404, fallback to fetch-by-one strategy"),await Promise.allSettled(f.offerSelectorIds.map(N=>u({...f,offerSelectorIds:[N]},h,!1)))):(t.error("Failed:",f,y),x=gr)}d&&h.size&&(t.debug("Missing:",{offerSelectorIds:[...h.keys()]}),h.forEach(y=>{y.reject(new Error(x))}))}function l(){clearTimeout(c);let f=[...a.values()];a.clear(),f.forEach(({options:h,promises:d})=>u(h,d))}function p({country:f,language:h,perpetual:d=!1,promotionCode:x="",wcsOsi:y=[]}){let N=`${h}_${f}`;f!=="GB"&&(h=d?"EN":"MULT");let S=[f,h,x].filter(_=>_).join("-").toLowerCase();return y.map(_=>{let L=`${_}-${S}`;if(!s.has(L)){let A=new Promise((U,F)=>{let C=a.get(S);if(!C){let W={country:f,locale:N,offerSelectorIds:[]};f!=="GB"&&(W.language=h),C={options:W,promises:new Map},a.set(S,C)}x&&(C.options.promotionCode=x),C.options.offerSelectorIds.push(_),C.promises.set(_,{resolve:U,reject:F}),C.options.offerSelectorIds.length>=e.wcsBufferLimit?l():(t.debug("Queued:",C.options),c||(c=setTimeout(l,e.wcsBufferDelay)))});s.set(L,A)}return s.get(L)})}return{WcsCommitment:Vn,WcsPlanType:jn,WcsTerm:Wn,resolveOfferSelectors:p}}var M=class extends HTMLElement{get isWcmsCommerce(){return!0}};te(M,"instance"),te(M,"promise",null);window.customElements.define(ae,M);async function ls(e,t){let r=D.init(e.env).module("service");r.debug("Activating:",e);let n={price:{}},i=Object.freeze(Yn(e));try{n.price=await ri(i)}catch(c){r.warn("Price literals were not fetched:",c)}let o={checkout:new Set,price:new Set},s=document.createElement(ae),a={literals:n,providers:o,settings:i};return M.instance=Object.defineProperties(s,Object.getOwnPropertyDescriptors({...ei(a,t),...ti(a),...ni(a),...ii(a),...br,Log:D,get defaults(){return T},get literals(){return n},get log(){return D},get providers(){return{checkout(c){return o.checkout.add(c),()=>o.checkout.delete(c)},price(c){return o.price.add(c),()=>o.price.delete(c)}}},get settings(){return i}})),r.debug("Activated:",{literals:n,settings:i,element:s}),document.head.append(s),ce(()=>{let c=new CustomEvent(ge,{bubbles:!0,cancelable:!1,detail:M.instance});M.instance.dispatchEvent(c)}),M.instance}function oi(){document.head.querySelector(ae)?.remove(),M.promise=null,D.reset()}function Ir(e,t){if(se(e)){let r=se(t)?t():{};return r.force&&oi(),M.promise??(M.promise=ls(e(),r))}return M.promise?M.promise:new Promise(r=>{let n=i=>{r(i.detail)};document.head.addEventListener(ge,n,{once:!0})})}var us=document.querySelector('meta[name="mas-locale"]')?.getAttribute("content")??"US_en",Ll=document.querySelector('meta[name="mas-lang"]')?.getAttribute("content"),fs=()=>({env:{name:"stage"},commerce:{"commerce.env":"STAGE"},locale:{prefix:us}}),ps=document.querySelector('meta[name="mas-features"]')?.getAttribute("content")?.split(",")??[];Ir(fs);if(ps.includes("merch-card")){let{origin:e}=new URL(import.meta.url);import(`${e}/lib/merch-card-all.js`)} +`,me.MISSING_INTL_API,s);var O=r.getPluralRules(t,{type:l.pluralType}).select(f-(l.offset||0));S=l.options[O]||l.options.other}if(!S)throw new tr(l.value,f,Object.keys(l.options),s);a.push.apply(a,Ge(S.value,t,r,n,i,f-(l.offset||0)));continue}}return so(a)}function co(e,t){return t?v(v(v({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=v(v({},e[n]),t[n]||{}),r},{})):e}function lo(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=co(e[n],t[n]),r},v({},e)):e}function rr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function uo(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Me(function(){for(var t,r=[],n=0;n0?e.substring(0,n):"";let i=An(e.split("").reverse().join("")),o=r-i,s=e.substring(o,o+1),a=o+(s==="."||s===","?1:0);t.suffix=i>0?e.substring(a,r):"",t.mask=e.substring(n,a),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(po);return t.decimal=c&&c[c.length-1]||".",t.separator=c&&c[1]&&c[0]||",",c=t.mask.split(t.decimal),t.integer=c[0],t.fraction=c[1],t}function ho(e,t,r){let n=!1,i={value:e};e<0&&(n=!0,i.value=-i.value),i.sign=n?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let o=t.fraction&&t.fraction.lastIndexOf("0"),[s="0",a=""]=i.value.split(".");return(!a||a&&a.length<=o)&&(a=o<0?"":(+("0."+a)).toFixed(o+1).replace("0.","")),i.integer=s,i.fraction=a,Eo(i,t),(i.result==="0"||i.result==="")&&(n=!1,i.sign=""),!n&&t.maskHasPositiveSign?i.sign="+":n&&t.maskHasPositiveSign?i.sign="-":n&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function Eo(e,t){e.result="";let r=t.integer.split(t.separator),n=r.join(""),i=n&&n.indexOf("0");if(i>-1)for(;e.integer.lengthMath.round(e*20)/20},nr=(e,t)=>({accept:e,round:t}),vo=[nr(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),nr(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.ceil(Math.floor(t*1e4/e)/100)/100),nr(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],ir={[I.YEAR]:{[L.MONTHLY]:Fe.MONTH,[L.ANNUAL]:Fe.YEAR},[I.MONTH]:{[L.MONTHLY]:Fe.MONTH}},To=(e,t)=>e.indexOf(`'${t}'`)===0,So=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),n=In(r);return!!n?t||(r=r.replace(/[,\.]0+/,n)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Ao(e)),r},bo=e=>{let t=Po(e),r=To(e,t),n=e.replace(/'.*?'/,""),i=Ln.test(n)||Nn.test(n);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},Cn=e=>e.replace(Ln,On).replace(Nn,On),Ao=e=>e.match(/#(.?)#/)?.[1]===wn?xo:wn,Po=e=>e.match(/'(.*?)'/)?.[1]??"",In=e=>e.match(/0(.?)0/)?.[1]??"";function at({formatString:e,price:t,usePrecision:r,isIndianPrice:n=!1},i,o=s=>s){let{currencySymbol:s,isCurrencyFirst:a,hasCurrencySpace:c}=bo(e),u=r?In(e):"",l=So(e,r),p=r?2:0,f=o(t,{currencySymbol:s}),d=n?f.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):Pn(l,f),h=r?d.lastIndexOf(u):d.length,E=d.substring(0,h),b=d.substring(h+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,d).replace(/SYMBOL/,s),currencySymbol:s,decimals:b,decimalsDelimiter:u,hasCurrencySpace:c,integer:E,isCurrencyFirst:a,recurrenceTerm:i}}var Rn=e=>{let{commitment:t,term:r,usePrecision:n}=e,i=yo[r]??1;return at(e,i>1?Fe.MONTH:ir[t]?.[r],(o,{currencySymbol:s})=>{let a={divisor:i,price:o,usePrecision:n},{round:c}=vo.find(({accept:l})=>l(a));if(!c)throw new Error(`Missing rounding rule for: ${JSON.stringify(a)}`);return(_o[s]??(l=>l))(c(a))})},Un=({commitment:e,term:t,...r})=>at(r,ir[e]?.[t]),Dn=e=>{let{commitment:t,term:r}=e;return t===I.YEAR&&r===L.MONTHLY?at(e,Fe.YEAR,n=>n*12):at(e,ir[t]?.[r])};var wo={recurrenceLabel:"{recurrenceTerm, select, MONTH {/mo} YEAR {/yr} other {}}",recurrenceAriaLabel:"{recurrenceTerm, select, MONTH {per month} YEAR {per year} other {}}",perUnitLabel:"{perUnit, select, LICENSE {per license} other {}}",perUnitAriaLabel:"{perUnit, select, LICENSE {per license} other {}}",freeLabel:"Free",freeAriaLabel:"Free",taxExclusiveLabel:"{taxTerm, select, GST {excl. GST} VAT {excl. VAT} TAX {excl. tax} IVA {excl. IVA} SST {excl. SST} KDV {excl. KDV} other {}}",taxInclusiveLabel:"{taxTerm, select, GST {incl. GST} VAT {incl. VAT} TAX {incl. tax} IVA {incl. IVA} SST {incl. SST} KDV {incl. KDV} other {}}",alternativePriceAriaLabel:"Alternatively at {alternativePrice}",strikethroughAriaLabel:"Regularly at {strikethroughPrice}"},Oo=Zr("ConsonantTemplates/price"),Lo=/<.+?>/g,W={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerAnnual:"price-annual",disabled:"disabled",currencySpace:"price-currency-space",currencySymbol:"price-currency-symbol",decimals:"price-decimals",decimalsDelimiter:"price-decimals-delimiter",integer:"price-integer",recurrence:"price-recurrence",taxInclusivity:"price-tax-inclusivity",unitType:"price-unit-type"},he={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel"},No="TAX_EXCLUSIVE",Co=e=>qr(e)?Object.entries(e).filter(([,t])=>Te(t)||Ze(t)||t===!0).reduce((t,[r,n])=>t+` ${r}${n===!0?"":'="'+Yr(n)+'"'}`,""):"",z=(e,t,r,n=!1)=>`${n?Cn(t):t??""}`;function Io(e,{accessibleLabel:t,currencySymbol:r,decimals:n,decimalsDelimiter:i,hasCurrencySpace:o,integer:s,isCurrencyFirst:a,recurrenceLabel:c,perUnitLabel:u,taxInclusivityLabel:l},p={}){let f=z(W.currencySymbol,r),d=z(W.currencySpace,o?" ":""),h="";return a&&(h+=f+d),h+=z(W.integer,s),h+=z(W.decimalsDelimiter,i),h+=z(W.decimals,n),a||(h+=d+f),h+=z(W.recurrence,c,null,!0),h+=z(W.unitType,u,null,!0),h+=z(W.taxInclusivity,l,!0),z(e,h,{...p,"aria-label":t})}var de=({displayOptical:e=!1,displayStrikethrough:t=!1,displayAnnual:r=!1}={})=>({country:n,displayFormatted:i=!0,displayRecurrence:o=!0,displayPerUnit:s=!1,displayTax:a=!1,language:c,literals:u={}}={},{commitment:l,formatString:p,price:f,priceWithoutDiscount:d,taxDisplay:h,taxTerm:E,term:b,usePrecision:N}={},A={})=>{Object.entries({country:n,formatString:p,language:c,price:f}).forEach(([ee,bt])=>{if(bt==null)throw new Error(`Argument "${ee}" is missing`)});let S={...wo,...u},O=`${c.toLowerCase()}-${n.toUpperCase()}`;function y(ee,bt){let At=S[ee];if(At==null)return"";try{return new bn(At.replace(Lo,""),O).format(bt)}catch{return Oo.error("Failed to format literal:",At),""}}let C=t&&d?d:f,D=e?Rn:Un;r&&(D=Dn);let{accessiblePrice:X,recurrenceTerm:B,...R}=D({commitment:l,formatString:p,term:b,price:e?f:C,usePrecision:N,isIndianPrice:n==="IN"}),V=X,se="";if(_(o)&&B){let ee=y(he.recurrenceAriaLabel,{recurrenceTerm:B});ee&&(V+=" "+ee),se=y(he.recurrenceLabel,{recurrenceTerm:B})}let ue="";if(_(s)){ue=y(he.perUnitLabel,{perUnit:"LICENSE"});let ee=y(he.perUnitAriaLabel,{perUnit:"LICENSE"});ee&&(V+=" "+ee)}let K="";_(a)&&E&&(K=y(h===No?he.taxExclusiveLabel:he.taxInclusiveLabel,{taxTerm:E}),K&&(V+=" "+K)),t&&(V=y(he.strikethroughAriaLabel,{strikethroughPrice:V}));let q=W.container;if(e&&(q+=" "+W.containerOptical),t&&(q+=" "+W.containerStrikethrough),r&&(q+=" "+W.containerAnnual),_(i))return Io(q,{...R,accessibleLabel:V,recurrenceLabel:se,perUnitLabel:ue,taxInclusivityLabel:K},A);let{currencySymbol:ye,decimals:He,decimalsDelimiter:Xe,hasCurrencySpace:Ne,integer:St,isCurrencyFirst:ci}=R,_e=[St,Xe,He];ci?(_e.unshift(Ne?"\xA0":""),_e.unshift(ye)):(_e.push(Ne?"\xA0":""),_e.push(ye)),_e.push(se,ue,K);let li=_e.join("");return z(q,li,A)},Mn=()=>(e,t,r)=>{let i=(e.displayOldPrice===void 0||_(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${de()(e,t,r)}${i?" "+de({displayStrikethrough:!0})(e,t,r):""}`};var or=de(),sr=Mn(),ar=de({displayOptical:!0}),cr=de({displayStrikethrough:!0}),lr=de({displayAnnual:!0});var Ro=(e,t)=>{if(!(!be(e)||!be(t)))return Math.floor((t-e)/t*100)},kn=()=>(e,t,r)=>{let{price:n,priceWithoutDiscount:i}=t,o=Ro(n,i);return o===void 0?'':`${o}%`};var ur=kn();var fr="ABM",pr="PUF",mr="M2M",hr="PERPETUAL",Gn="P3Y",Uo="TAX_INCLUSIVE_DETAILS",Do="TAX_EXCLUSIVE",Fn={ABM:fr,PUF:pr,M2M:mr,PERPETUAL:hr,P3Y:Gn},oc={[fr]:{commitment:I.YEAR,term:L.MONTHLY},[pr]:{commitment:I.YEAR,term:L.ANNUAL},[mr]:{commitment:I.MONTH,term:L.MONTHLY},[hr]:{commitment:I.PERPETUAL,term:void 0},[Gn]:{commitment:I.THREE_MONTHS,term:L.P3Y}},Vn="Value is not an offer",dr=e=>{if(typeof e!="object")return Vn;let{commitment:t,term:r}=e,n=Mo(t,r);return{...e,planType:n}};var Mo=(e,t)=>{if(e===void 0)return Vn;if(e===""&&t==="")return"";let r="";return e===I.YEAR?t===L.MONTHLY?r=fr:t===L.ANNUAL&&(r=pr):e===I.MONTH?t===L.MONTHLY&&(r=mr):e===I.PERPETUAL&&(r=hr),r};function Er(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:n,priceWithoutTax:i,priceWithoutDiscountAndTax:o,taxDisplay:s}=t;if(s!==Uo)return e;let a={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:o??n,taxDisplay:Do}};return a.offerType==="TRIAL"&&a.priceDetails.price===0&&(a.priceDetails.price=a.priceDetails.priceWithoutDiscount),a}var{freeze:Ee}=Object,ne=Ee({...fe}),ie=Ee({...$}),H=Ee({...Y}),jn=Ee({...I}),Ve=Ee({...Ie}),Wn=Ee({...Fn}),Hn=Ee({...L});var Sr={};fi(Sr,{CLASS_NAME_FAILED:()=>ct,CLASS_NAME_PENDING:()=>lt,CLASS_NAME_RESOLVED:()=>ut,ERROR_MESSAGE_BAD_REQUEST:()=>gr,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>yr,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>xr,EVENT_TYPE_ERROR:()=>ko,EVENT_TYPE_FAILED:()=>ft,EVENT_TYPE_PENDING:()=>pt,EVENT_TYPE_READY:()=>ge,EVENT_TYPE_RESOLVED:()=>mt,LOG_NAMESPACE:()=>_r,PARAM_AOS_API_KEY:()=>Go,PARAM_ENV:()=>vr,PARAM_LANDSCAPE:()=>Tr,PARAM_WCS_API_KEY:()=>Fo,STATE_FAILED:()=>Z,STATE_PENDING:()=>Q,STATE_RESOLVED:()=>J,TAG_NAME_SERVICE:()=>ce});var ct="placeholder-failed",lt="placeholder-pending",ut="placeholder-resolved",gr="Bad WCS request",xr="Commerce offer not found",yr="Literals URL not provided",ko="wcms:commerce:error",ft="wcms:placeholder:failed",pt="wcms:placeholder:pending",ge="wcms:commerce:ready",mt="wcms:placeholder:resolved",_r="wcms/commerce",vr="commerce.env",Tr="commerce.landscape",Go="commerce.aosKey",Fo="commerce.wcsKey",Z="failed",Q="pending",J="resolved",ce="wcms-commerce";var br={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals"],serializableTypes:["Array","Object"],sampleRate:30,tags:"consumer=milo/commerce"},Xn=new Set,Vo=e=>e instanceof Error||typeof e.originatingRequest=="string";function Bn(e){if(e==null)return;let t=typeof e;if(t==="function"){let{name:r}=e;return r?`${t} ${r}`:t}if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:n,originatingRequest:i,status:o}=e;return[n,o,i].filter(s=>s).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!br.serializableTypes.includes(r))return r}return e}function jo(e,t){if(!br.ignoredProperties.includes(e))return Bn(t)}var Ar={append(e){let{delimiter:t,sampleRate:r,tags:n,clientId:i}=br,{message:o,params:s}=e,a=[],c=o,u=[];s.forEach(f=>{f!=null&&(Vo(f)?a:u).push(f)}),a.length&&(c+=" ",c+=a.map(Bn).join(" "));let{pathname:l,search:p}=window.location;c+=`${t}page=`,c+=l+p,u.length&&(c+=`${t}facts=`,c+=JSON.stringify(u,jo)),Xn.has(c)||(Xn.add(c),window.lana?.log(c,{sampleRate:r,tags:n,clientId:i}))}};var T=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflow:ne.V3,checkoutWorkflowStep:ie.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,domainSwitch:!1,env:H.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsBufferDelay:1,wcsEnv:Ve.PRODUCTION,landscape:j.PUBLISHED,wcsBufferLimit:1});function Yn(e,{once:t=!1}={}){let r=null;function n(){let i=document.querySelector(ce);i!==r&&(r=i,i&&e(i))}return document.addEventListener(ge,n,{once:t}),le(n),()=>document.removeEventListener(ge,n)}function je(e,{country:t,forceTaxExclusive:r,perpetual:n}){let i;if(e.length<2)i=e;else{let o=t==="GB"||n?"EN":"MULT",[s,a]=e;i=[s.language===o?s:a]}return r&&(i=i.map(Er)),i}var le=e=>window.setTimeout(e);function we(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Pe).filter(be);return r.length||(r=[t]),r}function ht(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(jt)}function G(){return window.customElements.get(ce)?.instance}var Wo="en_US",m={ar:"AR_es",be_en:"BE_en",be_fr:"BE_fr",be_nl:"BE_nl",br:"BR_pt",ca:"CA_en",ch_de:"CH_de",ch_fr:"CH_fr",ch_it:"CH_it",cl:"CL_es",co:"CO_es",la:"DO_es",mx:"MX_es",pe:"PE_es",africa:"ZA_en",dk:"DK_da",de:"DE_de",ee:"EE_et",eg_ar:"EG_ar",eg_en:"EG_en",es:"ES_es",fr:"FR_fr",gr_el:"GR_el",gr_en:"GR_en",ie:"IE_en",il_he:"IL_iw",it:"IT_it",lv:"LV_lv",lt:"LT_lt",lu_de:"LU_de",lu_en:"LU_en",lu_fr:"LU_fr",my_en:"MY_en",my_ms:"MY_ms",hu:"HU_hu",mt:"MT_en",mena_en:"DZ_en",mena_ar:"DZ_ar",nl:"NL_nl",no:"NO_nb",pl:"PL_pl",pt:"PT_pt",ro:"RO_ro",si:"SI_sl",sk:"SK_sk",fi:"FI_fi",se:"SE_sv",tr:"TR_tr",uk:"GB_en",at:"AT_de",cz:"CZ_cs",bg:"BG_bg",ru:"RU_ru",ua:"UA_uk",au:"AU_en",in_en:"IN_en",in_hi:"IN_hi",id_en:"ID_en",id_id:"ID_in",nz:"NZ_en",sa_ar:"SA_ar",sa_en:"SA_en",sg:"SG_en",cn:"CN_zh-Hans",tw:"TW_zh-Hant",hk_zh:"HK_zh-hant",jp:"JP_ja",kr:"KR_ko",za:"ZA_en",ng:"NG_en",cr:"CR_es",ec:"EC_es",pr:"US_es",gt:"GT_es",cis_en:"AZ_en",cis_ru:"AZ_ru",sea:"SG_en",th_en:"TH_en",th_th:"TH_th"},oe=Object.freeze({LOCAL:"local",PROD:"prod",STAGE:"stage"});function Ho({locale:e={}}={}){if(!e.prefix)return{country:T.country,language:T.language,locale:Wo};let t=e.prefix.replace("/","")??"",[r=T.country,n=T.language]=(m[t]??t).split("_",2);return r=r.toUpperCase(),n=n.toLowerCase(),{country:r,language:n,locale:`${n}_${r}`}}function $n(e={}){let{commerce:t={},locale:r=void 0}=e,i=(e.env?.name===oe.PROD?oe.PROD:re(w(vr,t,{metadata:!1}),oe,oe.PROD))===oe.STAGE?H.STAGE:H.PRODUCTION,o=w("checkoutClientId",t)??T.checkoutClientId,s=re(w("checkoutWorkflow",t),ne,T.checkoutWorkflow),a=ie.CHECKOUT;s===ne.V3&&(a=re(w("checkoutWorkflowStep",t),ie,T.checkoutWorkflowStep));let c=_(w("displayOldPrice",t),T.displayOldPrice),u=_(w("displayPerUnit",t),T.displayPerUnit),l=_(w("displayRecurrence",t),T.displayRecurrence),p=_(w("displayTax",t),T.displayTax),f=_(w("entitlement",t),T.entitlement),d=_(w("modal",t),T.modal),h=_(w("forceTaxExclusive",t),T.forceTaxExclusive),E=w("promotionCode",t)??T.promotionCode,b=we(w("quantity",t)),N=w("wcsApiKey",t)??T.wcsApiKey,A=e.env?.name===oe.PROD?j.PUBLISHED:re(w(Tr,t),j,T.landscape),S=Pe(w("wcsBufferDelay",t),T.wcsBufferDelay),O=Pe(w("wcsBufferLimit",t),T.wcsBufferLimit),y=_(w("domain.switch",t),!1);return{...Ho({locale:r}),displayOldPrice:c,checkoutClientId:o,checkoutWorkflow:s,checkoutWorkflowStep:a,displayPerUnit:u,displayRecurrence:l,displayTax:p,entitlement:f,extraOptions:T.extraOptions,modal:d,env:i,forceTaxExclusive:h,priceLiteralsURL:t.priceLiteralsURL,priceLiteralsPromise:t.priceLiteralsPromise,promotionCode:E,quantity:b,wcsApiKey:N,wcsBufferDelay:S,wcsBufferLimit:O,wcsEnv:i===H.STAGE?Ve.STAGE:Ve.PRODUCTION,landscape:A,domainSwitch:y}}var zn="debug",Xo="error",Bo="info",Yo="warn",$o=Date.now(),Pr=new Set,wr=new Set,qn=new Map,We=Object.freeze({DEBUG:zn,ERROR:Xo,INFO:Bo,WARN:Yo}),Zn={append({level:e,message:t,params:r,timestamp:n,source:i}){console[e](`${n}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},Qn={filter:({level:e})=>e!==zn},qo={filter:()=>!1};function zo(e,t,r,n,i){return{level:e,message:t,namespace:r,get params(){if(n.length===1){let[o]=n;ae(o)&&(n=o(),Array.isArray(n)||(n=[n]))}return n},source:i,timestamp:Date.now()-$o}}function Zo(e){[...wr].every(t=>t(e))&&Pr.forEach(t=>t(e))}function Jn(e){let t=(qn.get(e)??0)+1;qn.set(e,t);let r=`${e} #${t}`,n=o=>(s,...a)=>Zo(zo(o,s,e,a,r)),i=Object.seal({id:r,namespace:e,module(o){return Jn(`${i.namespace}/${o}`)},debug:n(We.DEBUG),error:n(We.ERROR),info:n(We.INFO),warn:n(We.WARN)});return i}function dt(...e){e.forEach(t=>{let{append:r,filter:n}=t;ae(n)?wr.add(n):ae(r)&&Pr.add(r)})}function Qo(e={}){let{name:t}=e,r=_(w("commerce.debug",{search:!0,storage:!0}),t===oe.LOCAL);return dt(r?Zn:Qn),t===oe.PROD&&dt(Ar),M}function Jo(){Pr.clear(),wr.clear()}var M={...Jn(_r),Level:We,Plugins:{consoleAppender:Zn,debugFilter:Qn,quietFilter:qo,lanaAppender:Ar},init:Qo,reset:Jo,use:dt};var Ko={CLASS_NAME_FAILED:ct,CLASS_NAME_PENDING:lt,CLASS_NAME_RESOLVED:ut,EVENT_TYPE_FAILED:ft,EVENT_TYPE_PENDING:pt,EVENT_TYPE_RESOLVED:mt,STATE_FAILED:Z,STATE_PENDING:Q,STATE_RESOLVED:J},es={[Z]:ct,[Q]:lt,[J]:ut},ts={[Z]:ft,[Q]:pt,[J]:mt},xt=new WeakMap;function F(e){if(!xt.has(e)){let t=M.module(e.constructor.is);xt.set(e,{changes:new Map,connected:!1,dispose:Se,error:void 0,log:t,options:void 0,promises:[],state:Q,timer:null,value:void 0,version:0})}return xt.get(e)}function Et(e){let t=F(e),{error:r,promises:n,state:i}=t;(i===J||i===Z)&&(t.promises=[],i===J?n.forEach(({resolve:o})=>o(e)):i===Z&&n.forEach(({reject:o})=>o(r))),e.dispatchEvent(new CustomEvent(ts[i],{bubbles:!0}))}function gt(e){let t=xt.get(e);[Z,Q,J].forEach(r=>{e.classList.toggle(es[r],r===t.state)})}var rs={get error(){return F(this).error},get log(){return F(this).log},get options(){return F(this).options},get state(){return F(this).state},get value(){return F(this).value},attributeChangedCallback(e,t,r){F(this).changes.set(e,r),this.requestUpdate()},connectedCallback(){F(this).dispose=Yn(()=>this.requestUpdate(!0))},disconnectedCallback(){let e=F(this);e.connected&&(e.connected=!1,e.log.debug("Disconnected:",{element:this})),e.dispose(),e.dispose=Se},onceSettled(){let{error:e,promises:t,state:r}=F(this);return J===r?Promise.resolve(this):Z===r?Promise.reject(e):new Promise((n,i)=>{t.push({resolve:n,reject:i})})},toggleResolved(e,t,r){let n=F(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.state=J,n.value=t,gt(this),this.log.debug("Resolved:",{element:this,value:t}),le(()=>Et(this)),!0)},toggleFailed(e,t,r){let n=F(this);return e!==n.version?!1:(r!==void 0&&(n.options=r),n.error=t,n.state=Z,gt(this),n.log.error("Failed:",{element:this,error:t}),le(()=>Et(this)),!0)},togglePending(e){let t=F(this);return t.version++,e&&(t.options=e),t.state=Q,gt(this),le(()=>Et(this)),t.version},requestUpdate(e=!1){if(!this.isConnected||!G())return;let t=F(this);if(t.timer)return;let{error:r,options:n,state:i,value:o,version:s}=t;t.state=Q,t.timer=le(async()=>{t.timer=null;let a=null;if(t.changes.size&&(a=Object.fromEntries(t.changes.entries()),t.changes.clear()),t.connected?t.log.debug("Updated:",{element:this,changes:a}):(t.connected=!0,t.log.debug("Connected:",{element:this,changes:a})),a||e)try{await this.render?.()===!1&&t.state===Q&&t.version===s&&(t.state=i,t.error=r,t.value=o,gt(this),Et(this))}catch(c){this.toggleFailed(t.version,c,n)}})}};function Kn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function yt(e,t={}){let{tag:r,is:n}=e,i=document.createElement(r,{is:n});return i.setAttribute("is",n),Object.assign(i.dataset,Kn(t)),i}function _t(e){let{tag:t,is:r,prototype:n}=e,i=window.customElements.get(r);return i||(Object.defineProperties(n,Object.getOwnPropertyDescriptors(rs)),i=Object.defineProperties(e,Object.getOwnPropertyDescriptors(Ko)),window.customElements.define(r,i,{extends:t})),i}function vt(e,t=document.body){return Array.from(t?.querySelectorAll(`${e.tag}[is="${e.is}"]`)??[])}function Tt(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Kn(t)),e):null}var ns="download",is="upgrade",xe,Oe=class Oe extends HTMLAnchorElement{constructor(){super();kr(this,xe);this.addEventListener("click",this.clickHandler)}static get observedAttributes(){return["data-checkout-workflow","data-checkout-workflow-step","data-extra-options","data-ims-country","data-perpetual","data-promotion-code","data-quantity","data-template","data-wcs-osi","data-entitlement","data-upgrade","data-modal"]}static createCheckoutLink(r={},n=""){let i=G();if(!i)return null;let{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:u,modal:l,perpetual:p,promotionCode:f,quantity:d,wcsOsi:h,extraOptions:E}=i.collectCheckoutOptions(r),b=yt(Oe,{checkoutMarketSegment:o,checkoutWorkflow:s,checkoutWorkflowStep:a,entitlement:c,upgrade:u,modal:l,perpetual:p,promotionCode:f,quantity:d,wcsOsi:h,extraOptions:E});return n&&(b.innerHTML=`${n}`),b}static getCheckoutLinks(r){return vt(Oe,r)}get isCheckoutLink(){return!0}get placeholder(){return this}clickHandler(r){var n;(n=Pt(this,xe))==null||n.call(this,r)}async render(r={}){if(!this.isConnected)return!1;let n=G();if(!n)return!1;this.dataset.imsCountry||n.imsCountryPromise.then(l=>{l&&(this.dataset.imsCountry=l)},Se);let i=n.collectCheckoutOptions(r,this.placeholder);if(!i.wcsOsi.length)return!1;let o;try{o=JSON.parse(i.extraOptions??"{}")}catch(l){this.placeholder.log.error("cannot parse exta checkout options",l)}let s=this.placeholder.togglePending(i);this.href="";let a=n.resolveOfferSelectors(i),c=await Promise.all(a);c=c.map(l=>je(l,i));let u=await n.buildCheckoutAction(c.flat(),{...o,...i});return this.renderOffers(c.flat(),i,{},u,s)}renderOffers(r,n,i={},o=void 0,s=void 0){if(!this.isConnected)return!1;let a=G();if(!a)return!1;if(n={...JSON.parse(this.placeholder.dataset.extraOptions??"null"),...n,...i},s??(s=this.placeholder.togglePending(n)),Pt(this,xe)&&wt(this,xe,void 0),o){this.classList.remove(ns,is),this.placeholder.toggleResolved(s,r,n);let{url:u,text:l,className:p,handler:f}=o;return u&&(this.href=u),l&&(this.firstElementChild.innerHTML=l),p&&this.classList.add(...p.split(" ")),f&&(this.setAttribute("href","#"),wt(this,xe,f.bind(this))),!0}else if(r.length){if(this.placeholder.toggleResolved(s,r,n)){let u=a.buildCheckoutURL(r,n);return this.setAttribute("href",u),!0}}else{let u=new Error(`Not provided: ${n?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(s,u,n))return this.setAttribute("href","#"),!0}return!1}updateOptions(r={}){let n=G();if(!n)return!1;let{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:u,perpetual:l,promotionCode:p,quantity:f,wcsOsi:d}=n.collectCheckoutOptions(r);return Tt(this,{checkoutMarketSegment:i,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:a,upgrade:c,modal:u,perpetual:l,promotionCode:p,quantity:f,wcsOsi:d}),!0}};xe=new WeakMap,te(Oe,"is","checkout-link"),te(Oe,"tag","a");var Or=Oe,Lr=_t(Or);var ei=[m.uk,m.au,m.fr,m.at,m.be_en,m.be_fr,m.be_nl,m.bg,m.ch_de,m.ch_fr,m.ch_it,m.cz,m.de,m.dk,m.ee,m.eg_ar,m.eg_en,m.es,m.fi,m.fr,m.gr_el,m.gr_en,m.hu,m.ie,m.it,m.lu_de,m.lu_en,m.lu_fr,m.nl,m.no,m.pl,m.pt,m.ro,m.se,m.si,m.sk,m.tr,m.ua,m.id_en,m.id_id,m.in_en,m.in_hi,m.jp,m.my_en,m.my_ms,m.nz,m.th_en,m.th_th],os={INDIVIDUAL_COM:[m.za,m.lt,m.lv,m.ng,m.sa_ar,m.sa_en,m.za,m.sg,m.kr],TEAM_COM:[m.za,m.lt,m.lv,m.ng,m.za,m.co,m.kr],INDIVIDUAL_EDU:[m.lt,m.lv,m.sa_en,m.sea],TEAM_EDU:[m.sea,m.kr]},Le=class Le extends HTMLSpanElement{static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-perpetual","data-promotion-code","data-tax-exclusive","data-template","data-wcs-osi"]}static createInlinePrice(t){let r=G();if(!r)return null;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f}=r.collectPriceOptions(t);return yt(Le,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f})}static getInlinePrices(t){return vt(Le,t)}get isInlinePrice(){return!0}get placeholder(){return this}resolveDisplayTaxForGeoAndSegment(t,r,n,i){let o=`${t}_${r}`;if(ei.includes(t)||ei.includes(o))return!0;let s=os[`${n}_${i}`];return s?!!(s.includes(t)||s.includes(o)):!1}async resolveDisplayTax(t,r){let[n]=await t.resolveOfferSelectors(r),i=je(await n,r);if(i?.length){let{country:o,language:s}=r,a=i[0],[c=""]=a.marketSegments;return this.resolveDisplayTaxForGeoAndSegment(o,s,a.customerSegment,c)}}async render(t={}){if(!this.isConnected)return!1;let r=G();if(!r)return!1;let n=r.collectPriceOptions(t,this.placeholder);if(!n.wcsOsi.length)return!1;this.placeholder.dataset.displayTax||(n.displayTax=await this.resolveDisplayTax(r,n)||!1);let i=this.placeholder.togglePending(n);this.innerHTML="";let[o]=r.resolveOfferSelectors(n);return this.renderOffers(je(await o,n),n,i)}renderOffers(t,r={},n=void 0){if(!this.isConnected)return;let i=G();if(!i)return!1;let o=i.collectPriceOptions({...this.dataset,...r});if(n??(n=this.placeholder.togglePending(o)),t.length){if(this.placeholder.toggleResolved(n,t,o))return this.innerHTML=i.buildPriceHTML(t,o),!0}else{let s=new Error(`Not provided: ${o?.wcsOsi??"-"}`);if(this.placeholder.toggleFailed(n,s,o))return this.innerHTML="",!0}return!1}updateOptions(t){let r=G();if(!r)return!1;let{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f}=r.collectPriceOptions(t);return Tt(this,{displayOldPrice:n,displayPerUnit:i,displayRecurrence:o,displayTax:s,forceTaxExclusive:a,perpetual:c,promotionCode:u,quantity:l,template:p,wcsOsi:f}),!0}};te(Le,"is","inline-price"),te(Le,"tag","span");var Nr=Le,Cr=_t(Nr);function ti({providers:e,settings:t},r){let n=M.module("checkout");function i(u,l){let{checkoutClientId:p,checkoutWorkflow:f,checkoutWorkflowStep:d,country:h,language:E,promotionCode:b,quantity:N}=t,{checkoutMarketSegment:A,checkoutWorkflow:S=f,checkoutWorkflowStep:O=d,imsCountry:y,country:C=y??h,language:D=E,quantity:X=N,entitlement:B,upgrade:R,modal:V,perpetual:se,promotionCode:ue=b,wcsOsi:K,extraOptions:q,...ye}=Object.assign({},l?.dataset??{},u??{}),He=re(S,ne,T.checkoutWorkflow),Xe=ie.CHECKOUT;He===ne.V3&&(Xe=re(O,ie,T.checkoutWorkflowStep));let Ne=Ae({...ye,extraOptions:q,checkoutClientId:p,checkoutMarketSegment:A,country:C,quantity:we(X,T.quantity),checkoutWorkflow:He,checkoutWorkflowStep:Xe,language:D,entitlement:_(B),upgrade:_(R),modal:_(V),perpetual:_(se),promotionCode:Re(ue).effectivePromoCode,wcsOsi:ht(K)});if(l)for(let St of e.checkout)St(l,Ne);return Ne}async function o(u,l){let p=G(),f=await r.getCheckoutAction?.(u,l,p.imsSignedInPromise);return f||null}function s(u,l){if(!Array.isArray(u)||!u.length||!l)return"";let{env:p,landscape:f}=t,{checkoutClientId:d,checkoutMarketSegment:h,checkoutWorkflow:E,checkoutWorkflowStep:b,country:N,promotionCode:A,quantity:S,...O}=i(l),y=window.frameElement?"if":"fp",C={checkoutPromoCode:A,clientId:d,context:y,country:N,env:p,items:[],marketSegment:h,workflowStep:b,landscape:f,...O};if(u.length===1){let[{offerId:D,offerType:X,productArrangementCode:B}]=u,{marketSegments:[R]}=u[0];Object.assign(C,{marketSegment:R,offerType:X,productArrangementCode:B}),C.items.push(S[0]===1?{id:D}:{id:D,quantity:S[0]})}else C.items.push(...u.map(({offerId:D},X)=>({id:D,quantity:S[X]??T.quantity})));return Rt(E,C)}let{createCheckoutLink:a,getCheckoutLinks:c}=Lr;return{CheckoutLink:Lr,CheckoutWorkflow:ne,CheckoutWorkflowStep:ie,buildCheckoutAction:o,buildCheckoutURL:s,collectCheckoutOptions:i,createCheckoutLink:a,getCheckoutLinks:c}}function ss({interval:e=200,maxAttempts:t=25}={}){let r=M.module("ims");return new Promise(n=>{r.debug("Waing for IMS to be ready");let i=0;function o(){window.adobeIMS?.initialized?n():++i>t?(r.debug("Timeout"),n()):setTimeout(o,e)}o()})}function as(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function cs(e){let t=M.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:n})=>(t.debug("Got user country:",n),n),n=>{t.error("Unable to get user country:",n)}):null)}function ri({}){let e=ss(),t=as(e),r=cs(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}function ls(e){if(!e.priceLiteralsURL)throw new Error(yr);return new Promise(t=>{window.fetch(e.priceLiteralsURL).then(r=>{r.json().then(({data:n})=>{t(n)})})})}async function ni(e){let r=await(e.priceLiteralsPromise||ls(e));if(Array.isArray(r)){let n=o=>r.find(s=>ze(s.lang,o)),i=n(e.language)??n(T.language);if(i)return Object.freeze(i)}return{}}function ii({literals:e,providers:t,settings:r}){function n(a,c){let{country:u,displayOldPrice:l,displayPerUnit:p,displayRecurrence:f,displayTax:d,forceTaxExclusive:h,language:E,promotionCode:b,quantity:N}=r,{displayOldPrice:A=l,displayPerUnit:S=p,displayRecurrence:O=f,displayTax:y=d,forceTaxExclusive:C=h,country:D=u,language:X=E,perpetual:B,promotionCode:R=b,quantity:V=N,template:se,wcsOsi:ue,...K}=Object.assign({},c?.dataset??{},a??{}),q=Ae({...K,country:D,displayOldPrice:_(A),displayPerUnit:_(S),displayRecurrence:_(O),displayTax:_(y),forceTaxExclusive:_(C),language:X,perpetual:_(B),promotionCode:Re(R).effectivePromoCode,quantity:we(V,T.quantity),template:se,wcsOsi:ht(ue)});if(c)for(let ye of t.price)ye(c,q);return q}function i(a,c){if(!Array.isArray(a)||!a.length||!c)return"";let{template:u}=c,l;switch(u){case"discount":l=ur;break;case"strikethrough":l=cr;break;case"optical":l=ar;break;case"annual":l=lr;break;default:l=c.promotionCode?sr:or}let p=n(c);p.literals=Object.assign({},e.price,Ae(c.literals??{}));let[f]=a;return f={...f,...f.priceDetails},l(p,f)}let{createInlinePrice:o,getInlinePrices:s}=Cr;return{InlinePrice:Cr,buildPriceHTML:i,collectPriceOptions:n,createInlinePrice:o,getInlinePrices:s}}var Ir="_acom",oi={[H.PRODUCTION]:"https://wcs.adobe.com",[H.STAGE]:"https://wcs.stage.adobe.com",[H.PRODUCTION+Ir]:"https://www.adobe.com",[H.STAGE+Ir]:"https://www.stage.adobe.com"};function si({settings:e}){let t=M.module("wcs"),{env:r,domainSwitch:n,wcsApiKey:i}=e,o=n?oi[r+Ir]:oi[r],s={apiKey:i,baseUrl:o,fetch:window.fetch.bind(window)},a=qe(s),c=new Map,u=new Map,l;async function p(h,E,b=!0){let N=xr;try{t.debug("Fetching:",h),h.offerSelectorIds=h.offerSelectorIds.sort();let{data:A}=await a(h,{apiKey:i,environment:e.wcsEnv,landscape:r===H.STAGE?"ALL":e.landscape},({resolvedOffers:O})=>({offers:O.map(dr)}));t.debug("Fetched:",h,A);let{offers:S}=A??{};E.forEach(({resolve:O},y)=>{let C=S.filter(({offerSelectorIds:D})=>D.includes(y)).flat();C.length&&(E.delete(y),O(C))})}catch(A){A.status===404&&h.offerSelectorIds.length>1?(t.debug("Multi-osi 404, fallback to fetch-by-one strategy"),await Promise.allSettled(h.offerSelectorIds.map(S=>p({...h,offerSelectorIds:[S]},E,!1)))):(t.error("Failed:",h,A),N=gr)}b&&E.size&&(t.debug("Missing:",{offerSelectorIds:[...E.keys()]}),E.forEach(A=>{A.reject(new Error(N))}))}function f(){clearTimeout(l);let h=[...u.values()];u.clear(),h.forEach(({options:E,promises:b})=>p(E,b))}function d({country:h,language:E,perpetual:b=!1,promotionCode:N="",wcsOsi:A=[]}){let S=`${E}_${h}`;h!=="GB"&&(E=b?"EN":"MULT");let O=[h,E,N].filter(y=>y).join("-").toLowerCase();return A.map(y=>{let C=`${y}-${O}`;if(!c.has(C)){let D=new Promise((X,B)=>{let R=u.get(O);if(!R){let V={country:h,locale:S,offerSelectorIds:[]};h!=="GB"&&(V.language=E),R={options:V,promises:new Map},u.set(O,R)}N&&(R.options.promotionCode=N),R.options.offerSelectorIds.push(y),R.promises.set(y,{resolve:X,reject:B}),R.options.offerSelectorIds.length>=e.wcsBufferLimit?f():(t.debug("Queued:",R.options),l||(l=setTimeout(f,e.wcsBufferDelay)))});c.set(C,D)}return c.get(C)})}return{WcsCommitment:jn,WcsPlanType:Wn,WcsTerm:Hn,resolveOfferSelectors:d}}var k=class extends HTMLElement{get isWcmsCommerce(){return!0}};te(k,"instance"),te(k,"promise",null);window.customElements.define(ce,k);async function us(e,t){let r=M.init(e.env).module("service");r.debug("Activating:",e);let n={price:{}},i=Object.freeze($n(e));try{n.price=await ni(i)}catch(c){r.warn("Price literals were not fetched:",c)}let o={checkout:new Set,price:new Set},s=document.createElement(ce),a={literals:n,providers:o,settings:i};return k.instance=Object.defineProperties(s,Object.getOwnPropertyDescriptors({...ti(a,t),...ri(a),...ii(a),...si(a),...Sr,Log:M,get defaults(){return T},get literals(){return n},get log(){return M},get providers(){return{checkout(c){return o.checkout.add(c),()=>o.checkout.delete(c)},price(c){return o.price.add(c),()=>o.price.delete(c)}}},get settings(){return i}})),r.debug("Activated:",{literals:n,settings:i,element:s}),document.head.append(s),le(()=>{let c=new CustomEvent(ge,{bubbles:!0,cancelable:!1,detail:k.instance});k.instance.dispatchEvent(c)}),k.instance}function ai(){document.head.querySelector(ce)?.remove(),k.promise=null,M.reset()}function Rr(e,t){if(ae(e)){let r=ae(t)?t():{};return r.force&&ai(),k.promise??(k.promise=us(e(),r))}return k.promise?k.promise:new Promise(r=>{let n=i=>{r(i.detail)};document.head.addEventListener(ge,n,{once:!0})})}var fs=document.querySelector('meta[name="mas-locale"]')?.getAttribute("content")??"US_en",Nl=document.querySelector('meta[name="mas-lang"]')?.getAttribute("content"),ps=()=>({env:{name:"stage"},commerce:{"commerce.env":"STAGE"},locale:{prefix:fs}}),ms=document.querySelector('meta[name="mas-features"]')?.getAttribute("content")?.split(",")??[];Rr(ps);if(ms.includes("merch-card")){let{origin:e}=new URL(import.meta.url);import(`${e}/lib/merch-card-all.js`)} diff --git a/web-components/build.mjs b/web-components/build.mjs index b8d6be6d..36273daf 100644 --- a/web-components/build.mjs +++ b/web-components/build.mjs @@ -92,11 +92,41 @@ Promise.all([ plugins: [rewriteImports()], external: ['lit'], }), + build({ + entryPoints: ['./src/merch-twp-d2p.js'], + bundle: true, + banner, + outfile: './lib/merch-twp-d2p.js', + format: 'esm', + plugins: [rewriteImports()], + external: ['lit'], + }), + build({ + entryPoints: ['./src/merch-whats-included.js'], + bundle: true, + banner, + outfile: './lib/merch-whats-included.js', + format: 'esm', + plugins: [rewriteImports()], + external: ['lit'], + }), + build({ + entryPoints: ['./src/merch-mnemonic-list.js'], + bundle: true, + banner, + outfile: './lib/merch-mnemonic-list.js', + format: 'esm', + plugins: [rewriteImports()], + external: ['lit'], + }), + buildLitComponent('merch-icon'), buildLitComponent('merch-quantity-select'), buildLitComponent('merch-secure-transaction'), buildLitComponent('merch-stock'), buildLitComponent('merch-subscription-panel'), buildLitComponent('merch-twp-d2p'), + buildLitComponent('merch-whats-included'), + buildLitComponent('merch-mnemonic-list'), ]).catch(() => process.exit(1)); function rewriteImports(rew) { diff --git a/web-components/src/merch-mnemonic-list.js b/web-components/src/merch-mnemonic-list.js new file mode 100644 index 00000000..b2d66a4e --- /dev/null +++ b/web-components/src/merch-mnemonic-list.js @@ -0,0 +1,47 @@ +import { html, css, LitElement } from 'lit'; + +export class MerchMnemonicList extends LitElement { + static styles = css` + :host { + display: flex; + flex-direction: row; + gap: 10px; + margin-bottom: 10px; + align-items: flex-end; + } + + ::slotted([slot='icon']) { + display: flex; + justify-content: center; + align-items: center; + height: max-content; + } + + ::slotted([slot='description']) { + font-size: 14px; + line-height: 21px; + margin: 0; + } + + :host .hidden { + display: none; + } + `; + + static properties = { + description: { type: String, attribute: true }, + }; + + constructor() { + super(); + } + + render() { + return html` + + ${this.description} + `; + } +} + +customElements.define('merch-mnemonic-list', MerchMnemonicList); diff --git a/web-components/src/merch-twp-d2p.css.js b/web-components/src/merch-twp-d2p.css.js index 3fcc1ad3..6eb77ac9 100644 --- a/web-components/src/merch-twp-d2p.css.js +++ b/web-components/src/merch-twp-d2p.css.js @@ -34,10 +34,25 @@ export const styles = css` margin: 0; } + ::slotted([slot='merch-whats-included']) { + align-self: auto; + width: 100%; + position: absolute; + background: #fff; + height: 100%; + padding: 30px; + border-radius: 10px; + box-sizing: border-box; + } + ::slotted([slot$='-footer']) { flex-basis: 100%; } + ::slotted([slot='merch-whats-included'].hidden) { + display: none; + } + /* Mobile */ .mobile { diff --git a/web-components/src/merch-twp-d2p.js b/web-components/src/merch-twp-d2p.js index b0580702..d67f3839 100644 --- a/web-components/src/merch-twp-d2p.js +++ b/web-components/src/merch-twp-d2p.js @@ -49,6 +49,7 @@ export class MerchTwpD2P extends LitElement { super(); this.step = 1; this.#handleOfferSelected = this.handleOfferSelected.bind(this); + this.handleWhatsIncludedClick = this.handleWhatsIncludedClick.bind(this); } /** @type {Commerce.Log.Instance} */ @@ -315,6 +316,7 @@ export class MerchTwpD2P extends LitElement { ? this.mobileLayout : this.desktopLayout } + `; } @@ -331,6 +333,10 @@ export class MerchTwpD2P extends LitElement { EVENT_MERCH_QUANTITY_SELECTOR_CHANGE, this.handleQuantityChange, ); + this.whatsIncludedLink?.addEventListener( + 'click', + this.handleWhatsIncludedClick + ); this.addEventListener( EVENT_MERCH_STORAGE_CHANGE, this.handleStorageChange, @@ -344,6 +350,7 @@ export class MerchTwpD2P extends LitElement { EVENT_OFFER_SELECTED, this.#handleOfferSelected, ); + this.whatsIncludedLink?.removeEventListener('click', this.handleWhatsIncludedClick); this.removeEventListener( EVENT_MERCH_STORAGE_CHANGE, this.handleStorageChange, @@ -361,6 +368,14 @@ export class MerchTwpD2P extends LitElement { this.requestUpdate(); } + get whatsIncludedLink() { + return this.querySelector('merch-card .merch-whats-included'); + } + + get whatsIncluded() { + return this.querySelector('[slot="merch-whats-included"]'); + } + setOfferSelectOnPanel(offerSelect) { offerSelect.setAttribute('variant', 'subscription-options'); this.subscriptionPanel.offerSelect?.remove(); @@ -446,6 +461,11 @@ export class MerchTwpD2P extends LitElement { this.setOfferSelectOnPanel(offerSelect); } + handleWhatsIncludedClick(event) { + event.preventDefault(); + this.whatsIncluded?.classList.toggle('hidden'); + } + async processCards() { const allCards = [...this.querySelectorAll('merch-card')]; allCards.forEach((card, i) => { diff --git a/web-components/src/merch-whats-included.js b/web-components/src/merch-whats-included.js new file mode 100644 index 00000000..c0ea4fb1 --- /dev/null +++ b/web-components/src/merch-whats-included.js @@ -0,0 +1,100 @@ +import { html, css, LitElement } from 'lit'; + +export class MerchWhatsIncluded extends LitElement { + static styles = css` + :host { + display: inline-grid; + place-items: end start; + grid-auto-flow: row; + width: auto; + overflow: hidden; + place-content: stretch start; + box-sizing: border-box; + align-self: baseline; + margin-top: 16px; + margin-bottom: 16px; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + grid-auto-rows: unset; + height: inherit; + } + + ::slotted([slot='heading']) { + grid-column: 1 / -1; + font-size: 18px; + margin: 0; + margin-bottom: 16px; + } + + ::slotted([slot='content']) { + display: contents; + } + + .hidden { + display: none; + } + + .see-more { + font-size: 14px; + text-decoration: underline; + color: var(--link-color-dark); + margin-top: 16px; + } + `; + + static properties = { + heading: { type: String, attribute: true }, + mobileRows: { type: Number, attribute: true }, + }; + + updated() { + this.hideSeeMoreEls(); + } + + hideSeeMoreEls() { + if (this.isMobile) { + this.rows.forEach((node, index) => { + if (index >= 5) { + node.style.display = this.showAll ? 'flex' : 'none'; + } + }); + } + } + + constructor() { + super(); + this.showAll = false; + this.mobileRows = this.mobileRows === undefined ? 5 : this.mobileRows; + } + + toggle() { + this.showAll = !this.showAll; + + this.dispatchEvent( + new CustomEvent('hide-see-more-elements', { + bubbles: true, + composed: true, + }) + ); + this.requestUpdate(); + } + + render() { + return html` + + ${this.isMobile && this.rows.length > this.mobileRows + ? html`
+ ${this.showAll ? '- See less' : '+ See more'} +
` + : html``}`; + } + + get isMobile() { + return window.matchMedia('(max-width: 767px)').matches; + } + + get rows() { + return this.querySelectorAll('merch-mnemonic-list'); + } +} + +customElements.define('merch-whats-included', MerchWhatsIncluded); diff --git a/web-components/test/merch-twp-d2p.test.html b/web-components/test/merch-twp-d2p.test.html index 2f8d80e0..5a011e69 100644 --- a/web-components/test/merch-twp-d2p.test.html +++ b/web-components/test/merch-twp-d2p.test.html @@ -91,6 +91,96 @@

Try the full version of Adobe apps with a 7-day free trial.

+ See all plans and pricing + See all plans and pricing + See all plans and pricing +
@@ -165,7 +255,7 @@
credits

- See all included apps. + See all included apps.

@@ -242,7 +332,7 @@
credits

- See all included apps. + See all included apps.

diff --git a/web-components/test/merch-twp-d2p.test.html.js b/web-components/test/merch-twp-d2p.test.html.js index 346feae8..7437d75c 100644 --- a/web-components/test/merch-twp-d2p.test.html.js +++ b/web-components/test/merch-twp-d2p.test.html.js @@ -15,6 +15,8 @@ import '../src/merch-quantity-select.js'; import '../src/merch-stock.js'; import '../src/merch-secure-transaction.js'; import '../src/merch-subscription-panel.js'; +import '../src/merch-whats-included.js'; +import '../src/merch-mnemonic-list.js'; import '../src/merch-twp-d2p.js'; import './spectrum.js'; diff --git a/web-components/test/merch-whats-included.html.js b/web-components/test/merch-whats-included.html.js new file mode 100644 index 00000000..4fb505d5 --- /dev/null +++ b/web-components/test/merch-whats-included.html.js @@ -0,0 +1,36 @@ +// @ts-nocheck +import { runTests } from '@web/test-runner-mocha'; +import { expect } from '@esm-bundle/chai'; + +import { mockLana } from '/test/mocks/lana.js'; +import { mockFetch } from '/test/mocks/fetch.js'; +import { mockConfig } from '/test/mocks/config.js'; +import mas from './mocks/mas.js'; + +import '../src/merch-icon.js'; +import '../src/merch-mnemonic-list.js'; +import '../src/merch-whats-included.js'; + +import { appendMiloStyles } from './utils.js'; +import { mockIms } from './mocks/ims.js'; + +const skipTests = sessionStorage.getItem('skipTests'); + +runTests(async () => { + mockIms(); + mockLana(); + await mockFetch(); + await mas(); + if (skipTests !== null) { + appendMiloStyles(); + return; + } + describe('merch whats included web component', () => { + it('should exist in the HTML document', async () => { + expect(document.querySelector('merch-whats-included')).to.exist; + }); + it('should display merch mnemonic list', async () => { + expect(document.querySelector('merch-mnemonic-list')).to.exist; + }); + }); +}); diff --git a/web-components/test/merch-whats-included.test.html b/web-components/test/merch-whats-included.test.html new file mode 100644 index 00000000..f6fd0e64 --- /dev/null +++ b/web-components/test/merch-whats-included.test.html @@ -0,0 +1,93 @@ + + + + + + Merch What's Included Web Component demo page + + + + + + +
+
+

What’s included with Creative Cloud All Apps

+

Get the apps and services you need for all kinds of creative work, from photography and graphic design to video, UI/UX, and social media.

+ +

Apps

+
+ + +

Photoshop

+
+ + +

Illustrator

+
+ + +

Premiere Pro

+
+ + +

Acrobat Pro

+
+ + +

Adobe Express

+
+ + +

Firefly

+
+
+
+ +

Membership perks

+
+ + +

Adobe Fonts

+
+ + +

Adobe Color

+
+ + +

Adobe Portfolio

+
+ + +

Behance

+
+ + +

Creative Cloud libraries

+
+ + +

x,xxx monthly generative credits

+
+
+
+
+
+ + From e630b7326cfad5e4af1432227445d89e30c30a69 Mon Sep 17 00:00:00 2001 From: Axel Cureno Basurto Date: Tue, 9 Jul 2024 07:25:53 -0700 Subject: [PATCH 2/3] fixed unit tests --- web-components/test/merch-whats-included.html.js | 1 - 1 file changed, 1 deletion(-) diff --git a/web-components/test/merch-whats-included.html.js b/web-components/test/merch-whats-included.html.js index 4fb505d5..f1873d01 100644 --- a/web-components/test/merch-whats-included.html.js +++ b/web-components/test/merch-whats-included.html.js @@ -7,7 +7,6 @@ import { mockFetch } from '/test/mocks/fetch.js'; import { mockConfig } from '/test/mocks/config.js'; import mas from './mocks/mas.js'; -import '../src/merch-icon.js'; import '../src/merch-mnemonic-list.js'; import '../src/merch-whats-included.js'; From daee970c602b51753da5d549d8e1108e86a72913 Mon Sep 17 00:00:00 2001 From: Axel Cureno Basurto Date: Tue, 9 Jul 2024 07:51:21 -0700 Subject: [PATCH 3/3] fixed build.mjs --- web-components/build.mjs | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/web-components/build.mjs b/web-components/build.mjs index 7700e354..68fd51a0 100644 --- a/web-components/build.mjs +++ b/web-components/build.mjs @@ -92,33 +92,6 @@ Promise.all([ plugins: [rewriteImports()], external: ['lit'], }), - build({ - entryPoints: ['./src/merch-twp-d2p.js'], - bundle: true, - banner, - outfile: './lib/merch-twp-d2p.js', - format: 'esm', - plugins: [rewriteImports()], - external: ['lit'], - }), - build({ - entryPoints: ['./src/merch-whats-included.js'], - bundle: true, - banner, - outfile: './lib/merch-whats-included.js', - format: 'esm', - plugins: [rewriteImports()], - external: ['lit'], - }), - build({ - entryPoints: ['./src/merch-mnemonic-list.js'], - bundle: true, - banner, - outfile: './lib/merch-mnemonic-list.js', - format: 'esm', - plugins: [rewriteImports()], - external: ['lit'], - }), buildLitComponent('merch-icon'), buildLitComponent('merch-quantity-select'), buildLitComponent('merch-secure-transaction'),