diff --git a/codecov.yml b/codecov.yml index c2d9fc176..7d458ca32 100644 --- a/codecov.yml +++ b/codecov.yml @@ -42,3 +42,5 @@ ignore: - '**/node_modules/**/*' - '**/dist/**/*' - 'build/**/*' + # Mostly CSS-in-template-string; patch coverage does not reflect runtime risk. + - 'web-components/src/global.css.js' diff --git a/nala/docs/minicompare/minicompare.page.js b/nala/docs/minicompare/minicompare.page.js index 754abc5fd..42358d570 100644 --- a/nala/docs/minicompare/minicompare.page.js +++ b/nala/docs/minicompare/minicompare.page.js @@ -10,4 +10,8 @@ export default class MasMinicompare { getGalleryFooterCtas() { return this.page.locator('.three-merch-cards merch-card div[slot="footer"] :is(a, button)'); } + + getMnemonicRow(id, index = 0) { + return this.getCard(id).locator('merch-whats-included merch-mnemonic-list').nth(index); + } } diff --git a/nala/docs/minicompare/minicomparedocs.spec.js b/nala/docs/minicompare/minicomparedocs.spec.js index d52df0f51..3d0788c87 100644 --- a/nala/docs/minicompare/minicomparedocs.spec.js +++ b/nala/docs/minicompare/minicomparedocs.spec.js @@ -26,4 +26,15 @@ export const features = [ data: {}, tags: '@mas-docs @mas-minicompare @commerce @smoke @regression @milo', }, + { + tcid: '2', + name: '@MAS-Minicompare-Divider-CSSVar', + path: DOCS_GALLERY_PATH.MINICOMPARE, + data: { + id: '8c404496-6d60-42d0-975c-a4ec0b0314e1', + defaultDividerColor: 'rgb(233, 233, 233)', + overrideDividerColor: 'rgb(247, 181, 0)', + }, + tags: '@mas-docs @mas-minicompare @commerce @regression @milo', + }, ]; diff --git a/nala/docs/minicompare/minicomparedocs.test.js b/nala/docs/minicompare/minicomparedocs.test.js index d8e38cdf3..d8d2c3278 100644 --- a/nala/docs/minicompare/minicomparedocs.test.js +++ b/nala/docs/minicompare/minicomparedocs.test.js @@ -82,4 +82,42 @@ test.describe('Minicompare gallery feature test suite', () => { } }); }); + + test(`${features[2].name},${features[2].tags}`, async () => { + const { data } = features[2]; + const page = workerSetup.getPage('US'); + galleryPage = new MasMinicompare(page); + + await test.step('step-1: Go to Minicompare gallery page', async () => { + await workerSetup.verifyPageURL('US', DOCS_GALLERY_PATH.MINICOMPARE, expect); + }); + + await test.step('step-2: Default divider color matches the variant fallback (no regression)', async () => { + const card = galleryPage.getCard(data.id); + await expect(card).toBeVisible(); + const row = galleryPage.getMnemonicRow(data.id, 0); + await expect(row).toBeVisible(); + const defaultColor = await row.evaluate((el) => window.getComputedStyle(el).borderTopColor); + expect(defaultColor).toBe(data.defaultDividerColor); + }); + + await test.step('step-3: Setting --merch-whats-included-divider-color on recolors the divider', async () => { + const card = galleryPage.getCard(data.id); + await card.evaluate( + (el, color) => el.style.setProperty('--merch-whats-included-divider-color', color), + data.overrideDividerColor, + ); + const row = galleryPage.getMnemonicRow(data.id, 0); + const overriddenColor = await row.evaluate((el) => window.getComputedStyle(el).borderTopColor); + expect(overriddenColor).toBe(data.overrideDividerColor); + }); + + await test.step('step-4: Removing the override restores the default color', async () => { + const card = galleryPage.getCard(data.id); + await card.evaluate((el) => el.style.removeProperty('--merch-whats-included-divider-color')); + const row = galleryPage.getMnemonicRow(data.id, 0); + const restoredColor = await row.evaluate((el) => window.getComputedStyle(el).borderTopColor); + expect(restoredColor).toBe(data.defaultDividerColor); + }); + }); }); diff --git a/studio/src/editors/merch-card-editor.js b/studio/src/editors/merch-card-editor.js index 18e7d7fa4..940e9e77b 100644 --- a/studio/src/editors/merch-card-editor.js +++ b/studio/src/editors/merch-card-editor.js @@ -99,6 +99,7 @@ class MerchCardEditor extends LitElement { availableColors = []; availableBorderColors = []; availableBadgeColors = []; + availableWhatsIncludedDividerColors = []; availableBackgroundColors = []; quantitySelectorValues = ''; lastMnemonicState = null; @@ -1330,6 +1331,15 @@ class MerchCardEditor extends LitElement {
What's included
+
+ ${this.#renderColorPicker( + 'whatsIncludedDividerColor', + 'Divider Color', + this.availableWhatsIncludedDividerColors, + form.whatsIncludedDividerColor?.values[0], + 'whatsIncludedDividerColor', + )} +
${options.map( diff --git a/web-components/dist/mas.js b/web-components/dist/mas.js index f946a5208..176aa04d2 100644 --- a/web-components/dist/mas.js +++ b/web-components/dist/mas.js @@ -501,9 +501,9 @@ window.masPriceLiterals = { ":type": "sheet" } .data; -var Qn=Object.defineProperty;var Zn=e=>{throw TypeError(e)};var Ml=(e,t,r)=>t in e?Qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var et=(e,t)=>()=>(e&&(t=e(e=0)),t);var Jn=(e,t)=>{for(var r in t)Qn(e,r,{get:t[r],enumerable:!0})};var m=(e,t,r)=>Ml(e,typeof t!="symbol"?t+"":t,r),ia=(e,t,r)=>t.has(e)||Zn("Cannot "+r);var h=(e,t,r)=>(ia(e,t,"read from private field"),r?r.call(e):t.get(e)),w=(e,t,r)=>t.has(e)?Zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),y=(e,t,r,i)=>(ia(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),Z=(e,t,r)=>(ia(e,t,"access private method"),r);var eo=(e,t,r,i)=>({set _(a){y(e,t,a,r)},get _(){return h(e,t,i)}});var zi,Di,mn,qs,zr,me,b,un,$i,gn=et(()=>{zi=window,Di=zi.ShadowRoot&&(zi.ShadyCSS===void 0||zi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mn=Symbol(),qs=new WeakMap,zr=class{constructor(t,r,i){if(this._$cssResult$=!0,i!==mn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(Di&&t===void 0){let i=r!==void 0&&r.length===1;i&&(t=qs.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&qs.set(r,t))}return t}toString(){return this.cssText}},me=e=>new zr(typeof e=="string"?e:e+"",void 0,mn),b=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((i,a,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[n+1],e[0]);return new zr(r,e,mn)},un=(e,t)=>{Di?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{let i=document.createElement("style"),a=zi.litNonce;a!==void 0&&i.setAttribute("nonce",a),i.textContent=r.cssText,e.appendChild(i)})},$i=Di?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let i of t.cssRules)r+=i.cssText;return me(r)})(e):e});var fn,Hi,Vs,Uh,js,vn,Ws,xn,bn,Fe,Bi=et(()=>{gn();gn();Hi=window,Vs=Hi.trustedTypes,Uh=Vs?Vs.emptyScript:"",js=Hi.reactiveElementPolyfillSupport,vn={toAttribute(e,t){switch(t){case Boolean:e=e?Uh:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Ws=(e,t)=>t!==e&&(t==t||e==e),xn={attribute:!0,type:String,converter:vn,reflect:!1,hasChanged:Ws},bn="finalized",Fe=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((r,i)=>{let a=this._$Ep(i,r);a!==void 0&&(this._$Ev.set(a,i),t.push(a))}),t}static createProperty(t,r=xn){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(t,r),!r.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,a=this.getPropertyDescriptor(t,i,r);a!==void 0&&Object.defineProperty(this.prototype,t,a)}}static getPropertyDescriptor(t,r,i){return{get(){return this[r]},set(a){let n=this[t];this[r]=a,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||xn}static finalize(){if(this.hasOwnProperty(bn))return!1;this[bn]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let a of i)this.createProperty(a,r[a])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let a of i)r.unshift($i(a))}else t!==void 0&&r.push($i(t));return r}static _$Ep(t,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(r=>r(this))}addController(t){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var t;let r=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return un(r,this.constructor.elementStyles),r}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(t,r,i){this._$AK(t,i)}_$EO(t,r,i=xn){var a;let n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){let o=(((a=i.converter)===null||a===void 0?void 0:a.toAttribute)!==void 0?i.converter:vn).toAttribute(r,i.type);this._$El=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,r){var i;let a=this.constructor,n=a._$Ev.get(t);if(n!==void 0&&this._$El!==n){let o=a.getPropertyOptions(n),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:vn;this._$El=n,this[n]=s.fromAttribute(r,o.type),this._$El=null}}requestUpdate(t,r,i){let a=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Ws)(this[t],r)?(this._$AL.has(t)||this._$AL.set(t,r),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):a=!1),!this.isUpdatePending&&a&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((a,n)=>this[n]=a),this._$Ei=void 0);let r=!1,i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(a=>{var n;return(n=a.hostUpdate)===null||n===void 0?void 0:n.call(a)}),this.update(i)):this._$Ek()}catch(a){throw r=!1,this._$Ek(),a}r&&this._$AE(i)}willUpdate(t){}_$AE(t){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var a;return(a=i.hostUpdated)===null||a===void 0?void 0:a.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};Fe[bn]=!0,Fe.elementProperties=new Map,Fe.elementStyles=[],Fe.shadowRootOptions={mode:"open"},js?.({ReactiveElement:Fe}),((fn=Hi.reactiveElementVersions)!==null&&fn!==void 0?fn:Hi.reactiveElementVersions=[]).push("1.6.3")});function nc(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ys!==void 0?Ys.createHTML(t):t}function $t(e,t,r=e,i){var a,n,o,s;if(t===Ue)return t;let c=i!==void 0?(a=r._$Co)===null||a===void 0?void 0:a[i]:r._$Cl,l=Hr(t)?void 0:t._$litDirective$;return c?.constructor!==l&&((n=c?._$AO)===null||n===void 0||n.call(c,!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,r,i)),i!==void 0?((o=(s=r)._$Co)!==null&&o!==void 0?o:s._$Co=[])[i]=c:r._$Cl=c),c!==void 0&&(t=$t(e,c._$AS(e,t.values),c,i)),t}var yn,Fi,Dt,Ys,En,Xe,tc,Gh,bt,$r,Hr,rc,qh,wn,Dr,Xs,Ks,xt,Qs,Zs,ic,ac,g,mf,Ue,E,Js,vt,Vh,Br,An,Fr,Ht,Sn,jh,Cn,Tn,kn,ec,oc,Ur=et(()=>{Fi=window,Dt=Fi.trustedTypes,Ys=Dt?Dt.createPolicy("lit-html",{createHTML:e=>e}):void 0,En="$lit$",Xe=`lit$${(Math.random()+"").slice(9)}$`,tc="?"+Xe,Gh=`<${tc}>`,bt=document,$r=()=>bt.createComment(""),Hr=e=>e===null||typeof e!="object"&&typeof e!="function",rc=Array.isArray,qh=e=>rc(e)||typeof e?.[Symbol.iterator]=="function",wn=`[ -\f\r]`,Dr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xs=/-->/g,Ks=/>/g,xt=RegExp(`>|${wn}(?:([^\\s"'>=/]+)(${wn}*=${wn}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),Qs=/'/g,Zs=/"/g,ic=/^(?:script|style|textarea|title)$/i,ac=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),g=ac(1),mf=ac(2),Ue=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Js=new WeakMap,vt=bt.createTreeWalker(bt,129,null,!1);Vh=(e,t)=>{let r=e.length-1,i=[],a,n=t===2?"":"",o=Dr;for(let s=0;s"?(o=a??Dr,p=-1):d[1]===void 0?p=-2:(p=o.lastIndex-d[2].length,l=d[1],o=d[3]===void 0?xt:d[3]==='"'?Zs:Qs):o===Zs||o===Qs?o=xt:o===Xs||o===Ks?o=Dr:(o=xt,a=void 0);let f=o===xt&&e[s+1].startsWith("/>")?" ":"";n+=o===Dr?c+Gh:p>=0?(i.push(l),c.slice(0,p)+En+c.slice(p)+Xe+f):c+Xe+(p===-2?(i.push(void 0),s):f)}return[nc(e,n+(e[r]||"")+(t===2?"":"")),i]},Br=class e{constructor({strings:t,_$litType$:r},i){let a;this.parts=[];let n=0,o=0,s=t.length-1,c=this.parts,[l,d]=Vh(t,r);if(this.el=e.createElement(l,i),vt.currentNode=this.el.content,r===2){let p=this.el.content,u=p.firstChild;u.remove(),p.append(...u.childNodes)}for(;(a=vt.nextNode())!==null&&c.length0){a.textContent=Dt?Dt.emptyScript:"";for(let f=0;f2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,r=this,i,a){let n=this.strings,o=!1;if(n===void 0)t=$t(this,t,r,0),o=!Hr(t)||t!==this._$AH&&t!==Ue,o&&(this._$AH=t);else{let s=t,c,l;for(t=n[0],c=0;c{var i,a;let n=(i=r?.renderBefore)!==null&&i!==void 0?i:t,o=n._$litPart$;if(o===void 0){let s=(a=r?.renderBefore)!==null&&a!==void 0?a:null;n._$litPart$=o=new Fr(t.insertBefore($r(),s),s,void 0,r??{})}return o._$AI(e),o}});var _n,Pn,U,sc,cc=et(()=>{Bi();Bi();Ur();Ur();U=class extends Fe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,r;let i=super.createRenderRoot();return(t=(r=this.renderOptions).renderBefore)!==null&&t!==void 0||(r.renderBefore=i.firstChild),i}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=oc(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return Ue}};U.finalized=!0,U._$litElement$=!0,(_n=globalThis.litElementHydrateSupport)===null||_n===void 0||_n.call(globalThis,{LitElement:U});sc=globalThis.litElementPolyfillSupport;sc?.({LitElement:U});((Pn=globalThis.litElementVersions)!==null&&Pn!==void 0?Pn:globalThis.litElementVersions=[]).push("3.3.3")});var lc=et(()=>{});var P=et(()=>{Bi();Ur();cc();lc()});var Ln={};Jn(Ln,{default:()=>Gr});function Wh(){return customElements.get("sp-tooltip")!==void 0&&customElements.get("overlay-trigger")!==void 0&&document.querySelector("sp-theme")!==null}var ue,Gr,Gi=et(()=>{P();ue=class ue extends U{constructor(){super(),this.content="",this.placement="top",this.variant="info",this.size="xs",this.tooltipVisible=!1,this.lastPointerType=null,this.handleClickOutside=this.handleClickOutside.bind(this)}connectedCallback(){super.connectedCallback(),window.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("mousedown",this.handleClickOutside)}handleClickOutside(t){let r=t.composedPath();ue.activeTooltip===this&&!r.includes(this)&&this.hideTooltip()}showTooltip(){ue.activeTooltip&&ue.activeTooltip!==this&&(ue.activeTooltip.closeOverlay(),ue.activeTooltip.tooltipVisible=!1,ue.activeTooltip.requestUpdate()),ue.activeTooltip=this,this.tooltipVisible=!0}hideTooltip(){ue.activeTooltip===this&&(ue.activeTooltip=null),this.tooltipVisible=!1}handleTap(t){t.preventDefault(),this.tooltipVisible?this.hideTooltip():this.showTooltip()}closeOverlay(){let t=this.shadowRoot?.querySelector("overlay-trigger");t?.open!==void 0&&(t.open=!1)}get effectiveContent(){return this.tooltipText||this.mnemonicText||this.content||""}get effectivePlacement(){return this.tooltipPlacement||this.mnemonicPlacement||this.placement||"top"}renderIcon(){return this.src?g`{throw TypeError(e)};var Ml=(e,t,r)=>t in e?Qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var et=(e,t)=>()=>(e&&(t=e(e=0)),t);var Jn=(e,t)=>{for(var r in t)Qn(e,r,{get:t[r],enumerable:!0})};var m=(e,t,r)=>Ml(e,typeof t!="symbol"?t+"":t,r),ia=(e,t,r)=>t.has(e)||Zn("Cannot "+r);var h=(e,t,r)=>(ia(e,t,"read from private field"),r?r.call(e):t.get(e)),w=(e,t,r)=>t.has(e)?Zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),y=(e,t,r,i)=>(ia(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),Z=(e,t,r)=>(ia(e,t,"access private method"),r);var eo=(e,t,r,i)=>({set _(a){y(e,t,a,r)},get _(){return h(e,t,i)}});var zi,Di,mn,qs,zr,me,b,un,$i,gn=et(()=>{zi=window,Di=zi.ShadowRoot&&(zi.ShadyCSS===void 0||zi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mn=Symbol(),qs=new WeakMap,zr=class{constructor(t,r,i){if(this._$cssResult$=!0,i!==mn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(Di&&t===void 0){let i=r!==void 0&&r.length===1;i&&(t=qs.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&qs.set(r,t))}return t}toString(){return this.cssText}},me=e=>new zr(typeof e=="string"?e:e+"",void 0,mn),b=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((i,a,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+e[n+1],e[0]);return new zr(r,e,mn)},un=(e,t)=>{Di?e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):t.forEach(r=>{let i=document.createElement("style"),a=zi.litNonce;a!==void 0&&i.setAttribute("nonce",a),i.textContent=r.cssText,e.appendChild(i)})},$i=Di?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let i of t.cssRules)r+=i.cssText;return me(r)})(e):e});var fn,Hi,Vs,Uh,js,xn,Ws,vn,bn,Fe,Bi=et(()=>{gn();gn();Hi=window,Vs=Hi.trustedTypes,Uh=Vs?Vs.emptyScript:"",js=Hi.reactiveElementPolyfillSupport,xn={toAttribute(e,t){switch(t){case Boolean:e=e?Uh:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Ws=(e,t)=>t!==e&&(t==t||e==e),vn={attribute:!0,type:String,converter:xn,reflect:!1,hasChanged:Ws},bn="finalized",Fe=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var r;this.finalize(),((r=this.h)!==null&&r!==void 0?r:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((r,i)=>{let a=this._$Ep(i,r);a!==void 0&&(this._$Ev.set(a,i),t.push(a))}),t}static createProperty(t,r=vn){if(r.state&&(r.attribute=!1),this.finalize(),this.elementProperties.set(t,r),!r.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,a=this.getPropertyDescriptor(t,i,r);a!==void 0&&Object.defineProperty(this.prototype,t,a)}}static getPropertyDescriptor(t,r,i){return{get(){return this[r]},set(a){let n=this[t];this[r]=a,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||vn}static finalize(){if(this.hasOwnProperty(bn))return!1;this[bn]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let r=this.properties,i=[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)];for(let a of i)this.createProperty(a,r[a])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let a of i)r.unshift($i(a))}else t!==void 0&&r.push($i(t));return r}static _$Ep(t,r){let i=r.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(r=>r(this))}addController(t){var r,i;((r=this._$ES)!==null&&r!==void 0?r:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var r;(r=this._$ES)===null||r===void 0||r.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,r)=>{this.hasOwnProperty(r)&&(this._$Ei.set(r,this[r]),delete this[r])})}createRenderRoot(){var t;let r=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return un(r,this.constructor.elementStyles),r}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostConnected)===null||i===void 0?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(r=>{var i;return(i=r.hostDisconnected)===null||i===void 0?void 0:i.call(r)})}attributeChangedCallback(t,r,i){this._$AK(t,i)}_$EO(t,r,i=vn){var a;let n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){let o=(((a=i.converter)===null||a===void 0?void 0:a.toAttribute)!==void 0?i.converter:xn).toAttribute(r,i.type);this._$El=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,r){var i;let a=this.constructor,n=a._$Ev.get(t);if(n!==void 0&&this._$El!==n){let o=a.getPropertyOptions(n),s=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:xn;this._$El=n,this[n]=s.fromAttribute(r,o.type),this._$El=null}}requestUpdate(t,r,i){let a=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Ws)(this[t],r)?(this._$AL.has(t)||this._$AL.set(t,r),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):a=!1),!this.isUpdatePending&&a&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((a,n)=>this[n]=a),this._$Ei=void 0);let r=!1,i=this._$AL;try{r=this.shouldUpdate(i),r?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(a=>{var n;return(n=a.hostUpdate)===null||n===void 0?void 0:n.call(a)}),this.update(i)):this._$Ek()}catch(a){throw r=!1,this._$Ek(),a}r&&this._$AE(i)}willUpdate(t){}_$AE(t){var r;(r=this._$ES)===null||r===void 0||r.forEach(i=>{var a;return(a=i.hostUpdated)===null||a===void 0?void 0:a.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((r,i)=>this._$EO(i,this[i],r)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};Fe[bn]=!0,Fe.elementProperties=new Map,Fe.elementStyles=[],Fe.shadowRootOptions={mode:"open"},js?.({ReactiveElement:Fe}),((fn=Hi.reactiveElementVersions)!==null&&fn!==void 0?fn:Hi.reactiveElementVersions=[]).push("1.6.3")});function nc(e,t){if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ys!==void 0?Ys.createHTML(t):t}function $t(e,t,r=e,i){var a,n,o,s;if(t===Ue)return t;let c=i!==void 0?(a=r._$Co)===null||a===void 0?void 0:a[i]:r._$Cl,l=Hr(t)?void 0:t._$litDirective$;return c?.constructor!==l&&((n=c?._$AO)===null||n===void 0||n.call(c,!1),l===void 0?c=void 0:(c=new l(e),c._$AT(e,r,i)),i!==void 0?((o=(s=r)._$Co)!==null&&o!==void 0?o:s._$Co=[])[i]=c:r._$Cl=c),c!==void 0&&(t=$t(e,c._$AS(e,t.values),c,i)),t}var yn,Fi,Dt,Ys,En,Xe,tc,Gh,bt,$r,Hr,rc,qh,wn,Dr,Xs,Ks,vt,Qs,Zs,ic,ac,g,uf,Ue,E,Js,xt,Vh,Br,An,Fr,Ht,Sn,jh,Cn,Tn,kn,ec,oc,Ur=et(()=>{Fi=window,Dt=Fi.trustedTypes,Ys=Dt?Dt.createPolicy("lit-html",{createHTML:e=>e}):void 0,En="$lit$",Xe=`lit$${(Math.random()+"").slice(9)}$`,tc="?"+Xe,Gh=`<${tc}>`,bt=document,$r=()=>bt.createComment(""),Hr=e=>e===null||typeof e!="object"&&typeof e!="function",rc=Array.isArray,qh=e=>rc(e)||typeof e?.[Symbol.iterator]=="function",wn=`[ +\f\r]`,Dr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xs=/-->/g,Ks=/>/g,vt=RegExp(`>|${wn}(?:([^\\s"'>=/]+)(${wn}*=${wn}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),Qs=/'/g,Zs=/"/g,ic=/^(?:script|style|textarea|title)$/i,ac=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),g=ac(1),uf=ac(2),Ue=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Js=new WeakMap,xt=bt.createTreeWalker(bt,129,null,!1);Vh=(e,t)=>{let r=e.length-1,i=[],a,n=t===2?"":"",o=Dr;for(let s=0;s"?(o=a??Dr,p=-1):d[1]===void 0?p=-2:(p=o.lastIndex-d[2].length,l=d[1],o=d[3]===void 0?vt:d[3]==='"'?Zs:Qs):o===Zs||o===Qs?o=vt:o===Xs||o===Ks?o=Dr:(o=vt,a=void 0);let f=o===vt&&e[s+1].startsWith("/>")?" ":"";n+=o===Dr?c+Gh:p>=0?(i.push(l),c.slice(0,p)+En+c.slice(p)+Xe+f):c+Xe+(p===-2?(i.push(void 0),s):f)}return[nc(e,n+(e[r]||"")+(t===2?"":"")),i]},Br=class e{constructor({strings:t,_$litType$:r},i){let a;this.parts=[];let n=0,o=0,s=t.length-1,c=this.parts,[l,d]=Vh(t,r);if(this.el=e.createElement(l,i),xt.currentNode=this.el.content,r===2){let p=this.el.content,u=p.firstChild;u.remove(),p.append(...u.childNodes)}for(;(a=xt.nextNode())!==null&&c.length0){a.textContent=Dt?Dt.emptyScript:"";for(let f=0;f2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,r=this,i,a){let n=this.strings,o=!1;if(n===void 0)t=$t(this,t,r,0),o=!Hr(t)||t!==this._$AH&&t!==Ue,o&&(this._$AH=t);else{let s=t,c,l;for(t=n[0],c=0;c{var i,a;let n=(i=r?.renderBefore)!==null&&i!==void 0?i:t,o=n._$litPart$;if(o===void 0){let s=(a=r?.renderBefore)!==null&&a!==void 0?a:null;n._$litPart$=o=new Fr(t.insertBefore($r(),s),s,void 0,r??{})}return o._$AI(e),o}});var _n,Pn,U,sc,cc=et(()=>{Bi();Bi();Ur();Ur();U=class extends Fe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,r;let i=super.createRenderRoot();return(t=(r=this.renderOptions).renderBefore)!==null&&t!==void 0||(r.renderBefore=i.firstChild),i}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=oc(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return Ue}};U.finalized=!0,U._$litElement$=!0,(_n=globalThis.litElementHydrateSupport)===null||_n===void 0||_n.call(globalThis,{LitElement:U});sc=globalThis.litElementPolyfillSupport;sc?.({LitElement:U});((Pn=globalThis.litElementVersions)!==null&&Pn!==void 0?Pn:globalThis.litElementVersions=[]).push("3.3.3")});var lc=et(()=>{});var P=et(()=>{Bi();Ur();cc();lc()});var Ln={};Jn(Ln,{default:()=>Gr});function Wh(){return customElements.get("sp-tooltip")!==void 0&&customElements.get("overlay-trigger")!==void 0&&document.querySelector("sp-theme")!==null}var ue,Gr,Gi=et(()=>{P();ue=class ue extends U{constructor(){super(),this.content="",this.placement="top",this.variant="info",this.size="xs",this.tooltipVisible=!1,this.lastPointerType=null,this.handleClickOutside=this.handleClickOutside.bind(this)}connectedCallback(){super.connectedCallback(),window.addEventListener("mousedown",this.handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("mousedown",this.handleClickOutside)}handleClickOutside(t){let r=t.composedPath();ue.activeTooltip===this&&!r.includes(this)&&this.hideTooltip()}showTooltip(){ue.activeTooltip&&ue.activeTooltip!==this&&(ue.activeTooltip.closeOverlay(),ue.activeTooltip.tooltipVisible=!1,ue.activeTooltip.requestUpdate()),ue.activeTooltip=this,this.tooltipVisible=!0}hideTooltip(){ue.activeTooltip===this&&(ue.activeTooltip=null),this.tooltipVisible=!1}handleTap(t){t.preventDefault(),this.tooltipVisible?this.hideTooltip():this.showTooltip()}closeOverlay(){let t=this.shadowRoot?.querySelector("overlay-trigger");t?.open!==void 0&&(t.open=!1)}get effectiveContent(){return this.tooltipText||this.mnemonicText||this.content||""}get effectivePlacement(){return this.tooltipPlacement||this.mnemonicPlacement||this.placement||"top"}renderIcon(){return this.src?g``:g``}render(){let t=this.effectiveContent,r=this.effectivePlacement;return t?Wh()?g` @@ -652,10 +652,10 @@ var Qn=Object.defineProperty;var Zn=e=>{throw TypeError(e)};var Ml=(e,t,r)=>t in margin-left: 5px; border-right-color: var(--spectrum-gray-800, #323232); } - `);Gr=ue;customElements.define("mas-mnemonic",Gr)});var tt={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,severity:"e",tags:"acom",isProdDomain:!1},to=1e3;function Rl(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function ro(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:i,originatingRequest:a,status:n}=e;return[i,n,a].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!tt.serializableTypes.includes(r))return r}return e}function Ol(e,t){if(!tt.ignoredProperties.includes(e))return ro(t)}var aa={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,i=[],a=[],n=t;r.forEach(l=>{l!=null&&(Rl(l)?i:a).push(l)}),i.length&&(n+=" "+i.map(ro).join(" "));let{pathname:o,search:s}=window.location,c=`${tt.delimiter}page=${o}${s}`;c.length>to&&(c=`${c.slice(0,to)}`),n+=c,a.length&&(n+=`${tt.delimiter}facts=`,n+=JSON.stringify(a,Ol)),window.lana?.log(n,tt)}};function ci(e){Object.assign(tt,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in tt&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Ea={};Jn(Ea,{CLASS_NAME_FAILED:()=>ca,CLASS_NAME_HIDDEN:()=>Il,CLASS_NAME_PENDING:()=>la,CLASS_NAME_RESOLVED:()=>da,CheckoutWorkflow:()=>ao,CheckoutWorkflowStep:()=>ce,Commitment:()=>rt,ERROR_MESSAGE_BAD_REQUEST:()=>ha,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>Vl,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>pa,EVENT_AEM_ERROR:()=>nt,EVENT_AEM_LOAD:()=>at,EVENT_MAS_ERROR:()=>sa,EVENT_MAS_READY:()=>fr,EVENT_MERCH_ADDON_AND_QUANTITY_UPDATE:()=>di,EVENT_MERCH_CARD_ACTION_MENU_TOGGLE:()=>na,EVENT_MERCH_CARD_COLLECTION_LITERALS_CHANGED:()=>it,EVENT_MERCH_CARD_COLLECTION_SHOWMORE:()=>Gl,EVENT_MERCH_CARD_COLLECTION_SIDENAV_ATTACHED:()=>Ul,EVENT_MERCH_CARD_COLLECTION_SORT:()=>Fl,EVENT_MERCH_CARD_QUANTITY_CHANGE:()=>Pt,EVENT_MERCH_OFFER_READY:()=>_t,EVENT_MERCH_OFFER_SELECT_READY:()=>gr,EVENT_MERCH_QUANTITY_SELECTOR_CHANGE:()=>te,EVENT_MERCH_SEARCH_CHANGE:()=>Bl,EVENT_MERCH_SIDENAV_SELECT:()=>ql,EVENT_MERCH_STOCK_CHANGE:()=>$l,EVENT_MERCH_STORAGE_CHANGE:()=>Hl,EVENT_OFFER_SELECTED:()=>oa,EVENT_TYPE_FAILED:()=>ma,EVENT_TYPE_READY:()=>li,EVENT_TYPE_RESOLVED:()=>Lt,Env:()=>Re,FF_ANNUAL_PRICE:()=>Mt,FF_DEFAULTS:()=>ke,HEADER_X_REQUEST_ID:()=>xr,LOG_NAMESPACE:()=>ua,Landscape:()=>Ve,MARK_DURATION_SUFFIX:()=>ct,MARK_START_SUFFIX:()=>st,MODAL_TYPE_3_IN_1:()=>ot,NAMESPACE:()=>Nl,PARAM_AOS_API_KEY:()=>jl,PARAM_ENV:()=>fa,PARAM_LANDSCAPE:()=>xa,PARAM_MAS_PREVIEW:()=>ga,PARAM_WCS_API_KEY:()=>Wl,PROVIDER_ENVIRONMENT:()=>ya,SELECTOR_MAS_CHECKOUT_LINK:()=>Ce,SELECTOR_MAS_ELEMENT:()=>ur,SELECTOR_MAS_INLINE_PRICE:()=>D,SELECTOR_MAS_SP_BUTTON:()=>Dl,SELECTOR_MAS_UPT_LINK:()=>io,SORT_ORDER:()=>Ql,STATE_FAILED:()=>Te,STATE_PENDING:()=>qe,STATE_RESOLVED:()=>De,SUPPORTED_COUNTRIES:()=>wa,TAG_NAME_SERVICE:()=>zl,TEMPLATE_PRICE:()=>Yl,TEMPLATE_PRICE_ANNUAL:()=>Kl,TEMPLATE_PRICE_LEGAL:()=>xe,TEMPLATE_PRICE_STRIKETHROUGH:()=>Xl,Term:()=>ye,WCS_PROD_URL:()=>va,WCS_STAGE_URL:()=>ba});var rt=Object.freeze({MONTH:"MONTH",YEAR:"YEAR",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",PERPETUAL:"PERPETUAL",TERM_LICENSE:"TERM_LICENSE",ACCESS_PASS:"ACCESS_PASS",THREE_MONTHS:"THREE_MONTHS",SIX_MONTHS:"SIX_MONTHS"}),ye=Object.freeze({ANNUAL:"ANNUAL",MONTHLY:"MONTHLY",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",P1D:"P1D",P1Y:"P1Y",P3Y:"P3Y",P10Y:"P10Y",P15Y:"P15Y",P3D:"P3D",P7D:"P7D",P30D:"P30D",HALF_YEARLY:"HALF_YEARLY",QUARTERLY:"QUARTERLY"}),Nl="merch",Il="hidden",li="wcms:commerce:ready",zl="mas-commerce-service",D='span[is="inline-price"][data-wcs-osi]',Ce='a[is="checkout-link"][data-wcs-osi],button[is="checkout-button"][data-wcs-osi]',Dl="sp-button[data-wcs-osi]",io='a[is="upt-link"]',ur=`${D},${Ce},${io}`,_t="merch-offer:ready",gr="merch-offer-select:ready",na="merch-card:action-menu-toggle",oa="merch-offer:selected",$l="merch-stock:change",Hl="merch-storage:change",te="merch-quantity-selector:change",Pt="merch-card-quantity:change",di="merch-modal:addon-and-quantity-update",Bl="merch-search:change",Fl="merch-card-collection:sort",it="merch-card-collection:literals-changed",Ul="merch-card-collection:sidenav-attached",Gl="merch-card-collection:showmore",ql="merch-sidenav:select",at="aem:load",nt="aem:error",fr="mas:ready",sa="mas:error",ca="placeholder-failed",la="placeholder-pending",da="placeholder-resolved",ha="Bad WCS request",pa="Commerce offer not found",Vl="Literals URL not provided",ma="mas:failed",Lt="mas:resolved",ua="mas/commerce",ga="mas.preview",fa="commerce.env",xa="commerce.landscape",jl="commerce.aosKey",Wl="commerce.wcsKey",va="https://www.adobe.com/web_commerce_artifact",ba="https://www.stage.adobe.com/web_commerce_artifact_stage",Te="failed",qe="pending",De="resolved",Ve={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"},xr="X-Request-Id",ce=Object.freeze({SEGMENTATION:"segmentation",BUNDLE:"bundle",COMMITMENT:"commitment",RECOMMENDATION:"recommendation",EMAIL:"email",PAYMENT:"payment",CHANGE_PLAN_TEAM_PLANS:"change-plan/team-upgrade/plans",CHANGE_PLAN_TEAM_PAYMENT:"change-plan/team-upgrade/payment"}),ao="UCv3",Re=Object.freeze({STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"}),ya={PRODUCTION:"PRODUCTION"},ot={TWP:"twp",D2P:"d2p",CRM:"crm"},st=":start",ct=":duration",Yl="price",Xl="price-strikethrough",Kl="annual",xe="legal",ke="mas-ff-defaults",Mt="mas-ff-annual-price",Ql={alphabetical:"alphabetical",authored:"authored"},wa=["AE","AM","AR","AT","AU","AZ","BB","BD","BE","BG","BH","BO","BR","BS","BY","CA","CH","CL","CN","CO","CR","CY","CZ","DE","DK","DO","DZ","EC","EE","EG","ES","FI","FR","GB","GE","GH","GR","GT","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JO","JP","KE","KG","KR","KW","KZ","LA","LB","LK","LT","LU","LV","MA","MD","MO","MT","MU","MX","MY","NG","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RO","RS","RU","SA","SE","SG","SI","SK","SV","TH","TJ","TM","TN","TR","TT","TW","TZ","UA","US","UY","UZ","VE","VN","YE","ZA"];var no="tacocat.js";var Aa=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),oo=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function F(e,t={},{metadata:r=!0,search:i=!0,storage:a=!0}={}){let n;if(i&&n==null){let o=new URLSearchParams(window.location.search),s=Rt(i)?i:e;n=o.get(s)}if(a&&n==null){let o=Rt(a)?a:e;n=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(r&&n==null){let o=Jl(Rt(r)?r:e);n=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return n??t[e]}var Zl=e=>typeof e=="boolean",hi=e=>typeof e=="function",pi=e=>typeof e=="number",so=e=>e!=null&&typeof e=="object";var Rt=e=>typeof e=="string",co=e=>Rt(e)&&e,vr=e=>pi(e)&&Number.isFinite(e)&&e>0;function mi(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,i])=>{t(i)&&delete e[r]}),e}function T(e,t){if(Zl(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function br(e,t,r){let i=Object.values(t);return i.find(a=>Aa(a,e))??r??i[0]}function Jl(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,i)=>`${r}-${i}`).replace(/\W+/gu,"-").toLowerCase()}function lo(e,t=1){return pi(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var ed=Date.now(),Sa=()=>`(+${Date.now()-ed}ms)`,ui=new Set,td=T(F("tacocat.debug",{},{metadata:!1}),!1);function ho(e){let t=`[${no}/${e}]`,r=(o,s,...c)=>o?!0:(a(s,...c),!1),i=td?(o,...s)=>{console.debug(`${t} ${o}`,...s,Sa())}:()=>{},a=(o,...s)=>{let c=`${t} ${o}`;ui.forEach(([l])=>l(c,...s))};return{assert:r,debug:i,error:a,warn:(o,...s)=>{let c=`${t} ${o}`;ui.forEach(([,l])=>l(c,...s))}}}function rd(e,t){let r=[e,t];return ui.add(r),()=>{ui.delete(r)}}rd((e,...t)=>{console.error(e,...t,Sa())},(e,...t)=>{console.warn(e,...t,Sa())});var id="no promo",po="promo-tag",ad="yellow",nd="neutral",od=(e,t,r)=>{let i=n=>n||id,a=r?` (was "${i(t)}")`:"";return`${i(e)}${a}`},sd="cancel-context",gi=(e,t)=>{let r=e===sd,i=!r&&e?.length>0,a=(i||r)&&(t&&t!=e||!t&&!r),n=a&&i||!a&&!!t,o=n?e||t:void 0;return{effectivePromoCode:o,overridenPromoCode:e,className:n?po:`${po} no-promo`,text:od(o,t,a),variant:n?ad:nd,isOverriden:a}};var Ca;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Ca||(Ca={}));var ve;(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"})(ve||(ve={}));var we;(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"})(we||(we={}));var Ta;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Ta||(Ta={}));var ka;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(ka||(ka={}));var _a;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(_a||(_a={}));var Pa;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Pa||(Pa={}));var La="ABM",Ma="PUF",Ra="M2M",Oa="PERPETUAL",Na="P3Y",cd="TAX_INCLUSIVE_DETAILS",ld="TAX_EXCLUSIVE",mo={ABM:La,PUF:Ma,M2M:Ra,PERPETUAL:Oa,P3Y:Na},Wp={[La]:{commitment:ve.YEAR,term:we.MONTHLY},[Ma]:{commitment:ve.YEAR,term:we.ANNUAL},[Ra]:{commitment:ve.MONTH,term:we.MONTHLY},[Oa]:{commitment:ve.PERPETUAL,term:void 0},[Na]:{commitment:ve.THREE_MONTHS,term:we.P3Y}},uo="Value is not an offer",yr=e=>{if(typeof e!="object")return uo;let{commitment:t,term:r}=e,i=dd(t,r);return{...e,planType:i}};var dd=(e,t)=>{switch(e){case void 0:return uo;case"":return"";case ve.YEAR:return t===we.MONTHLY?La:t===we.ANNUAL?Ma:"";case ve.MONTH:return t===we.MONTHLY?Ra:"";case ve.PERPETUAL:return Oa;case ve.TERM_LICENSE:return t===we.P3Y?Na:"";default:return""}};function go(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:i,priceWithoutTax:a,priceWithoutDiscountAndTax:n,taxDisplay:o}=t;if(o!==cd)return e;let s={...e,priceDetails:{...t,price:a??r,priceWithoutDiscount:n??i,taxDisplay:ld}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var fo={LOCAL:"local",PROD:"prod",STAGE:"stage"},Ia={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},za=new Set,Da=new Set,xo=new Map,vo={append({level:e,message:t,params:r,timestamp:i,source:a}){console[e](`${i}ms [${a}] %c${t}`,"font-weight: bold;",...r)}},bo={filter:({level:e})=>e!==Ia.DEBUG},hd={filter:()=>!1};function pd(e,t,r,i,a){return{level:e,message:t,namespace:r,get params(){return i.length===1&&hi(i[0])&&(i=i[0](),Array.isArray(i)||(i=[i])),i},source:a,timestamp:performance.now().toFixed(3)}}function md(e){[...Da].every(t=>t(e))&&za.forEach(t=>t(e))}function yo(e){let t=(xo.get(e)??0)+1;xo.set(e,t);let r=`${e} #${t}`,i={id:r,namespace:e,module:a=>yo(`${i.namespace}/${a}`),updateConfig:ci};return Object.values(Ia).forEach(a=>{i[a]=(n,...o)=>md(pd(a,n,e,o,r))}),Object.seal(i)}function fi(...e){e.forEach(t=>{let{append:r,filter:i}=t;hi(i)&&Da.add(i),hi(r)&&za.add(r)})}function ud(e={}){let{name:t}=e,r=T(F("commerce.debug",{search:!0,storage:!0}),t===fo.LOCAL);return fi(r?vo:bo),t===fo.PROD&&fi(aa),le}function gd(){za.clear(),Da.clear()}var le={...yo(ua),Level:Ia,Plugins:{consoleAppender:vo,debugFilter:bo,quietFilter:hd,lanaAppender:aa},init:ud,reset:gd,use:fi};var fd="mas-commerce-service",xd=le.module("utilities"),vd={requestId:xr,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function wr(e,{country:t,forceTaxExclusive:r}){let i;if(e.length<2)i=e;else{let a=t==="GB"?"EN":"MULT";e.sort((n,o)=>n.language===a?-1:o.language===a?1:0),e.sort((n,o)=>!n.term&&o.term?-1:n.term&&!o.term?1:0),i=[e[0]]}return r&&(i=i.map(go)),i}var wo=(e,t)=>{let r=e.reduce((i,a)=>i+(t(a)||0),0);return r>0?Math.round(r*100)/100:void 0};function $a(e){if(!e||e.length===0)return null;if(e.length===1)return e[0];let[t,...r]=e;for(let s of r){let c=[["commitment","commitment types"],["term","terms"],["priceDetails.formatString","currency formats"]];for(let[l,d]of c){let p=l.includes(".")?t.priceDetails?.formatString:t[l],u=l.includes(".")?s.priceDetails?.formatString:s[l];u!==p&&xd.warn(`Offers have different ${d}, summing may produce unexpected results`,{expected:p,actual:u})}}let i=[["price",s=>s.priceDetails?.price],["priceWithoutDiscount",s=>s.priceDetails?.priceWithoutDiscount],["priceWithoutTax",s=>s.priceDetails?.priceWithoutTax],["priceWithoutDiscountAndTax",s=>s.priceDetails?.priceWithoutDiscountAndTax]],a={};for(let[s,c]of i){let l=wo(e,c);l!==void 0&&(a[s]=l)}let n=e.some(s=>s.priceDetails?.annualized),o;if(n){let s=[["annualizedPrice",c=>c.priceDetails?.annualized?.annualizedPrice],["annualizedPriceWithoutTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutTax],["annualizedPriceWithoutDiscount",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscount],["annualizedPriceWithoutDiscountAndTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscountAndTax]];o={};for(let[c,l]of s){let d=wo(e,l);d!==void 0&&(o[c]=d)}}return{...t,offerSelectorIds:e.flatMap(s=>s.offerSelectorIds||[]),priceDetails:{...t.priceDetails,...a,...o&&{annualized:o}}}}var xi=e=>window.setTimeout(e);function Ot(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(lo).filter(vr);return r.length||(r=[t]),r}function vi(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(co)}function pe(){return document.getElementsByTagName(fd)?.[0]}function bi(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[i,a]of Object.entries(vd)){let n=r.get(a);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[i]=n)}return t}var Oe=class e extends Error{constructor(t,r,i){if(super(t,{cause:i}),this.name="MasError",r.response){let a=r.response.headers?.get(xr);a&&(r.requestId=a),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([i,a])=>`${i}: ${JSON.stringify(a)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` -Caused by: ${this.cause}`),r}};var bd={[Te]:ca,[qe]:la,[De]:da},yd={[Te]:ma,[De]:Lt},Er,je=class{constructor(t){w(this,Er);m(this,"changes",new Map);m(this,"connected",!1);m(this,"error");m(this,"log");m(this,"options");m(this,"promises",[]);m(this,"state",qe);m(this,"timer",null);m(this,"value");m(this,"version",0);m(this,"wrapperElement");this.wrapperElement=t,this.log=le.module("mas-element")}update(){[Te,qe,De].forEach(t=>{this.wrapperElement.classList.toggle(bd[t],t===this.state)})}notify(){(this.state===De||this.state===Te)&&(this.state===De?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===Te&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof Oe&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(yd[this.state],{bubbles:!0,composed:!0,detail:t}))}attributeChangedCallback(t,r,i){this.changes.set(t,i),this.requestUpdate()}connectedCallback(){y(this,Er,pe()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:i}=this;return De===i?Promise.resolve(this.wrapperElement):Te===i?Promise.reject(t):new Promise((a,n)=>{r.push({resolve:a,reject:n})})}toggleResolved(t,r,i){return t!==this.version?!1:(i!==void 0&&(this.options=i),this.state=De,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),xi(()=>this.notify()),!0)}toggleFailed(t,r,i){if(t!==this.version)return!1;i!==void 0&&(this.options=i),this.error=r,this.state=Te,this.update();let a=this.wrapperElement.getAttribute("is");return this.log?.error(`${a}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...h(this,Er)?.duration}),xi(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=qe,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!pe()||this.timer)return;let{error:r,options:i,state:a,value:n,version:o}=this;this.state=qe,this.timer=xi(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===qe&&this.version===o&&(this.state=a,this.error=r,this.value=n,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,i)}})}};Er=new WeakMap;function Eo(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function yi(e,t={}){let{tag:r,is:i}=e,a=document.createElement(r,{is:i});return a.setAttribute("is",i),Object.assign(a.dataset,Eo(t)),a}function Ao(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Eo(t)),e):null}var wd=/[0-9\-+#]/,Ed=/[^\d\-+#]/g;function So(e){return e.search(wd)}function Ad(e="#.##"){let t={},r=e.length,i=So(e);t.prefix=i>0?e.substring(0,i):"";let a=So(e.split("").reverse().join("")),n=r-a,o=e.substring(n,n+1),s=n+(o==="."||o===","?1:0);t.suffix=a>0?e.substring(s,r):"",t.mask=e.substring(i,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(Ed);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 Sd(e,t,r){let i=!1,a={value:e};e<0&&(i=!0,a.value=-a.value),a.sign=i?"-":"",a.value=Number(a.value).toFixed(t.fraction&&t.fraction.length),a.value=Number(a.value).toString();let n=t.fraction&&t.fraction.lastIndexOf("0"),[o="0",s=""]=a.value.split(".");return(!s||s&&s.length<=n)&&(s=n<0?"":(+("0."+s)).toFixed(n+1).replace("0.","")),a.integer=o,a.fraction=s,Cd(a,t),(a.result==="0"||a.result==="")&&(i=!1,a.sign=""),!i&&t.maskHasPositiveSign?a.sign="+":i&&t.maskHasPositiveSign?a.sign="-":i&&(a.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),a}function Cd(e,t){e.result="";let r=t.integer.split(t.separator),i=r.join(""),a=i&&i.indexOf("0");if(a>-1)for(;e.integer.lengthe*12,dt=(e,t,r=1)=>{if(!e)return!1;let{start:i,end:a,displaySummary:{amount:n,duration:o,minProductQuantity:s=1,outcomeType:c}={}}=e;if(!(n&&o&&c)||r=d&&l<=p},lt={MONTH:"MONTH",YEAR:"YEAR"},_d={[ye.ANNUAL]:12,[ye.MONTHLY]:1,[ye.THREE_YEARS]:36,[ye.TWO_YEARS]:24},Ba=(e,t)=>({accept:e,round:t}),Pd=[Ba(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Ba(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Ba(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Fa={[rt.YEAR]:{[ye.MONTHLY]:lt.MONTH,[ye.ANNUAL]:lt.YEAR},[rt.MONTH]:{[ye.MONTHLY]:lt.MONTH}},Ld=(e,t)=>e.indexOf(`'${t}'`)===0,Md=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),i=Mo(r);return!!i?t||(r=r.replace(/[,\.]0+/,i)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Od(e)),r},Rd=e=>{let t=Nd(e),r=Ld(e,t),i=e.replace(/'.*?'/,""),a=_o.test(i)||Po.test(i);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:a}},Lo=e=>e.replace(_o,ko).replace(Po,ko),Od=e=>e.match(/#(.?)#/)?.[1]===To?kd:To,Nd=e=>e.match(/'(.*?)'/)?.[1]??"",Mo=e=>e.match(/0(.?)0/)?.[1]??"";function Nt({formatString:e,price:t,usePrecision:r,isIndianPrice:i=!1},a,n=o=>o){let{currencySymbol:o,isCurrencyFirst:s,hasCurrencySpace:c}=Rd(e),l=r?Mo(e):"",d=Md(e,r),p=r?2:0,u=n(t,{currencySymbol:o}),f=i?u.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):Co(d,u),x=r?f.lastIndexOf(l):f.length,v=f.substring(0,x),S=f.substring(x+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,f).replace(/SYMBOL/,o),currencySymbol:o,decimals:S,decimalsDelimiter:l,hasCurrencySpace:c,integer:v,isCurrencyFirst:s,recurrenceTerm:a}}var Ro=e=>{let{commitment:t,term:r,usePrecision:i}=e,a=_d[r]??1;return Nt(e,a>1?lt.MONTH:Fa[t]?.[r],n=>{let o={divisor:a,price:n,usePrecision:i},{round:s}=Pd.find(({accept:c})=>c(o));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(o)}`);return s(o)})},Oo=({commitment:e,term:t,...r})=>Nt(r,Fa[e]?.[t]),No=e=>{let{commitment:t,instant:r,price:i,originalPrice:a,priceWithoutDiscount:n,promotion:o,quantity:s=1,term:c}=e;if(t===rt.YEAR&&c===ye.MONTHLY){if(!o)return Nt(e,lt.YEAR,Ha);let{displaySummary:{outcomeType:l,duration:d}={}}=o;switch(l){case"PERCENTAGE_DISCOUNT":if(dt(o,r,s)){let p=parseInt(d.replace("P","").replace("M",""));if(isNaN(p))return Ha(i);let u=a*p,f=n*(12-p),x=Math.round((u+f)*100)/100;return Nt({...e,price:x},lt.YEAR)}default:return Nt(e,lt.YEAR,()=>Ha(n??i))}}return Nt(e,Fa[t]?.[c])};var Io="download",zo="upgrade",Do={e:"EDU",t:"TEAM"};function wi(e,t={},r=""){let i=pe();if(!i)return null;let{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:f,extraOptions:x,analyticsId:v}=i.collectCheckoutOptions(t),S=yi(e,{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:f,extraOptions:x,analyticsId:v});return r&&(S.innerHTML=`${r}`),S}function Ei(e){return class extends e{constructor(){super(...arguments);m(this,"checkoutActionHandler");m(this,"masElement",new je(this))}attributeChangedCallback(i,a,n){this.masElement.attributeChangedCallback(i,a,n)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get marketSegment(){let i=this.options?.ms??this.value?.[0].marketSegments?.[0];return Do[i]??i}get customerSegment(){let i=this.options?.cs??this.value?.[0]?.customerSegment;return Do[i]??i}get is3in1Modal(){return Object.values(ot).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let i=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!i||i.content!=="off")}requestUpdate(i=!1){return this.masElement.requestUpdate(i)}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"]}async render(i={}){let a=pe();if(!a)return!1;this.dataset.imsCountry||a.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)}),i.imsCountry=null;let n=a.collectCheckoutOptions(i,this);if(!n.wcsOsi.length)return!1;let o;try{o=JSON.parse(n.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(n);this.setCheckoutUrl("");let c=a.resolveOfferSelectors(n),l=await Promise.all(c);l=l.map(f=>wr(f,n));let d=l.flat().find(f=>f.promotion);!dt(d?.promotion,d?.promotion?.displaySummary?.instant,n.quantity[0])&&n.promotionCode&&delete n.promotionCode,n.country=this.dataset.imsCountry||n.country;let u=await a.buildCheckoutAction?.(l.flat(),{...o,...n},this);return this.renderOffers(l.flat(),n,{},u,s)}renderOffers(i,a,n={},o=void 0,s=void 0){let c=pe();if(!c)return!1;if(a={...JSON.parse(this.dataset.extraOptions??"{}"),...a,...n},s??(s=this.masElement.togglePending(a)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),o){this.classList.remove(Io,zo),this.masElement.toggleResolved(s,i,a);let{url:d,text:p,className:u,handler:f}=o;d&&this.setCheckoutUrl(d),p&&(this.firstElementChild.innerHTML=p),u&&this.classList.add(...u.split(" ")),f&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=f.bind(this))}if(i.length){if(this.masElement.toggleResolved(s,i,a)){if(!this.classList.contains(Io)&&!this.classList.contains(zo)){let d=c.buildCheckoutURL(i,a);this.setCheckoutUrl(a.modal==="true"?"#":d)}return!0}}else{let d=new Error(`Not provided: ${a?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,d,a))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(i){}updateOptions(i={}){let a=pe();if(!a)return!1;let{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:f,wcsOsi:x}=a.collectCheckoutOptions(i);return Ao(this,{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:f,wcsOsi:x}),!0}}}var Ar=class Ar extends Ei(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return wi(Ar,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};m(Ar,"is","checkout-link"),m(Ar,"tag","a");var $e=Ar;window.customElements.get($e.is)||window.customElements.define($e.is,$e,{extends:$e.tag});var Id="p_draft_landscape",zd="/store/",Dd=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),Ua=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),$d=["env","workflowStep","clientId","country"],$o=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype","mv","mv2"]),Ho=e=>Dd.get(e)??e;function Ai(e,t,r){for(let[i,a]of Object.entries(e)){let n=Ho(i);a!=null&&r.has(n)&&t.set(n,a)}}function Hd(e){switch(e){case ya.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Bd(e,t){for(let r in e){let i=e[r];for(let[a,n]of Object.entries(i)){if(n==null)continue;let o=Ho(a);t.set(`items[${r}][${o}]`,n)}}}function Fd({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let i=e.searchParams.get("af");return e.searchParams.set("af",[i,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===ot.CRM?"creative":"mini_plans"),e}function Ud(e){let t=new URLSearchParams(window.location.search),r={};$o.forEach(i=>{let a=t.get(i);a!==null&&(r[i]=a)}),Object.keys(r).length>0&&Ai(r,e.searchParams,$o)}function Bo(e){Gd(e);let{env:t,items:r,workflowStep:i,marketSegment:a,customerSegment:n,offerType:o,productArrangementCode:s,landscape:c,modal:l,is3in1:d,preselectPlan:p,...u}=e,f=new URL(Hd(t));if(f.pathname=`${zd}${i}`,i!==ce.SEGMENTATION&&i!==ce.CHANGE_PLAN_TEAM_PLANS&&Bd(r,f.searchParams),Ai({...u},f.searchParams,Ua),Ud(f),c===Ve.DRAFT&&Ai({af:Id},f.searchParams,Ua),i===ce.SEGMENTATION){let x={marketSegment:a,offerType:o,customerSegment:n,productArrangementCode:s,quantity:r?.[0]?.quantity,addonProductArrangementCode:s?r?.find(v=>v.productArrangementCode!==s)?.productArrangementCode:r?.[1]?.productArrangementCode};p?.toLowerCase()==="edu"?f.searchParams.set("ms","EDU"):p?.toLowerCase()==="team"&&f.searchParams.set("cs","TEAM"),Ai(x,f.searchParams,Ua),f.searchParams.get("ot")==="PROMOTION"&&f.searchParams.delete("ot"),f=Fd({url:f,modal:l,is3in1:d})}return f.toString()}function Gd(e){for(let t of $d)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);if(e.workflowStep!==ce.SEGMENTATION&&e.workflowStep!==ce.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}var N=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:ce.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:Re.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Ve.PUBLISHED});function Fo({settings:e,providers:t}){function r(n,o){let{checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:f,env:x}=e,v={checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:f,env:x};if(o)for(let Tt of t.checkout)Tt(o,v);let{checkoutMarketSegment:S,checkoutWorkflowStep:z=c,imsCountry:I,country:C=I??l,language:O=d,quantity:K=u,entitlement:q,upgrade:Q,modal:ee,perpetual:de,promotionCode:ie=p,wcsOsi:W,extraOptions:$,...he}=Object.assign(v,o?.dataset??{},n??{}),be=br(z,ce,N.checkoutWorkflowStep);return v=mi({...he,extraOptions:$,checkoutClientId:s,checkoutMarketSegment:S,country:C,quantity:Ot(K,N.quantity),checkoutWorkflowStep:be,language:O,entitlement:T(q),upgrade:T(Q),modal:ee,perpetual:T(de),promotionCode:gi(ie).effectivePromoCode,wcsOsi:vi(W),preselectPlan:f}),v}function i(n,o){if(!Array.isArray(n)||!n.length||!o)return"";let{env:s,landscape:c}=e,{checkoutClientId:l,checkoutMarketSegment:d,checkoutWorkflowStep:p,country:u,promotionCode:f,quantity:x,preselectPlan:v,ms:S,cs:z,...I}=r(o),C=document.querySelector("meta[name=mas-ff-3in1]"),O=Object.values(ot).includes(o.modal)&&(!C||C.content!=="off"),K=window.frameElement||O?"if":"fp",[{productArrangementCode:q,marketSegments:[Q],customerSegment:ee,offerType:de}]=n,ie=S??Q??d,W=z??ee;v?.toLowerCase()==="edu"?ie="EDU":v?.toLowerCase()==="team"&&(W="TEAM");let $={is3in1:O,checkoutPromoCode:f,clientId:l,context:K,country:u,env:s,items:[],marketSegment:ie,customerSegment:W,offerType:de,productArrangementCode:q,workflowStep:p,landscape:c,...I},he=x[0]>1?x[0]:void 0;if(n.length===1){let{offerId:be}=n[0];$.items.push({id:be,quantity:he})}else $.items.push(...n.map(({offerId:be,productArrangementCode:Tt})=>({id:be,quantity:he,...O?{productArrangementCode:Tt}:{}})));return Bo($)}let{createCheckoutLink:a}=$e;return{CheckoutLink:$e,CheckoutWorkflowStep:ce,buildCheckoutURL:i,collectCheckoutOptions:r,createCheckoutLink:a}}function qd({interval:e=200,maxAttempts:t=25}={}){let r=le.module("ims");return new Promise(i=>{r.debug("Waing for IMS to be ready");let a=0;function n(){window.adobeIMS?.initialized?i():++a>t?(r.debug("Timeout"),i()):setTimeout(n,e)}n()})}function Vd(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function jd(e){let t=le.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:i})=>(t.debug("Got user country:",i),i),i=>{t.error("Unable to get user country:",i)}):null)}function Uo({}){let e=qd(),t=Vd(e),r=jd(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var Go=window.masPriceLiterals;function qo(e){if(Array.isArray(Go)){let t=e.locale==="id_ID"?"in":e.language,r=a=>Go.find(n=>Aa(n.lang,a)),i=r(t)??r(N.language);if(i)return Object.freeze(i)}return{}}var Ga=function(e,t){return Ga=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},Ga(e,t)};function Sr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ga(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var L=function(){return L=Object.assign||function(t){for(var r,i=1,a=arguments.length;i0}),r=[],i=0,a=t;i1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Xd,function(c,l,d,p,u,f){if(l)t.minimumIntegerDigits=d.length;else{if(p&&u)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(es.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Xo.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Xo,function(c,l,d,p,u,f){return d==="*"?t.minimumFractionDigits=l.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:u&&f?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var n=a.options[0];n==="w"?t=L(L({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=L(L({},t),Ko(n)));continue}if(Jo.test(a.stem)){t=L(L({},t),Ko(a.stem));continue}var o=ts(a.stem);o&&(t=L(L({},t),o));var s=Kd(a.stem);s&&(t=L(L({},t),s))}return t}var Tr={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function is(e,t){for(var r="",i=0;i>1),c="a",l=Qd(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;o-- >0;)r=l+r}else a==="J"?r+="H":r+=a}return r}function Qd(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,i;r!=="root"&&(i=e.maximize().region);var a=Tr[i||""]||Tr[r||""]||Tr["".concat(r,"-001")]||Tr["001"];return a[0]}var ja,Zd=new RegExp("^".concat(Va.source,"*")),Jd=new RegExp("".concat(Va.source,"*$"));function M(e,t){return{start:e,end:t}}var eh=!!String.prototype.startsWith,th=!!String.fromCodePoint,rh=!!Object.fromEntries,ih=!!String.prototype.codePointAt,ah=!!String.prototype.trimStart,nh=!!String.prototype.trimEnd,oh=!!Number.isSafeInteger,sh=oh?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ya=!0;try{as=cs("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ya=((ja=as.exec("a"))===null||ja===void 0?void 0:ja[0])==="a"}catch{Ya=!1}var as,ns=eh?function(t,r,i){return t.startsWith(r,i)}:function(t,r,i){return t.slice(i,i+r.length)===r},Xa=th?String.fromCodePoint:function(){for(var t=[],r=0;rn;){if(o=t[n++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},os=rh?Object.fromEntries:function(t){for(var r={},i=0,a=t;i=i)){var a=t.charCodeAt(r),n;return a<55296||a>56319||r+1===i||(n=t.charCodeAt(r+1))<56320||n>57343?a:(a-55296<<10)+(n-56320)+65536}},ch=ah?function(t){return t.trimStart()}:function(t){return t.replace(Zd,"")},lh=nh?function(t){return t.trimEnd()}:function(t){return t.replace(Jd,"")};function cs(e,t){return new RegExp(e,t)}var Ka;Ya?(Wa=cs("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ka=function(t,r){var i;Wa.lastIndex=r;var a=Wa.exec(t);return(i=a[1])!==null&&i!==void 0?i:""}):Ka=function(t,r){for(var i=[];;){var a=ss(t,r);if(a===void 0||ds(a)||ph(a))break;i.push(a),r+=a>=65536?2:1}return Xa.apply(void 0,i)};var Wa,ls=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.locale=r.locale,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,i){for(var a=[];!this.isEOF();){var n=this.char();if(n===123){var o=this.parseArgument(t,i);if(o.err)return o;a.push(o.val)}else{if(n===125&&t>0)break;if(n===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),a.push({type:V.pound,location:M(s,this.clonePosition())})}else if(n===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(k.UNMATCHED_CLOSING_TAG,M(this.clonePosition(),this.clonePosition()))}else if(n===60&&!this.ignoreTag&&Qa(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;a.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;a.push(o.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var i=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:V.literal,value:"<".concat(a,"/>"),location:M(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var n=this.parseMessage(t+1,r,!0);if(n.err)return n;var o=n.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:V.tag,value:a,children:o,location:M(i,this.clonePosition())},err:null}:this.error(k.INVALID_TAG,M(s,this.clonePosition())))}else return this.error(k.UNCLOSED_TAG,M(i,this.clonePosition()))}else return this.error(k.INVALID_TAG,M(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&hh(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var i=this.clonePosition(),a="";;){var n=this.tryParseQuote(r);if(n){a+=n;continue}var o=this.tryParseUnquoted(t,r);if(o){a+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){a+=s;continue}break}var c=M(i,this.clonePosition());return{val:{type:V.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!dh(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 i=this.char();if(i===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(i);this.bump()}return Xa.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(r==="plural"||r==="selectordinal")||i===125&&t>0?null:(this.bump(),Xa(i))},e.prototype.parseArgument=function(t,r){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(k.EMPTY_ARGUMENT,M(i,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(k.MALFORMED_ARGUMENT,M(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:V.argument,value:a,location:M(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(i,this.clonePosition())):this.parseArgumentOptions(t,r,a,i);default:return this.error(k.MALFORMED_ARGUMENT,M(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),i=Ka(this.message,r),a=r+i.length;this.bumpTo(a);var n=this.clonePosition(),o=M(t,n);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,r,i,a){var n,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(k.EXPECT_ARGUMENT_TYPE,M(o,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var u=lh(p.val);if(u.length===0)return this.error(k.EXPECT_ARGUMENT_STYLE,M(this.clonePosition(),this.clonePosition()));var f=M(d,this.clonePosition());l={style:u,styleLocation:f}}var x=this.tryParseArgumentClose(a);if(x.err)return x;var v=M(a,this.clonePosition());if(l&&ns(l?.style,"::",0)){var S=ch(l.style.slice(2));if(s==="number"){var p=this.parseNumberSkeletonFromString(S,l.styleLocation);return p.err?p:{val:{type:V.number,value:i,location:v,style:p.val},err:null}}else{if(S.length===0)return this.error(k.EXPECT_DATE_TIME_SKELETON,v);var z=S;this.locale&&(z=is(S,this.locale));var u={type:ht.dateTime,pattern:z,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Wo(z):{}},I=s==="date"?V.date:V.time;return{val:{type:I,value:i,location:v,style:u},err:null}}}return{val:{type:s==="number"?V.number:s==="date"?V.date:V.time,value:i,location:v,style:(n=l?.style)!==null&&n!==void 0?n:null},err:null}}case"plural":case"selectordinal":case"select":{var C=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(k.EXPECT_SELECT_ARGUMENT_OPTIONS,M(C,L({},C)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),K=0;if(s!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(k.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,M(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(k.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,k.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),O=this.parseIdentifierIfPossible(),K=p.val}var q=this.tryParsePluralOrSelectOptions(t,s,r,O);if(q.err)return q;var x=this.tryParseArgumentClose(a);if(x.err)return x;var Q=M(a,this.clonePosition());return s==="select"?{val:{type:V.select,value:i,options:os(q.val),location:Q},err:null}:{val:{type:V.plural,value:i,options:os(q.val),offset:K,pluralType:s==="plural"?"cardinal":"ordinal",location:Q},err:null}}default:return this.error(k.INVALID_ARGUMENT_TYPE,M(o,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(k.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,M(a,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 i=[];try{i=Zo(t)}catch{return this.error(k.INVALID_NUMBER_SKELETON,r)}return{val:{type:ht.number,tokens:i,location:r,parsedOptions:this.shouldParseSkeletons?rs(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,i,a){for(var n,o=!1,s=[],c=new Set,l=a.value,d=a.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(k.EXPECT_PLURAL_ARGUMENT_SELECTOR,k.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;d=M(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?k.DUPLICATE_SELECT_ARGUMENT_SELECTOR:k.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?k.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:k.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,M(this.clonePosition(),this.clonePosition()));var x=this.parseMessage(t+1,r,i);if(x.err)return x;var v=this.tryParseArgumentClose(f);if(v.err)return v;s.push([l,{value:x.val,location:M(f,this.clonePosition())}]),c.add(l),this.bumpSpace(),n=this.parseIdentifierIfPossible(),l=n.value,d=n.location}return s.length===0?this.error(r==="select"?k.EXPECT_SELECT_ARGUMENT_SELECTOR:k.EXPECT_PLURAL_ARGUMENT_SELECTOR,M(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(k.MISSING_OTHER_CLAUSE,M(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var i=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var n=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)n=!0,o=o*10+(s-48),this.bump();else break}var c=M(a,this.clonePosition());return n?(o*=i,sh(o)?{val:o,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=ss(this.message,t);if(r===void 0)throw Error("Offset ".concat(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(ns(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ds(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),i=this.message.charCodeAt(r+(t>=65536?2:1));return i??null},e}();function Qa(e){return e>=97&&e<=122||e>=65&&e<=90}function dh(e){return Qa(e)||e===47}function hh(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 ds(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ph(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 Za(e){e.forEach(function(t){if(delete t.location,_i(t)||Pi(t))for(var r in t.options)delete t.options[r].location,Za(t.options[r].value);else Ci(t)&&Mi(t.style)||(Ti(t)||ki(t))&&Cr(t.style)?delete t.style.location:Li(t)&&Za(t.children)})}function hs(e,t){t===void 0&&(t={}),t=L({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new ls(e,t).parse();if(r.err){var i=SyntaxError(k[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return t?.captureLocation||Za(r.val),r.val}function kr(e,t){var r=t&&t.cache?t.cache:vh,i=t&&t.serializer?t.serializer:xh,a=t&&t.strategy?t.strategy:uh;return a(e,{cache:r,serializer:i})}function mh(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ps(e,t,r,i){var a=mh(i)?i:r(i),n=t.get(a);return typeof n>"u"&&(n=e.call(this,i),t.set(a,n)),n}function ms(e,t,r){var i=Array.prototype.slice.call(arguments,3),a=r(i),n=t.get(a);return typeof n>"u"&&(n=e.apply(this,i),t.set(a,n)),n}function Ja(e,t,r,i,a){return r.bind(t,e,i,a)}function uh(e,t){var r=e.length===1?ps:ms;return Ja(e,this,r,t.cache.create(),t.serializer)}function gh(e,t){return Ja(e,this,ms,t.cache.create(),t.serializer)}function fh(e,t){return Ja(e,this,ps,t.cache.create(),t.serializer)}var xh=function(){return JSON.stringify(arguments)};function en(){this.cache=Object.create(null)}en.prototype.get=function(e){return this.cache[e]};en.prototype.set=function(e,t){this.cache[e]=t};var vh={create:function(){return new en}},Ri={variadic:gh,monadic:fh};var pt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(pt||(pt={}));var _r=function(e){Sr(t,e);function t(r,i,a){var n=e.call(this,r)||this;return n.code=i,n.originalMessage=a,n}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var tn=function(e){Sr(t,e);function t(r,i,a,n){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(i,'". Options are "').concat(Object.keys(a).join('", "'),'"'),pt.INVALID_VALUE,n)||this}return t}(_r);var us=function(e){Sr(t,e);function t(r,i,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(i),pt.INVALID_VALUE,a)||this}return t}(_r);var gs=function(e){Sr(t,e);function t(r,i){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(i,'"'),pt.MISSING_VALUE,i)||this}return t}(_r);var se;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(se||(se={}));function bh(e){return e.length<2?e:e.reduce(function(t,r){var i=t[t.length-1];return!i||i.type!==se.literal||r.type!==se.literal?t.push(r):i.value+=r.value,t},[])}function yh(e){return typeof e=="function"}function Pr(e,t,r,i,a,n,o){if(e.length===1&&qa(e[0]))return[{type:se.literal,value:e[0].value}];for(var s=[],c=0,l=e;c{l!=null&&(Rl(l)?i:a).push(l)}),i.length&&(n+=" "+i.map(ro).join(" "));let{pathname:o,search:s}=window.location,c=`${tt.delimiter}page=${o}${s}`;c.length>to&&(c=`${c.slice(0,to)}`),n+=c,a.length&&(n+=`${tt.delimiter}facts=`,n+=JSON.stringify(a,Ol)),window.lana?.log(n,tt)}};function ci(e){Object.assign(tt,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in tt&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Ea={};Jn(Ea,{CLASS_NAME_FAILED:()=>ca,CLASS_NAME_HIDDEN:()=>Il,CLASS_NAME_PENDING:()=>la,CLASS_NAME_RESOLVED:()=>da,CheckoutWorkflow:()=>ao,CheckoutWorkflowStep:()=>ce,Commitment:()=>rt,ERROR_MESSAGE_BAD_REQUEST:()=>ha,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>Vl,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>pa,EVENT_AEM_ERROR:()=>nt,EVENT_AEM_LOAD:()=>at,EVENT_MAS_ERROR:()=>sa,EVENT_MAS_READY:()=>fr,EVENT_MERCH_ADDON_AND_QUANTITY_UPDATE:()=>di,EVENT_MERCH_CARD_ACTION_MENU_TOGGLE:()=>na,EVENT_MERCH_CARD_COLLECTION_LITERALS_CHANGED:()=>it,EVENT_MERCH_CARD_COLLECTION_SHOWMORE:()=>Gl,EVENT_MERCH_CARD_COLLECTION_SIDENAV_ATTACHED:()=>Ul,EVENT_MERCH_CARD_COLLECTION_SORT:()=>Fl,EVENT_MERCH_CARD_QUANTITY_CHANGE:()=>Pt,EVENT_MERCH_OFFER_READY:()=>_t,EVENT_MERCH_OFFER_SELECT_READY:()=>gr,EVENT_MERCH_QUANTITY_SELECTOR_CHANGE:()=>te,EVENT_MERCH_SEARCH_CHANGE:()=>Bl,EVENT_MERCH_SIDENAV_SELECT:()=>ql,EVENT_MERCH_STOCK_CHANGE:()=>$l,EVENT_MERCH_STORAGE_CHANGE:()=>Hl,EVENT_OFFER_SELECTED:()=>oa,EVENT_TYPE_FAILED:()=>ma,EVENT_TYPE_READY:()=>li,EVENT_TYPE_RESOLVED:()=>Lt,Env:()=>Re,FF_ANNUAL_PRICE:()=>Mt,FF_DEFAULTS:()=>ke,HEADER_X_REQUEST_ID:()=>vr,LOG_NAMESPACE:()=>ua,Landscape:()=>Ve,MARK_DURATION_SUFFIX:()=>ct,MARK_START_SUFFIX:()=>st,MODAL_TYPE_3_IN_1:()=>ot,NAMESPACE:()=>Nl,PARAM_AOS_API_KEY:()=>jl,PARAM_ENV:()=>fa,PARAM_LANDSCAPE:()=>va,PARAM_MAS_PREVIEW:()=>ga,PARAM_WCS_API_KEY:()=>Wl,PROVIDER_ENVIRONMENT:()=>ya,SELECTOR_MAS_CHECKOUT_LINK:()=>Ce,SELECTOR_MAS_ELEMENT:()=>ur,SELECTOR_MAS_INLINE_PRICE:()=>D,SELECTOR_MAS_SP_BUTTON:()=>Dl,SELECTOR_MAS_UPT_LINK:()=>io,SORT_ORDER:()=>Ql,STATE_FAILED:()=>Te,STATE_PENDING:()=>qe,STATE_RESOLVED:()=>De,SUPPORTED_COUNTRIES:()=>wa,TAG_NAME_SERVICE:()=>zl,TEMPLATE_PRICE:()=>Yl,TEMPLATE_PRICE_ANNUAL:()=>Kl,TEMPLATE_PRICE_LEGAL:()=>ve,TEMPLATE_PRICE_STRIKETHROUGH:()=>Xl,Term:()=>ye,WCS_PROD_URL:()=>xa,WCS_STAGE_URL:()=>ba});var rt=Object.freeze({MONTH:"MONTH",YEAR:"YEAR",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",PERPETUAL:"PERPETUAL",TERM_LICENSE:"TERM_LICENSE",ACCESS_PASS:"ACCESS_PASS",THREE_MONTHS:"THREE_MONTHS",SIX_MONTHS:"SIX_MONTHS"}),ye=Object.freeze({ANNUAL:"ANNUAL",MONTHLY:"MONTHLY",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",P1D:"P1D",P1Y:"P1Y",P3Y:"P3Y",P10Y:"P10Y",P15Y:"P15Y",P3D:"P3D",P7D:"P7D",P30D:"P30D",HALF_YEARLY:"HALF_YEARLY",QUARTERLY:"QUARTERLY"}),Nl="merch",Il="hidden",li="wcms:commerce:ready",zl="mas-commerce-service",D='span[is="inline-price"][data-wcs-osi]',Ce='a[is="checkout-link"][data-wcs-osi],button[is="checkout-button"][data-wcs-osi]',Dl="sp-button[data-wcs-osi]",io='a[is="upt-link"]',ur=`${D},${Ce},${io}`,_t="merch-offer:ready",gr="merch-offer-select:ready",na="merch-card:action-menu-toggle",oa="merch-offer:selected",$l="merch-stock:change",Hl="merch-storage:change",te="merch-quantity-selector:change",Pt="merch-card-quantity:change",di="merch-modal:addon-and-quantity-update",Bl="merch-search:change",Fl="merch-card-collection:sort",it="merch-card-collection:literals-changed",Ul="merch-card-collection:sidenav-attached",Gl="merch-card-collection:showmore",ql="merch-sidenav:select",at="aem:load",nt="aem:error",fr="mas:ready",sa="mas:error",ca="placeholder-failed",la="placeholder-pending",da="placeholder-resolved",ha="Bad WCS request",pa="Commerce offer not found",Vl="Literals URL not provided",ma="mas:failed",Lt="mas:resolved",ua="mas/commerce",ga="mas.preview",fa="commerce.env",va="commerce.landscape",jl="commerce.aosKey",Wl="commerce.wcsKey",xa="https://www.adobe.com/web_commerce_artifact",ba="https://www.stage.adobe.com/web_commerce_artifact_stage",Te="failed",qe="pending",De="resolved",Ve={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"},vr="X-Request-Id",ce=Object.freeze({SEGMENTATION:"segmentation",BUNDLE:"bundle",COMMITMENT:"commitment",RECOMMENDATION:"recommendation",EMAIL:"email",PAYMENT:"payment",CHANGE_PLAN_TEAM_PLANS:"change-plan/team-upgrade/plans",CHANGE_PLAN_TEAM_PAYMENT:"change-plan/team-upgrade/payment"}),ao="UCv3",Re=Object.freeze({STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"}),ya={PRODUCTION:"PRODUCTION"},ot={TWP:"twp",D2P:"d2p",CRM:"crm"},st=":start",ct=":duration",Yl="price",Xl="price-strikethrough",Kl="annual",ve="legal",ke="mas-ff-defaults",Mt="mas-ff-annual-price",Ql={alphabetical:"alphabetical",authored:"authored"},wa=["AE","AM","AR","AT","AU","AZ","BB","BD","BE","BG","BH","BO","BR","BS","BY","CA","CH","CL","CN","CO","CR","CY","CZ","DE","DK","DO","DZ","EC","EE","EG","ES","FI","FR","GB","GE","GH","GR","GT","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JO","JP","KE","KG","KR","KW","KZ","LA","LB","LK","LT","LU","LV","MA","MD","MO","MT","MU","MX","MY","NG","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RO","RS","RU","SA","SE","SG","SI","SK","SV","TH","TJ","TM","TN","TR","TT","TW","TZ","UA","US","UY","UZ","VE","VN","YE","ZA"];var no="tacocat.js";var Aa=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),oo=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function F(e,t={},{metadata:r=!0,search:i=!0,storage:a=!0}={}){let n;if(i&&n==null){let o=new URLSearchParams(window.location.search),s=Rt(i)?i:e;n=o.get(s)}if(a&&n==null){let o=Rt(a)?a:e;n=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(r&&n==null){let o=Jl(Rt(r)?r:e);n=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return n??t[e]}var Zl=e=>typeof e=="boolean",hi=e=>typeof e=="function",pi=e=>typeof e=="number",so=e=>e!=null&&typeof e=="object";var Rt=e=>typeof e=="string",co=e=>Rt(e)&&e,xr=e=>pi(e)&&Number.isFinite(e)&&e>0;function mi(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,i])=>{t(i)&&delete e[r]}),e}function T(e,t){if(Zl(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function br(e,t,r){let i=Object.values(t);return i.find(a=>Aa(a,e))??r??i[0]}function Jl(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,i)=>`${r}-${i}`).replace(/\W+/gu,"-").toLowerCase()}function lo(e,t=1){return pi(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var ed=Date.now(),Sa=()=>`(+${Date.now()-ed}ms)`,ui=new Set,td=T(F("tacocat.debug",{},{metadata:!1}),!1);function ho(e){let t=`[${no}/${e}]`,r=(o,s,...c)=>o?!0:(a(s,...c),!1),i=td?(o,...s)=>{console.debug(`${t} ${o}`,...s,Sa())}:()=>{},a=(o,...s)=>{let c=`${t} ${o}`;ui.forEach(([l])=>l(c,...s))};return{assert:r,debug:i,error:a,warn:(o,...s)=>{let c=`${t} ${o}`;ui.forEach(([,l])=>l(c,...s))}}}function rd(e,t){let r=[e,t];return ui.add(r),()=>{ui.delete(r)}}rd((e,...t)=>{console.error(e,...t,Sa())},(e,...t)=>{console.warn(e,...t,Sa())});var id="no promo",po="promo-tag",ad="yellow",nd="neutral",od=(e,t,r)=>{let i=n=>n||id,a=r?` (was "${i(t)}")`:"";return`${i(e)}${a}`},sd="cancel-context",gi=(e,t)=>{let r=e===sd,i=!r&&e?.length>0,a=(i||r)&&(t&&t!=e||!t&&!r),n=a&&i||!a&&!!t,o=n?e||t:void 0;return{effectivePromoCode:o,overridenPromoCode:e,className:n?po:`${po} no-promo`,text:od(o,t,a),variant:n?ad:nd,isOverriden:a}};var Ca;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(Ca||(Ca={}));var xe;(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"})(xe||(xe={}));var we;(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"})(we||(we={}));var Ta;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(Ta||(Ta={}));var ka;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(ka||(ka={}));var _a;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(_a||(_a={}));var Pa;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(Pa||(Pa={}));var La="ABM",Ma="PUF",Ra="M2M",Oa="PERPETUAL",Na="P3Y",cd="TAX_INCLUSIVE_DETAILS",ld="TAX_EXCLUSIVE",mo={ABM:La,PUF:Ma,M2M:Ra,PERPETUAL:Oa,P3Y:Na},Yp={[La]:{commitment:xe.YEAR,term:we.MONTHLY},[Ma]:{commitment:xe.YEAR,term:we.ANNUAL},[Ra]:{commitment:xe.MONTH,term:we.MONTHLY},[Oa]:{commitment:xe.PERPETUAL,term:void 0},[Na]:{commitment:xe.THREE_MONTHS,term:we.P3Y}},uo="Value is not an offer",yr=e=>{if(typeof e!="object")return uo;let{commitment:t,term:r}=e,i=dd(t,r);return{...e,planType:i}};var dd=(e,t)=>{switch(e){case void 0:return uo;case"":return"";case xe.YEAR:return t===we.MONTHLY?La:t===we.ANNUAL?Ma:"";case xe.MONTH:return t===we.MONTHLY?Ra:"";case xe.PERPETUAL:return Oa;case xe.TERM_LICENSE:return t===we.P3Y?Na:"";default:return""}};function go(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:i,priceWithoutTax:a,priceWithoutDiscountAndTax:n,taxDisplay:o}=t;if(o!==cd)return e;let s={...e,priceDetails:{...t,price:a??r,priceWithoutDiscount:n??i,taxDisplay:ld}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var fo={LOCAL:"local",PROD:"prod",STAGE:"stage"},Ia={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},za=new Set,Da=new Set,vo=new Map,xo={append({level:e,message:t,params:r,timestamp:i,source:a}){console[e](`${i}ms [${a}] %c${t}`,"font-weight: bold;",...r)}},bo={filter:({level:e})=>e!==Ia.DEBUG},hd={filter:()=>!1};function pd(e,t,r,i,a){return{level:e,message:t,namespace:r,get params(){return i.length===1&&hi(i[0])&&(i=i[0](),Array.isArray(i)||(i=[i])),i},source:a,timestamp:performance.now().toFixed(3)}}function md(e){[...Da].every(t=>t(e))&&za.forEach(t=>t(e))}function yo(e){let t=(vo.get(e)??0)+1;vo.set(e,t);let r=`${e} #${t}`,i={id:r,namespace:e,module:a=>yo(`${i.namespace}/${a}`),updateConfig:ci};return Object.values(Ia).forEach(a=>{i[a]=(n,...o)=>md(pd(a,n,e,o,r))}),Object.seal(i)}function fi(...e){e.forEach(t=>{let{append:r,filter:i}=t;hi(i)&&Da.add(i),hi(r)&&za.add(r)})}function ud(e={}){let{name:t}=e,r=T(F("commerce.debug",{search:!0,storage:!0}),t===fo.LOCAL);return fi(r?xo:bo),t===fo.PROD&&fi(aa),le}function gd(){za.clear(),Da.clear()}var le={...yo(ua),Level:Ia,Plugins:{consoleAppender:xo,debugFilter:bo,quietFilter:hd,lanaAppender:aa},init:ud,reset:gd,use:fi};var fd="mas-commerce-service",vd=le.module("utilities"),xd={requestId:vr,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function wr(e,{country:t,forceTaxExclusive:r}){let i;if(e.length<2)i=e;else{let a=t==="GB"?"EN":"MULT";e.sort((n,o)=>n.language===a?-1:o.language===a?1:0),e.sort((n,o)=>!n.term&&o.term?-1:n.term&&!o.term?1:0),i=[e[0]]}return r&&(i=i.map(go)),i}var wo=(e,t)=>{let r=e.reduce((i,a)=>i+(t(a)||0),0);return r>0?Math.round(r*100)/100:void 0};function $a(e){if(!e||e.length===0)return null;if(e.length===1)return e[0];let[t,...r]=e;for(let s of r){let c=[["commitment","commitment types"],["term","terms"],["priceDetails.formatString","currency formats"]];for(let[l,d]of c){let p=l.includes(".")?t.priceDetails?.formatString:t[l],u=l.includes(".")?s.priceDetails?.formatString:s[l];u!==p&&vd.warn(`Offers have different ${d}, summing may produce unexpected results`,{expected:p,actual:u})}}let i=[["price",s=>s.priceDetails?.price],["priceWithoutDiscount",s=>s.priceDetails?.priceWithoutDiscount],["priceWithoutTax",s=>s.priceDetails?.priceWithoutTax],["priceWithoutDiscountAndTax",s=>s.priceDetails?.priceWithoutDiscountAndTax]],a={};for(let[s,c]of i){let l=wo(e,c);l!==void 0&&(a[s]=l)}let n=e.some(s=>s.priceDetails?.annualized),o;if(n){let s=[["annualizedPrice",c=>c.priceDetails?.annualized?.annualizedPrice],["annualizedPriceWithoutTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutTax],["annualizedPriceWithoutDiscount",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscount],["annualizedPriceWithoutDiscountAndTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscountAndTax]];o={};for(let[c,l]of s){let d=wo(e,l);d!==void 0&&(o[c]=d)}}return{...t,offerSelectorIds:e.flatMap(s=>s.offerSelectorIds||[]),priceDetails:{...t.priceDetails,...a,...o&&{annualized:o}}}}var vi=e=>window.setTimeout(e);function Ot(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(lo).filter(xr);return r.length||(r=[t]),r}function xi(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(co)}function pe(){return document.getElementsByTagName(fd)?.[0]}function bi(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[i,a]of Object.entries(xd)){let n=r.get(a);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[i]=n)}return t}var Oe=class e extends Error{constructor(t,r,i){if(super(t,{cause:i}),this.name="MasError",r.response){let a=r.response.headers?.get(vr);a&&(r.requestId=a),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([i,a])=>`${i}: ${JSON.stringify(a)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` +Caused by: ${this.cause}`),r}};var bd={[Te]:ca,[qe]:la,[De]:da},yd={[Te]:ma,[De]:Lt},Er,je=class{constructor(t){w(this,Er);m(this,"changes",new Map);m(this,"connected",!1);m(this,"error");m(this,"log");m(this,"options");m(this,"promises",[]);m(this,"state",qe);m(this,"timer",null);m(this,"value");m(this,"version",0);m(this,"wrapperElement");this.wrapperElement=t,this.log=le.module("mas-element")}update(){[Te,qe,De].forEach(t=>{this.wrapperElement.classList.toggle(bd[t],t===this.state)})}notify(){(this.state===De||this.state===Te)&&(this.state===De?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===Te&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof Oe&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(yd[this.state],{bubbles:!0,composed:!0,detail:t}))}attributeChangedCallback(t,r,i){this.changes.set(t,i),this.requestUpdate()}connectedCallback(){y(this,Er,pe()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:i}=this;return De===i?Promise.resolve(this.wrapperElement):Te===i?Promise.reject(t):new Promise((a,n)=>{r.push({resolve:a,reject:n})})}toggleResolved(t,r,i){return t!==this.version?!1:(i!==void 0&&(this.options=i),this.state=De,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),vi(()=>this.notify()),!0)}toggleFailed(t,r,i){if(t!==this.version)return!1;i!==void 0&&(this.options=i),this.error=r,this.state=Te,this.update();let a=this.wrapperElement.getAttribute("is");return this.log?.error(`${a}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...h(this,Er)?.duration}),vi(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=qe,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!pe()||this.timer)return;let{error:r,options:i,state:a,value:n,version:o}=this;this.state=qe,this.timer=vi(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===qe&&this.version===o&&(this.state=a,this.error=r,this.value=n,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,i)}})}};Er=new WeakMap;function Eo(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function yi(e,t={}){let{tag:r,is:i}=e,a=document.createElement(r,{is:i});return a.setAttribute("is",i),Object.assign(a.dataset,Eo(t)),a}function Ao(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,Eo(t)),e):null}var wd=/[0-9\-+#]/,Ed=/[^\d\-+#]/g;function So(e){return e.search(wd)}function Ad(e="#.##"){let t={},r=e.length,i=So(e);t.prefix=i>0?e.substring(0,i):"";let a=So(e.split("").reverse().join("")),n=r-a,o=e.substring(n,n+1),s=n+(o==="."||o===","?1:0);t.suffix=a>0?e.substring(s,r):"",t.mask=e.substring(i,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(Ed);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 Sd(e,t,r){let i=!1,a={value:e};e<0&&(i=!0,a.value=-a.value),a.sign=i?"-":"",a.value=Number(a.value).toFixed(t.fraction&&t.fraction.length),a.value=Number(a.value).toString();let n=t.fraction&&t.fraction.lastIndexOf("0"),[o="0",s=""]=a.value.split(".");return(!s||s&&s.length<=n)&&(s=n<0?"":(+("0."+s)).toFixed(n+1).replace("0.","")),a.integer=o,a.fraction=s,Cd(a,t),(a.result==="0"||a.result==="")&&(i=!1,a.sign=""),!i&&t.maskHasPositiveSign?a.sign="+":i&&t.maskHasPositiveSign?a.sign="-":i&&(a.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),a}function Cd(e,t){e.result="";let r=t.integer.split(t.separator),i=r.join(""),a=i&&i.indexOf("0");if(a>-1)for(;e.integer.lengthe*12,dt=(e,t,r=1)=>{if(!e)return!1;let{start:i,end:a,displaySummary:{amount:n,duration:o,minProductQuantity:s=1,outcomeType:c}={}}=e;if(!(n&&o&&c)||r=d&&l<=p},lt={MONTH:"MONTH",YEAR:"YEAR"},_d={[ye.ANNUAL]:12,[ye.MONTHLY]:1,[ye.THREE_YEARS]:36,[ye.TWO_YEARS]:24},Ba=(e,t)=>({accept:e,round:t}),Pd=[Ba(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Ba(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Ba(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Fa={[rt.YEAR]:{[ye.MONTHLY]:lt.MONTH,[ye.ANNUAL]:lt.YEAR},[rt.MONTH]:{[ye.MONTHLY]:lt.MONTH}},Ld=(e,t)=>e.indexOf(`'${t}'`)===0,Md=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),i=Mo(r);return!!i?t||(r=r.replace(/[,\.]0+/,i)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Od(e)),r},Rd=e=>{let t=Nd(e),r=Ld(e,t),i=e.replace(/'.*?'/,""),a=_o.test(i)||Po.test(i);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:a}},Lo=e=>e.replace(_o,ko).replace(Po,ko),Od=e=>e.match(/#(.?)#/)?.[1]===To?kd:To,Nd=e=>e.match(/'(.*?)'/)?.[1]??"",Mo=e=>e.match(/0(.?)0/)?.[1]??"";function Nt({formatString:e,price:t,usePrecision:r,isIndianPrice:i=!1},a,n=o=>o){let{currencySymbol:o,isCurrencyFirst:s,hasCurrencySpace:c}=Rd(e),l=r?Mo(e):"",d=Md(e,r),p=r?2:0,u=n(t,{currencySymbol:o}),f=i?u.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):Co(d,u),v=r?f.lastIndexOf(l):f.length,x=f.substring(0,v),S=f.substring(v+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,f).replace(/SYMBOL/,o),currencySymbol:o,decimals:S,decimalsDelimiter:l,hasCurrencySpace:c,integer:x,isCurrencyFirst:s,recurrenceTerm:a}}var Ro=e=>{let{commitment:t,term:r,usePrecision:i}=e,a=_d[r]??1;return Nt(e,a>1?lt.MONTH:Fa[t]?.[r],n=>{let o={divisor:a,price:n,usePrecision:i},{round:s}=Pd.find(({accept:c})=>c(o));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(o)}`);return s(o)})},Oo=({commitment:e,term:t,...r})=>Nt(r,Fa[e]?.[t]),No=e=>{let{commitment:t,instant:r,price:i,originalPrice:a,priceWithoutDiscount:n,promotion:o,quantity:s=1,term:c}=e;if(t===rt.YEAR&&c===ye.MONTHLY){if(!o)return Nt(e,lt.YEAR,Ha);let{displaySummary:{outcomeType:l,duration:d}={}}=o;switch(l){case"PERCENTAGE_DISCOUNT":if(dt(o,r,s)){let p=parseInt(d.replace("P","").replace("M",""));if(isNaN(p))return Ha(i);let u=a*p,f=n*(12-p),v=Math.round((u+f)*100)/100;return Nt({...e,price:v},lt.YEAR)}default:return Nt(e,lt.YEAR,()=>Ha(n??i))}}return Nt(e,Fa[t]?.[c])};var Io="download",zo="upgrade",Do={e:"EDU",t:"TEAM"};function wi(e,t={},r=""){let i=pe();if(!i)return null;let{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:f,extraOptions:v,analyticsId:x}=i.collectCheckoutOptions(t),S=yi(e,{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:f,extraOptions:v,analyticsId:x});return r&&(S.innerHTML=`${r}`),S}function Ei(e){return class extends e{constructor(){super(...arguments);m(this,"checkoutActionHandler");m(this,"masElement",new je(this))}attributeChangedCallback(i,a,n){this.masElement.attributeChangedCallback(i,a,n)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get marketSegment(){let i=this.options?.ms??this.value?.[0].marketSegments?.[0];return Do[i]??i}get customerSegment(){let i=this.options?.cs??this.value?.[0]?.customerSegment;return Do[i]??i}get is3in1Modal(){return Object.values(ot).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let i=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!i||i.content!=="off")}requestUpdate(i=!1){return this.masElement.requestUpdate(i)}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"]}async render(i={}){let a=pe();if(!a)return!1;this.dataset.imsCountry||a.imsCountryPromise.then(f=>{f&&(this.dataset.imsCountry=f)}),i.imsCountry=null;let n=a.collectCheckoutOptions(i,this);if(!n.wcsOsi.length)return!1;let o;try{o=JSON.parse(n.extraOptions??"{}")}catch(f){this.masElement.log?.error("cannot parse exta checkout options",f)}let s=this.masElement.togglePending(n);this.setCheckoutUrl("");let c=a.resolveOfferSelectors(n),l=await Promise.all(c);l=l.map(f=>wr(f,n));let d=l.flat().find(f=>f.promotion);!dt(d?.promotion,d?.promotion?.displaySummary?.instant,n.quantity[0])&&n.promotionCode&&delete n.promotionCode,n.country=this.dataset.imsCountry||n.country;let u=await a.buildCheckoutAction?.(l.flat(),{...o,...n},this);return this.renderOffers(l.flat(),n,{},u,s)}renderOffers(i,a,n={},o=void 0,s=void 0){let c=pe();if(!c)return!1;if(a={...JSON.parse(this.dataset.extraOptions??"{}"),...a,...n},s??(s=this.masElement.togglePending(a)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),o){this.classList.remove(Io,zo),this.masElement.toggleResolved(s,i,a);let{url:d,text:p,className:u,handler:f}=o;d&&this.setCheckoutUrl(d),p&&(this.firstElementChild.innerHTML=p),u&&this.classList.add(...u.split(" ")),f&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=f.bind(this))}if(i.length){if(this.masElement.toggleResolved(s,i,a)){if(!this.classList.contains(Io)&&!this.classList.contains(zo)){let d=c.buildCheckoutURL(i,a);this.setCheckoutUrl(a.modal==="true"?"#":d)}return!0}}else{let d=new Error(`Not provided: ${a?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,d,a))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(i){}updateOptions(i={}){let a=pe();if(!a)return!1;let{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:f,wcsOsi:v}=a.collectCheckoutOptions(i);return Ao(this,{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:f,wcsOsi:v}),!0}}}var Ar=class Ar extends Ei(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return wi(Ar,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};m(Ar,"is","checkout-link"),m(Ar,"tag","a");var $e=Ar;window.customElements.get($e.is)||window.customElements.define($e.is,$e,{extends:$e.tag});var Id="p_draft_landscape",zd="/store/",Dd=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),Ua=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),$d=["env","workflowStep","clientId","country"],$o=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype","mv","mv2"]),Ho=e=>Dd.get(e)??e;function Ai(e,t,r){for(let[i,a]of Object.entries(e)){let n=Ho(i);a!=null&&r.has(n)&&t.set(n,a)}}function Hd(e){switch(e){case ya.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function Bd(e,t){for(let r in e){let i=e[r];for(let[a,n]of Object.entries(i)){if(n==null)continue;let o=Ho(a);t.set(`items[${r}][${o}]`,n)}}}function Fd({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let i=e.searchParams.get("af");return e.searchParams.set("af",[i,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===ot.CRM?"creative":"mini_plans"),e}function Ud(e){let t=new URLSearchParams(window.location.search),r={};$o.forEach(i=>{let a=t.get(i);a!==null&&(r[i]=a)}),Object.keys(r).length>0&&Ai(r,e.searchParams,$o)}function Bo(e){Gd(e);let{env:t,items:r,workflowStep:i,marketSegment:a,customerSegment:n,offerType:o,productArrangementCode:s,landscape:c,modal:l,is3in1:d,preselectPlan:p,...u}=e,f=new URL(Hd(t));if(f.pathname=`${zd}${i}`,i!==ce.SEGMENTATION&&i!==ce.CHANGE_PLAN_TEAM_PLANS&&Bd(r,f.searchParams),Ai({...u},f.searchParams,Ua),Ud(f),c===Ve.DRAFT&&Ai({af:Id},f.searchParams,Ua),i===ce.SEGMENTATION){let v={marketSegment:a,offerType:o,customerSegment:n,productArrangementCode:s,quantity:r?.[0]?.quantity,addonProductArrangementCode:s?r?.find(x=>x.productArrangementCode!==s)?.productArrangementCode:r?.[1]?.productArrangementCode};p?.toLowerCase()==="edu"?f.searchParams.set("ms","EDU"):p?.toLowerCase()==="team"&&f.searchParams.set("cs","TEAM"),Ai(v,f.searchParams,Ua),f.searchParams.get("ot")==="PROMOTION"&&f.searchParams.delete("ot"),f=Fd({url:f,modal:l,is3in1:d})}return f.toString()}function Gd(e){for(let t of $d)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);if(e.workflowStep!==ce.SEGMENTATION&&e.workflowStep!==ce.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}var N=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:ce.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:Re.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Ve.PUBLISHED});function Fo({settings:e,providers:t}){function r(n,o){let{checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:f,env:v}=e,x={checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:f,env:v};if(o)for(let Tt of t.checkout)Tt(o,x);let{checkoutMarketSegment:S,checkoutWorkflowStep:z=c,imsCountry:I,country:C=I??l,language:O=d,quantity:K=u,entitlement:q,upgrade:Q,modal:ee,perpetual:de,promotionCode:ie=p,wcsOsi:W,extraOptions:$,...he}=Object.assign(x,o?.dataset??{},n??{}),be=br(z,ce,N.checkoutWorkflowStep);return x=mi({...he,extraOptions:$,checkoutClientId:s,checkoutMarketSegment:S,country:C,quantity:Ot(K,N.quantity),checkoutWorkflowStep:be,language:O,entitlement:T(q),upgrade:T(Q),modal:ee,perpetual:T(de),promotionCode:gi(ie).effectivePromoCode,wcsOsi:xi(W),preselectPlan:f}),x}function i(n,o){if(!Array.isArray(n)||!n.length||!o)return"";let{env:s,landscape:c}=e,{checkoutClientId:l,checkoutMarketSegment:d,checkoutWorkflowStep:p,country:u,promotionCode:f,quantity:v,preselectPlan:x,ms:S,cs:z,...I}=r(o),C=document.querySelector("meta[name=mas-ff-3in1]"),O=Object.values(ot).includes(o.modal)&&(!C||C.content!=="off"),K=window.frameElement||O?"if":"fp",[{productArrangementCode:q,marketSegments:[Q],customerSegment:ee,offerType:de}]=n,ie=S??Q??d,W=z??ee;x?.toLowerCase()==="edu"?ie="EDU":x?.toLowerCase()==="team"&&(W="TEAM");let $={is3in1:O,checkoutPromoCode:f,clientId:l,context:K,country:u,env:s,items:[],marketSegment:ie,customerSegment:W,offerType:de,productArrangementCode:q,workflowStep:p,landscape:c,...I},he=v[0]>1?v[0]:void 0;if(n.length===1){let{offerId:be}=n[0];$.items.push({id:be,quantity:he})}else $.items.push(...n.map(({offerId:be,productArrangementCode:Tt})=>({id:be,quantity:he,...O?{productArrangementCode:Tt}:{}})));return Bo($)}let{createCheckoutLink:a}=$e;return{CheckoutLink:$e,CheckoutWorkflowStep:ce,buildCheckoutURL:i,collectCheckoutOptions:r,createCheckoutLink:a}}function qd({interval:e=200,maxAttempts:t=25}={}){let r=le.module("ims");return new Promise(i=>{r.debug("Waing for IMS to be ready");let a=0;function n(){window.adobeIMS?.initialized?i():++a>t?(r.debug("Timeout"),i()):setTimeout(n,e)}n()})}function Vd(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function jd(e){let t=le.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:i})=>(t.debug("Got user country:",i),i),i=>{t.error("Unable to get user country:",i)}):null)}function Uo({}){let e=qd(),t=Vd(e),r=jd(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var Go=window.masPriceLiterals;function qo(e){if(Array.isArray(Go)){let t=e.locale==="id_ID"?"in":e.language,r=a=>Go.find(n=>Aa(n.lang,a)),i=r(t)??r(N.language);if(i)return Object.freeze(i)}return{}}var Ga=function(e,t){return Ga=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},Ga(e,t)};function Sr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ga(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var L=function(){return L=Object.assign||function(t){for(var r,i=1,a=arguments.length;i0}),r=[],i=0,a=t;i1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Xd,function(c,l,d,p,u,f){if(l)t.minimumIntegerDigits=d.length;else{if(p&&u)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(es.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Xo.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Xo,function(c,l,d,p,u,f){return d==="*"?t.minimumFractionDigits=l.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:u&&f?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+f.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var n=a.options[0];n==="w"?t=L(L({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=L(L({},t),Ko(n)));continue}if(Jo.test(a.stem)){t=L(L({},t),Ko(a.stem));continue}var o=ts(a.stem);o&&(t=L(L({},t),o));var s=Kd(a.stem);s&&(t=L(L({},t),s))}return t}var Tr={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function is(e,t){for(var r="",i=0;i>1),c="a",l=Qd(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;o-- >0;)r=l+r}else a==="J"?r+="H":r+=a}return r}function Qd(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,i;r!=="root"&&(i=e.maximize().region);var a=Tr[i||""]||Tr[r||""]||Tr["".concat(r,"-001")]||Tr["001"];return a[0]}var ja,Zd=new RegExp("^".concat(Va.source,"*")),Jd=new RegExp("".concat(Va.source,"*$"));function M(e,t){return{start:e,end:t}}var eh=!!String.prototype.startsWith,th=!!String.fromCodePoint,rh=!!Object.fromEntries,ih=!!String.prototype.codePointAt,ah=!!String.prototype.trimStart,nh=!!String.prototype.trimEnd,oh=!!Number.isSafeInteger,sh=oh?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ya=!0;try{as=cs("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ya=((ja=as.exec("a"))===null||ja===void 0?void 0:ja[0])==="a"}catch{Ya=!1}var as,ns=eh?function(t,r,i){return t.startsWith(r,i)}:function(t,r,i){return t.slice(i,i+r.length)===r},Xa=th?String.fromCodePoint:function(){for(var t=[],r=0;rn;){if(o=t[n++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},os=rh?Object.fromEntries:function(t){for(var r={},i=0,a=t;i=i)){var a=t.charCodeAt(r),n;return a<55296||a>56319||r+1===i||(n=t.charCodeAt(r+1))<56320||n>57343?a:(a-55296<<10)+(n-56320)+65536}},ch=ah?function(t){return t.trimStart()}:function(t){return t.replace(Zd,"")},lh=nh?function(t){return t.trimEnd()}:function(t){return t.replace(Jd,"")};function cs(e,t){return new RegExp(e,t)}var Ka;Ya?(Wa=cs("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ka=function(t,r){var i;Wa.lastIndex=r;var a=Wa.exec(t);return(i=a[1])!==null&&i!==void 0?i:""}):Ka=function(t,r){for(var i=[];;){var a=ss(t,r);if(a===void 0||ds(a)||ph(a))break;i.push(a),r+=a>=65536?2:1}return Xa.apply(void 0,i)};var Wa,ls=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.locale=r.locale,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,i){for(var a=[];!this.isEOF();){var n=this.char();if(n===123){var o=this.parseArgument(t,i);if(o.err)return o;a.push(o.val)}else{if(n===125&&t>0)break;if(n===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),a.push({type:V.pound,location:M(s,this.clonePosition())})}else if(n===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(k.UNMATCHED_CLOSING_TAG,M(this.clonePosition(),this.clonePosition()))}else if(n===60&&!this.ignoreTag&&Qa(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;a.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;a.push(o.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var i=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:V.literal,value:"<".concat(a,"/>"),location:M(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var n=this.parseMessage(t+1,r,!0);if(n.err)return n;var o=n.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:V.tag,value:a,children:o,location:M(i,this.clonePosition())},err:null}:this.error(k.INVALID_TAG,M(s,this.clonePosition())))}else return this.error(k.UNCLOSED_TAG,M(i,this.clonePosition()))}else return this.error(k.INVALID_TAG,M(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&hh(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var i=this.clonePosition(),a="";;){var n=this.tryParseQuote(r);if(n){a+=n;continue}var o=this.tryParseUnquoted(t,r);if(o){a+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){a+=s;continue}break}var c=M(i,this.clonePosition());return{val:{type:V.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!dh(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 i=this.char();if(i===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(i);this.bump()}return Xa.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(r==="plural"||r==="selectordinal")||i===125&&t>0?null:(this.bump(),Xa(i))},e.prototype.parseArgument=function(t,r){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(k.EMPTY_ARGUMENT,M(i,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(k.MALFORMED_ARGUMENT,M(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:V.argument,value:a,location:M(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(i,this.clonePosition())):this.parseArgumentOptions(t,r,a,i);default:return this.error(k.MALFORMED_ARGUMENT,M(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),i=Ka(this.message,r),a=r+i.length;this.bumpTo(a);var n=this.clonePosition(),o=M(t,n);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,r,i,a){var n,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(k.EXPECT_ARGUMENT_TYPE,M(o,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var u=lh(p.val);if(u.length===0)return this.error(k.EXPECT_ARGUMENT_STYLE,M(this.clonePosition(),this.clonePosition()));var f=M(d,this.clonePosition());l={style:u,styleLocation:f}}var v=this.tryParseArgumentClose(a);if(v.err)return v;var x=M(a,this.clonePosition());if(l&&ns(l?.style,"::",0)){var S=ch(l.style.slice(2));if(s==="number"){var p=this.parseNumberSkeletonFromString(S,l.styleLocation);return p.err?p:{val:{type:V.number,value:i,location:x,style:p.val},err:null}}else{if(S.length===0)return this.error(k.EXPECT_DATE_TIME_SKELETON,x);var z=S;this.locale&&(z=is(S,this.locale));var u={type:ht.dateTime,pattern:z,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Wo(z):{}},I=s==="date"?V.date:V.time;return{val:{type:I,value:i,location:x,style:u},err:null}}}return{val:{type:s==="number"?V.number:s==="date"?V.date:V.time,value:i,location:x,style:(n=l?.style)!==null&&n!==void 0?n:null},err:null}}case"plural":case"selectordinal":case"select":{var C=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(k.EXPECT_SELECT_ARGUMENT_OPTIONS,M(C,L({},C)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),K=0;if(s!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(k.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,M(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(k.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,k.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),O=this.parseIdentifierIfPossible(),K=p.val}var q=this.tryParsePluralOrSelectOptions(t,s,r,O);if(q.err)return q;var v=this.tryParseArgumentClose(a);if(v.err)return v;var Q=M(a,this.clonePosition());return s==="select"?{val:{type:V.select,value:i,options:os(q.val),location:Q},err:null}:{val:{type:V.plural,value:i,options:os(q.val),offset:K,pluralType:s==="plural"?"cardinal":"ordinal",location:Q},err:null}}default:return this.error(k.INVALID_ARGUMENT_TYPE,M(o,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(k.EXPECT_ARGUMENT_CLOSING_BRACE,M(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(k.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,M(a,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 i=[];try{i=Zo(t)}catch{return this.error(k.INVALID_NUMBER_SKELETON,r)}return{val:{type:ht.number,tokens:i,location:r,parsedOptions:this.shouldParseSkeletons?rs(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,i,a){for(var n,o=!1,s=[],c=new Set,l=a.value,d=a.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(k.EXPECT_PLURAL_ARGUMENT_SELECTOR,k.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;d=M(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?k.DUPLICATE_SELECT_ARGUMENT_SELECTOR:k.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?k.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:k.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,M(this.clonePosition(),this.clonePosition()));var v=this.parseMessage(t+1,r,i);if(v.err)return v;var x=this.tryParseArgumentClose(f);if(x.err)return x;s.push([l,{value:v.val,location:M(f,this.clonePosition())}]),c.add(l),this.bumpSpace(),n=this.parseIdentifierIfPossible(),l=n.value,d=n.location}return s.length===0?this.error(r==="select"?k.EXPECT_SELECT_ARGUMENT_SELECTOR:k.EXPECT_PLURAL_ARGUMENT_SELECTOR,M(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(k.MISSING_OTHER_CLAUSE,M(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var i=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var n=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)n=!0,o=o*10+(s-48),this.bump();else break}var c=M(a,this.clonePosition());return n?(o*=i,sh(o)?{val:o,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=ss(this.message,t);if(r===void 0)throw Error("Offset ".concat(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(ns(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&ds(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),i=this.message.charCodeAt(r+(t>=65536?2:1));return i??null},e}();function Qa(e){return e>=97&&e<=122||e>=65&&e<=90}function dh(e){return Qa(e)||e===47}function hh(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 ds(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ph(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 Za(e){e.forEach(function(t){if(delete t.location,_i(t)||Pi(t))for(var r in t.options)delete t.options[r].location,Za(t.options[r].value);else Ci(t)&&Mi(t.style)||(Ti(t)||ki(t))&&Cr(t.style)?delete t.style.location:Li(t)&&Za(t.children)})}function hs(e,t){t===void 0&&(t={}),t=L({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new ls(e,t).parse();if(r.err){var i=SyntaxError(k[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return t?.captureLocation||Za(r.val),r.val}function kr(e,t){var r=t&&t.cache?t.cache:xh,i=t&&t.serializer?t.serializer:vh,a=t&&t.strategy?t.strategy:uh;return a(e,{cache:r,serializer:i})}function mh(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ps(e,t,r,i){var a=mh(i)?i:r(i),n=t.get(a);return typeof n>"u"&&(n=e.call(this,i),t.set(a,n)),n}function ms(e,t,r){var i=Array.prototype.slice.call(arguments,3),a=r(i),n=t.get(a);return typeof n>"u"&&(n=e.apply(this,i),t.set(a,n)),n}function Ja(e,t,r,i,a){return r.bind(t,e,i,a)}function uh(e,t){var r=e.length===1?ps:ms;return Ja(e,this,r,t.cache.create(),t.serializer)}function gh(e,t){return Ja(e,this,ms,t.cache.create(),t.serializer)}function fh(e,t){return Ja(e,this,ps,t.cache.create(),t.serializer)}var vh=function(){return JSON.stringify(arguments)};function en(){this.cache=Object.create(null)}en.prototype.get=function(e){return this.cache[e]};en.prototype.set=function(e,t){this.cache[e]=t};var xh={create:function(){return new en}},Ri={variadic:gh,monadic:fh};var pt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(pt||(pt={}));var _r=function(e){Sr(t,e);function t(r,i,a){var n=e.call(this,r)||this;return n.code=i,n.originalMessage=a,n}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var tn=function(e){Sr(t,e);function t(r,i,a,n){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(i,'". Options are "').concat(Object.keys(a).join('", "'),'"'),pt.INVALID_VALUE,n)||this}return t}(_r);var us=function(e){Sr(t,e);function t(r,i,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(i),pt.INVALID_VALUE,a)||this}return t}(_r);var gs=function(e){Sr(t,e);function t(r,i){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(i,'"'),pt.MISSING_VALUE,i)||this}return t}(_r);var se;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(se||(se={}));function bh(e){return e.length<2?e:e.reduce(function(t,r){var i=t[t.length-1];return!i||i.type!==se.literal||r.type!==se.literal?t.push(r):i.value+=r.value,t},[])}function yh(e){return typeof e=="function"}function Pr(e,t,r,i,a,n,o){if(e.length===1&&qa(e[0]))return[{type:se.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=hs,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var xs=fs;var an={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},Sh=ho("ConsonantTemplates/price"),Ch=/<\/?[^>]+(>|$)/g,j={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerPromoStrikethrough:"price-promo-strikethrough",containerAlternative:"price-alternative",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",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"},We={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},nn="TAX_EXCLUSIVE",Th=e=>so(e)?Object.entries(e).filter(([,t])=>Rt(t)||pi(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+oo(i)+'"'}`,""):"",Y=(e,t,r,i=!1)=>`${i?Lo(t):t??""}`;function kh(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("",">");e=e.replaceAll(i,a)}),e}function _h(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("<a ","");e=e.replaceAll(i,a)}),e}function He(e,t,r,i){let a=e[r];if(a==null)return"";let n=a.includes("<"),o=a.includes("${t}`:r&&(v=`${r}`),c&&(v+=f+x),v+=Y(j.integer,s),v+=Y(j.decimalsDelimiter,n),v+=Y(j.decimals,a),c||(v+=x+f),v+=Y(j.recurrence,l,null,!0),v+=Y(j.unitType,d,null,!0),v+=Y(j.taxInclusivity,p,!0),Y(e,v,{...u})}var ae=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayPromoStrikethrough:i=!1,displayAnnual:a=!1,instant:n=void 0}={})=>({country:o,displayFormatted:s=!0,displayRecurrence:c=!0,displayPerUnit:l=!1,displayTax:d=!1,language:p,literals:u={},quantity:f=1,space:x=!1,isPromoApplied:v=!1}={},{commitment:S,offerSelectorIds:z,formatString:I,price:C,priceWithoutDiscount:O,taxDisplay:K,taxTerm:q,term:Q,usePrecision:ee,promotion:de}={},ie={})=>{Object.entries({country:o,formatString:I,language:p,price:C}).forEach(([Pl,Ll])=>{if(Ll==null)throw new Error(`Argument "${Pl}" is missing for osi ${z?.toString()}, country ${o}, language ${p}`)});let W={...an,...u},$=`${p.toLowerCase()}-${o.toUpperCase()}`,he;de&&!v&&O?he=e||i?C:O:r&&O?he=O:he=C;let be=t?Ro:Oo;a&&(be=No);let{accessiblePrice:Tt,recurrenceTerm:Wn,...Yn}=be({commitment:S,formatString:I,instant:n,isIndianPrice:o==="IN",originalPrice:C,priceWithoutDiscount:O,price:t?C:he,promotion:de,quantity:f,term:Q,usePrecision:ee}),ea="",ta="",ra="";T(c)&&Wn&&(ra=He(W,$,We.recurrenceLabel,{recurrenceTerm:Wn}));let oi="";T(l)&&(x&&(oi+=" "),oi+=He(W,$,We.perUnitLabel,{perUnit:"LICENSE"}));let si="";T(d)&&q&&(x&&(si+=" "),si+=He(W,$,K===nn?We.taxExclusiveLabel:We.taxInclusiveLabel,{taxTerm:q})),r&&(ea=He(W,$,We.strikethroughAriaLabel,{strikethroughPrice:ea})),e&&(ta=He(W,$,We.alternativePriceAriaLabel,{alternativePrice:ta}));let Je=j.container;if(t&&(Je+=" "+j.containerOptical),r&&(Je+=" "+j.containerStrikethrough),i&&(Je+=" "+j.containerPromoStrikethrough),e&&(Je+=" "+j.containerAlternative),a&&(Je+=" "+j.containerAnnual),T(s))return Ph(Je,{...Yn,accessibleLabel:ea,altAccessibleLabel:ta,recurrenceLabel:ra,perUnitLabel:oi,taxInclusivityLabel:si},ie);let{currencySymbol:Xn,decimals:Sl,decimalsDelimiter:Cl,hasCurrencySpace:Kn,integer:Tl,isCurrencyFirst:kl}=Yn,kt=[Tl,Cl,Sl];kl?(kt.unshift(Kn?"\xA0":""),kt.unshift(Xn)):(kt.push(Kn?"\xA0":""),kt.push(Xn)),kt.push(ra,oi,si);let _l=kt.join("");return Y(Je,_l,ie)},vs=()=>(e,t,r)=>{let i=dt(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n=(e.displayOldPrice===void 0||T(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${n?ae({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${ae({isAlternativePrice:n})({isPromoApplied:i,...e},t,r)}`},bs=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let a=dt(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:a};if(!a)return ae()(e,{...t,price:t.priceWithoutDiscount},r)+Y(j.containerAnnualPrefix," (")+ae({displayAnnual:!0,instant:i})(n,{...t,price:t.priceWithoutDiscount},r)+Y(j.containerAnnualSuffix,")");let s=(e.displayOldPrice===void 0||T(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${s?ae({displayStrikethrough:!0})(n,t,r)+" ":""}${ae({isAlternativePrice:s})({isPromoApplied:a,...e},t,r)}${Y(j.containerAnnualPrefix," (")}${ae({displayAnnual:!0,instant:i})(n,t,r)}${Y(j.containerAnnualSuffix,")")}`},ys=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${ae({isAlternativePrice:e.displayOldPrice})(e,t,r)}${Y(j.containerAnnualPrefix," (")}${ae({displayAnnual:!0})(i,t,r)}${Y(j.containerAnnualSuffix,")")}`};var Lr={...j,containerLegal:"price-legal",planType:"price-plan-type"},Oi={...We,planTypeLabel:"planTypeLabel"};function Lh(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},a={}){let n="";return n+=Y(Lr.unitType,t,null,!0),r&&i&&(r+=". "),n+=Y(Lr.taxInclusivity,r,!0),n+=Y(Lr.planType,i,null),Y(e,n,{...a})}var ws=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:a,literals:n={}}={},{taxDisplay:o,taxTerm:s,planType:c}={},l={})=>{let d={...an,...n},p=`${a.toLowerCase()}-${e.toUpperCase()}`,u="";T(t)&&(u=He(d,p,Oi.perUnitLabel,{perUnit:"LICENSE"}));let f="";e==="US"&&a==="en"&&(r=!1),T(r)&&s&&(f=He(d,p,o===nn?Oi.taxExclusiveLabel:Oi.taxInclusiveLabel,{taxTerm:s}));let x="";T(i)&&c&&(x=He(d,p,Oi.planTypeLabel,{planType:c}));let v=Lr.container;return v+=" "+Lr.containerLegal,Lh(v,{perUnitLabel:u,taxInclusivityLabel:f,planTypeLabel:x},l)};var Es=ae(),As=vs(),Ss=ae({displayOptical:!0}),Cs=ae({displayStrikethrough:!0}),Ts=ae({displayPromoStrikethrough:!0}),ks=ae({displayAnnual:!0}),_s=ae({displayOptical:!0,isAlternativePrice:!0}),Ps=ae({isAlternativePrice:!0}),Ls=ys(),Ms=bs(),Rs=ws;var Mh=(e,t)=>{if(!(!vr(e)||!vr(t)))return Math.floor((t-e)/t*100)},Os=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,a=Mh(r,i);return a===void 0?'':`${a}%`};var Ns=Os();var Is="INDIVIDUAL_COM",sn="TEAM_COM",zs="INDIVIDUAL_EDU",cn="TEAM_EDU",Rh=["AT_de","AU_en","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","CO_es","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","FR_fr","GB_en","GR_el","GR_en","HU_hu","ID_en","ID_id","ID_in","IE_en","IN_en","IN_hi","IT_it","JP_ja","KR_ko","LU_de","LU_en","LU_fr","LT_lt","LV_lv","MY_en","MY_ms","MU_en","NL_nl","NG_en","NO_nb","NZ_en","PE_es","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","SG_en","TH_en","TH_th","TR_tr","UA_uk","ZA_en","SA_ar","SA_en","MX_es","CL_es","PE_es","AR_es"],Oh={[Is]:[],[sn]:["VN_vi","VN_en","TW_zh"],[zs]:[],[cn]:["VN_vi","VN_en","TW_zh"]},Nh={MU_en:[!0,!0,!0,!0],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],ZA_en:[!1,!1,!1,!1],PE_es:[!1,!1,!1,!1]},Ih=[Is,sn,zs,cn],zh=e=>[sn,cn].includes(e);function on(e,t,r,i){if(e[t])return e[t];let a=`${t}_${r}`;if(e[a])return e[a];let n;if(i)n=e.find(o=>o.startsWith(`${t}_`));else{let o=Object.keys(e).find(s=>s.startsWith(`${t}_`));n=o?e[o]:null}return n}var Dh=(e,t,r,i)=>{let a=`${r}_${i}`,n=on(Nh,e,t,!1);if(n){let o=Ih.indexOf(a);return n[o]}return zh(a)},$h=(e,t,r,i)=>{if(on(Rh,e,t,!0))return!0;let a=Oh[`${r}_${i}`];return a?on(a,e,t,!0)?!0:N.displayTax:N.displayTax},Ni=async(e,t,r,i)=>{let a=$h(e,t,r,i);return{displayTax:a,forceTaxExclusive:a?Dh(e,t,r,i):N.forceTaxExclusive}},Mr=class Mr extends HTMLSpanElement{constructor(){super();m(this,"masElement",new je(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=pe();if(!i)return null;let{displayOldPrice:a,displayPerUnit:n,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:f,alternativePrice:x,template:v,wcsOsi:S}=i.collectPriceOptions(r);return yi(Mr,{displayOldPrice:a,displayPerUnit:n,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:f,alternativePrice:x,template:v,wcsOsi:S})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===Te}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=pe();if(!i)return!1;let a=i.collectPriceOptions(r,this),n={...i.settings,...a};if(!n.wcsOsi.length)return!1;try{let o=this.masElement.togglePending({});this.innerHTML="";let s=i.resolveOfferSelectors(n),c=await Promise.all(s),l=c.map(f=>{let x=wr(f,n);return x?.length?x[0]:null});if(l.some(f=>!f))throw new Error(`Failed to select offers for: ${n.wcsOsi}`);let d=l,p=$a(l);if(i.featureFlags[ke]||n[ke]){if(a.displayPerUnit===void 0&&(n.displayPerUnit=p.customerSegment!=="INDIVIDUAL"),a.displayTax===void 0||a.forceTaxExclusive===void 0){let{country:f,language:x}=n,[v=""]=p.marketSegments,S=await Ni(f,x,p.customerSegment,v);a.displayTax===void 0&&(n.displayTax=S?.displayTax||n.displayTax),a.forceTaxExclusive===void 0&&(n.forceTaxExclusive=S?.forceTaxExclusive||n.forceTaxExclusive),n.forceTaxExclusive&&(d=c.map(z=>{let I=wr(z,n);return I?.length?I[0]:null}))}}else a.displayOldPrice===void 0&&(n.displayOldPrice=!0);if(i.featureFlags[Mt]&&n.displayAnnual!==!1&&(n.displayAnnual=!0),n.template==="discount"&&d.length===2){let[f,x]=d,v={...f,priceDetails:{...f.priceDetails,priceWithoutDiscount:x.priceDetails?.price}};return this.renderOffers([v],n,o)}let u=$a(d);return this.renderOffers([u],n,o)}catch(o){throw this.innerHTML="",o}}renderOffers(r,i,a=void 0){if(!this.isConnected)return;let n=pe();if(!n)return!1;if(a??(a=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(a,r,i)){this.innerHTML=n.buildPriceHTML(r,this.options);let o=this.closest("p, h3, div");if(!o||!o.querySelector('span[data-template="strikethrough"]')||o.querySelector(".alt-aria-label"))return!0;let s=o?.querySelectorAll('span[is="inline-price"]');return s.length>1&&s.length===o.querySelectorAll('span[data-template="strikethrough"]').length*2&&s.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=n.buildPriceHTML(r,c.options))}),!0}}else{let o=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,o,this.options))return this.innerHTML="",!0}return!1}};m(Mr,"is","inline-price"),m(Mr,"tag","span");var Be=Mr;window.customElements.get(Be.is)||window.customElements.define(Be.is,Be,{extends:Be.tag});function Ds({literals:e,providers:t,settings:r}){function i(o,s=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(s&&t?.price)for(let q of t.price)q(s,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:p,displayTax:u,displayPlanType:f,forceTaxExclusive:x,perpetual:v,displayAnnual:S,promotionCode:z,quantity:I,alternativePrice:C,wcsOsi:O,...K}=Object.assign(c,s?.dataset??{},o??{});return c=mi(Object.assign({...c,...K,displayOldPrice:T(l),displayPerUnit:T(d),displayRecurrence:T(p),displayTax:T(u),displayPlanType:T(f),forceTaxExclusive:T(x),perpetual:T(v),displayAnnual:T(S),promotionCode:gi(z).effectivePromoCode,quantity:Ot(I,N.quantity),alternativePrice:T(C),wcsOsi:vi(O)})),c}function a(o,s){if(!Array.isArray(o)||!o.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=Ns;break;case"strikethrough":l=Cs;break;case"promo-strikethrough":l=Ts;break;case"annual":l=ks;break;case"legal":l=Rs;break;default:s.template==="optical"&&s.alternativePrice?l=_s:s.template==="optical"?l=Ss:s.displayAnnual&&o[0].planType==="ABM"?l=s.promotionCode?Ms:Ls:s.alternativePrice?l=Ps:l=s.promotionCode?As:Es}let[d]=o;return d={...d,...d.priceDetails},l({...r,...s},d)}let n=Be.createInlinePrice;return{InlinePrice:Be,buildPriceHTML:a,collectPriceOptions:i,createInlinePrice:n}}function Hh({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||N.language),t??(t=e?.split("_")?.[1]||N.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function $s(e={},t){let r=t.featureFlags[ke],{commerce:i={}}=e,a=Re.PRODUCTION,n=va,o=F("checkoutClientId",i)??N.checkoutClientId,s=br(F("checkoutWorkflowStep",i),ce,N.checkoutWorkflowStep),c=T(F("displayOldPrice",i),N.displayOldPrice),l=N.displayPerUnit,d=T(F("displayRecurrence",i),N.displayRecurrence),p=T(F("displayTax",i),N.displayTax),u=T(F("displayPlanType",i),N.displayPlanType),f=T(F("entitlement",i),N.entitlement),x=T(F("modal",i),N.modal),v=T(F("forceTaxExclusive",i),N.forceTaxExclusive),S=F("promotionCode",i)??N.promotionCode,z=Ot(F("quantity",i)),I=F("wcsApiKey",i)??N.wcsApiKey,C=i?.env==="stage",O=Ve.PUBLISHED;["true",""].includes(i.allowOverride)&&(C=(F(fa,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",O=br(F(xa,i),Ve,O)),C&&(a=Re.STAGE,n=ba);let q=F(ga)??e.preview,Q=typeof q<"u"&&q!=="off"&&q!=="false",ee={};Q&&(ee={preview:Q});let de=F("mas-io-url")??e.masIOUrl??`https://www${a===Re.STAGE?".stage":""}.adobe.com/mas/io`,ie=F("preselect-plan")??void 0;return{...Hh(e),...ee,displayOldPrice:c,checkoutClientId:o,checkoutWorkflowStep:s,displayPerUnit:l,displayRecurrence:d,displayTax:p,displayPlanType:u,entitlement:f,extraOptions:N.extraOptions,modal:x,env:a,forceTaxExclusive:v,promotionCode:S,quantity:z,alternativePrice:N.alternativePrice,wcsApiKey:I,wcsURL:n,landscape:O,masIOUrl:de,...ie&&{preselectPlan:ie}}}async function Ii(e,t={},r=2,i=100){let a;for(let n=0;n<=r;n++)try{let o=await fetch(e,t);return o.retryCount=n,o}catch(o){if(a=o,a.retryCount=n,n>r)break;await new Promise(s=>setTimeout(s,i*(n+1)))}throw a}var Bh="mas-commerce-service";function Rr(e,t){let r;return function(){let i=this,a=arguments;clearTimeout(r),r=setTimeout(()=>e.apply(i,a),t)}}function ne(e,t={},r=null,i=null){let a=i?document.createElement(e,{is:i}):document.createElement(e);r instanceof HTMLElement?a.appendChild(r):a.innerHTML=r;for(let[n,o]of Object.entries(t))a.setAttribute(n,o);return a}function Ne(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function ln(){return window.matchMedia("(max-width: 1024px)").matches}function mt(){return document.getElementsByTagName(Bh)?.[0]}function Or(e){let t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}var dn="wcs";function Hs({settings:e}){let t=le.module(dn),{env:r,wcsApiKey:i}=e,a=new Map,n=new Map,o,s=new Map;async function c(x,v,S=!0){let z=pe(),I=pa;t.debug("Fetching:",x);let C="",O;if(x.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let K=new Map(v),[q]=x.offerSelectorIds,Q=Date.now()+Math.random().toString(36).substring(2,7),ee=`${dn}:${q}:${Q}${st}`,de=`${dn}:${q}:${Q}${ct}`,ie;try{if(performance.mark(ee),C=new URL(e.wcsURL),C.searchParams.set("offer_selector_ids",q),C.searchParams.set("country",x.country),C.searchParams.set("locale",x.locale),C.searchParams.set("landscape",r===Re.STAGE?"ALL":e.landscape),C.searchParams.set("api_key",i),x.language&&C.searchParams.set("language",x.language),x.promotionCode&&C.searchParams.set("promotion_code",x.promotionCode),x.currency&&C.searchParams.set("currency",x.currency),O=await Ii(C.toString(),{credentials:"omit"}),O.ok){let W=[];try{let $=await O.json();t.debug("Fetched:",x,$),W=$.resolvedOffers??[]}catch($){t.error(`Error parsing JSON: ${$.message}`,{...$.context,...z?.duration})}W=W.map(yr),v.forEach(({resolve:$},he)=>{let be=W.filter(({offerSelectorIds:Tt})=>Tt.includes(he)).flat();be.length&&(K.delete(he),v.delete(he),$(be))})}else I=ha}catch(W){I=`Network error: ${W.message}`}finally{ie=performance.measure(de,ee),performance.clearMarks(ee),performance.clearMeasures(de)}if(S&&v.size){t.debug("Missing:",{offerSelectorIds:[...v.keys()]});let W=bi(O);v.forEach($=>{$.reject(new Oe(I,{...x,...W,response:O,measure:Ne(ie),...z?.duration}))})}}function l(){clearTimeout(o);let x=[...n.values()];n.clear(),x.forEach(({options:v,promises:S})=>c(v,S))}function d(x){if(!x||typeof x!="object")throw new TypeError("Cache must be a Map or similar object");let v=r===Re.STAGE?"stage":"prod",S=x[v];if(!S||typeof S!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[z,I]of Object.entries(S))a.set(z,Promise.resolve(I.map(yr)));t.debug(`Prefilled WCS cache with ${S.size} entries`)}function p(){let x=a.size;s=new Map(a),a.clear(),t.debug(`Moved ${x} cache entries to stale cache`)}function u(x,v,S){let z=x!=="GB"&&!S?"MULT":"en",I=wa.includes(x)?x:N.country;return{validCountry:I,validLanguage:z,locale:`${v}_${I}`}}function f({country:x,language:v,perpetual:S=!1,promotionCode:z="",wcsOsi:I=[]}){let{validCountry:C,validLanguage:O,locale:K}=u(x,v,S),q=[C,O,z].filter(Q=>Q).join("-").toLowerCase();return I.map(Q=>{let ee=`${Q}-${q}`;if(a.has(ee))return a.get(ee);let de=new Promise((ie,W)=>{let $=n.get(q);$||($={options:{country:C,locale:K,...O==="MULT"&&{language:O},offerSelectorIds:[]},promises:new Map},n.set(q,$)),z&&($.options.promotionCode=z),$.options.offerSelectorIds.push(Q),$.promises.set(Q,{resolve:ie,reject:W}),l()}).catch(ie=>{if(s.has(ee))return s.get(ee);throw ie});return a.set(ee,de),de})}return{Commitment:rt,PlanType:mo,Term:ye,applyPlanType:yr,resolveOfferSelectors:f,flushWcsCacheInternal:p,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var Bs="mas-commerce-service",Fs="mas-commerce-service:start",Us="mas-commerce-service:ready",Nr,It,ut,Gs,pn,hn=class extends HTMLElement{constructor(){super(...arguments);w(this,ut);w(this,Nr);w(this,It);m(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,a,n)=>{let o=await r?.(i,a,this.imsSignedInPromise,n);return o||null})}get featureFlags(){return h(this,It)||y(this,It,{[ke]:Z(this,ut,pn).call(this,ke),[Mt]:Z(this,ut,pn).call(this,Mt)}),h(this,It)}activate(){let r=h(this,ut,Gs),i=$s(r,this);ci(r.lana);let a=le.init(r.hostEnv).module("service");a.debug("Activating:",r);let o={price:qo(i)},s={checkout:new Set,price:new Set},c={literals:o,providers:s,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...Fo(c),...Uo(c),...Ds(c),...Hs(c),...Ea,Log:le,resolvePriceTaxFlags:Ni,get defaults(){return N},get log(){return le},get providers(){return{checkout(d){return s.checkout.add(d),()=>s.checkout.delete(d)},price(d){return s.price.add(d),()=>s.price.delete(d)},has:d=>s.price.has(d)||s.checkout.has(d)}},get settings(){return i}})),a.debug("Activated:",{literals:o,settings:i});let l=new CustomEvent(li,{bubbles:!0,cancelable:!1,detail:this});performance.mark(Us),y(this,Nr,performance.measure(Us,Fs)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Fs),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}isPreview(){let r=this.getAttribute("preview");return r!=null&&["true","on",!0].includes(r)}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(ur).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Ne(h(this,Nr))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:a})=>a>this.lastLoggingTime).filter(({transferSize:a,duration:n,responseStatus:o})=>a===0&&n===0&&o<200||o>=400),i=Array.from(new Map(r.map(a=>[a.name,a])).values());if(i.some(({name:a})=>/(\/fragment\?|web_commerce_artifact)/.test(a))){let a=i.map(({name:n})=>n);this.log.error("Failed requests:",{failedUrls:a,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};Nr=new WeakMap,It=new WeakMap,ut=new WeakSet,Gs=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(a=>{let n=this.getAttribute(a);n&&(i[a]=n)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(a=>{let n=this.getAttribute(a);if(n!=null){let o=a.replace(/-([a-z])/g,s=>s[1].toUpperCase());i.commerce[o]=n}}),i},pn=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||F(r))};window.customElements.get(Bs)||window.customElements.define(Bs,hn);var Ir=class Ir extends Ei(HTMLButtonElement){static createCheckoutButton(t={},r=""){return wi(Ir,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};m(Ir,"is","checkout-button"),m(Ir,"tag","button");var zt=Ir;window.customElements.get(zt.is)||window.customElements.define(zt.is,zt,{extends:zt.tag});function Fh(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var ft,gt=class gt extends HTMLAnchorElement{constructor(){super();m(this,"masElement",new je(this));w(this,ft);this.setAttribute("is",gt.is)}get isUptLink(){return!0}initializeWcsData(r,i){this.setAttribute("data-wcs-osi",r),i&&this.setAttribute("data-promotion-code",i)}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),y(this,ft,mt()),h(this,ft)&&(this.log=h(this,ft).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),y(this,ft,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=mt();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let i=r.collectCheckoutOptions({},this);if(!i.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let a=this.masElement.togglePending(i),n=r.resolveOfferSelectors(i);try{let[[o]]=await Promise.all(n),{country:s,language:c,env:l}=i,d=`locale=${c}_${s}&country=${s}&offer_id=${o.offerId}`,p=this.getAttribute("data-promotion-code");p&&(d+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${Fh(l)}?${d}`,this.masElement.toggleResolved(a,o,i)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${i.wcsOsi}.`,o.message);return this.masElement.toggleFailed(a,s,i),!1}}static createFrom(r){let i=new gt;for(let a of r.attributes)a.name!=="is"&&(a.name==="class"&&a.value.includes("upt-link")?i.setAttribute("class",a.value.replace("upt-link","").trim()):i.setAttribute(a.name,a.value));return i.innerHTML=r.innerHTML,i.setAttribute("tabindex",0),i}};ft=new WeakMap,m(gt,"is","upt-link"),m(gt,"tag","a"),m(gt,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var Ye=gt;window.customElements.get(Ye.is)||window.customElements.define(Ye.is,Ye,{extends:Ye.tag});P();P();var H="(max-width: 767px)",re="(max-width: 1199px)",B="(min-width: 768px)",_="(min-width: 1200px)",oe="(min-width: 1600px)",dc={matchMobile:window.matchMedia(H),matchDesktop:window.matchMedia(`${_} and (not ${oe})`),matchDesktopOrUp:window.matchMedia(_),matchLargeDesktop:window.matchMedia(oe),get isMobile(){return this.matchMobile.matches},get isDesktop(){return this.matchDesktop.matches},get isDesktopOrUp(){return this.matchDesktopOrUp.matches}},R=dc;function Ui(){return dc.isDesktop}var hc=b` +`,pt.MISSING_INTL_API,o);var O=r.getPluralRules(t,{type:d.pluralType}).select(u-(d.offset||0));C=d.options[O]||d.options.other}if(!C)throw new tn(d.value,u,Object.keys(d.options),o);s.push.apply(s,Pr(C.value,t,r,i,a,u-(d.offset||0)));continue}}return bh(s)}function wh(e,t){return t?L(L(L({},e||{}),t||{}),Object.keys(e).reduce(function(r,i){return r[i]=L(L({},e[i]),t[i]||{}),r},{})):e}function Eh(e,t){return t?Object.keys(e).reduce(function(r,i){return r[i]=wh(e[i],t[i]),r},L({},e)):e}function rn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Ah(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:kr(function(){for(var t,r=[],i=0;i0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=hs,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var vs=fs;var an={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},Sh=ho("ConsonantTemplates/price"),Ch=/<\/?[^>]+(>|$)/g,j={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerPromoStrikethrough:"price-promo-strikethrough",containerAlternative:"price-alternative",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",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"},We={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},nn="TAX_EXCLUSIVE",Th=e=>so(e)?Object.entries(e).filter(([,t])=>Rt(t)||pi(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+oo(i)+'"'}`,""):"",Y=(e,t,r,i=!1)=>`${i?Lo(t):t??""}`;function kh(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("",">");e=e.replaceAll(i,a)}),e}function _h(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("<a ","");e=e.replaceAll(i,a)}),e}function He(e,t,r,i){let a=e[r];if(a==null)return"";let n=a.includes("<"),o=a.includes("${t}`:r&&(x=`${r}`),c&&(x+=f+v),x+=Y(j.integer,s),x+=Y(j.decimalsDelimiter,n),x+=Y(j.decimals,a),c||(x+=v+f),x+=Y(j.recurrence,l,null,!0),x+=Y(j.unitType,d,null,!0),x+=Y(j.taxInclusivity,p,!0),Y(e,x,{...u})}var ae=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayPromoStrikethrough:i=!1,displayAnnual:a=!1,instant:n=void 0}={})=>({country:o,displayFormatted:s=!0,displayRecurrence:c=!0,displayPerUnit:l=!1,displayTax:d=!1,language:p,literals:u={},quantity:f=1,space:v=!1,isPromoApplied:x=!1}={},{commitment:S,offerSelectorIds:z,formatString:I,price:C,priceWithoutDiscount:O,taxDisplay:K,taxTerm:q,term:Q,usePrecision:ee,promotion:de}={},ie={})=>{Object.entries({country:o,formatString:I,language:p,price:C}).forEach(([Pl,Ll])=>{if(Ll==null)throw new Error(`Argument "${Pl}" is missing for osi ${z?.toString()}, country ${o}, language ${p}`)});let W={...an,...u},$=`${p.toLowerCase()}-${o.toUpperCase()}`,he;de&&!x&&O?he=e||i?C:O:r&&O?he=O:he=C;let be=t?Ro:Oo;a&&(be=No);let{accessiblePrice:Tt,recurrenceTerm:Wn,...Yn}=be({commitment:S,formatString:I,instant:n,isIndianPrice:o==="IN",originalPrice:C,priceWithoutDiscount:O,price:t?C:he,promotion:de,quantity:f,term:Q,usePrecision:ee}),ea="",ta="",ra="";T(c)&&Wn&&(ra=He(W,$,We.recurrenceLabel,{recurrenceTerm:Wn}));let oi="";T(l)&&(v&&(oi+=" "),oi+=He(W,$,We.perUnitLabel,{perUnit:"LICENSE"}));let si="";T(d)&&q&&(v&&(si+=" "),si+=He(W,$,K===nn?We.taxExclusiveLabel:We.taxInclusiveLabel,{taxTerm:q})),r&&(ea=He(W,$,We.strikethroughAriaLabel,{strikethroughPrice:ea})),e&&(ta=He(W,$,We.alternativePriceAriaLabel,{alternativePrice:ta}));let Je=j.container;if(t&&(Je+=" "+j.containerOptical),r&&(Je+=" "+j.containerStrikethrough),i&&(Je+=" "+j.containerPromoStrikethrough),e&&(Je+=" "+j.containerAlternative),a&&(Je+=" "+j.containerAnnual),T(s))return Ph(Je,{...Yn,accessibleLabel:ea,altAccessibleLabel:ta,recurrenceLabel:ra,perUnitLabel:oi,taxInclusivityLabel:si},ie);let{currencySymbol:Xn,decimals:Sl,decimalsDelimiter:Cl,hasCurrencySpace:Kn,integer:Tl,isCurrencyFirst:kl}=Yn,kt=[Tl,Cl,Sl];kl?(kt.unshift(Kn?"\xA0":""),kt.unshift(Xn)):(kt.push(Kn?"\xA0":""),kt.push(Xn)),kt.push(ra,oi,si);let _l=kt.join("");return Y(Je,_l,ie)},xs=()=>(e,t,r)=>{let i=dt(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n=(e.displayOldPrice===void 0||T(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${n?ae({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${ae({isAlternativePrice:n})({isPromoApplied:i,...e},t,r)}`},bs=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let a=dt(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:a};if(!a)return ae()(e,{...t,price:t.priceWithoutDiscount},r)+Y(j.containerAnnualPrefix," (")+ae({displayAnnual:!0,instant:i})(n,{...t,price:t.priceWithoutDiscount},r)+Y(j.containerAnnualSuffix,")");let s=(e.displayOldPrice===void 0||T(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${s?ae({displayStrikethrough:!0})(n,t,r)+" ":""}${ae({isAlternativePrice:s})({isPromoApplied:a,...e},t,r)}${Y(j.containerAnnualPrefix," (")}${ae({displayAnnual:!0,instant:i})(n,t,r)}${Y(j.containerAnnualSuffix,")")}`},ys=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${ae({isAlternativePrice:e.displayOldPrice})(e,t,r)}${Y(j.containerAnnualPrefix," (")}${ae({displayAnnual:!0})(i,t,r)}${Y(j.containerAnnualSuffix,")")}`};var Lr={...j,containerLegal:"price-legal",planType:"price-plan-type"},Oi={...We,planTypeLabel:"planTypeLabel"};function Lh(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},a={}){let n="";return n+=Y(Lr.unitType,t,null,!0),r&&i&&(r+=". "),n+=Y(Lr.taxInclusivity,r,!0),n+=Y(Lr.planType,i,null),Y(e,n,{...a})}var ws=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:a,literals:n={}}={},{taxDisplay:o,taxTerm:s,planType:c}={},l={})=>{let d={...an,...n},p=`${a.toLowerCase()}-${e.toUpperCase()}`,u="";T(t)&&(u=He(d,p,Oi.perUnitLabel,{perUnit:"LICENSE"}));let f="";e==="US"&&a==="en"&&(r=!1),T(r)&&s&&(f=He(d,p,o===nn?Oi.taxExclusiveLabel:Oi.taxInclusiveLabel,{taxTerm:s}));let v="";T(i)&&c&&(v=He(d,p,Oi.planTypeLabel,{planType:c}));let x=Lr.container;return x+=" "+Lr.containerLegal,Lh(x,{perUnitLabel:u,taxInclusivityLabel:f,planTypeLabel:v},l)};var Es=ae(),As=xs(),Ss=ae({displayOptical:!0}),Cs=ae({displayStrikethrough:!0}),Ts=ae({displayPromoStrikethrough:!0}),ks=ae({displayAnnual:!0}),_s=ae({displayOptical:!0,isAlternativePrice:!0}),Ps=ae({isAlternativePrice:!0}),Ls=ys(),Ms=bs(),Rs=ws;var Mh=(e,t)=>{if(!(!xr(e)||!xr(t)))return Math.floor((t-e)/t*100)},Os=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,a=Mh(r,i);return a===void 0?'':`${a}%`};var Ns=Os();var Is="INDIVIDUAL_COM",sn="TEAM_COM",zs="INDIVIDUAL_EDU",cn="TEAM_EDU",Rh=["AT_de","AU_en","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","CO_es","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","FR_fr","GB_en","GR_el","GR_en","HU_hu","ID_en","ID_id","ID_in","IE_en","IN_en","IN_hi","IT_it","JP_ja","KR_ko","LU_de","LU_en","LU_fr","LT_lt","LV_lv","MY_en","MY_ms","MU_en","NL_nl","NG_en","NO_nb","NZ_en","PE_es","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","SG_en","TH_en","TH_th","TR_tr","UA_uk","ZA_en","SA_ar","SA_en","MX_es","CL_es","PE_es","AR_es"],Oh={[Is]:[],[sn]:["VN_vi","VN_en","TW_zh"],[zs]:[],[cn]:["VN_vi","VN_en","TW_zh"]},Nh={MU_en:[!0,!0,!0,!0],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],ZA_en:[!1,!1,!1,!1],PE_es:[!1,!1,!1,!1]},Ih=[Is,sn,zs,cn],zh=e=>[sn,cn].includes(e);function on(e,t,r,i){if(e[t])return e[t];let a=`${t}_${r}`;if(e[a])return e[a];let n;if(i)n=e.find(o=>o.startsWith(`${t}_`));else{let o=Object.keys(e).find(s=>s.startsWith(`${t}_`));n=o?e[o]:null}return n}var Dh=(e,t,r,i)=>{let a=`${r}_${i}`,n=on(Nh,e,t,!1);if(n){let o=Ih.indexOf(a);return n[o]}return zh(a)},$h=(e,t,r,i)=>{if(on(Rh,e,t,!0))return!0;let a=Oh[`${r}_${i}`];return a?on(a,e,t,!0)?!0:N.displayTax:N.displayTax},Ni=async(e,t,r,i)=>{let a=$h(e,t,r,i);return{displayTax:a,forceTaxExclusive:a?Dh(e,t,r,i):N.forceTaxExclusive}},Mr=class Mr extends HTMLSpanElement{constructor(){super();m(this,"masElement",new je(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=pe();if(!i)return null;let{displayOldPrice:a,displayPerUnit:n,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:f,alternativePrice:v,template:x,wcsOsi:S}=i.collectPriceOptions(r);return yi(Mr,{displayOldPrice:a,displayPerUnit:n,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:f,alternativePrice:v,template:x,wcsOsi:S})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===Te}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=pe();if(!i)return!1;let a=i.collectPriceOptions(r,this),n={...i.settings,...a};if(!n.wcsOsi.length)return!1;try{let o=this.masElement.togglePending({});this.innerHTML="";let s=i.resolveOfferSelectors(n),c=await Promise.all(s),l=c.map(f=>{let v=wr(f,n);return v?.length?v[0]:null});if(l.some(f=>!f))throw new Error(`Failed to select offers for: ${n.wcsOsi}`);let d=l,p=$a(l);if(i.featureFlags[ke]||n[ke]){if(a.displayPerUnit===void 0&&(n.displayPerUnit=p.customerSegment!=="INDIVIDUAL"),a.displayTax===void 0||a.forceTaxExclusive===void 0){let{country:f,language:v}=n,[x=""]=p.marketSegments,S=await Ni(f,v,p.customerSegment,x);a.displayTax===void 0&&(n.displayTax=S?.displayTax||n.displayTax),a.forceTaxExclusive===void 0&&(n.forceTaxExclusive=S?.forceTaxExclusive||n.forceTaxExclusive),n.forceTaxExclusive&&(d=c.map(z=>{let I=wr(z,n);return I?.length?I[0]:null}))}}else a.displayOldPrice===void 0&&(n.displayOldPrice=!0);if(i.featureFlags[Mt]&&n.displayAnnual!==!1&&(n.displayAnnual=!0),n.template==="discount"&&d.length===2){let[f,v]=d,x={...f,priceDetails:{...f.priceDetails,priceWithoutDiscount:v.priceDetails?.price}};return this.renderOffers([x],n,o)}let u=$a(d);return this.renderOffers([u],n,o)}catch(o){throw this.innerHTML="",o}}renderOffers(r,i,a=void 0){if(!this.isConnected)return;let n=pe();if(!n)return!1;if(a??(a=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(a,r,i)){this.innerHTML=n.buildPriceHTML(r,this.options);let o=this.closest("p, h3, div");if(!o||!o.querySelector('span[data-template="strikethrough"]')||o.querySelector(".alt-aria-label"))return!0;let s=o?.querySelectorAll('span[is="inline-price"]');return s.length>1&&s.length===o.querySelectorAll('span[data-template="strikethrough"]').length*2&&s.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=n.buildPriceHTML(r,c.options))}),!0}}else{let o=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,o,this.options))return this.innerHTML="",!0}return!1}};m(Mr,"is","inline-price"),m(Mr,"tag","span");var Be=Mr;window.customElements.get(Be.is)||window.customElements.define(Be.is,Be,{extends:Be.tag});function Ds({literals:e,providers:t,settings:r}){function i(o,s=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(s&&t?.price)for(let q of t.price)q(s,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:p,displayTax:u,displayPlanType:f,forceTaxExclusive:v,perpetual:x,displayAnnual:S,promotionCode:z,quantity:I,alternativePrice:C,wcsOsi:O,...K}=Object.assign(c,s?.dataset??{},o??{});return c=mi(Object.assign({...c,...K,displayOldPrice:T(l),displayPerUnit:T(d),displayRecurrence:T(p),displayTax:T(u),displayPlanType:T(f),forceTaxExclusive:T(v),perpetual:T(x),displayAnnual:T(S),promotionCode:gi(z).effectivePromoCode,quantity:Ot(I,N.quantity),alternativePrice:T(C),wcsOsi:xi(O)})),c}function a(o,s){if(!Array.isArray(o)||!o.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=Ns;break;case"strikethrough":l=Cs;break;case"promo-strikethrough":l=Ts;break;case"annual":l=ks;break;case"legal":l=Rs;break;default:s.template==="optical"&&s.alternativePrice?l=_s:s.template==="optical"?l=Ss:s.displayAnnual&&o[0].planType==="ABM"?l=s.promotionCode?Ms:Ls:s.alternativePrice?l=Ps:l=s.promotionCode?As:Es}let[d]=o;return d={...d,...d.priceDetails},l({...r,...s},d)}let n=Be.createInlinePrice;return{InlinePrice:Be,buildPriceHTML:a,collectPriceOptions:i,createInlinePrice:n}}function Hh({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||N.language),t??(t=e?.split("_")?.[1]||N.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function $s(e={},t){let r=t.featureFlags[ke],{commerce:i={}}=e,a=Re.PRODUCTION,n=xa,o=F("checkoutClientId",i)??N.checkoutClientId,s=br(F("checkoutWorkflowStep",i),ce,N.checkoutWorkflowStep),c=T(F("displayOldPrice",i),N.displayOldPrice),l=N.displayPerUnit,d=T(F("displayRecurrence",i),N.displayRecurrence),p=T(F("displayTax",i),N.displayTax),u=T(F("displayPlanType",i),N.displayPlanType),f=T(F("entitlement",i),N.entitlement),v=T(F("modal",i),N.modal),x=T(F("forceTaxExclusive",i),N.forceTaxExclusive),S=F("promotionCode",i)??N.promotionCode,z=Ot(F("quantity",i)),I=F("wcsApiKey",i)??N.wcsApiKey,C=i?.env==="stage",O=Ve.PUBLISHED;["true",""].includes(i.allowOverride)&&(C=(F(fa,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",O=br(F(va,i),Ve,O)),C&&(a=Re.STAGE,n=ba);let q=F(ga)??e.preview,Q=typeof q<"u"&&q!=="off"&&q!=="false",ee={};Q&&(ee={preview:Q});let de=F("mas-io-url")??e.masIOUrl??`https://www${a===Re.STAGE?".stage":""}.adobe.com/mas/io`,ie=F("preselect-plan")??void 0;return{...Hh(e),...ee,displayOldPrice:c,checkoutClientId:o,checkoutWorkflowStep:s,displayPerUnit:l,displayRecurrence:d,displayTax:p,displayPlanType:u,entitlement:f,extraOptions:N.extraOptions,modal:v,env:a,forceTaxExclusive:x,promotionCode:S,quantity:z,alternativePrice:N.alternativePrice,wcsApiKey:I,wcsURL:n,landscape:O,masIOUrl:de,...ie&&{preselectPlan:ie}}}async function Ii(e,t={},r=2,i=100){let a;for(let n=0;n<=r;n++)try{let o=await fetch(e,t);return o.retryCount=n,o}catch(o){if(a=o,a.retryCount=n,n>r)break;await new Promise(s=>setTimeout(s,i*(n+1)))}throw a}var Bh="mas-commerce-service";function Rr(e,t){let r;return function(){let i=this,a=arguments;clearTimeout(r),r=setTimeout(()=>e.apply(i,a),t)}}function ne(e,t={},r=null,i=null){let a=i?document.createElement(e,{is:i}):document.createElement(e);r instanceof HTMLElement?a.appendChild(r):a.innerHTML=r;for(let[n,o]of Object.entries(t))a.setAttribute(n,o);return a}function Ne(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function ln(){return window.matchMedia("(max-width: 1024px)").matches}function mt(){return document.getElementsByTagName(Bh)?.[0]}function Or(e){let t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}var dn="wcs";function Hs({settings:e}){let t=le.module(dn),{env:r,wcsApiKey:i}=e,a=new Map,n=new Map,o,s=new Map;async function c(v,x,S=!0){let z=pe(),I=pa;t.debug("Fetching:",v);let C="",O;if(v.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let K=new Map(x),[q]=v.offerSelectorIds,Q=Date.now()+Math.random().toString(36).substring(2,7),ee=`${dn}:${q}:${Q}${st}`,de=`${dn}:${q}:${Q}${ct}`,ie;try{if(performance.mark(ee),C=new URL(e.wcsURL),C.searchParams.set("offer_selector_ids",q),C.searchParams.set("country",v.country),C.searchParams.set("locale",v.locale),C.searchParams.set("landscape",r===Re.STAGE?"ALL":e.landscape),C.searchParams.set("api_key",i),v.language&&C.searchParams.set("language",v.language),v.promotionCode&&C.searchParams.set("promotion_code",v.promotionCode),v.currency&&C.searchParams.set("currency",v.currency),O=await Ii(C.toString(),{credentials:"omit"}),O.ok){let W=[];try{let $=await O.json();t.debug("Fetched:",v,$),W=$.resolvedOffers??[]}catch($){t.error(`Error parsing JSON: ${$.message}`,{...$.context,...z?.duration})}W=W.map(yr),x.forEach(({resolve:$},he)=>{let be=W.filter(({offerSelectorIds:Tt})=>Tt.includes(he)).flat();be.length&&(K.delete(he),x.delete(he),$(be))})}else I=ha}catch(W){I=`Network error: ${W.message}`}finally{ie=performance.measure(de,ee),performance.clearMarks(ee),performance.clearMeasures(de)}if(S&&x.size){t.debug("Missing:",{offerSelectorIds:[...x.keys()]});let W=bi(O);x.forEach($=>{$.reject(new Oe(I,{...v,...W,response:O,measure:Ne(ie),...z?.duration}))})}}function l(){clearTimeout(o);let v=[...n.values()];n.clear(),v.forEach(({options:x,promises:S})=>c(x,S))}function d(v){if(!v||typeof v!="object")throw new TypeError("Cache must be a Map or similar object");let x=r===Re.STAGE?"stage":"prod",S=v[x];if(!S||typeof S!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[z,I]of Object.entries(S))a.set(z,Promise.resolve(I.map(yr)));t.debug(`Prefilled WCS cache with ${S.size} entries`)}function p(){let v=a.size;s=new Map(a),a.clear(),t.debug(`Moved ${v} cache entries to stale cache`)}function u(v,x,S){let z=v!=="GB"&&!S?"MULT":"en",I=wa.includes(v)?v:N.country;return{validCountry:I,validLanguage:z,locale:`${x}_${I}`}}function f({country:v,language:x,perpetual:S=!1,promotionCode:z="",wcsOsi:I=[]}){let{validCountry:C,validLanguage:O,locale:K}=u(v,x,S),q=[C,O,z].filter(Q=>Q).join("-").toLowerCase();return I.map(Q=>{let ee=`${Q}-${q}`;if(a.has(ee))return a.get(ee);let de=new Promise((ie,W)=>{let $=n.get(q);$||($={options:{country:C,locale:K,...O==="MULT"&&{language:O},offerSelectorIds:[]},promises:new Map},n.set(q,$)),z&&($.options.promotionCode=z),$.options.offerSelectorIds.push(Q),$.promises.set(Q,{resolve:ie,reject:W}),l()}).catch(ie=>{if(s.has(ee))return s.get(ee);throw ie});return a.set(ee,de),de})}return{Commitment:rt,PlanType:mo,Term:ye,applyPlanType:yr,resolveOfferSelectors:f,flushWcsCacheInternal:p,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var Bs="mas-commerce-service",Fs="mas-commerce-service:start",Us="mas-commerce-service:ready",Nr,It,ut,Gs,pn,hn=class extends HTMLElement{constructor(){super(...arguments);w(this,ut);w(this,Nr);w(this,It);m(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,a,n)=>{let o=await r?.(i,a,this.imsSignedInPromise,n);return o||null})}get featureFlags(){return h(this,It)||y(this,It,{[ke]:Z(this,ut,pn).call(this,ke),[Mt]:Z(this,ut,pn).call(this,Mt)}),h(this,It)}activate(){let r=h(this,ut,Gs),i=$s(r,this);ci(r.lana);let a=le.init(r.hostEnv).module("service");a.debug("Activating:",r);let o={price:qo(i)},s={checkout:new Set,price:new Set},c={literals:o,providers:s,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...Fo(c),...Uo(c),...Ds(c),...Hs(c),...Ea,Log:le,resolvePriceTaxFlags:Ni,get defaults(){return N},get log(){return le},get providers(){return{checkout(d){return s.checkout.add(d),()=>s.checkout.delete(d)},price(d){return s.price.add(d),()=>s.price.delete(d)},has:d=>s.price.has(d)||s.checkout.has(d)}},get settings(){return i}})),a.debug("Activated:",{literals:o,settings:i});let l=new CustomEvent(li,{bubbles:!0,cancelable:!1,detail:this});performance.mark(Us),y(this,Nr,performance.measure(Us,Fs)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Fs),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}isPreview(){let r=this.getAttribute("preview");return r!=null&&["true","on",!0].includes(r)}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(ur).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Ne(h(this,Nr))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:a})=>a>this.lastLoggingTime).filter(({transferSize:a,duration:n,responseStatus:o})=>a===0&&n===0&&o<200||o>=400),i=Array.from(new Map(r.map(a=>[a.name,a])).values());if(i.some(({name:a})=>/(\/fragment\?|web_commerce_artifact)/.test(a))){let a=i.map(({name:n})=>n);this.log.error("Failed requests:",{failedUrls:a,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};Nr=new WeakMap,It=new WeakMap,ut=new WeakSet,Gs=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(a=>{let n=this.getAttribute(a);n&&(i[a]=n)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(a=>{let n=this.getAttribute(a);if(n!=null){let o=a.replace(/-([a-z])/g,s=>s[1].toUpperCase());i.commerce[o]=n}}),i},pn=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||F(r))};window.customElements.get(Bs)||window.customElements.define(Bs,hn);var Ir=class Ir extends Ei(HTMLButtonElement){static createCheckoutButton(t={},r=""){return wi(Ir,t,r)}setCheckoutUrl(t){this.setAttribute("data-href",t)}get href(){return this.getAttribute("data-href")}get isCheckoutButton(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}this.href&&(window.location.href=this.href)}};m(Ir,"is","checkout-button"),m(Ir,"tag","button");var zt=Ir;window.customElements.get(zt.is)||window.customElements.define(zt.is,zt,{extends:zt.tag});function Fh(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var ft,gt=class gt extends HTMLAnchorElement{constructor(){super();m(this,"masElement",new je(this));w(this,ft);this.setAttribute("is",gt.is)}get isUptLink(){return!0}initializeWcsData(r,i){this.setAttribute("data-wcs-osi",r),i&&this.setAttribute("data-promotion-code",i)}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),y(this,ft,mt()),h(this,ft)&&(this.log=h(this,ft).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),y(this,ft,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=mt();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let i=r.collectCheckoutOptions({},this);if(!i.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let a=this.masElement.togglePending(i),n=r.resolveOfferSelectors(i);try{let[[o]]=await Promise.all(n),{country:s,language:c,env:l}=i,d=`locale=${c}_${s}&country=${s}&offer_id=${o.offerId}`,p=this.getAttribute("data-promotion-code");p&&(d+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${Fh(l)}?${d}`,this.masElement.toggleResolved(a,o,i)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${i.wcsOsi}.`,o.message);return this.masElement.toggleFailed(a,s,i),!1}}static createFrom(r){let i=new gt;for(let a of r.attributes)a.name!=="is"&&(a.name==="class"&&a.value.includes("upt-link")?i.setAttribute("class",a.value.replace("upt-link","").trim()):i.setAttribute(a.name,a.value));return i.innerHTML=r.innerHTML,i.setAttribute("tabindex",0),i}};ft=new WeakMap,m(gt,"is","upt-link"),m(gt,"tag","a"),m(gt,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var Ye=gt;window.customElements.get(Ye.is)||window.customElements.define(Ye.is,Ye,{extends:Ye.tag});P();P();var H="(max-width: 767px)",re="(max-width: 1199px)",B="(min-width: 768px)",_="(min-width: 1200px)",oe="(min-width: 1600px)",dc={matchMobile:window.matchMedia(H),matchDesktop:window.matchMedia(`${_} and (not ${oe})`),matchDesktopOrUp:window.matchMedia(_),matchLargeDesktop:window.matchMedia(oe),get isMobile(){return this.matchMobile.matches},get isDesktop(){return this.matchDesktop.matches},get isDesktopOrUp(){return this.matchDesktopOrUp.matches}},R=dc;function Ui(){return dc.isDesktop}var hc=b` :host { --consonant-merch-card-background-color: #fff; --consonant-merch-card-border: 1px solid @@ -1311,7 +1311,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { grid-template-columns: repeat(4, var(--consonant-merch-card-image-width)); } } -`;var fc={cardName:{attribute:"name"},badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},badgeIcon:!0,borderColor:{attribute:"border-color"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],ctas:{slot:"footer",size:"m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"h3",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},size:["wide","super-wide"],title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},backgroundImage:{tag:"div",slot:"bg-image"}},wt=class extends A{constructor(t){super(t)}getGlobalCSS(){return gc}renderLayout(){return g`
+`;var fc={cardName:{attribute:"name"},badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},badgeIcon:!0,borderColor:{attribute:"border-color"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],ctas:{slot:"footer",size:"m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"h3",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},size:["wide","super-wide"],title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},backgroundImage:{tag:"div",slot:"bg-image"}},wt=class extends A{constructor(t){super(t)}getGlobalCSS(){return gc}renderLayout(){return g`
@@ -1355,7 +1355,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { left: 0px; right: initial; } - `);P();var xc=` + `);P();var vc=` :root { --consonant-merch-card-inline-heading-width: 300px; } @@ -1391,7 +1391,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { grid-template-columns: repeat(4, var(--consonant-merch-card-inline-heading-width)); } } -`;var ji=class extends A{constructor(t){super(t)}getGlobalCSS(){return xc}renderLayout(){return g` ${this.badge} +`;var ji=class extends A{constructor(t){super(t)}getGlobalCSS(){return vc}renderLayout(){return g` ${this.badge}
@@ -1399,7 +1399,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary {
- ${this.card.customHr?"":g`
`} ${this.secureLabelFooter}`}};P();var vc=` + ${this.card.customHr?"":g`
`} ${this.secureLabelFooter}`}};P();var xc=` :root { --consonant-merch-card-mini-compare-chart-icon-size: 32px; --consonant-merch-card-mini-compare-border-color: #E9E9E9; @@ -1691,10 +1691,16 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { } /* Style each mnemonic-list as a footer row */ + /* + * Public API: --merch-whats-included-divider-color + * Set on (or any ancestor) to recolor the row divider + * above each merch-mnemonic-list row inside merch-whats-included. + * Fallback preserves the existing variant color for unset consumers. + */ merch-card[variant="mini-compare-chart"] merch-mnemonic-list { width: 100%; margin-inline: 0; - border-top: 1px solid var(--consonant-merch-card-mini-compare-border-color); + border-top: 1px solid var(--merch-whats-included-divider-color, var(--consonant-merch-card-mini-compare-border-color)); display: flex; gap: var(--consonant-merch-spacing-xs); justify-content: start; @@ -2196,14 +2202,14 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(7) { merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { min-height: var(--consonant-merch-card-footer-row-8-min-height); } -`;var Xh=32,bc={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-xxs"},description:{tag:"div",slot:"body-m"},mnemonics:{size:"l"},quantitySelect:{tag:"div",slot:"quantity-select"},callout:{tag:"div",slot:"callout-content"},addon:!0,secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],whatsIncluded:{tag:"div",slot:"footer-rows"},ctas:{slot:"footer",size:"l"},style:"consonant"},Vt=class extends A{constructor(r){super(r);m(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);m(this,"getMiniCompareFooter",()=>{let r=this.card.secureLabel?g` +`;var Xh=32,bc={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-xxs"},description:{tag:"div",slot:"body-m"},mnemonics:{size:"l"},quantitySelect:{tag:"div",slot:"quantity-select"},callout:{tag:"div",slot:"callout-content"},addon:!0,secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],borderColor:{attribute:"border-color"},allowedWhatsIncludedDividerColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],whatsIncludedDividerColor:{attribute:"whats-included-divider-color"},size:["wide","super-wide"],whatsIncluded:{tag:"div",slot:"footer-rows"},ctas:{slot:"footer",size:"l"},style:"consonant"},Vt=class extends A{constructor(r){super(r);m(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);m(this,"getMiniCompareFooter",()=>{let r=this.card.secureLabel?g` ${this.card.secureLabel}`:g``;return this.isNewVariant?g`
${r}

-
`:g`
${r}
`});this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(te,this.updatePriceQuantity),this.visibilityObserver=new IntersectionObserver(([r])=>{r.boundingClientRect.height!==0&&r.isIntersecting&&(R.isMobile||requestAnimationFrame(()=>{let i=this.getContainer();if(!i)return;i.querySelectorAll('merch-card[variant="mini-compare-chart"]').forEach(n=>n.variantLayout?.syncHeights?.())}),this.visibilityObserver.disconnect())}),this.visibilityObserver.observe(this.card)}disconnectedCallbackHook(){if(this.card.removeEventListener(te,this.updatePriceQuantity),this.visibilityObserver?.disconnect(),this.calloutListenersAdded){document.removeEventListener("touchstart",this.handleCalloutTouch),document.removeEventListener("mouseover",this.handleCalloutMouse);let r=this.card.querySelector('[slot="callout-content"] .icon-button');r?.removeEventListener("focusin",this.handleCalloutFocusin),r?.removeEventListener("focusout",this.handleCalloutFocusout),r?.removeEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!1}}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,i){if(this.isNewVariant){if(r.dataset.template===xe){i.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(i.displayPerUnit=!1)}}getGlobalCSS(){return vc}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2)return;this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(".top-section"),"top-section");let r=["heading-m","subtitle","body-m","heading-m-price","body-xxs","price-commitment","quantity-select","offers","promo-text","callout-content","addon"];this.card.classList.contains("bullet-list")&&r.push("footer-rows"),r.forEach(a=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${a}"]`),a)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer"),this.card.shadowRoot.querySelector(".mini-compare-chart-badge")?.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r;if(this.isNewVariant){let i=this.card.querySelector("merch-whats-included");if(!i)return;r=[...i.querySelectorAll('[slot="content"] merch-mnemonic-list')]}else{let i=this.card.querySelector('[slot="footer-rows"] ul');if(!i||!i.children)return;r=[...i.children]}r.length&&r.forEach((i,a)=>{let n=Math.max(Xh,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(a+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(a+1),`${n}px`)})}removeEmptyRows(){this.isNewVariant?this.card.querySelectorAll("merch-whats-included merch-mnemonic-list").forEach(i=>{let a=i.querySelector('[slot="description"]');a&&!a.textContent.trim()&&i.remove()}):this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let a=i.querySelector(".footer-row-cell-description");a&&!a.textContent.trim()&&i.remove()})}padFooterRows(){let r=this.getContainer();if(!r)return;let i=r.querySelectorAll('merch-card[variant="mini-compare-chart"]');if(this.isNewVariant){let a=0;if(i.forEach(l=>{let d=l.querySelector("merch-whats-included");if(!d)return;let p=d.querySelectorAll('[slot="content"] merch-mnemonic-list:not([data-placeholder])');a=Math.max(a,p.length)}),a===0)return;let n=this.card.querySelector("merch-whats-included");if(!n)return;let o=n.querySelector('[slot="content"]');if(!o)return;o.querySelectorAll("merch-mnemonic-list[data-placeholder]").forEach(l=>l.remove());let s=o.querySelectorAll("merch-mnemonic-list").length,c=a-s;for(let l=0;l{let l=c.querySelector('[slot="footer-rows"] ul');if(!l)return;let d=l.querySelectorAll("li.footer-row-cell:not([data-placeholder])");a=Math.max(a,d.length)}),a===0)return;let n=this.card.querySelector('[slot="footer-rows"] ul');if(!n)return;n.querySelectorAll("li.footer-row-cell[data-placeholder]").forEach(c=>c.remove());let o=n.querySelectorAll("li.footer-row-cell").length,s=a-o;for(let c=0;cs.remove()),r.checked){if(o){let s=ne("p",{class:"addon-heading-m-price-addon",slot:"heading-m-price"},o.innerHTML);this.card.appendChild(s)}}else{let s=ne("p",{class:"card-heading",id:"free",slot:"heading-m-price"},"Free");this.card.appendChild(s)}}}showTooltip(r){r.classList.remove("hide-tooltip"),r.setAttribute("aria-expanded","true")}hideTooltip(r){r.classList.add("hide-tooltip"),r.setAttribute("aria-expanded","false")}adjustCallout(){let r=this.card.querySelector('[slot="callout-content"] .icon-button');if(!r||this.calloutListenersAdded)return;let i=r.title||r.dataset.tooltip;if(!i)return;r.title&&(r.dataset.tooltip=r.title,r.removeAttribute("title"));let a=r.parentElement;if(a&&a.tagName==="P"){let n=document.createElement("div"),o=document.createElement("div");o.className="callout-row";let s=document.createElement("div");for(s.className="callout-text";a.firstChild&&a.firstChild!==r;)s.appendChild(a.firstChild);o.appendChild(s),o.appendChild(r),n.appendChild(o),a.replaceWith(n)}r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("aria-label",i),r.setAttribute("aria-expanded","false"),this.hideTooltip(r),this.handleCalloutTouch=n=>{n.target!==r?this.hideTooltip(r):r.classList.contains("hide-tooltip")?this.showTooltip(r):this.hideTooltip(r)},this.handleCalloutMouse=n=>{n.target!==r?this.hideTooltip(r):this.showTooltip(r)},this.handleCalloutFocusin=()=>{this.showTooltip(r)},this.handleCalloutFocusout=()=>{this.hideTooltip(r)},this.handleCalloutKeydown=n=>{n.key==="Escape"&&(this.hideTooltip(r),r.blur())},document.addEventListener("touchstart",this.handleCalloutTouch),document.addEventListener("mouseover",this.handleCalloutMouse),r.addEventListener("focusin",this.handleCalloutFocusin),r.addEventListener("focusout",this.handleCalloutFocusout),r.addEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!0}async adjustAddon(){await this.card.updateComplete;let r=this.card.addon;if(!r)return;let i=this.mainPrice,a=this.card.planType;if(i&&(await i.onceSettled(),a=i.value?.[0]?.planType),!a)return;r.planType=a,this.card.querySelector("merch-addon[plan-type]")?.updateComplete.then(()=>{this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="addon"]'),"addon")})}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let i=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),i.setAttribute("data-template","legal"),r.parentNode.insertBefore(i,r.nextSibling),await i.onceSettled()}catch{}}adjustShortDescription(){let r=this.card.querySelector('[slot="body-xxs"]'),i=r?.textContent?.trim();if(!i)return;let n=this.card.querySelector('[slot="heading-m-price"] [data-template="legal"]')?.querySelector(".price-plan-type");if(!n)return;let o=document.createElement("em");o.setAttribute("slot","body-xxs"),o.textContent=` ${i}`,n.appendChild(o),r.remove()}renderLayout(){return this.isNewVariant?g`
+ `:g`
${r}
`});this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(te,this.updatePriceQuantity),this.visibilityObserver=new IntersectionObserver(([r])=>{r.boundingClientRect.height!==0&&r.isIntersecting&&(R.isMobile||requestAnimationFrame(()=>{let i=this.getContainer();if(!i)return;i.querySelectorAll('merch-card[variant="mini-compare-chart"]').forEach(n=>n.variantLayout?.syncHeights?.())}),this.visibilityObserver.disconnect())}),this.visibilityObserver.observe(this.card)}disconnectedCallbackHook(){if(this.card.removeEventListener(te,this.updatePriceQuantity),this.visibilityObserver?.disconnect(),this.calloutListenersAdded){document.removeEventListener("touchstart",this.handleCalloutTouch),document.removeEventListener("mouseover",this.handleCalloutMouse);let r=this.card.querySelector('[slot="callout-content"] .icon-button');r?.removeEventListener("focusin",this.handleCalloutFocusin),r?.removeEventListener("focusout",this.handleCalloutFocusout),r?.removeEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!1}}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,i){if(this.isNewVariant){if(r.dataset.template===ve){i.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(i.displayPerUnit=!1)}}getGlobalCSS(){return xc}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2)return;this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(".top-section"),"top-section");let r=["heading-m","subtitle","body-m","heading-m-price","body-xxs","price-commitment","quantity-select","offers","promo-text","callout-content","addon"];this.card.classList.contains("bullet-list")&&r.push("footer-rows"),r.forEach(a=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${a}"]`),a)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer"),this.card.shadowRoot.querySelector(".mini-compare-chart-badge")?.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r;if(this.isNewVariant){let i=this.card.querySelector("merch-whats-included");if(!i)return;r=[...i.querySelectorAll('[slot="content"] merch-mnemonic-list')]}else{let i=this.card.querySelector('[slot="footer-rows"] ul');if(!i||!i.children)return;r=[...i.children]}r.length&&r.forEach((i,a)=>{let n=Math.max(Xh,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(a+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(a+1),`${n}px`)})}removeEmptyRows(){this.isNewVariant?this.card.querySelectorAll("merch-whats-included merch-mnemonic-list").forEach(i=>{let a=i.querySelector('[slot="description"]');a&&!a.textContent.trim()&&i.remove()}):this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let a=i.querySelector(".footer-row-cell-description");a&&!a.textContent.trim()&&i.remove()})}padFooterRows(){let r=this.getContainer();if(!r)return;let i=r.querySelectorAll('merch-card[variant="mini-compare-chart"]');if(this.isNewVariant){let a=0;if(i.forEach(l=>{let d=l.querySelector("merch-whats-included");if(!d)return;let p=d.querySelectorAll('[slot="content"] merch-mnemonic-list:not([data-placeholder])');a=Math.max(a,p.length)}),a===0)return;let n=this.card.querySelector("merch-whats-included");if(!n)return;let o=n.querySelector('[slot="content"]');if(!o)return;o.querySelectorAll("merch-mnemonic-list[data-placeholder]").forEach(l=>l.remove());let s=o.querySelectorAll("merch-mnemonic-list").length,c=a-s;for(let l=0;l{let l=c.querySelector('[slot="footer-rows"] ul');if(!l)return;let d=l.querySelectorAll("li.footer-row-cell:not([data-placeholder])");a=Math.max(a,d.length)}),a===0)return;let n=this.card.querySelector('[slot="footer-rows"] ul');if(!n)return;n.querySelectorAll("li.footer-row-cell[data-placeholder]").forEach(c=>c.remove());let o=n.querySelectorAll("li.footer-row-cell").length,s=a-o;for(let c=0;cs.remove()),r.checked){if(o){let s=ne("p",{class:"addon-heading-m-price-addon",slot:"heading-m-price"},o.innerHTML);this.card.appendChild(s)}}else{let s=ne("p",{class:"card-heading",id:"free",slot:"heading-m-price"},"Free");this.card.appendChild(s)}}}showTooltip(r){r.classList.remove("hide-tooltip"),r.setAttribute("aria-expanded","true")}hideTooltip(r){r.classList.add("hide-tooltip"),r.setAttribute("aria-expanded","false")}adjustCallout(){let r=this.card.querySelector('[slot="callout-content"] .icon-button');if(!r||this.calloutListenersAdded)return;let i=r.title||r.dataset.tooltip;if(!i)return;r.title&&(r.dataset.tooltip=r.title,r.removeAttribute("title"));let a=r.parentElement;if(a&&a.tagName==="P"){let n=document.createElement("div"),o=document.createElement("div");o.className="callout-row";let s=document.createElement("div");for(s.className="callout-text";a.firstChild&&a.firstChild!==r;)s.appendChild(a.firstChild);o.appendChild(s),o.appendChild(r),n.appendChild(o),a.replaceWith(n)}r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("aria-label",i),r.setAttribute("aria-expanded","false"),this.hideTooltip(r),this.handleCalloutTouch=n=>{n.target!==r?this.hideTooltip(r):r.classList.contains("hide-tooltip")?this.showTooltip(r):this.hideTooltip(r)},this.handleCalloutMouse=n=>{n.target!==r?this.hideTooltip(r):this.showTooltip(r)},this.handleCalloutFocusin=()=>{this.showTooltip(r)},this.handleCalloutFocusout=()=>{this.hideTooltip(r)},this.handleCalloutKeydown=n=>{n.key==="Escape"&&(this.hideTooltip(r),r.blur())},document.addEventListener("touchstart",this.handleCalloutTouch),document.addEventListener("mouseover",this.handleCalloutMouse),r.addEventListener("focusin",this.handleCalloutFocusin),r.addEventListener("focusout",this.handleCalloutFocusout),r.addEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!0}async adjustAddon(){await this.card.updateComplete;let r=this.card.addon;if(!r)return;let i=this.mainPrice,a=this.card.planType;if(i&&(await i.onceSettled(),a=i.value?.[0]?.planType),!a)return;r.planType=a,this.card.querySelector("merch-addon[plan-type]")?.updateComplete.then(()=>{this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="addon"]'),"addon")})}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let i=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),i.setAttribute("data-template","legal"),r.parentNode.insertBefore(i,r.nextSibling),await i.onceSettled()}catch{}}adjustShortDescription(){let r=this.card.querySelector('[slot="body-xxs"]'),i=r?.textContent?.trim();if(!i)return;let n=this.card.querySelector('[slot="heading-m-price"] [data-template="legal"]')?.querySelector(".price-plan-type");if(!n)return;let o=document.createElement("em");o.setAttribute("slot","body-xxs"),o.textContent=` ${i}`,n.appendChild(o),r.remove()}renderLayout(){return this.isNewVariant?g`
${this.badge}
@@ -2417,28 +2423,46 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { } /* Border color styles */ + :host( + [variant='mini-compare-chart'][border-color='color-yellow-300-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-yellow-300-plans'] ) { - --consonant-merch-card-border-color: #ffd947; + --consonant-merch-card-border-color: var( + --color-yellow-300-variation + ); } + :host( + [variant='mini-compare-chart'][border-color='color-gray-300-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-gray-300-plans'] ) { - --consonant-merch-card-border-color: #dadada; + --consonant-merch-card-border-color: var( + --color-gray-300-variation + ); } + :host( + [variant='mini-compare-chart'][border-color='color-green-900-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-green-900-plans'] ) { - --consonant-merch-card-border-color: #05834e; + --consonant-merch-card-border-color: var( + --color-green-900-variation + ); } + :host( + [variant='mini-compare-chart'][border-color='color-red-700-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-red-700-plans'] ) { - --consonant-merch-card-border-color: #eb1000; + --consonant-merch-card-border-color: var(--color-red-700-variation); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } @@ -2453,43 +2477,60 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { } /* Badge color styles */ + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-red-700-plans) { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-yellow-300-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-yellow-300-plans), + :host([variant='mini-compare-chart']) #badge.color-yellow-300-variation, :host([variant='mini-compare-chart']) #badge.spectrum-yellow-300-plans { - background-color: #ffd947; + background-color: var(--color-yellow-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-gray-300-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-gray-300-plans), + :host([variant='mini-compare-chart']) #badge.color-gray-300-variation, :host([variant='mini-compare-chart']) #badge.spectrum-gray-300-plans { - background-color: #dadada; + background-color: var(--color-gray-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-gray-700-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-gray-700-plans), + :host([variant='mini-compare-chart']) #badge.color-gray-700-variation, :host([variant='mini-compare-chart']) #badge.spectrum-gray-700-plans { - background-color: #4b4b4b; + background-color: var(--color-gray-700-variation); color: #ffffff; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-green-900-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-green-900-plans), + :host([variant='mini-compare-chart']) #badge.color-green-900-variation, :host([variant='mini-compare-chart']) #badge.spectrum-green-900-plans { - background-color: #05834e; + background-color: var(--color-green-900-variation); color: #ffffff; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-red-700-plans), + :host([variant='mini-compare-chart']) #badge.color-red-700-variation, :host([variant='mini-compare-chart']) #badge.spectrum-red-700-plans { - background-color: #eb1000; + background-color: var(--color-red-700-variation); color: #ffffff; } `);P();var yc=` @@ -3210,7 +3251,7 @@ merch-card .footer-row-cell:nth-child(7) { merch-card .footer-row-cell:nth-child(8) { min-height: var(--consonant-merch-card-footer-row-8-min-height); } -`;var Kh=32,wc={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],ctas:{slot:"footer",size:"l"},style:"consonant"},jt=class extends A{constructor(r){super(r);m(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);m(this,"getMiniCompareFooter",()=>g`
+`;var Kh=32,wc={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],ctas:{slot:"footer",size:"l"},style:"consonant"},jt=class extends A{constructor(r){super(r);m(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);m(this,"getMiniCompareFooter",()=>g`
${this.secureLabel}`);m(this,"getMiniCompareFooterRows",()=>g` `);this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(te,this.updatePriceQuantity)}disconnectedCallbackHook(){this.card.removeEventListener(te,this.updatePriceQuantity),this._syncObserver?.disconnect(),this._syncObserver=null}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,i){if(r.dataset.template===xe){i.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(i.displayPerUnit=!1)}getGlobalCSS(){return yc}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2){this._syncObserver||(this._syncObserver=new ResizeObserver(()=>{this.card.getBoundingClientRect().width>2&&(this._syncObserver?.disconnect(),this._syncObserver=null,this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}),this._syncObserver.observe(this.card));return}["heading-xs","subtitle","heading-m-price","promo-text","body-m","body-xs","footer-rows"].forEach(i=>{let n=this.card.querySelector(`[slot="${i}"]`)??this.card.shadowRoot.querySelector(`slot[name="${i}"]`);this.updateCardElementMinHeight(n,i)}),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="promo-text"]'),"promo-text"),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r=this.card.querySelector('[slot="footer-rows"] ul');!r||!r.children||[...r.children].forEach((i,a)=>{let n=Math.max(Kh,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(a+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(a+1),`${n}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let a=i.querySelector(".footer-row-cell-description");a&&!a.textContent.trim()&&i.remove()})}setupToggle(){if(this.toggleSetupDone)return;let r=this.card.querySelector('[slot="body-xs"]');if(!r)return;let i=r.querySelector("p"),a=r.querySelector("ul");if(!i||!a||r.querySelector(".footer-rows-title"))return;this.toggleSetupDone=!0;let n=i.textContent.trim(),o=this.card.querySelector("h3")?.id,s=o?`${o}-list`:`mweb-list-${Date.now()}`;a.setAttribute("id",s),a.classList.add("checkmark-copy-container");let c=ne("div",{class:"footer-rows-title"},n);if(R.isMobile){let l=ne("button",{class:"toggle-icon","aria-label":n,"aria-expanded":"false","aria-controls":s});c.appendChild(l),c.addEventListener("click",()=>{let d=a.classList.toggle("open");l.classList.toggle("expanded",d),l.setAttribute("aria-expanded",String(d))})}else a.classList.add("open");i.replaceWith(c)}get mainPrice(){return this.card.querySelector(`[slot="heading-m-price"] ${D}[data-template="price"]`)}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let i=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),i.setAttribute("data-template","legal"),r.parentNode.insertBefore(i,r.nextSibling),await i.onceSettled()}catch{}}get icons(){return!this.card.querySelector('[slot="icons"]')&&!this.card.getAttribute("id")?E:g``}renderLayout(){return g` +
`);this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(te,this.updatePriceQuantity)}disconnectedCallbackHook(){this.card.removeEventListener(te,this.updatePriceQuantity),this._syncObserver?.disconnect(),this._syncObserver=null}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,i){if(r.dataset.template===ve){i.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(i.displayPerUnit=!1)}getGlobalCSS(){return yc}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2){this._syncObserver||(this._syncObserver=new ResizeObserver(()=>{this.card.getBoundingClientRect().width>2&&(this._syncObserver?.disconnect(),this._syncObserver=null,this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}),this._syncObserver.observe(this.card));return}["heading-xs","subtitle","heading-m-price","promo-text","body-m","body-xs","footer-rows"].forEach(i=>{let n=this.card.querySelector(`[slot="${i}"]`)??this.card.shadowRoot.querySelector(`slot[name="${i}"]`);this.updateCardElementMinHeight(n,i)}),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="promo-text"]'),"promo-text"),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r=this.card.querySelector('[slot="footer-rows"] ul');!r||!r.children||[...r.children].forEach((i,a)=>{let n=Math.max(Kh,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(a+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(a+1),`${n}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let a=i.querySelector(".footer-row-cell-description");a&&!a.textContent.trim()&&i.remove()})}setupToggle(){if(this.toggleSetupDone)return;let r=this.card.querySelector('[slot="body-xs"]');if(!r)return;let i=r.querySelector("p"),a=r.querySelector("ul");if(!i||!a||r.querySelector(".footer-rows-title"))return;this.toggleSetupDone=!0;let n=i.textContent.trim(),o=this.card.querySelector("h3")?.id,s=o?`${o}-list`:`mweb-list-${Date.now()}`;a.setAttribute("id",s),a.classList.add("checkmark-copy-container");let c=ne("div",{class:"footer-rows-title"},n);if(R.isMobile){let l=ne("button",{class:"toggle-icon","aria-label":n,"aria-expanded":"false","aria-controls":s});c.appendChild(l),c.addEventListener("click",()=>{let d=a.classList.toggle("open");l.classList.toggle("expanded",d),l.setAttribute("aria-expanded",String(d))})}else a.classList.add("open");i.replaceWith(c)}get mainPrice(){return this.card.querySelector(`[slot="heading-m-price"] ${D}[data-template="price"]`)}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let i=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),i.setAttribute("data-template","legal"),r.parentNode.insertBefore(i,r.nextSibling),await i.onceSettled()}catch{}}get icons(){return!this.card.querySelector('[slot="icons"]')&&!this.card.getAttribute("id")?E:g``}renderLayout(){return g` ${this.badge}
${this.icons} @@ -3412,28 +3453,46 @@ merch-card .footer-row-cell:nth-child(8) { } /* Border color styles */ + :host( + [variant='mini-compare-chart-mweb'][border-color='color-yellow-300-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-yellow-300-plans'] ) { - --consonant-merch-card-border-color: #ffd947; + --consonant-merch-card-border-color: var( + --color-yellow-300-variation + ); } + :host( + [variant='mini-compare-chart-mweb'][border-color='color-gray-300-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-gray-300-plans'] ) { - --consonant-merch-card-border-color: #dadada; + --consonant-merch-card-border-color: var( + --color-gray-300-variation + ); } + :host( + [variant='mini-compare-chart-mweb'][border-color='color-green-900-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-green-900-plans'] ) { - --consonant-merch-card-border-color: #05834e; + --consonant-merch-card-border-color: var( + --color-green-900-variation + ); } + :host( + [variant='mini-compare-chart-mweb'][border-color='color-red-700-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-red-700-plans'] ) { - --consonant-merch-card-border-color: #eb1000; + --consonant-merch-card-border-color: var(--color-red-700-variation); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } @@ -3448,48 +3507,70 @@ merch-card .footer-row-cell:nth-child(8) { } /* Badge color styles */ + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-red-700-plans) { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-yellow-300-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-yellow-300-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-yellow-300-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-yellow-300-plans { - background-color: #ffd947; + background-color: var(--color-yellow-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-gray-300-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-gray-300-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-gray-300-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-gray-300-plans { - background-color: #dadada; + background-color: var(--color-gray-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-gray-700-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-gray-700-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-gray-700-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-gray-700-plans { - background-color: #4b4b4b; + background-color: var(--color-gray-700-variation); color: #ffffff; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-green-900-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-green-900-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-green-900-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-green-900-plans { - background-color: #05834e; + background-color: var(--color-green-900-variation); color: #ffffff; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-red-700-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-red-700-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-red-700-plans { - background-color: #eb1000; + background-color: var(--color-red-700-variation); color: #ffffff; } @@ -3974,7 +4055,7 @@ merch-card-collection:has([slot="subtitle"]) merch-card { --merch-sidenav-collection-gap: 54px; } } -`;var Wi={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},callout:{tag:"div",slot:"callout-content"},quantitySelect:{tag:"div",slot:"quantity-select"},addon:!0,secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","gradient-purple-blue"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],whatsIncluded:{tag:"div",slot:"whats-included"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Ac={...function(){let{whatsIncluded:e,size:t,...r}=Wi;return r}(),title:{tag:"h3",slot:"heading-s"},secureLabel:!1},Sc={...function(){let{subtitle:e,whatsIncluded:t,size:r,quantitySelect:i,...a}=Wi;return a}()},ge=class extends A{constructor(t){super(t),this.adaptForMedia=this.adaptForMedia.bind(this)}priceOptionsProvider(t,r){t.dataset.template===xe&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1)}getGlobalCSS(){return Ec}adjustSlotPlacement(t,r,i){let a=this.card.shadowRoot,n=a.querySelector("footer"),o=this.card.getAttribute("size");if(!o)return;let s=a.querySelector(`footer slot[name="${t}"]`),c=a.querySelector(`.body slot[name="${t}"]`),l=a.querySelector(".body");if(o.includes("wide")||(n?.classList.remove("wide-footer"),s&&s.remove()),!!r.includes(o)){if(n?.classList.toggle("wide-footer",R.isDesktopOrUp),!i&&s){if(c)s.remove();else{let d=l.querySelector(`[data-placeholder-for="${t}"]`);d?d.replaceWith(s):l.appendChild(s)}return}if(i&&c){let d=document.createElement("div");if(d.setAttribute("data-placeholder-for",t),d.classList.add("slot-placeholder"),!s){let p=c.cloneNode(!0);n.prepend(p)}c.replaceWith(d)}}}adaptForMedia(){if(!this.card.closest("merch-card-collection,overlay-trigger,.two-merch-cards,.three-merch-cards,.four-merch-cards, .columns")){this.card.removeAttribute("size");return}this.adjustSlotPlacement("addon",["super-wide"],R.isDesktopOrUp),this.adjustSlotPlacement("callout-content",["super-wide"],R.isDesktopOrUp)}adjustCallout(){let t=this.card.querySelector('[slot="callout-content"] .icon-button');t&&t.title&&(t.dataset.tooltip=t.title,t.removeAttribute("title"),t.classList.add("hide-tooltip"),document.addEventListener("touchstart",r=>{r.preventDefault(),r.target!==t?t.classList.add("hide-tooltip"):r.target.classList.toggle("hide-tooltip")}),document.addEventListener("mouseover",r=>{r.preventDefault(),r.target!==t?t.classList.add("hide-tooltip"):r.target.classList.remove("hide-tooltip")}))}async adjustEduLists(){if(this.card.variant!=="plans-education"||this.card.querySelector(".spacer"))return;let r=this.card.querySelector('[slot="body-xs"]');if(!r)return;let i=r.querySelector("ul");if(!i)return;let a=i.previousElementSibling,n=document.createElement("div");n.classList.add("spacer"),r.insertBefore(n,a);let o=new IntersectionObserver(([s])=>{if(s.boundingClientRect.height===0)return;let c=0,l=this.card.querySelector('[slot="heading-s"]');l&&(c+=Or(l));let d=this.card.querySelector('[slot="subtitle"]');d&&(c+=Or(d));let p=this.card.querySelector('[slot="heading-m"]');p&&(c+=8+Or(p));for(let f of r.childNodes){if(f.classList.contains("spacer"))break;c+=Or(f)}let u=this.card.parentElement.style.getPropertyValue("--merch-card-plans-edu-list-max-offset");c>(parseFloat(u)||0)&&this.card.parentElement.style.setProperty("--merch-card-plans-edu-list-max-offset",`${c}px`),this.card.style.setProperty("--merch-card-plans-edu-list-offset",`${c}px`),o.disconnect()});o.observe(this.card)}async postCardUpdateHook(){this.adaptForMedia(),this.adjustAddon(),this.adjustCallout(),this.legalAdjusted||(await this.adjustLegal(),await this.adjustEduLists())}get headingM(){return this.card.querySelector('[slot="heading-m"]')}get mainPrice(){return this.headingM?.querySelector(`${D}[data-template="price"]`)}get divider(){return this.card.variant==="plans-education"?g`
`:E}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=[],r=this.card.querySelector(`[slot="heading-m"] ${D}[data-template="price"]`);r&&t.push(r);let i=t.map(async a=>{let n=a.cloneNode(!0);await a.onceSettled(),a?.options&&(a.options.displayPerUnit&&(a.dataset.displayPerUnit="false"),a.options.displayTax&&(a.dataset.displayTax="false"),a.options.displayPlanType&&(a.dataset.displayPlanType="false"),n.setAttribute("data-template","legal"),a.parentNode.insertBefore(n,a.nextSibling),await n.onceSettled())});await Promise.all(i)}catch{}}async adjustAddon(){await this.card.updateComplete;let t=this.card.addon;if(!t)return;t.setAttribute("custom-checkbox","");let r=this.mainPrice;if(!r)return;await r.onceSettled();let i=r.value?.[0]?.planType;i&&(t.planType=i)}get stockCheckbox(){return this.card.checkboxLabel?g`
@@ -5660,7 +5741,7 @@ merch-card-collection.segment merch-card { width: auto; height: 100%; } -`;var Lc={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},callout:{tag:"div",slot:"callout-content"},planType:!0,secureLabel:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-red-700-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],borderColor:{attribute:"border-color"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Yt=class extends A{constructor(t){super(t)}priceOptionsProvider(t,r){t.dataset.template===xe&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1,(t.dataset.template==="strikethrough"||t.dataset.template==="price")&&(r.displayPerUnit=!1))}getGlobalCSS(){return Pc}get badgeElement(){return this.card.querySelector('[slot="badge"]')}get mainPrice(){return this.card.querySelector(`[slot="heading-xs"] ${D}[data-template="price"]`)}async postCardUpdateHook(){this.legalAdjusted||await this.adjustLegal()}async adjustLegal(){if(!(this.legalAdjusted||!this.card.id))try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=this.mainPrice;if(!t)return;let r=t.cloneNode(!0);if(await t.onceSettled(),!t?.options)return;t.options.displayPerUnit&&(t.dataset.displayPerUnit="false"),t.options.displayTax&&(t.dataset.displayTax="false"),t.options.displayPlanType&&(t.dataset.displayPlanType="false"),r.setAttribute("data-template","legal"),t.parentNode.insertBefore(r,t.nextSibling),await r.onceSettled()}catch{}}renderLayout(){return g` +`;var Lc={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},callout:{tag:"div",slot:"callout-content"},planType:!0,secureLabel:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-red-700-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],borderColor:{attribute:"border-color"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Yt=class extends A{constructor(t){super(t)}priceOptionsProvider(t,r){t.dataset.template===ve&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1,(t.dataset.template==="strikethrough"||t.dataset.template==="price")&&(r.displayPerUnit=!1))}getGlobalCSS(){return Pc}get badgeElement(){return this.card.querySelector('[slot="badge"]')}get mainPrice(){return this.card.querySelector(`[slot="heading-xs"] ${D}[data-template="price"]`)}async postCardUpdateHook(){this.legalAdjusted||await this.adjustLegal()}async adjustLegal(){if(!(this.legalAdjusted||!this.card.id))try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=this.mainPrice;if(!t)return;let r=t.cloneNode(!0);if(await t.onceSettled(),!t?.options)return;t.options.displayPerUnit&&(t.dataset.displayPerUnit="false"),t.options.displayTax&&(t.dataset.displayTax="false"),t.options.displayPlanType&&(t.dataset.displayPlanType="false"),r.setAttribute("data-template","legal"),t.parentNode.insertBefore(r,t.nextSibling),await r.onceSettled()}catch{}}renderLayout(){return g` ${this.badge}
@@ -8045,11 +8126,11 @@ merch-card[variant="mini"] span.renewal-text { --spectrum-gray-300-special-offers: #D1D1D1; --gradient-purple-blue: linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%); - --color-yellow-300-variation: var(--spectrum-yellow-300-plans); - --color-green-900-variation: var(--spectrum-green-900-plans); - --color-gray-300-variation: var(--spectrum-gray-300-plans); - --color-gray-700-variation: var(--spectrum-gray-700-plans); - --color-red-700-variation: var(--spectrum-red-700-plans); + --color-yellow-300-variation: var(--spectrum-yellow-300); + --color-green-900-variation: var(--spectrum-green-900); + --color-gray-300-variation: var(--spectrum-gray-300); + --color-gray-700-variation: var(--spectrum-gray-700); + --color-red-700-variation: var(--spectrum-red-700); /* simplified-pricing-express colors */ --spectrum-gray-50: #FFFFFF; @@ -8704,7 +8785,9 @@ merch-card merch-whats-included[has-bullets] [slot="content"] { } merch-badge[background-color="spectrum-red-700-plans"], -merch-badge[background-color="spectrum-green-900-special-offers"] { +merch-badge[background-color="color-red-700-variation"], +merch-badge[background-color="spectrum-green-900-special-offers"], +merch-badge[background-color="color-green-900-variation"] { color: #FFFFFF; } @@ -8722,6 +8805,10 @@ merch-card[border-color="spectrum-red-700-plans"] { border-color: var(--spectrum-red-700-plans); } +merch-card[border-color="color-red-700-variation"] { + border-color: var(--color-red-700-variation); +} + @media (max-width: 600px) { merch-card [slot='callout-content'] .icon-button.tooltip-left::before { left: -30px; @@ -8898,7 +8985,7 @@ merch-card[border-color="spectrum-red-700-plans"] { text-decoration: underline; color: var(--link-color-dark); } - `),m(ei,"properties",{heading:{type:String,attribute:!0},mobileRows:{type:Number,attribute:!0}});customElements.define("merch-whats-included",ei);var tp="#000000",Dn="#F8D904",rp="#EAEAEA",ip="#31A547",ap=/(accent|primary|secondary)(-(outline|link))?/,np="mas:product_code/",op="daa-ll",Qi="daa-lh",sp=["XL","L","M","S"],$n="...",cp=new Set(["free-trial","start-free-trial","seven-day-trial","fourteen-day-trial","thirty-day-trial"]);function Ae(e,t,r,i){let a=i[e];if(t[e]&&a){let n={slot:a?.slot,...a?.attributes},o=t[e];if(a.maxCount&&typeof o=="string"){let[c,l]=Cp(o,a.maxCount,a.withSuffix);c!==o&&(n.title=l,o=c)}let s=ne(a.tag,n,o);r.append(s)}}function lp(e,t,r){let a=(e.mnemonicIcon||[]).filter(o=>o).map((o,s)=>({icon:o,alt:e.mnemonicAlt?.[s]??"",link:e.mnemonicLink?.[s]??""}));a?.forEach(({icon:o,alt:s,link:c})=>{if(c&&!/^https?:/.test(c))try{c=new URL(`https://${c}`).href.toString()}catch{c="#"}let l={slot:"icons",src:o,loading:t.loading,size:r?.size??"l"};s&&(l.alt=s),c&&(l.href=c);let d=ne("merch-icon",l);t.append(d)});let n=t.shadowRoot.querySelector('slot[name="icons"]');n&&(n.style.display=a?.length?null:"none")}function dp(e,t,r){if(r.badge?.slot){if(e.badge?.length&&!e.badge?.startsWith("${e.badge}`}Ae("badge",e,t,r)}else e.badge?(t.setAttribute("badge-text",e.badge),r.disabledAttributes?.includes("badgeColor")||t.setAttribute("badge-color",e.badgeColor||tp),r.disabledAttributes?.includes("badgeBackgroundColor")||t.setAttribute("badge-background-color",e.badgeBackgroundColor||Dn),t.setAttribute("border-color",e.badgeBackgroundColor||Dn)):t.setAttribute("border-color",e.borderColor||rp)}function hp(e,t,r){if(r.trialBadge&&e.trialBadge){if(!e.trialBadge.startsWith("${e.trialBadge}`}Ae("trialBadge",e,t,r)}}function pp(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function mp(e,t){e.cardName&&t.setAttribute("name",e.cardName)}function up(e,t,r){e.cardTitle&&(e.cardTitle=ar(e.cardTitle)),Ae("cardTitle",e,t,{cardTitle:r})}function gp(e,t,r){Ae("subtitle",e,t,r)}function fp(e,t,r,i){if(!e.backgroundColor||e.backgroundColor.toLowerCase()==="default"){t.style.removeProperty("--merch-card-custom-background-color"),t.removeAttribute("background-color");return}r?.[e.backgroundColor]?(t.style.setProperty("--merch-card-custom-background-color",`var(${r[e.backgroundColor]})`),t.setAttribute("background-color",e.backgroundColor)):i?.attribute&&e.backgroundColor&&(t.setAttribute(i.attribute,e.backgroundColor),t.style.removeProperty("--merch-card-custom-background-color"))}function xp(e,t,r){let i=r?.borderColor,a="--consonant-merch-card-border-color";if(e.borderColor?.toLowerCase()==="transparent")t.style.setProperty(a,"transparent");else if(e.borderColor&&i){let o=i?.specialValues?.[e.borderColor]?.includes("gradient")||/-gradient/.test(e.borderColor),s=/^spectrum-.*-(plans|special-offers)$/.test(e.borderColor);if(o){t.setAttribute("gradient-border","true");let c=e.borderColor;if(i?.specialValues){for(let[l,d]of Object.entries(i.specialValues))if(d===e.borderColor){c=l;break}}t.setAttribute("border-color",c),t.style.removeProperty(a)}else s?(t.setAttribute("border-color",e.borderColor),t.style.setProperty(a,`var(--${e.borderColor})`)):t.style.setProperty(a,`var(--${e.borderColor})`)}}function vp(e,t,r){if(e.backgroundImage){let i={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?i.alt=e.backgroundImageAltText:i.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(ne(r.tag,{slot:r.slot},ne("img",i)))}}function ar(e){return!e||typeof e!="string"||e.includes("(Gi(),Ln)).catch(console.error),e}function bp(e,t,r){e.prices&&(e.prices=ar(e.prices)),Ae("prices",e,t,r)}function nl(e,t,r){let i=e.hasAttribute("data-wcs-osi")&&!!e.getAttribute("data-wcs-osi"),a=e.className||"",n=ap.exec(a)?.[0]??"accent",o=n.includes("accent"),s=n.includes("primary"),c=n.includes("secondary"),l=n.includes("-outline"),d=n.includes("-link");e.classList.remove("accent","primary","secondary");let p;if(t.consonant)p=Pp(e,o,i,d,s,c,r?.ctas?.size);else if(d)p=e;else{let u;o?u="accent":s?u="primary":c&&(u="secondary"),p=t.spectrum==="swc"?_p(e,r,l,u,i):kp(e,r,l,u,i)}return p}function yp(e,t){let{slot:r}=t?.description,i=e.querySelectorAll(`[slot="${r}"] a[data-wcs-osi]`);i.length&&i.forEach(a=>{let n=nl(a,e,t);a.replaceWith(n)})}function wp(e,t,r){e.description&&(e.description=ar(e.description)),e.promoText&&(e.promoText=ar(e.promoText)),e.shortDescription&&(e.shortDescription=ar(e.shortDescription)),Ae("promoText",e,t,r),Ae("description",e,t,r),Ae("shortDescription",e,t,r),e.shortDescription&&(t.setAttribute("action-menu","true"),e.actionMenuLabel||t.setAttribute("action-menu-label","More options")),yp(t,r),Ae("callout",e,t,r),Ae("quantitySelect",e,t,r),Ae("whatsIncluded",e,t,r)}function Ep(e,t,r,i={}){if(!r.addon)return;let n=(e.addon??i.addon)?.replace(/[{}]/g,"");if(!n||/disabled/.test(n))return;let o=ne("merch-addon",{slot:"addon"},n);[...o.querySelectorAll(D)].forEach(s=>{let c=s.parentElement;c?.nodeName==="P"&&c.setAttribute("data-plan-type","")}),t.append(o)}function Ap(e,t,r){e.addonConfirmation&&Ae("addonConfirmation",e,t,r)}function Sp(e,t,r,i){i?.secureLabel&&r?.secureLabel&&t.setAttribute("secure-label",i.secureLabel)}function Cp(e,t,r=!0){try{let i=typeof e!="string"?"":e,a=al(i);if(a.length<=t)return[i,a];let n=0,o=!1,s=r?t-$n.length<1?1:t-$n.length:t,c=[];for(let p of i){if(n++,p==="<")if(o=!0,i[n]==="/")c.pop();else{let u="";for(let f of i.substring(n)){if(f===" "||f===">")break;u+=f}c.push(u)}if(p==="/"&&i[n]===">"&&c.pop(),p===">"){o=!1;continue}if(!o&&(s--,s===0))break}let l=i.substring(0,n).trim();if(c.length>0){c[0]==="p"&&c.shift();for(let p of c.reverse())l+=``}return[`${l}${r?$n:""}`,a]}catch{let a=typeof e=="string"?e:"",n=al(a);return[a,n]}}function al(e){if(!e)return"";let t="",r=!1;for(let i of e){if(i==="<"&&(r=!0),i===">"){r=!1;continue}r||(t+=i)}return t}function Tp(e,t){t.querySelectorAll("a.upt-link").forEach(i=>{let a=Ye.createFrom(i);i.replaceWith(a),a.initializeWcsData(e.osi,e.promoCode)})}function kp(e,t,r,i,a){let n=e;a?n=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML):n.innerHTML=`${n.textContent}`,n.setAttribute("tabindex",0);for(let d of e.attributes)["class","is"].includes(d.name)||n.setAttribute(d.name,d.value);n.firstElementChild?.classList.add("spectrum-Button-label");let o=t?.ctas?.size??"M",s=`spectrum-Button--${i}`,c=sp.includes(o)?`spectrum-Button--size${o}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),n.classList.add(...l),n}function _p(e,t,r,i,a){let n=e;a&&(n=customElements.get("checkout-button").createCheckoutButton(e.dataset),n.connectedCallback(),n.render());let o="fill";r&&(o="outline");let s=ne("sp-button",{treatment:o,variant:i,tabIndex:0,size:t?.ctas?.size??"m",...e.dataset.analyticsId&&{"data-analytics-id":e.dataset.analyticsId}},e.innerHTML);return s.source=n,(a?n.onceSettled():Promise.resolve(n)).then(c=>{s.setAttribute("data-navigation-url",c.href)}),s.addEventListener("click",c=>{c.defaultPrevented||n.click()}),s}function Pp(e,t,r,i,a,n,o){let s=e;if(r)try{let c=customElements.get("checkout-link");c&&(s=c.createCheckoutLink(e.dataset,e.innerHTML)??e)}catch{}return i||(s.classList.add("button","con-button"),o&&o!=="m"&&s.classList.add(`button-${o}`),t&&s.classList.add("blue"),a&&s.classList.add("primary"),n&&s.classList.add("secondary")),s}function Lp(e,t,r,i,a){if(e.ctas){e.ctas=ar(e.ctas);let{slot:n}=r.ctas,o=ne("div",{slot:n},e.ctas),s=[...o.querySelectorAll("a")],c=a?.hideTrialCTAs?s.filter(d=>!cp.has(d.dataset.analyticsId)):s,l=(c.length>0?c:s).map(d=>nl(d,t,r));o.textContent="",o.append(...l),t.append(o),a?.hideTrialCTAs&&c.length>0&&l.forEach(d=>{let p=d.source??d;p.onceSettled&&(d.hidden=!0,p.onceSettled().then(()=>{p.value?.[0]?.offerType==="TRIAL"&&l.some(f=>f!==d&&!f.hidden)?d.remove():d.hidden=!1}).catch(()=>{d.hidden=!1}))})}}function Mp(e,t){let{tags:r}=e,i=r?.find(n=>typeof n=="string"&&n.startsWith(np))?.split("/").pop();if(!i)return;t.setAttribute(Qi,i),[...t.shadowRoot.querySelectorAll("a[data-analytics-id],button[data-analytics-id]"),...t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]")].forEach((n,o)=>{n.setAttribute(op,`${n.dataset.analyticsId}-${o+1}`)})}function Rp(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(i=>{i.classList.remove(t),i.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}function Op(e){e.querySelectorAll("[slot]").forEach(i=>{i.remove()}),e.variant=void 0,["checkbox-label","stock-offer-osis","secure-label","background-image","background-color","border-color","badge-background-color","badge-color","badge-text","gradient-border","size",Qi].forEach(i=>e.removeAttribute(i));let r=["wide-strip","thin-strip"];e.classList.remove(...r)}async function ol(e,t){if(!e){let c=t?.id||"unknown";throw console.error(`hydrate: Fragment is undefined. Cannot hydrate card (merchCard id: ${c}).`),new Error(`hydrate: Fragment is undefined for card (merchCard id: ${c}).`)}if(!e.fields){let c=e.id||"unknown",l=t?.id||"unknown";throw console.error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'. Cannot hydrate.`),new Error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'.`)}let{id:r,fields:i,settings:a={},priceLiterals:n}=e,{variant:o}=i;if(!o)throw new Error(`hydrate: no variant found in payload ${r}`);Op(t),t.compatVersion=i.compatVersion,t.contextPromotionCode=i.promoCode,t.settings=a,n&&(t.priceLiterals=n),t.id??(t.id=e.id),e.variationId&&t.setAttribute("variation-id",e.variationId??""),t.variant=o,await t.updateComplete;let{aemFragmentMapping:s}=t.variantLayout;if(!s)throw new Error(`hydrate: variant mapping not found for ${r}`);s.style==="consonant"&&t.setAttribute("consonant",!0),lp(i,t,s.mnemonics),hp(i,t,s),pp(i,t,s.size),mp(i,t),up(i,t,s.title),dp(i,t,s),gp(i,t,s),bp(i,t,s),vp(i,t,s.backgroundImage),fp(i,t,s.allowedColors,s.backgroundColor),xp(i,t,s),wp(i,t,s),Ep(i,t,s,a),Ap(i,t,s),Sp(i,t,s,a);try{Tp(i,t)}catch{}Lp(i,t,s,o,a),Mp(i,t),Rp(t)}var Ji="merch-card",Hn=2e4,sl="merch-card:",hl=["full-pricing-express","simplified-pricing-express"],pl=["segment","product"];function cl(e,t){let r=e.closest(Ji);if(!r)return t;r.priceLiterals&&(t.literals??(t.literals={}),Object.assign(t.literals,r.priceLiterals)),!t.promotionCode&&r.compatVersion>=1&&(t.promotionCode=r.promotionCode),r.aemFragment&&(t[ke]=!0),r.variantLayout?.priceOptionsProvider?.(e,t)}function ll(e,t){let r=e.closest(Ji);if(!r)return t;!t.promotionCode&&r.compatVersion>=1&&(t.promotionCode=r.promotionCode)}function Np(e){e.providers.has(cl)||e.providers.price(cl),e.providers.has(ll)||e.providers.checkout(ll)}var ti=new IntersectionObserver(e=>{e.forEach(t=>{let r=t.target;if(hl.includes(r.variant)){if(r.clientHeight===0)return;ti.unobserve(r),r.requestUpdate();return}if(pl.includes(r.variant)){if(t.boundingClientRect.width===0)return;if(r.variant==="product"&&r.querySelector('merch-icon[slot="icons"]')){ti.unobserve(r);return}let i=r.getBoundingClientRect().width,n=r.querySelector('[slot="badge"]')?.getBoundingClientRect().width||0;if(i===0||n===0){ti.unobserve(r);return}r.style.setProperty("--consonant-merch-card-heading-xs-max-width",`${Math.round(i-n-16)}px`),ti.unobserve(r)}})}),Ip=0,ii,nr,or,sr,ze,St,Se,Ct,X,At,ri,Bn,Zi,Ze=class extends U{constructor(){super();w(this,X);w(this,ii);w(this,nr);w(this,or);w(this,sr);w(this,ze);w(this,St);w(this,Se);w(this,Ct,new Promise(r=>{y(this,Se,r)}));m(this,"compatVersion");m(this,"customerSegment");m(this,"marketSegment");m(this,"variantLayout");this.id=null,this.failed=!1,this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this),this.handleMerchOfferSelectReady=this.handleMerchOfferSelectReady.bind(this)}set contextPromotionCode(r){y(this,ii,r)}firstUpdated(){this.variantLayout=On(this),this.variantLayout?.connectedCallbackHook()}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout?.disconnectedCallbackHook(),this.variantLayout=On(this),this.variantLayout?.connectedCallbackHook())}updated(r){!this.style.getPropertyValue("--consonant-merch-card-border-color")&&this.computedBorderColor&&(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border-color",this.computedBorderColor),r.has("backgroundColor")&&this.style.setProperty("--merch-card-custom-background-color",this.backgroundColor?`var(--${this.backgroundColor})`:"");try{this.variantLayoutPromise=this.variantLayout?.postCardUpdateHook(r)}catch(i){Z(this,X,At).call(this,`Error in postCardUpdateHook: ${i.message}`,{},!1)}}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderColor(){return["ccd-slice","ccd-suggested","ah-promoted-plans","simplified-pricing-express","full-pricing-express"].includes(this.variant)?"":this.borderColor?this.borderColor:this.badgeBackgroundColor}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get descriptionSlot(){return this.shadowRoot.querySelector('slot[name="body-xs"')?.assignedElements()[0]}get descriptionSlotCompare(){return this.shadowRoot.querySelector('slot[name="body-m"')?.assignedElements()[0]}get iconButton(){return this.querySelector('[slot="callout-content"] .icon-button')}get price(){return this.headingmMSlot?.querySelector(D)}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll(Ce)??[]]}get checkoutLinksDescription(){return[...this.descriptionSlot?.querySelectorAll(Ce)??[]]}get checkoutLinkDescriptionCompare(){return[...this.descriptionSlotCompare?.querySelectorAll(Ce)??[]]}get activeDescriptionLinks(){return this.variant==="mini-compare-chart"||this.variant==="mini-compare-chart-mweb"?this.checkoutLinkDescriptionCompare:this.checkoutLinksDescription}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let i=this.checkoutLinks;if(i.length!==0)for(let a of i){await a.onceSettled();let n=a.value?.[0]?.planType;if(!n)return;let o=this.stockOfferOsis[n];if(!o)return;let s=a.dataset.wcsOsi.split(",").filter(c=>c!==o);r.checked&&s.push(o),a.dataset.wcsOsi=s.join(",")}}changeHandler(r){r.target.tagName==="MERCH-ADDON"&&this.toggleAddon(r.target)}toggleAddon(r){this.variantLayout?.toggleAddon?.(r);let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length===0)return;let a=n=>{let{offerType:o,planType:s}=n.value?.[0]??{};if(!o||!s)return;let c=r.getOsi(s,o),l=(n.dataset.wcsOsi||"").split(",").filter(d=>d&&d!==c);r.checked&&l.push(c),n.dataset.wcsOsi=l.join(",")};i.forEach(a)}handleQuantitySelection(r){let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length!==0)for(let a of i)a.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let i={...this.filters};Object.keys(i).forEach(a=>{if(r){i[a].order=Math.min(i[a].order||2,2);return}let n=i[a].order;n===1||isNaN(n)||(i[a].order=Number(n)+1)}),this.filters=i}showInfoTooltip(r,i){let a="tooltip-left",n="tooltip-right";window.screen.width<600&&r.getAttribute("data-tooltip")?.length>12&&(this.iconButton.classList.remove(a),this.iconButton.classList.remove(n),r.getBoundingClientRect().x<100&&this.iconButton.classList.add(a),r.getBoundingClientRect().x>window.screen.width-100&&this.iconButton.classList.add(n)),this.iconButton.classList.add(i)}handleInfoIconEvents(){let r="tooltip-visible";this.iconButton&&(["mouseenter","focus"].forEach(i=>this.iconButton.addEventListener(i,a=>this.showInfoTooltip(a.target,r),!1)),["mouseleave","blur"].forEach(i=>this.iconButton.addEventListener(i,()=>this.iconButton.classList.remove(r),!1)),this.iconButton.addEventListener("keydown",i=>{i.key==="Escape"&&this.iconButton.classList.remove(r)}))}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){var i;super.connectedCallback(),h(this,or)||y(this,or,Ip++),this.aemFragment||((i=h(this,Se))==null||i.call(this),y(this,Se,void 0)),this.id??(this.id=this.getAttribute("id")??this.aemFragment?.getAttribute("fragment"));let r=this.id??h(this,or);y(this,St,`${sl}${r}${st}`),y(this,nr,`${sl}${r}${ct}`),performance.mark(h(this,St)),y(this,ze,mt()),Np(h(this,ze)),y(this,sr,h(this,ze).Log.module(Ji)),this.addEventListener(te,this.handleQuantitySelection),this.addEventListener(di,this.handleAddonAndQuantityUpdate),this.addEventListener(gr,this.handleMerchOfferSelectReady),this.addEventListener(nt,this.handleAemFragmentEvents),this.addEventListener(at,this.handleAemFragmentEvents),this.addEventListener(fr,this.handleInfoIconEvents),this.addEventListener("change",this.changeHandler),this.variantLayout&&this.variantLayout.connectedCallbackHook(),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(te,this.handleQuantitySelection),this.removeEventListener(nt,this.handleAemFragmentEvents),this.removeEventListener(at,this.handleAemFragmentEvents),this.removeEventListener(fr,this.handleInfoIconEvents),this.removeEventListener("change",this.changeHandler),this.removeEventListener(di,this.handleAddonAndQuantityUpdate)}async handleAemFragmentEvents(r){var i;if(this.isConnected&&(r.type===nt&&Z(this,X,At).call(this,"AEM fragment cannot be loaded"),r.type===at&&(this.failed=!1,r.target.nodeName==="AEM-FRAGMENT"))){let a=r.detail;try{h(this,Se)||y(this,Ct,new Promise(n=>{y(this,Se,n)})),ol(a,this)}catch(n){Z(this,X,At).call(this,`hydration has failed: ${n.message}`)}finally{(i=h(this,Se))==null||i.call(this),y(this,Se,void 0)}this.checkReady()}}async checkReady(){if(!this.isConnected||this.failed)return;h(this,Ct)&&(await h(this,Ct),(hl.includes(this.variant)||pl.includes(this.variant))&&ti.observe(this),y(this,Ct,void 0)),this.variantLayoutPromise&&(await this.variantLayoutPromise,this.variantLayoutPromise=void 0);let r=new Promise(o=>setTimeout(()=>o("timeout"),Hn));if(this.aemFragment){let o=await Promise.race([this.aemFragment.updateComplete,r]);if(o===!1||o==="timeout"){let s=o==="timeout"?`AEM fragment was not resolved within ${Hn} timeout`:"AEM fragment cannot be loaded";Z(this,X,At).call(this,s,{},!1);return}}let i=[...this.querySelectorAll(ur)],a=Promise.all(i.map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(s=>s.classList.contains("placeholder-resolved"))),n=await Promise.race([a,r]);if(n===!0){this.measure=performance.measure(h(this,nr),h(this,St));let o={...this.aemFragment?.fetchInfo,...h(this,ze).duration,measure:Ne(this.measure)};return this.dispatchEvent(new CustomEvent(fr,{bubbles:!0,composed:!0,detail:o})),this}else{this.measure=performance.measure(h(this,nr),h(this,St));let o={measure:Ne(this.measure),...h(this,ze).duration};n==="timeout"?Z(this,X,At).call(this,`Contains offers that were not resolved within ${Hn} timeout`,o):Z(this,X,At).call(this,"Contains unresolved offers",o)}}get aemFragment(){return this.querySelector("aem-fragment")}get addon(){return this.querySelector("merch-addon")}get quantitySelect(){return this.querySelector("merch-quantity-select")}get addonCheckbox(){return this.querySelector("merch-addon")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll(Ce)).length===2&&r&&r.parentElement.classList.add("footer-column")}handleMerchOfferSelectReady(){this.offerSelect&&!this.offerSelect.planType||this.displayFooterElementsInColumn()}get dynamicPrice(){return this.querySelector('[slot="price"]')}handleAddonAndQuantityUpdate({detail:{id:r,items:i}}){if(!r||!i?.length||this.closest('[role="tabpanel"][hidden="true"]'))return;let n=this.checkoutLinks.find(d=>d.getAttribute("data-modal-id")===r);if(!n)return;let s=new URL(n.getAttribute("href")).searchParams.get("pa"),c=i.find(d=>d.productArrangementCode===s)?.quantity,l=!!i.find(d=>d.productArrangementCode!==s);if(c&&this.quantitySelect?.dispatchEvent(new CustomEvent(Pt,{detail:{quantity:c},bubbles:!0,composed:!0})),this.addonCheckbox&&this.addonCheckbox.checked!==l){this.toggleStockOffer({target:this.addonCheckbox});let d=new Event("change",{bubbles:!0,cancelable:!0});Object.defineProperty(d,"target",{writable:!1,value:{checked:l}}),this.addonCheckbox.handleChange(d)}}get prices(){return Array.from(this.querySelectorAll(D))}get promoPrice(){if(!this.querySelector("span.price-strikethrough"))return;let r=this.querySelector(".price.price-alternative");if(r||(r=this.querySelector(`${D}[data-template="price"] > span`)),!!r)return r=r.innerText,r}get regularPrice(){return h(this,X,ri)?.innerText}get promotionCode(){let r=[...this.querySelectorAll(`${D}[data-promotion-code],${Ce}[data-promotion-code]`)].map(a=>a.dataset.promotionCode).filter(a=>![void 0,"cancel-context"].includes(a));if(r.length===0)return h(this,ii);let i=[...new Set(r)];return i.length>1&&h(this,sr)?.warn(`Multiple different promotion codes found: ${i.join(", ")}`),r[0]}get annualPrice(){return this.querySelector(`${D}[data-template="price"] > .price.price-annual`)?.innerText}get promoText(){}get taxText(){return(h(this,X,Bn)??h(this,X,ri))?.querySelector("span.price-tax-inclusivity")?.textContent?.trim()||void 0}get recurrenceText(){return h(this,X,ri)?.querySelector("span.price-recurrence")?.textContent?.trim()}get unitText(){let r=".price-unit-type";return h(this,X,Bn)?.querySelector(r)?.textContent?.trim()??h(this,X,ri)?.querySelector(r)?.textContent?.trim()??this.querySelector(r)?.textContent?.trim()??void 0}get planTypeText(){return this.querySelector('[is="inline-price"][data-template="legal"] span.price-plan-type')?.textContent?.trim()}get seeTermsInfo(){let r=this.querySelector('a[is="upt-link"]');if(r)return Z(this,X,Zi).call(this,r)}get renewalText(){return this.querySelector("span.renewal-text")?.textContent?.trim()}get promoDurationText(){return this.querySelector("span.promo-duration-text")?.textContent?.trim()}get ctas(){let r=this.querySelector('[slot="ctas"], [slot="footer"]')?.querySelectorAll(`${Ce}, a`);return Array.from(r??[])}get primaryCta(){return Z(this,X,Zi).call(this,this.ctas.find(r=>r.variant==="accent"||r.matches(".spectrum-Button--accent,.con-button.blue")))}get secondaryCta(){return Z(this,X,Zi).call(this,this.ctas.find(r=>r.variant!=="accent"&&!r.matches(".spectrum-Button--accent,.con-button.blue")))}};ii=new WeakMap,nr=new WeakMap,or=new WeakMap,sr=new WeakMap,ze=new WeakMap,St=new WeakMap,Se=new WeakMap,Ct=new WeakMap,X=new WeakSet,At=function(r,i={},a=!0){var c;if(!this.isConnected)return;let o=this.aemFragment?.getAttribute("fragment");o=`[${o}]`;let s={...this.aemFragment.fetchInfo,...h(this,ze).duration,...i,message:r};h(this,sr).error(`merch-card${o}: ${r}`,s),this.failed=!0,(c=h(this,Se))==null||c.call(this),y(this,Se,void 0),h(this,ze).isPreview()||(this.style.display="none"),a&&this.dispatchEvent(new CustomEvent(sa,{bubbles:!0,composed:!0,detail:s}))},ri=function(){return this.querySelector("span.price-strikethrough")??this.querySelector(`${D}[data-template="price"] > span`)},Bn=function(){return this.querySelector(`${D}[data-template="legal"]`)},Zi=function(r){if(r)return{text:r.innerText.trim(),analyticsId:r.dataset.analyticsId,href:r.getAttribute("href")??r.dataset.href}},m(Ze,"properties",{id:{type:String,attribute:"id",reflect:!0},name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},backgroundColor:{type:String,attribute:"background-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},actionMenuLabel:{type:String,attribute:"action-menu-label"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},failed:{type:Boolean,attribute:"failed",reflect:!0},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},addonTitle:{type:String,attribute:"addon-title"},addonOffers:{type:Object,attribute:"addon-offers"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},heightSync:{type:Boolean,attribute:"height-sync"},settings:{type:Object,attribute:!1},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{if(!r)return;let[i,a,n]=r.split(",");return{PUF:i,ABM:a,M2M:n}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(i=>{let[a,n,o]=i.split(":"),s=Number(n);return[a,{order:isNaN(s)?void 0:s,size:o}]})),toAttribute:r=>Object.entries(r).map(([i,{order:a,size:n}])=>[i,a,n].filter(o=>o!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Qi,reflect:!0},loading:{type:String},priceLiterals:{type:Object}}),m(Ze,"styles",[hc,...pc()]),m(Ze,"registerVariant",G),m(Ze,"getCollectionOptions",Gc),m(Ze,"getFragmentMapping",Vi);customElements.define(Ji,Ze);P();var cr,ai=class extends U{constructor(){super();w(this,cr);this.defaults={},this.variant="plans"}saveContainerDefaultValues(){let r=this.closest(this.getAttribute("container")),i=r?.querySelector('[slot="description"]:not(merch-offer > *)')?.cloneNode(!0),a=r?.badgeText;return{description:i,badgeText:a}}getSlottedElement(r,i){return(i||this.closest(this.getAttribute("container"))).querySelector(`[slot="${r}"]:not(merch-offer > *)`)}updateSlot(r,i){let a=this.getSlottedElement(r,i);if(!a)return;let n=this.selectedOffer.getOptionValue(r)?this.selectedOffer.getOptionValue(r):this.defaults[r];n&&a.replaceWith(n.cloneNode(!0))}handleOfferSelection(r){let i=r.detail;this.selectOffer(i)}handleOfferSelectionByQuantity(r){let i=r.detail.option,a=Number.parseInt(i),n=this.findAppropriateOffer(a);this.selectOffer(n),this.getSlottedElement("cta").setAttribute("data-quantity",a)}selectOffer(r){if(!r)return;let i=this.selectedOffer;i&&(i.selected=!1),r.selected=!0,this.selectedOffer=r,this.planType=r.planType,this.updateContainer(),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent(oa,{detail:this,bubbles:!0}))})}findAppropriateOffer(r){let i=null;return this.offers.find(n=>{let o=Number.parseInt(n.getAttribute("value"));if(o===r)return!0;if(o>r)return!1;i=n})||i}updateBadgeText(r){this.selectedOffer.badgeText===""?r.badgeText=null:this.selectedOffer.badgeText?r.badgeText=this.selectedOffer.badgeText:r.badgeText=this.defaults.badgeText}updateContainer(){let r=this.closest(this.getAttribute("container"));!r||!this.selectedOffer||(this.updateSlot("cta",r),this.updateSlot("secondary-cta",r),this.updateSlot("price",r),!this.manageableMode&&(this.updateSlot("description",r),this.updateBadgeText(r)))}render(){return g`
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("click",this.handleFocusin),this.addEventListener(_t,this.handleOfferSelectReady);let r=this.closest("merch-quantity-select");this.manageableMode=r,this.offers=[...this.querySelectorAll("merch-offer")],y(this,cr,this.handleOfferSelectionByQuantity.bind(this)),this.manageableMode?r.addEventListener(te,h(this,cr)):this.defaults=this.saveContainerDefaultValues(),this.selectedOffer=this.offers[0],this.planType&&this.updateContainer()}get miniCompareMobileCard(){return(this.merchCard?.variant==="mini-compare-chart"||this.merchCard?.variant==="mini-compare-chart-mweb")&&this.isMobile}get merchCard(){return this.closest("merch-card")}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(te,h(this,cr)),this.removeEventListener(_t,this.handleOfferSelectReady),this.removeEventListener("focusin",this.handleFocusin),this.removeEventListener("click",this.handleFocusin)}get price(){return this.querySelector('merch-offer[aria-selected] [is="inline-price"]')}get customerSegment(){return this.selectedOffer?.customerSegment}get marketSegment(){return this.selectedOffer?.marketSegment}handleFocusin(r){r.target?.nodeName==="MERCH-OFFER"&&(r.preventDefault(),r.stopImmediatePropagation(),this.selectOffer(r.target))}async handleOfferSelectReady(){this.planType||this.querySelector("merch-offer:not([plan-type])")||(this.planType=this.selectedOffer.planType,await this.updateComplete,this.selectOffer(this.selectedOffer??this.querySelector("merch-offer[aria-selected]")??this.querySelector("merch-offer")),this.dispatchEvent(new CustomEvent(gr,{bubbles:!0})))}};cr=new WeakMap,m(ai,"styles",b` + `),m(ei,"properties",{heading:{type:String,attribute:!0},mobileRows:{type:Number,attribute:!0}});customElements.define("merch-whats-included",ei);var tp="#000000",Dn="#F8D904",rp="#EAEAEA",ip="#31A547",ap=/(accent|primary|secondary)(-(outline|link))?/,np="mas:product_code/",op="daa-ll",Qi="daa-lh",sp=["XL","L","M","S"],$n="...",cp=new Set(["free-trial","start-free-trial","seven-day-trial","fourteen-day-trial","thirty-day-trial"]);function Ae(e,t,r,i){let a=i[e];if(t[e]&&a){let n={slot:a?.slot,...a?.attributes},o=t[e];if(a.maxCount&&typeof o=="string"){let[c,l]=Tp(o,a.maxCount,a.withSuffix);c!==o&&(n.title=l,o=c)}let s=ne(a.tag,n,o);r.append(s)}}function lp(e,t,r){let a=(e.mnemonicIcon||[]).filter(o=>o).map((o,s)=>({icon:o,alt:e.mnemonicAlt?.[s]??"",link:e.mnemonicLink?.[s]??""}));a?.forEach(({icon:o,alt:s,link:c})=>{if(c&&!/^https?:/.test(c))try{c=new URL(`https://${c}`).href.toString()}catch{c="#"}let l={slot:"icons",src:o,loading:t.loading,size:r?.size??"l"};s&&(l.alt=s),c&&(l.href=c);let d=ne("merch-icon",l);t.append(d)});let n=t.shadowRoot.querySelector('slot[name="icons"]');n&&(n.style.display=a?.length?null:"none")}function dp(e,t,r){if(r.badge?.slot){if(e.badge?.length&&!e.badge?.startsWith("${e.badge}`}Ae("badge",e,t,r)}else e.badge?(t.setAttribute("badge-text",e.badge),r.disabledAttributes?.includes("badgeColor")||t.setAttribute("badge-color",e.badgeColor||tp),r.disabledAttributes?.includes("badgeBackgroundColor")||t.setAttribute("badge-background-color",e.badgeBackgroundColor||Dn),t.setAttribute("border-color",e.badgeBackgroundColor||Dn)):t.setAttribute("border-color",e.borderColor||rp)}function hp(e,t,r){if(r.trialBadge&&e.trialBadge){if(!e.trialBadge.startsWith("${e.trialBadge}`}Ae("trialBadge",e,t,r)}}function pp(e,t,r){r?.includes(e.size)&&t.setAttribute("size",e.size)}function mp(e,t){e.cardName&&t.setAttribute("name",e.cardName)}function up(e,t,r){e.cardTitle&&(e.cardTitle=ar(e.cardTitle)),Ae("cardTitle",e,t,{cardTitle:r})}function gp(e,t,r){Ae("subtitle",e,t,r)}function fp(e,t,r,i){if(!e.backgroundColor||e.backgroundColor.toLowerCase()==="default"){t.style.removeProperty("--merch-card-custom-background-color"),t.removeAttribute("background-color");return}r?.[e.backgroundColor]?(t.style.setProperty("--merch-card-custom-background-color",`var(${r[e.backgroundColor]})`),t.setAttribute("background-color",e.backgroundColor)):i?.attribute&&e.backgroundColor&&(t.setAttribute(i.attribute,e.backgroundColor),t.style.removeProperty("--merch-card-custom-background-color"))}function vp(e,t,r){let i=r?.borderColor,a="--consonant-merch-card-border-color";if(e.borderColor?.toLowerCase()==="transparent")t.style.setProperty(a,"transparent");else if(e.borderColor&&i){let o=i?.specialValues?.[e.borderColor]?.includes("gradient")||/-gradient/.test(e.borderColor),s=/^spectrum-.*-(plans|special-offers)$/.test(e.borderColor)||/^color-.+-variation$/.test(e.borderColor);if(o){t.setAttribute("gradient-border","true");let c=e.borderColor;if(i?.specialValues){for(let[l,d]of Object.entries(i.specialValues))if(d===e.borderColor){c=l;break}}t.setAttribute("border-color",c),t.style.removeProperty(a)}else s?(t.setAttribute("border-color",e.borderColor),t.style.setProperty(a,`var(--${e.borderColor})`)):t.style.setProperty(a,`var(--${e.borderColor})`)}}function xp(e,t,r){if(!r?.whatsIncludedDividerColor)return;let i=e.whatsIncludedDividerColor,a="--merch-whats-included-divider-color";if(!i||i.toLowerCase()==="default"){t.style.removeProperty(a);return}if(i.toLowerCase()==="transparent"){t.style.setProperty(a,"transparent");return}t.style.setProperty(a,`var(--${i})`)}function bp(e,t,r){if(e.backgroundImage){let i={loading:t.loading??"lazy",src:e.backgroundImage};if(e.backgroundImageAltText?i.alt=e.backgroundImageAltText:i.role="none",!r)return;if(r?.attribute){t.setAttribute(r.attribute,e.backgroundImage);return}t.append(ne(r.tag,{slot:r.slot},ne("img",i)))}}function ar(e){return!e||typeof e!="string"||e.includes("(Gi(),Ln)).catch(console.error),e}function yp(e,t,r){e.prices&&(e.prices=ar(e.prices)),Ae("prices",e,t,r)}function nl(e,t,r){let i=e.hasAttribute("data-wcs-osi")&&!!e.getAttribute("data-wcs-osi"),a=e.className||"",n=ap.exec(a)?.[0]??"accent",o=n.includes("accent"),s=n.includes("primary"),c=n.includes("secondary"),l=n.includes("-outline"),d=n.includes("-link");e.classList.remove("accent","primary","secondary");let p;if(t.consonant)p=Lp(e,o,i,d,s,c,r?.ctas?.size);else if(d)p=e;else{let u;o?u="accent":s?u="primary":c&&(u="secondary"),p=t.spectrum==="swc"?Pp(e,r,l,u,i):_p(e,r,l,u,i)}return p}function wp(e,t){let{slot:r}=t?.description,i=e.querySelectorAll(`[slot="${r}"] a[data-wcs-osi]`);i.length&&i.forEach(a=>{let n=nl(a,e,t);a.replaceWith(n)})}function Ep(e,t,r){e.description&&(e.description=ar(e.description)),e.promoText&&(e.promoText=ar(e.promoText)),e.shortDescription&&(e.shortDescription=ar(e.shortDescription)),Ae("promoText",e,t,r),Ae("description",e,t,r),Ae("shortDescription",e,t,r),e.shortDescription&&(t.setAttribute("action-menu","true"),e.actionMenuLabel||t.setAttribute("action-menu-label","More options")),wp(t,r),Ae("callout",e,t,r),Ae("quantitySelect",e,t,r),Ae("whatsIncluded",e,t,r)}function Ap(e,t,r,i={}){if(!r.addon)return;let n=(e.addon??i.addon)?.replace(/[{}]/g,"");if(!n||/disabled/.test(n))return;let o=ne("merch-addon",{slot:"addon"},n);[...o.querySelectorAll(D)].forEach(s=>{let c=s.parentElement;c?.nodeName==="P"&&c.setAttribute("data-plan-type","")}),t.append(o)}function Sp(e,t,r){e.addonConfirmation&&Ae("addonConfirmation",e,t,r)}function Cp(e,t,r,i){i?.secureLabel&&r?.secureLabel&&t.setAttribute("secure-label",i.secureLabel)}function Tp(e,t,r=!0){try{let i=typeof e!="string"?"":e,a=al(i);if(a.length<=t)return[i,a];let n=0,o=!1,s=r?t-$n.length<1?1:t-$n.length:t,c=[];for(let p of i){if(n++,p==="<")if(o=!0,i[n]==="/")c.pop();else{let u="";for(let f of i.substring(n)){if(f===" "||f===">")break;u+=f}c.push(u)}if(p==="/"&&i[n]===">"&&c.pop(),p===">"){o=!1;continue}if(!o&&(s--,s===0))break}let l=i.substring(0,n).trim();if(c.length>0){c[0]==="p"&&c.shift();for(let p of c.reverse())l+=``}return[`${l}${r?$n:""}`,a]}catch{let a=typeof e=="string"?e:"",n=al(a);return[a,n]}}function al(e){if(!e)return"";let t="",r=!1;for(let i of e){if(i==="<"&&(r=!0),i===">"){r=!1;continue}r||(t+=i)}return t}function kp(e,t){t.querySelectorAll("a.upt-link").forEach(i=>{let a=Ye.createFrom(i);i.replaceWith(a),a.initializeWcsData(e.osi,e.promoCode)})}function _p(e,t,r,i,a){let n=e;a?n=customElements.get("checkout-button").createCheckoutButton({},e.innerHTML):n.innerHTML=`${n.textContent}`,n.setAttribute("tabindex",0);for(let d of e.attributes)["class","is"].includes(d.name)||n.setAttribute(d.name,d.value);n.firstElementChild?.classList.add("spectrum-Button-label");let o=t?.ctas?.size??"M",s=`spectrum-Button--${i}`,c=sp.includes(o)?`spectrum-Button--size${o}`:"spectrum-Button--sizeM",l=["spectrum-Button",s,c];return r&&l.push("spectrum-Button--outline"),n.classList.add(...l),n}function Pp(e,t,r,i,a){let n=e;a&&(n=customElements.get("checkout-button").createCheckoutButton(e.dataset),n.connectedCallback(),n.render());let o="fill";r&&(o="outline");let s=ne("sp-button",{treatment:o,variant:i,tabIndex:0,size:t?.ctas?.size??"m",...e.dataset.analyticsId&&{"data-analytics-id":e.dataset.analyticsId}},e.innerHTML);return s.source=n,(a?n.onceSettled():Promise.resolve(n)).then(c=>{s.setAttribute("data-navigation-url",c.href)}),s.addEventListener("click",c=>{c.defaultPrevented||n.click()}),s}function Lp(e,t,r,i,a,n,o){let s=e;if(r)try{let c=customElements.get("checkout-link");c&&(s=c.createCheckoutLink(e.dataset,e.innerHTML)??e)}catch{}return i||(s.classList.add("button","con-button"),o&&o!=="m"&&s.classList.add(`button-${o}`),t&&s.classList.add("blue"),a&&s.classList.add("primary"),n&&s.classList.add("secondary")),s}function Mp(e,t,r,i,a){if(e.ctas){e.ctas=ar(e.ctas);let{slot:n}=r.ctas,o=ne("div",{slot:n},e.ctas),s=[...o.querySelectorAll("a")],c=a?.hideTrialCTAs?s.filter(d=>!cp.has(d.dataset.analyticsId)):s,l=(c.length>0?c:s).map(d=>nl(d,t,r));o.textContent="",o.append(...l),t.append(o),a?.hideTrialCTAs&&c.length>0&&l.forEach(d=>{let p=d.source??d;p.onceSettled&&(d.hidden=!0,p.onceSettled().then(()=>{p.value?.[0]?.offerType==="TRIAL"&&l.some(f=>f!==d&&!f.hidden)?d.remove():d.hidden=!1}).catch(()=>{d.hidden=!1}))})}}function Rp(e,t){let{tags:r}=e,i=r?.find(n=>typeof n=="string"&&n.startsWith(np))?.split("/").pop();if(!i)return;t.setAttribute(Qi,i),[...t.shadowRoot.querySelectorAll("a[data-analytics-id],button[data-analytics-id]"),...t.querySelectorAll("a[data-analytics-id],button[data-analytics-id]")].forEach((n,o)=>{n.setAttribute(op,`${n.dataset.analyticsId}-${o+1}`)})}function Op(e){e.spectrum==="css"&&[["primary-link","primary"],["secondary-link","secondary"]].forEach(([t,r])=>{e.querySelectorAll(`a.${t}`).forEach(i=>{i.classList.remove(t),i.classList.add("spectrum-Link",`spectrum-Link--${r}`)})})}function Np(e){e.querySelectorAll("[slot]").forEach(i=>{i.remove()}),e.variant=void 0,["checkbox-label","stock-offer-osis","secure-label","background-image","background-color","border-color","badge-background-color","badge-color","badge-text","gradient-border","size",Qi].forEach(i=>e.removeAttribute(i));let r=["wide-strip","thin-strip"];e.classList.remove(...r)}async function ol(e,t){if(!e){let c=t?.id||"unknown";throw console.error(`hydrate: Fragment is undefined. Cannot hydrate card (merchCard id: ${c}).`),new Error(`hydrate: Fragment is undefined for card (merchCard id: ${c}).`)}if(!e.fields){let c=e.id||"unknown",l=t?.id||"unknown";throw console.error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'. Cannot hydrate.`),new Error(`hydrate: Fragment for card ID '${c}' (merchCard id: ${l}) is missing 'fields'.`)}let{id:r,fields:i,settings:a={},priceLiterals:n}=e,{variant:o}=i;if(!o)throw new Error(`hydrate: no variant found in payload ${r}`);Np(t),t.compatVersion=i.compatVersion,t.contextPromotionCode=i.promoCode,t.settings=a,n&&(t.priceLiterals=n),t.id??(t.id=e.id),e.variationId&&t.setAttribute("variation-id",e.variationId??""),t.variant=o,await t.updateComplete;let{aemFragmentMapping:s}=t.variantLayout;if(!s)throw new Error(`hydrate: variant mapping not found for ${r}`);s.style==="consonant"&&t.setAttribute("consonant",!0),lp(i,t,s.mnemonics),hp(i,t,s),pp(i,t,s.size),mp(i,t),up(i,t,s.title),dp(i,t,s),gp(i,t,s),yp(i,t,s),bp(i,t,s.backgroundImage),fp(i,t,s.allowedColors,s.backgroundColor),vp(i,t,s),xp(i,t,s),Ep(i,t,s),Ap(i,t,s,a),Sp(i,t,s),Cp(i,t,s,a);try{kp(i,t)}catch{}Mp(i,t,s,o,a),Rp(i,t),Op(t)}var Ji="merch-card",Hn=2e4,sl="merch-card:",hl=["full-pricing-express","simplified-pricing-express"],pl=["segment","product"];function cl(e,t){let r=e.closest(Ji);if(!r)return t;r.priceLiterals&&(t.literals??(t.literals={}),Object.assign(t.literals,r.priceLiterals)),!t.promotionCode&&r.compatVersion>=1&&(t.promotionCode=r.promotionCode),r.aemFragment&&(t[ke]=!0),r.variantLayout?.priceOptionsProvider?.(e,t)}function ll(e,t){let r=e.closest(Ji);if(!r)return t;!t.promotionCode&&r.compatVersion>=1&&(t.promotionCode=r.promotionCode)}function Ip(e){e.providers.has(cl)||e.providers.price(cl),e.providers.has(ll)||e.providers.checkout(ll)}var ti=new IntersectionObserver(e=>{e.forEach(t=>{let r=t.target;if(hl.includes(r.variant)){if(r.clientHeight===0)return;ti.unobserve(r),r.requestUpdate();return}if(pl.includes(r.variant)){if(t.boundingClientRect.width===0)return;if(r.variant==="product"&&r.querySelector('merch-icon[slot="icons"]')){ti.unobserve(r);return}let i=r.getBoundingClientRect().width,n=r.querySelector('[slot="badge"]')?.getBoundingClientRect().width||0;if(i===0||n===0){ti.unobserve(r);return}r.style.setProperty("--consonant-merch-card-heading-xs-max-width",`${Math.round(i-n-16)}px`),ti.unobserve(r)}})}),zp=0,ii,nr,or,sr,ze,St,Se,Ct,X,At,ri,Bn,Zi,Ze=class extends U{constructor(){super();w(this,X);w(this,ii);w(this,nr);w(this,or);w(this,sr);w(this,ze);w(this,St);w(this,Se);w(this,Ct,new Promise(r=>{y(this,Se,r)}));m(this,"compatVersion");m(this,"customerSegment");m(this,"marketSegment");m(this,"variantLayout");this.id=null,this.failed=!1,this.filters={},this.types="",this.selected=!1,this.spectrum="css",this.loading="lazy",this.handleAemFragmentEvents=this.handleAemFragmentEvents.bind(this),this.handleMerchOfferSelectReady=this.handleMerchOfferSelectReady.bind(this)}set contextPromotionCode(r){y(this,ii,r)}firstUpdated(){this.variantLayout=On(this),this.variantLayout?.connectedCallbackHook()}willUpdate(r){(r.has("variant")||!this.variantLayout)&&(this.variantLayout?.disconnectedCallbackHook(),this.variantLayout=On(this),this.variantLayout?.connectedCallbackHook())}updated(r){if(!this.style.getPropertyValue("--consonant-merch-card-border-color")&&this.computedBorderColor&&(r.has("badgeBackgroundColor")||r.has("borderColor"))&&this.style.setProperty("--consonant-merch-card-border-color",this.computedBorderColor),r.has("backgroundColor")&&this.style.setProperty("--merch-card-custom-background-color",this.backgroundColor?`var(--${this.backgroundColor})`:""),r.has("whatsIncludedDividerColor")){let i=this.whatsIncludedDividerColor;!i||i.toLowerCase()==="default"?this.style.removeProperty("--merch-whats-included-divider-color"):i.toLowerCase()==="transparent"?this.style.setProperty("--merch-whats-included-divider-color","transparent"):this.style.setProperty("--merch-whats-included-divider-color",`var(--${i})`)}try{this.variantLayoutPromise=this.variantLayout?.postCardUpdateHook(r)}catch(i){Z(this,X,At).call(this,`Error in postCardUpdateHook: ${i.message}`,{},!1)}}get theme(){return this.closest("sp-theme")}get dir(){return this.closest("[dir]")?.getAttribute("dir")??"ltr"}render(){if(!(!this.isConnected||!this.variantLayout||this.style.display==="none"))return this.variantLayout.renderLayout()}get computedBorderColor(){return["ccd-slice","ccd-suggested","ah-promoted-plans","simplified-pricing-express","full-pricing-express"].includes(this.variant)?"":this.borderColor?this.borderColor:this.badgeBackgroundColor}get badgeElement(){return this.shadowRoot.getElementById("badge")}get headingmMSlot(){return this.shadowRoot.querySelector('slot[name="heading-m"]').assignedElements()[0]}get footerSlot(){return this.shadowRoot.querySelector('slot[name="footer"]')?.assignedElements()[0]}get descriptionSlot(){return this.shadowRoot.querySelector('slot[name="body-xs"')?.assignedElements()[0]}get descriptionSlotCompare(){return this.shadowRoot.querySelector('slot[name="body-m"')?.assignedElements()[0]}get iconButton(){return this.querySelector('[slot="callout-content"] .icon-button')}get price(){return this.headingmMSlot?.querySelector(D)}get checkoutLinks(){return[...this.footerSlot?.querySelectorAll(Ce)??[]]}get checkoutLinksDescription(){return[...this.descriptionSlot?.querySelectorAll(Ce)??[]]}get checkoutLinkDescriptionCompare(){return[...this.descriptionSlotCompare?.querySelectorAll(Ce)??[]]}get activeDescriptionLinks(){return this.variant==="mini-compare-chart"||this.variant==="mini-compare-chart-mweb"?this.checkoutLinkDescriptionCompare:this.checkoutLinksDescription}async toggleStockOffer({target:r}){if(!this.stockOfferOsis)return;let i=this.checkoutLinks;if(i.length!==0)for(let a of i){await a.onceSettled();let n=a.value?.[0]?.planType;if(!n)return;let o=this.stockOfferOsis[n];if(!o)return;let s=a.dataset.wcsOsi.split(",").filter(c=>c!==o);r.checked&&s.push(o),a.dataset.wcsOsi=s.join(",")}}changeHandler(r){r.target.tagName==="MERCH-ADDON"&&this.toggleAddon(r.target)}toggleAddon(r){this.variantLayout?.toggleAddon?.(r);let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length===0)return;let a=n=>{let{offerType:o,planType:s}=n.value?.[0]??{};if(!o||!s)return;let c=r.getOsi(s,o),l=(n.dataset.wcsOsi||"").split(",").filter(d=>d&&d!==c);r.checked&&l.push(c),n.dataset.wcsOsi=l.join(",")};i.forEach(a)}handleQuantitySelection(r){let i=[...this.checkoutLinks,...this.activeDescriptionLinks??[]];if(i.length!==0)for(let a of i)a.dataset.quantity=r.detail.option}get titleElement(){return this.querySelector(this.variantLayout?.headingSelector||".card-heading")}get title(){return this.titleElement?.textContent?.trim()}get description(){return this.querySelector('[slot="body-xs"]')?.textContent?.trim()}updateFilters(r){let i={...this.filters};Object.keys(i).forEach(a=>{if(r){i[a].order=Math.min(i[a].order||2,2);return}let n=i[a].order;n===1||isNaN(n)||(i[a].order=Number(n)+1)}),this.filters=i}showInfoTooltip(r,i){let a="tooltip-left",n="tooltip-right";window.screen.width<600&&r.getAttribute("data-tooltip")?.length>12&&(this.iconButton.classList.remove(a),this.iconButton.classList.remove(n),r.getBoundingClientRect().x<100&&this.iconButton.classList.add(a),r.getBoundingClientRect().x>window.screen.width-100&&this.iconButton.classList.add(n)),this.iconButton.classList.add(i)}handleInfoIconEvents(){let r="tooltip-visible";this.iconButton&&(["mouseenter","focus"].forEach(i=>this.iconButton.addEventListener(i,a=>this.showInfoTooltip(a.target,r),!1)),["mouseleave","blur"].forEach(i=>this.iconButton.addEventListener(i,()=>this.iconButton.classList.remove(r),!1)),this.iconButton.addEventListener("keydown",i=>{i.key==="Escape"&&this.iconButton.classList.remove(r)}))}includes(r){return this.textContent.match(new RegExp(r,"i"))!==null}connectedCallback(){var i;super.connectedCallback(),h(this,or)||y(this,or,zp++),this.aemFragment||((i=h(this,Se))==null||i.call(this),y(this,Se,void 0)),this.id??(this.id=this.getAttribute("id")??this.aemFragment?.getAttribute("fragment"));let r=this.id??h(this,or);y(this,St,`${sl}${r}${st}`),y(this,nr,`${sl}${r}${ct}`),performance.mark(h(this,St)),y(this,ze,mt()),Ip(h(this,ze)),y(this,sr,h(this,ze).Log.module(Ji)),this.addEventListener(te,this.handleQuantitySelection),this.addEventListener(di,this.handleAddonAndQuantityUpdate),this.addEventListener(gr,this.handleMerchOfferSelectReady),this.addEventListener(nt,this.handleAemFragmentEvents),this.addEventListener(at,this.handleAemFragmentEvents),this.addEventListener(fr,this.handleInfoIconEvents),this.addEventListener("change",this.changeHandler),this.variantLayout&&this.variantLayout.connectedCallbackHook(),this.aemFragment||setTimeout(()=>this.checkReady(),0)}disconnectedCallback(){super.disconnectedCallback(),this.variantLayout?.disconnectedCallbackHook(),this.removeEventListener(te,this.handleQuantitySelection),this.removeEventListener(nt,this.handleAemFragmentEvents),this.removeEventListener(at,this.handleAemFragmentEvents),this.removeEventListener(fr,this.handleInfoIconEvents),this.removeEventListener("change",this.changeHandler),this.removeEventListener(di,this.handleAddonAndQuantityUpdate)}async handleAemFragmentEvents(r){var i;if(this.isConnected&&(r.type===nt&&Z(this,X,At).call(this,"AEM fragment cannot be loaded"),r.type===at&&(this.failed=!1,r.target.nodeName==="AEM-FRAGMENT"))){let a=r.detail;try{h(this,Se)||y(this,Ct,new Promise(n=>{y(this,Se,n)})),ol(a,this)}catch(n){Z(this,X,At).call(this,`hydration has failed: ${n.message}`)}finally{(i=h(this,Se))==null||i.call(this),y(this,Se,void 0)}this.checkReady()}}async checkReady(){if(!this.isConnected||this.failed)return;h(this,Ct)&&(await h(this,Ct),(hl.includes(this.variant)||pl.includes(this.variant))&&ti.observe(this),y(this,Ct,void 0)),this.variantLayoutPromise&&(await this.variantLayoutPromise,this.variantLayoutPromise=void 0);let r=new Promise(o=>setTimeout(()=>o("timeout"),Hn));if(this.aemFragment){let o=await Promise.race([this.aemFragment.updateComplete,r]);if(o===!1||o==="timeout"){let s=o==="timeout"?`AEM fragment was not resolved within ${Hn} timeout`:"AEM fragment cannot be loaded";Z(this,X,At).call(this,s,{},!1);return}}let i=[...this.querySelectorAll(ur)],a=Promise.all(i.map(o=>o.onceSettled().catch(()=>o))).then(o=>o.every(s=>s.classList.contains("placeholder-resolved"))),n=await Promise.race([a,r]);if(n===!0){this.measure=performance.measure(h(this,nr),h(this,St));let o={...this.aemFragment?.fetchInfo,...h(this,ze).duration,measure:Ne(this.measure)};return this.dispatchEvent(new CustomEvent(fr,{bubbles:!0,composed:!0,detail:o})),this}else{this.measure=performance.measure(h(this,nr),h(this,St));let o={measure:Ne(this.measure),...h(this,ze).duration};n==="timeout"?Z(this,X,At).call(this,`Contains offers that were not resolved within ${Hn} timeout`,o):Z(this,X,At).call(this,"Contains unresolved offers",o)}}get aemFragment(){return this.querySelector("aem-fragment")}get addon(){return this.querySelector("merch-addon")}get quantitySelect(){return this.querySelector("merch-quantity-select")}get addonCheckbox(){return this.querySelector("merch-addon")}displayFooterElementsInColumn(){if(!this.classList.contains("product"))return;let r=this.shadowRoot.querySelector(".secure-transaction-label");(this.footerSlot?.querySelectorAll(Ce)).length===2&&r&&r.parentElement.classList.add("footer-column")}handleMerchOfferSelectReady(){this.offerSelect&&!this.offerSelect.planType||this.displayFooterElementsInColumn()}get dynamicPrice(){return this.querySelector('[slot="price"]')}handleAddonAndQuantityUpdate({detail:{id:r,items:i}}){if(!r||!i?.length||this.closest('[role="tabpanel"][hidden="true"]'))return;let n=this.checkoutLinks.find(d=>d.getAttribute("data-modal-id")===r);if(!n)return;let s=new URL(n.getAttribute("href")).searchParams.get("pa"),c=i.find(d=>d.productArrangementCode===s)?.quantity,l=!!i.find(d=>d.productArrangementCode!==s);if(c&&this.quantitySelect?.dispatchEvent(new CustomEvent(Pt,{detail:{quantity:c},bubbles:!0,composed:!0})),this.addonCheckbox&&this.addonCheckbox.checked!==l){this.toggleStockOffer({target:this.addonCheckbox});let d=new Event("change",{bubbles:!0,cancelable:!0});Object.defineProperty(d,"target",{writable:!1,value:{checked:l}}),this.addonCheckbox.handleChange(d)}}get prices(){return Array.from(this.querySelectorAll(D))}get promoPrice(){if(!this.querySelector("span.price-strikethrough"))return;let r=this.querySelector(".price.price-alternative");if(r||(r=this.querySelector(`${D}[data-template="price"] > span`)),!!r)return r=r.innerText,r}get regularPrice(){return h(this,X,ri)?.innerText}get promotionCode(){let r=[...this.querySelectorAll(`${D}[data-promotion-code],${Ce}[data-promotion-code]`)].map(a=>a.dataset.promotionCode).filter(a=>![void 0,"cancel-context"].includes(a));if(r.length===0)return h(this,ii);let i=[...new Set(r)];return i.length>1&&h(this,sr)?.warn(`Multiple different promotion codes found: ${i.join(", ")}`),r[0]}get annualPrice(){return this.querySelector(`${D}[data-template="price"] > .price.price-annual`)?.innerText}get promoText(){}get taxText(){return(h(this,X,Bn)??h(this,X,ri))?.querySelector("span.price-tax-inclusivity")?.textContent?.trim()||void 0}get recurrenceText(){return h(this,X,ri)?.querySelector("span.price-recurrence")?.textContent?.trim()}get unitText(){let r=".price-unit-type";return h(this,X,Bn)?.querySelector(r)?.textContent?.trim()??h(this,X,ri)?.querySelector(r)?.textContent?.trim()??this.querySelector(r)?.textContent?.trim()??void 0}get planTypeText(){return this.querySelector('[is="inline-price"][data-template="legal"] span.price-plan-type')?.textContent?.trim()}get seeTermsInfo(){let r=this.querySelector('a[is="upt-link"]');if(r)return Z(this,X,Zi).call(this,r)}get renewalText(){return this.querySelector("span.renewal-text")?.textContent?.trim()}get promoDurationText(){return this.querySelector("span.promo-duration-text")?.textContent?.trim()}get ctas(){let r=this.querySelector('[slot="ctas"], [slot="footer"]')?.querySelectorAll(`${Ce}, a`);return Array.from(r??[])}get primaryCta(){return Z(this,X,Zi).call(this,this.ctas.find(r=>r.variant==="accent"||r.matches(".spectrum-Button--accent,.con-button.blue")))}get secondaryCta(){return Z(this,X,Zi).call(this,this.ctas.find(r=>r.variant!=="accent"&&!r.matches(".spectrum-Button--accent,.con-button.blue")))}};ii=new WeakMap,nr=new WeakMap,or=new WeakMap,sr=new WeakMap,ze=new WeakMap,St=new WeakMap,Se=new WeakMap,Ct=new WeakMap,X=new WeakSet,At=function(r,i={},a=!0){var c;if(!this.isConnected)return;let o=this.aemFragment?.getAttribute("fragment");o=`[${o}]`;let s={...this.aemFragment.fetchInfo,...h(this,ze).duration,...i,message:r};h(this,sr).error(`merch-card${o}: ${r}`,s),this.failed=!0,(c=h(this,Se))==null||c.call(this),y(this,Se,void 0),h(this,ze).isPreview()||(this.style.display="none"),a&&this.dispatchEvent(new CustomEvent(sa,{bubbles:!0,composed:!0,detail:s}))},ri=function(){return this.querySelector("span.price-strikethrough")??this.querySelector(`${D}[data-template="price"] > span`)},Bn=function(){return this.querySelector(`${D}[data-template="legal"]`)},Zi=function(r){if(r)return{text:r.innerText.trim(),analyticsId:r.dataset.analyticsId,href:r.getAttribute("href")??r.dataset.href}},m(Ze,"properties",{id:{type:String,attribute:"id",reflect:!0},name:{type:String,attribute:"name",reflect:!0},variant:{type:String,reflect:!0},size:{type:String,attribute:"size",reflect:!0},badgeColor:{type:String,attribute:"badge-color",reflect:!0},borderColor:{type:String,attribute:"border-color",reflect:!0},backgroundColor:{type:String,attribute:"background-color",reflect:!0},whatsIncludedDividerColor:{type:String,attribute:"whats-included-divider-color",reflect:!0},badgeBackgroundColor:{type:String,attribute:"badge-background-color",reflect:!0},backgroundImage:{type:String,attribute:"background-image",reflect:!0},badgeText:{type:String,attribute:"badge-text"},actionMenu:{type:Boolean,attribute:"action-menu"},actionMenuLabel:{type:String,attribute:"action-menu-label"},customHr:{type:Boolean,attribute:"custom-hr"},consonant:{type:Boolean,attribute:"consonant"},failed:{type:Boolean,attribute:"failed",reflect:!0},spectrum:{type:String,attribute:"spectrum"},detailBg:{type:String,attribute:"detail-bg"},secureLabel:{type:String,attribute:"secure-label"},checkboxLabel:{type:String,attribute:"checkbox-label"},addonTitle:{type:String,attribute:"addon-title"},addonOffers:{type:Object,attribute:"addon-offers"},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},storageOption:{type:String,attribute:"storage",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0},heightSync:{type:Boolean,attribute:"height-sync"},settings:{type:Object,attribute:!1},stockOfferOsis:{type:Object,attribute:"stock-offer-osis",converter:{fromAttribute:r=>{if(!r)return;let[i,a,n]=r.split(",");return{PUF:i,ABM:a,M2M:n}}}},filters:{type:String,reflect:!0,converter:{fromAttribute:r=>Object.fromEntries(r.split(",").map(i=>{let[a,n,o]=i.split(":"),s=Number(n);return[a,{order:isNaN(s)?void 0:s,size:o}]})),toAttribute:r=>Object.entries(r).map(([i,{order:a,size:n}])=>[i,a,n].filter(o=>o!=null).join(":")).join(",")}},types:{type:String,attribute:"types",reflect:!0},merchOffer:{type:Object},analyticsId:{type:String,attribute:Qi,reflect:!0},loading:{type:String},priceLiterals:{type:Object}}),m(Ze,"styles",[hc,...pc()]),m(Ze,"registerVariant",G),m(Ze,"getCollectionOptions",Gc),m(Ze,"getFragmentMapping",Vi);customElements.define(Ji,Ze);P();var cr,ai=class extends U{constructor(){super();w(this,cr);this.defaults={},this.variant="plans"}saveContainerDefaultValues(){let r=this.closest(this.getAttribute("container")),i=r?.querySelector('[slot="description"]:not(merch-offer > *)')?.cloneNode(!0),a=r?.badgeText;return{description:i,badgeText:a}}getSlottedElement(r,i){return(i||this.closest(this.getAttribute("container"))).querySelector(`[slot="${r}"]:not(merch-offer > *)`)}updateSlot(r,i){let a=this.getSlottedElement(r,i);if(!a)return;let n=this.selectedOffer.getOptionValue(r)?this.selectedOffer.getOptionValue(r):this.defaults[r];n&&a.replaceWith(n.cloneNode(!0))}handleOfferSelection(r){let i=r.detail;this.selectOffer(i)}handleOfferSelectionByQuantity(r){let i=r.detail.option,a=Number.parseInt(i),n=this.findAppropriateOffer(a);this.selectOffer(n),this.getSlottedElement("cta").setAttribute("data-quantity",a)}selectOffer(r){if(!r)return;let i=this.selectedOffer;i&&(i.selected=!1),r.selected=!0,this.selectedOffer=r,this.planType=r.planType,this.updateContainer(),this.updateComplete.then(()=>{this.dispatchEvent(new CustomEvent(oa,{detail:this,bubbles:!0}))})}findAppropriateOffer(r){let i=null;return this.offers.find(n=>{let o=Number.parseInt(n.getAttribute("value"));if(o===r)return!0;if(o>r)return!1;i=n})||i}updateBadgeText(r){this.selectedOffer.badgeText===""?r.badgeText=null:this.selectedOffer.badgeText?r.badgeText=this.selectedOffer.badgeText:r.badgeText=this.defaults.badgeText}updateContainer(){let r=this.closest(this.getAttribute("container"));!r||!this.selectedOffer||(this.updateSlot("cta",r),this.updateSlot("secondary-cta",r),this.updateSlot("price",r),!this.manageableMode&&(this.updateSlot("description",r),this.updateBadgeText(r)))}render(){return g`
`}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusin),this.addEventListener("click",this.handleFocusin),this.addEventListener(_t,this.handleOfferSelectReady);let r=this.closest("merch-quantity-select");this.manageableMode=r,this.offers=[...this.querySelectorAll("merch-offer")],y(this,cr,this.handleOfferSelectionByQuantity.bind(this)),this.manageableMode?r.addEventListener(te,h(this,cr)):this.defaults=this.saveContainerDefaultValues(),this.selectedOffer=this.offers[0],this.planType&&this.updateContainer()}get miniCompareMobileCard(){return(this.merchCard?.variant==="mini-compare-chart"||this.merchCard?.variant==="mini-compare-chart-mweb")&&this.isMobile}get merchCard(){return this.closest("merch-card")}get isMobile(){return window.matchMedia("(max-width: 767px)").matches}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(te,h(this,cr)),this.removeEventListener(_t,this.handleOfferSelectReady),this.removeEventListener("focusin",this.handleFocusin),this.removeEventListener("click",this.handleFocusin)}get price(){return this.querySelector('merch-offer[aria-selected] [is="inline-price"]')}get customerSegment(){return this.selectedOffer?.customerSegment}get marketSegment(){return this.selectedOffer?.marketSegment}handleFocusin(r){r.target?.nodeName==="MERCH-OFFER"&&(r.preventDefault(),r.stopImmediatePropagation(),this.selectOffer(r.target))}async handleOfferSelectReady(){this.planType||this.querySelector("merch-offer:not([plan-type])")||(this.planType=this.selectedOffer.planType,await this.updateComplete,this.selectOffer(this.selectedOffer??this.querySelector("merch-offer[aria-selected]")??this.querySelector("merch-offer")),this.dispatchEvent(new CustomEvent(gr,{bubbles:!0})))}};cr=new WeakMap,m(ai,"styles",b` :host { display: inline-block; } @@ -9128,7 +9215,7 @@ merch-card[border-color="spectrum-red-700-plans"] { position: relative; height: 40px; } -`;var zp="merch-offer",ni=class extends U{constructor(){super();m(this,"tr");this.type="radio",this.selected=!1}getOptionValue(r){return this.querySelector(`[slot="${r}"]`)}connectedCallback(){super.connectedCallback(),this.initOffer(),this.configuration=this.closest("quantity-selector"),!this.hasAttribute("tabindex")&&!this.configuration&&(this.tabIndex=0),!this.hasAttribute("role")&&!this.configuration&&(this.role="radio")}get asRadioOption(){return g`
+`;var Dp="merch-offer",ni=class extends U{constructor(){super();m(this,"tr");this.type="radio",this.selected=!1}getOptionValue(r){return this.querySelector(`[slot="${r}"]`)}connectedCallback(){super.connectedCallback(),this.initOffer(),this.configuration=this.closest("quantity-selector"),!this.hasAttribute("tabindex")&&!this.configuration&&(this.tabIndex=0),!this.hasAttribute("role")&&!this.configuration&&(this.role="radio")}get asRadioOption(){return g`
${this.text} @@ -9145,7 +9232,7 @@ merch-card[border-color="spectrum-red-700-plans"] { > -
`}render(){return this.configuration||!this.price?"":this.type==="subscription-option"?this.asSubscriptionOption:this.asRadioOption}get price(){return this.querySelector('span[is="inline-price"]:not([data-template="strikethrough"])')}get cta(){return this.querySelector(Ce)}get prices(){return this.querySelectorAll('span[is="inline-price"]')}get customerSegment(){return this.price?.value?.[0].customerSegment}get marketSegment(){return this.price?.value?.[0].marketSegments[0]}async initOffer(){if(!this.price)return;this.prices.forEach(i=>i.setAttribute("slot","price")),await this.updateComplete,await Promise.all([...this.prices].map(i=>i.onceSettled()));let{value:[r]}=this.price;this.planType=r.planType,await this.updateComplete,this.dispatchEvent(new CustomEvent(_t,{bubbles:!0}))}};m(ni,"properties",{text:{type:String},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},badgeText:{type:String,attribute:"badge-text"},type:{type:String,attribute:"type",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0}}),m(ni,"styles",[ml]);customElements.define(zp,ni);P();P();var ul=b` +
`}render(){return this.configuration||!this.price?"":this.type==="subscription-option"?this.asSubscriptionOption:this.asRadioOption}get price(){return this.querySelector('span[is="inline-price"]:not([data-template="strikethrough"])')}get cta(){return this.querySelector(Ce)}get prices(){return this.querySelectorAll('span[is="inline-price"]')}get customerSegment(){return this.price?.value?.[0].customerSegment}get marketSegment(){return this.price?.value?.[0].marketSegments[0]}async initOffer(){if(!this.price)return;this.prices.forEach(i=>i.setAttribute("slot","price")),await this.updateComplete,await Promise.all([...this.prices].map(i=>i.onceSettled()));let{value:[r]}=this.price;this.planType=r.planType,await this.updateComplete,this.dispatchEvent(new CustomEvent(_t,{bubbles:!0}))}};m(ni,"properties",{text:{type:String},selected:{type:Boolean,attribute:"aria-selected",reflect:!0},badgeText:{type:String,attribute:"badge-text"},type:{type:String,attribute:"type",reflect:!0},planType:{type:String,attribute:"plan-type",reflect:!0}}),m(ni,"styles",[ml]);customElements.define(Dp,ni);P();P();var ul=b` :host { box-sizing: border-box; --background-color: var(--qs-background-color, #f6f6f6); @@ -9304,7 +9391,7 @@ merch-card[border-color="spectrum-red-700-plans"] { :host(:dir(rtl)) .item.selected { background-position: left 7px center; } -`;var[T0,k0,Fn,Un,gl,fl]=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter","Tab"];var Gn=class extends U{static get properties(){return{closed:{type:Boolean,reflect:!0},selected:{type:Number},min:{type:Number},max:{type:Number},step:{type:Number},maxInput:{type:Number,attribute:"max-input"},options:{type:Array},highlightedIndex:{type:Number},defaultValue:{type:Number,attribute:"default-value",reflect:!0},title:{type:String}}}static get styles(){return ul}constructor(){super(),this.options=[],this.title="",this.closed=!0,this.min=0,this.max=0,this.step=0,this.maxInput=void 0,this.defaultValue=void 0,this.selectedValue=0,this.highlightedIndex=0,this.toggleMenu=this.toggleMenu.bind(this),this.closeMenu=this.closeMenu.bind(this),this.openMenu=this.openMenu.bind(this),this.handleClickOutside=this.handleClickOutside.bind(this),this.boundKeydownListener=this.handleKeydown.bind(this),this.handleKeyupDebounced=Rr(this.handleKeyup.bind(this),500),this.debouncedQuantityUpdate=Rr(this.handleQuantityUpdate.bind(this),500)}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.boundKeydownListener),window.addEventListener("mousedown",this.handleClickOutside),this.addEventListener(Pt,this.debouncedQuantityUpdate)}get button(){return this.shadowRoot.querySelector("button")}handleKeyup(t){t.key===Un||t.key===Fn||(this.handleInput(),this.sendEvent())}selectValue(){if(!this.closed){let t=this.options[this.highlightedIndex];if(!t){this.closed=!0;return}this.selectedValue=t,this.handleMenuOption(this.selectedValue),this.closed=!0}}handleKeydown(t){switch(t.key){case" ":this.selectValue();break;case"Escape":this.closed=!0;break;case fl:this.selectValue();break;case Un:this.closed?this.openMenu():this.highlightedIndex=(this.highlightedIndex+1)%this.options.length,t.preventDefault();break;case Fn:this.closed||(this.highlightedIndex=(this.highlightedIndex-1+this.options.length)%this.options.length),t.preventDefault();break;case gl:this.selectValue(),this.button.classList.contains("focused")&&t.preventDefault();break}t.composedPath().includes(this)&&t.stopPropagation()}adjustInput(t,r){this.selectedValue=r,t.value=r,this.highlightedIndex=this.options.indexOf(r)}handleInput(){let t=this.shadowRoot.querySelector(".text-field-input"),r=t.value.replace(/\D/g,"");t.value=r;let i=parseInt(r);if(!isNaN(i))if(i>0&&i!==this.selectedValue){let a=i;this.maxInput&&i>this.maxInput&&(a=this.maxInput),this.min&&a0)for(let r=this.min;r<=this.max;r+=this.step)t.push(r);return t}update(t){(t.has("min")||t.has("max")||t.has("step")||t.has("defaultValue"))&&(this.options=this.generateOptionsArray(),this.highlightedIndex=this.defaultValue?this.options.indexOf(this.defaultValue):0,this.handleMenuOption(this.defaultValue?this.defaultValue:this.options[0])),super.update(t)}handleClickOutside(t){t.composedPath().includes(this)||this.closeMenu()}toggleMenu(){this.closed=!this.closed,this.adjustPopoverPlacement(),this.closed&&(this.highlightedIndex=this.options.indexOf(this.selectedValue))}closeMenu(){this.closed=!0,this.highlightedIndex=this.options.indexOf(this.selectedValue)}openMenu(){this.closed=!1,this.adjustPopoverPlacement()}adjustPopoverPlacement(){let t=this.shadowRoot.querySelector(".popover");this.closed||t.getBoundingClientRect().bottom<=window.innerHeight?t.setAttribute("placement","bottom"):t.setAttribute("placement","top")}handleMouseEnter(t){this.highlightedIndex=t}handleMenuOption(t,r){t===this.max&&this.shadowRoot.querySelector(".text-field-input")?.focus(),this.selectedValue=t,this.sendEvent(),r&&this.closeMenu()}sendEvent(){let t=new CustomEvent(te,{detail:{option:this.selectedValue},bubbles:!0});this.dispatchEvent(t)}get offerSelect(){return this.querySelector("merch-offer-select")}get popover(){return g`
0&&i!==this.selectedValue){let a=i;this.maxInput&&i>this.maxInput&&(a=this.maxInput),this.min&&a0)for(let r=this.min;r<=this.max;r+=this.step)t.push(r);return t}update(t){(t.has("min")||t.has("max")||t.has("step")||t.has("defaultValue"))&&(this.options=this.generateOptionsArray(),this.highlightedIndex=this.defaultValue?this.options.indexOf(this.defaultValue):0,this.handleMenuOption(this.defaultValue?this.defaultValue:this.options[0])),super.update(t)}handleClickOutside(t){t.composedPath().includes(this)||this.closeMenu()}toggleMenu(){this.closed=!this.closed,this.adjustPopoverPlacement(),this.closed&&(this.highlightedIndex=this.options.indexOf(this.selectedValue))}closeMenu(){this.closed=!0,this.highlightedIndex=this.options.indexOf(this.selectedValue)}openMenu(){this.closed=!1,this.adjustPopoverPlacement()}adjustPopoverPlacement(){let t=this.shadowRoot.querySelector(".popover");this.closed||t.getBoundingClientRect().bottom<=window.innerHeight?t.setAttribute("placement","bottom"):t.setAttribute("placement","top")}handleMouseEnter(t){this.highlightedIndex=t}handleMenuOption(t,r){t===this.max&&this.shadowRoot.querySelector(".text-field-input")?.focus(),this.selectedValue=t,this.sendEvent(),r&&this.closeMenu()}sendEvent(){let t=new CustomEvent(te,{detail:{option:this.selectedValue},bubbles:!0});this.dispatchEvent(t)}get offerSelect(){return this.querySelector("merch-offer-select")}get popover(){return g`
${this.popover}
- `}};customElements.define("merch-quantity-select",Gn);Gi();P();var xl=` + `}};customElements.define("merch-quantity-select",Gn);Gi();P();var vl=` merch-card[variant="ccd-suggested"] [slot="heading-xs"] { font-size: var(--consonant-merch-card-heading-xxs-font-size); @@ -9388,7 +9475,7 @@ merch-card[border-color="spectrum-red-700-plans"] { .spectrum--darkest merch-card[variant="ccd-suggested"]:hover { --consonant-merch-card-border-color:rgb(73, 73, 73); } -`;var vl={backgroundImage:{attribute:"background-image"},badge:!0,ctas:{slot:"cta",size:"M"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"p",slot:"price"},size:[],subtitle:{tag:"h4",slot:"detail-s"},title:{tag:"h3",slot:"heading-xs"}},lr=class extends A{getGlobalCSS(){return xl}get stripStyle(){return this.card.backgroundImage?` +`;var xl={backgroundImage:{attribute:"background-image"},badge:!0,ctas:{slot:"cta",size:"M"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"p",slot:"price"},size:[],subtitle:{tag:"h4",slot:"detail-s"},title:{tag:"h3",slot:"heading-xs"}},lr=class extends A{getGlobalCSS(){return vl}get stripStyle(){return this.card.backgroundImage?` background: url("${this.card.backgroundImage}"); background-size: auto 100%; background-repeat: no-repeat; @@ -10359,7 +10446,7 @@ merch-card[variant="ccd-slice"] [slot='body-s'] a.spectrum-Link { gap: 8px; margin-top: 15px; } - `);G("ccd-suggested",lr,vl,lr.variantStyle);G("ccd-slice",dr,yl,dr.variantStyle);G("ah-try-buy-widget",hr,qn,hr.variantStyle);G("ah-promoted-plans",pr,Vn,pr.variantStyle);G("fries",mr,jn,mr.variantStyle); + `);G("ccd-suggested",lr,xl,lr.variantStyle);G("ccd-slice",dr,yl,dr.variantStyle);G("ah-try-buy-widget",hr,qn,hr.variantStyle);G("ah-promoted-plans",pr,Vn,pr.variantStyle);G("fries",mr,jn,mr.variantStyle); /*! Bundled license information: @lit/reactive-element/css-tag.js: diff --git a/web-components/dist/merch-card-collection.js b/web-components/dist/merch-card-collection.js index d1a006baf..7652722b3 100644 --- a/web-components/dist/merch-card-collection.js +++ b/web-components/dist/merch-card-collection.js @@ -1,4 +1,4 @@ -var ea=Object.defineProperty;var ta=e=>{throw TypeError(e)};var jo=(e,t,r)=>t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Wo=(e,t)=>{for(var r in t)ea(e,r,{get:t[r],enumerable:!0})};var f=(e,t,r)=>jo(e,typeof t!="symbol"?t+"":t,r),Tr=(e,t,r)=>t.has(e)||ta("Cannot "+r);var S=(e,t,r)=>(Tr(e,t,"read from private field"),r?r.call(e):t.get(e)),G=(e,t,r)=>t.has(e)?ta("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),W=(e,t,r,i)=>(Tr(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),ut=(e,t,r)=>(Tr(e,t,"access private method"),r);import{html as Ae,LitElement as Io,css as Do,unsafeCSS as Oo,nothing as me}from"./lit-all.min.js";var O="(max-width: 767px)",X="(max-width: 1199px)",I="(min-width: 768px)",T="(min-width: 1200px)",Z="(min-width: 1600px)",ra={matchMobile:window.matchMedia(O),matchDesktop:window.matchMedia(`${T} and (not ${Z})`),matchDesktopOrUp:window.matchMedia(T),matchLargeDesktop:window.matchMedia(Z),get isMobile(){return this.matchMobile.matches},get isDesktop(){return this.matchDesktop.matches},get isDesktopOrUp(){return this.matchDesktopOrUp.matches}},C=ra;function Gt(){return ra.isDesktop}var gt=class{constructor(t,r){this.key=Symbol("match-media-key"),this.matches=!1,this.host=t,this.host.addController(this),this.media=window.matchMedia(r),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),t.addController(this)}hostConnected(){var t;(t=this.media)==null||t.addEventListener("change",this.onChange)}hostDisconnected(){var t;(t=this.media)==null||t.removeEventListener("change",this.onChange)}onChange(t){this.matches!==t.matches&&(this.matches=t.matches,this.host.requestUpdate(this.key,!this.matches))}};var ia="hashchange";function Yo(e=window.location.hash){let t=[],r=e.replace(/^#/,"").split("&");for(let i of r){let[a,n=""]=i.split("=");a&&t.push([a,decodeURIComponent(n.replace(/\+/g," "))])}return Object.fromEntries(t)}function ft(e){let t=new URLSearchParams(window.location.hash.slice(1));Object.entries(e).forEach(([a,n])=>{n?t.set(a,n):t.delete(a)}),t.sort();let r=t.toString();if(r===window.location.hash)return;let i=window.scrollY||document.documentElement.scrollTop;window.location.hash=r,window.scrollTo(0,i)}function aa(e){let t=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let r=Yo(window.location.hash);e(r)};return t(),window.addEventListener(ia,t),()=>{window.removeEventListener(ia,t)}}var Zr={};Wo(Zr,{CLASS_NAME_FAILED:()=>Or,CLASS_NAME_HIDDEN:()=>Ko,CLASS_NAME_PENDING:()=>Ir,CLASS_NAME_RESOLVED:()=>Dr,CheckoutWorkflow:()=>hs,CheckoutWorkflowStep:()=>ee,Commitment:()=>Re,ERROR_MESSAGE_BAD_REQUEST:()=>Hr,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>cs,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>zr,EVENT_AEM_ERROR:()=>Rr,EVENT_AEM_LOAD:()=>Mr,EVENT_MAS_ERROR:()=>Nr,EVENT_MAS_READY:()=>ss,EVENT_MERCH_ADDON_AND_QUANTITY_UPDATE:()=>ns,EVENT_MERCH_CARD_ACTION_MENU_TOGGLE:()=>_r,EVENT_MERCH_CARD_COLLECTION_LITERALS_CHANGED:()=>de,EVENT_MERCH_CARD_COLLECTION_SHOWMORE:()=>Lr,EVENT_MERCH_CARD_COLLECTION_SIDENAV_ATTACHED:()=>vt,EVENT_MERCH_CARD_COLLECTION_SORT:()=>Pr,EVENT_MERCH_CARD_QUANTITY_CHANGE:()=>as,EVENT_MERCH_OFFER_READY:()=>Jo,EVENT_MERCH_OFFER_SELECT_READY:()=>es,EVENT_MERCH_QUANTITY_SELECTOR_CHANGE:()=>ue,EVENT_MERCH_SEARCH_CHANGE:()=>os,EVENT_MERCH_SIDENAV_SELECT:()=>kr,EVENT_MERCH_STOCK_CHANGE:()=>rs,EVENT_MERCH_STORAGE_CHANGE:()=>is,EVENT_OFFER_SELECTED:()=>ts,EVENT_TYPE_FAILED:()=>Br,EVENT_TYPE_READY:()=>qt,EVENT_TYPE_RESOLVED:()=>Fr,Env:()=>ge,FF_ANNUAL_PRICE:()=>We,FF_DEFAULTS:()=>xe,HEADER_X_REQUEST_ID:()=>xt,LOG_NAMESPACE:()=>Ur,Landscape:()=>Te,MARK_DURATION_SUFFIX:()=>Xr,MARK_START_SUFFIX:()=>Yr,MODAL_TYPE_3_IN_1:()=>Ne,NAMESPACE:()=>Xo,PARAM_AOS_API_KEY:()=>ls,PARAM_ENV:()=>Gr,PARAM_LANDSCAPE:()=>qr,PARAM_MAS_PREVIEW:()=>$r,PARAM_WCS_API_KEY:()=>ds,PROVIDER_ENVIRONMENT:()=>Wr,SELECTOR_MAS_CHECKOUT_LINK:()=>na,SELECTOR_MAS_ELEMENT:()=>Cr,SELECTOR_MAS_INLINE_PRICE:()=>q,SELECTOR_MAS_SP_BUTTON:()=>Qo,SELECTOR_MAS_UPT_LINK:()=>oa,SORT_ORDER:()=>pe,STATE_FAILED:()=>he,STATE_PENDING:()=>Se,STATE_RESOLVED:()=>ve,SUPPORTED_COUNTRIES:()=>Kr,TAG_NAME_SERVICE:()=>Zo,TEMPLATE_PRICE:()=>ps,TEMPLATE_PRICE_ANNUAL:()=>us,TEMPLATE_PRICE_LEGAL:()=>ne,TEMPLATE_PRICE_STRIKETHROUGH:()=>ms,Term:()=>ce,WCS_PROD_URL:()=>Vr,WCS_STAGE_URL:()=>jr});var Re=Object.freeze({MONTH:"MONTH",YEAR:"YEAR",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",PERPETUAL:"PERPETUAL",TERM_LICENSE:"TERM_LICENSE",ACCESS_PASS:"ACCESS_PASS",THREE_MONTHS:"THREE_MONTHS",SIX_MONTHS:"SIX_MONTHS"}),ce=Object.freeze({ANNUAL:"ANNUAL",MONTHLY:"MONTHLY",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",P1D:"P1D",P1Y:"P1Y",P3Y:"P3Y",P10Y:"P10Y",P15Y:"P15Y",P3D:"P3D",P7D:"P7D",P30D:"P30D",HALF_YEARLY:"HALF_YEARLY",QUARTERLY:"QUARTERLY"}),Xo="merch",Ko="hidden",qt="wcms:commerce:ready",Zo="mas-commerce-service",q='span[is="inline-price"][data-wcs-osi]',na='a[is="checkout-link"][data-wcs-osi],button[is="checkout-button"][data-wcs-osi]',Qo="sp-button[data-wcs-osi]",oa='a[is="upt-link"]',Cr=`${q},${na},${oa}`,Jo="merch-offer:ready",es="merch-offer-select:ready",_r="merch-card:action-menu-toggle",ts="merch-offer:selected",rs="merch-stock:change",is="merch-storage:change",ue="merch-quantity-selector:change",as="merch-card-quantity:change",ns="merch-modal:addon-and-quantity-update",os="merch-search:change",Pr="merch-card-collection:sort",de="merch-card-collection:literals-changed",vt="merch-card-collection:sidenav-attached",Lr="merch-card-collection:showmore",kr="merch-sidenav:select",Mr="aem:load",Rr="aem:error",ss="mas:ready",Nr="mas:error",Or="placeholder-failed",Ir="placeholder-pending",Dr="placeholder-resolved",Hr="Bad WCS request",zr="Commerce offer not found",cs="Literals URL not provided",Br="mas:failed",Fr="mas:resolved",Ur="mas/commerce",$r="mas.preview",Gr="commerce.env",qr="commerce.landscape",ls="commerce.aosKey",ds="commerce.wcsKey",Vr="https://www.adobe.com/web_commerce_artifact",jr="https://www.stage.adobe.com/web_commerce_artifact_stage",he="failed",Se="pending",ve="resolved",Te={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"},xt="X-Request-Id",ee=Object.freeze({SEGMENTATION:"segmentation",BUNDLE:"bundle",COMMITMENT:"commitment",RECOMMENDATION:"recommendation",EMAIL:"email",PAYMENT:"payment",CHANGE_PLAN_TEAM_PLANS:"change-plan/team-upgrade/plans",CHANGE_PLAN_TEAM_PAYMENT:"change-plan/team-upgrade/payment"}),hs="UCv3",ge=Object.freeze({STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"}),Wr={PRODUCTION:"PRODUCTION"},Ne={TWP:"twp",D2P:"d2p",CRM:"crm"},Yr=":start",Xr=":duration",ps="price",ms="price-strikethrough",us="annual",ne="legal",xe="mas-ff-defaults",We="mas-ff-annual-price",pe={alphabetical:"alphabetical",authored:"authored"},Kr=["AE","AM","AR","AT","AU","AZ","BB","BD","BE","BG","BH","BO","BR","BS","BY","CA","CH","CL","CN","CO","CR","CY","CZ","DE","DK","DO","DZ","EC","EE","EG","ES","FI","FR","GB","GE","GH","GR","GT","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JO","JP","KE","KG","KR","KW","KZ","LA","LB","LK","LT","LU","LV","MA","MD","MO","MT","MU","MX","MY","NG","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RO","RS","RU","SA","SE","SG","SI","SK","SV","TH","TJ","TM","TN","TR","TT","TW","TZ","UA","US","UY","UZ","VE","VN","YE","ZA"];var gs="mas-commerce-service";var bt=(e,t)=>e?.querySelector(`[slot="${t}"]`)?.textContent?.trim();function fe(e,t={},r=null,i=null){let a=i?document.createElement(e,{is:i}):document.createElement(e);r instanceof HTMLElement?a.appendChild(r):a.innerHTML=r;for(let[n,o]of Object.entries(t))a.setAttribute(n,o);return a}function Vt(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function Qr(){return window.matchMedia("(max-width: 1024px)").matches}function yt(){return document.getElementsByTagName(gs)?.[0]}function wt(e){let t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}import{html as jt,nothing as fs}from"./lit-all.min.js";var Ye,Et=class Et{constructor(t){f(this,"card");G(this,Ye);this.card=t,this.insertVariantStyle()}getContainer(){return W(this,Ye,S(this,Ye)??this.card.closest('merch-card-collection, [class*="-merch-cards"]')??this.card.parentElement),S(this,Ye)}insertVariantStyle(){let t=this.constructor.name;if(!Et.styleMap[t]){Et.styleMap[t]=!0;let r=document.createElement("style");r.innerHTML=this.getGlobalCSS(),document.head.appendChild(r)}}updateCardElementMinHeight(t,r){if(!t||this.card.heightSync===!1)return;let i=`--consonant-merch-card-${this.card.variant}-${r}-height`,a=Math.max(0,parseInt(window.getComputedStyle(t).height)||0),n=this.getContainer(),o=parseInt(n.style.getPropertyValue(i))||0;a>o&&n.style.setProperty(i,`${a}px`)}get badge(){let t;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(t=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),jt` +var ei=Object.defineProperty;var ti=e=>{throw TypeError(e)};var jo=(e,t,r)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Wo=(e,t)=>{for(var r in t)ei(e,r,{get:t[r],enumerable:!0})};var f=(e,t,r)=>jo(e,typeof t!="symbol"?t+"":t,r),Tr=(e,t,r)=>t.has(e)||ti("Cannot "+r);var S=(e,t,r)=>(Tr(e,t,"read from private field"),r?r.call(e):t.get(e)),G=(e,t,r)=>t.has(e)?ti("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),W=(e,t,r,a)=>(Tr(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),ut=(e,t,r)=>(Tr(e,t,"access private method"),r);import{html as Ae,LitElement as Io,css as Do,unsafeCSS as Oo,nothing as me}from"./lit-all.min.js";var O="(max-width: 767px)",X="(max-width: 1199px)",I="(min-width: 768px)",T="(min-width: 1200px)",Z="(min-width: 1600px)",ri={matchMobile:window.matchMedia(O),matchDesktop:window.matchMedia(`${T} and (not ${Z})`),matchDesktopOrUp:window.matchMedia(T),matchLargeDesktop:window.matchMedia(Z),get isMobile(){return this.matchMobile.matches},get isDesktop(){return this.matchDesktop.matches},get isDesktopOrUp(){return this.matchDesktopOrUp.matches}},C=ri;function Gt(){return ri.isDesktop}var gt=class{constructor(t,r){this.key=Symbol("match-media-key"),this.matches=!1,this.host=t,this.host.addController(this),this.media=window.matchMedia(r),this.matches=this.media.matches,this.onChange=this.onChange.bind(this),t.addController(this)}hostConnected(){var t;(t=this.media)==null||t.addEventListener("change",this.onChange)}hostDisconnected(){var t;(t=this.media)==null||t.removeEventListener("change",this.onChange)}onChange(t){this.matches!==t.matches&&(this.matches=t.matches,this.host.requestUpdate(this.key,!this.matches))}};var ai="hashchange";function Yo(e=window.location.hash){let t=[],r=e.replace(/^#/,"").split("&");for(let a of r){let[i,n=""]=a.split("=");i&&t.push([i,decodeURIComponent(n.replace(/\+/g," "))])}return Object.fromEntries(t)}function ft(e){let t=new URLSearchParams(window.location.hash.slice(1));Object.entries(e).forEach(([i,n])=>{n?t.set(i,n):t.delete(i)}),t.sort();let r=t.toString();if(r===window.location.hash)return;let a=window.scrollY||document.documentElement.scrollTop;window.location.hash=r,window.scrollTo(0,a)}function ii(e){let t=()=>{if(window.location.hash&&!window.location.hash.includes("="))return;let r=Yo(window.location.hash);e(r)};return t(),window.addEventListener(ai,t),()=>{window.removeEventListener(ai,t)}}var Zr={};Wo(Zr,{CLASS_NAME_FAILED:()=>Or,CLASS_NAME_HIDDEN:()=>Ko,CLASS_NAME_PENDING:()=>Ir,CLASS_NAME_RESOLVED:()=>Dr,CheckoutWorkflow:()=>hs,CheckoutWorkflowStep:()=>ee,Commitment:()=>Re,ERROR_MESSAGE_BAD_REQUEST:()=>Hr,ERROR_MESSAGE_MISSING_LITERALS_URL:()=>cs,ERROR_MESSAGE_OFFER_NOT_FOUND:()=>zr,EVENT_AEM_ERROR:()=>Rr,EVENT_AEM_LOAD:()=>Mr,EVENT_MAS_ERROR:()=>Nr,EVENT_MAS_READY:()=>ss,EVENT_MERCH_ADDON_AND_QUANTITY_UPDATE:()=>ns,EVENT_MERCH_CARD_ACTION_MENU_TOGGLE:()=>_r,EVENT_MERCH_CARD_COLLECTION_LITERALS_CHANGED:()=>de,EVENT_MERCH_CARD_COLLECTION_SHOWMORE:()=>Lr,EVENT_MERCH_CARD_COLLECTION_SIDENAV_ATTACHED:()=>vt,EVENT_MERCH_CARD_COLLECTION_SORT:()=>Pr,EVENT_MERCH_CARD_QUANTITY_CHANGE:()=>is,EVENT_MERCH_OFFER_READY:()=>Jo,EVENT_MERCH_OFFER_SELECT_READY:()=>es,EVENT_MERCH_QUANTITY_SELECTOR_CHANGE:()=>ue,EVENT_MERCH_SEARCH_CHANGE:()=>os,EVENT_MERCH_SIDENAV_SELECT:()=>kr,EVENT_MERCH_STOCK_CHANGE:()=>rs,EVENT_MERCH_STORAGE_CHANGE:()=>as,EVENT_OFFER_SELECTED:()=>ts,EVENT_TYPE_FAILED:()=>Br,EVENT_TYPE_READY:()=>qt,EVENT_TYPE_RESOLVED:()=>Fr,Env:()=>ge,FF_ANNUAL_PRICE:()=>We,FF_DEFAULTS:()=>xe,HEADER_X_REQUEST_ID:()=>xt,LOG_NAMESPACE:()=>Ur,Landscape:()=>Te,MARK_DURATION_SUFFIX:()=>Xr,MARK_START_SUFFIX:()=>Yr,MODAL_TYPE_3_IN_1:()=>Ne,NAMESPACE:()=>Xo,PARAM_AOS_API_KEY:()=>ls,PARAM_ENV:()=>Gr,PARAM_LANDSCAPE:()=>qr,PARAM_MAS_PREVIEW:()=>$r,PARAM_WCS_API_KEY:()=>ds,PROVIDER_ENVIRONMENT:()=>Wr,SELECTOR_MAS_CHECKOUT_LINK:()=>ni,SELECTOR_MAS_ELEMENT:()=>Cr,SELECTOR_MAS_INLINE_PRICE:()=>q,SELECTOR_MAS_SP_BUTTON:()=>Qo,SELECTOR_MAS_UPT_LINK:()=>oi,SORT_ORDER:()=>pe,STATE_FAILED:()=>he,STATE_PENDING:()=>Se,STATE_RESOLVED:()=>ve,SUPPORTED_COUNTRIES:()=>Kr,TAG_NAME_SERVICE:()=>Zo,TEMPLATE_PRICE:()=>ps,TEMPLATE_PRICE_ANNUAL:()=>us,TEMPLATE_PRICE_LEGAL:()=>ne,TEMPLATE_PRICE_STRIKETHROUGH:()=>ms,Term:()=>ce,WCS_PROD_URL:()=>Vr,WCS_STAGE_URL:()=>jr});var Re=Object.freeze({MONTH:"MONTH",YEAR:"YEAR",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",PERPETUAL:"PERPETUAL",TERM_LICENSE:"TERM_LICENSE",ACCESS_PASS:"ACCESS_PASS",THREE_MONTHS:"THREE_MONTHS",SIX_MONTHS:"SIX_MONTHS"}),ce=Object.freeze({ANNUAL:"ANNUAL",MONTHLY:"MONTHLY",TWO_YEARS:"TWO_YEARS",THREE_YEARS:"THREE_YEARS",P1D:"P1D",P1Y:"P1Y",P3Y:"P3Y",P10Y:"P10Y",P15Y:"P15Y",P3D:"P3D",P7D:"P7D",P30D:"P30D",HALF_YEARLY:"HALF_YEARLY",QUARTERLY:"QUARTERLY"}),Xo="merch",Ko="hidden",qt="wcms:commerce:ready",Zo="mas-commerce-service",q='span[is="inline-price"][data-wcs-osi]',ni='a[is="checkout-link"][data-wcs-osi],button[is="checkout-button"][data-wcs-osi]',Qo="sp-button[data-wcs-osi]",oi='a[is="upt-link"]',Cr=`${q},${ni},${oi}`,Jo="merch-offer:ready",es="merch-offer-select:ready",_r="merch-card:action-menu-toggle",ts="merch-offer:selected",rs="merch-stock:change",as="merch-storage:change",ue="merch-quantity-selector:change",is="merch-card-quantity:change",ns="merch-modal:addon-and-quantity-update",os="merch-search:change",Pr="merch-card-collection:sort",de="merch-card-collection:literals-changed",vt="merch-card-collection:sidenav-attached",Lr="merch-card-collection:showmore",kr="merch-sidenav:select",Mr="aem:load",Rr="aem:error",ss="mas:ready",Nr="mas:error",Or="placeholder-failed",Ir="placeholder-pending",Dr="placeholder-resolved",Hr="Bad WCS request",zr="Commerce offer not found",cs="Literals URL not provided",Br="mas:failed",Fr="mas:resolved",Ur="mas/commerce",$r="mas.preview",Gr="commerce.env",qr="commerce.landscape",ls="commerce.aosKey",ds="commerce.wcsKey",Vr="https://www.adobe.com/web_commerce_artifact",jr="https://www.stage.adobe.com/web_commerce_artifact_stage",he="failed",Se="pending",ve="resolved",Te={DRAFT:"DRAFT",PUBLISHED:"PUBLISHED"},xt="X-Request-Id",ee=Object.freeze({SEGMENTATION:"segmentation",BUNDLE:"bundle",COMMITMENT:"commitment",RECOMMENDATION:"recommendation",EMAIL:"email",PAYMENT:"payment",CHANGE_PLAN_TEAM_PLANS:"change-plan/team-upgrade/plans",CHANGE_PLAN_TEAM_PAYMENT:"change-plan/team-upgrade/payment"}),hs="UCv3",ge=Object.freeze({STAGE:"STAGE",PRODUCTION:"PRODUCTION",LOCAL:"LOCAL"}),Wr={PRODUCTION:"PRODUCTION"},Ne={TWP:"twp",D2P:"d2p",CRM:"crm"},Yr=":start",Xr=":duration",ps="price",ms="price-strikethrough",us="annual",ne="legal",xe="mas-ff-defaults",We="mas-ff-annual-price",pe={alphabetical:"alphabetical",authored:"authored"},Kr=["AE","AM","AR","AT","AU","AZ","BB","BD","BE","BG","BH","BO","BR","BS","BY","CA","CH","CL","CN","CO","CR","CY","CZ","DE","DK","DO","DZ","EC","EE","EG","ES","FI","FR","GB","GE","GH","GR","GT","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IS","IT","JM","JO","JP","KE","KG","KR","KW","KZ","LA","LB","LK","LT","LU","LV","MA","MD","MO","MT","MU","MX","MY","NG","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RO","RS","RU","SA","SE","SG","SI","SK","SV","TH","TJ","TM","TN","TR","TT","TW","TZ","UA","US","UY","UZ","VE","VN","YE","ZA"];var gs="mas-commerce-service";var bt=(e,t)=>e?.querySelector(`[slot="${t}"]`)?.textContent?.trim();function fe(e,t={},r=null,a=null){let i=a?document.createElement(e,{is:a}):document.createElement(e);r instanceof HTMLElement?i.appendChild(r):i.innerHTML=r;for(let[n,o]of Object.entries(t))i.setAttribute(n,o);return i}function Vt(e){return`startTime:${e.startTime.toFixed(2)}|duration:${e.duration.toFixed(2)}`}function Qr(){return window.matchMedia("(max-width: 1024px)").matches}function yt(){return document.getElementsByTagName(gs)?.[0]}function wt(e){let t=window.getComputedStyle(e);return e.offsetHeight+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}import{html as jt,nothing as fs}from"./lit-all.min.js";var Ye,Et=class Et{constructor(t){f(this,"card");G(this,Ye);this.card=t,this.insertVariantStyle()}getContainer(){return W(this,Ye,S(this,Ye)??this.card.closest('merch-card-collection, [class*="-merch-cards"]')??this.card.parentElement),S(this,Ye)}insertVariantStyle(){let t=this.constructor.name;if(!Et.styleMap[t]){Et.styleMap[t]=!0;let r=document.createElement("style");r.innerHTML=this.getGlobalCSS(),document.head.appendChild(r)}}updateCardElementMinHeight(t,r){if(!t||this.card.heightSync===!1)return;let a=`--consonant-merch-card-${this.card.variant}-${r}-height`,i=Math.max(0,parseInt(window.getComputedStyle(t).height)||0),n=this.getContainer(),o=parseInt(n.style.getPropertyValue(a))||0;i>o&&n.style.setProperty(a,`${i}px`)}get badge(){let t;if(!(!this.card.badgeBackgroundColor||!this.card.badgeColor||!this.card.badgeText))return this.evergreen&&(t=`border: 1px solid ${this.card.badgeBackgroundColor}; border-right: none;`),jt`
{throw TypeError(e)};var jo=(e,t,r)=>t in >${this.card.secureLabel}`:fs}get secureLabelFooter(){return jt`
${this.secureLabel} -
`}async postCardUpdateHook(){}connectedCallbackHook(){}disconnectedCallbackHook(){}syncHeights(){}renderLayout(){}get aemFragmentMapping(){return Wt(this.card.variant)}};Ye=new WeakMap,f(Et,"styleMap",{});var L=Et;import{html as Jr,css as vs}from"./lit-all.min.js";var sa=` + `}async postCardUpdateHook(){}connectedCallbackHook(){}disconnectedCallbackHook(){}syncHeights(){}renderLayout(){}get aemFragmentMapping(){return Wt(this.card.variant)}};Ye=new WeakMap,f(Et,"styleMap",{});var L=Et;import{html as Jr,css as vs}from"./lit-all.min.js";var si=` :root { --consonant-merch-card-catalog-width: 302px; --consonant-merch-card-catalog-icon-size: 40px; @@ -163,7 +163,7 @@ merch-card[variant="catalog"] .payment-details { merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { font-size: 15px; font-weight: 700; -}`;var ca={cardName:{attribute:"name"},badge:!0,ctas:{slot:"footer",size:"m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"h3",slot:"heading-xs"},shortDescription:{tag:"div",slot:"action-menu-content",attributes:{tabindex:"0"}},size:["wide","super-wide"],title:{tag:"h3",slot:"heading-xs"}},Xe=class extends L{constructor(r){super(r);f(this,"dispatchActionMenuToggle",()=>{this.card.dispatchEvent(new CustomEvent(_r,{bubbles:!0,composed:!0,detail:{card:this.card.name,type:"action-menu"}}))});f(this,"toggleActionMenu",r=>{!this.actionMenuContentSlot||!r||r.type!=="click"&&r.code!=="Space"&&r.code!=="Enter"||(r.preventDefault(),r.stopPropagation(),this.setMenuVisibility(!this.isMenuOpen()))});f(this,"toggleActionMenuFromCard",r=>{let i=r?.type==="mouseleave"?!0:void 0;this.card.blur(),this.setIconVisibility(!1),this.actionMenuContentSlot&&r?.type==="mouseleave"&&this.setMenuVisibility(!1)});f(this,"showActionMenuOnHover",()=>{this.actionMenu&&this.setIconVisibility(!0)});f(this,"hideActionMenu",()=>{this.setMenuVisibility(!1),this.setIconVisibility(!1)});f(this,"hideActionMenuOnBlur",r=>{r.relatedTarget===this.actionMenu||this.actionMenu?.contains(r.relatedTarget)||this.slottedContent?.contains(r.relatedTarget)||(this.isMenuOpen()&&this.setMenuVisibility(!1),this.card.contains(r.relatedTarget)||this.setIconVisibility(!1))});f(this,"handleCardFocusOut",r=>{r.relatedTarget===this.actionMenu||this.actionMenu?.contains(r.relatedTarget)||r.relatedTarget===this.card||(this.slottedContent&&(r.target===this.slottedContent||this.slottedContent.contains(r.target))&&(this.slottedContent.contains(r.relatedTarget)||this.setMenuVisibility(!1)),!this.card.contains(r.relatedTarget)&&!this.isMenuOpen()&&this.setIconVisibility(!1))});f(this,"handleKeyDown",r=>{(r.key==="Escape"||r.key==="Esc")&&(r.preventDefault(),this.hideActionMenu(),this.actionMenu?.focus())})}get actionMenu(){return this.card.shadowRoot.querySelector(".action-menu")}get actionMenuContentSlot(){return this.card.shadowRoot.querySelector('slot[name="action-menu-content"]')}get slottedContent(){return this.card.querySelector('[slot="action-menu-content"]')}setIconVisibility(r){if(this.slottedContent){if(Qr()&&this.card.actionMenu)return;this.actionMenu?.classList.toggle("invisible",!r),this.actionMenu?.classList.toggle("always-visible",r)}}setMenuVisibility(r){this.actionMenuContentSlot?.classList.toggle("hidden",!r),this.setAriaExpanded(this.actionMenu,r.toString()),r&&(this.dispatchActionMenuToggle(),setTimeout(()=>{let i=this.slottedContent?.querySelector("a");i&&i.focus()},0))}isMenuOpen(){return!this.actionMenuContentSlot?.classList.contains("hidden")}renderLayout(){return Jr`
+}`;var ci={cardName:{attribute:"name"},badge:!0,ctas:{slot:"footer",size:"m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"h3",slot:"heading-xs"},shortDescription:{tag:"div",slot:"action-menu-content",attributes:{tabindex:"0"}},size:["wide","super-wide"],title:{tag:"h3",slot:"heading-xs"}},Xe=class extends L{constructor(r){super(r);f(this,"dispatchActionMenuToggle",()=>{this.card.dispatchEvent(new CustomEvent(_r,{bubbles:!0,composed:!0,detail:{card:this.card.name,type:"action-menu"}}))});f(this,"toggleActionMenu",r=>{!this.actionMenuContentSlot||!r||r.type!=="click"&&r.code!=="Space"&&r.code!=="Enter"||(r.preventDefault(),r.stopPropagation(),this.setMenuVisibility(!this.isMenuOpen()))});f(this,"toggleActionMenuFromCard",r=>{let a=r?.type==="mouseleave"?!0:void 0;this.card.blur(),this.setIconVisibility(!1),this.actionMenuContentSlot&&r?.type==="mouseleave"&&this.setMenuVisibility(!1)});f(this,"showActionMenuOnHover",()=>{this.actionMenu&&this.setIconVisibility(!0)});f(this,"hideActionMenu",()=>{this.setMenuVisibility(!1),this.setIconVisibility(!1)});f(this,"hideActionMenuOnBlur",r=>{r.relatedTarget===this.actionMenu||this.actionMenu?.contains(r.relatedTarget)||this.slottedContent?.contains(r.relatedTarget)||(this.isMenuOpen()&&this.setMenuVisibility(!1),this.card.contains(r.relatedTarget)||this.setIconVisibility(!1))});f(this,"handleCardFocusOut",r=>{r.relatedTarget===this.actionMenu||this.actionMenu?.contains(r.relatedTarget)||r.relatedTarget===this.card||(this.slottedContent&&(r.target===this.slottedContent||this.slottedContent.contains(r.target))&&(this.slottedContent.contains(r.relatedTarget)||this.setMenuVisibility(!1)),!this.card.contains(r.relatedTarget)&&!this.isMenuOpen()&&this.setIconVisibility(!1))});f(this,"handleKeyDown",r=>{(r.key==="Escape"||r.key==="Esc")&&(r.preventDefault(),this.hideActionMenu(),this.actionMenu?.focus())})}get actionMenu(){return this.card.shadowRoot.querySelector(".action-menu")}get actionMenuContentSlot(){return this.card.shadowRoot.querySelector('slot[name="action-menu-content"]')}get slottedContent(){return this.card.querySelector('[slot="action-menu-content"]')}setIconVisibility(r){if(this.slottedContent){if(Qr()&&this.card.actionMenu)return;this.actionMenu?.classList.toggle("invisible",!r),this.actionMenu?.classList.toggle("always-visible",r)}}setMenuVisibility(r){this.actionMenuContentSlot?.classList.toggle("hidden",!r),this.setAriaExpanded(this.actionMenu,r.toString()),r&&(this.dispatchActionMenuToggle(),setTimeout(()=>{let a=this.slottedContent?.querySelector("a");a&&a.focus()},0))}isMenuOpen(){return!this.actionMenuContentSlot?.classList.contains("hidden")}renderLayout(){return Jr`
${this.badge}
`:""}
${this.secureLabelFooter} - `}getGlobalCSS(){return sa}setAriaExpanded(r,i){r.setAttribute("aria-expanded",i)}connectedCallbackHook(){this.card.addEventListener("mouseenter",this.showActionMenuOnHover),this.card.addEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.addEventListener("focusin",this.showActionMenuOnHover),this.card.addEventListener("focusout",this.handleCardFocusOut),this.card.addEventListener("keydown",this.handleKeyDown)}disconnectedCallbackHook(){this.card.removeEventListener("mouseenter",this.showActionMenuOnHover),this.card.removeEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.removeEventListener("focusin",this.showActionMenuOnHover),this.card.removeEventListener("focusout",this.handleCardFocusOut),this.card.removeEventListener("keydown",this.handleKeyDown)}};f(Xe,"variantStyle",vs` + `}getGlobalCSS(){return si}setAriaExpanded(r,a){r.setAttribute("aria-expanded",a)}connectedCallbackHook(){this.card.addEventListener("mouseenter",this.showActionMenuOnHover),this.card.addEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.addEventListener("focusin",this.showActionMenuOnHover),this.card.addEventListener("focusout",this.handleCardFocusOut),this.card.addEventListener("keydown",this.handleKeyDown)}disconnectedCallbackHook(){this.card.removeEventListener("mouseenter",this.showActionMenuOnHover),this.card.removeEventListener("mouseleave",this.toggleActionMenuFromCard),this.card.removeEventListener("focusin",this.showActionMenuOnHover),this.card.removeEventListener("focusout",this.handleCardFocusOut),this.card.removeEventListener("keydown",this.handleKeyDown)}};f(Xe,"variantStyle",vs` :host([variant='catalog']) { min-height: 330px; width: var(--consonant-merch-card-catalog-width); @@ -220,7 +220,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { right: initial; left: 16px; } - `);import{html as At,css as xs}from"./lit-all.min.js";var la=` + `);import{html as At,css as xs}from"./lit-all.min.js";var li=` :root { --consonant-merch-card-image-width: 300px; --merch-card-collection-card-width: var(--consonant-merch-card-image-width); @@ -259,7 +259,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { grid-template-columns: repeat(4, var(--consonant-merch-card-image-width)); } } -`;var da={cardName:{attribute:"name"},badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},badgeIcon:!0,borderColor:{attribute:"border-color"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],ctas:{slot:"footer",size:"m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"h3",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},size:["wide","super-wide"],title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},backgroundImage:{tag:"div",slot:"bg-image"}},Oe=class extends L{constructor(t){super(t)}getGlobalCSS(){return la}renderLayout(){return At`
+`;var di={cardName:{attribute:"name"},badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},badgeIcon:!0,borderColor:{attribute:"border-color"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],ctas:{slot:"footer",size:"m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},prices:{tag:"h3",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},size:["wide","super-wide"],title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},backgroundImage:{tag:"div",slot:"bg-image"}},Oe=class extends L{constructor(t){super(t)}getGlobalCSS(){return li}renderLayout(){return At`
@@ -303,7 +303,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { left: 0px; right: initial; } - `);import{html as pa}from"./lit-all.min.js";var ha=` + `);import{html as pi}from"./lit-all.min.js";var hi=` :root { --consonant-merch-card-inline-heading-width: 300px; } @@ -339,7 +339,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { grid-template-columns: repeat(4, var(--consonant-merch-card-inline-heading-width)); } } -`;var Yt=class extends L{constructor(t){super(t)}getGlobalCSS(){return ha}renderLayout(){return pa` ${this.badge} +`;var Yt=class extends L{constructor(t){super(t)}getGlobalCSS(){return hi}renderLayout(){return pi` ${this.badge}
@@ -347,7 +347,7 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary {
- ${this.card.customHr?"":pa`
`} ${this.secureLabelFooter}`}};import{html as Ce,css as bs,unsafeCSS as ua}from"./lit-all.min.js";var ma=` + ${this.card.customHr?"":pi`
`} ${this.secureLabelFooter}`}};import{html as Ce,css as bs,unsafeCSS as ui}from"./lit-all.min.js";var mi=` :root { --consonant-merch-card-mini-compare-chart-icon-size: 32px; --consonant-merch-card-mini-compare-border-color: #E9E9E9; @@ -639,10 +639,16 @@ merch-card[variant="catalog"] [slot="footer"] .spectrum-Link--primary { } /* Style each mnemonic-list as a footer row */ + /* + * Public API: --merch-whats-included-divider-color + * Set on (or any ancestor) to recolor the row divider + * above each merch-mnemonic-list row inside merch-whats-included. + * Fallback preserves the existing variant color for unset consumers. + */ merch-card[variant="mini-compare-chart"] merch-mnemonic-list { width: 100%; margin-inline: 0; - border-top: 1px solid var(--consonant-merch-card-mini-compare-border-color); + border-top: 1px solid var(--merch-whats-included-divider-color, var(--consonant-merch-card-mini-compare-border-color)); display: flex; gap: var(--consonant-merch-spacing-xs); justify-content: start; @@ -1144,14 +1150,14 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(7) { merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { min-height: var(--consonant-merch-card-footer-row-8-min-height); } -`;var ys=32,ga={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-xxs"},description:{tag:"div",slot:"body-m"},mnemonics:{size:"l"},quantitySelect:{tag:"div",slot:"quantity-select"},callout:{tag:"div",slot:"callout-content"},addon:!0,secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],whatsIncluded:{tag:"div",slot:"footer-rows"},ctas:{slot:"footer",size:"l"},style:"consonant"},Ke=class extends L{constructor(r){super(r);f(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);f(this,"getMiniCompareFooter",()=>{let r=this.card.secureLabel?Ce` +`;var ys=32,gi={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-xxs"},description:{tag:"div",slot:"body-m"},mnemonics:{size:"l"},quantitySelect:{tag:"div",slot:"quantity-select"},callout:{tag:"div",slot:"callout-content"},addon:!0,secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],borderColor:{attribute:"border-color"},allowedWhatsIncludedDividerColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],whatsIncludedDividerColor:{attribute:"whats-included-divider-color"},size:["wide","super-wide"],whatsIncluded:{tag:"div",slot:"footer-rows"},ctas:{slot:"footer",size:"l"},style:"consonant"},Ke=class extends L{constructor(r){super(r);f(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);f(this,"getMiniCompareFooter",()=>{let r=this.card.secureLabel?Ce` ${this.card.secureLabel}`:Ce``;return this.isNewVariant?Ce`
${r}

-
`:Ce`
${r}
`});this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(ue,this.updatePriceQuantity),this.visibilityObserver=new IntersectionObserver(([r])=>{r.boundingClientRect.height!==0&&r.isIntersecting&&(C.isMobile||requestAnimationFrame(()=>{let i=this.getContainer();if(!i)return;i.querySelectorAll('merch-card[variant="mini-compare-chart"]').forEach(n=>n.variantLayout?.syncHeights?.())}),this.visibilityObserver.disconnect())}),this.visibilityObserver.observe(this.card)}disconnectedCallbackHook(){if(this.card.removeEventListener(ue,this.updatePriceQuantity),this.visibilityObserver?.disconnect(),this.calloutListenersAdded){document.removeEventListener("touchstart",this.handleCalloutTouch),document.removeEventListener("mouseover",this.handleCalloutMouse);let r=this.card.querySelector('[slot="callout-content"] .icon-button');r?.removeEventListener("focusin",this.handleCalloutFocusin),r?.removeEventListener("focusout",this.handleCalloutFocusout),r?.removeEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!1}}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,i){if(this.isNewVariant){if(r.dataset.template===ne){i.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(i.displayPerUnit=!1)}}getGlobalCSS(){return ma}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2)return;this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(".top-section"),"top-section");let r=["heading-m","subtitle","body-m","heading-m-price","body-xxs","price-commitment","quantity-select","offers","promo-text","callout-content","addon"];this.card.classList.contains("bullet-list")&&r.push("footer-rows"),r.forEach(a=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${a}"]`),a)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer"),this.card.shadowRoot.querySelector(".mini-compare-chart-badge")?.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r;if(this.isNewVariant){let i=this.card.querySelector("merch-whats-included");if(!i)return;r=[...i.querySelectorAll('[slot="content"] merch-mnemonic-list')]}else{let i=this.card.querySelector('[slot="footer-rows"] ul');if(!i||!i.children)return;r=[...i.children]}r.length&&r.forEach((i,a)=>{let n=Math.max(ys,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(a+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(a+1),`${n}px`)})}removeEmptyRows(){this.isNewVariant?this.card.querySelectorAll("merch-whats-included merch-mnemonic-list").forEach(i=>{let a=i.querySelector('[slot="description"]');a&&!a.textContent.trim()&&i.remove()}):this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let a=i.querySelector(".footer-row-cell-description");a&&!a.textContent.trim()&&i.remove()})}padFooterRows(){let r=this.getContainer();if(!r)return;let i=r.querySelectorAll('merch-card[variant="mini-compare-chart"]');if(this.isNewVariant){let a=0;if(i.forEach(l=>{let d=l.querySelector("merch-whats-included");if(!d)return;let p=d.querySelectorAll('[slot="content"] merch-mnemonic-list:not([data-placeholder])');a=Math.max(a,p.length)}),a===0)return;let n=this.card.querySelector("merch-whats-included");if(!n)return;let o=n.querySelector('[slot="content"]');if(!o)return;o.querySelectorAll("merch-mnemonic-list[data-placeholder]").forEach(l=>l.remove());let s=o.querySelectorAll("merch-mnemonic-list").length,c=a-s;for(let l=0;l{let l=c.querySelector('[slot="footer-rows"] ul');if(!l)return;let d=l.querySelectorAll("li.footer-row-cell:not([data-placeholder])");a=Math.max(a,d.length)}),a===0)return;let n=this.card.querySelector('[slot="footer-rows"] ul');if(!n)return;n.querySelectorAll("li.footer-row-cell[data-placeholder]").forEach(c=>c.remove());let o=n.querySelectorAll("li.footer-row-cell").length,s=a-o;for(let c=0;cs.remove()),r.checked){if(o){let s=fe("p",{class:"addon-heading-m-price-addon",slot:"heading-m-price"},o.innerHTML);this.card.appendChild(s)}}else{let s=fe("p",{class:"card-heading",id:"free",slot:"heading-m-price"},"Free");this.card.appendChild(s)}}}showTooltip(r){r.classList.remove("hide-tooltip"),r.setAttribute("aria-expanded","true")}hideTooltip(r){r.classList.add("hide-tooltip"),r.setAttribute("aria-expanded","false")}adjustCallout(){let r=this.card.querySelector('[slot="callout-content"] .icon-button');if(!r||this.calloutListenersAdded)return;let i=r.title||r.dataset.tooltip;if(!i)return;r.title&&(r.dataset.tooltip=r.title,r.removeAttribute("title"));let a=r.parentElement;if(a&&a.tagName==="P"){let n=document.createElement("div"),o=document.createElement("div");o.className="callout-row";let s=document.createElement("div");for(s.className="callout-text";a.firstChild&&a.firstChild!==r;)s.appendChild(a.firstChild);o.appendChild(s),o.appendChild(r),n.appendChild(o),a.replaceWith(n)}r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("aria-label",i),r.setAttribute("aria-expanded","false"),this.hideTooltip(r),this.handleCalloutTouch=n=>{n.target!==r?this.hideTooltip(r):r.classList.contains("hide-tooltip")?this.showTooltip(r):this.hideTooltip(r)},this.handleCalloutMouse=n=>{n.target!==r?this.hideTooltip(r):this.showTooltip(r)},this.handleCalloutFocusin=()=>{this.showTooltip(r)},this.handleCalloutFocusout=()=>{this.hideTooltip(r)},this.handleCalloutKeydown=n=>{n.key==="Escape"&&(this.hideTooltip(r),r.blur())},document.addEventListener("touchstart",this.handleCalloutTouch),document.addEventListener("mouseover",this.handleCalloutMouse),r.addEventListener("focusin",this.handleCalloutFocusin),r.addEventListener("focusout",this.handleCalloutFocusout),r.addEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!0}async adjustAddon(){await this.card.updateComplete;let r=this.card.addon;if(!r)return;let i=this.mainPrice,a=this.card.planType;if(i&&(await i.onceSettled(),a=i.value?.[0]?.planType),!a)return;r.planType=a,this.card.querySelector("merch-addon[plan-type]")?.updateComplete.then(()=>{this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="addon"]'),"addon")})}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let i=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),i.setAttribute("data-template","legal"),r.parentNode.insertBefore(i,r.nextSibling),await i.onceSettled()}catch{}}adjustShortDescription(){let r=this.card.querySelector('[slot="body-xxs"]'),i=r?.textContent?.trim();if(!i)return;let n=this.card.querySelector('[slot="heading-m-price"] [data-template="legal"]')?.querySelector(".price-plan-type");if(!n)return;let o=document.createElement("em");o.setAttribute("slot","body-xxs"),o.textContent=` ${i}`,n.appendChild(o),r.remove()}renderLayout(){return this.isNewVariant?Ce`
+ `:Ce`
${r}
`});this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(ue,this.updatePriceQuantity),this.visibilityObserver=new IntersectionObserver(([r])=>{r.boundingClientRect.height!==0&&r.isIntersecting&&(C.isMobile||requestAnimationFrame(()=>{let a=this.getContainer();if(!a)return;a.querySelectorAll('merch-card[variant="mini-compare-chart"]').forEach(n=>n.variantLayout?.syncHeights?.())}),this.visibilityObserver.disconnect())}),this.visibilityObserver.observe(this.card)}disconnectedCallbackHook(){if(this.card.removeEventListener(ue,this.updatePriceQuantity),this.visibilityObserver?.disconnect(),this.calloutListenersAdded){document.removeEventListener("touchstart",this.handleCalloutTouch),document.removeEventListener("mouseover",this.handleCalloutMouse);let r=this.card.querySelector('[slot="callout-content"] .icon-button');r?.removeEventListener("focusin",this.handleCalloutFocusin),r?.removeEventListener("focusout",this.handleCalloutFocusout),r?.removeEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!1}}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,a){if(this.isNewVariant){if(r.dataset.template===ne){a.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(a.displayPerUnit=!1)}}getGlobalCSS(){return mi}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2)return;this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(".top-section"),"top-section");let r=["heading-m","subtitle","body-m","heading-m-price","body-xxs","price-commitment","quantity-select","offers","promo-text","callout-content","addon"];this.card.classList.contains("bullet-list")&&r.push("footer-rows"),r.forEach(i=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${i}"]`),i)),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer"),this.card.shadowRoot.querySelector(".mini-compare-chart-badge")?.textContent!==""&&this.getContainer().style.setProperty("--consonant-merch-card-mini-compare-chart-top-section-mobile-height","32px")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r;if(this.isNewVariant){let a=this.card.querySelector("merch-whats-included");if(!a)return;r=[...a.querySelectorAll('[slot="content"] merch-mnemonic-list')]}else{let a=this.card.querySelector('[slot="footer-rows"] ul');if(!a||!a.children)return;r=[...a.children]}r.length&&r.forEach((a,i)=>{let n=Math.max(ys,parseFloat(window.getComputedStyle(a).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(i+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(i+1),`${n}px`)})}removeEmptyRows(){this.isNewVariant?this.card.querySelectorAll("merch-whats-included merch-mnemonic-list").forEach(a=>{let i=a.querySelector('[slot="description"]');i&&!i.textContent.trim()&&a.remove()}):this.card.querySelectorAll(".footer-row-cell").forEach(a=>{let i=a.querySelector(".footer-row-cell-description");i&&!i.textContent.trim()&&a.remove()})}padFooterRows(){let r=this.getContainer();if(!r)return;let a=r.querySelectorAll('merch-card[variant="mini-compare-chart"]');if(this.isNewVariant){let i=0;if(a.forEach(l=>{let d=l.querySelector("merch-whats-included");if(!d)return;let p=d.querySelectorAll('[slot="content"] merch-mnemonic-list:not([data-placeholder])');i=Math.max(i,p.length)}),i===0)return;let n=this.card.querySelector("merch-whats-included");if(!n)return;let o=n.querySelector('[slot="content"]');if(!o)return;o.querySelectorAll("merch-mnemonic-list[data-placeholder]").forEach(l=>l.remove());let s=o.querySelectorAll("merch-mnemonic-list").length,c=i-s;for(let l=0;l{let l=c.querySelector('[slot="footer-rows"] ul');if(!l)return;let d=l.querySelectorAll("li.footer-row-cell:not([data-placeholder])");i=Math.max(i,d.length)}),i===0)return;let n=this.card.querySelector('[slot="footer-rows"] ul');if(!n)return;n.querySelectorAll("li.footer-row-cell[data-placeholder]").forEach(c=>c.remove());let o=n.querySelectorAll("li.footer-row-cell").length,s=i-o;for(let c=0;cs.remove()),r.checked){if(o){let s=fe("p",{class:"addon-heading-m-price-addon",slot:"heading-m-price"},o.innerHTML);this.card.appendChild(s)}}else{let s=fe("p",{class:"card-heading",id:"free",slot:"heading-m-price"},"Free");this.card.appendChild(s)}}}showTooltip(r){r.classList.remove("hide-tooltip"),r.setAttribute("aria-expanded","true")}hideTooltip(r){r.classList.add("hide-tooltip"),r.setAttribute("aria-expanded","false")}adjustCallout(){let r=this.card.querySelector('[slot="callout-content"] .icon-button');if(!r||this.calloutListenersAdded)return;let a=r.title||r.dataset.tooltip;if(!a)return;r.title&&(r.dataset.tooltip=r.title,r.removeAttribute("title"));let i=r.parentElement;if(i&&i.tagName==="P"){let n=document.createElement("div"),o=document.createElement("div");o.className="callout-row";let s=document.createElement("div");for(s.className="callout-text";i.firstChild&&i.firstChild!==r;)s.appendChild(i.firstChild);o.appendChild(s),o.appendChild(r),n.appendChild(o),i.replaceWith(n)}r.setAttribute("role","button"),r.setAttribute("tabindex","0"),r.setAttribute("aria-label",a),r.setAttribute("aria-expanded","false"),this.hideTooltip(r),this.handleCalloutTouch=n=>{n.target!==r?this.hideTooltip(r):r.classList.contains("hide-tooltip")?this.showTooltip(r):this.hideTooltip(r)},this.handleCalloutMouse=n=>{n.target!==r?this.hideTooltip(r):this.showTooltip(r)},this.handleCalloutFocusin=()=>{this.showTooltip(r)},this.handleCalloutFocusout=()=>{this.hideTooltip(r)},this.handleCalloutKeydown=n=>{n.key==="Escape"&&(this.hideTooltip(r),r.blur())},document.addEventListener("touchstart",this.handleCalloutTouch),document.addEventListener("mouseover",this.handleCalloutMouse),r.addEventListener("focusin",this.handleCalloutFocusin),r.addEventListener("focusout",this.handleCalloutFocusout),r.addEventListener("keydown",this.handleCalloutKeydown),this.calloutListenersAdded=!0}async adjustAddon(){await this.card.updateComplete;let r=this.card.addon;if(!r)return;let a=this.mainPrice,i=this.card.planType;if(a&&(await a.onceSettled(),i=a.value?.[0]?.planType),!i)return;r.planType=i,this.card.querySelector("merch-addon[plan-type]")?.updateComplete.then(()=>{this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="addon"]'),"addon")})}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let a=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),a.setAttribute("data-template","legal"),r.parentNode.insertBefore(a,r.nextSibling),await a.onceSettled()}catch{}}adjustShortDescription(){let r=this.card.querySelector('[slot="body-xxs"]'),a=r?.textContent?.trim();if(!a)return;let n=this.card.querySelector('[slot="heading-m-price"] [data-template="legal"]')?.querySelector(".price-plan-type");if(!n)return;let o=document.createElement("em");o.setAttribute("slot","body-xxs"),o.textContent=` ${a}`,n.appendChild(o),r.remove()}renderLayout(){return this.isNewVariant?Ce`
${this.badge}
@@ -1186,7 +1192,7 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { ${this.getMiniCompareFooter()} - `}syncHeights(){this.card.getBoundingClientRect().width<=2||(this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}async postCardUpdateHook(){if(await Promise.all(this.card.prices.map(r=>r.onceSettled())),this.isNewVariant&&(this.legalAdjusted||await this.adjustLegal(),this.adjustShortDescription(),this.adjustCallout()),await this.adjustAddon(),C.isMobile)this.removeEmptyRows();else{this.padFooterRows();let r=this.getContainer();if(!r)return;let i=r.style.getPropertyValue("--consonant-merch-card-footer-row-1-min-height");requestAnimationFrame(i?()=>{this.syncHeights()}:()=>{r.querySelectorAll('merch-card[variant="mini-compare-chart"]').forEach(n=>n.variantLayout?.syncHeights?.())})}}};f(Ke,"variantStyle",bs` + `}syncHeights(){this.card.getBoundingClientRect().width<=2||(this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}async postCardUpdateHook(){if(await Promise.all(this.card.prices.map(r=>r.onceSettled())),this.isNewVariant&&(this.legalAdjusted||await this.adjustLegal(),this.adjustShortDescription(),this.adjustCallout()),await this.adjustAddon(),C.isMobile)this.removeEmptyRows();else{this.padFooterRows();let r=this.getContainer();if(!r)return;let a=r.style.getPropertyValue("--consonant-merch-card-footer-row-1-min-height");requestAnimationFrame(a?()=>{this.syncHeights()}:()=>{r.querySelectorAll('merch-card[variant="mini-compare-chart"]').forEach(n=>n.variantLayout?.syncHeights?.())})}}};f(Ke,"variantStyle",bs` :host([variant='mini-compare-chart']) { max-width: var( --consonant-merch-card-mini-compare-chart-wide-width, @@ -1277,7 +1283,7 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { color: #505050; } - @media screen and ${ua(X)} { + @media screen and ${ui(X)} { [class*'-merch-cards'] :host([variant='mini-compare-chart']) footer { @@ -1287,7 +1293,7 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { } } - @media screen and ${ua(T)} { + @media screen and ${ui(T)} { :host([variant='mini-compare-chart']) footer { padding: var(--consonant-merch-spacing-xs) var(--consonant-merch-spacing-s) @@ -1365,28 +1371,46 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { } /* Border color styles */ + :host( + [variant='mini-compare-chart'][border-color='color-yellow-300-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-yellow-300-plans'] ) { - --consonant-merch-card-border-color: #ffd947; + --consonant-merch-card-border-color: var( + --color-yellow-300-variation + ); } + :host( + [variant='mini-compare-chart'][border-color='color-gray-300-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-gray-300-plans'] ) { - --consonant-merch-card-border-color: #dadada; + --consonant-merch-card-border-color: var( + --color-gray-300-variation + ); } + :host( + [variant='mini-compare-chart'][border-color='color-green-900-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-green-900-plans'] ) { - --consonant-merch-card-border-color: #05834e; + --consonant-merch-card-border-color: var( + --color-green-900-variation + ); } + :host( + [variant='mini-compare-chart'][border-color='color-red-700-variation'] + ), :host( [variant='mini-compare-chart'][border-color='spectrum-red-700-plans'] ) { - --consonant-merch-card-border-color: #eb1000; + --consonant-merch-card-border-color: var(--color-red-700-variation); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } @@ -1401,46 +1425,63 @@ merch-card[variant="mini-compare-chart"] merch-mnemonic-list:nth-child(8) { } /* Badge color styles */ + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-red-700-plans) { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-yellow-300-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-yellow-300-plans), + :host([variant='mini-compare-chart']) #badge.color-yellow-300-variation, :host([variant='mini-compare-chart']) #badge.spectrum-yellow-300-plans { - background-color: #ffd947; + background-color: var(--color-yellow-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-gray-300-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-gray-300-plans), + :host([variant='mini-compare-chart']) #badge.color-gray-300-variation, :host([variant='mini-compare-chart']) #badge.spectrum-gray-300-plans { - background-color: #dadada; + background-color: var(--color-gray-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-gray-700-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-gray-700-plans), + :host([variant='mini-compare-chart']) #badge.color-gray-700-variation, :host([variant='mini-compare-chart']) #badge.spectrum-gray-700-plans { - background-color: #4b4b4b; + background-color: var(--color-gray-700-variation); color: #ffffff; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-green-900-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-green-900-plans), + :host([variant='mini-compare-chart']) #badge.color-green-900-variation, :host([variant='mini-compare-chart']) #badge.spectrum-green-900-plans { - background-color: #05834e; + background-color: var(--color-green-900-variation); color: #ffffff; } + :host([variant='mini-compare-chart']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart']) ::slotted([slot='badge'].spectrum-red-700-plans), + :host([variant='mini-compare-chart']) #badge.color-red-700-variation, :host([variant='mini-compare-chart']) #badge.spectrum-red-700-plans { - background-color: #eb1000; + background-color: var(--color-red-700-variation); color: #ffffff; } - `);import{html as Xt,css as ws,unsafeCSS as va,nothing as Es}from"./lit-all.min.js";var fa=` + `);import{html as Xt,css as ws,unsafeCSS as vi,nothing as Es}from"./lit-all.min.js";var fi=` :root { --list-checked-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='20' height='20'%3E%3Cpath fill='%23222222' d='M15.656,3.8625l-.7275-.5665a.5.5,0,0,0-.7.0875L7.411,12.1415,4.0875,8.8355a.5.5,0,0,0-.707,0L2.718,9.5a.5.5,0,0,0,0,.707l4.463,4.45a.5.5,0,0,0,.75-.0465L15.7435,4.564A.5.5,0,0,0,15.656,3.8625Z'%3E%3C/path%3E%3C/svg%3E"); --merch-card-collection-card-width: var(--consonant-merch-card-mini-compare-chart-mweb-width); @@ -2158,7 +2199,7 @@ merch-card .footer-row-cell:nth-child(7) { merch-card .footer-row-cell:nth-child(8) { min-height: var(--consonant-merch-card-footer-row-8-min-height); } -`;var As=32,xa={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans","gradient-purple-blue"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],ctas:{slot:"footer",size:"l"},style:"consonant"},Ze=class extends L{constructor(r){super(r);f(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);f(this,"getMiniCompareFooter",()=>Xt`
+`;var As=32,xi={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m-price"},promoText:{tag:"div",slot:"promo-text"},shortDescription:{tag:"div",slot:"body-m"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","spectrum-red-700-plans"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue","spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","spectrum-red-700-plans"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],ctas:{slot:"footer",size:"l"},style:"consonant"},Ze=class extends L{constructor(r){super(r);f(this,"getRowMinHeightPropertyName",r=>`--consonant-merch-card-footer-row-${r}-min-height`);f(this,"getMiniCompareFooter",()=>Xt`
${this.secureLabel}`);f(this,"getMiniCompareFooterRows",()=>Xt` `);this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(ue,this.updatePriceQuantity)}disconnectedCallbackHook(){this.card.removeEventListener(ue,this.updatePriceQuantity),this._syncObserver?.disconnect(),this._syncObserver=null}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,i){if(r.dataset.template===ne){i.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(i.displayPerUnit=!1)}getGlobalCSS(){return fa}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2){this._syncObserver||(this._syncObserver=new ResizeObserver(()=>{this.card.getBoundingClientRect().width>2&&(this._syncObserver?.disconnect(),this._syncObserver=null,this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}),this._syncObserver.observe(this.card));return}["heading-xs","subtitle","heading-m-price","promo-text","body-m","body-xs","footer-rows"].forEach(i=>{let n=this.card.querySelector(`[slot="${i}"]`)??this.card.shadowRoot.querySelector(`slot[name="${i}"]`);this.updateCardElementMinHeight(n,i)}),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="promo-text"]'),"promo-text"),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r=this.card.querySelector('[slot="footer-rows"] ul');!r||!r.children||[...r.children].forEach((i,a)=>{let n=Math.max(As,parseFloat(window.getComputedStyle(i).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(a+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(a+1),`${n}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(i=>{let a=i.querySelector(".footer-row-cell-description");a&&!a.textContent.trim()&&i.remove()})}setupToggle(){if(this.toggleSetupDone)return;let r=this.card.querySelector('[slot="body-xs"]');if(!r)return;let i=r.querySelector("p"),a=r.querySelector("ul");if(!i||!a||r.querySelector(".footer-rows-title"))return;this.toggleSetupDone=!0;let n=i.textContent.trim(),o=this.card.querySelector("h3")?.id,s=o?`${o}-list`:`mweb-list-${Date.now()}`;a.setAttribute("id",s),a.classList.add("checkmark-copy-container");let c=fe("div",{class:"footer-rows-title"},n);if(C.isMobile){let l=fe("button",{class:"toggle-icon","aria-label":n,"aria-expanded":"false","aria-controls":s});c.appendChild(l),c.addEventListener("click",()=>{let d=a.classList.toggle("open");l.classList.toggle("expanded",d),l.setAttribute("aria-expanded",String(d))})}else a.classList.add("open");i.replaceWith(c)}get mainPrice(){return this.card.querySelector(`[slot="heading-m-price"] ${q}[data-template="price"]`)}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let i=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),i.setAttribute("data-template","legal"),r.parentNode.insertBefore(i,r.nextSibling),await i.onceSettled()}catch{}}get icons(){return!this.card.querySelector('[slot="icons"]')&&!this.card.getAttribute("id")?Es:Xt``}renderLayout(){return Xt` +
`);this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}connectedCallbackHook(){this.card.addEventListener(ue,this.updatePriceQuantity)}disconnectedCallbackHook(){this.card.removeEventListener(ue,this.updatePriceQuantity),this._syncObserver?.disconnect(),this._syncObserver=null}updatePriceQuantity({detail:r}){!this.mainPrice||!r?.option||(this.mainPrice.dataset.quantity=r.option)}priceOptionsProvider(r,a){if(r.dataset.template===ne){a.displayPlanType=this.card?.settings?.displayPlanType??!1;return}(r.dataset.template==="strikethrough"||r.dataset.template==="price")&&(a.displayPerUnit=!1)}getGlobalCSS(){return fi}adjustMiniCompareBodySlots(){if(this.card.getBoundingClientRect().width<=2){this._syncObserver||(this._syncObserver=new ResizeObserver(()=>{this.card.getBoundingClientRect().width>2&&(this._syncObserver?.disconnect(),this._syncObserver=null,this.adjustMiniCompareBodySlots(),this.adjustMiniCompareFooterRows())}),this._syncObserver.observe(this.card));return}["heading-xs","subtitle","heading-m-price","promo-text","body-m","body-xs","footer-rows"].forEach(a=>{let n=this.card.querySelector(`[slot="${a}"]`)??this.card.shadowRoot.querySelector(`slot[name="${a}"]`);this.updateCardElementMinHeight(n,a)}),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector('slot[name="promo-text"]'),"promo-text"),this.updateCardElementMinHeight(this.card.shadowRoot.querySelector("footer"),"footer")}adjustMiniCompareFooterRows(){if(this.card.getBoundingClientRect().width===0)return;let r=this.card.querySelector('[slot="footer-rows"] ul');!r||!r.children||[...r.children].forEach((a,i)=>{let n=Math.max(As,parseFloat(window.getComputedStyle(a).height)||0),o=parseFloat(this.getContainer().style.getPropertyValue(this.getRowMinHeightPropertyName(i+1)))||0;n>o&&this.getContainer().style.setProperty(this.getRowMinHeightPropertyName(i+1),`${n}px`)})}removeEmptyRows(){this.card.querySelectorAll(".footer-row-cell").forEach(a=>{let i=a.querySelector(".footer-row-cell-description");i&&!i.textContent.trim()&&a.remove()})}setupToggle(){if(this.toggleSetupDone)return;let r=this.card.querySelector('[slot="body-xs"]');if(!r)return;let a=r.querySelector("p"),i=r.querySelector("ul");if(!a||!i||r.querySelector(".footer-rows-title"))return;this.toggleSetupDone=!0;let n=a.textContent.trim(),o=this.card.querySelector("h3")?.id,s=o?`${o}-list`:`mweb-list-${Date.now()}`;i.setAttribute("id",s),i.classList.add("checkmark-copy-container");let c=fe("div",{class:"footer-rows-title"},n);if(C.isMobile){let l=fe("button",{class:"toggle-icon","aria-label":n,"aria-expanded":"false","aria-controls":s});c.appendChild(l),c.addEventListener("click",()=>{let d=i.classList.toggle("open");l.classList.toggle("expanded",d),l.setAttribute("aria-expanded",String(d))})}else i.classList.add("open");a.replaceWith(c)}get mainPrice(){return this.card.querySelector(`[slot="heading-m-price"] ${q}[data-template="price"]`)}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let r=this.mainPrice;if(!r)return;let a=r.cloneNode(!0);if(await r.onceSettled(),!r?.options)return;r.options.displayPerUnit&&(r.dataset.displayPerUnit="false"),r.options.displayTax&&(r.dataset.displayTax="false"),r.options.displayPlanType&&(r.dataset.displayPlanType="false"),a.setAttribute("data-template","legal"),r.parentNode.insertBefore(a,r.nextSibling),await a.onceSettled()}catch{}}get icons(){return!this.card.querySelector('[slot="icons"]')&&!this.card.getAttribute("id")?Es:Xt``}renderLayout(){return Xt` ${this.badge}
${this.icons} @@ -2183,7 +2224,7 @@ merch-card .footer-row-cell:nth-child(8) { ${this.getMiniCompareFooter()}
${this.getMiniCompareFooterRows()} - `}async postCardUpdateHook(){if(await Promise.all(this.card.prices.map(r=>r.onceSettled())),this.legalAdjusted||await this.adjustLegal(),this.setupToggle(),C.isMobile)this.removeEmptyRows();else{this.adjustMiniCompareFooterRows();let r=this.getContainer();if(!r)return;requestAnimationFrame(()=>{r.querySelectorAll('merch-card[variant="mini-compare-chart-mweb"]').forEach(a=>{a.variantLayout?.adjustMiniCompareBodySlots?.(),a.variantLayout?.adjustMiniCompareFooterRows?.()})})}}};f(Ze,"variantStyle",ws` + `}async postCardUpdateHook(){if(await Promise.all(this.card.prices.map(r=>r.onceSettled())),this.legalAdjusted||await this.adjustLegal(),this.setupToggle(),C.isMobile)this.removeEmptyRows();else{this.adjustMiniCompareFooterRows();let r=this.getContainer();if(!r)return;requestAnimationFrame(()=>{r.querySelectorAll('merch-card[variant="mini-compare-chart-mweb"]').forEach(i=>{i.variantLayout?.adjustMiniCompareBodySlots?.(),i.variantLayout?.adjustMiniCompareFooterRows?.()})})}}};f(Ze,"variantStyle",ws` :host([variant='mini-compare-chart-mweb']) .body > slot { display: block; } @@ -2228,7 +2269,7 @@ merch-card .footer-row-cell:nth-child(8) { padding-inline-start: var(--consonant-merch-spacing-xs); } - @media screen and ${va(X)} { + @media screen and ${vi(X)} { [class*'-merch-cards'] :host([variant='mini-compare-chart-mweb']) footer { @@ -2238,7 +2279,7 @@ merch-card .footer-row-cell:nth-child(8) { } } - @media screen and ${va(T)} { + @media screen and ${vi(T)} { :host([variant='mini-compare-chart-mweb']) footer { padding: 0; } @@ -2360,28 +2401,46 @@ merch-card .footer-row-cell:nth-child(8) { } /* Border color styles */ + :host( + [variant='mini-compare-chart-mweb'][border-color='color-yellow-300-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-yellow-300-plans'] ) { - --consonant-merch-card-border-color: #ffd947; + --consonant-merch-card-border-color: var( + --color-yellow-300-variation + ); } + :host( + [variant='mini-compare-chart-mweb'][border-color='color-gray-300-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-gray-300-plans'] ) { - --consonant-merch-card-border-color: #dadada; + --consonant-merch-card-border-color: var( + --color-gray-300-variation + ); } + :host( + [variant='mini-compare-chart-mweb'][border-color='color-green-900-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-green-900-plans'] ) { - --consonant-merch-card-border-color: #05834e; + --consonant-merch-card-border-color: var( + --color-green-900-variation + ); } + :host( + [variant='mini-compare-chart-mweb'][border-color='color-red-700-variation'] + ), :host( [variant='mini-compare-chart-mweb'][border-color='spectrum-red-700-plans'] ) { - --consonant-merch-card-border-color: #eb1000; + --consonant-merch-card-border-color: var(--color-red-700-variation); filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } @@ -2396,48 +2455,70 @@ merch-card .footer-row-cell:nth-child(8) { } /* Badge color styles */ + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-red-700-plans) { filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16)); } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-yellow-300-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-yellow-300-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-yellow-300-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-yellow-300-plans { - background-color: #ffd947; + background-color: var(--color-yellow-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-gray-300-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-gray-300-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-gray-300-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-gray-300-plans { - background-color: #dadada; + background-color: var(--color-gray-300-variation); color: #2c2c2c; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-gray-700-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-gray-700-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-gray-700-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-gray-700-plans { - background-color: #4b4b4b; + background-color: var(--color-gray-700-variation); color: #ffffff; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-green-900-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-green-900-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-green-900-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-green-900-plans { - background-color: #05834e; + background-color: var(--color-green-900-variation); color: #ffffff; } + :host([variant='mini-compare-chart-mweb']) + ::slotted([slot='badge'].color-red-700-variation), :host([variant='mini-compare-chart-mweb']) ::slotted([slot='badge'].spectrum-red-700-plans), + :host([variant='mini-compare-chart-mweb']) + #badge.color-red-700-variation, :host([variant='mini-compare-chart-mweb']) #badge.spectrum-red-700-plans { - background-color: #eb1000; + background-color: var(--color-red-700-variation); color: #ffffff; } @@ -2456,7 +2537,7 @@ merch-card .footer-row-cell:nth-child(8) { gap: var(--consonant-merch-spacing-xxs); margin: unset; } - `);import{html as St,css as Ss,nothing as Kt}from"./lit-all.min.js";var ba=` + `);import{html as St,css as Ss,nothing as Kt}from"./lit-all.min.js";var bi=` :root { --consonant-merch-card-plans-width: 302px; --consonant-merch-card-plans-students-width: 302px; @@ -2922,7 +3003,7 @@ merch-card-collection:has([slot="subtitle"]) merch-card { --merch-sidenav-collection-gap: 54px; } } -`;var Zt={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"subtitle"},prices:{tag:"p",slot:"heading-m"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},callout:{tag:"div",slot:"callout-content"},quantitySelect:{tag:"div",slot:"quantity-select"},addon:!0,secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-plans"},allowedBadgeColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-gray-700-plans","spectrum-green-900-plans","gradient-purple-blue"],allowedBorderColors:["spectrum-yellow-300-plans","spectrum-gray-300-plans","spectrum-green-900-plans","gradient-purple-blue"],borderColor:{attribute:"border-color"},size:["wide","super-wide"],whatsIncluded:{tag:"div",slot:"whats-included"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},ya={...function(){let{whatsIncluded:e,size:t,...r}=Zt;return r}(),title:{tag:"h3",slot:"heading-s"},secureLabel:!1},wa={...function(){let{subtitle:e,whatsIncluded:t,size:r,quantitySelect:i,...a}=Zt;return a}()},te=class extends L{constructor(t){super(t),this.adaptForMedia=this.adaptForMedia.bind(this)}priceOptionsProvider(t,r){t.dataset.template===ne&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1)}getGlobalCSS(){return ba}adjustSlotPlacement(t,r,i){let a=this.card.shadowRoot,n=a.querySelector("footer"),o=this.card.getAttribute("size");if(!o)return;let s=a.querySelector(`footer slot[name="${t}"]`),c=a.querySelector(`.body slot[name="${t}"]`),l=a.querySelector(".body");if(o.includes("wide")||(n?.classList.remove("wide-footer"),s&&s.remove()),!!r.includes(o)){if(n?.classList.toggle("wide-footer",C.isDesktopOrUp),!i&&s){if(c)s.remove();else{let d=l.querySelector(`[data-placeholder-for="${t}"]`);d?d.replaceWith(s):l.appendChild(s)}return}if(i&&c){let d=document.createElement("div");if(d.setAttribute("data-placeholder-for",t),d.classList.add("slot-placeholder"),!s){let p=c.cloneNode(!0);n.prepend(p)}c.replaceWith(d)}}}adaptForMedia(){if(!this.card.closest("merch-card-collection,overlay-trigger,.two-merch-cards,.three-merch-cards,.four-merch-cards, .columns")){this.card.removeAttribute("size");return}this.adjustSlotPlacement("addon",["super-wide"],C.isDesktopOrUp),this.adjustSlotPlacement("callout-content",["super-wide"],C.isDesktopOrUp)}adjustCallout(){let t=this.card.querySelector('[slot="callout-content"] .icon-button');t&&t.title&&(t.dataset.tooltip=t.title,t.removeAttribute("title"),t.classList.add("hide-tooltip"),document.addEventListener("touchstart",r=>{r.preventDefault(),r.target!==t?t.classList.add("hide-tooltip"):r.target.classList.toggle("hide-tooltip")}),document.addEventListener("mouseover",r=>{r.preventDefault(),r.target!==t?t.classList.add("hide-tooltip"):r.target.classList.remove("hide-tooltip")}))}async adjustEduLists(){if(this.card.variant!=="plans-education"||this.card.querySelector(".spacer"))return;let r=this.card.querySelector('[slot="body-xs"]');if(!r)return;let i=r.querySelector("ul");if(!i)return;let a=i.previousElementSibling,n=document.createElement("div");n.classList.add("spacer"),r.insertBefore(n,a);let o=new IntersectionObserver(([s])=>{if(s.boundingClientRect.height===0)return;let c=0,l=this.card.querySelector('[slot="heading-s"]');l&&(c+=wt(l));let d=this.card.querySelector('[slot="subtitle"]');d&&(c+=wt(d));let p=this.card.querySelector('[slot="heading-m"]');p&&(c+=8+wt(p));for(let h of r.childNodes){if(h.classList.contains("spacer"))break;c+=wt(h)}let u=this.card.parentElement.style.getPropertyValue("--merch-card-plans-edu-list-max-offset");c>(parseFloat(u)||0)&&this.card.parentElement.style.setProperty("--merch-card-plans-edu-list-max-offset",`${c}px`),this.card.style.setProperty("--merch-card-plans-edu-list-offset",`${c}px`),o.disconnect()});o.observe(this.card)}async postCardUpdateHook(){this.adaptForMedia(),this.adjustAddon(),this.adjustCallout(),this.legalAdjusted||(await this.adjustLegal(),await this.adjustEduLists())}get headingM(){return this.card.querySelector('[slot="heading-m"]')}get mainPrice(){return this.headingM?.querySelector(`${q}[data-template="price"]`)}get divider(){return this.card.variant==="plans-education"?St`
`:Kt}async adjustLegal(){if(!this.legalAdjusted)try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=[],r=this.card.querySelector(`[slot="heading-m"] ${q}[data-template="price"]`);r&&t.push(r);let i=t.map(async a=>{let n=a.cloneNode(!0);await a.onceSettled(),a?.options&&(a.options.displayPerUnit&&(a.dataset.displayPerUnit="false"),a.options.displayTax&&(a.dataset.displayTax="false"),a.options.displayPlanType&&(a.dataset.displayPlanType="false"),n.setAttribute("data-template","legal"),a.parentNode.insertBefore(n,a.nextSibling),await n.onceSettled())});await Promise.all(i)}catch{}}async adjustAddon(){await this.card.updateComplete;let t=this.card.addon;if(!t)return;t.setAttribute("custom-checkbox","");let r=this.mainPrice;if(!r)return;await r.onceSettled();let i=r.value?.[0]?.planType;i&&(t.planType=i)}get stockCheckbox(){return this.card.checkboxLabel?St`
t.sidenav?be``:Qt,headerVisibility:{search:!1,sort:!1,result:["mobile","tablet"],custom:["desktop"]},onSidenavAttached:t=>{let r=()=>{let i=t.querySelectorAll("merch-card");if(i.forEach(n=>{n.hasAttribute("data-size")&&(n.setAttribute("size",n.getAttribute("data-size")),n.removeAttribute("data-size"))}),!C.isDesktop)return;let a=0;i.forEach(n=>{if(n.style.display==="none")return;let o=n.getAttribute("size"),s=o==="wide"?2:o==="super-wide"?3:1;s===2&&a%3===2&&(n.setAttribute("data-size",o),n.removeAttribute("size"),s=1),a+=s})};C.matchDesktop.addEventListener("change",r),t.addEventListener(de,r),t.onUnmount.push(()=>{C.matchDesktop.removeEventListener("change",r),t.removeEventListener(de,r)})}});import{html as ei,css as Cs}from"./lit-all.min.js";var Ta=` + `),f(_e,"collectionOptions",{customHeaderArea:t=>t.sidenav?be``:Qt,headerVisibility:{search:!1,sort:!1,result:["mobile","tablet"],custom:["desktop"]},onSidenavAttached:t=>{let r=()=>{let a=t.querySelectorAll("merch-card");if(a.forEach(n=>{n.hasAttribute("data-size")&&(n.setAttribute("size",n.getAttribute("data-size")),n.removeAttribute("data-size"))}),!C.isDesktop)return;let i=0;a.forEach(n=>{if(n.style.display==="none")return;let o=n.getAttribute("size"),s=o==="wide"?2:o==="super-wide"?3:1;s===2&&i%3===2&&(n.setAttribute("data-size",o),n.removeAttribute("size"),s=1),i+=s})};C.matchDesktop.addEventListener("change",r),t.addEventListener(de,r),t.onUnmount.push(()=>{C.matchDesktop.removeEventListener("change",r),t.removeEventListener(de,r)})}});import{html as ea,css as Cs}from"./lit-all.min.js";var Ti=` :root { --consonant-merch-card-product-width: 300px; } @@ -4439,14 +4520,14 @@ merch-card[variant="product"] { } } -`;var Ca={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},callout:{tag:"div",slot:"callout-content"},quantitySelect:{tag:"div",slot:"quantity-select"},secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","gradient-purple-blue"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","gradient-purple-blue"],borderColor:{attribute:"border-color"},whatsIncluded:{tag:"div",slot:"whats-included"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Qe=class extends L{constructor(t){super(t),this.postCardUpdateHook=this.postCardUpdateHook.bind(this),this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}getGlobalCSS(){return Ta}priceOptionsProvider(t,r){t.dataset.template===ne&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1,(t.dataset.template==="strikethrough"||t.dataset.template==="price")&&(r.displayPerUnit=!1))}adjustProductBodySlots(){if(this.card.getBoundingClientRect().width===0)return;["heading-xs","body-xxs","body-xs","promo-text","callout-content","addon","body-lower"].forEach(r=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${r}"]`),r))}renderLayout(){return ei` ${this.badge} +`;var Ci={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},mnemonics:{size:"l"},callout:{tag:"div",slot:"callout-content"},quantitySelect:{tag:"div",slot:"quantity-select"},secureLabel:!0,planType:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-yellow-300-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","gradient-purple-blue"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","gradient-purple-blue"],borderColor:{attribute:"border-color"},whatsIncluded:{tag:"div",slot:"whats-included"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Qe=class extends L{constructor(t){super(t),this.postCardUpdateHook=this.postCardUpdateHook.bind(this),this.updatePriceQuantity=this.updatePriceQuantity.bind(this)}getGlobalCSS(){return Ti}priceOptionsProvider(t,r){t.dataset.template===ne&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1,(t.dataset.template==="strikethrough"||t.dataset.template==="price")&&(r.displayPerUnit=!1))}adjustProductBodySlots(){if(this.card.getBoundingClientRect().width===0)return;["heading-xs","body-xxs","body-xs","promo-text","callout-content","addon","body-lower"].forEach(r=>this.updateCardElementMinHeight(this.card.shadowRoot.querySelector(`slot[name="${r}"]`),r))}renderLayout(){return ea` ${this.badge}
- ${this.promoBottom?"":ei``} + ${this.promoBottom?"":ea``} - ${this.promoBottom?ei``:""} + ${this.promoBottom?ea``:""} @@ -4455,7 +4536,7 @@ merch-card[variant="product"] {

- ${this.secureLabelFooter}`}connectedCallbackHook(){window.addEventListener("resize",this.postCardUpdateHook),this.card.addEventListener(ue,this.updatePriceQuantity)}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook),this.card.removeEventListener(ue,this.updatePriceQuantity)}async postCardUpdateHook(){this.card.isConnected&&(this.adjustAddon(),C.isMobile||this.adjustProductBodySlots(),this.legalAdjusted||await this.adjustLegal())}async adjustLegal(){if(!(this.legalAdjusted||!this.card.id))try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=this.mainPrice;if(!t)return;let r=t.cloneNode(!0);if(await t.onceSettled(),!t?.options)return;t.options.displayPerUnit&&(t.dataset.displayPerUnit="false"),t.options.displayTax&&(t.dataset.displayTax="false"),t.options.displayPlanType&&(t.dataset.displayPlanType="false"),r.setAttribute("data-template","legal"),t.parentNode.insertBefore(r,t.nextSibling),await r.onceSettled()}catch{}}get headingXSSlot(){return this.card.shadowRoot.querySelector('slot[name="heading-xs"]').assignedElements()[0]}get mainPrice(){return this.card.querySelector(`[slot="heading-xs"] ${q}[data-template="price"]`)}updatePriceQuantity({detail:t}){!this.mainPrice||!t?.option||(this.mainPrice.dataset.quantity=t.option)}toggleAddon(t){let r=this.mainPrice,i=this.headingXSSlot;if(!r&&i){let a=t?.getAttribute("plan-type"),n=null;if(t&&a&&(n=t.querySelector(`p[data-plan-type="${a}"]`)?.querySelector('span[is="inline-price"]')),this.card.querySelectorAll('p[slot="heading-xs"]').forEach(o=>o.remove()),t.checked){if(n){let o=fe("p",{class:"addon-heading-xs-price-addon",slot:"heading-xs"},n.innerHTML);this.card.appendChild(o)}}else{let o=fe("p",{class:"card-heading",id:"free",slot:"heading-xs"},"Free");this.card.appendChild(o)}}}async adjustAddon(){await this.card.updateComplete;let t=this.card.addon;if(!t)return;let r=this.mainPrice,i=this.card.planType;r&&(await r.onceSettled(),i=r.value?.[0]?.planType),i&&(t.planType=i)}};f(Qe,"variantStyle",Cs` + ${this.secureLabelFooter}`}connectedCallbackHook(){window.addEventListener("resize",this.postCardUpdateHook),this.card.addEventListener(ue,this.updatePriceQuantity)}disconnectedCallbackHook(){window.removeEventListener("resize",this.postCardUpdateHook),this.card.removeEventListener(ue,this.updatePriceQuantity)}async postCardUpdateHook(){this.card.isConnected&&(this.adjustAddon(),C.isMobile||this.adjustProductBodySlots(),this.legalAdjusted||await this.adjustLegal())}async adjustLegal(){if(!(this.legalAdjusted||!this.card.id))try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=this.mainPrice;if(!t)return;let r=t.cloneNode(!0);if(await t.onceSettled(),!t?.options)return;t.options.displayPerUnit&&(t.dataset.displayPerUnit="false"),t.options.displayTax&&(t.dataset.displayTax="false"),t.options.displayPlanType&&(t.dataset.displayPlanType="false"),r.setAttribute("data-template","legal"),t.parentNode.insertBefore(r,t.nextSibling),await r.onceSettled()}catch{}}get headingXSSlot(){return this.card.shadowRoot.querySelector('slot[name="heading-xs"]').assignedElements()[0]}get mainPrice(){return this.card.querySelector(`[slot="heading-xs"] ${q}[data-template="price"]`)}updatePriceQuantity({detail:t}){!this.mainPrice||!t?.option||(this.mainPrice.dataset.quantity=t.option)}toggleAddon(t){let r=this.mainPrice,a=this.headingXSSlot;if(!r&&a){let i=t?.getAttribute("plan-type"),n=null;if(t&&i&&(n=t.querySelector(`p[data-plan-type="${i}"]`)?.querySelector('span[is="inline-price"]')),this.card.querySelectorAll('p[slot="heading-xs"]').forEach(o=>o.remove()),t.checked){if(n){let o=fe("p",{class:"addon-heading-xs-price-addon",slot:"heading-xs"},n.innerHTML);this.card.appendChild(o)}}else{let o=fe("p",{class:"card-heading",id:"free",slot:"heading-xs"},"Free");this.card.appendChild(o)}}}async adjustAddon(){await this.card.updateComplete;let t=this.card.addon;if(!t)return;let r=this.mainPrice,a=this.card.planType;r&&(await r.onceSettled(),a=r.value?.[0]?.planType),a&&(t.planType=a)}};f(Qe,"variantStyle",Cs` :host([variant='product']) { background: linear-gradient(white, white) padding-box, @@ -4504,7 +4585,7 @@ merch-card[variant="product"] { color: rgb(80, 80, 80); line-height: var(--consonant-merch-card-detail-xs-line-height); } - `);import{html as ti,css as _s}from"./lit-all.min.js";var _a=` + `);import{html as ta,css as _s}from"./lit-all.min.js";var _i=` :root { --consonant-merch-card-segment-width: 378px; } @@ -4608,15 +4689,15 @@ merch-card-collection.segment merch-card { width: auto; height: 100%; } -`;var Pa={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},callout:{tag:"div",slot:"callout-content"},planType:!0,secureLabel:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-red-700-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],borderColor:{attribute:"border-color"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Je=class extends L{constructor(t){super(t)}priceOptionsProvider(t,r){t.dataset.template===ne&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1,(t.dataset.template==="strikethrough"||t.dataset.template==="price")&&(r.displayPerUnit=!1))}getGlobalCSS(){return _a}get badgeElement(){return this.card.querySelector('[slot="badge"]')}get mainPrice(){return this.card.querySelector(`[slot="heading-xs"] ${q}[data-template="price"]`)}async postCardUpdateHook(){this.legalAdjusted||await this.adjustLegal()}async adjustLegal(){if(!(this.legalAdjusted||!this.card.id))try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=this.mainPrice;if(!t)return;let r=t.cloneNode(!0);if(await t.onceSettled(),!t?.options)return;t.options.displayPerUnit&&(t.dataset.displayPerUnit="false"),t.options.displayTax&&(t.dataset.displayTax="false"),t.options.displayPlanType&&(t.dataset.displayPlanType="false"),r.setAttribute("data-template","legal"),t.parentNode.insertBefore(r,t.nextSibling),await r.onceSettled()}catch{}}renderLayout(){return ti` +`;var Pi={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs"},promoText:{tag:"p",slot:"promo-text"},description:{tag:"div",slot:"body-xs"},callout:{tag:"div",slot:"callout-content"},planType:!0,secureLabel:!0,badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"color-red-700-variation"},allowedBadgeColors:["color-yellow-300-variation","color-gray-300-variation","color-gray-700-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],allowedBorderColors:["color-yellow-300-variation","color-gray-300-variation","color-green-900-variation","color-red-700-variation","gradient-purple-blue"],borderColor:{attribute:"border-color"},ctas:{slot:"footer",size:"m"},style:"consonant",perUnitLabel:{tag:"span",slot:"per-unit-label"}},Je=class extends L{constructor(t){super(t)}priceOptionsProvider(t,r){t.dataset.template===ne&&(r.displayPlanType=this.card?.settings?.displayPlanType??!1,(t.dataset.template==="strikethrough"||t.dataset.template==="price")&&(r.displayPerUnit=!1))}getGlobalCSS(){return _i}get badgeElement(){return this.card.querySelector('[slot="badge"]')}get mainPrice(){return this.card.querySelector(`[slot="heading-xs"] ${q}[data-template="price"]`)}async postCardUpdateHook(){this.legalAdjusted||await this.adjustLegal()}async adjustLegal(){if(!(this.legalAdjusted||!this.card.id))try{this.legalAdjusted=!0,await this.card.updateComplete,await customElements.whenDefined("inline-price");let t=this.mainPrice;if(!t)return;let r=t.cloneNode(!0);if(await t.onceSettled(),!t?.options)return;t.options.displayPerUnit&&(t.dataset.displayPerUnit="false"),t.options.displayTax&&(t.dataset.displayTax="false"),t.options.displayPlanType&&(t.dataset.displayPlanType="false"),r.setAttribute("data-template","legal"),t.parentNode.insertBefore(r,t.nextSibling),await r.onceSettled()}catch{}}renderLayout(){return ta` ${this.badge}
- ${this.promoBottom?"":ti``} - ${this.promoBottom?ti``:""}
@@ -4633,7 +4714,7 @@ merch-card-collection.segment merch-card { :host([variant='segment']) ::slotted(h3[slot='heading-xs']) { max-width: var(--consonant-merch-card-heading-xs-max-width, 100%); } - `);import{html as Ps,css as Ls}from"./lit-all.min.js";var La=` + `);import{html as Ps,css as Ls}from"./lit-all.min.js";var Li=` merch-card[variant='media'] { border: 0; @@ -4746,7 +4827,7 @@ merch-card-collection.segment merch-card { width: 700px; } -`;var ka={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"m"},backgroundImage:{tag:"div",slot:"bg-image"},style:"consonant"},et=class extends L{constructor(t){super(t)}getGlobalCSS(){return La}removeFocusFromModalClose(){let t=this.card.closest(".dialog-modal");t&&t.querySelector(".dialog-close")?.blur()}async postCardUpdateHook(){this.removeFocusFromModalClose()}renderLayout(){return Ps` +`;var ki={cardName:{attribute:"name"},title:{tag:"h3",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"m"},backgroundImage:{tag:"div",slot:"bg-image"},style:"consonant"},et=class extends L{constructor(t){super(t)}getGlobalCSS(){return Li}removeFocusFromModalClose(){let t=this.card.closest(".dialog-modal");t&&t.querySelector(".dialog-close")?.blur()}async postCardUpdateHook(){this.removeFocusFromModalClose()}renderLayout(){return Ps`
@@ -4787,7 +4868,7 @@ merch-card-collection.segment merch-card { gap: 40px; } } - `);import{html as ri,css as ks}from"./lit-all.min.js";var Ma=` + `);import{html as ra,css as ks}from"./lit-all.min.js";var Mi=` :root { --consonant-merch-card-special-offers-width: 302px; --merch-card-collection-card-width: var(--consonant-merch-card-special-offers-width); @@ -4843,7 +4924,7 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="pric grid-template-columns: repeat(4, minmax(302px, var(--consonant-merch-card-special-offers-width))); } } -`;var Ra={cardName:{attribute:"name"},backgroundImage:{tag:"div",slot:"bg-image"},subtitle:{tag:"p",slot:"detail-m"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs-price"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"l"},badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-special-offers"},allowedBadgeColors:["spectrum-yellow-300-special-offers","spectrum-gray-300-special-offers","spectrum-green-900-special-offers"],allowedBorderColors:["spectrum-yellow-300-special-offers","spectrum-gray-300-special-offers","spectrum-green-900-special-offers"],borderColor:{attribute:"border-color"}},tt=class extends L{constructor(t){super(t)}get headingSelector(){return'[slot="detail-m"]'}getGlobalCSS(){return Ma}renderLayout(){return ri`${this.cardImage} +`;var Ri={cardName:{attribute:"name"},backgroundImage:{tag:"div",slot:"bg-image"},subtitle:{tag:"p",slot:"detail-m"},title:{tag:"h3",slot:"heading-xs"},prices:{tag:"p",slot:"heading-xs-price"},description:{tag:"div",slot:"body-xs"},ctas:{slot:"footer",size:"l"},badgeIcon:!0,badge:{tag:"div",slot:"badge",default:"spectrum-yellow-300-special-offers"},allowedBadgeColors:["spectrum-yellow-300-special-offers","spectrum-gray-300-special-offers","spectrum-green-900-special-offers"],allowedBorderColors:["spectrum-yellow-300-special-offers","spectrum-gray-300-special-offers","spectrum-green-900-special-offers"],borderColor:{attribute:"border-color"}},tt=class extends L{constructor(t){super(t)}get headingSelector(){return'[slot="detail-m"]'}getGlobalCSS(){return Mi}renderLayout(){return ra`${this.cardImage}
@@ -4851,14 +4932,14 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="pric
- ${this.evergreen?ri` + ${this.evergreen?ra`
- `:ri` + `:ra`
${this.secureLabelFooter} `} @@ -4896,7 +4977,7 @@ merch-card[variant="special-offers"] span[is="inline-price"][data-template="pric ) { border-color: var(--spectrum-green-900-special-offers); } - `);import{html as Ms,css as Rs}from"./lit-all.min.js";var Na=` + `);import{html as Ms,css as Rs}from"./lit-all.min.js";var Ni=` :root { --merch-card-simplified-pricing-express-width: 311px; } @@ -5339,7 +5420,7 @@ merch-card[variant="simplified-pricing-express"] [slot="cta"] a.spectrum-Button. font-size: var(--merch-card-simplified-pricing-express-body-xs-font-size, 14px); } } -`;var ii={title:{tag:"h3",slot:"heading-xs",maxCount:250,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"spectrum-blue-400"},allowedBadgeColors:["spectrum-blue-400","spectrum-gray-300","spectrum-yellow-300","gradient-purple-blue","gradient-firefly-spectrum"],description:{tag:"div",slot:"body-xs",maxCount:2e3,withSuffix:!1},prices:{tag:"div",slot:"price"},callout:{tag:"div",slot:"callout-content",editorLabel:"Price description"},ctas:{slot:"cta",size:"XL"},borderColor:{attribute:"border-color",specialValues:{gray:"var(--spectrum-gray-300)",blue:"var(--spectrum-blue-400)","gradient-purple-blue":"linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%)","gradient-firefly-spectrum":"linear-gradient(96deg, #D73220 0%, #D92361 33%, #7155FA 100%)"}},disabledAttributes:["badgeColor","badgeBorderColor","trialBadgeColor","trialBadgeBorderColor"],supportsDefaultChild:!0},rt=class extends L{getGlobalCSS(){return Na}get aemFragmentMapping(){return ii}get headingSelector(){return'[slot="heading-xs"]'}get badge(){return this.card.querySelector('[slot="badge"]')}syncHeights(){if(this.card.getBoundingClientRect().width===0)return;let t=this.card.shadowRoot;if(!t)return;["header","price-container","cta"].forEach(a=>this.updateCardElementMinHeight(t.querySelector(`.${a}`),a));let r=this.card.querySelector('[slot="body-xs"]');r&&this.updateCardElementMinHeight(r,"description");let i=this.card.querySelector('[slot="body-xs"] p:has(mas-mnemonic)');i&&this.updateCardElementMinHeight(i,"icons")}async postCardUpdateHook(){if(!this.card.isConnected)return;await this.card.updateComplete,this.card.prices?.length&&await Promise.all(this.card.prices.map(a=>a.onceSettled?.()));let t=this.getContainer();if(!t)return;let r=t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`),i=34;r.forEach(a=>{a.classList.remove("small-font-size-button"),a.querySelectorAll('[slot="cta"] sp-button, [slot="cta"] button, [slot="cta"] a.con-button, [slot="cta"] a.spectrum-Button, a[slot="cta"]').forEach(o=>{let s=o.textContent.trim().length>i;o.classList.toggle("small-font-size-button",s)})}),C.isDesktopOrUp&&r.forEach(a=>a.variantLayout?.syncHeights?.())}connectedCallbackHook(){!this.card||this.card.failed||(this.setupAccordion(),this.card?.hasAttribute("data-default-card")&&!Gt()&&this.card.setAttribute("data-expanded","true"),this.observeVisibility())}resyncSiblings(){let t=this.getContainer();t&&t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(r=>r.variantLayout?.syncHeights?.())}observeVisibility(){typeof ResizeObserver>"u"||(this.lastSyncedWidth=0,this.sizeObserver=new ResizeObserver(()=>{let t=this.card.getBoundingClientRect().width;t<=2||t===this.lastSyncedWidth||(this.lastSyncedWidth=t,this.resyncSiblings())}),this.sizeObserver.observe(this.card))}setupAccordion(){let t=this.card;if(!t)return;let r=()=>{if(Gt())t.removeAttribute("data-expanded");else{let a=t.hasAttribute("data-default-card");t.setAttribute("data-expanded",a?"true":"false")}};r();let i=window.matchMedia(O);this.mediaQueryListener=()=>{r()},i.addEventListener("change",this.mediaQueryListener)}disconnectedCallbackHook(){this.mediaQueryListener&&window.matchMedia(O).removeEventListener("change",this.mediaQueryListener),this.sizeObserver?.disconnect(),this.sizeObserver=null}handleChevronClick(t){t.preventDefault(),t.stopPropagation(),this.toggleExpanded()}handleCardClick(t){t.target.closest('.chevron-button, mas-mnemonic, button, a, [role="button"]')||(t.preventDefault(),this.toggleExpanded())}toggleExpanded(){let t=this.card;if(!t||Gt())return;let a=t.getAttribute("data-expanded")==="true"?"false":"true";t.setAttribute("data-expanded",a)}renderLayout(){return Ms` +`;var aa={title:{tag:"h3",slot:"heading-xs",maxCount:250,withSuffix:!0},badge:{tag:"div",slot:"badge",default:"spectrum-blue-400"},allowedBadgeColors:["spectrum-blue-400","spectrum-gray-300","spectrum-yellow-300","gradient-purple-blue","gradient-firefly-spectrum"],description:{tag:"div",slot:"body-xs",maxCount:2e3,withSuffix:!1},prices:{tag:"div",slot:"price"},callout:{tag:"div",slot:"callout-content",editorLabel:"Price description"},ctas:{slot:"cta",size:"XL"},borderColor:{attribute:"border-color",specialValues:{gray:"var(--spectrum-gray-300)",blue:"var(--spectrum-blue-400)","gradient-purple-blue":"linear-gradient(96deg, #B539C8 0%, #7155FA 66%, #3B63FB 100%)","gradient-firefly-spectrum":"linear-gradient(96deg, #D73220 0%, #D92361 33%, #7155FA 100%)"}},disabledAttributes:["badgeColor","badgeBorderColor","trialBadgeColor","trialBadgeBorderColor"],supportsDefaultChild:!0},rt=class extends L{getGlobalCSS(){return Ni}get aemFragmentMapping(){return aa}get headingSelector(){return'[slot="heading-xs"]'}get badge(){return this.card.querySelector('[slot="badge"]')}syncHeights(){if(this.card.getBoundingClientRect().width===0)return;let t=this.card.shadowRoot;if(!t)return;["header","price-container","cta"].forEach(i=>this.updateCardElementMinHeight(t.querySelector(`.${i}`),i));let r=this.card.querySelector('[slot="body-xs"]');r&&this.updateCardElementMinHeight(r,"description");let a=this.card.querySelector('[slot="body-xs"] p:has(mas-mnemonic)');a&&this.updateCardElementMinHeight(a,"icons")}async postCardUpdateHook(){if(!this.card.isConnected)return;await this.card.updateComplete,this.card.prices?.length&&await Promise.all(this.card.prices.map(i=>i.onceSettled?.()));let t=this.getContainer();if(!t)return;let r=t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`),a=34;r.forEach(i=>{i.classList.remove("small-font-size-button"),i.querySelectorAll('[slot="cta"] sp-button, [slot="cta"] button, [slot="cta"] a.con-button, [slot="cta"] a.spectrum-Button, a[slot="cta"]').forEach(o=>{let s=o.textContent.trim().length>a;o.classList.toggle("small-font-size-button",s)})}),C.isDesktopOrUp&&r.forEach(i=>i.variantLayout?.syncHeights?.())}connectedCallbackHook(){!this.card||this.card.failed||(this.setupAccordion(),this.card?.hasAttribute("data-default-card")&&!Gt()&&this.card.setAttribute("data-expanded","true"),this.observeVisibility())}resyncSiblings(){let t=this.getContainer();t&&t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(r=>r.variantLayout?.syncHeights?.())}observeVisibility(){typeof ResizeObserver>"u"||(this.lastSyncedWidth=0,this.sizeObserver=new ResizeObserver(()=>{let t=this.card.getBoundingClientRect().width;t<=2||t===this.lastSyncedWidth||(this.lastSyncedWidth=t,this.resyncSiblings())}),this.sizeObserver.observe(this.card))}setupAccordion(){let t=this.card;if(!t)return;let r=()=>{if(Gt())t.removeAttribute("data-expanded");else{let i=t.hasAttribute("data-default-card");t.setAttribute("data-expanded",i?"true":"false")}};r();let a=window.matchMedia(O);this.mediaQueryListener=()=>{r()},a.addEventListener("change",this.mediaQueryListener)}disconnectedCallbackHook(){this.mediaQueryListener&&window.matchMedia(O).removeEventListener("change",this.mediaQueryListener),this.sizeObserver?.disconnect(),this.sizeObserver=null}handleChevronClick(t){t.preventDefault(),t.stopPropagation(),this.toggleExpanded()}handleCardClick(t){t.target.closest('.chevron-button, mas-mnemonic, button, a, [role="button"]')||(t.preventDefault(),this.toggleExpanded())}toggleExpanded(){let t=this.card;if(!t||Gt())return;let i=t.getAttribute("data-expanded")==="true"?"false":"true";t.setAttribute("data-expanded",i)}renderLayout(){return Ms`
- `}syncHeights(){if(this.card.getBoundingClientRect().width<=2)return;let t=this.card.shadowRoot;t&&["header","short-description","price-container","cta"].forEach(r=>this.updateCardElementMinHeight(t.querySelector(`.${r}`),r))}resyncSiblings(){let t=this.getContainer();t&&t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(r=>r.variantLayout?.syncHeights?.())}async postCardUpdateHook(){if(!this.card.isConnected)return;await this.card.updateComplete,this.card.prices?.length&&await Promise.all(this.card.prices.map(r=>r.onceSettled()));let t=this.getContainer();if(t){let r=t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`),i=49;r.forEach(a=>{a.classList.remove("small-font-size-button"),a.querySelectorAll('[slot="cta"] sp-button, [slot="cta"] button, [slot="cta"] a.con-button, [slot="cta"] a.spectrum-Button, a[slot="cta"]').forEach(o=>{let s=o.textContent.trim().length>i;o.classList.toggle("small-font-size-button",s)})})}window.matchMedia("(min-width: 768px)").matches&&this.resyncSiblings()}connectedCallbackHook(){!this.card||typeof ResizeObserver>"u"||(this.lastSyncedWidth=0,this.sizeObserver=new ResizeObserver(()=>{let t=this.card.getBoundingClientRect().width;t<=2||t===this.lastSyncedWidth||(this.lastSyncedWidth=t,this.resyncSiblings())}),this.sizeObserver.observe(this.card))}disconnectedCallbackHook(){this.sizeObserver?.disconnect(),this.sizeObserver=null}renderLayout(){return Ia` + `}syncHeights(){if(this.card.getBoundingClientRect().width<=2)return;let t=this.card.shadowRoot;t&&["header","short-description","price-container","cta"].forEach(r=>this.updateCardElementMinHeight(t.querySelector(`.${r}`),r))}resyncSiblings(){let t=this.getContainer();t&&t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`).forEach(r=>r.variantLayout?.syncHeights?.())}async postCardUpdateHook(){if(!this.card.isConnected)return;await this.card.updateComplete,this.card.prices?.length&&await Promise.all(this.card.prices.map(r=>r.onceSettled()));let t=this.getContainer();if(t){let r=t.querySelectorAll(`merch-card[variant="${this.card.variant}"]`),a=49;r.forEach(i=>{i.classList.remove("small-font-size-button"),i.querySelectorAll('[slot="cta"] sp-button, [slot="cta"] button, [slot="cta"] a.con-button, [slot="cta"] a.spectrum-Button, a[slot="cta"]').forEach(o=>{let s=o.textContent.trim().length>a;o.classList.toggle("small-font-size-button",s)})})}window.matchMedia("(min-width: 768px)").matches&&this.resyncSiblings()}connectedCallbackHook(){!this.card||typeof ResizeObserver>"u"||(this.lastSyncedWidth=0,this.sizeObserver=new ResizeObserver(()=>{let t=this.card.getBoundingClientRect().width;t<=2||t===this.lastSyncedWidth||(this.lastSyncedWidth=t,this.resyncSiblings())}),this.sizeObserver.observe(this.card))}disconnectedCallbackHook(){this.sizeObserver?.disconnect(),this.sizeObserver=null}renderLayout(){return Ii` ${this.badge}
@@ -6436,7 +6517,7 @@ merch-card[variant="full-pricing-express"] mas-mnemonic {
- `}};f(it,"variantStyle",Ns` + `}};f(at,"variantStyle",Ns` :host([variant='full-pricing-express']) { /* CSS Variables */ --merch-card-full-pricing-express-width: 437px; @@ -6760,16 +6841,16 @@ merch-card[variant="full-pricing-express"] mas-mnemonic { ); } } - `);import{html as ni,css as Os,nothing as Is}from"./lit-all.min.js";var Da=` + `);import{html as na,css as Os,nothing as Is}from"./lit-all.min.js";var Di=` /* Headless variant: minimal container for label/value rows */ .headless { display: flex; flex-direction: column; padding: var(--consonant-merch-spacing-xs, 8px); } -`;var Ha={cardName:{attribute:"name"},title:{tag:"p",slot:"heading-xs"},cardTitle:{tag:"p",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},description:{tag:"div",slot:"body-xs"},promoText:{tag:"p",slot:"promo-text"},shortDescription:{tag:"p",slot:"short-description"},callout:{tag:"div",slot:"callout-content"},quantitySelect:{tag:"div",slot:"quantity-select"},whatsIncluded:{tag:"div",slot:"whats-included"},addonConfirmation:{tag:"div",slot:"addon-confirmation"},badge:{tag:"div",slot:"badge"},trialBadge:{tag:"div",slot:"trial-badge"},prices:{tag:"p",slot:"prices"},backgroundImage:{tag:"div",slot:"bg-image"},ctas:{slot:"footer",size:"m"},addon:!0,secureLabel:!0,borderColor:{attribute:"border-color"},backgroundColor:{attribute:"background-color"},size:[],mnemonics:{size:"m"}},Ds=[{slot:"bg-image",label:"Background Image"},{slot:"badge",label:"Badge"},{slot:"icons",label:"Mnemonic icon"},{slot:"heading-xs",label:"Title"},{slot:"body-xxs",label:"Subtitle"},{slot:"body-xs",label:"Product description"},{slot:"promo-text",label:"Promo Text"},{slot:"callout-content",label:"Callout text"},{slot:"short-description",label:"Short Description"},{slot:"trial-badge",label:"Trial Badge"},{slot:"prices",label:"Product price"},{slot:"quantity-select",label:"Quantity select"},{slot:"addon",label:"Addon"},{slot:"whats-included",label:"What's included"},{slot:"addon-confirmation",label:"Addon confirmation"},{slot:"footer",label:"CTAs"}],at=class extends L{constructor(t){super(t)}getGlobalCSS(){return Da}renderLayout(){return ni` +`;var Hi={cardName:{attribute:"name"},title:{tag:"p",slot:"heading-xs"},cardTitle:{tag:"p",slot:"heading-xs"},subtitle:{tag:"p",slot:"body-xxs"},description:{tag:"div",slot:"body-xs"},promoText:{tag:"p",slot:"promo-text"},shortDescription:{tag:"p",slot:"short-description"},callout:{tag:"div",slot:"callout-content"},quantitySelect:{tag:"div",slot:"quantity-select"},whatsIncluded:{tag:"div",slot:"whats-included"},addonConfirmation:{tag:"div",slot:"addon-confirmation"},badge:{tag:"div",slot:"badge"},trialBadge:{tag:"div",slot:"trial-badge"},prices:{tag:"p",slot:"prices"},backgroundImage:{tag:"div",slot:"bg-image"},ctas:{slot:"footer",size:"m"},addon:!0,secureLabel:!0,borderColor:{attribute:"border-color"},backgroundColor:{attribute:"background-color"},size:[],mnemonics:{size:"m"}},Ds=[{slot:"bg-image",label:"Background Image"},{slot:"badge",label:"Badge"},{slot:"icons",label:"Mnemonic icon"},{slot:"heading-xs",label:"Title"},{slot:"body-xxs",label:"Subtitle"},{slot:"body-xs",label:"Product description"},{slot:"promo-text",label:"Promo Text"},{slot:"callout-content",label:"Callout text"},{slot:"short-description",label:"Short Description"},{slot:"trial-badge",label:"Trial Badge"},{slot:"prices",label:"Product price"},{slot:"quantity-select",label:"Quantity select"},{slot:"addon",label:"Addon"},{slot:"whats-included",label:"What's included"},{slot:"addon-confirmation",label:"Addon confirmation"},{slot:"footer",label:"CTAs"}],it=class extends L{constructor(t){super(t)}getGlobalCSS(){return Di}renderLayout(){return na`
- ${Ds.map(({slot:t,label:r})=>ni` + ${Ds.map(({slot:t,label:r})=>na`
${r} @@ -6777,7 +6858,7 @@ merch-card[variant="full-pricing-express"] mas-mnemonic {
`)} - ${this.card.secureLabel?ni` + ${this.card.secureLabel?na`
Secure label @@ -6786,7 +6867,7 @@ merch-card[variant="full-pricing-express"] mas-mnemonic {
`:Is}
- `}};f(at,"variantStyle",Os` + `}};f(it,"variantStyle",Os` :host([variant='headless']) { border: none; background: transparent; @@ -6813,7 +6894,7 @@ merch-card[variant="full-pricing-express"] mas-mnemonic { :host([variant='headless']) .headless-value::slotted(*) { display: inline; } - `);import{css as Hs,html as zs}from"./lit-all.min.js";var za=` + `);import{css as Hs,html as zs}from"./lit-all.min.js";var zi=` merch-card[variant="mini"] { color: var(--spectrum-body-color); width: 400px; @@ -6846,7 +6927,7 @@ merch-card[variant="mini"] span.promo-duration-text, merch-card[variant="mini"] span.renewal-text { display: block; } -`;var Ba={title:{tag:"p",slot:"title"},prices:{tag:"p",slot:"prices"},description:{tag:"p",slot:"description"},planType:!0,ctas:{slot:"ctas",size:"S"}},nt=class extends L{constructor(){super(...arguments);f(this,"legal")}async postCardUpdateHook(){await this.card.updateComplete,this.adjustLegal()}getGlobalCSS(){return za}get headingSelector(){return'[slot="title"]'}priceOptionsProvider(r,i){i.literals={...i.literals,strikethroughAriaLabel:"",alternativePriceAriaLabel:""},i.space=!0,i.displayAnnual=this.card.settings?.displayAnnual??!1}adjustLegal(){if(this.legal!==void 0)return;let r=this.card.querySelector(`${q}[data-template="price"]`);if(!r)return;let i=r.cloneNode(!0);this.legal=i,r.dataset.displayTax="false",r.dataset.displayPerUnit="false",i.dataset.template="legal",i.dataset.displayPlanType=this.card?.settings?.displayPlanType??!0,i.setAttribute("slot","legal"),this.card.appendChild(i)}renderLayout(){return zs` +`;var Bi={title:{tag:"p",slot:"title"},prices:{tag:"p",slot:"prices"},description:{tag:"p",slot:"description"},planType:!0,ctas:{slot:"ctas",size:"S"}},nt=class extends L{constructor(){super(...arguments);f(this,"legal")}async postCardUpdateHook(){await this.card.updateComplete,this.adjustLegal()}getGlobalCSS(){return zi}get headingSelector(){return'[slot="title"]'}priceOptionsProvider(r,a){a.literals={...a.literals,strikethroughAriaLabel:"",alternativePriceAriaLabel:""},a.space=!0,a.displayAnnual=this.card.settings?.displayAnnual??!1}adjustLegal(){if(this.legal!==void 0)return;let r=this.card.querySelector(`${q}[data-template="price"]`);if(!r)return;let a=r.cloneNode(!0);this.legal=a,r.dataset.displayTax="false",r.dataset.displayPerUnit="false",a.dataset.template="legal",a.dataset.displayPlanType=this.card?.settings?.displayPlanType??!0,a.setAttribute("slot","legal"),this.card.appendChild(a)}renderLayout(){return zs` ${this.badge}
@@ -6862,11 +6943,11 @@ merch-card[variant="mini"] span.renewal-text { background-color: var(--spectrum-background-base-color); border: 1px solid var(--consonant-merch-card-border-color, #dadada); } - `);var Fa=new Map;var V=(e,t,r=null,i=null,a)=>{Fa.set(e,{class:t,fragmentMapping:r,style:i,collectionOptions:a})};V("catalog",Xe,ca,Xe.variantStyle);V("image",Oe);V("inline-heading",Yt);V("mini-compare-chart",Ke,ga,Ke.variantStyle);V("mini-compare-chart-mweb",Ze,xa,Ze.variantStyle);V("plans",te,Zt,te.variantStyle,te.collectionOptions);V("plans-students",te,wa,te.variantStyle,te.collectionOptions);V("plans-education",te,ya,te.variantStyle,te.collectionOptions);V("plans-v2",_e,Sa,_e.variantStyle,_e.collectionOptions);V("product",Qe,Ca,Qe.variantStyle);V("segment",Je,Pa,Je.variantStyle);V("media",et,ka,et.variantStyle);V("headless",at,Ha,at.variantStyle);V("special-offers",tt,Ra,tt.variantStyle);V("simplified-pricing-express",rt,ii,rt.variantStyle);V("full-pricing-express",it,ai,it.variantStyle);V("mini",nt,Ba,nt.variantStyle);V("image",Oe,da,Oe.variantStyle);function Wt(e){return Fa.get(e)?.fragmentMapping}var Ua="tacocat.js";var oi=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),$a=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function H(e,t={},{metadata:r=!0,search:i=!0,storage:a=!0}={}){let n;if(i&&n==null){let o=new URLSearchParams(window.location.search),s=ot(i)?i:e;n=o.get(s)}if(a&&n==null){let o=ot(a)?a:e;n=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(r&&n==null){let o=Fs(ot(r)?r:e);n=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return n??t[e]}var Bs=e=>typeof e=="boolean",Jt=e=>typeof e=="function",er=e=>typeof e=="number",Ga=e=>e!=null&&typeof e=="object";var ot=e=>typeof e=="string",qa=e=>ot(e)&&e,Tt=e=>er(e)&&Number.isFinite(e)&&e>0;function tr(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,i])=>{t(i)&&delete e[r]}),e}function y(e,t){if(Bs(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Ct(e,t,r){let i=Object.values(t);return i.find(a=>oi(a,e))??r??i[0]}function Fs(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,i)=>`${r}-${i}`).replace(/\W+/gu,"-").toLowerCase()}function Va(e,t=1){return er(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Us=Date.now(),si=()=>`(+${Date.now()-Us}ms)`,rr=new Set,$s=y(H("tacocat.debug",{},{metadata:!1}),!1);function ja(e){let t=`[${Ua}/${e}]`,r=(o,s,...c)=>o?!0:(a(s,...c),!1),i=$s?(o,...s)=>{console.debug(`${t} ${o}`,...s,si())}:()=>{},a=(o,...s)=>{let c=`${t} ${o}`;rr.forEach(([l])=>l(c,...s))};return{assert:r,debug:i,error:a,warn:(o,...s)=>{let c=`${t} ${o}`;rr.forEach(([,l])=>l(c,...s))}}}function Gs(e,t){let r=[e,t];return rr.add(r),()=>{rr.delete(r)}}Gs((e,...t)=>{console.error(e,...t,si())},(e,...t)=>{console.warn(e,...t,si())});var qs="no promo",Wa="promo-tag",Vs="yellow",js="neutral",Ws=(e,t,r)=>{let i=n=>n||qs,a=r?` (was "${i(t)}")`:"";return`${i(e)}${a}`},Ys="cancel-context",ir=(e,t)=>{let r=e===Ys,i=!r&&e?.length>0,a=(i||r)&&(t&&t!=e||!t&&!r),n=a&&i||!a&&!!t,o=n?e||t:void 0;return{effectivePromoCode:o,overridenPromoCode:e,className:n?Wa:`${Wa} no-promo`,text:Ws(o,t,a),variant:n?Vs:js,isOverriden:a}};var ci;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(ci||(ci={}));var oe;(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"})(oe||(oe={}));var le;(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"})(le||(le={}));var li;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(li||(li={}));var di;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(di||(di={}));var hi;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(hi||(hi={}));var pi;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(pi||(pi={}));var mi="ABM",ui="PUF",gi="M2M",fi="PERPETUAL",vi="P3Y",Xs="TAX_INCLUSIVE_DETAILS",Ks="TAX_EXCLUSIVE",Ya={ABM:mi,PUF:ui,M2M:gi,PERPETUAL:fi,P3Y:vi},Op={[mi]:{commitment:oe.YEAR,term:le.MONTHLY},[ui]:{commitment:oe.YEAR,term:le.ANNUAL},[gi]:{commitment:oe.MONTH,term:le.MONTHLY},[fi]:{commitment:oe.PERPETUAL,term:void 0},[vi]:{commitment:oe.THREE_MONTHS,term:le.P3Y}},Xa="Value is not an offer",ar=e=>{if(typeof e!="object")return Xa;let{commitment:t,term:r}=e,i=Zs(t,r);return{...e,planType:i}};var Zs=(e,t)=>{switch(e){case void 0:return Xa;case"":return"";case oe.YEAR:return t===le.MONTHLY?mi:t===le.ANNUAL?ui:"";case oe.MONTH:return t===le.MONTHLY?gi:"";case oe.PERPETUAL:return fi;case oe.TERM_LICENSE:return t===le.P3Y?vi:"";default:return""}};function Ka(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:i,priceWithoutTax:a,priceWithoutDiscountAndTax:n,taxDisplay:o}=t;if(o!==Xs)return e;let s={...e,priceDetails:{...t,price:a??r,priceWithoutDiscount:n??i,taxDisplay:Ks}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Ie={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,severity:"e",tags:"acom",isProdDomain:!1},Za=1e3;function Qs(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Qa(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:i,originatingRequest:a,status:n}=e;return[i,n,a].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Ie.serializableTypes.includes(r))return r}return e}function Js(e,t){if(!Ie.ignoredProperties.includes(e))return Qa(t)}var xi={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,i=[],a=[],n=t;r.forEach(l=>{l!=null&&(Qs(l)?i:a).push(l)}),i.length&&(n+=" "+i.map(Qa).join(" "));let{pathname:o,search:s}=window.location,c=`${Ie.delimiter}page=${o}${s}`;c.length>Za&&(c=`${c.slice(0,Za)}`),n+=c,a.length&&(n+=`${Ie.delimiter}facts=`,n+=JSON.stringify(a,Js)),window.lana?.log(n,Ie)}};function nr(e){Object.assign(Ie,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ie&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Ja={LOCAL:"local",PROD:"prod",STAGE:"stage"},bi={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},yi=new Set,wi=new Set,en=new Map,tn={append({level:e,message:t,params:r,timestamp:i,source:a}){console[e](`${i}ms [${a}] %c${t}`,"font-weight: bold;",...r)}},rn={filter:({level:e})=>e!==bi.DEBUG},ec={filter:()=>!1};function tc(e,t,r,i,a){return{level:e,message:t,namespace:r,get params(){return i.length===1&&Jt(i[0])&&(i=i[0](),Array.isArray(i)||(i=[i])),i},source:a,timestamp:performance.now().toFixed(3)}}function rc(e){[...wi].every(t=>t(e))&&yi.forEach(t=>t(e))}function an(e){let t=(en.get(e)??0)+1;en.set(e,t);let r=`${e} #${t}`,i={id:r,namespace:e,module:a=>an(`${i.namespace}/${a}`),updateConfig:nr};return Object.values(bi).forEach(a=>{i[a]=(n,...o)=>rc(tc(a,n,e,o,r))}),Object.seal(i)}function or(...e){e.forEach(t=>{let{append:r,filter:i}=t;Jt(i)&&wi.add(i),Jt(r)&&yi.add(r)})}function ic(e={}){let{name:t}=e,r=y(H("commerce.debug",{search:!0,storage:!0}),t===Ja.LOCAL);return or(r?tn:rn),t===Ja.PROD&&or(xi),re}function ac(){yi.clear(),wi.clear()}var re={...an(Ur),Level:bi,Plugins:{consoleAppender:tn,debugFilter:rn,quietFilter:ec,lanaAppender:xi},init:ic,reset:ac,use:or};var nc="mas-commerce-service",oc=re.module("utilities"),sc={requestId:xt,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function _t(e,{country:t,forceTaxExclusive:r}){let i;if(e.length<2)i=e;else{let a=t==="GB"?"EN":"MULT";e.sort((n,o)=>n.language===a?-1:o.language===a?1:0),e.sort((n,o)=>!n.term&&o.term?-1:n.term&&!o.term?1:0),i=[e[0]]}return r&&(i=i.map(Ka)),i}var nn=(e,t)=>{let r=e.reduce((i,a)=>i+(t(a)||0),0);return r>0?Math.round(r*100)/100:void 0};function Ei(e){if(!e||e.length===0)return null;if(e.length===1)return e[0];let[t,...r]=e;for(let s of r){let c=[["commitment","commitment types"],["term","terms"],["priceDetails.formatString","currency formats"]];for(let[l,d]of c){let p=l.includes(".")?t.priceDetails?.formatString:t[l],u=l.includes(".")?s.priceDetails?.formatString:s[l];u!==p&&oc.warn(`Offers have different ${d}, summing may produce unexpected results`,{expected:p,actual:u})}}let i=[["price",s=>s.priceDetails?.price],["priceWithoutDiscount",s=>s.priceDetails?.priceWithoutDiscount],["priceWithoutTax",s=>s.priceDetails?.priceWithoutTax],["priceWithoutDiscountAndTax",s=>s.priceDetails?.priceWithoutDiscountAndTax]],a={};for(let[s,c]of i){let l=nn(e,c);l!==void 0&&(a[s]=l)}let n=e.some(s=>s.priceDetails?.annualized),o;if(n){let s=[["annualizedPrice",c=>c.priceDetails?.annualized?.annualizedPrice],["annualizedPriceWithoutTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutTax],["annualizedPriceWithoutDiscount",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscount],["annualizedPriceWithoutDiscountAndTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscountAndTax]];o={};for(let[c,l]of s){let d=nn(e,l);d!==void 0&&(o[c]=d)}}return{...t,offerSelectorIds:e.flatMap(s=>s.offerSelectorIds||[]),priceDetails:{...t.priceDetails,...a,...o&&{annualized:o}}}}var sr=e=>window.setTimeout(e);function st(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Va).filter(Tt);return r.length||(r=[t]),r}function cr(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(qa)}function ie(){return document.getElementsByTagName(nc)?.[0]}function on(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[i,a]of Object.entries(sc)){let n=r.get(a);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[i]=n)}return t}var ct=class e extends Error{constructor(t,r,i){if(super(t,{cause:i}),this.name="MasError",r.response){let a=r.response.headers?.get(xt);a&&(r.requestId=a),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([i,a])=>`${i}: ${JSON.stringify(a)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` -Caused by: ${this.cause}`),r}};var cc={[he]:Or,[Se]:Ir,[ve]:Dr},lc={[he]:Br,[ve]:Fr},Pt,Pe=class{constructor(t){G(this,Pt);f(this,"changes",new Map);f(this,"connected",!1);f(this,"error");f(this,"log");f(this,"options");f(this,"promises",[]);f(this,"state",Se);f(this,"timer",null);f(this,"value");f(this,"version",0);f(this,"wrapperElement");this.wrapperElement=t,this.log=re.module("mas-element")}update(){[he,Se,ve].forEach(t=>{this.wrapperElement.classList.toggle(cc[t],t===this.state)})}notify(){(this.state===ve||this.state===he)&&(this.state===ve?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===he&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof ct&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(lc[this.state],{bubbles:!0,composed:!0,detail:t}))}attributeChangedCallback(t,r,i){this.changes.set(t,i),this.requestUpdate()}connectedCallback(){W(this,Pt,ie()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:i}=this;return ve===i?Promise.resolve(this.wrapperElement):he===i?Promise.reject(t):new Promise((a,n)=>{r.push({resolve:a,reject:n})})}toggleResolved(t,r,i){return t!==this.version?!1:(i!==void 0&&(this.options=i),this.state=ve,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),sr(()=>this.notify()),!0)}toggleFailed(t,r,i){if(t!==this.version)return!1;i!==void 0&&(this.options=i),this.error=r,this.state=he,this.update();let a=this.wrapperElement.getAttribute("is");return this.log?.error(`${a}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...S(this,Pt)?.duration}),sr(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=Se,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!ie()||this.timer)return;let{error:r,options:i,state:a,value:n,version:o}=this;this.state=Se,this.timer=sr(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===Se&&this.version===o&&(this.state=a,this.error=r,this.value=n,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,i)}})}};Pt=new WeakMap;function sn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function lr(e,t={}){let{tag:r,is:i}=e,a=document.createElement(r,{is:i});return a.setAttribute("is",i),Object.assign(a.dataset,sn(t)),a}function cn(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,sn(t)),e):null}function dc(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var ze,De=class De extends HTMLAnchorElement{constructor(){super();f(this,"masElement",new Pe(this));G(this,ze);this.setAttribute("is",De.is)}get isUptLink(){return!0}initializeWcsData(r,i){this.setAttribute("data-wcs-osi",r),i&&this.setAttribute("data-promotion-code",i)}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),W(this,ze,yt()),S(this,ze)&&(this.log=S(this,ze).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),W(this,ze,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=yt();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let i=r.collectCheckoutOptions({},this);if(!i.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let a=this.masElement.togglePending(i),n=r.resolveOfferSelectors(i);try{let[[o]]=await Promise.all(n),{country:s,language:c,env:l}=i,d=`locale=${c}_${s}&country=${s}&offer_id=${o.offerId}`,p=this.getAttribute("data-promotion-code");p&&(d+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${dc(l)}?${d}`,this.masElement.toggleResolved(a,o,i)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${i.wcsOsi}.`,o.message);return this.masElement.toggleFailed(a,s,i),!1}}static createFrom(r){let i=new De;for(let a of r.attributes)a.name!=="is"&&(a.name==="class"&&a.value.includes("upt-link")?i.setAttribute("class",a.value.replace("upt-link","").trim()):i.setAttribute(a.name,a.value));return i.innerHTML=r.innerHTML,i.setAttribute("tabindex",0),i}};ze=new WeakMap,f(De,"is","upt-link"),f(De,"tag","a"),f(De,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var He=De;window.customElements.get(He.is)||window.customElements.define(He.is,He,{extends:He.tag});function ln(e){return e&&(e.startsWith("plans")?"plans":e)}var hc=/[0-9\-+#]/,pc=/[^\d\-+#]/g;function dn(e){return e.search(hc)}function mc(e="#.##"){let t={},r=e.length,i=dn(e);t.prefix=i>0?e.substring(0,i):"";let a=dn(e.split("").reverse().join("")),n=r-a,o=e.substring(n,n+1),s=n+(o==="."||o===","?1:0);t.suffix=a>0?e.substring(s,r):"",t.mask=e.substring(i,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(pc);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 uc(e,t,r){let i=!1,a={value:e};e<0&&(i=!0,a.value=-a.value),a.sign=i?"-":"",a.value=Number(a.value).toFixed(t.fraction&&t.fraction.length),a.value=Number(a.value).toString();let n=t.fraction&&t.fraction.lastIndexOf("0"),[o="0",s=""]=a.value.split(".");return(!s||s&&s.length<=n)&&(s=n<0?"":(+("0."+s)).toFixed(n+1).replace("0.","")),a.integer=o,a.fraction=s,gc(a,t),(a.result==="0"||a.result==="")&&(i=!1,a.sign=""),!i&&t.maskHasPositiveSign?a.sign="+":i&&t.maskHasPositiveSign?a.sign="-":i&&(a.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),a}function gc(e,t){e.result="";let r=t.integer.split(t.separator),i=r.join(""),a=i&&i.indexOf("0");if(a>-1)for(;e.integer.lengthe*12,Fe=(e,t,r=1)=>{if(!e)return!1;let{start:i,end:a,displaySummary:{amount:n,duration:o,minProductQuantity:s=1,outcomeType:c}={}}=e;if(!(n&&o&&c)||r=d&&l<=p},Be={MONTH:"MONTH",YEAR:"YEAR"},xc={[ce.ANNUAL]:12,[ce.MONTHLY]:1,[ce.THREE_YEARS]:36,[ce.TWO_YEARS]:24},Si=(e,t)=>({accept:e,round:t}),bc=[Si(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Si(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Si(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Ti={[Re.YEAR]:{[ce.MONTHLY]:Be.MONTH,[ce.ANNUAL]:Be.YEAR},[Re.MONTH]:{[ce.MONTHLY]:Be.MONTH}},yc=(e,t)=>e.indexOf(`'${t}'`)===0,wc=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),i=vn(r);return!!i?t||(r=r.replace(/[,\.]0+/,i)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Ac(e)),r},Ec=e=>{let t=Sc(e),r=yc(e,t),i=e.replace(/'.*?'/,""),a=un.test(i)||gn.test(i);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:a}},fn=e=>e.replace(un,mn).replace(gn,mn),Ac=e=>e.match(/#(.?)#/)?.[1]===pn?vc:pn,Sc=e=>e.match(/'(.*?)'/)?.[1]??"",vn=e=>e.match(/0(.?)0/)?.[1]??"";function lt({formatString:e,price:t,usePrecision:r,isIndianPrice:i=!1},a,n=o=>o){let{currencySymbol:o,isCurrencyFirst:s,hasCurrencySpace:c}=Ec(e),l=r?vn(e):"",d=wc(e,r),p=r?2:0,u=n(t,{currencySymbol:o}),h=i?u.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):hn(d,u),m=r?h.lastIndexOf(l):h.length,g=h.substring(0,m),v=h.substring(m+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,h).replace(/SYMBOL/,o),currencySymbol:o,decimals:v,decimalsDelimiter:l,hasCurrencySpace:c,integer:g,isCurrencyFirst:s,recurrenceTerm:a}}var xn=e=>{let{commitment:t,term:r,usePrecision:i}=e,a=xc[r]??1;return lt(e,a>1?Be.MONTH:Ti[t]?.[r],n=>{let o={divisor:a,price:n,usePrecision:i},{round:s}=bc.find(({accept:c})=>c(o));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(o)}`);return s(o)})},bn=({commitment:e,term:t,...r})=>lt(r,Ti[e]?.[t]),yn=e=>{let{commitment:t,instant:r,price:i,originalPrice:a,priceWithoutDiscount:n,promotion:o,quantity:s=1,term:c}=e;if(t===Re.YEAR&&c===ce.MONTHLY){if(!o)return lt(e,Be.YEAR,Ai);let{displaySummary:{outcomeType:l,duration:d}={}}=o;switch(l){case"PERCENTAGE_DISCOUNT":if(Fe(o,r,s)){let p=parseInt(d.replace("P","").replace("M",""));if(isNaN(p))return Ai(i);let u=a*p,h=n*(12-p),m=Math.round((u+h)*100)/100;return lt({...e,price:m},Be.YEAR)}default:return lt(e,Be.YEAR,()=>Ai(n??i))}}return lt(e,Ti[t]?.[c])};var wn="download",En="upgrade",An={e:"EDU",t:"TEAM"};function Sn(e,t={},r=""){let i=ie();if(!i)return null;let{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:h,extraOptions:m,analyticsId:g}=i.collectCheckoutOptions(t),v=lr(e,{checkoutMarketSegment:a,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:h,extraOptions:m,analyticsId:g});return r&&(v.innerHTML=`${r}`),v}function Tn(e){return class extends e{constructor(){super(...arguments);f(this,"checkoutActionHandler");f(this,"masElement",new Pe(this))}attributeChangedCallback(i,a,n){this.masElement.attributeChangedCallback(i,a,n)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get marketSegment(){let i=this.options?.ms??this.value?.[0].marketSegments?.[0];return An[i]??i}get customerSegment(){let i=this.options?.cs??this.value?.[0]?.customerSegment;return An[i]??i}get is3in1Modal(){return Object.values(Ne).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let i=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!i||i.content!=="off")}requestUpdate(i=!1){return this.masElement.requestUpdate(i)}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"]}async render(i={}){let a=ie();if(!a)return!1;this.dataset.imsCountry||a.imsCountryPromise.then(h=>{h&&(this.dataset.imsCountry=h)}),i.imsCountry=null;let n=a.collectCheckoutOptions(i,this);if(!n.wcsOsi.length)return!1;let o;try{o=JSON.parse(n.extraOptions??"{}")}catch(h){this.masElement.log?.error("cannot parse exta checkout options",h)}let s=this.masElement.togglePending(n);this.setCheckoutUrl("");let c=a.resolveOfferSelectors(n),l=await Promise.all(c);l=l.map(h=>_t(h,n));let d=l.flat().find(h=>h.promotion);!Fe(d?.promotion,d?.promotion?.displaySummary?.instant,n.quantity[0])&&n.promotionCode&&delete n.promotionCode,n.country=this.dataset.imsCountry||n.country;let u=await a.buildCheckoutAction?.(l.flat(),{...o,...n},this);return this.renderOffers(l.flat(),n,{},u,s)}renderOffers(i,a,n={},o=void 0,s=void 0){let c=ie();if(!c)return!1;if(a={...JSON.parse(this.dataset.extraOptions??"{}"),...a,...n},s??(s=this.masElement.togglePending(a)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),o){this.classList.remove(wn,En),this.masElement.toggleResolved(s,i,a);let{url:d,text:p,className:u,handler:h}=o;d&&this.setCheckoutUrl(d),p&&(this.firstElementChild.innerHTML=p),u&&this.classList.add(...u.split(" ")),h&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=h.bind(this))}if(i.length){if(this.masElement.toggleResolved(s,i,a)){if(!this.classList.contains(wn)&&!this.classList.contains(En)){let d=c.buildCheckoutURL(i,a);this.setCheckoutUrl(a.modal==="true"?"#":d)}return!0}}else{let d=new Error(`Not provided: ${a?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,d,a))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(i){}updateOptions(i={}){let a=ie();if(!a)return!1;let{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:h,wcsOsi:m}=a.collectCheckoutOptions(i);return cn(this,{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:h,wcsOsi:m}),!0}}}var Lt=class Lt extends Tn(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return Sn(Lt,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};f(Lt,"is","checkout-link"),f(Lt,"tag","a");var ye=Lt;window.customElements.get(ye.is)||window.customElements.define(ye.is,ye,{extends:ye.tag});var Tc="p_draft_landscape",Cc="/store/",_c=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),Ci=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),Pc=["env","workflowStep","clientId","country"],Cn=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype","mv","mv2"]),_n=e=>_c.get(e)??e;function dr(e,t,r){for(let[i,a]of Object.entries(e)){let n=_n(i);a!=null&&r.has(n)&&t.set(n,a)}}function Lc(e){switch(e){case Wr.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function kc(e,t){for(let r in e){let i=e[r];for(let[a,n]of Object.entries(i)){if(n==null)continue;let o=_n(a);t.set(`items[${r}][${o}]`,n)}}}function Mc({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let i=e.searchParams.get("af");return e.searchParams.set("af",[i,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===Ne.CRM?"creative":"mini_plans"),e}function Rc(e){let t=new URLSearchParams(window.location.search),r={};Cn.forEach(i=>{let a=t.get(i);a!==null&&(r[i]=a)}),Object.keys(r).length>0&&dr(r,e.searchParams,Cn)}function Pn(e){Nc(e);let{env:t,items:r,workflowStep:i,marketSegment:a,customerSegment:n,offerType:o,productArrangementCode:s,landscape:c,modal:l,is3in1:d,preselectPlan:p,...u}=e,h=new URL(Lc(t));if(h.pathname=`${Cc}${i}`,i!==ee.SEGMENTATION&&i!==ee.CHANGE_PLAN_TEAM_PLANS&&kc(r,h.searchParams),dr({...u},h.searchParams,Ci),Rc(h),c===Te.DRAFT&&dr({af:Tc},h.searchParams,Ci),i===ee.SEGMENTATION){let m={marketSegment:a,offerType:o,customerSegment:n,productArrangementCode:s,quantity:r?.[0]?.quantity,addonProductArrangementCode:s?r?.find(g=>g.productArrangementCode!==s)?.productArrangementCode:r?.[1]?.productArrangementCode};p?.toLowerCase()==="edu"?h.searchParams.set("ms","EDU"):p?.toLowerCase()==="team"&&h.searchParams.set("cs","TEAM"),dr(m,h.searchParams,Ci),h.searchParams.get("ot")==="PROMOTION"&&h.searchParams.delete("ot"),h=Mc({url:h,modal:l,is3in1:d})}return h.toString()}function Nc(e){for(let t of Pc)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);if(e.workflowStep!==ee.SEGMENTATION&&e.workflowStep!==ee.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}var k=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:ee.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:ge.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Te.PUBLISHED});function Ln({settings:e,providers:t}){function r(n,o){let{checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:h,env:m}=e,g={checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:h,env:m};if(o)for(let Ve of t.checkout)Ve(o,g);let{checkoutMarketSegment:v,checkoutWorkflowStep:b=c,imsCountry:E,country:x=E??l,language:A=d,quantity:N=u,entitlement:M,upgrade:z,modal:$,perpetual:Q,promotionCode:j=p,wcsOsi:F,extraOptions:R,...J}=Object.assign(g,o?.dataset??{},n??{}),se=Ct(b,ee,k.checkoutWorkflowStep);return g=tr({...J,extraOptions:R,checkoutClientId:s,checkoutMarketSegment:v,country:x,quantity:st(N,k.quantity),checkoutWorkflowStep:se,language:A,entitlement:y(M),upgrade:y(z),modal:$,perpetual:y(Q),promotionCode:ir(j).effectivePromoCode,wcsOsi:cr(F),preselectPlan:h}),g}function i(n,o){if(!Array.isArray(n)||!n.length||!o)return"";let{env:s,landscape:c}=e,{checkoutClientId:l,checkoutMarketSegment:d,checkoutWorkflowStep:p,country:u,promotionCode:h,quantity:m,preselectPlan:g,ms:v,cs:b,...E}=r(o),x=document.querySelector("meta[name=mas-ff-3in1]"),A=Object.values(Ne).includes(o.modal)&&(!x||x.content!=="off"),N=window.frameElement||A?"if":"fp",[{productArrangementCode:M,marketSegments:[z],customerSegment:$,offerType:Q}]=n,j=v??z??d,F=b??$;g?.toLowerCase()==="edu"?j="EDU":g?.toLowerCase()==="team"&&(F="TEAM");let R={is3in1:A,checkoutPromoCode:h,clientId:l,context:N,country:u,env:s,items:[],marketSegment:j,customerSegment:F,offerType:Q,productArrangementCode:M,workflowStep:p,landscape:c,...E},J=m[0]>1?m[0]:void 0;if(n.length===1){let{offerId:se}=n[0];R.items.push({id:se,quantity:J})}else R.items.push(...n.map(({offerId:se,productArrangementCode:Ve})=>({id:se,quantity:J,...A?{productArrangementCode:Ve}:{}})));return Pn(R)}let{createCheckoutLink:a}=ye;return{CheckoutLink:ye,CheckoutWorkflowStep:ee,buildCheckoutURL:i,collectCheckoutOptions:r,createCheckoutLink:a}}function Oc({interval:e=200,maxAttempts:t=25}={}){let r=re.module("ims");return new Promise(i=>{r.debug("Waing for IMS to be ready");let a=0;function n(){window.adobeIMS?.initialized?i():++a>t?(r.debug("Timeout"),i()):setTimeout(n,e)}n()})}function Ic(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function Dc(e){let t=re.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:i})=>(t.debug("Got user country:",i),i),i=>{t.error("Unable to get user country:",i)}):null)}function kn({}){let e=Oc(),t=Ic(e),r=Dc(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var Mn=window.masPriceLiterals;function Rn(e){if(Array.isArray(Mn)){let t=e.locale==="id_ID"?"in":e.language,r=a=>Mn.find(n=>oi(n.lang,a)),i=r(t)??r(k.language);if(i)return Object.freeze(i)}return{}}var _i=function(e,t){return _i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},_i(e,t)};function kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_i(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var _=function(){return _=Object.assign||function(t){for(var r,i=1,a=arguments.length;i0}),r=[],i=0,a=t;i1)throw new RangeError("integer-width stems only accept a single optional option");a.options[0].replace(Bc,function(c,l,d,p,u,h){if(l)t.minimumIntegerDigits=d.length;else{if(p&&u)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if($n.test(a.stem)){t.minimumIntegerDigits=a.stem.length;continue}if(Hn.test(a.stem)){if(a.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");a.stem.replace(Hn,function(c,l,d,p,u,h){return d==="*"?t.minimumFractionDigits=l.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:u&&h?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+h.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var n=a.options[0];n==="w"?t=_(_({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=_(_({},t),zn(n)));continue}if(Un.test(a.stem)){t=_(_({},t),zn(a.stem));continue}var o=Gn(a.stem);o&&(t=_(_({},t),o));var s=Fc(a.stem);s&&(t=_(_({},t),s))}return t}var Rt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Vn(e,t){for(var r="",i=0;i>1),c="a",l=Uc(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;o-- >0;)r=l+r}else a==="J"?r+="H":r+=a}return r}function Uc(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,i;r!=="root"&&(i=e.maximize().region);var a=Rt[i||""]||Rt[r||""]||Rt["".concat(r,"-001")]||Rt["001"];return a[0]}var ki,$c=new RegExp("^".concat(Li.source,"*")),Gc=new RegExp("".concat(Li.source,"*$"));function P(e,t){return{start:e,end:t}}var qc=!!String.prototype.startsWith,Vc=!!String.fromCodePoint,jc=!!Object.fromEntries,Wc=!!String.prototype.codePointAt,Yc=!!String.prototype.trimStart,Xc=!!String.prototype.trimEnd,Kc=!!Number.isSafeInteger,Zc=Kc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ri=!0;try{jn=Kn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ri=((ki=jn.exec("a"))===null||ki===void 0?void 0:ki[0])==="a"}catch{Ri=!1}var jn,Wn=qc?function(t,r,i){return t.startsWith(r,i)}:function(t,r,i){return t.slice(i,i+r.length)===r},Ni=Vc?String.fromCodePoint:function(){for(var t=[],r=0;rn;){if(o=t[n++],o>1114111)throw RangeError(o+" is not a valid code point");i+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return i},Yn=jc?Object.fromEntries:function(t){for(var r={},i=0,a=t;i=i)){var a=t.charCodeAt(r),n;return a<55296||a>56319||r+1===i||(n=t.charCodeAt(r+1))<56320||n>57343?a:(a-55296<<10)+(n-56320)+65536}},Qc=Yc?function(t){return t.trimStart()}:function(t){return t.replace($c,"")},Jc=Xc?function(t){return t.trimEnd()}:function(t){return t.replace(Gc,"")};function Kn(e,t){return new RegExp(e,t)}var Oi;Ri?(Mi=Kn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Oi=function(t,r){var i;Mi.lastIndex=r;var a=Mi.exec(t);return(i=a[1])!==null&&i!==void 0?i:""}):Oi=function(t,r){for(var i=[];;){var a=Xn(t,r);if(a===void 0||Qn(a)||rl(a))break;i.push(a),r+=a>=65536?2:1}return Ni.apply(void 0,i)};var Mi,Zn=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.locale=r.locale,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,i){for(var a=[];!this.isEOF();){var n=this.char();if(n===123){var o=this.parseArgument(t,i);if(o.err)return o;a.push(o.val)}else{if(n===125&&t>0)break;if(n===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),a.push({type:D.pound,location:P(s,this.clonePosition())})}else if(n===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(w.UNMATCHED_CLOSING_TAG,P(this.clonePosition(),this.clonePosition()))}else if(n===60&&!this.ignoreTag&&Ii(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;a.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;a.push(o.val)}}}return{val:a,err:null}},e.prototype.parseTag=function(t,r){var i=this.clonePosition();this.bump();var a=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:D.literal,value:"<".concat(a,"/>"),location:P(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var n=this.parseMessage(t+1,r,!0);if(n.err)return n;var o=n.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:D.tag,value:a,children:o,location:P(i,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,P(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,P(i,this.clonePosition()))}else return this.error(w.INVALID_TAG,P(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&tl(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var i=this.clonePosition(),a="";;){var n=this.tryParseQuote(r);if(n){a+=n;continue}var o=this.tryParseUnquoted(t,r);if(o){a+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){a+=s;continue}break}var c=P(i,this.clonePosition());return{val:{type:D.literal,value:a,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!el(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 i=this.char();if(i===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(i);this.bump()}return Ni.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(r==="plural"||r==="selectordinal")||i===125&&t>0?null:(this.bump(),Ni(i))},e.prototype.parseArgument=function(t,r){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,P(i,this.clonePosition()));var a=this.parseIdentifierIfPossible().value;if(!a)return this.error(w.MALFORMED_ARGUMENT,P(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:D.argument,value:a,location:P(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(i,this.clonePosition())):this.parseArgumentOptions(t,r,a,i);default:return this.error(w.MALFORMED_ARGUMENT,P(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),i=Oi(this.message,r),a=r+i.length;this.bumpTo(a);var n=this.clonePosition(),o=P(t,n);return{value:i,location:o}},e.prototype.parseArgumentOptions=function(t,r,i,a){var n,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,P(o,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var u=Jc(p.val);if(u.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,P(this.clonePosition(),this.clonePosition()));var h=P(d,this.clonePosition());l={style:u,styleLocation:h}}var m=this.tryParseArgumentClose(a);if(m.err)return m;var g=P(a,this.clonePosition());if(l&&Wn(l?.style,"::",0)){var v=Qc(l.style.slice(2));if(s==="number"){var p=this.parseNumberSkeletonFromString(v,l.styleLocation);return p.err?p:{val:{type:D.number,value:i,location:g,style:p.val},err:null}}else{if(v.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var b=v;this.locale&&(b=Vn(v,this.locale));var u={type:Ue.dateTime,pattern:b,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?In(b):{}},E=s==="date"?D.date:D.time;return{val:{type:E,value:i,location:g,style:u},err:null}}}return{val:{type:s==="number"?D.number:s==="date"?D.date:D.time,value:i,location:g,style:(n=l?.style)!==null&&n!==void 0?n:null},err:null}}case"plural":case"selectordinal":case"select":{var x=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,P(x,_({},x)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),N=0;if(s!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,P(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),A=this.parseIdentifierIfPossible(),N=p.val}var M=this.tryParsePluralOrSelectOptions(t,s,r,A);if(M.err)return M;var m=this.tryParseArgumentClose(a);if(m.err)return m;var z=P(a,this.clonePosition());return s==="select"?{val:{type:D.select,value:i,options:Yn(M.val),location:z},err:null}:{val:{type:D.plural,value:i,options:Yn(M.val),offset:N,pluralType:s==="plural"?"cardinal":"ordinal",location:z},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,P(o,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,P(a,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 i=[];try{i=Fn(t)}catch{return this.error(w.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ue.number,tokens:i,location:r,parsedOptions:this.shouldParseSkeletons?qn(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,i,a){for(var n,o=!1,s=[],c=new Set,l=a.value,d=a.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;d=P(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(o=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,P(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,r,i);if(m.err)return m;var g=this.tryParseArgumentClose(h);if(g.err)return g;s.push([l,{value:m.val,location:P(h,this.clonePosition())}]),c.add(l),this.bumpSpace(),n=this.parseIdentifierIfPossible(),l=n.value,d=n.location}return s.length===0?this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,P(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(w.MISSING_OTHER_CLAUSE,P(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var i=1,a=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var n=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)n=!0,o=o*10+(s-48),this.bump();else break}var c=P(a,this.clonePosition());return n?(o*=i,Zc(o)?{val:o,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=Xn(this.message,t);if(r===void 0)throw Error("Offset ".concat(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(Wn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),i=this.message.charCodeAt(r+(t>=65536?2:1));return i??null},e}();function Ii(e){return e>=97&&e<=122||e>=65&&e<=90}function el(e){return Ii(e)||e===47}function tl(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 Qn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function rl(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 Di(e){e.forEach(function(t){if(delete t.location,gr(t)||fr(t))for(var r in t.options)delete t.options[r].location,Di(t.options[r].value);else pr(t)&&xr(t.style)||(mr(t)||ur(t))&&Mt(t.style)?delete t.style.location:vr(t)&&Di(t.children)})}function Jn(e,t){t===void 0&&(t={}),t=_({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Zn(e,t).parse();if(r.err){var i=SyntaxError(w[r.err.kind]);throw i.location=r.err.location,i.originalMessage=r.err.message,i}return t?.captureLocation||Di(r.val),r.val}function Nt(e,t){var r=t&&t.cache?t.cache:cl,i=t&&t.serializer?t.serializer:sl,a=t&&t.strategy?t.strategy:al;return a(e,{cache:r,serializer:i})}function il(e){return e==null||typeof e=="number"||typeof e=="boolean"}function eo(e,t,r,i){var a=il(i)?i:r(i),n=t.get(a);return typeof n>"u"&&(n=e.call(this,i),t.set(a,n)),n}function to(e,t,r){var i=Array.prototype.slice.call(arguments,3),a=r(i),n=t.get(a);return typeof n>"u"&&(n=e.apply(this,i),t.set(a,n)),n}function Hi(e,t,r,i,a){return r.bind(t,e,i,a)}function al(e,t){var r=e.length===1?eo:to;return Hi(e,this,r,t.cache.create(),t.serializer)}function nl(e,t){return Hi(e,this,to,t.cache.create(),t.serializer)}function ol(e,t){return Hi(e,this,eo,t.cache.create(),t.serializer)}var sl=function(){return JSON.stringify(arguments)};function zi(){this.cache=Object.create(null)}zi.prototype.get=function(e){return this.cache[e]};zi.prototype.set=function(e,t){this.cache[e]=t};var cl={create:function(){return new zi}},br={variadic:nl,monadic:ol};var $e;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($e||($e={}));var Ot=function(e){kt(t,e);function t(r,i,a){var n=e.call(this,r)||this;return n.code=i,n.originalMessage=a,n}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Bi=function(e){kt(t,e);function t(r,i,a,n){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(i,'". Options are "').concat(Object.keys(a).join('", "'),'"'),$e.INVALID_VALUE,n)||this}return t}(Ot);var ro=function(e){kt(t,e);function t(r,i,a){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(i),$e.INVALID_VALUE,a)||this}return t}(Ot);var io=function(e){kt(t,e);function t(r,i){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(i,'"'),$e.MISSING_VALUE,i)||this}return t}(Ot);var K;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(K||(K={}));function ll(e){return e.length<2?e:e.reduce(function(t,r){var i=t[t.length-1];return!i||i.type!==K.literal||r.type!==K.literal?t.push(r):i.value+=r.value,t},[])}function dl(e){return typeof e=="function"}function It(e,t,r,i,a,n,o){if(e.length===1&&Pi(e[0]))return[{type:K.literal,value:e[0].value}];for(var s=[],c=0,l=e;c{Fi.set(e,{class:t,fragmentMapping:r,style:a,collectionOptions:i})};V("catalog",Xe,ci,Xe.variantStyle);V("image",Oe);V("inline-heading",Yt);V("mini-compare-chart",Ke,gi,Ke.variantStyle);V("mini-compare-chart-mweb",Ze,xi,Ze.variantStyle);V("plans",te,Zt,te.variantStyle,te.collectionOptions);V("plans-students",te,wi,te.variantStyle,te.collectionOptions);V("plans-education",te,yi,te.variantStyle,te.collectionOptions);V("plans-v2",_e,Si,_e.variantStyle,_e.collectionOptions);V("product",Qe,Ci,Qe.variantStyle);V("segment",Je,Pi,Je.variantStyle);V("media",et,ki,et.variantStyle);V("headless",it,Hi,it.variantStyle);V("special-offers",tt,Ri,tt.variantStyle);V("simplified-pricing-express",rt,aa,rt.variantStyle);V("full-pricing-express",at,ia,at.variantStyle);V("mini",nt,Bi,nt.variantStyle);V("image",Oe,di,Oe.variantStyle);function Wt(e){return Fi.get(e)?.fragmentMapping}var Ui="tacocat.js";var oa=(e,t)=>String(e??"").toLowerCase()==String(t??"").toLowerCase(),$i=e=>`${e??""}`.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]??t)??"";function H(e,t={},{metadata:r=!0,search:a=!0,storage:i=!0}={}){let n;if(a&&n==null){let o=new URLSearchParams(window.location.search),s=ot(a)?a:e;n=o.get(s)}if(i&&n==null){let o=ot(i)?i:e;n=window.sessionStorage.getItem(o)??window.localStorage.getItem(o)}if(r&&n==null){let o=Fs(ot(r)?r:e);n=document.documentElement.querySelector(`meta[name="${o}"]`)?.content}return n??t[e]}var Bs=e=>typeof e=="boolean",Jt=e=>typeof e=="function",er=e=>typeof e=="number",Gi=e=>e!=null&&typeof e=="object";var ot=e=>typeof e=="string",qi=e=>ot(e)&&e,Tt=e=>er(e)&&Number.isFinite(e)&&e>0;function tr(e,t=r=>r==null||r===""){return e!=null&&Object.entries(e).forEach(([r,a])=>{t(a)&&delete e[r]}),e}function y(e,t){if(Bs(e))return e;let r=String(e);return r==="1"||r==="true"?!0:r==="0"||r==="false"?!1:t}function Ct(e,t,r){let a=Object.values(t);return a.find(i=>oa(i,e))??r??a[0]}function Fs(e=""){return String(e).replace(/(\p{Lowercase_Letter})(\p{Uppercase_Letter})/gu,(t,r,a)=>`${r}-${a}`).replace(/\W+/gu,"-").toLowerCase()}function Vi(e,t=1){return er(e)||(e=Number.parseInt(e,10)),!Number.isNaN(e)&&e>0&&Number.isFinite(e)?e:t}var Us=Date.now(),sa=()=>`(+${Date.now()-Us}ms)`,rr=new Set,$s=y(H("tacocat.debug",{},{metadata:!1}),!1);function ji(e){let t=`[${Ui}/${e}]`,r=(o,s,...c)=>o?!0:(i(s,...c),!1),a=$s?(o,...s)=>{console.debug(`${t} ${o}`,...s,sa())}:()=>{},i=(o,...s)=>{let c=`${t} ${o}`;rr.forEach(([l])=>l(c,...s))};return{assert:r,debug:a,error:i,warn:(o,...s)=>{let c=`${t} ${o}`;rr.forEach(([,l])=>l(c,...s))}}}function Gs(e,t){let r=[e,t];return rr.add(r),()=>{rr.delete(r)}}Gs((e,...t)=>{console.error(e,...t,sa())},(e,...t)=>{console.warn(e,...t,sa())});var qs="no promo",Wi="promo-tag",Vs="yellow",js="neutral",Ws=(e,t,r)=>{let a=n=>n||qs,i=r?` (was "${a(t)}")`:"";return`${a(e)}${i}`},Ys="cancel-context",ar=(e,t)=>{let r=e===Ys,a=!r&&e?.length>0,i=(a||r)&&(t&&t!=e||!t&&!r),n=i&&a||!i&&!!t,o=n?e||t:void 0;return{effectivePromoCode:o,overridenPromoCode:e,className:n?Wi:`${Wi} no-promo`,text:Ws(o,t,i),variant:n?Vs:js,isOverriden:i}};var ca;(function(e){e.BASE="BASE",e.TRIAL="TRIAL",e.PROMOTION="PROMOTION"})(ca||(ca={}));var oe;(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"})(oe||(oe={}));var le;(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"})(le||(le={}));var la;(function(e){e.INDIVIDUAL="INDIVIDUAL",e.TEAM="TEAM",e.ENTERPRISE="ENTERPRISE"})(la||(la={}));var da;(function(e){e.COM="COM",e.EDU="EDU",e.GOV="GOV"})(da||(da={}));var ha;(function(e){e.DIRECT="DIRECT",e.INDIRECT="INDIRECT"})(ha||(ha={}));var pa;(function(e){e.ENTERPRISE_PRODUCT="ENTERPRISE_PRODUCT",e.ETLA="ETLA",e.RETAIL="RETAIL",e.VIP="VIP",e.VIPMP="VIPMP",e.FREE="FREE"})(pa||(pa={}));var ma="ABM",ua="PUF",ga="M2M",fa="PERPETUAL",va="P3Y",Xs="TAX_INCLUSIVE_DETAILS",Ks="TAX_EXCLUSIVE",Yi={ABM:ma,PUF:ua,M2M:ga,PERPETUAL:fa,P3Y:va},Op={[ma]:{commitment:oe.YEAR,term:le.MONTHLY},[ua]:{commitment:oe.YEAR,term:le.ANNUAL},[ga]:{commitment:oe.MONTH,term:le.MONTHLY},[fa]:{commitment:oe.PERPETUAL,term:void 0},[va]:{commitment:oe.THREE_MONTHS,term:le.P3Y}},Xi="Value is not an offer",ir=e=>{if(typeof e!="object")return Xi;let{commitment:t,term:r}=e,a=Zs(t,r);return{...e,planType:a}};var Zs=(e,t)=>{switch(e){case void 0:return Xi;case"":return"";case oe.YEAR:return t===le.MONTHLY?ma:t===le.ANNUAL?ua:"";case oe.MONTH:return t===le.MONTHLY?ga:"";case oe.PERPETUAL:return fa;case oe.TERM_LICENSE:return t===le.P3Y?va:"";default:return""}};function Ki(e){let{priceDetails:t}=e,{price:r,priceWithoutDiscount:a,priceWithoutTax:i,priceWithoutDiscountAndTax:n,taxDisplay:o}=t;if(o!==Xs)return e;let s={...e,priceDetails:{...t,price:i??r,priceWithoutDiscount:n??a,taxDisplay:Ks}};return s.offerType==="TRIAL"&&s.priceDetails.price===0&&(s.priceDetails.price=s.priceDetails.priceWithoutDiscount),s}var Ie={clientId:"merch-at-scale",delimiter:"\xB6",ignoredProperties:["analytics","literals","element"],serializableTypes:["Array","Object"],sampleRate:1,severity:"e",tags:"acom",isProdDomain:!1},Zi=1e3;function Qs(e){return e instanceof Error||typeof e?.originatingRequest=="string"}function Qi(e){if(e==null)return;let t=typeof e;if(t==="function")return e.name?`function ${e.name}`:"function";if(t==="object"){if(e instanceof Error)return e.message;if(typeof e.originatingRequest=="string"){let{message:a,originatingRequest:i,status:n}=e;return[a,n,i].filter(Boolean).join(" ")}let r=e[Symbol.toStringTag]??Object.getPrototypeOf(e).constructor.name;if(!Ie.serializableTypes.includes(r))return r}return e}function Js(e,t){if(!Ie.ignoredProperties.includes(e))return Qi(t)}var xa={append(e){if(e.level!=="error")return;let{message:t,params:r}=e,a=[],i=[],n=t;r.forEach(l=>{l!=null&&(Qs(l)?a:i).push(l)}),a.length&&(n+=" "+a.map(Qi).join(" "));let{pathname:o,search:s}=window.location,c=`${Ie.delimiter}page=${o}${s}`;c.length>Zi&&(c=`${c.slice(0,Zi)}`),n+=c,i.length&&(n+=`${Ie.delimiter}facts=`,n+=JSON.stringify(i,Js)),window.lana?.log(n,Ie)}};function nr(e){Object.assign(Ie,Object.fromEntries(Object.entries(e).filter(([t,r])=>t in Ie&&r!==""&&r!==null&&r!==void 0&&!Number.isNaN(r))))}var Ji={LOCAL:"local",PROD:"prod",STAGE:"stage"},ba={DEBUG:"debug",ERROR:"error",INFO:"info",WARN:"warn"},ya=new Set,wa=new Set,en=new Map,tn={append({level:e,message:t,params:r,timestamp:a,source:i}){console[e](`${a}ms [${i}] %c${t}`,"font-weight: bold;",...r)}},rn={filter:({level:e})=>e!==ba.DEBUG},ec={filter:()=>!1};function tc(e,t,r,a,i){return{level:e,message:t,namespace:r,get params(){return a.length===1&&Jt(a[0])&&(a=a[0](),Array.isArray(a)||(a=[a])),a},source:i,timestamp:performance.now().toFixed(3)}}function rc(e){[...wa].every(t=>t(e))&&ya.forEach(t=>t(e))}function an(e){let t=(en.get(e)??0)+1;en.set(e,t);let r=`${e} #${t}`,a={id:r,namespace:e,module:i=>an(`${a.namespace}/${i}`),updateConfig:nr};return Object.values(ba).forEach(i=>{a[i]=(n,...o)=>rc(tc(i,n,e,o,r))}),Object.seal(a)}function or(...e){e.forEach(t=>{let{append:r,filter:a}=t;Jt(a)&&wa.add(a),Jt(r)&&ya.add(r)})}function ac(e={}){let{name:t}=e,r=y(H("commerce.debug",{search:!0,storage:!0}),t===Ji.LOCAL);return or(r?tn:rn),t===Ji.PROD&&or(xa),re}function ic(){ya.clear(),wa.clear()}var re={...an(Ur),Level:ba,Plugins:{consoleAppender:tn,debugFilter:rn,quietFilter:ec,lanaAppender:xa},init:ac,reset:ic,use:or};var nc="mas-commerce-service",oc=re.module("utilities"),sc={requestId:xt,etag:"Etag",lastModified:"Last-Modified",serverTiming:"server-timing"};function _t(e,{country:t,forceTaxExclusive:r}){let a;if(e.length<2)a=e;else{let i=t==="GB"?"EN":"MULT";e.sort((n,o)=>n.language===i?-1:o.language===i?1:0),e.sort((n,o)=>!n.term&&o.term?-1:n.term&&!o.term?1:0),a=[e[0]]}return r&&(a=a.map(Ki)),a}var nn=(e,t)=>{let r=e.reduce((a,i)=>a+(t(i)||0),0);return r>0?Math.round(r*100)/100:void 0};function Ea(e){if(!e||e.length===0)return null;if(e.length===1)return e[0];let[t,...r]=e;for(let s of r){let c=[["commitment","commitment types"],["term","terms"],["priceDetails.formatString","currency formats"]];for(let[l,d]of c){let p=l.includes(".")?t.priceDetails?.formatString:t[l],u=l.includes(".")?s.priceDetails?.formatString:s[l];u!==p&&oc.warn(`Offers have different ${d}, summing may produce unexpected results`,{expected:p,actual:u})}}let a=[["price",s=>s.priceDetails?.price],["priceWithoutDiscount",s=>s.priceDetails?.priceWithoutDiscount],["priceWithoutTax",s=>s.priceDetails?.priceWithoutTax],["priceWithoutDiscountAndTax",s=>s.priceDetails?.priceWithoutDiscountAndTax]],i={};for(let[s,c]of a){let l=nn(e,c);l!==void 0&&(i[s]=l)}let n=e.some(s=>s.priceDetails?.annualized),o;if(n){let s=[["annualizedPrice",c=>c.priceDetails?.annualized?.annualizedPrice],["annualizedPriceWithoutTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutTax],["annualizedPriceWithoutDiscount",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscount],["annualizedPriceWithoutDiscountAndTax",c=>c.priceDetails?.annualized?.annualizedPriceWithoutDiscountAndTax]];o={};for(let[c,l]of s){let d=nn(e,l);d!==void 0&&(o[c]=d)}}return{...t,offerSelectorIds:e.flatMap(s=>s.offerSelectorIds||[]),priceDetails:{...t.priceDetails,...i,...o&&{annualized:o}}}}var sr=e=>window.setTimeout(e);function st(e,t=1){if(e==null)return[t];let r=(Array.isArray(e)?e:String(e).split(",")).map(Vi).filter(Tt);return r.length||(r=[t]),r}function cr(e){return e==null?[]:(Array.isArray(e)?e:String(e).split(",")).filter(qi)}function ae(){return document.getElementsByTagName(nc)?.[0]}function on(e){let t={};if(!e?.headers)return t;let r=e.headers;for(let[a,i]of Object.entries(sc)){let n=r.get(i);n&&(n=n.replace(/[,;]/g,"|"),n=n.replace(/[| ]+/g,"|"),t[a]=n)}return t}var ct=class e extends Error{constructor(t,r,a){if(super(t,{cause:a}),this.name="MasError",r.response){let i=r.response.headers?.get(xt);i&&(r.requestId=i),r.response.status&&(r.status=r.response.status,r.statusText=r.response.statusText),r.response.url&&(r.url=r.response.url)}delete r.response,this.context=r,Error.captureStackTrace&&Error.captureStackTrace(this,e)}toString(){let t=Object.entries(this.context||{}).map(([a,i])=>`${a}: ${JSON.stringify(i)}`).join(", "),r=`${this.name}: ${this.message}`;return t&&(r+=` (${t})`),this.cause&&(r+=` +Caused by: ${this.cause}`),r}};var cc={[he]:Or,[Se]:Ir,[ve]:Dr},lc={[he]:Br,[ve]:Fr},Pt,Pe=class{constructor(t){G(this,Pt);f(this,"changes",new Map);f(this,"connected",!1);f(this,"error");f(this,"log");f(this,"options");f(this,"promises",[]);f(this,"state",Se);f(this,"timer",null);f(this,"value");f(this,"version",0);f(this,"wrapperElement");this.wrapperElement=t,this.log=re.module("mas-element")}update(){[he,Se,ve].forEach(t=>{this.wrapperElement.classList.toggle(cc[t],t===this.state)})}notify(){(this.state===ve||this.state===he)&&(this.state===ve?this.promises.forEach(({resolve:r})=>r(this.wrapperElement)):this.state===he&&this.promises.forEach(({reject:r})=>r(this.error)),this.promises=[]);let t=this.error;this.error instanceof ct&&(t={message:this.error.message,...this.error.context}),this.wrapperElement.dispatchEvent(new CustomEvent(lc[this.state],{bubbles:!0,composed:!0,detail:t}))}attributeChangedCallback(t,r,a){this.changes.set(t,a),this.requestUpdate()}connectedCallback(){W(this,Pt,ae()),this.requestUpdate(!0)}disconnectedCallback(){this.connected&&(this.connected=!1,this.log?.debug("Disconnected:",{element:this.wrapperElement}))}onceSettled(){let{error:t,promises:r,state:a}=this;return ve===a?Promise.resolve(this.wrapperElement):he===a?Promise.reject(t):new Promise((i,n)=>{r.push({resolve:i,reject:n})})}toggleResolved(t,r,a){return t!==this.version?!1:(a!==void 0&&(this.options=a),this.state=ve,this.value=r,this.update(),this.log?.debug("Resolved:",{element:this.wrapperElement,value:r}),sr(()=>this.notify()),!0)}toggleFailed(t,r,a){if(t!==this.version)return!1;a!==void 0&&(this.options=a),this.error=r,this.state=he,this.update();let i=this.wrapperElement.getAttribute("is");return this.log?.error(`${i}: Failed to render: ${r.message}`,{element:this.wrapperElement,...r.context,...S(this,Pt)?.duration}),sr(()=>this.notify()),!0}togglePending(t){return this.version++,t&&(this.options=t),this.state=Se,this.update(),this.log?.debug("Pending:",{osi:this.wrapperElement?.options?.wcsOsi}),this.version}requestUpdate(t=!1){if(!this.wrapperElement.isConnected||!ae()||this.timer)return;let{error:r,options:a,state:i,value:n,version:o}=this;this.state=Se,this.timer=sr(async()=>{this.timer=null;let s=null;if(this.changes.size&&(s=Object.fromEntries(this.changes.entries()),this.changes.clear()),this.connected?this.log?.debug("Updated:",{element:this.wrapperElement,changes:s}):(this.connected=!0,this.log?.debug("Connected:",{element:this.wrapperElement,changes:s})),s||t)try{await this.wrapperElement.render?.()===!1&&this.state===Se&&this.version===o&&(this.state=i,this.error=r,this.value=n,this.update(),this.notify())}catch(c){this.toggleFailed(this.version,c,a)}})}};Pt=new WeakMap;function sn(e={}){return Object.entries(e).forEach(([t,r])=>{(r==null||r===""||r?.length===0)&&delete e[t]}),e}function lr(e,t={}){let{tag:r,is:a}=e,i=document.createElement(r,{is:a});return i.setAttribute("is",a),Object.assign(i.dataset,sn(t)),i}function cn(e,t={}){return e instanceof HTMLElement?(Object.assign(e.dataset,sn(t)),e):null}function dc(e){return`https://${e==="PRODUCTION"?"www.adobe.com":"www.stage.adobe.com"}/offers/promo-terms.html`}var ze,De=class De extends HTMLAnchorElement{constructor(){super();f(this,"masElement",new Pe(this));G(this,ze);this.setAttribute("is",De.is)}get isUptLink(){return!0}initializeWcsData(r,a){this.setAttribute("data-wcs-osi",r),a&&this.setAttribute("data-promotion-code",a)}attributeChangedCallback(r,a,i){this.masElement.attributeChangedCallback(r,a,i)}connectedCallback(){this.masElement.connectedCallback(),W(this,ze,yt()),S(this,ze)&&(this.log=S(this,ze).log.module("upt-link"))}disconnectedCallback(){this.masElement.disconnectedCallback(),W(this,ze,void 0)}requestUpdate(r=!1){this.masElement.requestUpdate(r)}onceSettled(){return this.masElement.onceSettled()}async render(){let r=yt();if(!r)return!1;this.dataset.imsCountry||r.imsCountryPromise.then(o=>{o&&(this.dataset.imsCountry=o)});let a=r.collectCheckoutOptions({},this);if(!a.wcsOsi)return this.log.error("Missing 'data-wcs-osi' attribute on upt-link."),!1;let i=this.masElement.togglePending(a),n=r.resolveOfferSelectors(a);try{let[[o]]=await Promise.all(n),{country:s,language:c,env:l}=a,d=`locale=${c}_${s}&country=${s}&offer_id=${o.offerId}`,p=this.getAttribute("data-promotion-code");p&&(d+=`&promotion_code=${encodeURIComponent(p)}`),this.href=`${dc(l)}?${d}`,this.masElement.toggleResolved(i,o,a)}catch(o){let s=new Error(`Could not resolve offer selectors for id: ${a.wcsOsi}.`,o.message);return this.masElement.toggleFailed(i,s,a),!1}}static createFrom(r){let a=new De;for(let i of r.attributes)i.name!=="is"&&(i.name==="class"&&i.value.includes("upt-link")?a.setAttribute("class",i.value.replace("upt-link","").trim()):a.setAttribute(i.name,i.value));return a.innerHTML=r.innerHTML,a.setAttribute("tabindex",0),a}};ze=new WeakMap,f(De,"is","upt-link"),f(De,"tag","a"),f(De,"observedAttributes",["data-wcs-osi","data-promotion-code","data-ims-country"]);var He=De;window.customElements.get(He.is)||window.customElements.define(He.is,He,{extends:He.tag});function ln(e){return e&&(e.startsWith("plans")?"plans":e)}var hc=/[0-9\-+#]/,pc=/[^\d\-+#]/g;function dn(e){return e.search(hc)}function mc(e="#.##"){let t={},r=e.length,a=dn(e);t.prefix=a>0?e.substring(0,a):"";let i=dn(e.split("").reverse().join("")),n=r-i,o=e.substring(n,n+1),s=n+(o==="."||o===","?1:0);t.suffix=i>0?e.substring(s,r):"",t.mask=e.substring(a,s),t.maskHasNegativeSign=t.mask.charAt(0)==="-",t.maskHasPositiveSign=t.mask.charAt(0)==="+";let c=t.mask.match(pc);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 uc(e,t,r){let a=!1,i={value:e};e<0&&(a=!0,i.value=-i.value),i.sign=a?"-":"",i.value=Number(i.value).toFixed(t.fraction&&t.fraction.length),i.value=Number(i.value).toString();let n=t.fraction&&t.fraction.lastIndexOf("0"),[o="0",s=""]=i.value.split(".");return(!s||s&&s.length<=n)&&(s=n<0?"":(+("0."+s)).toFixed(n+1).replace("0.","")),i.integer=o,i.fraction=s,gc(i,t),(i.result==="0"||i.result==="")&&(a=!1,i.sign=""),!a&&t.maskHasPositiveSign?i.sign="+":a&&t.maskHasPositiveSign?i.sign="-":a&&(i.sign=r&&r.enforceMaskSign&&!t.maskHasNegativeSign?"":"-"),i}function gc(e,t){e.result="";let r=t.integer.split(t.separator),a=r.join(""),i=a&&a.indexOf("0");if(i>-1)for(;e.integer.lengthe*12,Fe=(e,t,r=1)=>{if(!e)return!1;let{start:a,end:i,displaySummary:{amount:n,duration:o,minProductQuantity:s=1,outcomeType:c}={}}=e;if(!(n&&o&&c)||r=d&&l<=p},Be={MONTH:"MONTH",YEAR:"YEAR"},xc={[ce.ANNUAL]:12,[ce.MONTHLY]:1,[ce.THREE_YEARS]:36,[ce.TWO_YEARS]:24},Sa=(e,t)=>({accept:e,round:t}),bc=[Sa(({divisor:e,price:t})=>t%e==0,({divisor:e,price:t})=>t/e),Sa(({usePrecision:e})=>e,({divisor:e,price:t})=>Math.round(t/e*100)/100),Sa(()=>!0,({divisor:e,price:t})=>Math.ceil(Math.floor(t*100/e)/100))],Ta={[Re.YEAR]:{[ce.MONTHLY]:Be.MONTH,[ce.ANNUAL]:Be.YEAR},[Re.MONTH]:{[ce.MONTHLY]:Be.MONTH}},yc=(e,t)=>e.indexOf(`'${t}'`)===0,wc=(e,t=!0)=>{let r=e.replace(/'.*?'/,"").trim(),a=vn(r);return!!a?t||(r=r.replace(/[,\.]0+/,a)):r=r.replace(/\s?(#.*0)(?!\s)?/,"$&"+Ac(e)),r},Ec=e=>{let t=Sc(e),r=yc(e,t),a=e.replace(/'.*?'/,""),i=un.test(a)||gn.test(a);return{currencySymbol:t,isCurrencyFirst:r,hasCurrencySpace:i}},fn=e=>e.replace(un,mn).replace(gn,mn),Ac=e=>e.match(/#(.?)#/)?.[1]===pn?vc:pn,Sc=e=>e.match(/'(.*?)'/)?.[1]??"",vn=e=>e.match(/0(.?)0/)?.[1]??"";function lt({formatString:e,price:t,usePrecision:r,isIndianPrice:a=!1},i,n=o=>o){let{currencySymbol:o,isCurrencyFirst:s,hasCurrencySpace:c}=Ec(e),l=r?vn(e):"",d=wc(e,r),p=r?2:0,u=n(t,{currencySymbol:o}),h=a?u.toLocaleString("hi-IN",{minimumFractionDigits:p,maximumFractionDigits:p}):hn(d,u),m=r?h.lastIndexOf(l):h.length,g=h.substring(0,m),v=h.substring(m+1);return{accessiblePrice:e.replace(/'.*?'/,"SYMBOL").replace(/#.*0/,h).replace(/SYMBOL/,o),currencySymbol:o,decimals:v,decimalsDelimiter:l,hasCurrencySpace:c,integer:g,isCurrencyFirst:s,recurrenceTerm:i}}var xn=e=>{let{commitment:t,term:r,usePrecision:a}=e,i=xc[r]??1;return lt(e,i>1?Be.MONTH:Ta[t]?.[r],n=>{let o={divisor:i,price:n,usePrecision:a},{round:s}=bc.find(({accept:c})=>c(o));if(!s)throw new Error(`Missing rounding rule for: ${JSON.stringify(o)}`);return s(o)})},bn=({commitment:e,term:t,...r})=>lt(r,Ta[e]?.[t]),yn=e=>{let{commitment:t,instant:r,price:a,originalPrice:i,priceWithoutDiscount:n,promotion:o,quantity:s=1,term:c}=e;if(t===Re.YEAR&&c===ce.MONTHLY){if(!o)return lt(e,Be.YEAR,Aa);let{displaySummary:{outcomeType:l,duration:d}={}}=o;switch(l){case"PERCENTAGE_DISCOUNT":if(Fe(o,r,s)){let p=parseInt(d.replace("P","").replace("M",""));if(isNaN(p))return Aa(a);let u=i*p,h=n*(12-p),m=Math.round((u+h)*100)/100;return lt({...e,price:m},Be.YEAR)}default:return lt(e,Be.YEAR,()=>Aa(n??a))}}return lt(e,Ta[t]?.[c])};var wn="download",En="upgrade",An={e:"EDU",t:"TEAM"};function Sn(e,t={},r=""){let a=ae();if(!a)return null;let{checkoutMarketSegment:i,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:h,extraOptions:m,analyticsId:g}=a.collectCheckoutOptions(t),v=lr(e,{checkoutMarketSegment:i,checkoutWorkflow:n,checkoutWorkflowStep:o,entitlement:s,upgrade:c,modal:l,perpetual:d,promotionCode:p,quantity:u,wcsOsi:h,extraOptions:m,analyticsId:g});return r&&(v.innerHTML=`${r}`),v}function Tn(e){return class extends e{constructor(){super(...arguments);f(this,"checkoutActionHandler");f(this,"masElement",new Pe(this))}attributeChangedCallback(a,i,n){this.masElement.attributeChangedCallback(a,i,n)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.clickHandler)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.clickHandler)}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get marketSegment(){let a=this.options?.ms??this.value?.[0].marketSegments?.[0];return An[a]??a}get customerSegment(){let a=this.options?.cs??this.value?.[0]?.customerSegment;return An[a]??a}get is3in1Modal(){return Object.values(Ne).includes(this.getAttribute("data-modal"))}get isOpen3in1Modal(){let a=document.querySelector("meta[name=mas-ff-3in1]");return this.is3in1Modal&&(!a||a.content!=="off")}requestUpdate(a=!1){return this.masElement.requestUpdate(a)}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"]}async render(a={}){let i=ae();if(!i)return!1;this.dataset.imsCountry||i.imsCountryPromise.then(h=>{h&&(this.dataset.imsCountry=h)}),a.imsCountry=null;let n=i.collectCheckoutOptions(a,this);if(!n.wcsOsi.length)return!1;let o;try{o=JSON.parse(n.extraOptions??"{}")}catch(h){this.masElement.log?.error("cannot parse exta checkout options",h)}let s=this.masElement.togglePending(n);this.setCheckoutUrl("");let c=i.resolveOfferSelectors(n),l=await Promise.all(c);l=l.map(h=>_t(h,n));let d=l.flat().find(h=>h.promotion);!Fe(d?.promotion,d?.promotion?.displaySummary?.instant,n.quantity[0])&&n.promotionCode&&delete n.promotionCode,n.country=this.dataset.imsCountry||n.country;let u=await i.buildCheckoutAction?.(l.flat(),{...o,...n},this);return this.renderOffers(l.flat(),n,{},u,s)}renderOffers(a,i,n={},o=void 0,s=void 0){let c=ae();if(!c)return!1;if(i={...JSON.parse(this.dataset.extraOptions??"{}"),...i,...n},s??(s=this.masElement.togglePending(i)),this.checkoutActionHandler&&(this.checkoutActionHandler=void 0),o){this.classList.remove(wn,En),this.masElement.toggleResolved(s,a,i);let{url:d,text:p,className:u,handler:h}=o;d&&this.setCheckoutUrl(d),p&&(this.firstElementChild.innerHTML=p),u&&this.classList.add(...u.split(" ")),h&&(this.setCheckoutUrl("#"),this.checkoutActionHandler=h.bind(this))}if(a.length){if(this.masElement.toggleResolved(s,a,i)){if(!this.classList.contains(wn)&&!this.classList.contains(En)){let d=c.buildCheckoutURL(a,i);this.setCheckoutUrl(i.modal==="true"?"#":d)}return!0}}else{let d=new Error(`Not provided: ${i?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(s,d,i))return this.setCheckoutUrl("#"),!0}}setCheckoutUrl(){}clickHandler(a){}updateOptions(a={}){let i=ae();if(!i)return!1;let{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:h,wcsOsi:m}=i.collectCheckoutOptions(a);return cn(this,{checkoutMarketSegment:n,checkoutWorkflow:o,checkoutWorkflowStep:s,entitlement:c,upgrade:l,modal:d,perpetual:p,promotionCode:u,quantity:h,wcsOsi:m}),!0}}}var Lt=class Lt extends Tn(HTMLAnchorElement){static createCheckoutLink(t={},r=""){return Sn(Lt,t,r)}setCheckoutUrl(t){this.setAttribute("href",t)}get isCheckoutLink(){return!0}clickHandler(t){if(this.checkoutActionHandler){this.checkoutActionHandler?.(t);return}}};f(Lt,"is","checkout-link"),f(Lt,"tag","a");var ye=Lt;window.customElements.get(ye.is)||window.customElements.define(ye.is,ye,{extends:ye.tag});var Tc="p_draft_landscape",Cc="/store/",_c=new Map([["countrySpecific","cs"],["customerSegment","cs"],["quantity","q"],["authCode","code"],["checkoutPromoCode","apc"],["rurl","rUrl"],["curl","cUrl"],["ctxrturl","ctxRtUrl"],["country","co"],["language","lang"],["clientId","cli"],["context","ctx"],["productArrangementCode","pa"],["addonProductArrangementCode","ao"],["offerType","ot"],["marketSegment","ms"]]),Ca=new Set(["af","ai","ao","apc","appctxid","cli","co","cs","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"]),Pc=["env","workflowStep","clientId","country"],Cn=new Set(["gid","gtoken","notifauditid","cohortid","productname","sdid","attimer","gcsrc","gcprog","gcprogcat","gcpagetype","mv","mv2"]),_n=e=>_c.get(e)??e;function dr(e,t,r){for(let[a,i]of Object.entries(e)){let n=_n(a);i!=null&&r.has(n)&&t.set(n,i)}}function Lc(e){switch(e){case Wr.PRODUCTION:return"https://commerce.adobe.com";default:return"https://commerce-stg.adobe.com"}}function kc(e,t){for(let r in e){let a=e[r];for(let[i,n]of Object.entries(a)){if(n==null)continue;let o=_n(i);t.set(`items[${r}][${o}]`,n)}}}function Mc({url:e,modal:t,is3in1:r}){if(!r||!e?.searchParams)return e;e.searchParams.set("rtc","t"),e.searchParams.set("lo","sl");let a=e.searchParams.get("af");return e.searchParams.set("af",[a,"uc_new_user_iframe","uc_new_system_close"].filter(Boolean).join(",")),e.searchParams.get("cli")!=="doc_cloud"&&e.searchParams.set("cli",t===Ne.CRM?"creative":"mini_plans"),e}function Rc(e){let t=new URLSearchParams(window.location.search),r={};Cn.forEach(a=>{let i=t.get(a);i!==null&&(r[a]=i)}),Object.keys(r).length>0&&dr(r,e.searchParams,Cn)}function Pn(e){Nc(e);let{env:t,items:r,workflowStep:a,marketSegment:i,customerSegment:n,offerType:o,productArrangementCode:s,landscape:c,modal:l,is3in1:d,preselectPlan:p,...u}=e,h=new URL(Lc(t));if(h.pathname=`${Cc}${a}`,a!==ee.SEGMENTATION&&a!==ee.CHANGE_PLAN_TEAM_PLANS&&kc(r,h.searchParams),dr({...u},h.searchParams,Ca),Rc(h),c===Te.DRAFT&&dr({af:Tc},h.searchParams,Ca),a===ee.SEGMENTATION){let m={marketSegment:i,offerType:o,customerSegment:n,productArrangementCode:s,quantity:r?.[0]?.quantity,addonProductArrangementCode:s?r?.find(g=>g.productArrangementCode!==s)?.productArrangementCode:r?.[1]?.productArrangementCode};p?.toLowerCase()==="edu"?h.searchParams.set("ms","EDU"):p?.toLowerCase()==="team"&&h.searchParams.set("cs","TEAM"),dr(m,h.searchParams,Ca),h.searchParams.get("ot")==="PROMOTION"&&h.searchParams.delete("ot"),h=Mc({url:h,modal:l,is3in1:d})}return h.toString()}function Nc(e){for(let t of Pc)if(!e[t])throw new Error(`Argument "checkoutData" is not valid, missing: ${t}`);if(e.workflowStep!==ee.SEGMENTATION&&e.workflowStep!==ee.CHANGE_PLAN_TEAM_PLANS&&!e.items)throw new Error('Argument "checkoutData" is not valid, missing: items');return!0}var k=Object.freeze({checkoutClientId:"adobe_com",checkoutWorkflowStep:ee.EMAIL,country:"US",displayOldPrice:!0,displayPerUnit:!1,displayRecurrence:!0,displayTax:!1,displayPlanType:!1,env:ge.PRODUCTION,forceTaxExclusive:!1,language:"en",entitlement:!1,extraOptions:{},modal:!1,promotionCode:"",quantity:1,alternativePrice:!1,wcsApiKey:"wcms-commerce-ims-ro-user-milo",wcsURL:"https://www.adobe.com/web_commerce_artifact",landscape:Te.PUBLISHED});function Ln({settings:e,providers:t}){function r(n,o){let{checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:h,env:m}=e,g={checkoutClientId:s,checkoutWorkflowStep:c,country:l,language:d,promotionCode:p,quantity:u,preselectPlan:h,env:m};if(o)for(let Ve of t.checkout)Ve(o,g);let{checkoutMarketSegment:v,checkoutWorkflowStep:b=c,imsCountry:E,country:x=E??l,language:A=d,quantity:N=u,entitlement:M,upgrade:z,modal:$,perpetual:Q,promotionCode:j=p,wcsOsi:F,extraOptions:R,...J}=Object.assign(g,o?.dataset??{},n??{}),se=Ct(b,ee,k.checkoutWorkflowStep);return g=tr({...J,extraOptions:R,checkoutClientId:s,checkoutMarketSegment:v,country:x,quantity:st(N,k.quantity),checkoutWorkflowStep:se,language:A,entitlement:y(M),upgrade:y(z),modal:$,perpetual:y(Q),promotionCode:ar(j).effectivePromoCode,wcsOsi:cr(F),preselectPlan:h}),g}function a(n,o){if(!Array.isArray(n)||!n.length||!o)return"";let{env:s,landscape:c}=e,{checkoutClientId:l,checkoutMarketSegment:d,checkoutWorkflowStep:p,country:u,promotionCode:h,quantity:m,preselectPlan:g,ms:v,cs:b,...E}=r(o),x=document.querySelector("meta[name=mas-ff-3in1]"),A=Object.values(Ne).includes(o.modal)&&(!x||x.content!=="off"),N=window.frameElement||A?"if":"fp",[{productArrangementCode:M,marketSegments:[z],customerSegment:$,offerType:Q}]=n,j=v??z??d,F=b??$;g?.toLowerCase()==="edu"?j="EDU":g?.toLowerCase()==="team"&&(F="TEAM");let R={is3in1:A,checkoutPromoCode:h,clientId:l,context:N,country:u,env:s,items:[],marketSegment:j,customerSegment:F,offerType:Q,productArrangementCode:M,workflowStep:p,landscape:c,...E},J=m[0]>1?m[0]:void 0;if(n.length===1){let{offerId:se}=n[0];R.items.push({id:se,quantity:J})}else R.items.push(...n.map(({offerId:se,productArrangementCode:Ve})=>({id:se,quantity:J,...A?{productArrangementCode:Ve}:{}})));return Pn(R)}let{createCheckoutLink:i}=ye;return{CheckoutLink:ye,CheckoutWorkflowStep:ee,buildCheckoutURL:a,collectCheckoutOptions:r,createCheckoutLink:i}}function Oc({interval:e=200,maxAttempts:t=25}={}){let r=re.module("ims");return new Promise(a=>{r.debug("Waing for IMS to be ready");let i=0;function n(){window.adobeIMS?.initialized?a():++i>t?(r.debug("Timeout"),a()):setTimeout(n,e)}n()})}function Ic(e){return e.then(()=>window.adobeIMS?.isSignedInUser()??!1)}function Dc(e){let t=re.module("ims");return e.then(r=>r?window.adobeIMS.getProfile().then(({countryCode:a})=>(t.debug("Got user country:",a),a),a=>{t.error("Unable to get user country:",a)}):null)}function kn({}){let e=Oc(),t=Ic(e),r=Dc(t);return{imsReadyPromise:e,imsSignedInPromise:t,imsCountryPromise:r}}var Mn=window.masPriceLiterals;function Rn(e){if(Array.isArray(Mn)){let t=e.locale==="id_ID"?"in":e.language,r=i=>Mn.find(n=>oa(n.lang,i)),a=r(t)??r(k.language);if(a)return Object.freeze(a)}return{}}var _a=function(e,t){return _a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(r[i]=a[i])},_a(e,t)};function kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_a(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var _=function(){return _=Object.assign||function(t){for(var r,a=1,i=arguments.length;a0}),r=[],a=0,i=t;a1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Bc,function(c,l,d,p,u,h){if(l)t.minimumIntegerDigits=d.length;else{if(p&&u)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if($n.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Hn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Hn,function(c,l,d,p,u,h){return d==="*"?t.minimumFractionDigits=l.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:u&&h?(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length+h.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var n=i.options[0];n==="w"?t=_(_({},t),{trailingZeroDisplay:"stripIfInteger"}):n&&(t=_(_({},t),zn(n)));continue}if(Un.test(i.stem)){t=_(_({},t),zn(i.stem));continue}var o=Gn(i.stem);o&&(t=_(_({},t),o));var s=Fc(i.stem);s&&(t=_(_({},t),s))}return t}var Rt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Vn(e,t){for(var r="",a=0;a>1),c="a",l=Uc(t);for((l=="H"||l=="k")&&(s=0);s-- >0;)r+=c;for(;o-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function Uc(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,a;r!=="root"&&(a=e.maximize().region);var i=Rt[a||""]||Rt[r||""]||Rt["".concat(r,"-001")]||Rt["001"];return i[0]}var ka,$c=new RegExp("^".concat(La.source,"*")),Gc=new RegExp("".concat(La.source,"*$"));function P(e,t){return{start:e,end:t}}var qc=!!String.prototype.startsWith,Vc=!!String.fromCodePoint,jc=!!Object.fromEntries,Wc=!!String.prototype.codePointAt,Yc=!!String.prototype.trimStart,Xc=!!String.prototype.trimEnd,Kc=!!Number.isSafeInteger,Zc=Kc?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Ra=!0;try{jn=Kn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Ra=((ka=jn.exec("a"))===null||ka===void 0?void 0:ka[0])==="a"}catch{Ra=!1}var jn,Wn=qc?function(t,r,a){return t.startsWith(r,a)}:function(t,r,a){return t.slice(a,a+r.length)===r},Na=Vc?String.fromCodePoint:function(){for(var t=[],r=0;rn;){if(o=t[n++],o>1114111)throw RangeError(o+" is not a valid code point");a+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return a},Yn=jc?Object.fromEntries:function(t){for(var r={},a=0,i=t;a=a)){var i=t.charCodeAt(r),n;return i<55296||i>56319||r+1===a||(n=t.charCodeAt(r+1))<56320||n>57343?i:(i-55296<<10)+(n-56320)+65536}},Qc=Yc?function(t){return t.trimStart()}:function(t){return t.replace($c,"")},Jc=Xc?function(t){return t.trimEnd()}:function(t){return t.replace(Gc,"")};function Kn(e,t){return new RegExp(e,t)}var Oa;Ra?(Ma=Kn("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),Oa=function(t,r){var a;Ma.lastIndex=r;var i=Ma.exec(t);return(a=i[1])!==null&&a!==void 0?a:""}):Oa=function(t,r){for(var a=[];;){var i=Xn(t,r);if(i===void 0||Qn(i)||rl(i))break;a.push(i),r+=i>=65536?2:1}return Na.apply(void 0,a)};var Ma,Zn=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.locale=r.locale,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,a){for(var i=[];!this.isEOF();){var n=this.char();if(n===123){var o=this.parseArgument(t,a);if(o.err)return o;i.push(o.val)}else{if(n===125&&t>0)break;if(n===35&&(r==="plural"||r==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:D.pound,location:P(s,this.clonePosition())})}else if(n===60&&!this.ignoreTag&&this.peek()===47){if(a)break;return this.error(w.UNMATCHED_CLOSING_TAG,P(this.clonePosition(),this.clonePosition()))}else if(n===60&&!this.ignoreTag&&Ia(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var a=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:D.literal,value:"<".concat(i,"/>"),location:P(a,this.clonePosition())},err:null};if(this.bumpIf(">")){var n=this.parseMessage(t+1,r,!0);if(n.err)return n;var o=n.val,s=this.clonePosition();if(this.bumpIf("")?{val:{type:D.tag,value:i,children:o,location:P(a,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,P(s,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,P(a,this.clonePosition()))}else return this.error(w.INVALID_TAG,P(a,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&tl(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var a=this.clonePosition(),i="";;){var n=this.tryParseQuote(r);if(n){i+=n;continue}var o=this.tryParseUnquoted(t,r);if(o){i+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var c=P(a,this.clonePosition());return{val:{type:D.literal,value:i,location:c},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!el(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 a=this.char();if(a===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(a);this.bump()}return Na.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var a=this.char();return a===60||a===123||a===35&&(r==="plural"||r==="selectordinal")||a===125&&t>0?null:(this.bump(),Na(a))},e.prototype.parseArgument=function(t,r){var a=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(a,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,P(a,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,P(a,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(a,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:D.argument,value:i,location:P(a,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(a,this.clonePosition())):this.parseArgumentOptions(t,r,i,a);default:return this.error(w.MALFORMED_ARGUMENT,P(a,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),a=Oa(this.message,r),i=r+a.length;this.bumpTo(i);var n=this.clonePosition(),o=P(t,n);return{value:a,location:o}},e.prototype.parseArgumentOptions=function(t,r,a,i){var n,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,c=this.clonePosition();switch(s){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,P(o,c));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var u=Jc(p.val);if(u.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,P(this.clonePosition(),this.clonePosition()));var h=P(d,this.clonePosition());l={style:u,styleLocation:h}}var m=this.tryParseArgumentClose(i);if(m.err)return m;var g=P(i,this.clonePosition());if(l&&Wn(l?.style,"::",0)){var v=Qc(l.style.slice(2));if(s==="number"){var p=this.parseNumberSkeletonFromString(v,l.styleLocation);return p.err?p:{val:{type:D.number,value:a,location:g,style:p.val},err:null}}else{if(v.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var b=v;this.locale&&(b=Vn(v,this.locale));var u={type:Ue.dateTime,pattern:b,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?In(b):{}},E=s==="date"?D.date:D.time;return{val:{type:E,value:a,location:g,style:u},err:null}}}return{val:{type:s==="number"?D.number:s==="date"?D.date:D.time,value:a,location:g,style:(n=l?.style)!==null&&n!==void 0?n:null},err:null}}case"plural":case"selectordinal":case"select":{var x=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(w.EXPECT_SELECT_ARGUMENT_OPTIONS,P(x,_({},x)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),N=0;if(s!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,P(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),A=this.parseIdentifierIfPossible(),N=p.val}var M=this.tryParsePluralOrSelectOptions(t,s,r,A);if(M.err)return M;var m=this.tryParseArgumentClose(i);if(m.err)return m;var z=P(i,this.clonePosition());return s==="select"?{val:{type:D.select,value:a,options:Yn(M.val),location:z},err:null}:{val:{type:D.plural,value:a,options:Yn(M.val),offset:N,pluralType:s==="plural"?"cardinal":"ordinal",location:z},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,P(o,c))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,P(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var a=this.char();switch(a){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,P(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 a=[];try{a=Fn(t)}catch{return this.error(w.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ue.number,tokens:a,location:r,parsedOptions:this.shouldParseSkeletons?qn(a):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,a,i){for(var n,o=!1,s=[],c=new Set,l=i.value,d=i.location;;){if(l.length===0){var p=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var u=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(u.err)return u;d=P(p,this.clonePosition()),l=this.message.slice(p.offset,this.offset())}else break}if(c.has(l))return this.error(r==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);l==="other"&&(o=!0),this.bumpSpace();var h=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,P(this.clonePosition(),this.clonePosition()));var m=this.parseMessage(t+1,r,a);if(m.err)return m;var g=this.tryParseArgumentClose(h);if(g.err)return g;s.push([l,{value:m.val,location:P(h,this.clonePosition())}]),c.add(l),this.bumpSpace(),n=this.parseIdentifierIfPossible(),l=n.value,d=n.location}return s.length===0?this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,P(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(w.MISSING_OTHER_CLAUSE,P(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var a=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(a=-1);for(var n=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)n=!0,o=o*10+(s-48),this.bump();else break}var c=P(i,this.clonePosition());return n?(o*=a,Zc(o)?{val:o,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=Xn(this.message,t);if(r===void 0)throw Error("Offset ".concat(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(Wn(this.message,t,this.offset())){for(var r=0;r=0?(this.bumpTo(a),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),a=this.message.charCodeAt(r+(t>=65536?2:1));return a??null},e}();function Ia(e){return e>=97&&e<=122||e>=65&&e<=90}function el(e){return Ia(e)||e===47}function tl(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 Qn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function rl(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 Da(e){e.forEach(function(t){if(delete t.location,gr(t)||fr(t))for(var r in t.options)delete t.options[r].location,Da(t.options[r].value);else pr(t)&&xr(t.style)||(mr(t)||ur(t))&&Mt(t.style)?delete t.style.location:vr(t)&&Da(t.children)})}function Jn(e,t){t===void 0&&(t={}),t=_({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Zn(e,t).parse();if(r.err){var a=SyntaxError(w[r.err.kind]);throw a.location=r.err.location,a.originalMessage=r.err.message,a}return t?.captureLocation||Da(r.val),r.val}function Nt(e,t){var r=t&&t.cache?t.cache:cl,a=t&&t.serializer?t.serializer:sl,i=t&&t.strategy?t.strategy:il;return i(e,{cache:r,serializer:a})}function al(e){return e==null||typeof e=="number"||typeof e=="boolean"}function eo(e,t,r,a){var i=al(a)?a:r(a),n=t.get(i);return typeof n>"u"&&(n=e.call(this,a),t.set(i,n)),n}function to(e,t,r){var a=Array.prototype.slice.call(arguments,3),i=r(a),n=t.get(i);return typeof n>"u"&&(n=e.apply(this,a),t.set(i,n)),n}function Ha(e,t,r,a,i){return r.bind(t,e,a,i)}function il(e,t){var r=e.length===1?eo:to;return Ha(e,this,r,t.cache.create(),t.serializer)}function nl(e,t){return Ha(e,this,to,t.cache.create(),t.serializer)}function ol(e,t){return Ha(e,this,eo,t.cache.create(),t.serializer)}var sl=function(){return JSON.stringify(arguments)};function za(){this.cache=Object.create(null)}za.prototype.get=function(e){return this.cache[e]};za.prototype.set=function(e,t){this.cache[e]=t};var cl={create:function(){return new za}},br={variadic:nl,monadic:ol};var $e;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($e||($e={}));var Ot=function(e){kt(t,e);function t(r,a,i){var n=e.call(this,r)||this;return n.code=a,n.originalMessage=i,n}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Ba=function(e){kt(t,e);function t(r,a,i,n){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(a,'". Options are "').concat(Object.keys(i).join('", "'),'"'),$e.INVALID_VALUE,n)||this}return t}(Ot);var ro=function(e){kt(t,e);function t(r,a,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(a),$e.INVALID_VALUE,i)||this}return t}(Ot);var ao=function(e){kt(t,e);function t(r,a){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(a,'"'),$e.MISSING_VALUE,a)||this}return t}(Ot);var K;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(K||(K={}));function ll(e){return e.length<2?e:e.reduce(function(t,r){var a=t[t.length-1];return!a||a.type!==K.literal||r.type!==K.literal?t.push(r):a.value+=r.value,t},[])}function dl(e){return typeof e=="function"}function It(e,t,r,a,i,n,o){if(e.length===1&&Pa(e[0]))return[{type:K.literal,value:e[0].value}];for(var s=[],c=0,l=e;c0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=Jn,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();var no=ao;var Ui={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",strikethroughAriaLabel:"Regularly at",planTypeLabel:"{planType, select, ABM {Annual, billed monthly} other {}}"},ul=ja("ConsonantTemplates/price"),gl=/<\/?[^>]+(>|$)/g,B={container:"price",containerOptical:"price-optical",containerStrikethrough:"price-strikethrough",containerPromoStrikethrough:"price-promo-strikethrough",containerAlternative:"price-alternative",containerAnnual:"price-annual",containerAnnualPrefix:"price-annual-prefix",containerAnnualSuffix:"price-annual-suffix",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"},Le={perUnitLabel:"perUnitLabel",perUnitAriaLabel:"perUnitAriaLabel",recurrenceLabel:"recurrenceLabel",recurrenceAriaLabel:"recurrenceAriaLabel",taxExclusiveLabel:"taxExclusiveLabel",taxInclusiveLabel:"taxInclusiveLabel",strikethroughAriaLabel:"strikethroughAriaLabel",alternativePriceAriaLabel:"alternativePriceAriaLabel"},$i="TAX_EXCLUSIVE",fl=e=>Ga(e)?Object.entries(e).filter(([,t])=>ot(t)||er(t)||t===!0).reduce((t,[r,i])=>t+` ${r}${i===!0?"":'="'+$a(i)+'"'}`,""):"",U=(e,t,r,i=!1)=>`${i?fn(t):t??""}`;function vl(e){e=e.replaceAll("","</a>");let t=/]+(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("",">");e=e.replaceAll(i,a)}),e}function xl(e){e=e.replaceAll("</a>","");let t=/<a (?!>)(.*?)(>|$)/g;return e.match(t)?.forEach(i=>{let a=i.replace("<a ","");e=e.replaceAll(i,a)}),e}function we(e,t,r,i){let a=e[r];if(a==null)return"";let n=a.includes("<"),o=a.includes("${t}`:r&&(g=`${r}`),c&&(g+=h+m),g+=U(B.integer,s),g+=U(B.decimalsDelimiter,n),g+=U(B.decimals,a),c||(g+=m+h),g+=U(B.recurrence,l,null,!0),g+=U(B.unitType,d,null,!0),g+=U(B.taxInclusivity,p,!0),U(e,g,{...u})}var Y=({isAlternativePrice:e=!1,displayOptical:t=!1,displayStrikethrough:r=!1,displayPromoStrikethrough:i=!1,displayAnnual:a=!1,instant:n=void 0}={})=>({country:o,displayFormatted:s=!0,displayRecurrence:c=!0,displayPerUnit:l=!1,displayTax:d=!1,language:p,literals:u={},quantity:h=1,space:m=!1,isPromoApplied:g=!1}={},{commitment:v,offerSelectorIds:b,formatString:E,price:x,priceWithoutDiscount:A,taxDisplay:N,taxTerm:M,term:z,usePrecision:$,promotion:Q}={},j={})=>{Object.entries({country:o,formatString:E,language:p,price:x}).forEach(([qo,Vo])=>{if(Vo==null)throw new Error(`Argument "${qo}" is missing for osi ${b?.toString()}, country ${o}, language ${p}`)});let F={...Ui,...u},R=`${p.toLowerCase()}-${o.toUpperCase()}`,J;Q&&!g&&A?J=e||i?x:A:r&&A?J=A:J=x;let se=t?xn:bn;a&&(se=yn);let{accessiblePrice:Ve,recurrenceTerm:Ki,...Zi}=se({commitment:v,formatString:E,instant:n,isIndianPrice:o==="IN",originalPrice:x,priceWithoutDiscount:A,price:t?x:J,promotion:Q,quantity:h,term:z,usePrecision:$}),Er="",Ar="",Sr="";y(c)&&Ki&&(Sr=we(F,R,Le.recurrenceLabel,{recurrenceTerm:Ki}));let Ut="";y(l)&&(m&&(Ut+=" "),Ut+=we(F,R,Le.perUnitLabel,{perUnit:"LICENSE"}));let $t="";y(d)&&M&&(m&&($t+=" "),$t+=we(F,R,N===$i?Le.taxExclusiveLabel:Le.taxInclusiveLabel,{taxTerm:M})),r&&(Er=we(F,R,Le.strikethroughAriaLabel,{strikethroughPrice:Er})),e&&(Ar=we(F,R,Le.alternativePriceAriaLabel,{alternativePrice:Ar}));let Me=B.container;if(t&&(Me+=" "+B.containerOptical),r&&(Me+=" "+B.containerStrikethrough),i&&(Me+=" "+B.containerPromoStrikethrough),e&&(Me+=" "+B.containerAlternative),a&&(Me+=" "+B.containerAnnual),y(s))return bl(Me,{...Zi,accessibleLabel:Er,altAccessibleLabel:Ar,recurrenceLabel:Sr,perUnitLabel:Ut,taxInclusivityLabel:$t},j);let{currencySymbol:Qi,decimals:Bo,decimalsDelimiter:Fo,hasCurrencySpace:Ji,integer:Uo,isCurrencyFirst:$o}=Zi,je=[Uo,Fo,Bo];$o?(je.unshift(Ji?"\xA0":""),je.unshift(Qi)):(je.push(Ji?"\xA0":""),je.push(Qi)),je.push(Sr,Ut,$t);let Go=je.join("");return U(Me,Go,j)},oo=()=>(e,t,r)=>{let i=Fe(t.promotion,t.promotion?.displaySummary?.instant,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n=(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price&&(!t.promotion||i);return`${n?Y({displayStrikethrough:!0})({isPromoApplied:i,...e},t,r)+" ":""}${Y({isAlternativePrice:n})({isPromoApplied:i,...e},t,r)}`},so=()=>(e,t,r)=>{let{instant:i}=e;try{i||(i=new URLSearchParams(document.location.search).get("instant")),i&&(i=new Date(i))}catch{i=void 0}let a=Fe(t.promotion,i,Array.isArray(e.quantity)?e.quantity[0]:e.quantity),n={...e,displayTax:!1,displayPerUnit:!1,isPromoApplied:a};if(!a)return Y()(e,{...t,price:t.priceWithoutDiscount},r)+U(B.containerAnnualPrefix," (")+Y({displayAnnual:!0,instant:i})(n,{...t,price:t.priceWithoutDiscount},r)+U(B.containerAnnualSuffix,")");let s=(e.displayOldPrice===void 0||y(e.displayOldPrice))&&t.priceWithoutDiscount&&t.priceWithoutDiscount!=t.price;return`${s?Y({displayStrikethrough:!0})(n,t,r)+" ":""}${Y({isAlternativePrice:s})({isPromoApplied:a,...e},t,r)}${U(B.containerAnnualPrefix," (")}${Y({displayAnnual:!0,instant:i})(n,t,r)}${U(B.containerAnnualSuffix,")")}`},co=()=>(e,t,r)=>{let i={...e,displayTax:!1,displayPerUnit:!1};return`${Y({isAlternativePrice:e.displayOldPrice})(e,t,r)}${U(B.containerAnnualPrefix," (")}${Y({displayAnnual:!0})(i,t,r)}${U(B.containerAnnualSuffix,")")}`};var Dt={...B,containerLegal:"price-legal",planType:"price-plan-type"},yr={...Le,planTypeLabel:"planTypeLabel"};function yl(e,{perUnitLabel:t,taxInclusivityLabel:r,planTypeLabel:i},a={}){let n="";return n+=U(Dt.unitType,t,null,!0),r&&i&&(r+=". "),n+=U(Dt.taxInclusivity,r,!0),n+=U(Dt.planType,i,null),U(e,n,{...a})}var lo=({country:e,displayPerUnit:t=!1,displayTax:r=!1,displayPlanType:i=!1,language:a,literals:n={}}={},{taxDisplay:o,taxTerm:s,planType:c}={},l={})=>{let d={...Ui,...n},p=`${a.toLowerCase()}-${e.toUpperCase()}`,u="";y(t)&&(u=we(d,p,yr.perUnitLabel,{perUnit:"LICENSE"}));let h="";e==="US"&&a==="en"&&(r=!1),y(r)&&s&&(h=we(d,p,o===$i?yr.taxExclusiveLabel:yr.taxInclusiveLabel,{taxTerm:s}));let m="";y(i)&&c&&(m=we(d,p,yr.planTypeLabel,{planType:c}));let g=Dt.container;return g+=" "+Dt.containerLegal,yl(g,{perUnitLabel:u,taxInclusivityLabel:h,planTypeLabel:m},l)};var ho=Y(),po=oo(),mo=Y({displayOptical:!0}),uo=Y({displayStrikethrough:!0}),go=Y({displayPromoStrikethrough:!0}),fo=Y({displayAnnual:!0}),vo=Y({displayOptical:!0,isAlternativePrice:!0}),xo=Y({isAlternativePrice:!0}),bo=co(),yo=so(),wo=lo;var wl=(e,t)=>{if(!(!Tt(e)||!Tt(t)))return Math.floor((t-e)/t*100)},Eo=()=>(e,t)=>{let{price:r,priceWithoutDiscount:i}=t,a=wl(r,i);return a===void 0?'':`${a}%`};var Ao=Eo();var So="INDIVIDUAL_COM",qi="TEAM_COM",To="INDIVIDUAL_EDU",Vi="TEAM_EDU",El=["AT_de","AU_en","BE_en","BE_fr","BE_nl","BG_bg","CH_de","CH_fr","CH_it","CZ_cs","CO_es","DE_de","DK_da","EE_et","EG_ar","EG_en","ES_es","FI_fi","FR_fr","GB_en","GR_el","GR_en","HU_hu","ID_en","ID_id","ID_in","IE_en","IN_en","IN_hi","IT_it","JP_ja","KR_ko","LU_de","LU_en","LU_fr","LT_lt","LV_lv","MY_en","MY_ms","MU_en","NL_nl","NG_en","NO_nb","NZ_en","PE_es","PL_pl","PT_pt","RO_ro","SE_sv","SI_sl","SK_sk","SG_en","TH_en","TH_th","TR_tr","UA_uk","ZA_en","SA_ar","SA_en","MX_es","CL_es","PE_es","AR_es"],Al={[So]:[],[qi]:["VN_vi","VN_en","TW_zh"],[To]:[],[Vi]:["VN_vi","VN_en","TW_zh"]},Sl={MU_en:[!0,!0,!0,!0],NG_en:[!1,!1,!1,!1],AU_en:[!1,!1,!1,!1],JP_ja:[!1,!1,!1,!1],NZ_en:[!1,!1,!1,!1],TH_en:[!1,!1,!1,!1],TH_th:[!1,!1,!1,!1],ZA_en:[!1,!1,!1,!1],PE_es:[!1,!1,!1,!1]},Tl=[So,qi,To,Vi],Cl=e=>[qi,Vi].includes(e);function Gi(e,t,r,i){if(e[t])return e[t];let a=`${t}_${r}`;if(e[a])return e[a];let n;if(i)n=e.find(o=>o.startsWith(`${t}_`));else{let o=Object.keys(e).find(s=>s.startsWith(`${t}_`));n=o?e[o]:null}return n}var _l=(e,t,r,i)=>{let a=`${r}_${i}`,n=Gi(Sl,e,t,!1);if(n){let o=Tl.indexOf(a);return n[o]}return Cl(a)},Pl=(e,t,r,i)=>{if(Gi(El,e,t,!0))return!0;let a=Al[`${r}_${i}`];return a?Gi(a,e,t,!0)?!0:k.displayTax:k.displayTax},ji=async(e,t,r,i)=>{let a=Pl(e,t,r,i);return{displayTax:a,forceTaxExclusive:a?_l(e,t,r,i):k.forceTaxExclusive}},Ht=class Ht extends HTMLSpanElement{constructor(){super();f(this,"masElement",new Pe(this));this.handleClick=this.handleClick.bind(this)}static get observedAttributes(){return["data-display-old-price","data-display-per-unit","data-display-recurrence","data-display-tax","data-display-plan-type","data-display-annual","data-perpetual","data-promotion-code","data-force-tax-exclusive","data-template","data-wcs-osi","data-quantity"]}static createInlinePrice(r){let i=ie();if(!i)return null;let{displayOldPrice:a,displayPerUnit:n,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:h,alternativePrice:m,template:g,wcsOsi:v}=i.collectPriceOptions(r);return lr(Ht,{displayOldPrice:a,displayPerUnit:n,displayRecurrence:o,displayTax:s,displayPlanType:c,displayAnnual:l,forceTaxExclusive:d,perpetual:p,promotionCode:u,quantity:h,alternativePrice:m,template:g,wcsOsi:v})}get isInlinePrice(){return!0}attributeChangedCallback(r,i,a){this.masElement.attributeChangedCallback(r,i,a)}connectedCallback(){this.masElement.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.masElement.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(r){r.target!==this&&(r.stopImmediatePropagation(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})))}onceSettled(){return this.masElement.onceSettled()}get value(){return this.masElement.value}get options(){return this.masElement.options}get isFailed(){return this.masElement.state===he}requestUpdate(r=!1){return this.masElement.requestUpdate(r)}async render(r={}){if(!this.isConnected)return!1;let i=ie();if(!i)return!1;let a=i.collectPriceOptions(r,this),n={...i.settings,...a};if(!n.wcsOsi.length)return!1;try{let o=this.masElement.togglePending({});this.innerHTML="";let s=i.resolveOfferSelectors(n),c=await Promise.all(s),l=c.map(h=>{let m=_t(h,n);return m?.length?m[0]:null});if(l.some(h=>!h))throw new Error(`Failed to select offers for: ${n.wcsOsi}`);let d=l,p=Ei(l);if(i.featureFlags[xe]||n[xe]){if(a.displayPerUnit===void 0&&(n.displayPerUnit=p.customerSegment!=="INDIVIDUAL"),a.displayTax===void 0||a.forceTaxExclusive===void 0){let{country:h,language:m}=n,[g=""]=p.marketSegments,v=await ji(h,m,p.customerSegment,g);a.displayTax===void 0&&(n.displayTax=v?.displayTax||n.displayTax),a.forceTaxExclusive===void 0&&(n.forceTaxExclusive=v?.forceTaxExclusive||n.forceTaxExclusive),n.forceTaxExclusive&&(d=c.map(b=>{let E=_t(b,n);return E?.length?E[0]:null}))}}else a.displayOldPrice===void 0&&(n.displayOldPrice=!0);if(i.featureFlags[We]&&n.displayAnnual!==!1&&(n.displayAnnual=!0),n.template==="discount"&&d.length===2){let[h,m]=d,g={...h,priceDetails:{...h.priceDetails,priceWithoutDiscount:m.priceDetails?.price}};return this.renderOffers([g],n,o)}let u=Ei(d);return this.renderOffers([u],n,o)}catch(o){throw this.innerHTML="",o}}renderOffers(r,i,a=void 0){if(!this.isConnected)return;let n=ie();if(!n)return!1;if(a??(a=this.masElement.togglePending()),r.length){if(this.masElement.toggleResolved(a,r,i)){this.innerHTML=n.buildPriceHTML(r,this.options);let o=this.closest("p, h3, div");if(!o||!o.querySelector('span[data-template="strikethrough"]')||o.querySelector(".alt-aria-label"))return!0;let s=o?.querySelectorAll('span[is="inline-price"]');return s.length>1&&s.length===o.querySelectorAll('span[data-template="strikethrough"]').length*2&&s.forEach(c=>{c.dataset.template!=="strikethrough"&&c.options&&!c.options.alternativePrice&&!c.isFailed&&(c.options.alternativePrice=!0,c.innerHTML=n.buildPriceHTML(r,c.options))}),!0}}else{let o=new Error(`Not provided: ${this.options?.wcsOsi??"-"}`);if(this.masElement.toggleFailed(a,o,this.options))return this.innerHTML="",!0}return!1}};f(Ht,"is","inline-price"),f(Ht,"tag","span");var Ee=Ht;window.customElements.get(Ee.is)||window.customElements.define(Ee.is,Ee,{extends:Ee.tag});function Co({literals:e,providers:t,settings:r}){function i(o,s=null){let c={country:r.country,language:r.language,locale:r.locale,literals:{...e.price}};if(s&&t?.price)for(let M of t.price)M(s,c);let{displayOldPrice:l,displayPerUnit:d,displayRecurrence:p,displayTax:u,displayPlanType:h,forceTaxExclusive:m,perpetual:g,displayAnnual:v,promotionCode:b,quantity:E,alternativePrice:x,wcsOsi:A,...N}=Object.assign(c,s?.dataset??{},o??{});return c=tr(Object.assign({...c,...N,displayOldPrice:y(l),displayPerUnit:y(d),displayRecurrence:y(p),displayTax:y(u),displayPlanType:y(h),forceTaxExclusive:y(m),perpetual:y(g),displayAnnual:y(v),promotionCode:ir(b).effectivePromoCode,quantity:st(E,k.quantity),alternativePrice:y(x),wcsOsi:cr(A)})),c}function a(o,s){if(!Array.isArray(o)||!o.length||!s)return"";let{template:c}=s,l;switch(c){case"discount":l=Ao;break;case"strikethrough":l=uo;break;case"promo-strikethrough":l=go;break;case"annual":l=fo;break;case"legal":l=wo;break;default:s.template==="optical"&&s.alternativePrice?l=vo:s.template==="optical"?l=mo:s.displayAnnual&&o[0].planType==="ABM"?l=s.promotionCode?yo:bo:s.alternativePrice?l=xo:l=s.promotionCode?po:ho}let[d]=o;return d={...d,...d.priceDetails},l({...r,...s},d)}let n=Ee.createInlinePrice;return{InlinePrice:Ee,buildPriceHTML:a,collectPriceOptions:i,createInlinePrice:n}}function Ll({locale:e=void 0,country:t=void 0,language:r=void 0}={}){return r??(r=e?.split("_")?.[0]||k.language),t??(t=e?.split("_")?.[1]||k.country),e??(e=`${r}_${t}`),{locale:e,country:t,language:r}}function _o(e={},t){let r=t.featureFlags[xe],{commerce:i={}}=e,a=ge.PRODUCTION,n=Vr,o=H("checkoutClientId",i)??k.checkoutClientId,s=Ct(H("checkoutWorkflowStep",i),ee,k.checkoutWorkflowStep),c=y(H("displayOldPrice",i),k.displayOldPrice),l=k.displayPerUnit,d=y(H("displayRecurrence",i),k.displayRecurrence),p=y(H("displayTax",i),k.displayTax),u=y(H("displayPlanType",i),k.displayPlanType),h=y(H("entitlement",i),k.entitlement),m=y(H("modal",i),k.modal),g=y(H("forceTaxExclusive",i),k.forceTaxExclusive),v=H("promotionCode",i)??k.promotionCode,b=st(H("quantity",i)),E=H("wcsApiKey",i)??k.wcsApiKey,x=i?.env==="stage",A=Te.PUBLISHED;["true",""].includes(i.allowOverride)&&(x=(H(Gr,i,{metadata:!1})?.toLowerCase()??i?.env)==="stage",A=Ct(H(qr,i),Te,A)),x&&(a=ge.STAGE,n=jr);let M=H($r)??e.preview,z=typeof M<"u"&&M!=="off"&&M!=="false",$={};z&&($={preview:z});let Q=H("mas-io-url")??e.masIOUrl??`https://www${a===ge.STAGE?".stage":""}.adobe.com/mas/io`,j=H("preselect-plan")??void 0;return{...Ll(e),...$,displayOldPrice:c,checkoutClientId:o,checkoutWorkflowStep:s,displayPerUnit:l,displayRecurrence:d,displayTax:p,displayPlanType:u,entitlement:h,extraOptions:k.extraOptions,modal:m,env:a,forceTaxExclusive:g,promotionCode:v,quantity:b,alternativePrice:k.alternativePrice,wcsApiKey:E,wcsURL:n,landscape:A,masIOUrl:Q,...j&&{preselectPlan:j}}}async function Po(e,t={},r=2,i=100){let a;for(let n=0;n<=r;n++)try{let o=await fetch(e,t);return o.retryCount=n,o}catch(o){if(a=o,a.retryCount=n,n>r)break;await new Promise(s=>setTimeout(s,i*(n+1)))}throw a}var Wi="wcs";function Lo({settings:e}){let t=re.module(Wi),{env:r,wcsApiKey:i}=e,a=new Map,n=new Map,o,s=new Map;async function c(m,g,v=!0){let b=ie(),E=zr;t.debug("Fetching:",m);let x="",A;if(m.offerSelectorIds.length>1)throw new Error("Multiple OSIs are not supported anymore");let N=new Map(g),[M]=m.offerSelectorIds,z=Date.now()+Math.random().toString(36).substring(2,7),$=`${Wi}:${M}:${z}${Yr}`,Q=`${Wi}:${M}:${z}${Xr}`,j;try{if(performance.mark($),x=new URL(e.wcsURL),x.searchParams.set("offer_selector_ids",M),x.searchParams.set("country",m.country),x.searchParams.set("locale",m.locale),x.searchParams.set("landscape",r===ge.STAGE?"ALL":e.landscape),x.searchParams.set("api_key",i),m.language&&x.searchParams.set("language",m.language),m.promotionCode&&x.searchParams.set("promotion_code",m.promotionCode),m.currency&&x.searchParams.set("currency",m.currency),A=await Po(x.toString(),{credentials:"omit"}),A.ok){let F=[];try{let R=await A.json();t.debug("Fetched:",m,R),F=R.resolvedOffers??[]}catch(R){t.error(`Error parsing JSON: ${R.message}`,{...R.context,...b?.duration})}F=F.map(ar),g.forEach(({resolve:R},J)=>{let se=F.filter(({offerSelectorIds:Ve})=>Ve.includes(J)).flat();se.length&&(N.delete(J),g.delete(J),R(se))})}else E=Hr}catch(F){E=`Network error: ${F.message}`}finally{j=performance.measure(Q,$),performance.clearMarks($),performance.clearMeasures(Q)}if(v&&g.size){t.debug("Missing:",{offerSelectorIds:[...g.keys()]});let F=on(A);g.forEach(R=>{R.reject(new ct(E,{...m,...F,response:A,measure:Vt(j),...b?.duration}))})}}function l(){clearTimeout(o);let m=[...n.values()];n.clear(),m.forEach(({options:g,promises:v})=>c(g,v))}function d(m){if(!m||typeof m!="object")throw new TypeError("Cache must be a Map or similar object");let g=r===ge.STAGE?"stage":"prod",v=m[g];if(!v||typeof v!="object"){t.warn(`No cache found for environment: ${r}`);return}for(let[b,E]of Object.entries(v))a.set(b,Promise.resolve(E.map(ar)));t.debug(`Prefilled WCS cache with ${v.size} entries`)}function p(){let m=a.size;s=new Map(a),a.clear(),t.debug(`Moved ${m} cache entries to stale cache`)}function u(m,g,v){let b=m!=="GB"&&!v?"MULT":"en",E=Kr.includes(m)?m:k.country;return{validCountry:E,validLanguage:b,locale:`${g}_${E}`}}function h({country:m,language:g,perpetual:v=!1,promotionCode:b="",wcsOsi:E=[]}){let{validCountry:x,validLanguage:A,locale:N}=u(m,g,v),M=[x,A,b].filter(z=>z).join("-").toLowerCase();return E.map(z=>{let $=`${z}-${M}`;if(a.has($))return a.get($);let Q=new Promise((j,F)=>{let R=n.get(M);R||(R={options:{country:x,locale:N,...A==="MULT"&&{language:A},offerSelectorIds:[]},promises:new Map},n.set(M,R)),b&&(R.options.promotionCode=b),R.options.offerSelectorIds.push(z),R.promises.set(z,{resolve:j,reject:F}),l()}).catch(j=>{if(s.has($))return s.get($);throw j});return a.set($,Q),Q})}return{Commitment:Re,PlanType:Ya,Term:ce,applyPlanType:ar,resolveOfferSelectors:h,flushWcsCacheInternal:p,prefillWcsCache:d,normalizeCountryLanguageAndLocale:u}}var ko="mas-commerce-service",Mo="mas-commerce-service:start",Ro="mas-commerce-service:ready",zt,dt,Ge,No,Xi,Yi=class extends HTMLElement{constructor(){super(...arguments);G(this,Ge);G(this,zt);G(this,dt);f(this,"lastLoggingTime",0)}async registerCheckoutAction(r){typeof r=="function"&&(this.buildCheckoutAction=async(i,a,n)=>{let o=await r?.(i,a,this.imsSignedInPromise,n);return o||null})}get featureFlags(){return S(this,dt)||W(this,dt,{[xe]:ut(this,Ge,Xi).call(this,xe),[We]:ut(this,Ge,Xi).call(this,We)}),S(this,dt)}activate(){let r=S(this,Ge,No),i=_o(r,this);nr(r.lana);let a=re.init(r.hostEnv).module("service");a.debug("Activating:",r);let o={price:Rn(i)},s={checkout:new Set,price:new Set},c={literals:o,providers:s,settings:i};Object.defineProperties(this,Object.getOwnPropertyDescriptors({...Ln(c),...kn(c),...Co(c),...Lo(c),...Zr,Log:re,resolvePriceTaxFlags:ji,get defaults(){return k},get log(){return re},get providers(){return{checkout(d){return s.checkout.add(d),()=>s.checkout.delete(d)},price(d){return s.price.add(d),()=>s.price.delete(d)},has:d=>s.price.has(d)||s.checkout.has(d)}},get settings(){return i}})),a.debug("Activated:",{literals:o,settings:i});let l=new CustomEvent(qt,{bubbles:!0,cancelable:!1,detail:this});performance.mark(Ro),W(this,zt,performance.measure(Ro,Mo)),this.dispatchEvent(l),setTimeout(()=>{this.logFailedRequests()},1e4)}connectedCallback(){performance.mark(Mo),this.activate()}flushWcsCache(){this.flushWcsCacheInternal(),this.log.debug("Flushed WCS cache")}isPreview(){let r=this.getAttribute("preview");return r!=null&&["true","on",!0].includes(r)}refreshOffers(){this.flushWcsCacheInternal(),document.querySelectorAll(Cr).forEach(r=>r.requestUpdate(!0)),this.log.debug("Refreshed WCS offers"),this.logFailedRequests()}refreshFragments(){this.flushWcsCacheInternal(),customElements.get("aem-fragment")?.cache.clear(),document.querySelectorAll("aem-fragment").forEach(r=>r.refresh(!1)),this.log.debug("Refreshed AEM fragments"),this.logFailedRequests()}get duration(){return{"mas-commerce-service:measure":Vt(S(this,zt))}}logFailedRequests(){let r=[...performance.getEntriesByType("resource")].filter(({startTime:a})=>a>this.lastLoggingTime).filter(({transferSize:a,duration:n,responseStatus:o})=>a===0&&n===0&&o<200||o>=400),i=Array.from(new Map(r.map(a=>[a.name,a])).values());if(i.some(({name:a})=>/(\/fragment\?|web_commerce_artifact)/.test(a))){let a=i.map(({name:n})=>n);this.log.error("Failed requests:",{failedUrls:a,...this.duration})}this.lastLoggingTime=performance.now().toFixed(3)}};zt=new WeakMap,dt=new WeakMap,Ge=new WeakSet,No=function(){let r=this.getAttribute("env")??"prod",i={commerce:{env:r},hostEnv:{name:r},lana:{tags:this.getAttribute("lana-tags"),sampleRate:parseInt(this.getAttribute("lana-sample-rate")??1,10),isProdDomain:r==="prod"},masIOUrl:this.getAttribute("mas-io-url")};return["locale","country","language","preview"].forEach(a=>{let n=this.getAttribute(a);n&&(i[a]=n)}),["checkout-workflow-step","force-tax-exclusive","checkout-client-id","allow-override","wcs-api-key"].forEach(a=>{let n=this.getAttribute(a);if(n!=null){let o=a.replace(/-([a-z])/g,s=>s[1].toUpperCase());i.commerce[o]=n}}),i},Xi=function(r){return["on","true",!0].includes(this.getAttribute(`data-${r}`)||H(r))};window.customElements.get(ko)||window.customElements.define(ko,Yi);var Ho="merch-card-collection",kl=3e4,Ml={catalog:["four-merch-cards"],plans:["four-merch-cards"],plansThreeColumns:["three-merch-cards"],product:["four-merch-cards"],productTwoColumns:["two-merch-cards"],productThreeColumns:["three-merch-cards"],segment:["four-merch-cards"],segmentTwoColumns:["two-merch-cards"],segmentThreeColumns:["three-merch-cards"],"special-offers":["three-merch-cards"],image:["three-merch-cards"],"mini-compare-chart":["three-merch-cards"],"mini-compare-chartTwoColumns":["two-merch-cards"],"mini-compare-chart-mweb":["three-merch-cards"],"mini-compare-chart-mwebTwoColumns":["two-merch-cards"]},Rl={plans:!0},Nl=(e,{filter:t})=>e.filter(r=>r?.filters&&r?.filters.hasOwnProperty(t)),Ol=(e,{types:t})=>t?(t=t.split(","),e.filter(r=>t.some(i=>r.types.includes(i)))):e,Il=e=>e.sort((t,r)=>(t.title??"").localeCompare(r.title??"","en",{sensitivity:"base"})),Dl=(e,{filter:t})=>e.sort((r,i)=>i.filters[t]?.order==null||isNaN(i.filters[t]?.order)?-1:r.filters[t]?.order==null||isNaN(r.filters[t]?.order)?1:r.filters[t].order-i.filters[t].order),Hl=(e,{search:t})=>t?.length?(t=t.toLowerCase(),e.filter(r=>(r.title??"").toLowerCase().includes(t))):e,ke,pt,qe,Ft,wr,zo,ht=class extends Io{constructor(){super();G(this,wr);G(this,ke,{});G(this,pt);G(this,qe);G(this,Ft);this.id=null,this.filter="all",this.hasMore=!1,this.resultCount=void 0,this.displayResult=!1,this.data=null,this.variant=null,this.hydrating=!1,this.hydrationReady=null,this.literalsHandlerAttached=!1,this.onUnmount=[]}render(){return Ae` - ${this.footer}`}checkReady(){if(!this.querySelector("aem-fragment"))return Promise.resolve(!0);let i=new Promise(a=>setTimeout(()=>a(!1),kl));return Promise.race([this.hydrationReady,i])}updated(r){if(!this.querySelector("merch-card"))return;let i=window.scrollY||document.documentElement.scrollTop,a=[...this.children].filter(l=>l.tagName==="MERCH-CARD"&&!l.failed);if(a.length===0)return;r.has("singleApp")&&this.singleApp&&a.forEach(l=>{l.updateFilters(l.name===this.singleApp)});let n=this.sort===pe.alphabetical?Il:Dl,s=[Nl,Ol,Hl,n].reduce((l,d)=>d(l,this),a).map((l,d)=>[l,d]);if(this.resultCount=s.length,this.page&&this.limit){let l=this.page*this.limit;this.hasMore=s.length>l,s=s.filter(([,d])=>d{c.has(l)?(l.size=l.filters[this.filter]?.size,l.style.removeProperty("display"),l.requestUpdate()):(l.style.display="none",l.size=void 0)}),window.scrollTo(0,i),this.updateComplete.then(()=>{this.dispatchLiteralsChanged(),this.sidenav&&!this.literalsHandlerAttached&&(this.sidenav.addEventListener(kr,()=>{this.dispatchLiteralsChanged()}),this.literalsHandlerAttached=!0)})}dispatchLiteralsChanged(){this.dispatchEvent(new CustomEvent(de,{detail:{resultCount:this.resultCount,searchTerm:this.search,filter:this.sidenav?.filters?.selectedText}}))}buildOverrideMap(){W(this,ke,{}),this.overrides?.split(",").forEach(r=>{let[i,a]=r?.split(":");i&&a&&(S(this,ke)[i]=a)})}connectedCallback(){super.connectedCallback(),W(this,pt,yt()),S(this,pt)&&W(this,qe,S(this,pt).Log.module(Ho)),W(this,Ft,customElements.get("merch-card")),this.buildOverrideMap(),this.init()}async init(){await this.hydrate(),this.sidenav=this.parentElement.querySelector("merch-sidenav"),this.filtered?(this.filter=this.filtered,this.page=1):this.startDeeplink(),this.initializePlaceholders()}disconnectedCallback(){super.disconnectedCallback(),this.stopDeeplink?.();for(let r of this.onUnmount)r()}initializeHeader(){let r=document.createElement("merch-card-collection-header");r.collection=this,r.classList.add(this.variant),this.parentElement.insertBefore(r,this),this.header=r,this.querySelectorAll("[placeholder]").forEach(a=>{let n=a.getAttribute("slot");this.header.placeholderKeys.includes(n)&&this.header.append(a)})}initializePlaceholders(){let r=this.data?.placeholders||{};!r.searchText&&this.data?.sidenavSettings?.searchText&&(r.searchText=this.data.sidenavSettings.searchText);for(let i of Object.keys(r)){let a=r[i],n=a.includes("

")?"div":"p",o=document.createElement(n);o.setAttribute("slot",i),o.setAttribute("placeholder",""),o.innerHTML=a,this.append(o)}}attachSidenav(r,i=!0){if(!r)return;i&&this.parentElement.prepend(r),this.sidenav=r,this.sidenav.variant=this.variant,this.sidenav.classList.add(this.variant),Rl[this.variant]&&this.sidenav.setAttribute("autoclose",""),this.initializeHeader(),this.dispatchEvent(new CustomEvent(vt));let a=S(this,Ft)?.getCollectionOptions(this.variant)?.onSidenavAttached;a&&a(this)}async hydrate(){if(this.hydrating)return!1;let r=this.querySelector("aem-fragment");if(!r)return;this.id=r.getAttribute("fragment"),this.hydrating=!0;let i;this.hydrationReady=new Promise(s=>{i=s});let a=this;function n(s){let c;return s.fields?.checkboxGroups?c=s.fields.checkboxGroups:s.fields?.tagFilters&&(c=[{title:s.fields?.tagFiltersTitle,label:"types",deeplink:"types",checkboxes:s.fields.tagFilters.map(l=>{let d=l.split("/").pop(),p=s.settings?.tagLabels?.[d]||d;return p=p.startsWith("coll-tag-filter")?d.charAt(0).toUpperCase()+d.slice(1):p,{name:d,label:p}})}]),{searchText:s.fields?.searchText,tagFilters:c,linksTitle:s.fields?.linksTitle,link:s.fields?.link,linkText:s.fields?.linkText,linkIcon:s.fields?.linkIcon}}function o(s,c){let l={cards:[],hierarchy:[],placeholders:s.placeholders,sidenavSettings:n(s)};function d(p,u){for(let h of u){if(h.fieldName==="variations")continue;if(h.fieldName==="cards"){if(l.cards.findIndex(x=>x.id===h.identifier)!==-1)continue;if(!s.references[h.identifier]?.value){S(a,qe)?.error(`Reference not found for card: ${h.identifier}`);continue}l.cards.push(s.references[h.identifier].value);continue}let m=s.references[h.identifier]?.value,g=h.referencesTree,v=c[h.identifier];if(v){let x=document.querySelector(`aem-fragment[fragment="${v}"]`)?.rawData;if(x?.fields)m=x,g=x.referencesTree,s.references={...s.references,...x.references};else{S(a,qe)?.error(`Override fragment ${v} not found or invalid:`);continue}}if(!m?.fields)continue;let{fields:b}=m,E={label:b.label||"",icon:b.icon,iconLight:b.iconLight,queryLabel:b.queryLabel,cards:b.cards?b.cards.map(x=>c[x]||x):[],collections:[]};b.defaultchild&&(E.defaultchild=c[b.defaultchild]||b.defaultchild),p.push(E),d(E.collections,g)}}return d(l.hierarchy,s.referencesTree),l.hierarchy.length===0&&(a.filtered="all"),l}r.addEventListener(Rr,s=>{ut(this,wr,zo).call(this,"Error loading AEM fragment",s.detail),this.hydrating=!1,r.remove()}),r.addEventListener(Mr,async s=>{this.limit=27,this.data=o(s.detail,S(this,ke)),s.detail.variationId&&this.setAttribute("variation-id",s.detail.variationId);let{cards:c,hierarchy:l}=this.data,d=l.length===0&&s.detail.fields?.defaultchild?S(this,ke)[s.detail.fields.defaultchild]||s.detail.fields.defaultchild:null;r.cache.add(...c);let p=(m,g)=>{for(let v of m)if(v.defaultchild===g||v.collections&&p(v.collections,g))return!0;return!1};for(let m of c){let x=function(N){for(let M of N){let z=M.cards.indexOf(v);if(z===-1)continue;let $=M.queryLabel??M?.label?.toLowerCase()??"";g.filters[$]={order:z+1,size:m.fields.size},x(M.collections)}},g=document.createElement("merch-card"),v=S(this,ke)[m.id]||m.id;g.setAttribute("consonant",""),g.setAttribute("style","");let b=m.fields.tags?.filter(N=>N.startsWith("mas:types/")).map(N=>N.split("/")[1]).join(",");b&&g.setAttribute("types",b),Wt(m.fields.variant)?.supportsDefaultChild&&(d?v===d:p(l,v))&&g.setAttribute("data-default-card","true"),x(l);let A=document.createElement("aem-fragment");A.setAttribute("fragment",v),g.append(A),Object.keys(g.filters).length===0&&(g.filters={all:{order:c.indexOf(m)+1,size:m.fields.size}}),this.append(g)}let u="",h=ln(c[0]?.fields?.variant);this.variant=h,h==="plans"&&c.length===3&&!c.some(m=>m.fields?.size?.includes("wide"))?u="ThreeColumns":(h==="segment"||h==="product")&&(c.length===2||c.length===3)?u=c.length===2?"TwoColumns":"ThreeColumns":(h==="mini-compare-chart"||h==="mini-compare-chart-mweb")&&c.length<=2&&(u=c.length===1?"":"TwoColumns"),h&&this.classList.add("merch-card-collection",h,...Ml[`${h}${u}`]||[]),this.displayResult=!0,this.hydrating=!1,r.remove(),i(!0)}),await this.hydrationReady}get footer(){if(!this.filtered)return Ae`